{"id":328013,"date":"2022-01-14T15:00:39","date_gmt":"2022-01-14T15:00:39","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=328013"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=328013","title":{"rendered":"<span>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043b\u0438\u0441\u0442 \u0434\u0435\u0440\u0435\u0432\u0430 \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u0432 \u0434\u0435\u0432\u044f\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u0445 \u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/wo\/uo\/ni\/wouoni_jfelh3xl5frc-u06ukzg.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/wo\/uo\/ni\/wouoni_jfelh3xl5frc-u06ukzg.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  <\/p>\n<p>\u041b\u044e\u0434\u0438 \u0447\u0430\u0441\u0442\u043e \u0434\u0443\u043c\u0430\u044e\u0442, \u0447\u0442\u043e \u043a\u043e\u0434 \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043b\u043e\u0445\u043e, \u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u043b\u043e\u0445\u043e. \u041d\u043e \u044f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u0442\u0430\u043a.<\/p>\n<p>  <\/p>\n<p>\u042f \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0447\u0438\u0442\u0430\u043b, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u043d\u0430 \u0441\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0438 \u044f\u0437\u044b\u043a \u0437\u0434\u0435\u0441\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u043f\u0440\u0438\u0447\u0451\u043c.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0432\u043e\u0442, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430\u0434 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043b\u0438\u0441\u0442\u0430 \u0434\u0435\u0440\u0435\u0432\u0430. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0439, \u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0447\u0442\u043e \u0440\u0435\u0448\u0438\u043b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e (\u0438 \u043d\u0443\u0436\u043d\u043e) \u043f\u0438\u0441\u0430\u0442\u044c \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044f \u0441\u043e\u043c\u043d\u0435\u0432\u0430\u044e\u0441\u044c, \u0447\u0442\u043e \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044f \u043e\u0448\u0438\u0431\u0430\u044e\u0441\u044c. \u0423\u0432\u0438\u0434\u0438\u043c \u0434\u0430\u043b\u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0414\u0435\u0440\u0435\u0432\u043e \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0438\u0441\u0430\u043b\u0441\u044f \u043a\u043e\u0434, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u043c, \u0434\u0432\u0443\u0441\u0432\u044f\u0437\u043d\u044b\u043c \u0438 \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0437\u0435\u043b, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">struct Node   .parent      dd ?   ; \u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c\u0443 \u0443\u0437\u043b\u0443   .f_child     dd ?   ; \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u043c\u0443 \u0443\u0437\u043b\u0443   .l_child     dd ?   ; \u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c\u0443 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u043c\u0443 \u0443\u0437\u043b\u0443   .next        dd ?   ; \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0443\u0437\u043b\u0443 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u043e\u0432   .prev        dd ?   ; \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u0443\u0437\u043b\u0443 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 ends<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" align=\"left\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/o8\/yn\/h_\/o8ynh_ab-1x0q_hbo6exy7oorho.png\" data-width=\"320\"\/>\u0412\u0441\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u0443\u0437\u043b\u044b \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u0434\u0432\u0443\u0441\u0432\u044f\u0437\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a (\u043f\u043e\u043b\u044f .next, .prev). \u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0443\u0437\u0435\u043b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u043e \u0438 \u043a\u043e\u043d\u0435\u0446 \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 <code>.f_child<\/code> \u0438 <code>.l_child<\/code>.<\/p>\n<p>  <\/p>\n<p><strong>\u0417\u0430\u0434\u0430\u0447\u0430: \u041f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043b\u0438\u0441\u0442\u0443 \u0434\u0435\u0440\u0435\u0432\u0430, \u043d\u0430\u0434\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043b\u0438\u0441\u0442. \u0415\u0441\u043b\u0438 \u043b\u0438\u0441\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439, \u043d\u0430\u0439\u0442\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u043b\u0438\u0441\u0442 \u0434\u0435\u0440\u0435\u0432\u0430.<\/strong><\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 <strong>\u0424\u0438\u0433.1<\/strong>; \u0421\u0438\u043d\u0438\u043c \u043f\u0443\u043d\u043a\u0442\u0438\u0440\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u0441\u0432\u044f\u0437\u0438 \u0447\u0435\u0440\u0435\u0437 <code>.prev<\/code> \u0438 <code>.next<\/code>, \u0447\u0435\u0440\u043d\u044b\u043c\u0438 \u043b\u0438\u043d\u0438\u044f\u043c\u0438 \u0441\u0432\u044f\u0437\u0438 \u0447\u0435\u0440\u0435\u0437 <code>.parent<\/code>, <code>.f_child<\/code> \u0438 <code>.l_child<\/code>, \u0430 \u043a\u0440\u0430\u0441\u043d\u044b\u043c\u0438 \u043b\u0438\u043d\u0438\u044f\u043c\u0438, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432 \u043f\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<blockquote><p>\u042f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u043d\u0430\u0434 \u041e\u0421-\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 GUI \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435. \u0412 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u043a\u0430\u0436\u0434\u043e\u0435 \u043e\u043a\u043d\u043e, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0437\u0435\u043b \u0434\u0435\u0440\u0435\u0432\u0430 \u0441 \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439.<\/p>\n<p>  \u041e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u043c\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u043b\u0438\u0441\u0442\u044c\u044f\u043c \u043d\u0443\u0436\u0435\u043d, \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432\u043f\u0435\u0440\u0451\u0434 \u0438\u043b\u0438 \u043d\u0430\u0437\u0430\u0434 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 Tab \u0438\u043b\u0438 Shift+Tab.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u2013 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0445\u043e\u0447\u0435\u0442 \u043b\u0438 \u0434\u0430\u043d\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0444\u043e\u043a\u0443\u0441 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043b\u0438 \u0435\u0433\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u043a\u043d\u043e \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043e\u0435, \u0438\u043b\u0438 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435) \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u041d\u043e \u044d\u0442\u043e \u0434\u0435\u0442\u0430\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u043c\u043e\u0439 \u0442\u0435\u043c\u0435.<\/p><\/blockquote>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043b\u0438\u043a\u0431\u0435\u0437 \u0434\u043b\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0436 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445. \u0427\u0442\u043e\u0431\u044b \u0438\u043c \u0442\u043e\u0436\u0435 \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e.<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<blockquote><p>\u0412 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u043c\u043e\u043c \u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e 3 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438:<\/p>\n<p>  <a href=\"https:\/\/mudongliang.github.io\/x86\/html\/file_module_x86_id_35.html\" rel=\"nofollow noopener noreferrer\"><code><strong>CMP<\/strong><\/code><\/a> \u2013 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0434\u0432\u0430 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0444\u043b\u0430\u0433\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f.<\/p>\n<p>  <a href=\"https:\/\/mudongliang.github.io\/x86\/html\/file_module_x86_id_34.html\" rel=\"nofollow noopener noreferrer\"><code><strong>CMOVcc<\/strong><\/code><\/a> \u2013 \u0443\u0441\u043b\u043e\u0432\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u0435\u0441\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <strong><code>cc<\/code><\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e, \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u0430 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439. \u0415\u0441\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c\u0438, \u043d\u043e \u0437\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e <strong><code>NE<\/code><\/strong> \u2013 <strong>\u043d\u0435 \u0440\u0430\u0432\u043d\u043e<\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c, \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f <code>CMOVNE<\/code>.<\/p>\n<p>  <a href=\"https:\/\/mudongliang.github.io\/x86\/html\/file_module_x86_id_146.html\" rel=\"nofollow noopener noreferrer\"><code><strong>Jcc<\/strong><\/code><\/a> \u2013 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u043a\u0430\u043a \u0432 <strong><code>CMOVcc<\/code><\/strong>. \u0415\u0441\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e, \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f \u0432\u043d\u0438\u0437.<\/p>\n<p>  \u041a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0430\u0434\u0440\u0435\u0441\u0435. \u0410 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445, \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441. \u0422\u043e \u0435\u0441\u0442\u044c, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e <code>[eax+Node.f_child]<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441 \u043a\u0430\u043a \u0441\u0443\u043c\u043c\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 <code>eax<\/code> \u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b <code>Node.f_child<\/code> (Node.f_child == 4 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435), \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0441 \u043d\u0438\u043c \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u2013 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043a\u0443\u0434\u0430-\u0442\u043e (mov, cmov) \u0438\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0447\u0435\u043c-\u0442\u043e (cmp) \u0438 \u0442.\u0434.<\/p><\/blockquote>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0438 \u0441\u0430\u043c \u043a\u043e\u0434 \u0432 \u0434\u0435\u0432\u044f\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">; \u041f\u043e\u0438\u0441\u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043b\u0438\u0441\u0442\u0430 ; EAX == \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u043b\u0438\u0441\u0442\u0443 \u0434\u0435\u0440\u0435\u0432\u0430.  .next:         cmp    [eax + Node.next], 0         cmovne eax, [eax + Node.next]         jne    .to_leaf          cmp    [eax + Node.parent], 0         cmovne eax, [eax+Node.parent]         jne    .next  .to_leaf:         cmp    [eax + Node.f_child], 0         cmovne eax, [eax + Node.f_child]         jne    .to_leaf  ; \u0417\u0434\u0435\u0441\u044c EAX \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043b\u0438\u0441\u0442\u0443 \u0434\u0435\u0440\u0435\u0432\u0430.<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0422\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434, \u043d\u043e \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438. \u0421\u0440\u0430\u0437\u0443 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 \u043e \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438.<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">; \u041f\u043e\u0438\u0441\u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043b\u0438\u0441\u0442\u0430 ; EAX == \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u043b\u0438\u0441\u0442\u0443 \u0434\u0435\u0440\u0435\u0432\u0430.  .next:                                   ; \u0418\u0449\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0443\u0437\u0435\u043b:         cmp    [eax + Node.next], 0      ; \u042d\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0443\u0437\u0435\u043b?         cmovne eax, [eax + Node.next]    ; \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0431\u0435\u0440\u0451\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439...         jne    .to_leaf                  ; ...\u0438 \u0438\u0434\u0451\u043c \u043a \u0432\u044b\u0445\u043e\u0434\u0443.          cmp    [eax + Node.parent], 0    ; \u044d\u0442\u043e \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0443\u0437\u0435\u043b?         cmovne eax, [eax+Node.parent]    ; \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0431\u0435\u0440\u0451\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0443\u0437\u0435\u043b...         jne    .next                     ; ...\u0438 \u0438\u0449\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0443\u0437\u0435\u043b.  .to_leaf:                                ; \u0418\u0434\u0451\u043c \u0432\u043d\u0438\u0437 \u043a \u043b\u0438\u0441\u0442\u044c\u044f\u043c:         cmp    [eax + Node.f_child], 0   ; \u044d\u0442\u043e \u043b\u0438\u0441\u0442?         cmovne eax, [eax + Node.f_child] ; \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0438\u0434\u0451\u043c \u0432\u043d\u0438\u0437...         jne    .to_leaf                  ; ...\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c  ; \u0417\u0434\u0435\u0441\u044c EAX \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043b\u0438\u0441\u0442\u0443 \u0434\u0435\u0440\u0435\u0432\u0430.<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0423 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0438\u0437\u044a\u044f\u043d. \u0415\u0441\u043b\u0438 \u0443 \u0434\u0435\u0440\u0435\u0432\u0430 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0440\u043d\u0435\u0432\u044b\u0445 \u0443\u0437\u043b\u043e\u0432, \u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043b\u0438\u0441\u0442\u0443.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043e\u0434\u043d\u043e \u0434\u0435\u0440\u0435\u0432\u043e, \u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 (\u0442\u043e\u0447\u043d\u0435\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 .prev \u0438 .next). \u041d\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u0430\u043a\u043e\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0445\u043e\u0440\u043e\u0448\u043e, \u0435\u0441\u043b\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0438\u0447\u044c, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0435\u0449\u0435 \u0442\u0440\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. \u0410 \u0442\u043e\u0447\u043d\u0435\u0435, \u0442\u0435 \u0436\u0435 \u0442\u0440\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0435\u0449\u0435 \u0440\u0430\u0437:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">.next:         cmp     [eax + Node.next], 0         cmovne  eax, [eax + Node.next]         jne     .to_leaf          cmp     [eax + Node.parent], 0         cmovne  eax, [eax+Node.parent]         jne     .next  .to_first:                             ; \u0412\u043e\u0442 \u0437\u0434\u0435\u0441\u044c.         cmp    [eax + Node.prev], 0         cmovne eax, [eax + Node.prev]         jne    .to_first  .to_leaf:         cmp    [eax+Node.f_child], 0         cmovne eax, [eax+Node.f_child]         jne    .to_leaf<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0410 \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u0435\u043d \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439, \u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043b\u0438\u0441\u0442?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0422\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043b\u0438\u0441\u0442\u0430, \u043f\u043e\u043c\u0435\u043d\u044f\u0432 <code>prev<\/code> \u043d\u0430 <code>next<\/code> \u0438 <code>f_child<\/code> \u043d\u0430 <code>l_child<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">.prev:         cmp    [eax + Node.prev], 0         cmovne eax, [eax + Node.prev]         jne    .to_leaf          cmp    [eax + Node.parent], 0         cmovne eax, [eax+Node.parent]         jne    .prev  .to_last:         cmp    [eax + Node.next], 0         cmovne eax, [eax + Node.next]         jne    .to_last  .to_leaf:         cmp    [eax + Node.l_child], 0         cmovne eax, [eax + Node.l_child]         jne    .to_leaf<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0412\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0442\u0440\u0438\u043f\u043b\u0435\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">        cmp    [variable], 0         cmovne REG, [variable]         jne    somewhere<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u0438 \u0442\u0440\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0441 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043d\u0430 C++.<\/p>\n<p>  <\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f, \u0441 \u0442\u0440\u0443\u0434\u043e\u043c (\u044f \u043d\u0435 \u0441\u0438\u043b\u0451\u043d \u0432 C++), \u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">struct Node {   Node *parent;   Node *f_child;   Node *l_child;   Node *prev;   Node *next; };<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0441\u0430\u043c \u043a\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\/\/ \u041f\u043e\u0438\u0441\u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043b\u0438\u0441\u0442\u0430 \/\/ leaf == \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u043b\u0438\u0441\u0442\u0443 \u0434\u0435\u0440\u0435\u0432\u0430.  while (1) {   if (leaf->next) {     leaf = leaf->next;     break;   };   if (leaf->parent)     leaf = leaf->parent;   else {     while (leaf->prev) leaf = leaf->prev;     break;   }; };  while (leaf->f_child) leaf = leaf->f_child;  \/\/ \u0417\u0434\u0435\u0441\u044c, leaf \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043b\u0438\u0441\u0442.<\/code><\/pre>\n<p>  <\/p>\n<p>\u042f \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443. \u041f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0435\u0433\u043e, \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u043c. \u041d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e, \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0435\u0433\u0447\u0435.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u043e\u0434\u0435 \u043d\u0430 C++ \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043e\u0431\u0449\u0435\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0430\u0434\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u043b\u0438\u043d\u0438\u044e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u0410 \u043c\u043e\u0436\u0435\u0442 \u044d\u0442\u043e \u043c\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0437\u043d\u0430\u043d\u0438\u044f \u044f\u0437\u044b\u043a\u0430? \u0418\u043b\u0438 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044f \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b \u044d\u0442\u043e\u0442 C++ \u043a\u043e\u0434.<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">g++ -m32 -Os .\/test.cpp -o .\/test<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0441\u0442\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 (\u044f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u043c\u0435\u0442\u043a\u0438 \u043a\u0430\u043a \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u0447\u0442\u043e\u0431\u044b \u043b\u0435\u0433\u0447\u0435 \u0431\u044b\u043b\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c):<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">.next:         mov   edx, [eax + Node.next]         test  edx, edx         jnz   .to_leaf          mov   edx, [eax + Node.parent]         test  edx, edx         jz    .to_first          mov   eax, edx         jmp   .next  .to_first:         mov   edx, eax         mov   eax, [eax + Node.prev]         test  eax, eax         jnz   .to_first  .to_leaf:         mov   eax, edx         mov   edx, [edx + Node.f_child]         test  edx, edx         jnz   .to_leaf<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u0434\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u044b\u043c. \u041d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u043d\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0434\u0430\u0436\u0435 \u044d\u0442\u043e\u0442 \u043d\u0435\u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434, \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 C++.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f? \u0410 \u0447\u0442\u043e \u0432\u0430\u043c \u043c\u0435\u0448\u0430\u0435\u0442 \u2013 \u043d\u0435\u0437\u043d\u0430\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0438\u0448\u0443\u0442 \u043f\u043b\u043e\u0445\u043e \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u0434, \u0438\u043b\u0438 \u0432\u044b \u0434\u0443\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435?<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/599799\/\"> https:\/\/habr.com\/ru\/post\/599799\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/wo\/uo\/ni\/wouoni_jfelh3xl5frc-u06ukzg.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/wo\/uo\/ni\/wouoni_jfelh3xl5frc-u06ukzg.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  <\/p>\n<p>\u041b\u044e\u0434\u0438 \u0447\u0430\u0441\u0442\u043e \u0434\u0443\u043c\u0430\u044e\u0442, \u0447\u0442\u043e \u043a\u043e\u0434 \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043b\u043e\u0445\u043e, \u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u043b\u043e\u0445\u043e. \u041d\u043e \u044f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u0442\u0430\u043a.<\/p>\n<p>  <\/p>\n<p>\u042f \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0447\u0438\u0442\u0430\u043b, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u043d\u0430 \u0441\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0438 \u044f\u0437\u044b\u043a \u0437\u0434\u0435\u0441\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u043f\u0440\u0438\u0447\u0451\u043c.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0432\u043e\u0442, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430\u0434 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043b\u0438\u0441\u0442\u0430 \u0434\u0435\u0440\u0435\u0432\u0430. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0439, \u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0447\u0442\u043e \u0440\u0435\u0448\u0438\u043b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e (\u0438 \u043d\u0443\u0436\u043d\u043e) \u043f\u0438\u0441\u0430\u0442\u044c \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044f \u0441\u043e\u043c\u043d\u0435\u0432\u0430\u044e\u0441\u044c, \u0447\u0442\u043e \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044f \u043e\u0448\u0438\u0431\u0430\u044e\u0441\u044c. \u0423\u0432\u0438\u0434\u0438\u043c \u0434\u0430\u043b\u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-328013","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=328013"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328013\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}