aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


client/game/llr.dll/lifted-0008.c (261305B)


      1 #define RECOMP_GENERATED_CODE
      2 #include "recomp_types.h"
      3 #include <math.h>
      4 #include <stdio.h>
      5 #include <stdlib.h>
      6 #include <string.h>
      7 
      8 void sub_38016B80(void) {
      9     int _fpu_cmp = 0;
     10     uint32_t _cf = 0;
     11     int _df = 1;
     12     uint32_t _flag_k = FK_NONE;
     13     uint32_t _flag_a = 0, _flag_b = 0;
     14     uint32_t _itail_tgt = 0;
     15     RECOMP_REGS_LOCALS
     16     RECOMP_ENTER(0x38016B80u);
     17 
     18 L_38016B80:
     19     ecx = 0x3806EAD5u; /* 0x38016B80: mov ecx, 0x3806ead5 */
     20 L_38016B85:
     21     { _itail_tgt = (uint32_t)(MEM32(0x3804E064)); goto _ljump; }
     22     { RECOMP_REGS_OUT(); return; } /* end of function */
     23   _ljump:
     24     switch (_itail_tgt) {
     25       case 0x38016B80u: goto L_38016B80;
     26       case 0x38016B85u: goto L_38016B85;
     27       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
     28     }
     29     RECOMP_REGS_OUT();
     30 }
     31 
     32 void sub_38016B90(void) {
     33     int _fpu_cmp = 0;
     34     uint32_t _cf = 0;
     35     int _df = 1;
     36     uint32_t _flag_k = FK_NONE;
     37     uint32_t _flag_a = 0, _flag_b = 0;
     38     uint32_t _itail_tgt = 0;
     39     RECOMP_REGS_LOCALS
     40     RECOMP_ENTER(0x38016B90u);
     41 
     42 L_38016B90:
     43     RECOMP_ICALL(0x38016BA0u); /* 0x38016B90: call 0x38016ba0 */ /* not lifted */
     44     RECOMP_FLAGS_IN();
     45     goto L_38016BB0; /* 0x38016B95: jmp 0x38016bb0 */
     46 L_38016BB0:
     47     PUSH32(esp, 0x38016BC0u); /* 0x38016BB0: push 0x38016bc0 */
     48     RECOMP_ICALL(0x3804B54Cu); /* 0x38016BB5: call 0x3804b54c */ /* not lifted */
     49     RECOMP_FLAGS_IN();
     50     ecx = POP32_VAL(esp); /* 0x38016BBA: pop ecx */
     51     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38016BBB: ret  */
     52     RECOMP_REGS_OUT();
     53 }
     54 
     55 void sub_38016BA0(void) {
     56     int _fpu_cmp = 0;
     57     uint32_t _cf = 0;
     58     int _df = 1;
     59     uint32_t _flag_k = FK_NONE;
     60     uint32_t _flag_a = 0, _flag_b = 0;
     61     uint32_t _itail_tgt = 0;
     62     RECOMP_REGS_LOCALS
     63     RECOMP_ENTER(0x38016BA0u);
     64 
     65 L_38016BA0:
     66     ecx = 0x3806EAD4u; /* 0x38016BA0: mov ecx, 0x3806ead4 */
     67 L_38016BA5:
     68     { _itail_tgt = (uint32_t)(MEM32(0x3804E068)); goto _ljump; }
     69     { RECOMP_REGS_OUT(); return; } /* end of function */
     70   _ljump:
     71     switch (_itail_tgt) {
     72       case 0x38016BA0u: goto L_38016BA0;
     73       case 0x38016BA5u: goto L_38016BA5;
     74       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
     75     }
     76     RECOMP_REGS_OUT();
     77 }
     78 
     79 void sub_38016BB0(void) {
     80     int _fpu_cmp = 0;
     81     uint32_t _cf = 0;
     82     int _df = 1;
     83     uint32_t _flag_k = FK_NONE;
     84     uint32_t _flag_a = 0, _flag_b = 0;
     85     uint32_t _itail_tgt = 0;
     86     RECOMP_REGS_LOCALS
     87     RECOMP_ENTER(0x38016BB0u);
     88 
     89 L_38016BB0:
     90     PUSH32(esp, 0x38016BC0u); /* 0x38016BB0: push 0x38016bc0 */
     91     RECOMP_ICALL(0x3804B54Cu); /* 0x38016BB5: call 0x3804b54c */ /* not lifted */
     92     RECOMP_FLAGS_IN();
     93     ecx = POP32_VAL(esp); /* 0x38016BBA: pop ecx */
     94     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38016BBB: ret  */
     95     RECOMP_REGS_OUT();
     96 }
     97 
     98 void sub_38016BC0(void) {
     99     int _fpu_cmp = 0;
    100     uint32_t _cf = 0;
    101     int _df = 1;
    102     uint32_t _flag_k = FK_NONE;
    103     uint32_t _flag_a = 0, _flag_b = 0;
    104     uint32_t _itail_tgt = 0;
    105     RECOMP_REGS_LOCALS
    106     RECOMP_ENTER(0x38016BC0u);
    107 
    108 L_38016BC0:
    109     ecx = 0x3806EAD4u; /* 0x38016BC0: mov ecx, 0x3806ead4 */
    110 L_38016BC5:
    111     { _itail_tgt = (uint32_t)(MEM32(0x3804E06C)); goto _ljump; }
    112     { RECOMP_REGS_OUT(); return; } /* end of function */
    113   _ljump:
    114     switch (_itail_tgt) {
    115       case 0x38016BC0u: goto L_38016BC0;
    116       case 0x38016BC5u: goto L_38016BC5;
    117       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
    118     }
    119     RECOMP_REGS_OUT();
    120 }
    121 
    122 void sub_38016BD0(void) {
    123     int _fpu_cmp = 0;
    124     uint32_t _cf = 0;
    125     int _df = 1;
    126     uint32_t _flag_k = FK_NONE;
    127     uint32_t _flag_a = 0, _flag_b = 0;
    128     uint32_t _itail_tgt = 0;
    129     RECOMP_REGS_LOCALS
    130     RECOMP_ENTER(0x38016BD0u);
    131 
    132 L_38016BD0:
    133     RECOMP_ICALL(0x38016BE0u); /* 0x38016BD0: call 0x38016be0 */ /* not lifted */
    134     RECOMP_FLAGS_IN();
    135     goto L_38016BF0; /* 0x38016BD5: jmp 0x38016bf0 */
    136 L_38016BF0:
    137     PUSH32(esp, 0x38016C00u); /* 0x38016BF0: push 0x38016c00 */
    138     RECOMP_ICALL(0x3804B54Cu); /* 0x38016BF5: call 0x3804b54c */ /* not lifted */
    139     RECOMP_FLAGS_IN();
    140     ecx = POP32_VAL(esp); /* 0x38016BFA: pop ecx */
    141     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38016BFB: ret  */
    142     RECOMP_REGS_OUT();
    143 }
    144 
    145 void sub_38016BE0(void) {
    146     int _fpu_cmp = 0;
    147     uint32_t _cf = 0;
    148     int _df = 1;
    149     uint32_t _flag_k = FK_NONE;
    150     uint32_t _flag_a = 0, _flag_b = 0;
    151     uint32_t _itail_tgt = 0;
    152     RECOMP_REGS_LOCALS
    153     RECOMP_ENTER(0x38016BE0u);
    154 
    155 L_38016BE0:
    156     ecx = 0x3806EAD9u; /* 0x38016BE0: mov ecx, 0x3806ead9 */
    157 L_38016BE5:
    158     { _itail_tgt = (uint32_t)(MEM32(0x3804E060)); goto _ljump; }
    159     { RECOMP_REGS_OUT(); return; } /* end of function */
    160   _ljump:
    161     switch (_itail_tgt) {
    162       case 0x38016BE0u: goto L_38016BE0;
    163       case 0x38016BE5u: goto L_38016BE5;
    164       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
    165     }
    166     RECOMP_REGS_OUT();
    167 }
    168 
    169 void sub_38016BF0(void) {
    170     int _fpu_cmp = 0;
    171     uint32_t _cf = 0;
    172     int _df = 1;
    173     uint32_t _flag_k = FK_NONE;
    174     uint32_t _flag_a = 0, _flag_b = 0;
    175     uint32_t _itail_tgt = 0;
    176     RECOMP_REGS_LOCALS
    177     RECOMP_ENTER(0x38016BF0u);
    178 
    179 L_38016BF0:
    180     PUSH32(esp, 0x38016C00u); /* 0x38016BF0: push 0x38016c00 */
    181     RECOMP_ICALL(0x3804B54Cu); /* 0x38016BF5: call 0x3804b54c */ /* not lifted */
    182     RECOMP_FLAGS_IN();
    183     ecx = POP32_VAL(esp); /* 0x38016BFA: pop ecx */
    184     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38016BFB: ret  */
    185     RECOMP_REGS_OUT();
    186 }
    187 
    188 void sub_38016C00(void) {
    189     int _fpu_cmp = 0;
    190     uint32_t _cf = 0;
    191     int _df = 1;
    192     uint32_t _flag_k = FK_NONE;
    193     uint32_t _flag_a = 0, _flag_b = 0;
    194     uint32_t _itail_tgt = 0;
    195     RECOMP_REGS_LOCALS
    196     RECOMP_ENTER(0x38016C00u);
    197 
    198 L_38016C00:
    199     ecx = 0x3806EAD9u; /* 0x38016C00: mov ecx, 0x3806ead9 */
    200 L_38016C05:
    201     { _itail_tgt = (uint32_t)(MEM32(0x3804E064)); goto _ljump; }
    202     { RECOMP_REGS_OUT(); return; } /* end of function */
    203   _ljump:
    204     switch (_itail_tgt) {
    205       case 0x38016C00u: goto L_38016C00;
    206       case 0x38016C05u: goto L_38016C05;
    207       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
    208     }
    209     RECOMP_REGS_OUT();
    210 }
    211 
    212 void sub_38016C10(void) {
    213     int _fpu_cmp = 0;
    214     uint32_t _cf = 0;
    215     int _df = 1;
    216     uint32_t _flag_k = FK_NONE;
    217     uint32_t _flag_a = 0, _flag_b = 0;
    218     uint32_t _itail_tgt = 0;
    219     RECOMP_REGS_LOCALS
    220     RECOMP_ENTER(0x38016C10u);
    221 
    222 L_38016C10:
    223     RECOMP_ICALL(0x38016C20u); /* 0x38016C10: call 0x38016c20 */ /* not lifted */
    224     RECOMP_FLAGS_IN();
    225     goto L_38016C30; /* 0x38016C15: jmp 0x38016c30 */
    226 L_38016C30:
    227     PUSH32(esp, 0x38016C40u); /* 0x38016C30: push 0x38016c40 */
    228     RECOMP_ICALL(0x3804B54Cu); /* 0x38016C35: call 0x3804b54c */ /* not lifted */
    229     RECOMP_FLAGS_IN();
    230     ecx = POP32_VAL(esp); /* 0x38016C3A: pop ecx */
    231     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38016C3B: ret  */
    232     RECOMP_REGS_OUT();
    233 }
    234 
    235 void sub_38016C20(void) {
    236     int _fpu_cmp = 0;
    237     uint32_t _cf = 0;
    238     int _df = 1;
    239     uint32_t _flag_k = FK_NONE;
    240     uint32_t _flag_a = 0, _flag_b = 0;
    241     uint32_t _itail_tgt = 0;
    242     RECOMP_REGS_LOCALS
    243     RECOMP_ENTER(0x38016C20u);
    244 
    245 L_38016C20:
    246     ecx = 0x3806EAD8u; /* 0x38016C20: mov ecx, 0x3806ead8 */
    247 L_38016C25:
    248     { _itail_tgt = (uint32_t)(MEM32(0x3804E068)); goto _ljump; }
    249     { RECOMP_REGS_OUT(); return; } /* end of function */
    250   _ljump:
    251     switch (_itail_tgt) {
    252       case 0x38016C20u: goto L_38016C20;
    253       case 0x38016C25u: goto L_38016C25;
    254       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
    255     }
    256     RECOMP_REGS_OUT();
    257 }
    258 
    259 void sub_38016C30(void) {
    260     int _fpu_cmp = 0;
    261     uint32_t _cf = 0;
    262     int _df = 1;
    263     uint32_t _flag_k = FK_NONE;
    264     uint32_t _flag_a = 0, _flag_b = 0;
    265     uint32_t _itail_tgt = 0;
    266     RECOMP_REGS_LOCALS
    267     RECOMP_ENTER(0x38016C30u);
    268 
    269 L_38016C30:
    270     PUSH32(esp, 0x38016C40u); /* 0x38016C30: push 0x38016c40 */
    271     RECOMP_ICALL(0x3804B54Cu); /* 0x38016C35: call 0x3804b54c */ /* not lifted */
    272     RECOMP_FLAGS_IN();
    273     ecx = POP32_VAL(esp); /* 0x38016C3A: pop ecx */
    274     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38016C3B: ret  */
    275     RECOMP_REGS_OUT();
    276 }
    277 
    278 void sub_38016C40(void) {
    279     int _fpu_cmp = 0;
    280     uint32_t _cf = 0;
    281     int _df = 1;
    282     uint32_t _flag_k = FK_NONE;
    283     uint32_t _flag_a = 0, _flag_b = 0;
    284     uint32_t _itail_tgt = 0;
    285     RECOMP_REGS_LOCALS
    286     RECOMP_ENTER(0x38016C40u);
    287 
    288 L_38016C40:
    289     ecx = 0x3806EAD8u; /* 0x38016C40: mov ecx, 0x3806ead8 */
    290 L_38016C45:
    291     { _itail_tgt = (uint32_t)(MEM32(0x3804E06C)); goto _ljump; }
    292     { RECOMP_REGS_OUT(); return; } /* end of function */
    293   _ljump:
    294     switch (_itail_tgt) {
    295       case 0x38016C40u: goto L_38016C40;
    296       case 0x38016C45u: goto L_38016C45;
    297       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
    298     }
    299     RECOMP_REGS_OUT();
    300 }
    301 
    302 void sub_38016C50(void) {
    303     int _fpu_cmp = 0;
    304     uint32_t _cf = 0;
    305     int _df = 1;
    306     uint32_t _flag_k = FK_NONE;
    307     uint32_t _flag_a = 0, _flag_b = 0;
    308     uint32_t _itail_tgt = 0;
    309     RECOMP_REGS_LOCALS
    310     RECOMP_ENTER(0x38016C50u);
    311 
    312 L_38016C50:
    313     eax = ecx + 0x24; /* 0x38016C50: lea eax, [ecx + 0x24] */
    314     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38016C53: ret  */
    315     RECOMP_REGS_OUT();
    316 }
    317 
    318 void sub_38016C60(void) {
    319     int _fpu_cmp = 0;
    320     uint32_t _cf = 0;
    321     int _df = 1;
    322     uint32_t _flag_k = FK_NONE;
    323     uint32_t _flag_a = 0, _flag_b = 0;
    324     uint32_t _itail_tgt = 0;
    325     RECOMP_REGS_LOCALS
    326     RECOMP_ENTER(0x38016C60u);
    327 
    328 L_38016C60:
    329     PUSH32(esp, ebp); /* 0x38016C60: push ebp */
    330     ebp = esp; /* 0x38016C61: mov ebp, esp */
    331     eax = MEM32(ebp + 0x8); /* 0x38016C63: mov eax, dword ptr [ebp + 8] */
    332     edx = MEM32(eax); /* 0x38016C66: mov edx, dword ptr [eax] */
    333     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x24u);
    334     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    335     ecx = ecx + 0x24u; /* 0x38016C68: add ecx, 0x24 */
    336     _flag_k = FK_ADD;
    337     MEM32(ecx) = edx; /* 0x38016C6B: mov dword ptr [ecx], edx */
    338     edx = MEM32(eax + 0x4); /* 0x38016C6D: mov edx, dword ptr [eax + 4] */
    339     MEM32(ecx + 0x4) = edx; /* 0x38016C70: mov dword ptr [ecx + 4], edx */
    340     eax = MEM32(eax + 0x8); /* 0x38016C73: mov eax, dword ptr [eax + 8] */
    341     MEM32(ecx + 0x8) = eax; /* 0x38016C76: mov dword ptr [ecx + 8], eax */
    342     ebp = POP32_VAL(esp); /* 0x38016C79: pop ebp */
    343     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38016C7A: ret 4 */
    344     RECOMP_REGS_OUT();
    345 }
    346 
    347 void sub_38016C80(void) {
    348     int _fpu_cmp = 0;
    349     uint32_t _cf = 0;
    350     int _df = 1;
    351     uint32_t _flag_k = FK_NONE;
    352     uint32_t _flag_a = 0, _flag_b = 0;
    353     uint32_t _itail_tgt = 0;
    354     RECOMP_REGS_LOCALS
    355     RECOMP_ENTER(0x38016C80u);
    356 
    357 L_38016C80:
    358     PUSH32(esp, ebp); /* 0x38016C80: push ebp */
    359     ebp = esp; /* 0x38016C81: mov ebp, esp */
    360     eax = ecx; /* 0x38016C83: mov eax, ecx */
    361     ecx = MEM32(0x3804E404); /* 0x38016C85: mov ecx, dword ptr [0x3804e404] */
    362     MEM32(eax) = ecx; /* 0x38016C8B: mov dword ptr [eax], ecx */
    363     ecx = MEM32(ebp + 0x8); /* 0x38016C8D: mov ecx, dword ptr [ebp + 8] */
    364     PUSH32(esp, esi); /* 0x38016C90: push esi */
    365     edx = ecx + 0x4; /* 0x38016C91: lea edx, [ecx + 4] */
    366     PUSH32(esp, edi); /* 0x38016C94: push edi */
    367     edi = MEM32(edx); /* 0x38016C95: mov edi, dword ptr [edx] */
    368     esi = eax + 0x4; /* 0x38016C97: lea esi, [eax + 4] */
    369     MEM32(esi) = edi; /* 0x38016C9A: mov dword ptr [esi], edi */
    370     edi = MEM32(edx + 0x4); /* 0x38016C9C: mov edi, dword ptr [edx + 4] */
    371     MEM32(esi + 0x4) = edi; /* 0x38016C9F: mov dword ptr [esi + 4], edi */
    372     edx = MEM32(edx + 0x8); /* 0x38016CA2: mov edx, dword ptr [edx + 8] */
    373     MEM32(esi + 0x8) = edx; /* 0x38016CA5: mov dword ptr [esi + 8], edx */
    374     edx = MEM32(ecx + 0x10); /* 0x38016CA8: mov edx, dword ptr [ecx + 0x10] */
    375     MEM32(eax + 0x10) = edx; /* 0x38016CAB: mov dword ptr [eax + 0x10], edx */
    376     edx = MEM32(ecx + 0x14); /* 0x38016CAE: mov edx, dword ptr [ecx + 0x14] */
    377     MEM32(eax + 0x14) = edx; /* 0x38016CB1: mov dword ptr [eax + 0x14], edx */
    378     edx = MEM32(0x3804E408); /* 0x38016CB4: mov edx, dword ptr [0x3804e408] */
    379     MEM32(eax) = edx; /* 0x38016CBA: mov dword ptr [eax], edx */
    380     edx = MEM32(ecx + 0x18); /* 0x38016CBC: mov edx, dword ptr [ecx + 0x18] */
    381     MEM32(eax + 0x18) = edx; /* 0x38016CBF: mov dword ptr [eax + 0x18], edx */
    382     edx = MEM32(0x3804E40C); /* 0x38016CC2: mov edx, dword ptr [0x3804e40c] */
    383     MEM32(eax) = edx; /* 0x38016CC8: mov dword ptr [eax], edx */
    384     edx = MEM32(0x3804E410); /* 0x38016CCA: mov edx, dword ptr [0x3804e410] */
    385     MEM32(eax) = edx; /* 0x38016CD0: mov dword ptr [eax], edx */
    386     MEM32(eax + 0x1C) = 0x3804EBA4u; /* 0x38016CD2: mov dword ptr [eax + 0x1c], 0x3804eba4 */
    387     edx = MEM32(ecx + 0x20); /* 0x38016CD9: mov edx, dword ptr [ecx + 0x20] */
    388     MEM32(eax + 0x20) = edx; /* 0x38016CDC: mov dword ptr [eax + 0x20], edx */
    389     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x24u);
    390     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    391     ecx = ecx + 0x24u; /* 0x38016CDF: add ecx, 0x24 */
    392     _flag_k = FK_ADD;
    393     esi = MEM32(ecx); /* 0x38016CE2: mov esi, dword ptr [ecx] */
    394     edx = eax + 0x24; /* 0x38016CE4: lea edx, [eax + 0x24] */
    395     MEM32(edx) = esi; /* 0x38016CE7: mov dword ptr [edx], esi */
    396     esi = MEM32(ecx + 0x4); /* 0x38016CE9: mov esi, dword ptr [ecx + 4] */
    397     MEM32(edx + 0x4) = esi; /* 0x38016CEC: mov dword ptr [edx + 4], esi */
    398     ecx = MEM32(ecx + 0x8); /* 0x38016CEF: mov ecx, dword ptr [ecx + 8] */
    399     edi = POP32_VAL(esp); /* 0x38016CF2: pop edi */
    400     MEM32(edx + 0x8) = ecx; /* 0x38016CF3: mov dword ptr [edx + 8], ecx */
    401     MEM32(eax) = 0x3804EFACu; /* 0x38016CF6: mov dword ptr [eax], 0x3804efac */
    402     MEM32(eax + 0x1C) = 0x3804EFA4u; /* 0x38016CFC: mov dword ptr [eax + 0x1c], 0x3804efa4 */
    403     esi = POP32_VAL(esp); /* 0x38016D03: pop esi */
    404     ebp = POP32_VAL(esp); /* 0x38016D04: pop ebp */
    405     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38016D05: ret 4 */
    406     RECOMP_REGS_OUT();
    407 }
    408 
    409 void sub_38016D10(void) {
    410     int _fpu_cmp = 0;
    411     uint32_t _cf = 0;
    412     int _df = 1;
    413     uint32_t _flag_k = FK_NONE;
    414     uint32_t _flag_a = 0, _flag_b = 0;
    415     uint32_t _itail_tgt = 0;
    416     RECOMP_REGS_LOCALS
    417     RECOMP_ENTER(0x38016D10u);
    418 
    419 L_38016D10:
    420     PUSH32(esp, ebp); /* 0x38016D10: push ebp */
    421     ebp = esp; /* 0x38016D11: mov ebp, esp */
    422     eax = ecx; /* 0x38016D13: mov eax, ecx */
    423     ecx = MEM32(ebp + 0x8); /* 0x38016D15: mov ecx, dword ptr [ebp + 8] */
    424     PUSH32(esp, esi); /* 0x38016D18: push esi */
    425     edx = ecx + 0x4; /* 0x38016D19: lea edx, [ecx + 4] */
    426     PUSH32(esp, edi); /* 0x38016D1C: push edi */
    427     edi = MEM32(edx); /* 0x38016D1D: mov edi, dword ptr [edx] */
    428     esi = eax + 0x4; /* 0x38016D1F: lea esi, [eax + 4] */
    429     MEM32(esi) = edi; /* 0x38016D22: mov dword ptr [esi], edi */
    430     edi = MEM32(edx + 0x4); /* 0x38016D24: mov edi, dword ptr [edx + 4] */
    431     MEM32(esi + 0x4) = edi; /* 0x38016D27: mov dword ptr [esi + 4], edi */
    432     edx = MEM32(edx + 0x8); /* 0x38016D2A: mov edx, dword ptr [edx + 8] */
    433     MEM32(esi + 0x8) = edx; /* 0x38016D2D: mov dword ptr [esi + 8], edx */
    434     edx = MEM32(ecx + 0x10); /* 0x38016D30: mov edx, dword ptr [ecx + 0x10] */
    435     MEM32(eax + 0x10) = edx; /* 0x38016D33: mov dword ptr [eax + 0x10], edx */
    436     edx = MEM32(ecx + 0x14); /* 0x38016D36: mov edx, dword ptr [ecx + 0x14] */
    437     MEM32(eax + 0x14) = edx; /* 0x38016D39: mov dword ptr [eax + 0x14], edx */
    438     edx = MEM32(ecx + 0x18); /* 0x38016D3C: mov edx, dword ptr [ecx + 0x18] */
    439     MEM32(eax + 0x18) = edx; /* 0x38016D3F: mov dword ptr [eax + 0x18], edx */
    440     edx = MEM32(ecx + 0x20); /* 0x38016D42: mov edx, dword ptr [ecx + 0x20] */
    441     MEM32(eax + 0x20) = edx; /* 0x38016D45: mov dword ptr [eax + 0x20], edx */
    442     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x24u);
    443     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    444     ecx = ecx + 0x24u; /* 0x38016D48: add ecx, 0x24 */
    445     _flag_k = FK_ADD;
    446     esi = MEM32(ecx); /* 0x38016D4B: mov esi, dword ptr [ecx] */
    447     edx = eax + 0x24; /* 0x38016D4D: lea edx, [eax + 0x24] */
    448     MEM32(edx) = esi; /* 0x38016D50: mov dword ptr [edx], esi */
    449     esi = MEM32(ecx + 0x4); /* 0x38016D52: mov esi, dword ptr [ecx + 4] */
    450     MEM32(edx + 0x4) = esi; /* 0x38016D55: mov dword ptr [edx + 4], esi */
    451     ecx = MEM32(ecx + 0x8); /* 0x38016D58: mov ecx, dword ptr [ecx + 8] */
    452     edi = POP32_VAL(esp); /* 0x38016D5B: pop edi */
    453     MEM32(edx + 0x8) = ecx; /* 0x38016D5C: mov dword ptr [edx + 8], ecx */
    454     esi = POP32_VAL(esp); /* 0x38016D5F: pop esi */
    455     ebp = POP32_VAL(esp); /* 0x38016D60: pop ebp */
    456     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38016D61: ret 4 */
    457     RECOMP_REGS_OUT();
    458 }
    459 
    460 void sub_38016D70(void) {
    461     int _fpu_cmp = 0;
    462     uint32_t _cf = 0;
    463     int _df = 1;
    464     uint32_t _flag_k = FK_NONE;
    465     uint32_t _flag_a = 0, _flag_b = 0;
    466     uint32_t _itail_tgt = 0;
    467     RECOMP_REGS_LOCALS
    468     RECOMP_ENTER(0x38016D70u);
    469 
    470 L_38016D70:
    471     PUSH32(esp, ebp); /* 0x38016D70: push ebp */
    472     ebp = esp; /* 0x38016D71: mov ebp, esp */
    473     PUSH32(esp, ebx); /* 0x38016D73: push ebx */
    474     SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x38016D74: mov bl, byte ptr [ebp + 8] */
    475     /* test LO8(ebx), 2 */ /* 0x38016D77: test bl, 2 */
    476     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24;
    477     _cf = 0;
    478     _flag_k = FK_NARROW(FK_TEST, 24);
    479     PUSH32(esp, esi); /* 0x38016D7A: push esi */
    480     esi = ecx; /* 0x38016D7B: mov esi, ecx */
    481     if (TEST_Z(_flag_a, _flag_b)) goto L_38016DAB; /* 0x38016D7D: je 0x38016dab */
    482 L_38016D7F:
    483     eax = MEM32(esi + (-0x4)); /* 0x38016D7F: mov eax, dword ptr [esi - 4] */
    484     PUSH32(esp, edi); /* 0x38016D82: push edi */
    485     PUSH32(esp, 0x38016E40u); /* 0x38016D83: push 0x38016e40 */
    486     edi = esi + (-0x4); /* 0x38016D88: lea edi, [esi - 4] */
    487     PUSH32(esp, eax); /* 0x38016D8B: push eax */
    488     PUSH32(esp, 0x30u); /* 0x38016D8C: push 0x30 */
    489     PUSH32(esp, esi); /* 0x38016D8E: push esi */
    490     RECOMP_ICALL(0x3804B582u); /* 0x38016D8F: call 0x3804b582 */ /* not lifted */
    491     RECOMP_FLAGS_IN();
    492     /* test LO8(ebx), 1 */ /* 0x38016D94: test bl, 1 */
    493     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24;
    494     _cf = 0;
    495     _flag_k = FK_NARROW(FK_TEST, 24);
    496     if (TEST_Z(_flag_a, _flag_b)) goto L_38016DA2; /* 0x38016D97: je 0x38016da2 */
    497 L_38016D99:
    498     PUSH32(esp, edi); /* 0x38016D99: push edi */
    499     RECOMP_ICALL(0x3804B4F6u); /* 0x38016D9A: call 0x3804b4f6 */ /* not lifted */
    500     RECOMP_FLAGS_IN();
    501     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    502     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    503     esp = esp + 4; /* 0x38016D9F: add esp, 4 */
    504     _flag_k = FK_ADD;
    505 L_38016DA2:
    506     eax = edi; /* 0x38016DA2: mov eax, edi */
    507     edi = POP32_VAL(esp); /* 0x38016DA4: pop edi */
    508     esi = POP32_VAL(esp); /* 0x38016DA5: pop esi */
    509     ebx = POP32_VAL(esp); /* 0x38016DA6: pop ebx */
    510     ebp = POP32_VAL(esp); /* 0x38016DA7: pop ebp */
    511     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38016DA8: ret 4 */
    512 L_38016DAB:
    513     ecx = esi; /* 0x38016DAB: mov ecx, esi */
    514     RECOMP_ICALL(0x38016E40u); /* 0x38016DAD: call 0x38016e40 */ /* not lifted */
    515     RECOMP_FLAGS_IN();
    516     /* test LO8(ebx), 1 */ /* 0x38016DB2: test bl, 1 */
    517     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24;
    518     _cf = 0;
    519     _flag_k = FK_NARROW(FK_TEST, 24);
    520     if (TEST_Z(_flag_a, _flag_b)) goto L_38016DC0; /* 0x38016DB5: je 0x38016dc0 */
    521 L_38016DB7:
    522     PUSH32(esp, esi); /* 0x38016DB7: push esi */
    523     RECOMP_ICALL(0x3804B4F6u); /* 0x38016DB8: call 0x3804b4f6 */ /* not lifted */
    524     RECOMP_FLAGS_IN();
    525     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    526     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    527     esp = esp + 4; /* 0x38016DBD: add esp, 4 */
    528     _flag_k = FK_ADD;
    529 L_38016DC0:
    530     eax = esi; /* 0x38016DC0: mov eax, esi */
    531     esi = POP32_VAL(esp); /* 0x38016DC2: pop esi */
    532     ebx = POP32_VAL(esp); /* 0x38016DC3: pop ebx */
    533     ebp = POP32_VAL(esp); /* 0x38016DC4: pop ebp */
    534     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38016DC5: ret 4 */
    535     RECOMP_REGS_OUT();
    536 }
    537 
    538 void sub_38016DD0(void) {
    539     int _fpu_cmp = 0;
    540     uint32_t _cf = 0;
    541     int _df = 1;
    542     uint32_t _flag_k = FK_NONE;
    543     uint32_t _flag_a = 0, _flag_b = 0;
    544     uint32_t _itail_tgt = 0;
    545     RECOMP_REGS_LOCALS
    546     RECOMP_ENTER(0x38016DD0u);
    547 
    548 L_38016DD0:
    549     PUSH32(esp, ebp); /* 0x38016DD0: push ebp */
    550     ebp = esp; /* 0x38016DD1: mov ebp, esp */
    551     eax = MEM32(ebp + 0x10); /* 0x38016DD3: mov eax, dword ptr [ebp + 0x10] */
    552     PUSH32(esp, esi); /* 0x38016DD6: push esi */
    553     PUSH32(esp, edi); /* 0x38016DD7: push edi */
    554     edi = MEM32(ebp + 0xC); /* 0x38016DD8: mov edi, dword ptr [ebp + 0xc] */
    555     esi = ecx; /* 0x38016DDB: mov esi, ecx */
    556     PUSH32(esp, eax); /* 0x38016DDD: push eax */
    557     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
    558     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    559     esp = esp - 0xCu; /* 0x38016DDE: sub esp, 0xc */
    560     _flag_k = FK_CMP;
    561     ecx = edi; /* 0x38016DE1: mov ecx, edi */
    562     eax = MEM32(ecx); /* 0x38016DE3: mov eax, dword ptr [ecx] */
    563     edx = esp; /* 0x38016DE5: mov edx, esp */
    564     MEM32(edx) = eax; /* 0x38016DE7: mov dword ptr [edx], eax */
    565     eax = MEM32(ecx + 0x4); /* 0x38016DE9: mov eax, dword ptr [ecx + 4] */
    566     ecx = MEM32(ecx + 0x8); /* 0x38016DEC: mov ecx, dword ptr [ecx + 8] */
    567     MEM32(edx + 0x4) = eax; /* 0x38016DEF: mov dword ptr [edx + 4], eax */
    568     MEM32(edx + 0x8) = ecx; /* 0x38016DF2: mov dword ptr [edx + 8], ecx */
    569     ecx = esi; /* 0x38016DF5: mov ecx, esi */
    570     RECOMP_ICALL(MEM32(0x3804E400)); /* 0x38016DF7: call dword ptr [0x3804e400] */
    571     RECOMP_FLAGS_IN();
    572     edx = MEM32(ebp + 0x8); /* 0x38016DFD: mov edx, dword ptr [ebp + 8] */
    573     MEM32(esi + 0x1C) = 0x3804EBA4u; /* 0x38016E00: mov dword ptr [esi + 0x1c], 0x3804eba4 */
    574     MEM32(esi + 0x20) = edx; /* 0x38016E07: mov dword ptr [esi + 0x20], edx */
    575     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    576     eax = 0; /* 0x38016E0A: xor eax, eax */
    577     _cf = 0;
    578     _flag_k = FK_TEST;
    579     MEM32(esi + 0x24) = eax; /* 0x38016E0C: mov dword ptr [esi + 0x24], eax */
    580     MEM32(esi + 0x28) = eax; /* 0x38016E0F: mov dword ptr [esi + 0x28], eax */
    581     MEM32(esi + 0x2C) = eax; /* 0x38016E12: mov dword ptr [esi + 0x2c], eax */
    582     MEM32(esi) = 0x3804EFACu; /* 0x38016E15: mov dword ptr [esi], 0x3804efac */
    583     MEM32(esi + 0x1C) = 0x3804EFA4u; /* 0x38016E1B: mov dword ptr [esi + 0x1c], 0x3804efa4 */
    584     eax = MEM32(edi); /* 0x38016E22: mov eax, dword ptr [edi] */
    585     MEM32(esi + 0x24) = eax; /* 0x38016E24: mov dword ptr [esi + 0x24], eax */
    586     ecx = MEM32(edi + 0x4); /* 0x38016E27: mov ecx, dword ptr [edi + 4] */
    587     MEM32(esi + 0x28) = ecx; /* 0x38016E2A: mov dword ptr [esi + 0x28], ecx */
    588     edx = MEM32(edi + 0x8); /* 0x38016E2D: mov edx, dword ptr [edi + 8] */
    589     edi = POP32_VAL(esp); /* 0x38016E30: pop edi */
    590     MEM32(esi + 0x2C) = edx; /* 0x38016E31: mov dword ptr [esi + 0x2c], edx */
    591     eax = esi; /* 0x38016E34: mov eax, esi */
    592     esi = POP32_VAL(esp); /* 0x38016E36: pop esi */
    593     ebp = POP32_VAL(esp); /* 0x38016E37: pop ebp */
    594     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x38016E38: ret 0xc */
    595     RECOMP_REGS_OUT();
    596 }
    597 
    598 void sub_38016E40(void) {
    599     int _fpu_cmp = 0;
    600     uint32_t _cf = 0;
    601     int _df = 1;
    602     uint32_t _flag_k = FK_NONE;
    603     uint32_t _flag_a = 0, _flag_b = 0;
    604     uint32_t _itail_tgt = 0;
    605     RECOMP_REGS_LOCALS
    606     RECOMP_ENTER(0x38016E40u);
    607 
    608 L_38016E40:
    609     MEM32(ecx) = 0x3804EFACu; /* 0x38016E40: mov dword ptr [ecx], 0x3804efac */
    610 L_38016E46:
    611     MEM32(ecx + 0x1C) = 0x3804EFA4u; /* 0x38016E46: mov dword ptr [ecx + 0x1c], 0x3804efa4 */
    612 L_38016E4D:
    613     { _itail_tgt = (uint32_t)(MEM32(0x3804E3FC)); goto _ljump; }
    614     { RECOMP_REGS_OUT(); return; } /* end of function */
    615   _ljump:
    616     switch (_itail_tgt) {
    617       case 0x38016E40u: goto L_38016E40;
    618       case 0x38016E46u: goto L_38016E46;
    619       case 0x38016E4Du: goto L_38016E4D;
    620       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
    621     }
    622     RECOMP_REGS_OUT();
    623 }
    624 
    625 void sub_38016E60(void) {
    626     int _fpu_cmp = 0;
    627     uint32_t _cf = 0;
    628     int _df = 1;
    629     uint32_t _flag_k = FK_NONE;
    630     uint32_t _flag_a = 0, _flag_b = 0;
    631     uint32_t _itail_tgt = 0;
    632     RECOMP_REGS_LOCALS
    633     RECOMP_ENTER(0x38016E60u);
    634 
    635 L_38016E60:
    636     PUSH32(esp, ebp); /* 0x38016E60: push ebp */
    637     ebp = esp; /* 0x38016E61: mov ebp, esp */
    638     PUSH32(esp, 0xFFFFFFFFu); /* 0x38016E63: push -1 */
    639     PUSH32(esp, 0x3804C04Bu); /* 0x38016E65: push 0x3804c04b */
    640     eax = MEM32(FS_BASE + (0)); /* 0x38016E6A: mov eax, dword ptr fs:[0] */
    641     PUSH32(esp, eax); /* 0x38016E70: push eax */
    642     MEM32(FS_BASE + (0)) = esp; /* 0x38016E71: mov dword ptr fs:[0], esp */
    643     PUSH32(esp, ecx); /* 0x38016E78: push ecx */
    644     PUSH32(esp, esi); /* 0x38016E79: push esi */
    645     PUSH32(esp, 0x30u); /* 0x38016E7A: push 0x30 */
    646     esi = ecx; /* 0x38016E7C: mov esi, ecx */
    647     RECOMP_ICALL(0x3804B676u); /* 0x38016E7E: call 0x3804b676 */ /* not lifted */
    648     RECOMP_FLAGS_IN();
    649     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    650     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    651     esp = esp + 4; /* 0x38016E83: add esp, 4 */
    652     _flag_k = FK_ADD;
    653     MEM32(ebp + (-0x10)) = eax; /* 0x38016E86: mov dword ptr [ebp - 0x10], eax */
    654     /* test eax, eax */ /* 0x38016E89: test eax, eax */
    655     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
    656     _cf = 0;
    657     _flag_k = FK_TEST;
    658     MEM32(ebp + (-0x4)) = 0; /* 0x38016E8B: mov dword ptr [ebp - 4], 0 */
    659     if (TEST_Z(_flag_a, _flag_b)) goto L_38016EB6; /* 0x38016E92: je 0x38016eb6 */
    660 L_38016E94:
    661     ecx = MEM32(esi + 0x18); /* 0x38016E94: mov ecx, dword ptr [esi + 0x18] */
    662     PUSH32(esp, ecx); /* 0x38016E97: push ecx */
    663     ecx = MEM32(esi + 0x20); /* 0x38016E98: mov ecx, dword ptr [esi + 0x20] */
    664     edx = esi + 0x24; /* 0x38016E9B: lea edx, [esi + 0x24] */
    665     PUSH32(esp, edx); /* 0x38016E9E: push edx */
    666     PUSH32(esp, ecx); /* 0x38016E9F: push ecx */
    667     ecx = eax; /* 0x38016EA0: mov ecx, eax */
    668     RECOMP_ICALL(0x38016DD0u); /* 0x38016EA2: call 0x38016dd0 */ /* not lifted */
    669     RECOMP_FLAGS_IN();
    670     esi = POP32_VAL(esp); /* 0x38016EA7: pop esi */
    671     ecx = MEM32(ebp + (-0xC)); /* 0x38016EA8: mov ecx, dword ptr [ebp - 0xc] */
    672     MEM32(FS_BASE + (0)) = ecx; /* 0x38016EAB: mov dword ptr fs:[0], ecx */
    673     esp = ebp; /* 0x38016EB2: mov esp, ebp */
    674     ebp = POP32_VAL(esp); /* 0x38016EB4: pop ebp */
    675     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38016EB5: ret  */
    676 L_38016EB6:
    677     ecx = MEM32(ebp + (-0xC)); /* 0x38016EB6: mov ecx, dword ptr [ebp - 0xc] */
    678     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    679     eax = 0; /* 0x38016EB9: xor eax, eax */
    680     _cf = 0;
    681     _flag_k = FK_TEST;
    682     esi = POP32_VAL(esp); /* 0x38016EBB: pop esi */
    683     MEM32(FS_BASE + (0)) = ecx; /* 0x38016EBC: mov dword ptr fs:[0], ecx */
    684     esp = ebp; /* 0x38016EC3: mov esp, ebp */
    685     ebp = POP32_VAL(esp); /* 0x38016EC5: pop ebp */
    686     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38016EC6: ret  */
    687     RECOMP_REGS_OUT();
    688 }
    689 
    690 void sub_38016ED0(void) {
    691     int _fpu_cmp = 0;
    692     uint32_t _cf = 0;
    693     int _df = 1;
    694     uint32_t _flag_k = FK_NONE;
    695     uint32_t _flag_a = 0, _flag_b = 0;
    696     uint32_t _itail_tgt = 0;
    697     RECOMP_REGS_LOCALS
    698     RECOMP_ENTER(0x38016ED0u);
    699 
    700 L_38016ED0:
    701     PUSH32(esp, ebp); /* 0x38016ED0: push ebp */
    702     ebp = esp; /* 0x38016ED1: mov ebp, esp */
    703     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x3Cu);
    704     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    705     esp = esp - 0x3Cu; /* 0x38016ED3: sub esp, 0x3c */
    706     _flag_k = FK_CMP;
    707     PUSH32(esp, ebx); /* 0x38016ED6: push ebx */
    708     ebx = MEM32(ebp + 0x8); /* 0x38016ED7: mov ebx, dword ptr [ebp + 8] */
    709     PUSH32(esp, esi); /* 0x38016EDA: push esi */
    710     esi = MEM32(ebx + 0x8); /* 0x38016EDB: mov esi, dword ptr [ebx + 8] */
    711     PUSH32(esp, edi); /* 0x38016EDE: push edi */
    712     edi = ecx; /* 0x38016EDF: mov edi, ecx */
    713     eax = edi + 0x8; /* 0x38016EE1: lea eax, [edi + 8] */
    714     ecx = MEM32(eax); /* 0x38016EE4: mov ecx, dword ptr [eax] */
    715     edx = MEM32(eax + 0x4); /* 0x38016EE6: mov edx, dword ptr [eax + 4] */
    716     eax = MEM32(eax + 0x8); /* 0x38016EE9: mov eax, dword ptr [eax + 8] */
    717     MEM32(ebp + (-0xC)) = ecx; /* 0x38016EEC: mov dword ptr [ebp - 0xc], ecx */
    718     MEM32(ebp + (-0x8)) = edx; /* 0x38016EEF: mov dword ptr [ebp - 8], edx */
    719     ecx = esi; /* 0x38016EF2: mov ecx, esi */
    720     edx = MEM32(ecx); /* 0x38016EF4: mov edx, dword ptr [ecx] */
    721     MEM32(ebp + (-0x4)) = eax; /* 0x38016EF6: mov dword ptr [ebp - 4], eax */
    722     eax = MEM32(ecx + 0x4); /* 0x38016EF9: mov eax, dword ptr [ecx + 4] */
    723     ecx = MEM32(ecx + 0x8); /* 0x38016EFC: mov ecx, dword ptr [ecx + 8] */
    724     MEM32(ebp + (-0x30)) = edx; /* 0x38016EFF: mov dword ptr [ebp - 0x30], edx */
    725     edx = ebp + (-0xC); /* 0x38016F02: lea edx, [ebp - 0xc] */
    726     MEM32(ebp + (-0x28)) = ecx; /* 0x38016F05: mov dword ptr [ebp - 0x28], ecx */
    727     PUSH32(esp, edx); /* 0x38016F08: push edx */
    728     ecx = ebp + (-0x30); /* 0x38016F09: lea ecx, [ebp - 0x30] */
    729     MEM32(ebp + (-0x2C)) = eax; /* 0x38016F0C: mov dword ptr [ebp - 0x2c], eax */
    730     RECOMP_ICALL(MEM32(0x3804E4C8)); /* 0x38016F0F: call dword ptr [0x3804e4c8] */
    731     RECOMP_FLAGS_IN();
    732     ecx = MEM32(eax); /* 0x38016F15: mov ecx, dword ptr [eax] */
    733     MEM32(ebp + (-0x18)) = ecx; /* 0x38016F17: mov dword ptr [ebp - 0x18], ecx */
    734     edx = MEM32(eax + 0x4); /* 0x38016F1A: mov edx, dword ptr [eax + 4] */
    735     MEM32(ebp + (-0x14)) = edx; /* 0x38016F1D: mov dword ptr [ebp - 0x14], edx */
    736     eax = MEM32(eax + 0x8); /* 0x38016F20: mov eax, dword ptr [eax + 8] */
    737     ecx = esi; /* 0x38016F23: mov ecx, esi */
    738     edx = MEM32(ecx); /* 0x38016F25: mov edx, dword ptr [ecx] */
    739     MEM32(ebp + (-0x10)) = eax; /* 0x38016F27: mov dword ptr [ebp - 0x10], eax */
    740     eax = MEM32(ecx + 0x4); /* 0x38016F2A: mov eax, dword ptr [ecx + 4] */
    741     ecx = MEM32(ecx + 0x8); /* 0x38016F2D: mov ecx, dword ptr [ecx + 8] */
    742     MEM32(ebp + (-0x3C)) = edx; /* 0x38016F30: mov dword ptr [ebp - 0x3c], edx */
    743     edx = ebp + (-0x18); /* 0x38016F33: lea edx, [ebp - 0x18] */
    744     MEM32(ebp + (-0x34)) = ecx; /* 0x38016F36: mov dword ptr [ebp - 0x34], ecx */
    745     PUSH32(esp, edx); /* 0x38016F39: push edx */
    746     ecx = ebp + (-0x3C); /* 0x38016F3A: lea ecx, [ebp - 0x3c] */
    747     MEM32(ebp + (-0x38)) = eax; /* 0x38016F3D: mov dword ptr [ebp - 0x38], eax */
    748     RECOMP_ICALL(MEM32(0x3804E4C8)); /* 0x38016F40: call dword ptr [0x3804e4c8] */
    749     RECOMP_FLAGS_IN();
    750     fp_push(*(float*)&MEM32(esi + 0xC)); /* 0x38016F46: fld dword ptr [esi + 0xc] */
    751     ecx = MEM32(eax); /* 0x38016F49: mov ecx, dword ptr [eax] */
    752     _st[0] += _st[0]; /* 0x38016F4B: fadd st(0), st(0) */
    753     edx = MEM32(eax + 0x4); /* 0x38016F4D: mov edx, dword ptr [eax + 4] */
    754     fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x38016F50: fld dword ptr [ebp - 0x18] */
    755     eax = MEM32(eax + 0x8); /* 0x38016F53: mov eax, dword ptr [eax + 8] */
    756     _st[0] *= _st[1]; /* 0x38016F56: fmul st(1) */
    757     MEM32(ebp + (-0x24)) = ecx; /* 0x38016F58: mov dword ptr [ebp - 0x24], ecx */
    758     MEM32(ebp + (-0x20)) = edx; /* 0x38016F5B: mov dword ptr [ebp - 0x20], edx */
    759     MEM32(ebp + (-0x1C)) = eax; /* 0x38016F5E: mov dword ptr [ebp - 0x1c], eax */
    760     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x38016F61: fstp dword ptr [ebp - 0x18] */
    761     fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x38016F64: fld dword ptr [ebp - 0x14] */
    762     _st[0] *= _st[1]; /* 0x38016F67: fmul st(1) */
    763     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x38016F69: fstp dword ptr [ebp - 0x14] */
    764     fp_push(*(float*)&MEM32(ebp + (-0x10))); /* 0x38016F6C: fld dword ptr [ebp - 0x10] */
    765     _st[0] *= _st[1]; /* 0x38016F6F: fmul st(1) */
    766     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x38016F71: fstp dword ptr [ebp - 0x10] */
    767     { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x38016F74: fstp st(0) */
    768     fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x38016F76: fld dword ptr [ebp - 0x24] */
    769     _st[0] += _st[0]; /* 0x38016F79: fadd st(0), st(0) */
    770     fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x38016F7B: fld dword ptr [ebp - 0x20] */
    771     _st[0] += _st[0]; /* 0x38016F7E: fadd st(0), st(0) */
    772     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x38016F80: fstp dword ptr [ebp - 0x20] */
    773     fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x38016F83: fld dword ptr [ebp - 0x1c] */
    774     _st[0] += _st[0]; /* 0x38016F86: fadd st(0), st(0) */
    775     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x1C)) = _v; } /* 0x38016F88: fstp dword ptr [ebp - 0x1c] */
    776     fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x38016F8B: fld dword ptr [ebp - 0xc] */
    777     _st[0] += (double)*(float*)ADDR(ebp + (-0x18)); /* 0x38016F8E: fadd dword ptr [ebp - 0x18] */
    778     fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x38016F91: fld dword ptr [ebp - 0x14] */
    779     _st[0] += (double)*(float*)ADDR(ebp + (-0x8)); /* 0x38016F94: fadd dword ptr [ebp - 8] */
    780     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38016F97: fstp dword ptr [ebp - 8] */
    781     fp_push(*(float*)&MEM32(ebp + (-0x10))); /* 0x38016F9A: fld dword ptr [ebp - 0x10] */
    782     _st[0] += (double)*(float*)ADDR(ebp + (-0x4)); /* 0x38016F9D: fadd dword ptr [ebp - 4] */
    783     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x38016FA0: fstp dword ptr [ebp - 4] */
    784     _st[0] += _st[1]; /* 0x38016FA3: fadd st(1) */
    785     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x38016FA5: fstp dword ptr [ebp - 0xc] */
    786     { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x38016FA8: fstp st(0) */
    787     fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x38016FAA: fld dword ptr [ebp - 0x20] */
    788     _st[0] += (double)*(float*)ADDR(ebp + (-0x8)); /* 0x38016FAD: fadd dword ptr [ebp - 8] */
    789     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38016FB0: fstp dword ptr [ebp - 8] */
    790     fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x38016FB3: fld dword ptr [ebp - 0x1c] */
    791     ecx = MEM32(ebx + 0x4); /* 0x38016FB6: mov ecx, dword ptr [ebx + 4] */
    792     _st[0] += (double)*(float*)ADDR(ebp + (-0x4)); /* 0x38016FB9: fadd dword ptr [ebp - 4] */
    793     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFE8u);
    794     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    795     edi = edi + 0xFFFFFFE8u; /* 0x38016FBC: add edi, -0x18 */
    796     _flag_k = FK_ADD;
    797     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x38016FBF: fstp dword ptr [ebp - 4] */
    798     edx = MEM32(ecx); /* 0x38016FC2: mov edx, dword ptr [ecx] */
    799     eax = MEM32(ecx + 0x4); /* 0x38016FC4: mov eax, dword ptr [ecx + 4] */
    800     ecx = MEM32(ecx + 0x8); /* 0x38016FC7: mov ecx, dword ptr [ecx + 8] */
    801     MEM32(ebp + (-0x24)) = edx; /* 0x38016FCA: mov dword ptr [ebp - 0x24], edx */
    802     fp_push(*(float*)&MEM32(ebp + (-0x24))); /* 0x38016FCD: fld dword ptr [ebp - 0x24] */
    803     _st[0] += (double)*(float*)ADDR(ebp + (-0xC)); /* 0x38016FD0: fadd dword ptr [ebp - 0xc] */
    804     MEM32(ebp + (-0x20)) = eax; /* 0x38016FD3: mov dword ptr [ebp - 0x20], eax */
    805     MEM32(ebp + (-0x1C)) = ecx; /* 0x38016FD6: mov dword ptr [ebp - 0x1c], ecx */
    806     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x24)) = _v; } /* 0x38016FD9: fstp dword ptr [ebp - 0x24] */
    807     edx = MEM32(ebp + (-0x24)); /* 0x38016FDC: mov edx, dword ptr [ebp - 0x24] */
    808     fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x38016FDF: fld dword ptr [ebp - 0x20] */
    809     MEM32(edi) = edx; /* 0x38016FE2: mov dword ptr [edi], edx */
    810     _st[0] += (double)*(float*)ADDR(ebp + (-0x8)); /* 0x38016FE4: fadd dword ptr [ebp - 8] */
    811     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x20)) = _v; } /* 0x38016FE7: fstp dword ptr [ebp - 0x20] */
    812     eax = MEM32(ebp + (-0x20)); /* 0x38016FEA: mov eax, dword ptr [ebp - 0x20] */
    813     fp_push(*(float*)&MEM32(ebp + (-0x1C))); /* 0x38016FED: fld dword ptr [ebp - 0x1c] */
    814     MEM32(edi + 0x4) = eax; /* 0x38016FF0: mov dword ptr [edi + 4], eax */
    815     _st[0] += (double)*(float*)ADDR(ebp + (-0x4)); /* 0x38016FF3: fadd dword ptr [ebp - 4] */
    816     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x1C)) = _v; } /* 0x38016FF6: fstp dword ptr [ebp - 0x1c] */
    817     ecx = MEM32(ebp + (-0x1C)); /* 0x38016FF9: mov ecx, dword ptr [ebp - 0x1c] */
    818     MEM32(edi + 0x8) = ecx; /* 0x38016FFC: mov dword ptr [edi + 8], ecx */
    819     edi = POP32_VAL(esp); /* 0x38016FFF: pop edi */
    820     esi = POP32_VAL(esp); /* 0x38017000: pop esi */
    821     ebx = POP32_VAL(esp); /* 0x38017001: pop ebx */
    822     esp = ebp; /* 0x38017002: mov esp, ebp */
    823     ebp = POP32_VAL(esp); /* 0x38017004: pop ebp */
    824     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017005: ret 4 */
    825     RECOMP_REGS_OUT();
    826 }
    827 
    828 void sub_38017010(void) {
    829     int _fpu_cmp = 0;
    830     uint32_t _cf = 0;
    831     int _df = 1;
    832     uint32_t _flag_k = FK_NONE;
    833     uint32_t _flag_a = 0, _flag_b = 0;
    834     uint32_t _itail_tgt = 0;
    835     RECOMP_REGS_LOCALS
    836     RECOMP_ENTER(0x38017010u);
    837 
    838 L_38017010:
    839     PUSH32(esp, ebp); /* 0x38017010: push ebp */
    840     ebp = esp; /* 0x38017011: mov ebp, esp */
    841     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u);
    842     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    843     esp = esp - 0x18u; /* 0x38017013: sub esp, 0x18 */
    844     _flag_k = FK_CMP;
    845     eax = ecx + 0x4; /* 0x38017016: lea eax, [ecx + 4] */
    846     PUSH32(esp, esi); /* 0x38017019: push esi */
    847     edx = eax; /* 0x3801701A: mov edx, eax */
    848     esi = MEM32(edx); /* 0x3801701C: mov esi, dword ptr [edx] */
    849     MEM32(ebp + (-0xC)) = esi; /* 0x3801701E: mov dword ptr [ebp - 0xc], esi */
    850     fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x38017021: fld dword ptr [ebp - 0xc] */
    851     _st[0] -= (double)*(float*)ADDR(ecx + 0x24); /* 0x38017024: fsub dword ptr [ecx + 0x24] */
    852     esi = MEM32(edx + 0x4); /* 0x38017027: mov esi, dword ptr [edx + 4] */
    853     edx = MEM32(edx + 0x8); /* 0x3801702A: mov edx, dword ptr [edx + 8] */
    854     MEM32(ebp + (-0x8)) = esi; /* 0x3801702D: mov dword ptr [ebp - 8], esi */
    855     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x38017030: fstp dword ptr [ebp - 0xc] */
    856     MEM32(ebp + (-0x4)) = edx; /* 0x38017033: mov dword ptr [ebp - 4], edx */
    857     fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x38017036: fld dword ptr [ebp - 8] */
    858     edx = MEM32(ebp + (-0xC)); /* 0x38017039: mov edx, dword ptr [ebp - 0xc] */
    859     _st[0] -= (double)*(float*)ADDR(ecx + 0x28); /* 0x3801703C: fsub dword ptr [ecx + 0x28] */
    860     MEM32(ebp + (-0x18)) = edx; /* 0x3801703F: mov dword ptr [ebp - 0x18], edx */
    861     esi = POP32_VAL(esp); /* 0x38017042: pop esi */
    862     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38017043: fstp dword ptr [ebp - 8] */
    863     edx = MEM32(ebp + (-0x8)); /* 0x38017046: mov edx, dword ptr [ebp - 8] */
    864     fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x38017049: fld dword ptr [ebp - 4] */
    865     MEM32(ebp + (-0x14)) = edx; /* 0x3801704C: mov dword ptr [ebp - 0x14], edx */
    866     _st[0] -= (double)*(float*)ADDR(ecx + 0x2C); /* 0x3801704F: fsub dword ptr [ecx + 0x2c] */
    867     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x38017052: fstp dword ptr [ebp - 4] */
    868     edx = MEM32(ebp + (-0x4)); /* 0x38017055: mov edx, dword ptr [ebp - 4] */
    869     fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x38017058: fld dword ptr [ebp + 8] */
    870     MEM32(ebp + (-0x10)) = edx; /* 0x3801705B: mov dword ptr [ebp - 0x10], edx */
    871     _st[0] *= (double)*(float*)ADDR(ecx + 0x18); /* 0x3801705E: fmul dword ptr [ecx + 0x18] */
    872     { float _v = (float)fp_pop(); *(float*)ADDR(ecx + 0x18) = _v; } /* 0x38017061: fstp dword ptr [ecx + 0x18] */
    873     fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x38017064: fld dword ptr [ebp + 8] */
    874     _st[0] *= (double)*(float*)ADDR(ecx + 0x24); /* 0x38017067: fmul dword ptr [ecx + 0x24] */
    875     { float _v = (float)fp_pop(); *(float*)ADDR(ecx + 0x24) = _v; } /* 0x3801706A: fstp dword ptr [ecx + 0x24] */
    876     fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x3801706D: fld dword ptr [ebp + 8] */
    877     _st[0] *= (double)*(float*)ADDR(ecx + 0x28); /* 0x38017070: fmul dword ptr [ecx + 0x28] */
    878     { float _v = (float)fp_pop(); *(float*)ADDR(ecx + 0x28) = _v; } /* 0x38017073: fstp dword ptr [ecx + 0x28] */
    879     fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x38017076: fld dword ptr [ebp + 8] */
    880     _st[0] *= (double)*(float*)ADDR(ecx + 0x2C); /* 0x38017079: fmul dword ptr [ecx + 0x2c] */
    881     { float _v = (float)fp_pop(); *(float*)ADDR(ecx + 0x2C) = _v; } /* 0x3801707C: fstp dword ptr [ecx + 0x2c] */
    882     fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x3801707F: fld dword ptr [ebp - 0xc] */
    883     _st[0] += (double)*(float*)ADDR(ecx + 0x24); /* 0x38017082: fadd dword ptr [ecx + 0x24] */
    884     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x18)) = _v; } /* 0x38017085: fstp dword ptr [ebp - 0x18] */
    885     fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x38017088: fld dword ptr [ebp - 0x14] */
    886     _st[0] += (double)*(float*)ADDR(ecx + 0x28); /* 0x3801708B: fadd dword ptr [ecx + 0x28] */
    887     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3801708E: fstp dword ptr [ebp - 0x14] */
    888     edx = MEM32(ebp + (-0x14)); /* 0x38017091: mov edx, dword ptr [ebp - 0x14] */
    889     fp_push(*(float*)&MEM32(ebp + (-0x10))); /* 0x38017094: fld dword ptr [ebp - 0x10] */
    890     _st[0] += (double)*(float*)ADDR(ecx + 0x2C); /* 0x38017097: fadd dword ptr [ecx + 0x2c] */
    891     ecx = MEM32(ebp + (-0x18)); /* 0x3801709A: mov ecx, dword ptr [ebp - 0x18] */
    892     MEM32(eax) = ecx; /* 0x3801709D: mov dword ptr [eax], ecx */
    893     MEM32(eax + 0x4) = edx; /* 0x3801709F: mov dword ptr [eax + 4], edx */
    894     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x380170A2: fstp dword ptr [ebp - 0x10] */
    895     ecx = MEM32(ebp + (-0x10)); /* 0x380170A5: mov ecx, dword ptr [ebp - 0x10] */
    896     MEM32(eax + 0x8) = ecx; /* 0x380170A8: mov dword ptr [eax + 8], ecx */
    897     esp = ebp; /* 0x380170AB: mov esp, ebp */
    898     ebp = POP32_VAL(esp); /* 0x380170AD: pop ebp */
    899     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x380170AE: ret 4 */
    900     RECOMP_REGS_OUT();
    901 }
    902 
    903 void sub_380170C0(void) {
    904     int _fpu_cmp = 0;
    905     uint32_t _cf = 0;
    906     int _df = 1;
    907     uint32_t _flag_k = FK_NONE;
    908     uint32_t _flag_a = 0, _flag_b = 0;
    909     uint32_t _itail_tgt = 0;
    910     RECOMP_REGS_LOCALS
    911     RECOMP_ENTER(0x380170C0u);
    912 
    913 L_380170C0:
    914     RECOMP_ICALL(0x380170D0u); /* 0x380170C0: call 0x380170d0 */ /* not lifted */
    915     RECOMP_FLAGS_IN();
    916     goto L_380170E0; /* 0x380170C5: jmp 0x380170e0 */
    917 L_380170E0:
    918     PUSH32(esp, 0x380170F0u); /* 0x380170E0: push 0x380170f0 */
    919     RECOMP_ICALL(0x3804B54Cu); /* 0x380170E5: call 0x3804b54c */ /* not lifted */
    920     RECOMP_FLAGS_IN();
    921     ecx = POP32_VAL(esp); /* 0x380170EA: pop ecx */
    922     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380170EB: ret  */
    923     RECOMP_REGS_OUT();
    924 }
    925 
    926 void sub_380170D0(void) {
    927     int _fpu_cmp = 0;
    928     uint32_t _cf = 0;
    929     int _df = 1;
    930     uint32_t _flag_k = FK_NONE;
    931     uint32_t _flag_a = 0, _flag_b = 0;
    932     uint32_t _itail_tgt = 0;
    933     RECOMP_REGS_LOCALS
    934     RECOMP_ENTER(0x380170D0u);
    935 
    936 L_380170D0:
    937     ecx = 0x3806EBADu; /* 0x380170D0: mov ecx, 0x3806ebad */
    938 L_380170D5:
    939     { _itail_tgt = (uint32_t)(MEM32(0x3804E060)); goto _ljump; }
    940     { RECOMP_REGS_OUT(); return; } /* end of function */
    941   _ljump:
    942     switch (_itail_tgt) {
    943       case 0x380170D0u: goto L_380170D0;
    944       case 0x380170D5u: goto L_380170D5;
    945       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
    946     }
    947     RECOMP_REGS_OUT();
    948 }
    949 
    950 void sub_380170E0(void) {
    951     int _fpu_cmp = 0;
    952     uint32_t _cf = 0;
    953     int _df = 1;
    954     uint32_t _flag_k = FK_NONE;
    955     uint32_t _flag_a = 0, _flag_b = 0;
    956     uint32_t _itail_tgt = 0;
    957     RECOMP_REGS_LOCALS
    958     RECOMP_ENTER(0x380170E0u);
    959 
    960 L_380170E0:
    961     PUSH32(esp, 0x380170F0u); /* 0x380170E0: push 0x380170f0 */
    962     RECOMP_ICALL(0x3804B54Cu); /* 0x380170E5: call 0x3804b54c */ /* not lifted */
    963     RECOMP_FLAGS_IN();
    964     ecx = POP32_VAL(esp); /* 0x380170EA: pop ecx */
    965     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380170EB: ret  */
    966     RECOMP_REGS_OUT();
    967 }
    968 
    969 void sub_380170F0(void) {
    970     int _fpu_cmp = 0;
    971     uint32_t _cf = 0;
    972     int _df = 1;
    973     uint32_t _flag_k = FK_NONE;
    974     uint32_t _flag_a = 0, _flag_b = 0;
    975     uint32_t _itail_tgt = 0;
    976     RECOMP_REGS_LOCALS
    977     RECOMP_ENTER(0x380170F0u);
    978 
    979 L_380170F0:
    980     ecx = 0x3806EBADu; /* 0x380170F0: mov ecx, 0x3806ebad */
    981 L_380170F5:
    982     { _itail_tgt = (uint32_t)(MEM32(0x3804E064)); goto _ljump; }
    983     { RECOMP_REGS_OUT(); return; } /* end of function */
    984   _ljump:
    985     switch (_itail_tgt) {
    986       case 0x380170F0u: goto L_380170F0;
    987       case 0x380170F5u: goto L_380170F5;
    988       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
    989     }
    990     RECOMP_REGS_OUT();
    991 }
    992 
    993 void sub_38017100(void) {
    994     int _fpu_cmp = 0;
    995     uint32_t _cf = 0;
    996     int _df = 1;
    997     uint32_t _flag_k = FK_NONE;
    998     uint32_t _flag_a = 0, _flag_b = 0;
    999     uint32_t _itail_tgt = 0;
   1000     RECOMP_REGS_LOCALS
   1001     RECOMP_ENTER(0x38017100u);
   1002 
   1003 L_38017100:
   1004     RECOMP_ICALL(0x38017110u); /* 0x38017100: call 0x38017110 */ /* not lifted */
   1005     RECOMP_FLAGS_IN();
   1006     goto L_38017120; /* 0x38017105: jmp 0x38017120 */
   1007 L_38017120:
   1008     PUSH32(esp, 0x38017130u); /* 0x38017120: push 0x38017130 */
   1009     RECOMP_ICALL(0x3804B54Cu); /* 0x38017125: call 0x3804b54c */ /* not lifted */
   1010     RECOMP_FLAGS_IN();
   1011     ecx = POP32_VAL(esp); /* 0x3801712A: pop ecx */
   1012     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3801712B: ret  */
   1013     RECOMP_REGS_OUT();
   1014 }
   1015 
   1016 void sub_38017110(void) {
   1017     int _fpu_cmp = 0;
   1018     uint32_t _cf = 0;
   1019     int _df = 1;
   1020     uint32_t _flag_k = FK_NONE;
   1021     uint32_t _flag_a = 0, _flag_b = 0;
   1022     uint32_t _itail_tgt = 0;
   1023     RECOMP_REGS_LOCALS
   1024     RECOMP_ENTER(0x38017110u);
   1025 
   1026 L_38017110:
   1027     ecx = 0x3806EBACu; /* 0x38017110: mov ecx, 0x3806ebac */
   1028 L_38017115:
   1029     { _itail_tgt = (uint32_t)(MEM32(0x3804E068)); goto _ljump; }
   1030     { RECOMP_REGS_OUT(); return; } /* end of function */
   1031   _ljump:
   1032     switch (_itail_tgt) {
   1033       case 0x38017110u: goto L_38017110;
   1034       case 0x38017115u: goto L_38017115;
   1035       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   1036     }
   1037     RECOMP_REGS_OUT();
   1038 }
   1039 
   1040 void sub_38017120(void) {
   1041     int _fpu_cmp = 0;
   1042     uint32_t _cf = 0;
   1043     int _df = 1;
   1044     uint32_t _flag_k = FK_NONE;
   1045     uint32_t _flag_a = 0, _flag_b = 0;
   1046     uint32_t _itail_tgt = 0;
   1047     RECOMP_REGS_LOCALS
   1048     RECOMP_ENTER(0x38017120u);
   1049 
   1050 L_38017120:
   1051     PUSH32(esp, 0x38017130u); /* 0x38017120: push 0x38017130 */
   1052     RECOMP_ICALL(0x3804B54Cu); /* 0x38017125: call 0x3804b54c */ /* not lifted */
   1053     RECOMP_FLAGS_IN();
   1054     ecx = POP32_VAL(esp); /* 0x3801712A: pop ecx */
   1055     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3801712B: ret  */
   1056     RECOMP_REGS_OUT();
   1057 }
   1058 
   1059 void sub_38017130(void) {
   1060     int _fpu_cmp = 0;
   1061     uint32_t _cf = 0;
   1062     int _df = 1;
   1063     uint32_t _flag_k = FK_NONE;
   1064     uint32_t _flag_a = 0, _flag_b = 0;
   1065     uint32_t _itail_tgt = 0;
   1066     RECOMP_REGS_LOCALS
   1067     RECOMP_ENTER(0x38017130u);
   1068 
   1069 L_38017130:
   1070     ecx = 0x3806EBACu; /* 0x38017130: mov ecx, 0x3806ebac */
   1071 L_38017135:
   1072     { _itail_tgt = (uint32_t)(MEM32(0x3804E06C)); goto _ljump; }
   1073     { RECOMP_REGS_OUT(); return; } /* end of function */
   1074   _ljump:
   1075     switch (_itail_tgt) {
   1076       case 0x38017130u: goto L_38017130;
   1077       case 0x38017135u: goto L_38017135;
   1078       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   1079     }
   1080     RECOMP_REGS_OUT();
   1081 }
   1082 
   1083 void sub_38017140(void) {
   1084     int _fpu_cmp = 0;
   1085     uint32_t _cf = 0;
   1086     int _df = 1;
   1087     uint32_t _flag_k = FK_NONE;
   1088     uint32_t _flag_a = 0, _flag_b = 0;
   1089     uint32_t _itail_tgt = 0;
   1090     RECOMP_REGS_LOCALS
   1091     RECOMP_ENTER(0x38017140u);
   1092 
   1093 L_38017140:
   1094     PUSH32(esp, ebp); /* 0x38017140: push ebp */
   1095     ebp = esp; /* 0x38017141: mov ebp, esp */
   1096     eax = ecx; /* 0x38017143: mov eax, ecx */
   1097     ecx = MEM32(ebp + 0x8); /* 0x38017145: mov ecx, dword ptr [ebp + 8] */
   1098     MEM32(eax) = ecx; /* 0x38017148: mov dword ptr [eax], ecx */
   1099     ebp = POP32_VAL(esp); /* 0x3801714A: pop ebp */
   1100     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3801714B: ret 4 */
   1101     RECOMP_REGS_OUT();
   1102 }
   1103 
   1104 void sub_38017150(void) {
   1105     int _fpu_cmp = 0;
   1106     uint32_t _cf = 0;
   1107     int _df = 1;
   1108     uint32_t _flag_k = FK_NONE;
   1109     uint32_t _flag_a = 0, _flag_b = 0;
   1110     uint32_t _itail_tgt = 0;
   1111     RECOMP_REGS_LOCALS
   1112     RECOMP_ENTER(0x38017150u);
   1113 
   1114 L_38017150:
   1115     eax = ecx; /* 0x38017150: mov eax, ecx */
   1116     MEM32(eax) = 0x3804EFC4u; /* 0x38017152: mov dword ptr [eax], 0x3804efc4 */
   1117     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017158: ret  */
   1118     RECOMP_REGS_OUT();
   1119 }
   1120 
   1121 void sub_38017160(void) {
   1122     int _fpu_cmp = 0;
   1123     uint32_t _cf = 0;
   1124     int _df = 1;
   1125     uint32_t _flag_k = FK_NONE;
   1126     uint32_t _flag_a = 0, _flag_b = 0;
   1127     uint32_t _itail_tgt = 0;
   1128     RECOMP_REGS_LOCALS
   1129     RECOMP_ENTER(0x38017160u);
   1130 
   1131 L_38017160:
   1132     MEM32(ecx) = 0x3804EFC4u; /* 0x38017160: mov dword ptr [ecx], 0x3804efc4 */
   1133     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017166: ret  */
   1134     RECOMP_REGS_OUT();
   1135 }
   1136 
   1137 void sub_38017170(void) {
   1138     int _fpu_cmp = 0;
   1139     uint32_t _cf = 0;
   1140     int _df = 1;
   1141     uint32_t _flag_k = FK_NONE;
   1142     uint32_t _flag_a = 0, _flag_b = 0;
   1143     uint32_t _itail_tgt = 0;
   1144     RECOMP_REGS_LOCALS
   1145     RECOMP_ENTER(0x38017170u);
   1146 
   1147 L_38017170:
   1148     eax = ecx; /* 0x38017170: mov eax, ecx */
   1149     MEM32(eax) = 0x3804EFC4u; /* 0x38017172: mov dword ptr [eax], 0x3804efc4 */
   1150     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017178: ret 4 */
   1151     RECOMP_REGS_OUT();
   1152 }
   1153 
   1154 void sub_38017180(void) {
   1155     int _fpu_cmp = 0;
   1156     uint32_t _cf = 0;
   1157     int _df = 1;
   1158     uint32_t _flag_k = FK_NONE;
   1159     uint32_t _flag_a = 0, _flag_b = 0;
   1160     uint32_t _itail_tgt = 0;
   1161     RECOMP_REGS_LOCALS
   1162     RECOMP_ENTER(0x38017180u);
   1163 
   1164 L_38017180:
   1165     PUSH32(esp, ebp); /* 0x38017180: push ebp */
   1166     ebp = esp; /* 0x38017181: mov ebp, esp */
   1167     PUSH32(esp, ebx); /* 0x38017183: push ebx */
   1168     SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x38017184: mov bl, byte ptr [ebp + 8] */
   1169     /* test LO8(ebx), 2 */ /* 0x38017187: test bl, 2 */
   1170     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24;
   1171     _cf = 0;
   1172     _flag_k = FK_NARROW(FK_TEST, 24);
   1173     PUSH32(esp, esi); /* 0x3801718A: push esi */
   1174     esi = ecx; /* 0x3801718B: mov esi, ecx */
   1175     if (TEST_Z(_flag_a, _flag_b)) goto L_380171BB; /* 0x3801718D: je 0x380171bb */
   1176 L_3801718F:
   1177     eax = MEM32(esi + (-0x4)); /* 0x3801718F: mov eax, dword ptr [esi - 4] */
   1178     PUSH32(esp, edi); /* 0x38017192: push edi */
   1179     PUSH32(esp, 0x38017160u); /* 0x38017193: push 0x38017160 */
   1180     edi = esi + (-0x4); /* 0x38017198: lea edi, [esi - 4] */
   1181     PUSH32(esp, eax); /* 0x3801719B: push eax */
   1182     PUSH32(esp, 4); /* 0x3801719C: push 4 */
   1183     PUSH32(esp, esi); /* 0x3801719E: push esi */
   1184     RECOMP_ICALL(0x3804B582u); /* 0x3801719F: call 0x3804b582 */ /* not lifted */
   1185     RECOMP_FLAGS_IN();
   1186     /* test LO8(ebx), 1 */ /* 0x380171A4: test bl, 1 */
   1187     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24;
   1188     _cf = 0;
   1189     _flag_k = FK_NARROW(FK_TEST, 24);
   1190     if (TEST_Z(_flag_a, _flag_b)) goto L_380171B2; /* 0x380171A7: je 0x380171b2 */
   1191 L_380171A9:
   1192     PUSH32(esp, edi); /* 0x380171A9: push edi */
   1193     RECOMP_ICALL(0x3804B4F6u); /* 0x380171AA: call 0x3804b4f6 */ /* not lifted */
   1194     RECOMP_FLAGS_IN();
   1195     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1196     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1197     esp = esp + 4; /* 0x380171AF: add esp, 4 */
   1198     _flag_k = FK_ADD;
   1199 L_380171B2:
   1200     eax = edi; /* 0x380171B2: mov eax, edi */
   1201     edi = POP32_VAL(esp); /* 0x380171B4: pop edi */
   1202     esi = POP32_VAL(esp); /* 0x380171B5: pop esi */
   1203     ebx = POP32_VAL(esp); /* 0x380171B6: pop ebx */
   1204     ebp = POP32_VAL(esp); /* 0x380171B7: pop ebp */
   1205     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x380171B8: ret 4 */
   1206 L_380171BB:
   1207     /* test LO8(ebx), 1 */ /* 0x380171BB: test bl, 1 */
   1208     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24;
   1209     _cf = 0;
   1210     _flag_k = FK_NARROW(FK_TEST, 24);
   1211     MEM32(esi) = 0x3804EFC4u; /* 0x380171BE: mov dword ptr [esi], 0x3804efc4 */
   1212     if (TEST_Z(_flag_a, _flag_b)) goto L_380171CF; /* 0x380171C4: je 0x380171cf */
   1213 L_380171C6:
   1214     PUSH32(esp, esi); /* 0x380171C6: push esi */
   1215     RECOMP_ICALL(0x3804B4F6u); /* 0x380171C7: call 0x3804b4f6 */ /* not lifted */
   1216     RECOMP_FLAGS_IN();
   1217     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1218     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1219     esp = esp + 4; /* 0x380171CC: add esp, 4 */
   1220     _flag_k = FK_ADD;
   1221 L_380171CF:
   1222     eax = esi; /* 0x380171CF: mov eax, esi */
   1223     esi = POP32_VAL(esp); /* 0x380171D1: pop esi */
   1224     ebx = POP32_VAL(esp); /* 0x380171D2: pop ebx */
   1225     ebp = POP32_VAL(esp); /* 0x380171D3: pop ebp */
   1226     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x380171D4: ret 4 */
   1227     RECOMP_REGS_OUT();
   1228 }
   1229 
   1230 void sub_380171E0(void) {
   1231     int _fpu_cmp = 0;
   1232     uint32_t _cf = 0;
   1233     int _df = 1;
   1234     uint32_t _flag_k = FK_NONE;
   1235     uint32_t _flag_a = 0, _flag_b = 0;
   1236     uint32_t _itail_tgt = 0;
   1237     RECOMP_REGS_LOCALS
   1238     RECOMP_ENTER(0x380171E0u);
   1239 
   1240 L_380171E0:
   1241     RECOMP_ICALL(0x380171F0u); /* 0x380171E0: call 0x380171f0 */ /* not lifted */
   1242     RECOMP_FLAGS_IN();
   1243     goto L_38017200; /* 0x380171E5: jmp 0x38017200 */
   1244 L_38017200:
   1245     PUSH32(esp, 0x38017210u); /* 0x38017200: push 0x38017210 */
   1246     RECOMP_ICALL(0x3804B54Cu); /* 0x38017205: call 0x3804b54c */ /* not lifted */
   1247     RECOMP_FLAGS_IN();
   1248     ecx = POP32_VAL(esp); /* 0x3801720A: pop ecx */
   1249     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3801720B: ret  */
   1250     RECOMP_REGS_OUT();
   1251 }
   1252 
   1253 void sub_380171F0(void) {
   1254     int _fpu_cmp = 0;
   1255     uint32_t _cf = 0;
   1256     int _df = 1;
   1257     uint32_t _flag_k = FK_NONE;
   1258     uint32_t _flag_a = 0, _flag_b = 0;
   1259     uint32_t _itail_tgt = 0;
   1260     RECOMP_REGS_LOCALS
   1261     RECOMP_ENTER(0x380171F0u);
   1262 
   1263 L_380171F0:
   1264     ecx = 0x3806EB98u; /* 0x380171F0: mov ecx, 0x3806eb98 */
   1265     goto L_380172E0; /* 0x380171F5: jmp 0x380172e0 */
   1266 L_380172E0:
   1267     PUSH32(esp, ebp); /* 0x380172E0: push ebp */
   1268     ebp = esp; /* 0x380172E1: mov ebp, esp */
   1269     PUSH32(esp, ecx); /* 0x380172E3: push ecx */
   1270     SET_LO8(eax, MEM8(ebp + (-0x1))); /* 0x380172E4: mov al, byte ptr [ebp - 1] */
   1271     PUSH32(esp, ebx); /* 0x380172E7: push ebx */
   1272     PUSH32(esp, esi); /* 0x380172E8: push esi */
   1273     esi = ecx; /* 0x380172E9: mov esi, ecx */
   1274     SET_LO8(ecx, MEM8(ebp + (-0x1))); /* 0x380172EB: mov cl, byte ptr [ebp - 1] */
   1275     PUSH32(esp, edi); /* 0x380172EE: push edi */
   1276     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1277     ebx = 0; /* 0x380172EF: xor ebx, ebx */
   1278     _cf = 0;
   1279     _flag_k = FK_TEST;
   1280     PUSH32(esp, 0x1Cu); /* 0x380172F1: push 0x1c */
   1281     MEM8(esi) = (uint8_t)(LO8(eax)); /* 0x380172F3: mov byte ptr [esi], al */
   1282     MEM8(esi + 0x1) = (uint8_t)(LO8(ecx)); /* 0x380172F5: mov byte ptr [esi + 1], cl */
   1283     MEM8(esi + 0xC) = (uint8_t)(LO8(ebx)); /* 0x380172F8: mov byte ptr [esi + 0xc], bl */
   1284     RECOMP_ICALL(0x3804B676u); /* 0x380172FB: call 0x3804b676 */ /* not lifted */
   1285     RECOMP_FLAGS_IN();
   1286     MEM32(eax + 0x4) = ebx; /* 0x38017300: mov dword ptr [eax + 4], ebx */
   1287     MEM8(eax + 0x19) = (uint8_t)(LO8(ebx)); /* 0x38017303: mov byte ptr [eax + 0x19], bl */
   1288     SET_LO8(ecx, 1); /* 0x38017306: mov cl, 1 */
   1289     MEM8(eax + 0x18) = (uint8_t)(LO8(ecx)); /* 0x38017308: mov byte ptr [eax + 0x18], cl */
   1290     MEM32(esi + 0x8) = eax; /* 0x3801730B: mov dword ptr [esi + 8], eax */
   1291     MEM8(eax + 0x19) = (uint8_t)(LO8(ecx)); /* 0x3801730E: mov byte ptr [eax + 0x19], cl */
   1292     edx = MEM32(esi + 0x8); /* 0x38017311: mov edx, dword ptr [esi + 8] */
   1293     MEM32(edx) = ebx; /* 0x38017314: mov dword ptr [edx], ebx */
   1294     eax = MEM32(esi + 0x8); /* 0x38017316: mov eax, dword ptr [esi + 8] */
   1295     MEM32(eax + 0x8) = ebx; /* 0x38017319: mov dword ptr [eax + 8], ebx */
   1296     edi = MEM32(esi + 0x8); /* 0x3801731C: mov edi, dword ptr [esi + 8] */
   1297     PUSH32(esp, 0x1Cu); /* 0x3801731F: push 0x1c */
   1298     RECOMP_ICALL(0x3804B676u); /* 0x38017321: call 0x3804b676 */ /* not lifted */
   1299     RECOMP_FLAGS_IN();
   1300     MEM32(eax + 0x4) = edi; /* 0x38017326: mov dword ptr [eax + 4], edi */
   1301     MEM8(eax + 0x18) = (uint8_t)(LO8(ebx)); /* 0x38017329: mov byte ptr [eax + 0x18], bl */
   1302     MEM8(eax + 0x19) = (uint8_t)(LO8(ebx)); /* 0x3801732C: mov byte ptr [eax + 0x19], bl */
   1303     MEM32(esi + 0x4) = eax; /* 0x3801732F: mov dword ptr [esi + 4], eax */
   1304     MEM32(eax) = eax; /* 0x38017332: mov dword ptr [eax], eax */
   1305     eax = MEM32(esi + 0x4); /* 0x38017334: mov eax, dword ptr [esi + 4] */
   1306     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1307     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1308     esp = esp + 8; /* 0x38017337: add esp, 8 */
   1309     _flag_k = FK_ADD;
   1310     MEM32(eax + 0x8) = eax; /* 0x3801733A: mov dword ptr [eax + 8], eax */
   1311     edi = POP32_VAL(esp); /* 0x3801733D: pop edi */
   1312     MEM32(esi + 0x10) = ebx; /* 0x3801733E: mov dword ptr [esi + 0x10], ebx */
   1313     eax = esi; /* 0x38017341: mov eax, esi */
   1314     esi = POP32_VAL(esp); /* 0x38017343: pop esi */
   1315     ebx = POP32_VAL(esp); /* 0x38017344: pop ebx */
   1316     esp = ebp; /* 0x38017345: mov esp, ebp */
   1317     ebp = POP32_VAL(esp); /* 0x38017347: pop ebp */
   1318     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017348: ret  */
   1319     RECOMP_REGS_OUT();
   1320 }
   1321 
   1322 void sub_38017200(void) {
   1323     int _fpu_cmp = 0;
   1324     uint32_t _cf = 0;
   1325     int _df = 1;
   1326     uint32_t _flag_k = FK_NONE;
   1327     uint32_t _flag_a = 0, _flag_b = 0;
   1328     uint32_t _itail_tgt = 0;
   1329     RECOMP_REGS_LOCALS
   1330     RECOMP_ENTER(0x38017200u);
   1331 
   1332 L_38017200:
   1333     PUSH32(esp, 0x38017210u); /* 0x38017200: push 0x38017210 */
   1334     RECOMP_ICALL(0x3804B54Cu); /* 0x38017205: call 0x3804b54c */ /* not lifted */
   1335     RECOMP_FLAGS_IN();
   1336     ecx = POP32_VAL(esp); /* 0x3801720A: pop ecx */
   1337     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3801720B: ret  */
   1338     RECOMP_REGS_OUT();
   1339 }
   1340 
   1341 void sub_38017210(void) {
   1342     int _fpu_cmp = 0;
   1343     uint32_t _cf = 0;
   1344     int _df = 1;
   1345     uint32_t _flag_k = FK_NONE;
   1346     uint32_t _flag_a = 0, _flag_b = 0;
   1347     uint32_t _itail_tgt = 0;
   1348     RECOMP_REGS_LOCALS
   1349     RECOMP_ENTER(0x38017210u);
   1350 
   1351 L_38017210:
   1352     ecx = 0x3806EB98u; /* 0x38017210: mov ecx, 0x3806eb98 */
   1353     goto L_38017220; /* 0x38017215: jmp 0x38017220 */
   1354 L_38017220:
   1355     PUSH32(esp, ebp); /* 0x38017220: push ebp */
   1356     ebp = esp; /* 0x38017221: mov ebp, esp */
   1357     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1358     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1359     esp = esp - 8; /* 0x38017223: sub esp, 8 */
   1360     _flag_k = FK_CMP;
   1361     PUSH32(esp, ebx); /* 0x38017226: push ebx */
   1362     PUSH32(esp, esi); /* 0x38017227: push esi */
   1363     esi = ecx; /* 0x38017228: mov esi, ecx */
   1364     ecx = MEM32(esi + 0x10); /* 0x3801722A: mov ecx, dword ptr [esi + 0x10] */
   1365     /* test ecx, ecx */ /* 0x3801722D: test ecx, ecx */
   1366     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   1367     _cf = 0;
   1368     _flag_k = FK_TEST;
   1369     PUSH32(esp, edi); /* 0x3801722F: push edi */
   1370     edi = MEM32(esi + 0x4); /* 0x38017230: mov edi, dword ptr [esi + 4] */
   1371     eax = MEM32(edi); /* 0x38017233: mov eax, dword ptr [edi] */
   1372     MEM32(ebp + (-0x4)) = eax; /* 0x38017235: mov dword ptr [ebp - 4], eax */
   1373     if (TEST_Z(_flag_a, _flag_b)) goto L_38017295; /* 0x38017238: je 0x38017295 */
   1374 L_3801723A:
   1375     ecx = eax; /* 0x3801723A: mov ecx, eax */
   1376     /* cmp eax, ecx */ /* 0x3801723C: cmp eax, ecx */
   1377     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   1378     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1379     _flag_k = FK_CMP;
   1380     if (CMP_NE(_flag_a, _flag_b)) goto L_38017295; /* 0x3801723E: jne 0x38017295 */
   1381 L_38017240:
   1382     /* cmp edi, edi */ /* 0x38017240: cmp edi, edi */
   1383     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   1384     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1385     _flag_k = FK_CMP;
   1386     if (CMP_NE(_flag_a, _flag_b)) goto L_38017295; /* 0x38017242: jne 0x38017295 */
   1387 L_38017244:
   1388     ebx = MEM32(edi + 0x4); /* 0x38017244: mov ebx, dword ptr [edi + 4] */
   1389     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x38017247: cmp ebx, dword ptr [esi + 8] */
   1390     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   1391     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1392     _flag_k = FK_CMP;
   1393     edi = ebx; /* 0x3801724A: mov edi, ebx */
   1394     if (CMP_EQ(_flag_a, _flag_b)) goto L_3801726D; /* 0x3801724C: je 0x3801726d */
   1395 L_3801724E:
   1396     eax = MEM32(edi + 0x8); /* 0x3801724E: mov eax, dword ptr [edi + 8] */
   1397     PUSH32(esp, eax); /* 0x38017251: push eax */
   1398     ecx = esi; /* 0x38017252: mov ecx, esi */
   1399     RECOMP_ICALL(0x3801B0D0u); /* 0x38017254: call 0x3801b0d0 */ /* not lifted */
   1400     RECOMP_FLAGS_IN();
   1401     edi = MEM32(edi); /* 0x38017259: mov edi, dword ptr [edi] */
   1402     PUSH32(esp, ebx); /* 0x3801725B: push ebx */
   1403     RECOMP_ICALL(0x3804B4F6u); /* 0x3801725C: call 0x3804b4f6 */ /* not lifted */
   1404     RECOMP_FLAGS_IN();
   1405     eax = MEM32(esi + 0x8); /* 0x38017261: mov eax, dword ptr [esi + 8] */
   1406     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1407     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1408     esp = esp + 4; /* 0x38017264: add esp, 4 */
   1409     _flag_k = FK_ADD;
   1410     /* cmp edi, eax */ /* 0x38017267: cmp edi, eax */
   1411     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   1412     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1413     _flag_k = FK_CMP;
   1414     ebx = edi; /* 0x38017269: mov ebx, edi */
   1415     RECOMP_BACKEDGE();
   1416     if (CMP_NE(_flag_a, _flag_b)) goto L_3801724E; /* 0x3801726B: jne 0x3801724e */
   1417 L_3801726D:
   1418     ecx = MEM32(esi + 0x4); /* 0x3801726D: mov ecx, dword ptr [esi + 4] */
   1419     edx = MEM32(esi + 0x8); /* 0x38017270: mov edx, dword ptr [esi + 8] */
   1420     MEM32(ecx + 0x4) = edx; /* 0x38017273: mov dword ptr [ecx + 4], edx */
   1421     eax = MEM32(esi + 0x4); /* 0x38017276: mov eax, dword ptr [esi + 4] */
   1422     MEM32(esi + 0x10) = 0; /* 0x38017279: mov dword ptr [esi + 0x10], 0 */
   1423     MEM32(eax) = eax; /* 0x38017280: mov dword ptr [eax], eax */
   1424     eax = MEM32(esi + 0x4); /* 0x38017282: mov eax, dword ptr [esi + 4] */
   1425     MEM32(eax + 0x8) = eax; /* 0x38017285: mov dword ptr [eax + 8], eax */
   1426     eax = ebp + (-0x8); /* 0x38017288: lea eax, [ebp - 8] */
   1427     PUSH32(esp, eax); /* 0x3801728B: push eax */
   1428     ecx = esi; /* 0x3801728C: mov ecx, esi */
   1429     RECOMP_ICALL(0x380354C0u); /* 0x3801728E: call 0x380354c0 */ /* not lifted */
   1430     RECOMP_FLAGS_IN();
   1431     goto L_380172B6; /* 0x38017293: jmp 0x380172b6 */
   1432 L_38017295:
   1433     /* cmp eax, edi */ /* 0x38017295: cmp eax, edi */
   1434     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1435     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1436     _flag_k = FK_CMP;
   1437     if (CMP_EQ(_flag_a, _flag_b)) goto L_380172B6; /* 0x38017297: je 0x380172b6 */
   1438 L_38017299:
   1439     ecx = ebp + (-0x4); /* 0x38017299: lea ecx, [ebp - 4] */
   1440     ebx = eax; /* 0x3801729C: mov ebx, eax */
   1441     RECOMP_ICALL(0x380249B0u); /* 0x3801729E: call 0x380249b0 */ /* not lifted */
   1442     RECOMP_FLAGS_IN();
   1443     PUSH32(esp, ebx); /* 0x380172A3: push ebx */
   1444     ecx = ebp + (-0x8); /* 0x380172A4: lea ecx, [ebp - 8] */
   1445     PUSH32(esp, ecx); /* 0x380172A7: push ecx */
   1446     ecx = esi; /* 0x380172A8: mov ecx, esi */
   1447     RECOMP_ICALL(0x3801ACB0u); /* 0x380172AA: call 0x3801acb0 */ /* not lifted */
   1448     RECOMP_FLAGS_IN();
   1449     eax = MEM32(ebp + (-0x4)); /* 0x380172AF: mov eax, dword ptr [ebp - 4] */
   1450     /* cmp eax, edi */ /* 0x380172B2: cmp eax, edi */
   1451     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1452     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1453     _flag_k = FK_CMP;
   1454     RECOMP_BACKEDGE();
   1455     if (CMP_NE(_flag_a, _flag_b)) goto L_38017299; /* 0x380172B4: jne 0x38017299 */
   1456 L_380172B6:
   1457     edx = MEM32(esi + 0x4); /* 0x380172B6: mov edx, dword ptr [esi + 4] */
   1458     PUSH32(esp, edx); /* 0x380172B9: push edx */
   1459     RECOMP_ICALL(0x3804B4F6u); /* 0x380172BA: call 0x3804b4f6 */ /* not lifted */
   1460     RECOMP_FLAGS_IN();
   1461     eax = MEM32(esi + 0x8); /* 0x380172BF: mov eax, dword ptr [esi + 8] */
   1462     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1463     edi = 0; /* 0x380172C2: xor edi, edi */
   1464     _cf = 0;
   1465     _flag_k = FK_TEST;
   1466     PUSH32(esp, eax); /* 0x380172C4: push eax */
   1467     MEM32(esi + 0x4) = edi; /* 0x380172C5: mov dword ptr [esi + 4], edi */
   1468     MEM32(esi + 0x10) = edi; /* 0x380172C8: mov dword ptr [esi + 0x10], edi */
   1469     RECOMP_ICALL(0x3804B4F6u); /* 0x380172CB: call 0x3804b4f6 */ /* not lifted */
   1470     RECOMP_FLAGS_IN();
   1471     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1472     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1473     esp = esp + 8; /* 0x380172D0: add esp, 8 */
   1474     _flag_k = FK_ADD;
   1475     MEM32(esi + 0x8) = edi; /* 0x380172D3: mov dword ptr [esi + 8], edi */
   1476     edi = POP32_VAL(esp); /* 0x380172D6: pop edi */
   1477     esi = POP32_VAL(esp); /* 0x380172D7: pop esi */
   1478     ebx = POP32_VAL(esp); /* 0x380172D8: pop ebx */
   1479     esp = ebp; /* 0x380172D9: mov esp, ebp */
   1480     ebp = POP32_VAL(esp); /* 0x380172DB: pop ebp */
   1481     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380172DC: ret  */
   1482     RECOMP_REGS_OUT();
   1483 }
   1484 
   1485 void sub_38017220(void) {
   1486     int _fpu_cmp = 0;
   1487     uint32_t _cf = 0;
   1488     int _df = 1;
   1489     uint32_t _flag_k = FK_NONE;
   1490     uint32_t _flag_a = 0, _flag_b = 0;
   1491     uint32_t _itail_tgt = 0;
   1492     RECOMP_REGS_LOCALS
   1493     RECOMP_ENTER(0x38017220u);
   1494 
   1495 L_38017220:
   1496     PUSH32(esp, ebp); /* 0x38017220: push ebp */
   1497     ebp = esp; /* 0x38017221: mov ebp, esp */
   1498     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1499     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1500     esp = esp - 8; /* 0x38017223: sub esp, 8 */
   1501     _flag_k = FK_CMP;
   1502     PUSH32(esp, ebx); /* 0x38017226: push ebx */
   1503     PUSH32(esp, esi); /* 0x38017227: push esi */
   1504     esi = ecx; /* 0x38017228: mov esi, ecx */
   1505     ecx = MEM32(esi + 0x10); /* 0x3801722A: mov ecx, dword ptr [esi + 0x10] */
   1506     /* test ecx, ecx */ /* 0x3801722D: test ecx, ecx */
   1507     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   1508     _cf = 0;
   1509     _flag_k = FK_TEST;
   1510     PUSH32(esp, edi); /* 0x3801722F: push edi */
   1511     edi = MEM32(esi + 0x4); /* 0x38017230: mov edi, dword ptr [esi + 4] */
   1512     eax = MEM32(edi); /* 0x38017233: mov eax, dword ptr [edi] */
   1513     MEM32(ebp + (-0x4)) = eax; /* 0x38017235: mov dword ptr [ebp - 4], eax */
   1514     if (TEST_Z(_flag_a, _flag_b)) goto L_38017295; /* 0x38017238: je 0x38017295 */
   1515 L_3801723A:
   1516     ecx = eax; /* 0x3801723A: mov ecx, eax */
   1517     /* cmp eax, ecx */ /* 0x3801723C: cmp eax, ecx */
   1518     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   1519     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1520     _flag_k = FK_CMP;
   1521     if (CMP_NE(_flag_a, _flag_b)) goto L_38017295; /* 0x3801723E: jne 0x38017295 */
   1522 L_38017240:
   1523     /* cmp edi, edi */ /* 0x38017240: cmp edi, edi */
   1524     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   1525     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1526     _flag_k = FK_CMP;
   1527     if (CMP_NE(_flag_a, _flag_b)) goto L_38017295; /* 0x38017242: jne 0x38017295 */
   1528 L_38017244:
   1529     ebx = MEM32(edi + 0x4); /* 0x38017244: mov ebx, dword ptr [edi + 4] */
   1530     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x38017247: cmp ebx, dword ptr [esi + 8] */
   1531     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   1532     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1533     _flag_k = FK_CMP;
   1534     edi = ebx; /* 0x3801724A: mov edi, ebx */
   1535     if (CMP_EQ(_flag_a, _flag_b)) goto L_3801726D; /* 0x3801724C: je 0x3801726d */
   1536 L_3801724E:
   1537     eax = MEM32(edi + 0x8); /* 0x3801724E: mov eax, dword ptr [edi + 8] */
   1538     PUSH32(esp, eax); /* 0x38017251: push eax */
   1539     ecx = esi; /* 0x38017252: mov ecx, esi */
   1540     RECOMP_ICALL(0x3801B0D0u); /* 0x38017254: call 0x3801b0d0 */ /* not lifted */
   1541     RECOMP_FLAGS_IN();
   1542     edi = MEM32(edi); /* 0x38017259: mov edi, dword ptr [edi] */
   1543     PUSH32(esp, ebx); /* 0x3801725B: push ebx */
   1544     RECOMP_ICALL(0x3804B4F6u); /* 0x3801725C: call 0x3804b4f6 */ /* not lifted */
   1545     RECOMP_FLAGS_IN();
   1546     eax = MEM32(esi + 0x8); /* 0x38017261: mov eax, dword ptr [esi + 8] */
   1547     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1548     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1549     esp = esp + 4; /* 0x38017264: add esp, 4 */
   1550     _flag_k = FK_ADD;
   1551     /* cmp edi, eax */ /* 0x38017267: cmp edi, eax */
   1552     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   1553     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1554     _flag_k = FK_CMP;
   1555     ebx = edi; /* 0x38017269: mov ebx, edi */
   1556     RECOMP_BACKEDGE();
   1557     if (CMP_NE(_flag_a, _flag_b)) goto L_3801724E; /* 0x3801726B: jne 0x3801724e */
   1558 L_3801726D:
   1559     ecx = MEM32(esi + 0x4); /* 0x3801726D: mov ecx, dword ptr [esi + 4] */
   1560     edx = MEM32(esi + 0x8); /* 0x38017270: mov edx, dword ptr [esi + 8] */
   1561     MEM32(ecx + 0x4) = edx; /* 0x38017273: mov dword ptr [ecx + 4], edx */
   1562     eax = MEM32(esi + 0x4); /* 0x38017276: mov eax, dword ptr [esi + 4] */
   1563     MEM32(esi + 0x10) = 0; /* 0x38017279: mov dword ptr [esi + 0x10], 0 */
   1564     MEM32(eax) = eax; /* 0x38017280: mov dword ptr [eax], eax */
   1565     eax = MEM32(esi + 0x4); /* 0x38017282: mov eax, dword ptr [esi + 4] */
   1566     MEM32(eax + 0x8) = eax; /* 0x38017285: mov dword ptr [eax + 8], eax */
   1567     eax = ebp + (-0x8); /* 0x38017288: lea eax, [ebp - 8] */
   1568     PUSH32(esp, eax); /* 0x3801728B: push eax */
   1569     ecx = esi; /* 0x3801728C: mov ecx, esi */
   1570     RECOMP_ICALL(0x380354C0u); /* 0x3801728E: call 0x380354c0 */ /* not lifted */
   1571     RECOMP_FLAGS_IN();
   1572     goto L_380172B6; /* 0x38017293: jmp 0x380172b6 */
   1573 L_38017295:
   1574     /* cmp eax, edi */ /* 0x38017295: cmp eax, edi */
   1575     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1576     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1577     _flag_k = FK_CMP;
   1578     if (CMP_EQ(_flag_a, _flag_b)) goto L_380172B6; /* 0x38017297: je 0x380172b6 */
   1579 L_38017299:
   1580     ecx = ebp + (-0x4); /* 0x38017299: lea ecx, [ebp - 4] */
   1581     ebx = eax; /* 0x3801729C: mov ebx, eax */
   1582     RECOMP_ICALL(0x380249B0u); /* 0x3801729E: call 0x380249b0 */ /* not lifted */
   1583     RECOMP_FLAGS_IN();
   1584     PUSH32(esp, ebx); /* 0x380172A3: push ebx */
   1585     ecx = ebp + (-0x8); /* 0x380172A4: lea ecx, [ebp - 8] */
   1586     PUSH32(esp, ecx); /* 0x380172A7: push ecx */
   1587     ecx = esi; /* 0x380172A8: mov ecx, esi */
   1588     RECOMP_ICALL(0x3801ACB0u); /* 0x380172AA: call 0x3801acb0 */ /* not lifted */
   1589     RECOMP_FLAGS_IN();
   1590     eax = MEM32(ebp + (-0x4)); /* 0x380172AF: mov eax, dword ptr [ebp - 4] */
   1591     /* cmp eax, edi */ /* 0x380172B2: cmp eax, edi */
   1592     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1593     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1594     _flag_k = FK_CMP;
   1595     RECOMP_BACKEDGE();
   1596     if (CMP_NE(_flag_a, _flag_b)) goto L_38017299; /* 0x380172B4: jne 0x38017299 */
   1597 L_380172B6:
   1598     edx = MEM32(esi + 0x4); /* 0x380172B6: mov edx, dword ptr [esi + 4] */
   1599     PUSH32(esp, edx); /* 0x380172B9: push edx */
   1600     RECOMP_ICALL(0x3804B4F6u); /* 0x380172BA: call 0x3804b4f6 */ /* not lifted */
   1601     RECOMP_FLAGS_IN();
   1602     eax = MEM32(esi + 0x8); /* 0x380172BF: mov eax, dword ptr [esi + 8] */
   1603     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1604     edi = 0; /* 0x380172C2: xor edi, edi */
   1605     _cf = 0;
   1606     _flag_k = FK_TEST;
   1607     PUSH32(esp, eax); /* 0x380172C4: push eax */
   1608     MEM32(esi + 0x4) = edi; /* 0x380172C5: mov dword ptr [esi + 4], edi */
   1609     MEM32(esi + 0x10) = edi; /* 0x380172C8: mov dword ptr [esi + 0x10], edi */
   1610     RECOMP_ICALL(0x3804B4F6u); /* 0x380172CB: call 0x3804b4f6 */ /* not lifted */
   1611     RECOMP_FLAGS_IN();
   1612     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1613     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1614     esp = esp + 8; /* 0x380172D0: add esp, 8 */
   1615     _flag_k = FK_ADD;
   1616     MEM32(esi + 0x8) = edi; /* 0x380172D3: mov dword ptr [esi + 8], edi */
   1617     edi = POP32_VAL(esp); /* 0x380172D6: pop edi */
   1618     esi = POP32_VAL(esp); /* 0x380172D7: pop esi */
   1619     ebx = POP32_VAL(esp); /* 0x380172D8: pop ebx */
   1620     esp = ebp; /* 0x380172D9: mov esp, ebp */
   1621     ebp = POP32_VAL(esp); /* 0x380172DB: pop ebp */
   1622     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380172DC: ret  */
   1623     RECOMP_REGS_OUT();
   1624 }
   1625 
   1626 void sub_380172B6(void) {
   1627     int _fpu_cmp = 0;
   1628     uint32_t _cf = 0;
   1629     int _df = 1;
   1630     uint32_t _flag_k = FK_NONE;
   1631     uint32_t _flag_a = 0, _flag_b = 0;
   1632     uint32_t _itail_tgt = 0;
   1633     RECOMP_REGS_LOCALS
   1634     RECOMP_ENTER(0x380172B6u);
   1635 
   1636 L_380172B6:
   1637     edx = MEM32(esi + 0x4); /* 0x380172B6: mov edx, dword ptr [esi + 4] */
   1638     PUSH32(esp, edx); /* 0x380172B9: push edx */
   1639     RECOMP_ICALL(0x3804B4F6u); /* 0x380172BA: call 0x3804b4f6 */ /* not lifted */
   1640     RECOMP_FLAGS_IN();
   1641     eax = MEM32(esi + 0x8); /* 0x380172BF: mov eax, dword ptr [esi + 8] */
   1642     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1643     edi = 0; /* 0x380172C2: xor edi, edi */
   1644     _cf = 0;
   1645     _flag_k = FK_TEST;
   1646     PUSH32(esp, eax); /* 0x380172C4: push eax */
   1647     MEM32(esi + 0x4) = edi; /* 0x380172C5: mov dword ptr [esi + 4], edi */
   1648     MEM32(esi + 0x10) = edi; /* 0x380172C8: mov dword ptr [esi + 0x10], edi */
   1649     RECOMP_ICALL(0x3804B4F6u); /* 0x380172CB: call 0x3804b4f6 */ /* not lifted */
   1650     RECOMP_FLAGS_IN();
   1651     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1652     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1653     esp = esp + 8; /* 0x380172D0: add esp, 8 */
   1654     _flag_k = FK_ADD;
   1655     MEM32(esi + 0x8) = edi; /* 0x380172D3: mov dword ptr [esi + 8], edi */
   1656     edi = POP32_VAL(esp); /* 0x380172D6: pop edi */
   1657     esi = POP32_VAL(esp); /* 0x380172D7: pop esi */
   1658     ebx = POP32_VAL(esp); /* 0x380172D8: pop ebx */
   1659     esp = ebp; /* 0x380172D9: mov esp, ebp */
   1660     ebp = POP32_VAL(esp); /* 0x380172DB: pop ebp */
   1661     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380172DC: ret  */
   1662     RECOMP_REGS_OUT();
   1663 }
   1664 
   1665 void sub_380172E0(void) {
   1666     int _fpu_cmp = 0;
   1667     uint32_t _cf = 0;
   1668     int _df = 1;
   1669     uint32_t _flag_k = FK_NONE;
   1670     uint32_t _flag_a = 0, _flag_b = 0;
   1671     uint32_t _itail_tgt = 0;
   1672     RECOMP_REGS_LOCALS
   1673     RECOMP_ENTER(0x380172E0u);
   1674 
   1675 L_380172E0:
   1676     PUSH32(esp, ebp); /* 0x380172E0: push ebp */
   1677     ebp = esp; /* 0x380172E1: mov ebp, esp */
   1678     PUSH32(esp, ecx); /* 0x380172E3: push ecx */
   1679     SET_LO8(eax, MEM8(ebp + (-0x1))); /* 0x380172E4: mov al, byte ptr [ebp - 1] */
   1680     PUSH32(esp, ebx); /* 0x380172E7: push ebx */
   1681     PUSH32(esp, esi); /* 0x380172E8: push esi */
   1682     esi = ecx; /* 0x380172E9: mov esi, ecx */
   1683     SET_LO8(ecx, MEM8(ebp + (-0x1))); /* 0x380172EB: mov cl, byte ptr [ebp - 1] */
   1684     PUSH32(esp, edi); /* 0x380172EE: push edi */
   1685     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1686     ebx = 0; /* 0x380172EF: xor ebx, ebx */
   1687     _cf = 0;
   1688     _flag_k = FK_TEST;
   1689     PUSH32(esp, 0x1Cu); /* 0x380172F1: push 0x1c */
   1690     MEM8(esi) = (uint8_t)(LO8(eax)); /* 0x380172F3: mov byte ptr [esi], al */
   1691     MEM8(esi + 0x1) = (uint8_t)(LO8(ecx)); /* 0x380172F5: mov byte ptr [esi + 1], cl */
   1692     MEM8(esi + 0xC) = (uint8_t)(LO8(ebx)); /* 0x380172F8: mov byte ptr [esi + 0xc], bl */
   1693     RECOMP_ICALL(0x3804B676u); /* 0x380172FB: call 0x3804b676 */ /* not lifted */
   1694     RECOMP_FLAGS_IN();
   1695     MEM32(eax + 0x4) = ebx; /* 0x38017300: mov dword ptr [eax + 4], ebx */
   1696     MEM8(eax + 0x19) = (uint8_t)(LO8(ebx)); /* 0x38017303: mov byte ptr [eax + 0x19], bl */
   1697     SET_LO8(ecx, 1); /* 0x38017306: mov cl, 1 */
   1698     MEM8(eax + 0x18) = (uint8_t)(LO8(ecx)); /* 0x38017308: mov byte ptr [eax + 0x18], cl */
   1699     MEM32(esi + 0x8) = eax; /* 0x3801730B: mov dword ptr [esi + 8], eax */
   1700     MEM8(eax + 0x19) = (uint8_t)(LO8(ecx)); /* 0x3801730E: mov byte ptr [eax + 0x19], cl */
   1701     edx = MEM32(esi + 0x8); /* 0x38017311: mov edx, dword ptr [esi + 8] */
   1702     MEM32(edx) = ebx; /* 0x38017314: mov dword ptr [edx], ebx */
   1703     eax = MEM32(esi + 0x8); /* 0x38017316: mov eax, dword ptr [esi + 8] */
   1704     MEM32(eax + 0x8) = ebx; /* 0x38017319: mov dword ptr [eax + 8], ebx */
   1705     edi = MEM32(esi + 0x8); /* 0x3801731C: mov edi, dword ptr [esi + 8] */
   1706     PUSH32(esp, 0x1Cu); /* 0x3801731F: push 0x1c */
   1707     RECOMP_ICALL(0x3804B676u); /* 0x38017321: call 0x3804b676 */ /* not lifted */
   1708     RECOMP_FLAGS_IN();
   1709     MEM32(eax + 0x4) = edi; /* 0x38017326: mov dword ptr [eax + 4], edi */
   1710     MEM8(eax + 0x18) = (uint8_t)(LO8(ebx)); /* 0x38017329: mov byte ptr [eax + 0x18], bl */
   1711     MEM8(eax + 0x19) = (uint8_t)(LO8(ebx)); /* 0x3801732C: mov byte ptr [eax + 0x19], bl */
   1712     MEM32(esi + 0x4) = eax; /* 0x3801732F: mov dword ptr [esi + 4], eax */
   1713     MEM32(eax) = eax; /* 0x38017332: mov dword ptr [eax], eax */
   1714     eax = MEM32(esi + 0x4); /* 0x38017334: mov eax, dword ptr [esi + 4] */
   1715     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1716     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1717     esp = esp + 8; /* 0x38017337: add esp, 8 */
   1718     _flag_k = FK_ADD;
   1719     MEM32(eax + 0x8) = eax; /* 0x3801733A: mov dword ptr [eax + 8], eax */
   1720     edi = POP32_VAL(esp); /* 0x3801733D: pop edi */
   1721     MEM32(esi + 0x10) = ebx; /* 0x3801733E: mov dword ptr [esi + 0x10], ebx */
   1722     eax = esi; /* 0x38017341: mov eax, esi */
   1723     esi = POP32_VAL(esp); /* 0x38017343: pop esi */
   1724     ebx = POP32_VAL(esp); /* 0x38017344: pop ebx */
   1725     esp = ebp; /* 0x38017345: mov esp, ebp */
   1726     ebp = POP32_VAL(esp); /* 0x38017347: pop ebp */
   1727     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017348: ret  */
   1728     RECOMP_REGS_OUT();
   1729 }
   1730 
   1731 void sub_38017350(void) {
   1732     int _fpu_cmp = 0;
   1733     uint32_t _cf = 0;
   1734     int _df = 1;
   1735     uint32_t _flag_k = FK_NONE;
   1736     uint32_t _flag_a = 0, _flag_b = 0;
   1737     uint32_t _itail_tgt = 0;
   1738     RECOMP_REGS_LOCALS
   1739     RECOMP_ENTER(0x38017350u);
   1740 
   1741 L_38017350:
   1742     goto L_38017360; /* 0x38017350: jmp 0x38017360 */
   1743 L_38017360:
   1744     PUSH32(esp, ebp); /* 0x38017360: push ebp */
   1745     ebp = esp; /* 0x38017361: mov ebp, esp */
   1746     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   1747     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1748     esp = esp - 0x14u; /* 0x38017363: sub esp, 0x14 */
   1749     _flag_k = FK_CMP;
   1750     fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x38017366: fld qword ptr [0x3804ebd0] */
   1751     PUSH32(esp, 0xBFCFFFFFu); /* 0x3801736C: push 0xbfcfffff */
   1752     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x38017371: fsin  */
   1753     PUSH32(esp, 0xFFFFFFFFu); /* 0x38017373: push -1 */
   1754     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x38017375: fld dword ptr [0x3804e8e4] */
   1755     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3801737B: fst dword ptr [ebp - 4] */
   1756     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3801737E: fstp dword ptr [ebp - 0x14] */
   1757     eax = MEM32(ebp + (-0x4)); /* 0x38017381: mov eax, dword ptr [ebp - 4] */
   1758     ecx = MEM32(ebp + (-0x14)); /* 0x38017384: mov ecx, dword ptr [ebp - 0x14] */
   1759     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x38017387: fstp dword ptr [ebp - 0x10] */
   1760     edx = MEM32(ebp + (-0x10)); /* 0x3801738A: mov edx, dword ptr [ebp - 0x10] */
   1761     fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x3801738D: fld qword ptr [0x3804ebd0] */
   1762     MEM32(0x3806EB58) = ecx; /* 0x38017393: mov dword ptr [0x3806eb58], ecx */
   1763     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x38017399: fcos  */
   1764     MEM32(ebp + (-0xC)) = eax; /* 0x3801739B: mov dword ptr [ebp - 0xc], eax */
   1765     MEM32(0x3806EB5C) = edx; /* 0x3801739E: mov dword ptr [0x3806eb5c], edx */
   1766     MEM32(0x3806EB60) = eax; /* 0x380173A4: mov dword ptr [0x3806eb60], eax */
   1767     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380173A9: fstp dword ptr [ebp - 8] */
   1768     fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x380173AC: fld qword ptr [0x3804ebd8] */
   1769     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x380173B2: fsin  */
   1770     ecx = MEM32(ebp + (-0x8)); /* 0x380173B4: mov ecx, dword ptr [ebp - 8] */
   1771     MEM32(0x3806EB64) = ecx; /* 0x380173B7: mov dword ptr [0x3806eb64], ecx */
   1772     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x380173BD: fld dword ptr [0x3804e8e4] */
   1773     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x380173C3: fst dword ptr [ebp - 4] */
   1774     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x380173C6: fstp dword ptr [ebp - 0x14] */
   1775     edx = MEM32(ebp + (-0x4)); /* 0x380173C9: mov edx, dword ptr [ebp - 4] */
   1776     eax = MEM32(ebp + (-0x14)); /* 0x380173CC: mov eax, dword ptr [ebp - 0x14] */
   1777     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x380173CF: fstp dword ptr [ebp - 0x10] */
   1778     ecx = MEM32(ebp + (-0x10)); /* 0x380173D2: mov ecx, dword ptr [ebp - 0x10] */
   1779     fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x380173D5: fld qword ptr [0x3804ebd8] */
   1780     MEM32(ebp + (-0xC)) = edx; /* 0x380173DB: mov dword ptr [ebp - 0xc], edx */
   1781     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x380173DE: fcos  */
   1782     MEM32(0x3806EB68) = eax; /* 0x380173E0: mov dword ptr [0x3806eb68], eax */
   1783     MEM32(0x3806EB70) = edx; /* 0x380173E5: mov dword ptr [0x3806eb70], edx */
   1784     MEM32(0x3806EB6C) = ecx; /* 0x380173EB: mov dword ptr [0x3806eb6c], ecx */
   1785     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380173F1: fstp dword ptr [ebp - 8] */
   1786     fp_push(*(double*)ADDR(0x3804E928)); /* 0x380173F4: fld qword ptr [0x3804e928] */
   1787     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x380173FA: fsin  */
   1788     eax = MEM32(ebp + (-0x8)); /* 0x380173FC: mov eax, dword ptr [ebp - 8] */
   1789     MEM32(0x3806EB74) = eax; /* 0x380173FF: mov dword ptr [0x3806eb74], eax */
   1790     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x38017404: fld dword ptr [0x3804e8e4] */
   1791     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3801740A: fst dword ptr [ebp - 4] */
   1792     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3801740D: fstp dword ptr [ebp - 0x14] */
   1793     edx = MEM32(ebp + (-0x14)); /* 0x38017410: mov edx, dword ptr [ebp - 0x14] */
   1794     ecx = MEM32(ebp + (-0x4)); /* 0x38017413: mov ecx, dword ptr [ebp - 4] */
   1795     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x38017416: fstp dword ptr [ebp - 0x10] */
   1796     eax = MEM32(ebp + (-0x10)); /* 0x38017419: mov eax, dword ptr [ebp - 0x10] */
   1797     fp_push(*(double*)ADDR(0x3804E928)); /* 0x3801741C: fld qword ptr [0x3804e928] */
   1798     MEM32(0x3806EB78) = edx; /* 0x38017422: mov dword ptr [0x3806eb78], edx */
   1799     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x38017428: fcos  */
   1800     MEM32(ebp + (-0xC)) = ecx; /* 0x3801742A: mov dword ptr [ebp - 0xc], ecx */
   1801     MEM32(0x3806EB7C) = eax; /* 0x3801742D: mov dword ptr [0x3806eb7c], eax */
   1802     MEM32(0x3806EB80) = ecx; /* 0x38017432: mov dword ptr [0x3806eb80], ecx */
   1803     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38017438: fstp dword ptr [ebp - 8] */
   1804     edx = MEM32(ebp + (-0x8)); /* 0x3801743B: mov edx, dword ptr [ebp - 8] */
   1805     MEM32(0x3806EB84) = edx; /* 0x3801743E: mov dword ptr [0x3806eb84], edx */
   1806     RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x38017444: call dword ptr [0x3804e0ac] */
   1807     RECOMP_FLAGS_IN();
   1808     _st[0] = (double)*(float*)ADDR(0x3804EFCC) - _st[0]; /* 0x3801744A: fsubr dword ptr [0x3804efcc] */
   1809     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1810     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1811     esp = esp + 8; /* 0x38017450: add esp, 8 */
   1812     _flag_k = FK_ADD;
   1813     _st[0] *= (double)*(float*)ADDR(0x3804E8F0); /* 0x38017453: fmul dword ptr [0x3804e8f0] */
   1814     fp_push(_st[0]); /* 0x38017459: fld st(0) */
   1815     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3801745B: fsin  */
   1816     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3801745D: fld dword ptr [0x3804e8e4] */
   1817     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x38017463: fst dword ptr [ebp - 4] */
   1818     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x38017466: fstp dword ptr [ebp - 0x14] */
   1819     ecx = MEM32(ebp + (-0x14)); /* 0x38017469: mov ecx, dword ptr [ebp - 0x14] */
   1820     eax = MEM32(ebp + (-0x4)); /* 0x3801746C: mov eax, dword ptr [ebp - 4] */
   1821     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3801746F: fstp dword ptr [ebp - 0x10] */
   1822     edx = MEM32(ebp + (-0x10)); /* 0x38017472: mov edx, dword ptr [ebp - 0x10] */
   1823     MEM32(0x3806EB88) = ecx; /* 0x38017475: mov dword ptr [0x3806eb88], ecx */
   1824     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3801747B: fcos  */
   1825     MEM32(ebp + (-0xC)) = eax; /* 0x3801747D: mov dword ptr [ebp - 0xc], eax */
   1826     MEM32(0x3806EB8C) = edx; /* 0x38017480: mov dword ptr [0x3806eb8c], edx */
   1827     MEM32(0x3806EB90) = eax; /* 0x38017486: mov dword ptr [0x3806eb90], eax */
   1828     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3801748B: fstp dword ptr [ebp - 8] */
   1829     ecx = MEM32(ebp + (-0x8)); /* 0x3801748E: mov ecx, dword ptr [ebp - 8] */
   1830     MEM32(0x3806EB94) = ecx; /* 0x38017491: mov dword ptr [0x3806eb94], ecx */
   1831     esp = ebp; /* 0x38017497: mov esp, ebp */
   1832     ebp = POP32_VAL(esp); /* 0x38017499: pop ebp */
   1833     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3801749A: ret  */
   1834     RECOMP_REGS_OUT();
   1835 }
   1836 
   1837 void sub_38017360(void) {
   1838     int _fpu_cmp = 0;
   1839     uint32_t _cf = 0;
   1840     int _df = 1;
   1841     uint32_t _flag_k = FK_NONE;
   1842     uint32_t _flag_a = 0, _flag_b = 0;
   1843     uint32_t _itail_tgt = 0;
   1844     RECOMP_REGS_LOCALS
   1845     RECOMP_ENTER(0x38017360u);
   1846 
   1847 L_38017360:
   1848     PUSH32(esp, ebp); /* 0x38017360: push ebp */
   1849     ebp = esp; /* 0x38017361: mov ebp, esp */
   1850     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   1851     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1852     esp = esp - 0x14u; /* 0x38017363: sub esp, 0x14 */
   1853     _flag_k = FK_CMP;
   1854     fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x38017366: fld qword ptr [0x3804ebd0] */
   1855     PUSH32(esp, 0xBFCFFFFFu); /* 0x3801736C: push 0xbfcfffff */
   1856     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x38017371: fsin  */
   1857     PUSH32(esp, 0xFFFFFFFFu); /* 0x38017373: push -1 */
   1858     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x38017375: fld dword ptr [0x3804e8e4] */
   1859     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3801737B: fst dword ptr [ebp - 4] */
   1860     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3801737E: fstp dword ptr [ebp - 0x14] */
   1861     eax = MEM32(ebp + (-0x4)); /* 0x38017381: mov eax, dword ptr [ebp - 4] */
   1862     ecx = MEM32(ebp + (-0x14)); /* 0x38017384: mov ecx, dword ptr [ebp - 0x14] */
   1863     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x38017387: fstp dword ptr [ebp - 0x10] */
   1864     edx = MEM32(ebp + (-0x10)); /* 0x3801738A: mov edx, dword ptr [ebp - 0x10] */
   1865     fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x3801738D: fld qword ptr [0x3804ebd0] */
   1866     MEM32(0x3806EB58) = ecx; /* 0x38017393: mov dword ptr [0x3806eb58], ecx */
   1867     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x38017399: fcos  */
   1868     MEM32(ebp + (-0xC)) = eax; /* 0x3801739B: mov dword ptr [ebp - 0xc], eax */
   1869     MEM32(0x3806EB5C) = edx; /* 0x3801739E: mov dword ptr [0x3806eb5c], edx */
   1870     MEM32(0x3806EB60) = eax; /* 0x380173A4: mov dword ptr [0x3806eb60], eax */
   1871     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380173A9: fstp dword ptr [ebp - 8] */
   1872     fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x380173AC: fld qword ptr [0x3804ebd8] */
   1873     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x380173B2: fsin  */
   1874     ecx = MEM32(ebp + (-0x8)); /* 0x380173B4: mov ecx, dword ptr [ebp - 8] */
   1875     MEM32(0x3806EB64) = ecx; /* 0x380173B7: mov dword ptr [0x3806eb64], ecx */
   1876     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x380173BD: fld dword ptr [0x3804e8e4] */
   1877     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x380173C3: fst dword ptr [ebp - 4] */
   1878     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x380173C6: fstp dword ptr [ebp - 0x14] */
   1879     edx = MEM32(ebp + (-0x4)); /* 0x380173C9: mov edx, dword ptr [ebp - 4] */
   1880     eax = MEM32(ebp + (-0x14)); /* 0x380173CC: mov eax, dword ptr [ebp - 0x14] */
   1881     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x380173CF: fstp dword ptr [ebp - 0x10] */
   1882     ecx = MEM32(ebp + (-0x10)); /* 0x380173D2: mov ecx, dword ptr [ebp - 0x10] */
   1883     fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x380173D5: fld qword ptr [0x3804ebd8] */
   1884     MEM32(ebp + (-0xC)) = edx; /* 0x380173DB: mov dword ptr [ebp - 0xc], edx */
   1885     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x380173DE: fcos  */
   1886     MEM32(0x3806EB68) = eax; /* 0x380173E0: mov dword ptr [0x3806eb68], eax */
   1887     MEM32(0x3806EB70) = edx; /* 0x380173E5: mov dword ptr [0x3806eb70], edx */
   1888     MEM32(0x3806EB6C) = ecx; /* 0x380173EB: mov dword ptr [0x3806eb6c], ecx */
   1889     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380173F1: fstp dword ptr [ebp - 8] */
   1890     fp_push(*(double*)ADDR(0x3804E928)); /* 0x380173F4: fld qword ptr [0x3804e928] */
   1891     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x380173FA: fsin  */
   1892     eax = MEM32(ebp + (-0x8)); /* 0x380173FC: mov eax, dword ptr [ebp - 8] */
   1893     MEM32(0x3806EB74) = eax; /* 0x380173FF: mov dword ptr [0x3806eb74], eax */
   1894     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x38017404: fld dword ptr [0x3804e8e4] */
   1895     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3801740A: fst dword ptr [ebp - 4] */
   1896     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3801740D: fstp dword ptr [ebp - 0x14] */
   1897     edx = MEM32(ebp + (-0x14)); /* 0x38017410: mov edx, dword ptr [ebp - 0x14] */
   1898     ecx = MEM32(ebp + (-0x4)); /* 0x38017413: mov ecx, dword ptr [ebp - 4] */
   1899     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x38017416: fstp dword ptr [ebp - 0x10] */
   1900     eax = MEM32(ebp + (-0x10)); /* 0x38017419: mov eax, dword ptr [ebp - 0x10] */
   1901     fp_push(*(double*)ADDR(0x3804E928)); /* 0x3801741C: fld qword ptr [0x3804e928] */
   1902     MEM32(0x3806EB78) = edx; /* 0x38017422: mov dword ptr [0x3806eb78], edx */
   1903     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x38017428: fcos  */
   1904     MEM32(ebp + (-0xC)) = ecx; /* 0x3801742A: mov dword ptr [ebp - 0xc], ecx */
   1905     MEM32(0x3806EB7C) = eax; /* 0x3801742D: mov dword ptr [0x3806eb7c], eax */
   1906     MEM32(0x3806EB80) = ecx; /* 0x38017432: mov dword ptr [0x3806eb80], ecx */
   1907     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38017438: fstp dword ptr [ebp - 8] */
   1908     edx = MEM32(ebp + (-0x8)); /* 0x3801743B: mov edx, dword ptr [ebp - 8] */
   1909     MEM32(0x3806EB84) = edx; /* 0x3801743E: mov dword ptr [0x3806eb84], edx */
   1910     RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x38017444: call dword ptr [0x3804e0ac] */
   1911     RECOMP_FLAGS_IN();
   1912     _st[0] = (double)*(float*)ADDR(0x3804EFCC) - _st[0]; /* 0x3801744A: fsubr dword ptr [0x3804efcc] */
   1913     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1914     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1915     esp = esp + 8; /* 0x38017450: add esp, 8 */
   1916     _flag_k = FK_ADD;
   1917     _st[0] *= (double)*(float*)ADDR(0x3804E8F0); /* 0x38017453: fmul dword ptr [0x3804e8f0] */
   1918     fp_push(_st[0]); /* 0x38017459: fld st(0) */
   1919     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3801745B: fsin  */
   1920     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3801745D: fld dword ptr [0x3804e8e4] */
   1921     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x38017463: fst dword ptr [ebp - 4] */
   1922     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x38017466: fstp dword ptr [ebp - 0x14] */
   1923     ecx = MEM32(ebp + (-0x14)); /* 0x38017469: mov ecx, dword ptr [ebp - 0x14] */
   1924     eax = MEM32(ebp + (-0x4)); /* 0x3801746C: mov eax, dword ptr [ebp - 4] */
   1925     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3801746F: fstp dword ptr [ebp - 0x10] */
   1926     edx = MEM32(ebp + (-0x10)); /* 0x38017472: mov edx, dword ptr [ebp - 0x10] */
   1927     MEM32(0x3806EB88) = ecx; /* 0x38017475: mov dword ptr [0x3806eb88], ecx */
   1928     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3801747B: fcos  */
   1929     MEM32(ebp + (-0xC)) = eax; /* 0x3801747D: mov dword ptr [ebp - 0xc], eax */
   1930     MEM32(0x3806EB8C) = edx; /* 0x38017480: mov dword ptr [0x3806eb8c], edx */
   1931     MEM32(0x3806EB90) = eax; /* 0x38017486: mov dword ptr [0x3806eb90], eax */
   1932     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3801748B: fstp dword ptr [ebp - 8] */
   1933     ecx = MEM32(ebp + (-0x8)); /* 0x3801748E: mov ecx, dword ptr [ebp - 8] */
   1934     MEM32(0x3806EB94) = ecx; /* 0x38017491: mov dword ptr [0x3806eb94], ecx */
   1935     esp = ebp; /* 0x38017497: mov esp, ebp */
   1936     ebp = POP32_VAL(esp); /* 0x38017499: pop ebp */
   1937     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3801749A: ret  */
   1938     RECOMP_REGS_OUT();
   1939 }
   1940 
   1941 void sub_380174A0(void) {
   1942     int _fpu_cmp = 0;
   1943     uint32_t _cf = 0;
   1944     int _df = 1;
   1945     uint32_t _flag_k = FK_NONE;
   1946     uint32_t _flag_a = 0, _flag_b = 0;
   1947     uint32_t _itail_tgt = 0;
   1948     RECOMP_REGS_LOCALS
   1949     RECOMP_ENTER(0x380174A0u);
   1950 
   1951 L_380174A0:
   1952     goto L_380174B0; /* 0x380174A0: jmp 0x380174b0 */
   1953 L_380174B0:
   1954     PUSH32(esp, ebp); /* 0x380174B0: push ebp */
   1955     ebp = esp; /* 0x380174B1: mov ebp, esp */
   1956     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   1957     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1958     esp = esp - 0x14u; /* 0x380174B3: sub esp, 0x14 */
   1959     _flag_k = FK_CMP;
   1960     fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x380174B6: fld qword ptr [0x3804ebd0] */
   1961     PUSH32(esp, 0xBFCFFFFFu); /* 0x380174BC: push 0xbfcfffff */
   1962     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x380174C1: fsin  */
   1963     PUSH32(esp, 0xFFFFFFFFu); /* 0x380174C3: push -1 */
   1964     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x380174C5: fld dword ptr [0x3804e8e4] */
   1965     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x380174CB: fst dword ptr [ebp - 4] */
   1966     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x380174CE: fstp dword ptr [ebp - 0x14] */
   1967     eax = MEM32(ebp + (-0x4)); /* 0x380174D1: mov eax, dword ptr [ebp - 4] */
   1968     ecx = MEM32(ebp + (-0x14)); /* 0x380174D4: mov ecx, dword ptr [ebp - 0x14] */
   1969     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x380174D7: fstp dword ptr [ebp - 0x10] */
   1970     edx = MEM32(ebp + (-0x10)); /* 0x380174DA: mov edx, dword ptr [ebp - 0x10] */
   1971     fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x380174DD: fld qword ptr [0x3804ebd0] */
   1972     MEM32(0x3806EB18) = ecx; /* 0x380174E3: mov dword ptr [0x3806eb18], ecx */
   1973     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x380174E9: fcos  */
   1974     MEM32(ebp + (-0xC)) = eax; /* 0x380174EB: mov dword ptr [ebp - 0xc], eax */
   1975     MEM32(0x3806EB1C) = edx; /* 0x380174EE: mov dword ptr [0x3806eb1c], edx */
   1976     MEM32(0x3806EB20) = eax; /* 0x380174F4: mov dword ptr [0x3806eb20], eax */
   1977     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380174F9: fstp dword ptr [ebp - 8] */
   1978     fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x380174FC: fld qword ptr [0x3804ebd8] */
   1979     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x38017502: fsin  */
   1980     ecx = MEM32(ebp + (-0x8)); /* 0x38017504: mov ecx, dword ptr [ebp - 8] */
   1981     MEM32(0x3806EB24) = ecx; /* 0x38017507: mov dword ptr [0x3806eb24], ecx */
   1982     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3801750D: fld dword ptr [0x3804e8e4] */
   1983     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x38017513: fst dword ptr [ebp - 4] */
   1984     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x38017516: fstp dword ptr [ebp - 0x14] */
   1985     edx = MEM32(ebp + (-0x4)); /* 0x38017519: mov edx, dword ptr [ebp - 4] */
   1986     eax = MEM32(ebp + (-0x14)); /* 0x3801751C: mov eax, dword ptr [ebp - 0x14] */
   1987     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3801751F: fstp dword ptr [ebp - 0x10] */
   1988     ecx = MEM32(ebp + (-0x10)); /* 0x38017522: mov ecx, dword ptr [ebp - 0x10] */
   1989     fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x38017525: fld qword ptr [0x3804ebd8] */
   1990     MEM32(ebp + (-0xC)) = edx; /* 0x3801752B: mov dword ptr [ebp - 0xc], edx */
   1991     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3801752E: fcos  */
   1992     MEM32(0x3806EB28) = eax; /* 0x38017530: mov dword ptr [0x3806eb28], eax */
   1993     MEM32(0x3806EB30) = edx; /* 0x38017535: mov dword ptr [0x3806eb30], edx */
   1994     MEM32(0x3806EB2C) = ecx; /* 0x3801753B: mov dword ptr [0x3806eb2c], ecx */
   1995     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38017541: fstp dword ptr [ebp - 8] */
   1996     fp_push(*(double*)ADDR(0x3804E928)); /* 0x38017544: fld qword ptr [0x3804e928] */
   1997     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3801754A: fsin  */
   1998     eax = MEM32(ebp + (-0x8)); /* 0x3801754C: mov eax, dword ptr [ebp - 8] */
   1999     MEM32(0x3806EB34) = eax; /* 0x3801754F: mov dword ptr [0x3806eb34], eax */
   2000     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x38017554: fld dword ptr [0x3804e8e4] */
   2001     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3801755A: fst dword ptr [ebp - 4] */
   2002     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3801755D: fstp dword ptr [ebp - 0x14] */
   2003     edx = MEM32(ebp + (-0x14)); /* 0x38017560: mov edx, dword ptr [ebp - 0x14] */
   2004     ecx = MEM32(ebp + (-0x4)); /* 0x38017563: mov ecx, dword ptr [ebp - 4] */
   2005     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x38017566: fstp dword ptr [ebp - 0x10] */
   2006     eax = MEM32(ebp + (-0x10)); /* 0x38017569: mov eax, dword ptr [ebp - 0x10] */
   2007     fp_push(*(double*)ADDR(0x3804E928)); /* 0x3801756C: fld qword ptr [0x3804e928] */
   2008     MEM32(0x3806EB38) = edx; /* 0x38017572: mov dword ptr [0x3806eb38], edx */
   2009     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x38017578: fcos  */
   2010     MEM32(ebp + (-0xC)) = ecx; /* 0x3801757A: mov dword ptr [ebp - 0xc], ecx */
   2011     MEM32(0x3806EB3C) = eax; /* 0x3801757D: mov dword ptr [0x3806eb3c], eax */
   2012     MEM32(0x3806EB40) = ecx; /* 0x38017582: mov dword ptr [0x3806eb40], ecx */
   2013     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38017588: fstp dword ptr [ebp - 8] */
   2014     edx = MEM32(ebp + (-0x8)); /* 0x3801758B: mov edx, dword ptr [ebp - 8] */
   2015     MEM32(0x3806EB44) = edx; /* 0x3801758E: mov dword ptr [0x3806eb44], edx */
   2016     RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x38017594: call dword ptr [0x3804e0ac] */
   2017     RECOMP_FLAGS_IN();
   2018     _st[0] = (double)*(float*)ADDR(0x3804EFCC) - _st[0]; /* 0x3801759A: fsubr dword ptr [0x3804efcc] */
   2019     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2020     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2021     esp = esp + 8; /* 0x380175A0: add esp, 8 */
   2022     _flag_k = FK_ADD;
   2023     _st[0] *= (double)*(float*)ADDR(0x3804E8F0); /* 0x380175A3: fmul dword ptr [0x3804e8f0] */
   2024     fp_push(_st[0]); /* 0x380175A9: fld st(0) */
   2025     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x380175AB: fsin  */
   2026     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x380175AD: fld dword ptr [0x3804e8e4] */
   2027     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x380175B3: fst dword ptr [ebp - 4] */
   2028     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x380175B6: fstp dword ptr [ebp - 0x14] */
   2029     ecx = MEM32(ebp + (-0x14)); /* 0x380175B9: mov ecx, dword ptr [ebp - 0x14] */
   2030     eax = MEM32(ebp + (-0x4)); /* 0x380175BC: mov eax, dword ptr [ebp - 4] */
   2031     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x380175BF: fstp dword ptr [ebp - 0x10] */
   2032     edx = MEM32(ebp + (-0x10)); /* 0x380175C2: mov edx, dword ptr [ebp - 0x10] */
   2033     MEM32(0x3806EB48) = ecx; /* 0x380175C5: mov dword ptr [0x3806eb48], ecx */
   2034     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x380175CB: fcos  */
   2035     MEM32(ebp + (-0xC)) = eax; /* 0x380175CD: mov dword ptr [ebp - 0xc], eax */
   2036     MEM32(0x3806EB4C) = edx; /* 0x380175D0: mov dword ptr [0x3806eb4c], edx */
   2037     MEM32(0x3806EB50) = eax; /* 0x380175D6: mov dword ptr [0x3806eb50], eax */
   2038     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380175DB: fstp dword ptr [ebp - 8] */
   2039     ecx = MEM32(ebp + (-0x8)); /* 0x380175DE: mov ecx, dword ptr [ebp - 8] */
   2040     MEM32(0x3806EB54) = ecx; /* 0x380175E1: mov dword ptr [0x3806eb54], ecx */
   2041     esp = ebp; /* 0x380175E7: mov esp, ebp */
   2042     ebp = POP32_VAL(esp); /* 0x380175E9: pop ebp */
   2043     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380175EA: ret  */
   2044     RECOMP_REGS_OUT();
   2045 }
   2046 
   2047 void sub_380174B0(void) {
   2048     int _fpu_cmp = 0;
   2049     uint32_t _cf = 0;
   2050     int _df = 1;
   2051     uint32_t _flag_k = FK_NONE;
   2052     uint32_t _flag_a = 0, _flag_b = 0;
   2053     uint32_t _itail_tgt = 0;
   2054     RECOMP_REGS_LOCALS
   2055     RECOMP_ENTER(0x380174B0u);
   2056 
   2057 L_380174B0:
   2058     PUSH32(esp, ebp); /* 0x380174B0: push ebp */
   2059     ebp = esp; /* 0x380174B1: mov ebp, esp */
   2060     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   2061     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2062     esp = esp - 0x14u; /* 0x380174B3: sub esp, 0x14 */
   2063     _flag_k = FK_CMP;
   2064     fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x380174B6: fld qword ptr [0x3804ebd0] */
   2065     PUSH32(esp, 0xBFCFFFFFu); /* 0x380174BC: push 0xbfcfffff */
   2066     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x380174C1: fsin  */
   2067     PUSH32(esp, 0xFFFFFFFFu); /* 0x380174C3: push -1 */
   2068     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x380174C5: fld dword ptr [0x3804e8e4] */
   2069     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x380174CB: fst dword ptr [ebp - 4] */
   2070     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x380174CE: fstp dword ptr [ebp - 0x14] */
   2071     eax = MEM32(ebp + (-0x4)); /* 0x380174D1: mov eax, dword ptr [ebp - 4] */
   2072     ecx = MEM32(ebp + (-0x14)); /* 0x380174D4: mov ecx, dword ptr [ebp - 0x14] */
   2073     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x380174D7: fstp dword ptr [ebp - 0x10] */
   2074     edx = MEM32(ebp + (-0x10)); /* 0x380174DA: mov edx, dword ptr [ebp - 0x10] */
   2075     fp_push(*(double*)ADDR(0x3804EBD0)); /* 0x380174DD: fld qword ptr [0x3804ebd0] */
   2076     MEM32(0x3806EB18) = ecx; /* 0x380174E3: mov dword ptr [0x3806eb18], ecx */
   2077     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x380174E9: fcos  */
   2078     MEM32(ebp + (-0xC)) = eax; /* 0x380174EB: mov dword ptr [ebp - 0xc], eax */
   2079     MEM32(0x3806EB1C) = edx; /* 0x380174EE: mov dword ptr [0x3806eb1c], edx */
   2080     MEM32(0x3806EB20) = eax; /* 0x380174F4: mov dword ptr [0x3806eb20], eax */
   2081     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380174F9: fstp dword ptr [ebp - 8] */
   2082     fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x380174FC: fld qword ptr [0x3804ebd8] */
   2083     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x38017502: fsin  */
   2084     ecx = MEM32(ebp + (-0x8)); /* 0x38017504: mov ecx, dword ptr [ebp - 8] */
   2085     MEM32(0x3806EB24) = ecx; /* 0x38017507: mov dword ptr [0x3806eb24], ecx */
   2086     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x3801750D: fld dword ptr [0x3804e8e4] */
   2087     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x38017513: fst dword ptr [ebp - 4] */
   2088     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x38017516: fstp dword ptr [ebp - 0x14] */
   2089     edx = MEM32(ebp + (-0x4)); /* 0x38017519: mov edx, dword ptr [ebp - 4] */
   2090     eax = MEM32(ebp + (-0x14)); /* 0x3801751C: mov eax, dword ptr [ebp - 0x14] */
   2091     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x3801751F: fstp dword ptr [ebp - 0x10] */
   2092     ecx = MEM32(ebp + (-0x10)); /* 0x38017522: mov ecx, dword ptr [ebp - 0x10] */
   2093     fp_push(*(double*)ADDR(0x3804EBD8)); /* 0x38017525: fld qword ptr [0x3804ebd8] */
   2094     MEM32(ebp + (-0xC)) = edx; /* 0x3801752B: mov dword ptr [ebp - 0xc], edx */
   2095     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x3801752E: fcos  */
   2096     MEM32(0x3806EB28) = eax; /* 0x38017530: mov dword ptr [0x3806eb28], eax */
   2097     MEM32(0x3806EB30) = edx; /* 0x38017535: mov dword ptr [0x3806eb30], edx */
   2098     MEM32(0x3806EB2C) = ecx; /* 0x3801753B: mov dword ptr [0x3806eb2c], ecx */
   2099     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38017541: fstp dword ptr [ebp - 8] */
   2100     fp_push(*(double*)ADDR(0x3804E928)); /* 0x38017544: fld qword ptr [0x3804e928] */
   2101     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x3801754A: fsin  */
   2102     eax = MEM32(ebp + (-0x8)); /* 0x3801754C: mov eax, dword ptr [ebp - 8] */
   2103     MEM32(0x3806EB34) = eax; /* 0x3801754F: mov dword ptr [0x3806eb34], eax */
   2104     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x38017554: fld dword ptr [0x3804e8e4] */
   2105     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x3801755A: fst dword ptr [ebp - 4] */
   2106     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x3801755D: fstp dword ptr [ebp - 0x14] */
   2107     edx = MEM32(ebp + (-0x14)); /* 0x38017560: mov edx, dword ptr [ebp - 0x14] */
   2108     ecx = MEM32(ebp + (-0x4)); /* 0x38017563: mov ecx, dword ptr [ebp - 4] */
   2109     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x38017566: fstp dword ptr [ebp - 0x10] */
   2110     eax = MEM32(ebp + (-0x10)); /* 0x38017569: mov eax, dword ptr [ebp - 0x10] */
   2111     fp_push(*(double*)ADDR(0x3804E928)); /* 0x3801756C: fld qword ptr [0x3804e928] */
   2112     MEM32(0x3806EB38) = edx; /* 0x38017572: mov dword ptr [0x3806eb38], edx */
   2113     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x38017578: fcos  */
   2114     MEM32(ebp + (-0xC)) = ecx; /* 0x3801757A: mov dword ptr [ebp - 0xc], ecx */
   2115     MEM32(0x3806EB3C) = eax; /* 0x3801757D: mov dword ptr [0x3806eb3c], eax */
   2116     MEM32(0x3806EB40) = ecx; /* 0x38017582: mov dword ptr [0x3806eb40], ecx */
   2117     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x38017588: fstp dword ptr [ebp - 8] */
   2118     edx = MEM32(ebp + (-0x8)); /* 0x3801758B: mov edx, dword ptr [ebp - 8] */
   2119     MEM32(0x3806EB44) = edx; /* 0x3801758E: mov dword ptr [0x3806eb44], edx */
   2120     RECOMP_ICALL(MEM32(0x3804E0AC)); /* 0x38017594: call dword ptr [0x3804e0ac] */
   2121     RECOMP_FLAGS_IN();
   2122     _st[0] = (double)*(float*)ADDR(0x3804EFCC) - _st[0]; /* 0x3801759A: fsubr dword ptr [0x3804efcc] */
   2123     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2124     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2125     esp = esp + 8; /* 0x380175A0: add esp, 8 */
   2126     _flag_k = FK_ADD;
   2127     _st[0] *= (double)*(float*)ADDR(0x3804E8F0); /* 0x380175A3: fmul dword ptr [0x3804e8f0] */
   2128     fp_push(_st[0]); /* 0x380175A9: fld st(0) */
   2129     _st[0] = sin(_st[0]); _fpu_cmp = 1; /* 0x380175AB: fsin  */
   2130     fp_push(*(float*)&MEM32(0x3804E8E4)); /* 0x380175AD: fld dword ptr [0x3804e8e4] */
   2131     { float _v = (float)_st[0]; *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x380175B3: fst dword ptr [ebp - 4] */
   2132     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x380175B6: fstp dword ptr [ebp - 0x14] */
   2133     ecx = MEM32(ebp + (-0x14)); /* 0x380175B9: mov ecx, dword ptr [ebp - 0x14] */
   2134     eax = MEM32(ebp + (-0x4)); /* 0x380175BC: mov eax, dword ptr [ebp - 4] */
   2135     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x10)) = _v; } /* 0x380175BF: fstp dword ptr [ebp - 0x10] */
   2136     edx = MEM32(ebp + (-0x10)); /* 0x380175C2: mov edx, dword ptr [ebp - 0x10] */
   2137     MEM32(0x3806EB48) = ecx; /* 0x380175C5: mov dword ptr [0x3806eb48], ecx */
   2138     _st[0] = cos(_st[0]); _fpu_cmp = 1; /* 0x380175CB: fcos  */
   2139     MEM32(ebp + (-0xC)) = eax; /* 0x380175CD: mov dword ptr [ebp - 0xc], eax */
   2140     MEM32(0x3806EB4C) = edx; /* 0x380175D0: mov dword ptr [0x3806eb4c], edx */
   2141     MEM32(0x3806EB50) = eax; /* 0x380175D6: mov dword ptr [0x3806eb50], eax */
   2142     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380175DB: fstp dword ptr [ebp - 8] */
   2143     ecx = MEM32(ebp + (-0x8)); /* 0x380175DE: mov ecx, dword ptr [ebp - 8] */
   2144     MEM32(0x3806EB54) = ecx; /* 0x380175E1: mov dword ptr [0x3806eb54], ecx */
   2145     esp = ebp; /* 0x380175E7: mov esp, ebp */
   2146     ebp = POP32_VAL(esp); /* 0x380175E9: pop ebp */
   2147     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380175EA: ret  */
   2148     RECOMP_REGS_OUT();
   2149 }
   2150 
   2151 void sub_380175F0(void) {
   2152     int _fpu_cmp = 0;
   2153     uint32_t _cf = 0;
   2154     int _df = 1;
   2155     uint32_t _flag_k = FK_NONE;
   2156     uint32_t _flag_a = 0, _flag_b = 0;
   2157     uint32_t _itail_tgt = 0;
   2158     RECOMP_REGS_LOCALS
   2159     RECOMP_ENTER(0x380175F0u);
   2160 
   2161 L_380175F0:
   2162     goto L_38017600; /* 0x380175F0: jmp 0x38017600 */
   2163 L_38017600:
   2164     MEM32(0x3806EBB0) = 0; /* 0x38017600: mov dword ptr [0x3806ebb0], 0 */
   2165     MEM32(0x3806EBB4) = 0; /* 0x3801760A: mov dword ptr [0x3806ebb4], 0 */
   2166     MEM32(0x3806EBB8) = 0; /* 0x38017614: mov dword ptr [0x3806ebb8], 0 */
   2167     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3801761E: ret  */
   2168     RECOMP_REGS_OUT();
   2169 }
   2170 
   2171 void sub_38017600(void) {
   2172     int _fpu_cmp = 0;
   2173     uint32_t _cf = 0;
   2174     int _df = 1;
   2175     uint32_t _flag_k = FK_NONE;
   2176     uint32_t _flag_a = 0, _flag_b = 0;
   2177     uint32_t _itail_tgt = 0;
   2178     RECOMP_REGS_LOCALS
   2179     RECOMP_ENTER(0x38017600u);
   2180 
   2181 L_38017600:
   2182     MEM32(0x3806EBB0) = 0; /* 0x38017600: mov dword ptr [0x3806ebb0], 0 */
   2183     MEM32(0x3806EBB4) = 0; /* 0x3801760A: mov dword ptr [0x3806ebb4], 0 */
   2184     MEM32(0x3806EBB8) = 0; /* 0x38017614: mov dword ptr [0x3806ebb8], 0 */
   2185     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3801761E: ret  */
   2186     RECOMP_REGS_OUT();
   2187 }
   2188 
   2189 void sub_38017620(void) {
   2190     int _fpu_cmp = 0;
   2191     uint32_t _cf = 0;
   2192     int _df = 1;
   2193     uint32_t _flag_k = FK_NONE;
   2194     uint32_t _flag_a = 0, _flag_b = 0;
   2195     uint32_t _itail_tgt = 0;
   2196     RECOMP_REGS_LOCALS
   2197     RECOMP_ENTER(0x38017620u);
   2198 
   2199 L_38017620:
   2200     goto L_38017630; /* 0x38017620: jmp 0x38017630 */
   2201 L_38017630:
   2202     MEM32(0x3806EBC0) = 0; /* 0x38017630: mov dword ptr [0x3806ebc0], 0 */
   2203     MEM32(0x3806EBC4) = 0; /* 0x3801763A: mov dword ptr [0x3806ebc4], 0 */
   2204     MEM32(0x3806EBC8) = 0; /* 0x38017644: mov dword ptr [0x3806ebc8], 0 */
   2205     MEM32(0x3806EBCC) = 0x3F800000u; /* 0x3801764E: mov dword ptr [0x3806ebcc], 0x3f800000 */
   2206     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017658: ret  */
   2207     RECOMP_REGS_OUT();
   2208 }
   2209 
   2210 void sub_38017630(void) {
   2211     int _fpu_cmp = 0;
   2212     uint32_t _cf = 0;
   2213     int _df = 1;
   2214     uint32_t _flag_k = FK_NONE;
   2215     uint32_t _flag_a = 0, _flag_b = 0;
   2216     uint32_t _itail_tgt = 0;
   2217     RECOMP_REGS_LOCALS
   2218     RECOMP_ENTER(0x38017630u);
   2219 
   2220 L_38017630:
   2221     MEM32(0x3806EBC0) = 0; /* 0x38017630: mov dword ptr [0x3806ebc0], 0 */
   2222     MEM32(0x3806EBC4) = 0; /* 0x3801763A: mov dword ptr [0x3806ebc4], 0 */
   2223     MEM32(0x3806EBC8) = 0; /* 0x38017644: mov dword ptr [0x3806ebc8], 0 */
   2224     MEM32(0x3806EBCC) = 0x3F800000u; /* 0x3801764E: mov dword ptr [0x3806ebcc], 0x3f800000 */
   2225     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017658: ret  */
   2226     RECOMP_REGS_OUT();
   2227 }
   2228 
   2229 void sub_38017660(void) {
   2230     int _fpu_cmp = 0;
   2231     uint32_t _cf = 0;
   2232     int _df = 1;
   2233     uint32_t _flag_k = FK_NONE;
   2234     uint32_t _flag_a = 0, _flag_b = 0;
   2235     uint32_t _itail_tgt = 0;
   2236     RECOMP_REGS_LOCALS
   2237     RECOMP_ENTER(0x38017660u);
   2238 
   2239 L_38017660:
   2240     PUSH32(esp, ebp); /* 0x38017660: push ebp */
   2241     ebp = esp; /* 0x38017661: mov ebp, esp */
   2242     PUSH32(esp, 0xFFFFFFFFu); /* 0x38017663: push -1 */
   2243     PUSH32(esp, 0x3804C089u); /* 0x38017665: push 0x3804c089 */
   2244     eax = MEM32(FS_BASE + (0)); /* 0x3801766A: mov eax, dword ptr fs:[0] */
   2245     PUSH32(esp, eax); /* 0x38017670: push eax */
   2246     MEM32(FS_BASE + (0)) = esp; /* 0x38017671: mov dword ptr fs:[0], esp */
   2247     PUSH32(esp, ecx); /* 0x38017678: push ecx */
   2248     eax = MEM32(ebp + 0x8); /* 0x38017679: mov eax, dword ptr [ebp + 8] */
   2249     PUSH32(esp, ebx); /* 0x3801767C: push ebx */
   2250     PUSH32(esp, esi); /* 0x3801767D: push esi */
   2251     PUSH32(esp, edi); /* 0x3801767E: push edi */
   2252     esi = ecx; /* 0x3801767F: mov esi, ecx */
   2253     PUSH32(esp, eax); /* 0x38017681: push eax */
   2254     MEM32(ebp + (-0x10)) = esi; /* 0x38017682: mov dword ptr [ebp - 0x10], esi */
   2255     RECOMP_ICALL(0x3801B510u); /* 0x38017685: call 0x3801b510 */ /* not lifted */
   2256     RECOMP_FLAGS_IN();
   2257     edi = esi + 0x1C; /* 0x3801768A: lea edi, [esi + 0x1c] */
   2258     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2259     ebx = 0; /* 0x3801768D: xor ebx, ebx */
   2260     _cf = 0;
   2261     _flag_k = FK_TEST;
   2262     ecx = edi; /* 0x3801768F: mov ecx, edi */
   2263     MEM32(ebp + (-0x4)) = ebx; /* 0x38017691: mov dword ptr [ebp - 4], ebx */
   2264     RECOMP_ICALL(MEM32(0x3804E61C)); /* 0x38017694: call dword ptr [0x3804e61c] */
   2265     RECOMP_FLAGS_IN();
   2266     ecx = esi + 0x20; /* 0x3801769A: lea ecx, [esi + 0x20] */
   2267     RECOMP_ICALL(0x38042810u); /* 0x3801769D: call 0x38042810 */ /* not lifted */
   2268     RECOMP_FLAGS_IN();
   2269     ecx = esi + 0x2C; /* 0x380176A2: lea ecx, [esi + 0x2c] */
   2270     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x380176A5: mov byte ptr [ebp - 4], 1 */
   2271     MEM32(esi + 0x28) = ebx; /* 0x380176A9: mov dword ptr [esi + 0x28], ebx */
   2272     RECOMP_ICALL(0x3801E650u); /* 0x380176AC: call 0x3801e650 */ /* not lifted */
   2273     RECOMP_FLAGS_IN();
   2274     ecx = esi + 0x34; /* 0x380176B1: lea ecx, [esi + 0x34] */
   2275     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x380176B4: mov byte ptr [ebp - 4], 2 */
   2276     RECOMP_ICALL(0x3801EA80u); /* 0x380176B8: call 0x3801ea80 */ /* not lifted */
   2277     RECOMP_FLAGS_IN();
   2278     eax = 1; /* 0x380176BD: mov eax, 1 */
   2279     MEM32(esi + 0x54) = eax; /* 0x380176C2: mov dword ptr [esi + 0x54], eax */
   2280     MEM32(esi + 0x58) = eax; /* 0x380176C5: mov dword ptr [esi + 0x58], eax */
   2281     MEM32(esi + 0x5C) = ebx; /* 0x380176C8: mov dword ptr [esi + 0x5c], ebx */
   2282     MEM32(esi + 0x60) = ebx; /* 0x380176CB: mov dword ptr [esi + 0x60], ebx */
   2283     MEM32(esi + 0x64) = ebx; /* 0x380176CE: mov dword ptr [esi + 0x64], ebx */
   2284     MEM32(esi + 0x68) = ebx; /* 0x380176D1: mov dword ptr [esi + 0x68], ebx */
   2285     MEM8(esi + 0x6C) = (uint8_t)(LO8(ebx)); /* 0x380176D4: mov byte ptr [esi + 0x6c], bl */
   2286     MEM8(esi + 0x6D) = (uint8_t)(LO8(ebx)); /* 0x380176D7: mov byte ptr [esi + 0x6d], bl */
   2287     MEM8(esi + 0x6E) = (uint8_t)(LO8(eax)); /* 0x380176DA: mov byte ptr [esi + 0x6e], al */
   2288     MEM8(esi + 0x6F) = (uint8_t)(LO8(eax)); /* 0x380176DD: mov byte ptr [esi + 0x6f], al */
   2289     MEM8(esi + 0x70) = (uint8_t)(LO8(ebx)); /* 0x380176E0: mov byte ptr [esi + 0x70], bl */
   2290     MEM8(esi + 0x71) = (uint8_t)(LO8(eax)); /* 0x380176E3: mov byte ptr [esi + 0x71], al */
   2291     MEM32(esi + 0x74) = ebx; /* 0x380176E6: mov dword ptr [esi + 0x74], ebx */
   2292     MEM32(esi + 0x78) = ebx; /* 0x380176E9: mov dword ptr [esi + 0x78], ebx */
   2293     MEM32(esi + 0x7C) = ebx; /* 0x380176EC: mov dword ptr [esi + 0x7c], ebx */
   2294     MEM8(esi + 0x80) = (uint8_t)(LO8(ebx)); /* 0x380176EF: mov byte ptr [esi + 0x80], bl */
   2295     MEM8(esi + 0x81) = (uint8_t)(LO8(ebx)); /* 0x380176F5: mov byte ptr [esi + 0x81], bl */
   2296     MEM8(esi + 0x82) = (uint8_t)(LO8(ebx)); /* 0x380176FB: mov byte ptr [esi + 0x82], bl */
   2297     MEM8(esi + 0x83) = (uint8_t)(LO8(ebx)); /* 0x38017701: mov byte ptr [esi + 0x83], bl */
   2298     MEM32(esi + 0x84) = ebx; /* 0x38017707: mov dword ptr [esi + 0x84], ebx */
   2299     MEM32(esi + 0x88) = ebx; /* 0x3801770D: mov dword ptr [esi + 0x88], ebx */
   2300     MEM32(esi + 0x8C) = ebx; /* 0x38017713: mov dword ptr [esi + 0x8c], ebx */
   2301     MEM32(esi + 0x90) = ebx; /* 0x38017719: mov dword ptr [esi + 0x90], ebx */
   2302     MEM8(esi + 0x94) = (uint8_t)(LO8(ebx)); /* 0x3801771F: mov byte ptr [esi + 0x94], bl */
   2303     MEM32(esi + 0x98) = 2; /* 0x38017725: mov dword ptr [esi + 0x98], 2 */
   2304     MEM32(esi + 0x9C) = ebx; /* 0x3801772F: mov dword ptr [esi + 0x9c], ebx */
   2305     MEM32(esi + 0xA0) = ebx; /* 0x38017735: mov dword ptr [esi + 0xa0], ebx */
   2306     MEM32(esi + 0xA4) = 0xFFFFFFFFu; /* 0x3801773B: mov dword ptr [esi + 0xa4], 0xffffffff */
   2307     MEM32(esi + 0xA8) = ebx; /* 0x38017745: mov dword ptr [esi + 0xa8], ebx */
   2308     MEM32(esi + 0xAC) = ebx; /* 0x3801774B: mov dword ptr [esi + 0xac], ebx */
   2309     MEM32(esi + 0xB0) = ebx; /* 0x38017751: mov dword ptr [esi + 0xb0], ebx */
   2310     ecx = esi; /* 0x38017757: mov ecx, esi */
   2311     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x38017759: mov byte ptr [ebp - 4], 3 */
   2312     MEM32(esi) = 0x3804EFF4u; /* 0x3801775D: mov dword ptr [esi], 0x3804eff4 */
   2313     MEM32(edi) = 0x3804EFDCu; /* 0x38017763: mov dword ptr [edi], 0x3804efdc */
   2314     MEM32(esi + 0x20) = 0x3804EFD4u; /* 0x38017769: mov dword ptr [esi + 0x20], 0x3804efd4 */
   2315     RECOMP_ICALL(0x38017900u); /* 0x38017770: call 0x38017900 */ /* not lifted */
   2316     RECOMP_FLAGS_IN();
   2317     PUSH32(esp, 0x30u); /* 0x38017775: push 0x30 */
   2318     RECOMP_ICALL(0x3804B676u); /* 0x38017777: call 0x3804b676 */ /* not lifted */
   2319     RECOMP_FLAGS_IN();
   2320     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2321     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2322     esp = esp + 4; /* 0x3801777C: add esp, 4 */
   2323     _flag_k = FK_ADD;
   2324     /* cmp eax, ebx */ /* 0x3801777F: cmp eax, ebx */
   2325     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   2326     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2327     _flag_k = FK_CMP;
   2328     if (CMP_EQ(_flag_a, _flag_b)) goto L_380177AB; /* 0x38017781: je 0x380177ab */
   2329 L_38017783:
   2330     SET_LO8(ecx, MEM8(ebp + 0xB)); /* 0x38017783: mov cl, byte ptr [ebp + 0xb] */
   2331     MEM8(eax) = (uint8_t)(LO8(ecx)); /* 0x38017786: mov byte ptr [eax], cl */
   2332     MEM32(eax + 0x4) = ebx; /* 0x38017788: mov dword ptr [eax + 4], ebx */
   2333     MEM32(eax + 0x8) = ebx; /* 0x3801778B: mov dword ptr [eax + 8], ebx */
   2334     MEM32(eax + 0xC) = ebx; /* 0x3801778E: mov dword ptr [eax + 0xc], ebx */
   2335     MEM32(eax + 0x10) = ebx; /* 0x38017791: mov dword ptr [eax + 0x10], ebx */
   2336     MEM32(eax + 0x14) = ebx; /* 0x38017794: mov dword ptr [eax + 0x14], ebx */
   2337     MEM32(eax + 0x18) = ebx; /* 0x38017797: mov dword ptr [eax + 0x18], ebx */
   2338     MEM32(eax + 0x1C) = ebx; /* 0x3801779A: mov dword ptr [eax + 0x1c], ebx */
   2339     MEM32(eax + 0x20) = ebx; /* 0x3801779D: mov dword ptr [eax + 0x20], ebx */
   2340     MEM32(eax + 0x24) = ebx; /* 0x380177A0: mov dword ptr [eax + 0x24], ebx */
   2341     MEM32(eax + 0x28) = ebx; /* 0x380177A3: mov dword ptr [eax + 0x28], ebx */
   2342     MEM32(eax + 0x2C) = ebx; /* 0x380177A6: mov dword ptr [eax + 0x2c], ebx */
   2343     goto L_380177AD; /* 0x380177A9: jmp 0x380177ad */
   2344 L_380177AB:
   2345     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2346     eax = 0; /* 0x380177AB: xor eax, eax */
   2347     _cf = 0;
   2348     _flag_k = FK_TEST;
   2349 L_380177AD:
   2350     PUSH32(esp, 0x10u); /* 0x380177AD: push 0x10 */
   2351     MEM32(esi + 0x84) = eax; /* 0x380177AF: mov dword ptr [esi + 0x84], eax */
   2352     MEM32(esi + 0x60) = ebx; /* 0x380177B5: mov dword ptr [esi + 0x60], ebx */
   2353     RECOMP_ICALL(0x3804B676u); /* 0x380177B8: call 0x3804b676 */ /* not lifted */
   2354     RECOMP_FLAGS_IN();
   2355     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2356     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2357     esp = esp + 4; /* 0x380177BD: add esp, 4 */
   2358     _flag_k = FK_ADD;
   2359     /* cmp eax, ebx */ /* 0x380177C0: cmp eax, ebx */
   2360     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   2361     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2362     _flag_k = FK_CMP;
   2363     if (CMP_EQ(_flag_a, _flag_b)) goto L_380177D4; /* 0x380177C2: je 0x380177d4 */
   2364 L_380177C4:
   2365     SET_LO8(edx, MEM8(ebp + 0xB)); /* 0x380177C4: mov dl, byte ptr [ebp + 0xb] */
   2366     MEM8(eax) = (uint8_t)(LO8(edx)); /* 0x380177C7: mov byte ptr [eax], dl */
   2367     MEM32(eax + 0x4) = ebx; /* 0x380177C9: mov dword ptr [eax + 4], ebx */
   2368     MEM32(eax + 0x8) = ebx; /* 0x380177CC: mov dword ptr [eax + 8], ebx */
   2369     MEM32(eax + 0xC) = ebx; /* 0x380177CF: mov dword ptr [eax + 0xc], ebx */
   2370     goto L_380177D6; /* 0x380177D2: jmp 0x380177d6 */
   2371 L_380177D4:
   2372     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2373     eax = 0; /* 0x380177D4: xor eax, eax */
   2374     _cf = 0;
   2375     _flag_k = FK_TEST;
   2376 L_380177D6:
   2377     PUSH32(esp, 0x10u); /* 0x380177D6: push 0x10 */
   2378     MEM32(esi + 0x28) = eax; /* 0x380177D8: mov dword ptr [esi + 0x28], eax */
   2379     MEM32(esi + 0x74) = ebx; /* 0x380177DB: mov dword ptr [esi + 0x74], ebx */
   2380     RECOMP_ICALL(0x3804B676u); /* 0x380177DE: call 0x3804b676 */ /* not lifted */
   2381     RECOMP_FLAGS_IN();
   2382     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2383     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2384     esp = esp + 4; /* 0x380177E3: add esp, 4 */
   2385     _flag_k = FK_ADD;
   2386     /* cmp eax, ebx */ /* 0x380177E6: cmp eax, ebx */
   2387     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   2388     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2389     _flag_k = FK_CMP;
   2390     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017800; /* 0x380177E8: je 0x38017800 */
   2391 L_380177EA:
   2392     SET_LO8(ecx, MEM8(ebp + 0xB)); /* 0x380177EA: mov cl, byte ptr [ebp + 0xb] */
   2393     MEM8(eax) = (uint8_t)(LO8(ecx)); /* 0x380177ED: mov byte ptr [eax], cl */
   2394     MEM32(eax + 0x4) = ebx; /* 0x380177EF: mov dword ptr [eax + 4], ebx */
   2395     MEM32(eax + 0x8) = ebx; /* 0x380177F2: mov dword ptr [eax + 8], ebx */
   2396     MEM32(eax + 0xC) = ebx; /* 0x380177F5: mov dword ptr [eax + 0xc], ebx */
   2397     MEM32(esi + 0x88) = eax; /* 0x380177F8: mov dword ptr [esi + 0x88], eax */
   2398     goto L_38017806; /* 0x380177FE: jmp 0x38017806 */
   2399 L_38017800:
   2400     MEM32(esi + 0x88) = ebx; /* 0x38017800: mov dword ptr [esi + 0x88], ebx */
   2401 L_38017806:
   2402     ecx = MEM32(ebp + (-0xC)); /* 0x38017806: mov ecx, dword ptr [ebp - 0xc] */
   2403     edi = POP32_VAL(esp); /* 0x38017809: pop edi */
   2404     eax = esi; /* 0x3801780A: mov eax, esi */
   2405     esi = POP32_VAL(esp); /* 0x3801780C: pop esi */
   2406     ebx = POP32_VAL(esp); /* 0x3801780D: pop ebx */
   2407     MEM32(FS_BASE + (0)) = ecx; /* 0x3801780E: mov dword ptr fs:[0], ecx */
   2408     esp = ebp; /* 0x38017815: mov esp, ebp */
   2409     ebp = POP32_VAL(esp); /* 0x38017817: pop ebp */
   2410     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017818: ret 4 */
   2411     RECOMP_REGS_OUT();
   2412 }
   2413 
   2414 void sub_38017820(void) {
   2415     int _fpu_cmp = 0;
   2416     uint32_t _cf = 0;
   2417     int _df = 1;
   2418     uint32_t _flag_k = FK_NONE;
   2419     uint32_t _flag_a = 0, _flag_b = 0;
   2420     uint32_t _itail_tgt = 0;
   2421     RECOMP_REGS_LOCALS
   2422     RECOMP_ENTER(0x38017820u);
   2423 
   2424 L_38017820:
   2425     PUSH32(esp, ebp); /* 0x38017820: push ebp */
   2426     ebp = esp; /* 0x38017821: mov ebp, esp */
   2427     PUSH32(esp, ebx); /* 0x38017823: push ebx */
   2428     SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x38017824: mov bl, byte ptr [ebp + 8] */
   2429     /* test LO8(ebx), 2 */ /* 0x38017827: test bl, 2 */
   2430     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24;
   2431     _cf = 0;
   2432     _flag_k = FK_NARROW(FK_TEST, 24);
   2433     PUSH32(esp, esi); /* 0x3801782A: push esi */
   2434     esi = ecx; /* 0x3801782B: mov esi, ecx */
   2435     if (TEST_Z(_flag_a, _flag_b)) goto L_3801785E; /* 0x3801782D: je 0x3801785e */
   2436 L_3801782F:
   2437     eax = MEM32(esi + (-0x4)); /* 0x3801782F: mov eax, dword ptr [esi - 4] */
   2438     PUSH32(esp, edi); /* 0x38017832: push edi */
   2439     PUSH32(esp, 0x38017A20u); /* 0x38017833: push 0x38017a20 */
   2440     edi = esi + (-0x4); /* 0x38017838: lea edi, [esi - 4] */
   2441     PUSH32(esp, eax); /* 0x3801783B: push eax */
   2442     PUSH32(esp, 0xB4u); /* 0x3801783C: push 0xb4 */
   2443     PUSH32(esp, esi); /* 0x38017841: push esi */
   2444     RECOMP_ICALL(0x3804B582u); /* 0x38017842: call 0x3804b582 */ /* not lifted */
   2445     RECOMP_FLAGS_IN();
   2446     /* test LO8(ebx), 1 */ /* 0x38017847: test bl, 1 */
   2447     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24;
   2448     _cf = 0;
   2449     _flag_k = FK_NARROW(FK_TEST, 24);
   2450     if (TEST_Z(_flag_a, _flag_b)) goto L_38017855; /* 0x3801784A: je 0x38017855 */
   2451 L_3801784C:
   2452     PUSH32(esp, edi); /* 0x3801784C: push edi */
   2453     RECOMP_ICALL(0x3804B4F6u); /* 0x3801784D: call 0x3804b4f6 */ /* not lifted */
   2454     RECOMP_FLAGS_IN();
   2455     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2456     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2457     esp = esp + 4; /* 0x38017852: add esp, 4 */
   2458     _flag_k = FK_ADD;
   2459 L_38017855:
   2460     eax = edi; /* 0x38017855: mov eax, edi */
   2461     edi = POP32_VAL(esp); /* 0x38017857: pop edi */
   2462     esi = POP32_VAL(esp); /* 0x38017858: pop esi */
   2463     ebx = POP32_VAL(esp); /* 0x38017859: pop ebx */
   2464     ebp = POP32_VAL(esp); /* 0x3801785A: pop ebp */
   2465     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3801785B: ret 4 */
   2466 L_3801785E:
   2467     ecx = esi; /* 0x3801785E: mov ecx, esi */
   2468     RECOMP_ICALL(0x38017A20u); /* 0x38017860: call 0x38017a20 */ /* not lifted */
   2469     RECOMP_FLAGS_IN();
   2470     /* test LO8(ebx), 1 */ /* 0x38017865: test bl, 1 */
   2471     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24;
   2472     _cf = 0;
   2473     _flag_k = FK_NARROW(FK_TEST, 24);
   2474     if (TEST_Z(_flag_a, _flag_b)) goto L_38017873; /* 0x38017868: je 0x38017873 */
   2475 L_3801786A:
   2476     PUSH32(esp, esi); /* 0x3801786A: push esi */
   2477     RECOMP_ICALL(0x3804B4F6u); /* 0x3801786B: call 0x3804b4f6 */ /* not lifted */
   2478     RECOMP_FLAGS_IN();
   2479     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2480     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2481     esp = esp + 4; /* 0x38017870: add esp, 4 */
   2482     _flag_k = FK_ADD;
   2483 L_38017873:
   2484     eax = esi; /* 0x38017873: mov eax, esi */
   2485     esi = POP32_VAL(esp); /* 0x38017875: pop esi */
   2486     ebx = POP32_VAL(esp); /* 0x38017876: pop ebx */
   2487     ebp = POP32_VAL(esp); /* 0x38017877: pop ebp */
   2488     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017878: ret 4 */
   2489     RECOMP_REGS_OUT();
   2490 }
   2491 
   2492 void sub_38017880(void) {
   2493     int _fpu_cmp = 0;
   2494     uint32_t _cf = 0;
   2495     int _df = 1;
   2496     uint32_t _flag_k = FK_NONE;
   2497     uint32_t _flag_a = 0, _flag_b = 0;
   2498     uint32_t _itail_tgt = 0;
   2499     RECOMP_REGS_LOCALS
   2500     RECOMP_ENTER(0x38017880u);
   2501 
   2502 L_38017880:
   2503     PUSH32(esp, ebp); /* 0x38017880: push ebp */
   2504     ebp = esp; /* 0x38017881: mov ebp, esp */
   2505     ecx = MEM32(ebp + 0xC); /* 0x38017883: mov ecx, dword ptr [ebp + 0xc] */
   2506     PUSH32(esp, esi); /* 0x38017886: push esi */
   2507     PUSH32(esp, edi); /* 0x38017887: push edi */
   2508     edi = MEM32(ebp + 0x8); /* 0x38017888: mov edi, dword ptr [ebp + 8] */
   2509     eax = MEM32(edi); /* 0x3801788B: mov eax, dword ptr [edi] */
   2510     PUSH32(esp, ecx); /* 0x3801788D: push ecx */
   2511     ecx = edi; /* 0x3801788E: mov ecx, edi */
   2512     RECOMP_ICALL(MEM32(eax + 0xC)); /* 0x38017890: call dword ptr [eax + 0xc] */
   2513     RECOMP_FLAGS_IN();
   2514     edx = MEM32(edi); /* 0x38017893: mov edx, dword ptr [edi] */
   2515     esi = eax; /* 0x38017895: mov esi, eax */
   2516     PUSH32(esp, esi); /* 0x38017897: push esi */
   2517     ecx = edi; /* 0x38017898: mov ecx, edi */
   2518     RECOMP_ICALL(MEM32(edx + 0x10)); /* 0x3801789A: call dword ptr [edx + 0x10] */
   2519     RECOMP_FLAGS_IN();
   2520     /* test esi, esi */ /* 0x3801789D: test esi, esi */
   2521     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   2522     _cf = 0;
   2523     _flag_k = FK_TEST;
   2524     MEM32(esi + 0x60) = eax; /* 0x3801789F: mov dword ptr [esi + 0x60], eax */
   2525     if (TEST_Z(_flag_a, _flag_b)) goto L_380178A9; /* 0x380178A2: je 0x380178a9 */
   2526 L_380178A4:
   2527     ecx = esi + 0x1C; /* 0x380178A4: lea ecx, [esi + 0x1c] */
   2528     goto L_380178AB; /* 0x380178A7: jmp 0x380178ab */
   2529 L_380178A9:
   2530     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2531     ecx = 0; /* 0x380178A9: xor ecx, ecx */
   2532     _cf = 0;
   2533     _flag_k = FK_TEST;
   2534 L_380178AB:
   2535     PUSH32(esp, ecx); /* 0x380178AB: push ecx */
   2536     ecx = eax; /* 0x380178AC: mov ecx, eax */
   2537     RECOMP_ICALL(MEM32(0x3804E68C)); /* 0x380178AE: call dword ptr [0x3804e68c] */
   2538     RECOMP_FLAGS_IN();
   2539     eax = MEM32(edi); /* 0x380178B4: mov eax, dword ptr [edi] */
   2540     PUSH32(esp, esi); /* 0x380178B6: push esi */
   2541     ecx = edi; /* 0x380178B7: mov ecx, edi */
   2542     RECOMP_ICALL(MEM32(eax + 0x14)); /* 0x380178B9: call dword ptr [eax + 0x14] */
   2543     RECOMP_FLAGS_IN();
   2544     ecx = MEM32(ebp + 0x10); /* 0x380178BC: mov ecx, dword ptr [ebp + 0x10] */
   2545     edx = MEM32(esi); /* 0x380178BF: mov edx, dword ptr [esi] */
   2546     MEM32(esi + 0xA0) = ecx; /* 0x380178C1: mov dword ptr [esi + 0xa0], ecx */
   2547     ecx = esi; /* 0x380178C7: mov ecx, esi */
   2548     RECOMP_ICALL(MEM32(edx + 0x2C)); /* 0x380178C9: call dword ptr [edx + 0x2c] */
   2549     RECOMP_FLAGS_IN();
   2550     ecx = esi; /* 0x380178CC: mov ecx, esi */
   2551     RECOMP_ICALL(0x38004CF0u); /* 0x380178CE: call 0x38004cf0 */ /* not lifted */
   2552     RECOMP_FLAGS_IN();
   2553     edi = POP32_VAL(esp); /* 0x380178D3: pop edi */
   2554     eax = esi; /* 0x380178D4: mov eax, esi */
   2555     esi = POP32_VAL(esp); /* 0x380178D6: pop esi */
   2556     ebp = POP32_VAL(esp); /* 0x380178D7: pop ebp */
   2557     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380178D8: ret  */
   2558     RECOMP_REGS_OUT();
   2559 }
   2560 
   2561 void sub_380178E0(void) {
   2562     int _fpu_cmp = 0;
   2563     uint32_t _cf = 0;
   2564     int _df = 1;
   2565     uint32_t _flag_k = FK_NONE;
   2566     uint32_t _flag_a = 0, _flag_b = 0;
   2567     uint32_t _itail_tgt = 0;
   2568     RECOMP_REGS_LOCALS
   2569     RECOMP_ENTER(0x380178E0u);
   2570 
   2571 L_380178E0:
   2572     eax = MEM32(0x3806C110); /* 0x380178E0: mov eax, dword ptr [0x3806c110] */
   2573     eax = MEM32(eax + 0x10); /* 0x380178E5: mov eax, dword ptr [eax + 0x10] */
   2574     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380178E8: ret  */
   2575     RECOMP_REGS_OUT();
   2576 }
   2577 
   2578 void sub_380178F0(void) {
   2579     int _fpu_cmp = 0;
   2580     uint32_t _cf = 0;
   2581     int _df = 1;
   2582     uint32_t _flag_k = FK_NONE;
   2583     uint32_t _flag_a = 0, _flag_b = 0;
   2584     uint32_t _itail_tgt = 0;
   2585     RECOMP_REGS_LOCALS
   2586     RECOMP_ENTER(0x380178F0u);
   2587 
   2588 L_380178F0:
   2589     MEM32(ecx + 0xA0) = 0; /* 0x380178F0: mov dword ptr [ecx + 0xa0], 0 */
   2590     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380178FA: ret  */
   2591     RECOMP_REGS_OUT();
   2592 }
   2593 
   2594 void sub_38017900(void) {
   2595     int _fpu_cmp = 0;
   2596     uint32_t _cf = 0;
   2597     int _df = 1;
   2598     uint32_t _flag_k = FK_NONE;
   2599     uint32_t _flag_a = 0, _flag_b = 0;
   2600     uint32_t _itail_tgt = 0;
   2601     RECOMP_REGS_LOCALS
   2602     RECOMP_ENTER(0x38017900u);
   2603 
   2604 L_38017900:
   2605     PUSH32(esp, ebp); /* 0x38017900: push ebp */
   2606     ebp = esp; /* 0x38017901: mov ebp, esp */
   2607     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x28u);
   2608     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2609     esp = esp - 0x28u; /* 0x38017903: sub esp, 0x28 */
   2610     _flag_k = FK_CMP;
   2611     eax = ecx + 0x4; /* 0x38017906: lea eax, [ecx + 4] */
   2612     edx = ebp + (-0x28); /* 0x38017909: lea edx, [ebp - 0x28] */
   2613     /* cmp edx, eax */ /* 0x3801790C: cmp edx, eax */
   2614     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   2615     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2616     _flag_k = FK_CMP;
   2617     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017917; /* 0x3801790E: je 0x38017917 */
   2618 L_38017910:
   2619     edx = MEM32(eax); /* 0x38017910: mov edx, dword ptr [eax] */
   2620     eax = MEM32(eax + 0x4); /* 0x38017912: mov eax, dword ptr [eax + 4] */
   2621     goto L_3801791D; /* 0x38017915: jmp 0x3801791d */
   2622 L_38017917:
   2623     eax = MEM32(ebp + (-0x24)); /* 0x38017917: mov eax, dword ptr [ebp - 0x24] */
   2624     edx = MEM32(ebp + (-0x28)); /* 0x3801791A: mov edx, dword ptr [ebp - 0x28] */
   2625 L_3801791D:
   2626     PUSH32(esp, ebx); /* 0x3801791D: push ebx */
   2627     PUSH32(esp, esi); /* 0x3801791E: push esi */
   2628     MEM32(ebp + (-0x24)) = eax; /* 0x3801791F: mov dword ptr [ebp - 0x24], eax */
   2629     PUSH32(esp, edi); /* 0x38017922: push edi */
   2630     edi = MEM32(0x3806C110); /* 0x38017923: mov edi, dword ptr [0x3806c110] */
   2631     MEM32(ebp + (-0x28)) = edx; /* 0x38017929: mov dword ptr [ebp - 0x28], edx */
   2632     MEM32(ebp + (-0x20)) = ecx; /* 0x3801792C: mov dword ptr [ebp - 0x20], ecx */
   2633     eax = MEM32(edi + 0x4); /* 0x3801792F: mov eax, dword ptr [edi + 4] */
   2634     esi = MEM32(eax + 0x4); /* 0x38017932: mov esi, dword ptr [eax + 4] */
   2635     /* cmp esi, MEM32(edi + 0x8) */ /* 0x38017935: cmp esi, dword ptr [edi + 8] */
   2636     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
   2637     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2638     _flag_k = FK_CMP;
   2639     ebx = eax; /* 0x38017938: mov ebx, eax */
   2640     SET_LO8(eax, 1); /* 0x3801793A: mov al, 1 */
   2641     if (CMP_EQ(_flag_a, _flag_b)) goto L_3801795C; /* 0x3801793C: je 0x3801795c */
   2642 L_3801793E:
   2643     eax = esi + 0xC; /* 0x3801793E: lea eax, [esi + 0xc] */
   2644     PUSH32(esp, eax); /* 0x38017941: push eax */
   2645     ecx = ebp + (-0x28); /* 0x38017942: lea ecx, [ebp - 0x28] */
   2646     ebx = esi; /* 0x38017945: mov ebx, esi */
   2647     RECOMP_ICALL(0x380179F0u); /* 0x38017947: call 0x380179f0 */ /* not lifted */
   2648     RECOMP_FLAGS_IN();
   2649     /* test LO8(eax), LO8(eax) */ /* 0x3801794C: test al, al */
   2650     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   2651     _cf = 0;
   2652     _flag_k = FK_NARROW(FK_TEST, 24);
   2653     if (TEST_Z(_flag_a, _flag_b)) goto L_38017954; /* 0x3801794E: je 0x38017954 */
   2654 L_38017950:
   2655     esi = MEM32(esi); /* 0x38017950: mov esi, dword ptr [esi] */
   2656     goto L_38017957; /* 0x38017952: jmp 0x38017957 */
   2657 L_38017954:
   2658     esi = MEM32(esi + 0x8); /* 0x38017954: mov esi, dword ptr [esi + 8] */
   2659 L_38017957:
   2660     /* cmp esi, MEM32(edi + 0x8) */ /* 0x38017957: cmp esi, dword ptr [edi + 8] */
   2661     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
   2662     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2663     _flag_k = FK_CMP;
   2664     RECOMP_BACKEDGE();
   2665     if (CMP_NE(_flag_a, _flag_b)) goto L_3801793E; /* 0x3801795A: jne 0x3801793e */
   2666 L_3801795C:
   2667     SET_LO8(ecx, MEM8(edi + 0xC)); /* 0x3801795C: mov cl, byte ptr [edi + 0xc] */
   2668     /* test LO8(ecx), LO8(ecx) */ /* 0x3801795F: test cl, cl */
   2669     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2670     _cf = 0;
   2671     _flag_k = FK_NARROW(FK_TEST, 24);
   2672     if (TEST_Z(_flag_a, _flag_b)) goto L_3801797B; /* 0x38017961: je 0x3801797b */
   2673 L_38017963:
   2674     ecx = ebp + (-0x28); /* 0x38017963: lea ecx, [ebp - 0x28] */
   2675     PUSH32(esp, ecx); /* 0x38017966: push ecx */
   2676     PUSH32(esp, ebx); /* 0x38017967: push ebx */
   2677     PUSH32(esp, esi); /* 0x38017968: push esi */
   2678     edx = ebp + (-0xC); /* 0x38017969: lea edx, [ebp - 0xc] */
   2679     PUSH32(esp, edx); /* 0x3801796C: push edx */
   2680     ecx = edi; /* 0x3801796D: mov ecx, edi */
   2681     RECOMP_ICALL(0x38040440u); /* 0x3801796F: call 0x38040440 */ /* not lifted */
   2682     RECOMP_FLAGS_IN();
   2683     edi = POP32_VAL(esp); /* 0x38017974: pop edi */
   2684     esi = POP32_VAL(esp); /* 0x38017975: pop esi */
   2685     ebx = POP32_VAL(esp); /* 0x38017976: pop ebx */
   2686     esp = ebp; /* 0x38017977: mov esp, ebp */
   2687     ebp = POP32_VAL(esp); /* 0x38017979: pop ebp */
   2688     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3801797A: ret  */
   2689 L_3801797B:
   2690     /* test LO8(eax), LO8(eax) */ /* 0x3801797B: test al, al */
   2691     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   2692     _cf = 0;
   2693     _flag_k = FK_NARROW(FK_TEST, 24);
   2694     MEM32(ebp + (-0x8)) = ebx; /* 0x3801797D: mov dword ptr [ebp - 8], ebx */
   2695     if (TEST_Z(_flag_a, _flag_b)) goto L_380179A9; /* 0x38017980: je 0x380179a9 */
   2696 L_38017982:
   2697     eax = MEM32(edi + 0x4); /* 0x38017982: mov eax, dword ptr [edi + 4] */
   2698     /* cmp ebx, MEM32(eax) */ /* 0x38017985: cmp ebx, dword ptr [eax] */
   2699     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(eax));
   2700     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2701     _flag_k = FK_CMP;
   2702     if (CMP_NE(_flag_a, _flag_b)) goto L_380179A1; /* 0x38017987: jne 0x380179a1 */
   2703 L_38017989:
   2704     ecx = ebp + (-0x28); /* 0x38017989: lea ecx, [ebp - 0x28] */
   2705     PUSH32(esp, ecx); /* 0x3801798C: push ecx */
   2706     PUSH32(esp, ebx); /* 0x3801798D: push ebx */
   2707     PUSH32(esp, esi); /* 0x3801798E: push esi */
   2708     edx = ebp + (-0x10); /* 0x3801798F: lea edx, [ebp - 0x10] */
   2709     PUSH32(esp, edx); /* 0x38017992: push edx */
   2710     ecx = edi; /* 0x38017993: mov ecx, edi */
   2711     RECOMP_ICALL(0x38040440u); /* 0x38017995: call 0x38040440 */ /* not lifted */
   2712     RECOMP_FLAGS_IN();
   2713     edi = POP32_VAL(esp); /* 0x3801799A: pop edi */
   2714     esi = POP32_VAL(esp); /* 0x3801799B: pop esi */
   2715     ebx = POP32_VAL(esp); /* 0x3801799C: pop ebx */
   2716     esp = ebp; /* 0x3801799D: mov esp, ebp */
   2717     ebp = POP32_VAL(esp); /* 0x3801799F: pop ebp */
   2718     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380179A0: ret  */
   2719 L_380179A1:
   2720     ecx = ebp + (-0x8); /* 0x380179A1: lea ecx, [ebp - 8] */
   2721     RECOMP_ICALL(0x3801B170u); /* 0x380179A4: call 0x3801b170 */ /* not lifted */
   2722     RECOMP_FLAGS_IN();
   2723 L_380179A9:
   2724     eax = MEM32(ebp + (-0x8)); /* 0x380179A9: mov eax, dword ptr [ebp - 8] */
   2725     edx = ebp + (-0x28); /* 0x380179AC: lea edx, [ebp - 0x28] */
   2726     ecx = eax + 0xC; /* 0x380179AF: lea ecx, [eax + 0xc] */
   2727     PUSH32(esp, edx); /* 0x380179B2: push edx */
   2728     RECOMP_ICALL(0x380179F0u); /* 0x380179B3: call 0x380179f0 */ /* not lifted */
   2729     RECOMP_FLAGS_IN();
   2730     /* test LO8(eax), LO8(eax) */ /* 0x380179B8: test al, al */
   2731     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   2732     _cf = 0;
   2733     _flag_k = FK_NARROW(FK_TEST, 24);
   2734     if (TEST_Z(_flag_a, _flag_b)) goto L_380179D4; /* 0x380179BA: je 0x380179d4 */
   2735 L_380179BC:
   2736     eax = ebp + (-0x28); /* 0x380179BC: lea eax, [ebp - 0x28] */
   2737     PUSH32(esp, eax); /* 0x380179BF: push eax */
   2738     PUSH32(esp, ebx); /* 0x380179C0: push ebx */
   2739     PUSH32(esp, esi); /* 0x380179C1: push esi */
   2740     ecx = ebp + (-0x14); /* 0x380179C2: lea ecx, [ebp - 0x14] */
   2741     PUSH32(esp, ecx); /* 0x380179C5: push ecx */
   2742     ecx = edi; /* 0x380179C6: mov ecx, edi */
   2743     RECOMP_ICALL(0x38040440u); /* 0x380179C8: call 0x38040440 */ /* not lifted */
   2744     RECOMP_FLAGS_IN();
   2745     edi = POP32_VAL(esp); /* 0x380179CD: pop edi */
   2746     esi = POP32_VAL(esp); /* 0x380179CE: pop esi */
   2747     ebx = POP32_VAL(esp); /* 0x380179CF: pop ebx */
   2748     esp = ebp; /* 0x380179D0: mov esp, ebp */
   2749     ebp = POP32_VAL(esp); /* 0x380179D2: pop ebp */
   2750     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380179D3: ret  */
   2751 L_380179D4:
   2752     edx = ebp + (-0x1); /* 0x380179D4: lea edx, [ebp - 1] */
   2753     PUSH32(esp, edx); /* 0x380179D7: push edx */
   2754     eax = ebp + (-0x8); /* 0x380179D8: lea eax, [ebp - 8] */
   2755     PUSH32(esp, eax); /* 0x380179DB: push eax */
   2756     ecx = ebp + (-0x1C); /* 0x380179DC: lea ecx, [ebp - 0x1c] */
   2757     MEM8(ebp + (-0x1)) = (uint8_t)(0); /* 0x380179DF: mov byte ptr [ebp - 1], 0 */
   2758     RECOMP_ICALL(0x38035680u); /* 0x380179E3: call 0x38035680 */ /* not lifted */
   2759     RECOMP_FLAGS_IN();
   2760     edi = POP32_VAL(esp); /* 0x380179E8: pop edi */
   2761     esi = POP32_VAL(esp); /* 0x380179E9: pop esi */
   2762     ebx = POP32_VAL(esp); /* 0x380179EA: pop ebx */
   2763     esp = ebp; /* 0x380179EB: mov esp, ebp */
   2764     ebp = POP32_VAL(esp); /* 0x380179ED: pop ebp */
   2765     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380179EE: ret  */
   2766     RECOMP_REGS_OUT();
   2767 }
   2768 
   2769 void sub_380179F0(void) {
   2770     int _fpu_cmp = 0;
   2771     uint32_t _cf = 0;
   2772     int _df = 1;
   2773     uint32_t _flag_k = FK_NONE;
   2774     uint32_t _flag_a = 0, _flag_b = 0;
   2775     uint32_t _itail_tgt = 0;
   2776     RECOMP_REGS_LOCALS
   2777     RECOMP_ENTER(0x380179F0u);
   2778 
   2779 L_380179F0:
   2780     PUSH32(esp, ebp); /* 0x380179F0: push ebp */
   2781     ebp = esp; /* 0x380179F1: mov ebp, esp */
   2782     eax = MEM32(ecx); /* 0x380179F3: mov eax, dword ptr [ecx] */
   2783     PUSH32(esp, esi); /* 0x380179F5: push esi */
   2784     esi = MEM32(ebp + 0x8); /* 0x380179F6: mov esi, dword ptr [ebp + 8] */
   2785     edx = MEM32(esi); /* 0x380179F9: mov edx, dword ptr [esi] */
   2786     /* cmp eax, edx */ /* 0x380179FB: cmp eax, edx */
   2787     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   2788     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2789     _flag_k = FK_CMP;
   2790     if (CMP_NE(_flag_a, _flag_b)) goto L_38017A0E; /* 0x380179FD: jne 0x38017a0e */
   2791 L_380179FF:
   2792     eax = MEM32(ecx + 0x4); /* 0x380179FF: mov eax, dword ptr [ecx + 4] */
   2793     /* cmp eax, MEM32(esi + 0x4) */ /* 0x38017A02: cmp eax, dword ptr [esi + 4] */
   2794     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(esi + 0x4));
   2795     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2796     _flag_k = FK_CMP;
   2797     { uint32_t _sa = eax, _sb = eax, _sc = _cf; /* 0x38017A05: sbb eax, eax */
   2798       eax = _sc ? 0xFFFFFFFFu : 0;
   2799       _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0;
   2800       _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; }
   2801     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(eax);
   2802     _cf = (eax) != 0;
   2803     eax = (uint32_t)(-(int32_t)eax); /* 0x38017A07: neg eax */
   2804     _flag_k = FK_CMP;
   2805     esi = POP32_VAL(esp); /* 0x38017A09: pop esi */
   2806     ebp = POP32_VAL(esp); /* 0x38017A0A: pop ebp */
   2807     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017A0B: ret 4 */
   2808 L_38017A0E:
   2809     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2810     ecx = 0; /* 0x38017A0E: xor ecx, ecx */
   2811     _cf = 0;
   2812     _flag_k = FK_TEST;
   2813     /* cmp eax, edx */ /* 0x38017A10: cmp eax, edx */
   2814     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   2815     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2816     _flag_k = FK_CMP;
   2817     SET_LO8(ecx, (CMP_L(_flag_a, _flag_b)) ? 1 : 0); /* 0x38017A12: setl cl */
   2818     SET_LO8(eax, LO8(ecx)); /* 0x38017A15: mov al, cl */
   2819     esi = POP32_VAL(esp); /* 0x38017A17: pop esi */
   2820     ebp = POP32_VAL(esp); /* 0x38017A18: pop ebp */
   2821     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017A19: ret 4 */
   2822     RECOMP_REGS_OUT();
   2823 }
   2824 
   2825 void sub_38017A20(void) {
   2826     int _fpu_cmp = 0;
   2827     uint32_t _cf = 0;
   2828     int _df = 1;
   2829     uint32_t _flag_k = FK_NONE;
   2830     uint32_t _flag_a = 0, _flag_b = 0;
   2831     uint32_t _itail_tgt = 0;
   2832     RECOMP_REGS_LOCALS
   2833     RECOMP_ENTER(0x38017A20u);
   2834 
   2835 L_38017A20:
   2836     PUSH32(esp, ebp); /* 0x38017A20: push ebp */
   2837     ebp = esp; /* 0x38017A21: mov ebp, esp */
   2838     PUSH32(esp, 0xFFFFFFFFu); /* 0x38017A23: push -1 */
   2839     PUSH32(esp, 0x3804C0E5u); /* 0x38017A25: push 0x3804c0e5 */
   2840     eax = MEM32(FS_BASE + (0)); /* 0x38017A2A: mov eax, dword ptr fs:[0] */
   2841     PUSH32(esp, eax); /* 0x38017A30: push eax */
   2842     MEM32(FS_BASE + (0)) = esp; /* 0x38017A31: mov dword ptr fs:[0], esp */
   2843     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x20u);
   2844     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2845     esp = esp - 0x20u; /* 0x38017A38: sub esp, 0x20 */
   2846     _flag_k = FK_CMP;
   2847     PUSH32(esp, ebx); /* 0x38017A3B: push ebx */
   2848     PUSH32(esp, esi); /* 0x38017A3C: push esi */
   2849     PUSH32(esp, edi); /* 0x38017A3D: push edi */
   2850     edi = ecx; /* 0x38017A3E: mov edi, ecx */
   2851     MEM32(ebp + (-0x18)) = edi; /* 0x38017A40: mov dword ptr [ebp - 0x18], edi */
   2852     MEM32(edi) = 0x3804EFF4u; /* 0x38017A43: mov dword ptr [edi], 0x3804eff4 */
   2853     MEM32(edi + 0x1C) = 0x3804EFDCu; /* 0x38017A49: mov dword ptr [edi + 0x1c], 0x3804efdc */
   2854     MEM32(edi + 0x20) = 0x3804EFD4u; /* 0x38017A50: mov dword ptr [edi + 0x20], 0x3804efd4 */
   2855     MEM32(ebp + (-0x4)) = 3; /* 0x38017A57: mov dword ptr [ebp - 4], 3 */
   2856     RECOMP_ICALL(0x38004CF0u); /* 0x38017A5E: call 0x38004cf0 */ /* not lifted */
   2857     RECOMP_FLAGS_IN();
   2858     ecx = edi; /* 0x38017A63: mov ecx, edi */
   2859     RECOMP_ICALL(0x38018E70u); /* 0x38017A65: call 0x38018e70 */ /* not lifted */
   2860     RECOMP_FLAGS_IN();
   2861     /* test eax, eax */ /* 0x38017A6A: test eax, eax */
   2862     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   2863     _cf = 0;
   2864     _flag_k = FK_TEST;
   2865     if (TEST_Z(_flag_a, _flag_b)) goto L_38017A7C; /* 0x38017A6C: je 0x38017a7c */
   2866 L_38017A6E:
   2867     ecx = edi; /* 0x38017A6E: mov ecx, edi */
   2868     RECOMP_ICALL(0x38018E70u); /* 0x38017A70: call 0x38018e70 */ /* not lifted */
   2869     RECOMP_FLAGS_IN();
   2870     ecx = eax; /* 0x38017A75: mov ecx, eax */
   2871     RECOMP_ICALL(0x38029DF0u); /* 0x38017A77: call 0x38029df0 */ /* not lifted */
   2872     RECOMP_FLAGS_IN();
   2873 L_38017A7C:
   2874     ecx = edi; /* 0x38017A7C: mov ecx, edi */
   2875     RECOMP_ICALL(0x38018E70u); /* 0x38017A7E: call 0x38018e70 */ /* not lifted */
   2876     RECOMP_FLAGS_IN();
   2877     /* test eax, eax */ /* 0x38017A83: test eax, eax */
   2878     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   2879     _cf = 0;
   2880     _flag_k = FK_TEST;
   2881     if (TEST_Z(_flag_a, _flag_b)) goto L_38017A95; /* 0x38017A85: je 0x38017a95 */
   2882 L_38017A87:
   2883     ecx = edi; /* 0x38017A87: mov ecx, edi */
   2884     RECOMP_ICALL(0x38018E70u); /* 0x38017A89: call 0x38018e70 */ /* not lifted */
   2885     RECOMP_FLAGS_IN();
   2886     ecx = eax; /* 0x38017A8E: mov ecx, eax */
   2887     RECOMP_ICALL(0x38029DF0u); /* 0x38017A90: call 0x38029df0 */ /* not lifted */
   2888     RECOMP_FLAGS_IN();
   2889 L_38017A95:
   2890     ecx = edi; /* 0x38017A95: mov ecx, edi */
   2891     RECOMP_ICALL(0x38018E70u); /* 0x38017A97: call 0x38018e70 */ /* not lifted */
   2892     RECOMP_FLAGS_IN();
   2893     /* test eax, eax */ /* 0x38017A9C: test eax, eax */
   2894     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   2895     _cf = 0;
   2896     _flag_k = FK_TEST;
   2897     if (TEST_Z(_flag_a, _flag_b)) goto L_38017AAE; /* 0x38017A9E: je 0x38017aae */
   2898 L_38017AA0:
   2899     ecx = edi; /* 0x38017AA0: mov ecx, edi */
   2900     RECOMP_ICALL(0x38018E70u); /* 0x38017AA2: call 0x38018e70 */ /* not lifted */
   2901     RECOMP_FLAGS_IN();
   2902     ecx = eax; /* 0x38017AA7: mov ecx, eax */
   2903     RECOMP_ICALL(0x38029DF0u); /* 0x38017AA9: call 0x38029df0 */ /* not lifted */
   2904     RECOMP_FLAGS_IN();
   2905 L_38017AAE:
   2906     esi = MEM32(edi + 0x88); /* 0x38017AAE: mov esi, dword ptr [edi + 0x88] */
   2907     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2908     ebx = 0; /* 0x38017AB4: xor ebx, ebx */
   2909     _cf = 0;
   2910     _flag_k = FK_TEST;
   2911     /* cmp esi, ebx */ /* 0x38017AB6: cmp esi, ebx */
   2912     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   2913     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2914     _flag_k = FK_CMP;
   2915     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017AE4; /* 0x38017AB8: je 0x38017ae4 */
   2916 L_38017ABA:
   2917     eax = MEM32(esi + 0x8); /* 0x38017ABA: mov eax, dword ptr [esi + 8] */
   2918     ecx = MEM32(esi + 0x4); /* 0x38017ABD: mov ecx, dword ptr [esi + 4] */
   2919     PUSH32(esp, eax); /* 0x38017AC0: push eax */
   2920     PUSH32(esp, ecx); /* 0x38017AC1: push ecx */
   2921     ecx = esi; /* 0x38017AC2: mov ecx, esi */
   2922     RECOMP_ICALL(0x3801AC80u); /* 0x38017AC4: call 0x3801ac80 */ /* not lifted */
   2923     RECOMP_FLAGS_IN();
   2924     eax = MEM32(esi + 0x4); /* 0x38017AC9: mov eax, dword ptr [esi + 4] */
   2925     PUSH32(esp, eax); /* 0x38017ACC: push eax */
   2926     RECOMP_ICALL(0x3804B4F6u); /* 0x38017ACD: call 0x3804b4f6 */ /* not lifted */
   2927     RECOMP_FLAGS_IN();
   2928     PUSH32(esp, esi); /* 0x38017AD2: push esi */
   2929     MEM32(esi + 0x4) = ebx; /* 0x38017AD3: mov dword ptr [esi + 4], ebx */
   2930     MEM32(esi + 0x8) = ebx; /* 0x38017AD6: mov dword ptr [esi + 8], ebx */
   2931     MEM32(esi + 0xC) = ebx; /* 0x38017AD9: mov dword ptr [esi + 0xc], ebx */
   2932     RECOMP_ICALL(0x3804B4F6u); /* 0x38017ADC: call 0x3804b4f6 */ /* not lifted */
   2933     RECOMP_FLAGS_IN();
   2934     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2935     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2936     esp = esp + 8; /* 0x38017AE1: add esp, 8 */
   2937     _flag_k = FK_ADD;
   2938 L_38017AE4:
   2939     MEM32(edi + 0x88) = ebx; /* 0x38017AE4: mov dword ptr [edi + 0x88], ebx */
   2940     esi = MEM32(0x3806C110); /* 0x38017AEA: mov esi, dword ptr [0x3806c110] */
   2941     ebx = edi + 0x4; /* 0x38017AF0: lea ebx, [edi + 4] */
   2942     PUSH32(esp, ebx); /* 0x38017AF3: push ebx */
   2943     edx = ebp + (-0x1C); /* 0x38017AF4: lea edx, [ebp - 0x1c] */
   2944     PUSH32(esp, edx); /* 0x38017AF7: push edx */
   2945     ecx = esi; /* 0x38017AF8: mov ecx, esi */
   2946     RECOMP_ICALL(0x3801B110u); /* 0x38017AFA: call 0x3801b110 */ /* not lifted */
   2947     RECOMP_FLAGS_IN();
   2948     MEM32(ebp + (-0x10)) = eax; /* 0x38017AFF: mov dword ptr [ebp - 0x10], eax */
   2949     PUSH32(esp, ebx); /* 0x38017B02: push ebx */
   2950     eax = ebp + (-0x20); /* 0x38017B03: lea eax, [ebp - 0x20] */
   2951     PUSH32(esp, eax); /* 0x38017B06: push eax */
   2952     ecx = esi; /* 0x38017B07: mov ecx, esi */
   2953     RECOMP_ICALL(0x3801B070u); /* 0x38017B09: call 0x3801b070 */ /* not lifted */
   2954     RECOMP_FLAGS_IN();
   2955     ebx = MEM32(eax); /* 0x38017B0E: mov ebx, dword ptr [eax] */
   2956     ecx = MEM32(ebp + (-0x10)); /* 0x38017B10: mov ecx, dword ptr [ebp - 0x10] */
   2957     eax = MEM32(ecx); /* 0x38017B13: mov eax, dword ptr [ecx] */
   2958     edx = ebp + (-0x14); /* 0x38017B15: lea edx, [ebp - 0x14] */
   2959     PUSH32(esp, edx); /* 0x38017B18: push edx */
   2960     PUSH32(esp, eax); /* 0x38017B19: push eax */
   2961     PUSH32(esp, ebx); /* 0x38017B1A: push ebx */
   2962     MEM32(ebp + (-0x24)) = eax; /* 0x38017B1B: mov dword ptr [ebp - 0x24], eax */
   2963     MEM32(ebp + (-0x14)) = 0; /* 0x38017B1E: mov dword ptr [ebp - 0x14], 0 */
   2964     RECOMP_ICALL(0x3801B3E0u); /* 0x38017B25: call 0x3801b3e0 */ /* not lifted */
   2965     RECOMP_FLAGS_IN();
   2966     eax = MEM32(ebp + (-0x24)); /* 0x38017B2A: mov eax, dword ptr [ebp - 0x24] */
   2967     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   2968     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2969     esp = esp + 0xCu; /* 0x38017B2D: add esp, 0xc */
   2970     _flag_k = FK_ADD;
   2971     PUSH32(esp, eax); /* 0x38017B30: push eax */
   2972     PUSH32(esp, ebx); /* 0x38017B31: push ebx */
   2973     ecx = ebp + (-0x10); /* 0x38017B32: lea ecx, [ebp - 0x10] */
   2974     PUSH32(esp, ecx); /* 0x38017B35: push ecx */
   2975     ecx = esi; /* 0x38017B36: mov ecx, esi */
   2976     RECOMP_ICALL(0x3801A950u); /* 0x38017B38: call 0x3801a950 */ /* not lifted */
   2977     RECOMP_FLAGS_IN();
   2978     esi = MEM32(edi + 0x84); /* 0x38017B3D: mov esi, dword ptr [edi + 0x84] */
   2979     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2980     ebx = 0; /* 0x38017B43: xor ebx, ebx */
   2981     _cf = 0;
   2982     _flag_k = FK_TEST;
   2983     /* cmp esi, ebx */ /* 0x38017B45: cmp esi, ebx */
   2984     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   2985     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2986     _flag_k = FK_CMP;
   2987     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017BC8; /* 0x38017B47: je 0x38017bc8 */
   2988 L_38017B49:
   2989     eax = MEM32(esi + 0x2C); /* 0x38017B49: mov eax, dword ptr [esi + 0x2c] */
   2990     /* cmp eax, ebx */ /* 0x38017B4C: cmp eax, ebx */
   2991     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   2992     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2993     _flag_k = FK_CMP;
   2994     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017BBF; /* 0x38017B4E: je 0x38017bbf */
   2995 L_38017B50:
   2996     eax = MEM32(esi + 0xC); /* 0x38017B50: mov eax, dword ptr [esi + 0xc] */
   2997     ecx = MEM32(esi + 0x8); /* 0x38017B53: mov ecx, dword ptr [esi + 8] */
   2998     /* cmp eax, ecx */ /* 0x38017B56: cmp eax, ecx */
   2999     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3000     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3001     _flag_k = FK_CMP;
   3002     ebx = MEM32(esi + 0x10); /* 0x38017B58: mov ebx, dword ptr [esi + 0x10] */
   3003     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017B8A; /* 0x38017B5B: je 0x38017b8a */
   3004 L_38017B5D:
   3005     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
   3006     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3007     eax = eax + 4; /* 0x38017B5D: add eax, 4 */
   3008     _flag_k = FK_ADD;
   3009     /* cmp eax, ecx */ /* 0x38017B60: cmp eax, ecx */
   3010     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3011     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3012     _flag_k = FK_CMP;
   3013     MEM32(esi + 0xC) = eax; /* 0x38017B62: mov dword ptr [esi + 0xc], eax */
   3014     if (CMP_NE(_flag_a, _flag_b)) goto L_38017B8A; /* 0x38017B65: jne 0x38017b8a */
   3015 L_38017B67:
   3016     eax = MEM32(esi + 0x10); /* 0x38017B67: mov eax, dword ptr [esi + 0x10] */
   3017     ecx = MEM32(eax + 0x4); /* 0x38017B6A: mov ecx, dword ptr [eax + 4] */
   3018     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
   3019     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3020     eax = eax + 4; /* 0x38017B6D: add eax, 4 */
   3021     _flag_k = FK_ADD;
   3022     /* test ecx, ecx */ /* 0x38017B70: test ecx, ecx */
   3023     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   3024     _cf = 0;
   3025     _flag_k = FK_TEST;
   3026     if (TEST_Z(_flag_a, _flag_b)) goto L_38017B8A; /* 0x38017B72: je 0x38017b8a */
   3027 L_38017B74:
   3028     MEM32(esi + 0x10) = eax; /* 0x38017B74: mov dword ptr [esi + 0x10], eax */
   3029     eax = MEM32(eax); /* 0x38017B77: mov eax, dword ptr [eax] */
   3030     MEM32(esi + 0x4) = eax; /* 0x38017B79: mov dword ptr [esi + 4], eax */
   3031     edx = MEM32(esi + 0x4); /* 0x38017B7C: mov edx, dword ptr [esi + 4] */
   3032     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x1000u);
   3033     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3034     eax = eax + 0x1000u; /* 0x38017B7F: add eax, 0x1000 */
   3035     _flag_k = FK_ADD;
   3036     MEM32(esi + 0x8) = eax; /* 0x38017B84: mov dword ptr [esi + 8], eax */
   3037     MEM32(esi + 0xC) = edx; /* 0x38017B87: mov dword ptr [esi + 0xc], edx */
   3038 L_38017B8A:
   3039     ecx = MEM32(esi + 0x2C); /* 0x38017B8A: mov ecx, dword ptr [esi + 0x2c] */
   3040     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   3041     ecx = ecx - 1; /* 0x38017B8D: dec ecx */
   3042     _flag_k = FK_DEC;
   3043     eax = ecx; /* 0x38017B8E: mov eax, ecx */
   3044     /* test eax, eax */ /* 0x38017B90: test eax, eax */
   3045     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3046     _cf = 0;
   3047     _flag_k = FK_TEST;
   3048     MEM32(esi + 0x2C) = ecx; /* 0x38017B92: mov dword ptr [esi + 0x2c], ecx */
   3049     if (TEST_NZ(_flag_a, _flag_b)) goto L_38017BA0; /* 0x38017B95: jne 0x38017ba0 */
   3050 L_38017B97:
   3051     ecx = esi; /* 0x38017B97: mov ecx, esi */
   3052     RECOMP_ICALL(0x380232A0u); /* 0x38017B99: call 0x380232a0 */ /* not lifted */
   3053     RECOMP_FLAGS_IN();
   3054     goto L_38017BB6; /* 0x38017B9E: jmp 0x38017bb6 */
   3055 L_38017BA0:
   3056     /* cmp ebx, MEM32(esi + 0x10) */ /* 0x38017BA0: cmp ebx, dword ptr [esi + 0x10] */
   3057     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x10));
   3058     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3059     _flag_k = FK_CMP;
   3060     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017BB6; /* 0x38017BA3: je 0x38017bb6 */
   3061 L_38017BA5:
   3062     eax = MEM32(ebx); /* 0x38017BA5: mov eax, dword ptr [ebx] */
   3063     PUSH32(esp, eax); /* 0x38017BA7: push eax */
   3064     RECOMP_ICALL(0x3804B4F6u); /* 0x38017BA8: call 0x3804b4f6 */ /* not lifted */
   3065     RECOMP_FLAGS_IN();
   3066     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3067     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3068     esp = esp + 4; /* 0x38017BAD: add esp, 4 */
   3069     _flag_k = FK_ADD;
   3070     MEM32(ebx) = 0; /* 0x38017BB0: mov dword ptr [ebx], 0 */
   3071 L_38017BB6:
   3072     eax = MEM32(esi + 0x2C); /* 0x38017BB6: mov eax, dword ptr [esi + 0x2c] */
   3073     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3074     ebx = 0; /* 0x38017BB9: xor ebx, ebx */
   3075     _cf = 0;
   3076     _flag_k = FK_TEST;
   3077     /* cmp eax, ebx */ /* 0x38017BBB: cmp eax, ebx */
   3078     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   3079     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3080     _flag_k = FK_CMP;
   3081     RECOMP_BACKEDGE();
   3082     if (CMP_NE(_flag_a, _flag_b)) goto L_38017B50; /* 0x38017BBD: jne 0x38017b50 */
   3083 L_38017BBF:
   3084     PUSH32(esp, esi); /* 0x38017BBF: push esi */
   3085     RECOMP_ICALL(0x3804B4F6u); /* 0x38017BC0: call 0x3804b4f6 */ /* not lifted */
   3086     RECOMP_FLAGS_IN();
   3087     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3088     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3089     esp = esp + 4; /* 0x38017BC5: add esp, 4 */
   3090     _flag_k = FK_ADD;
   3091 L_38017BC8:
   3092     ecx = edi; /* 0x38017BC8: mov ecx, edi */
   3093     MEM32(edi + 0x84) = ebx; /* 0x38017BCA: mov dword ptr [edi + 0x84], ebx */
   3094     RECOMP_ICALL(0x38019D60u); /* 0x38017BD0: call 0x38019d60 */ /* not lifted */
   3095     RECOMP_FLAGS_IN();
   3096     ecx = MEM32(edi + 0x60); /* 0x38017BD5: mov ecx, dword ptr [edi + 0x60] */
   3097     /* cmp ecx, ebx */ /* 0x38017BD8: cmp ecx, ebx */
   3098     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   3099     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3100     _flag_k = FK_CMP;
   3101     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017BE3; /* 0x38017BDA: je 0x38017be3 */
   3102 L_38017BDC:
   3103     eax = MEM32(ecx); /* 0x38017BDC: mov eax, dword ptr [ecx] */
   3104     PUSH32(esp, 1); /* 0x38017BDE: push 1 */
   3105     RECOMP_ICALL(MEM32(eax + 0x18)); /* 0x38017BE0: call dword ptr [eax + 0x18] */
   3106     RECOMP_FLAGS_IN();
   3107 L_38017BE3:
   3108     esi = MEM32(edi + 0x28); /* 0x38017BE3: mov esi, dword ptr [edi + 0x28] */
   3109     /* cmp esi, ebx */ /* 0x38017BE6: cmp esi, ebx */
   3110     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   3111     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3112     _flag_k = FK_CMP;
   3113     MEM32(edi + 0x60) = ebx; /* 0x38017BE8: mov dword ptr [edi + 0x60], ebx */
   3114     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017C0B; /* 0x38017BEB: je 0x38017c0b */
   3115 L_38017BED:
   3116     eax = MEM32(esi + 0x4); /* 0x38017BED: mov eax, dword ptr [esi + 4] */
   3117     PUSH32(esp, eax); /* 0x38017BF0: push eax */
   3118     MEM32(ebp + (-0x24)) = eax; /* 0x38017BF1: mov dword ptr [ebp - 0x24], eax */
   3119     RECOMP_ICALL(0x3804B4F6u); /* 0x38017BF4: call 0x3804b4f6 */ /* not lifted */
   3120     RECOMP_FLAGS_IN();
   3121     PUSH32(esp, esi); /* 0x38017BF9: push esi */
   3122     MEM32(esi + 0x4) = ebx; /* 0x38017BFA: mov dword ptr [esi + 4], ebx */
   3123     MEM32(esi + 0x8) = ebx; /* 0x38017BFD: mov dword ptr [esi + 8], ebx */
   3124     MEM32(esi + 0xC) = ebx; /* 0x38017C00: mov dword ptr [esi + 0xc], ebx */
   3125     RECOMP_ICALL(0x3804B4F6u); /* 0x38017C03: call 0x3804b4f6 */ /* not lifted */
   3126     RECOMP_FLAGS_IN();
   3127     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3128     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3129     esp = esp + 8; /* 0x38017C08: add esp, 8 */
   3130     _flag_k = FK_ADD;
   3131 L_38017C0B:
   3132     ecx = edi + 0x34; /* 0x38017C0B: lea ecx, [edi + 0x34] */
   3133     MEM32(edi + 0x28) = ebx; /* 0x38017C0E: mov dword ptr [edi + 0x28], ebx */
   3134     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x38017C11: mov byte ptr [ebp - 4], 2 */
   3135     RECOMP_ICALL(0x3801EAA0u); /* 0x38017C15: call 0x3801eaa0 */ /* not lifted */
   3136     RECOMP_FLAGS_IN();
   3137     ecx = edi + 0x2C; /* 0x38017C1A: lea ecx, [edi + 0x2c] */
   3138     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x38017C1D: mov byte ptr [ebp - 4], 1 */
   3139     RECOMP_ICALL(0x3801E660u); /* 0x38017C21: call 0x3801e660 */ /* not lifted */
   3140     RECOMP_FLAGS_IN();
   3141     ecx = edi; /* 0x38017C26: mov ecx, edi */
   3142     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(ecx);
   3143     _cf = (ecx) != 0;
   3144     ecx = (uint32_t)(-(int32_t)ecx); /* 0x38017C28: neg ecx */
   3145     _flag_k = FK_CMP;
   3146     { uint32_t _sa = ecx, _sb = ecx, _sc = _cf; /* 0x38017C2A: sbb ecx, ecx */
   3147       ecx = _sc ? 0xFFFFFFFFu : 0;
   3148       _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0;
   3149       _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; }
   3150     eax = edi + 0x20; /* 0x38017C2C: lea eax, [edi + 0x20] */
   3151     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   3152     ecx = ecx & eax; /* 0x38017C2F: and ecx, eax */
   3153     _cf = 0;
   3154     _flag_k = FK_TEST;
   3155     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x38017C31: mov byte ptr [ebp - 4], 0 */
   3156     RECOMP_ICALL(0x380428C0u); /* 0x38017C35: call 0x380428c0 */ /* not lifted */
   3157     RECOMP_FLAGS_IN();
   3158     ecx = edi; /* 0x38017C3A: mov ecx, edi */
   3159     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x38017C3C: mov dword ptr [ebp - 4], 0xffffffff */
   3160     RECOMP_ICALL(0x3801B550u); /* 0x38017C43: call 0x3801b550 */ /* not lifted */
   3161     RECOMP_FLAGS_IN();
   3162     ecx = MEM32(ebp + (-0xC)); /* 0x38017C48: mov ecx, dword ptr [ebp - 0xc] */
   3163     edi = POP32_VAL(esp); /* 0x38017C4B: pop edi */
   3164     esi = POP32_VAL(esp); /* 0x38017C4C: pop esi */
   3165     ebx = POP32_VAL(esp); /* 0x38017C4D: pop ebx */
   3166     MEM32(FS_BASE + (0)) = ecx; /* 0x38017C4E: mov dword ptr fs:[0], ecx */
   3167     esp = ebp; /* 0x38017C55: mov esp, ebp */
   3168     ebp = POP32_VAL(esp); /* 0x38017C57: pop ebp */
   3169     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017C58: ret  */
   3170     RECOMP_REGS_OUT();
   3171 }
   3172 
   3173 void sub_38017B50(void) {
   3174     int _fpu_cmp = 0;
   3175     uint32_t _cf = 0;
   3176     int _df = 1;
   3177     uint32_t _flag_k = FK_NONE;
   3178     uint32_t _flag_a = 0, _flag_b = 0;
   3179     uint32_t _itail_tgt = 0;
   3180     RECOMP_REGS_LOCALS
   3181     RECOMP_ENTER(0x38017B50u);
   3182 
   3183 L_38017B50:
   3184     eax = MEM32(esi + 0xC); /* 0x38017B50: mov eax, dword ptr [esi + 0xc] */
   3185     ecx = MEM32(esi + 0x8); /* 0x38017B53: mov ecx, dword ptr [esi + 8] */
   3186     /* cmp eax, ecx */ /* 0x38017B56: cmp eax, ecx */
   3187     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3188     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3189     _flag_k = FK_CMP;
   3190     ebx = MEM32(esi + 0x10); /* 0x38017B58: mov ebx, dword ptr [esi + 0x10] */
   3191     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017B8A; /* 0x38017B5B: je 0x38017b8a */
   3192 L_38017B5D:
   3193     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
   3194     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3195     eax = eax + 4; /* 0x38017B5D: add eax, 4 */
   3196     _flag_k = FK_ADD;
   3197     /* cmp eax, ecx */ /* 0x38017B60: cmp eax, ecx */
   3198     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3199     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3200     _flag_k = FK_CMP;
   3201     MEM32(esi + 0xC) = eax; /* 0x38017B62: mov dword ptr [esi + 0xc], eax */
   3202     if (CMP_NE(_flag_a, _flag_b)) goto L_38017B8A; /* 0x38017B65: jne 0x38017b8a */
   3203 L_38017B67:
   3204     eax = MEM32(esi + 0x10); /* 0x38017B67: mov eax, dword ptr [esi + 0x10] */
   3205     ecx = MEM32(eax + 0x4); /* 0x38017B6A: mov ecx, dword ptr [eax + 4] */
   3206     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
   3207     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3208     eax = eax + 4; /* 0x38017B6D: add eax, 4 */
   3209     _flag_k = FK_ADD;
   3210     /* test ecx, ecx */ /* 0x38017B70: test ecx, ecx */
   3211     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   3212     _cf = 0;
   3213     _flag_k = FK_TEST;
   3214     if (TEST_Z(_flag_a, _flag_b)) goto L_38017B8A; /* 0x38017B72: je 0x38017b8a */
   3215 L_38017B74:
   3216     MEM32(esi + 0x10) = eax; /* 0x38017B74: mov dword ptr [esi + 0x10], eax */
   3217     eax = MEM32(eax); /* 0x38017B77: mov eax, dword ptr [eax] */
   3218     MEM32(esi + 0x4) = eax; /* 0x38017B79: mov dword ptr [esi + 4], eax */
   3219     edx = MEM32(esi + 0x4); /* 0x38017B7C: mov edx, dword ptr [esi + 4] */
   3220     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x1000u);
   3221     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3222     eax = eax + 0x1000u; /* 0x38017B7F: add eax, 0x1000 */
   3223     _flag_k = FK_ADD;
   3224     MEM32(esi + 0x8) = eax; /* 0x38017B84: mov dword ptr [esi + 8], eax */
   3225     MEM32(esi + 0xC) = edx; /* 0x38017B87: mov dword ptr [esi + 0xc], edx */
   3226 L_38017B8A:
   3227     ecx = MEM32(esi + 0x2C); /* 0x38017B8A: mov ecx, dword ptr [esi + 0x2c] */
   3228     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   3229     ecx = ecx - 1; /* 0x38017B8D: dec ecx */
   3230     _flag_k = FK_DEC;
   3231     eax = ecx; /* 0x38017B8E: mov eax, ecx */
   3232     /* test eax, eax */ /* 0x38017B90: test eax, eax */
   3233     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3234     _cf = 0;
   3235     _flag_k = FK_TEST;
   3236     MEM32(esi + 0x2C) = ecx; /* 0x38017B92: mov dword ptr [esi + 0x2c], ecx */
   3237     if (TEST_NZ(_flag_a, _flag_b)) goto L_38017BA0; /* 0x38017B95: jne 0x38017ba0 */
   3238 L_38017B97:
   3239     ecx = esi; /* 0x38017B97: mov ecx, esi */
   3240     RECOMP_ICALL(0x380232A0u); /* 0x38017B99: call 0x380232a0 */ /* not lifted */
   3241     RECOMP_FLAGS_IN();
   3242     goto L_38017BB6; /* 0x38017B9E: jmp 0x38017bb6 */
   3243 L_38017BA0:
   3244     /* cmp ebx, MEM32(esi + 0x10) */ /* 0x38017BA0: cmp ebx, dword ptr [esi + 0x10] */
   3245     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x10));
   3246     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3247     _flag_k = FK_CMP;
   3248     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017BB6; /* 0x38017BA3: je 0x38017bb6 */
   3249 L_38017BA5:
   3250     eax = MEM32(ebx); /* 0x38017BA5: mov eax, dword ptr [ebx] */
   3251     PUSH32(esp, eax); /* 0x38017BA7: push eax */
   3252     RECOMP_ICALL(0x3804B4F6u); /* 0x38017BA8: call 0x3804b4f6 */ /* not lifted */
   3253     RECOMP_FLAGS_IN();
   3254     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3255     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3256     esp = esp + 4; /* 0x38017BAD: add esp, 4 */
   3257     _flag_k = FK_ADD;
   3258     MEM32(ebx) = 0; /* 0x38017BB0: mov dword ptr [ebx], 0 */
   3259 L_38017BB6:
   3260     eax = MEM32(esi + 0x2C); /* 0x38017BB6: mov eax, dword ptr [esi + 0x2c] */
   3261     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3262     ebx = 0; /* 0x38017BB9: xor ebx, ebx */
   3263     _cf = 0;
   3264     _flag_k = FK_TEST;
   3265     /* cmp eax, ebx */ /* 0x38017BBB: cmp eax, ebx */
   3266     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   3267     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3268     _flag_k = FK_CMP;
   3269     RECOMP_BACKEDGE();
   3270     if (CMP_NE(_flag_a, _flag_b)) goto L_38017B50; /* 0x38017BBD: jne 0x38017b50 */
   3271 L_38017BBF:
   3272     PUSH32(esp, esi); /* 0x38017BBF: push esi */
   3273     RECOMP_ICALL(0x3804B4F6u); /* 0x38017BC0: call 0x3804b4f6 */ /* not lifted */
   3274     RECOMP_FLAGS_IN();
   3275     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3276     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3277     esp = esp + 4; /* 0x38017BC5: add esp, 4 */
   3278     _flag_k = FK_ADD;
   3279     ecx = edi; /* 0x38017BC8: mov ecx, edi */
   3280     MEM32(edi + 0x84) = ebx; /* 0x38017BCA: mov dword ptr [edi + 0x84], ebx */
   3281     RECOMP_ICALL(0x38019D60u); /* 0x38017BD0: call 0x38019d60 */ /* not lifted */
   3282     RECOMP_FLAGS_IN();
   3283     ecx = MEM32(edi + 0x60); /* 0x38017BD5: mov ecx, dword ptr [edi + 0x60] */
   3284     /* cmp ecx, ebx */ /* 0x38017BD8: cmp ecx, ebx */
   3285     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   3286     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3287     _flag_k = FK_CMP;
   3288     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017BE3; /* 0x38017BDA: je 0x38017be3 */
   3289 L_38017BDC:
   3290     eax = MEM32(ecx); /* 0x38017BDC: mov eax, dword ptr [ecx] */
   3291     PUSH32(esp, 1); /* 0x38017BDE: push 1 */
   3292     RECOMP_ICALL(MEM32(eax + 0x18)); /* 0x38017BE0: call dword ptr [eax + 0x18] */
   3293     RECOMP_FLAGS_IN();
   3294 L_38017BE3:
   3295     esi = MEM32(edi + 0x28); /* 0x38017BE3: mov esi, dword ptr [edi + 0x28] */
   3296     /* cmp esi, ebx */ /* 0x38017BE6: cmp esi, ebx */
   3297     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   3298     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3299     _flag_k = FK_CMP;
   3300     MEM32(edi + 0x60) = ebx; /* 0x38017BE8: mov dword ptr [edi + 0x60], ebx */
   3301     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017C0B; /* 0x38017BEB: je 0x38017c0b */
   3302 L_38017BED:
   3303     eax = MEM32(esi + 0x4); /* 0x38017BED: mov eax, dword ptr [esi + 4] */
   3304     PUSH32(esp, eax); /* 0x38017BF0: push eax */
   3305     MEM32(ebp + (-0x24)) = eax; /* 0x38017BF1: mov dword ptr [ebp - 0x24], eax */
   3306     RECOMP_ICALL(0x3804B4F6u); /* 0x38017BF4: call 0x3804b4f6 */ /* not lifted */
   3307     RECOMP_FLAGS_IN();
   3308     PUSH32(esp, esi); /* 0x38017BF9: push esi */
   3309     MEM32(esi + 0x4) = ebx; /* 0x38017BFA: mov dword ptr [esi + 4], ebx */
   3310     MEM32(esi + 0x8) = ebx; /* 0x38017BFD: mov dword ptr [esi + 8], ebx */
   3311     MEM32(esi + 0xC) = ebx; /* 0x38017C00: mov dword ptr [esi + 0xc], ebx */
   3312     RECOMP_ICALL(0x3804B4F6u); /* 0x38017C03: call 0x3804b4f6 */ /* not lifted */
   3313     RECOMP_FLAGS_IN();
   3314     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3315     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3316     esp = esp + 8; /* 0x38017C08: add esp, 8 */
   3317     _flag_k = FK_ADD;
   3318 L_38017C0B:
   3319     ecx = edi + 0x34; /* 0x38017C0B: lea ecx, [edi + 0x34] */
   3320     MEM32(edi + 0x28) = ebx; /* 0x38017C0E: mov dword ptr [edi + 0x28], ebx */
   3321     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x38017C11: mov byte ptr [ebp - 4], 2 */
   3322     RECOMP_ICALL(0x3801EAA0u); /* 0x38017C15: call 0x3801eaa0 */ /* not lifted */
   3323     RECOMP_FLAGS_IN();
   3324     ecx = edi + 0x2C; /* 0x38017C1A: lea ecx, [edi + 0x2c] */
   3325     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x38017C1D: mov byte ptr [ebp - 4], 1 */
   3326     RECOMP_ICALL(0x3801E660u); /* 0x38017C21: call 0x3801e660 */ /* not lifted */
   3327     RECOMP_FLAGS_IN();
   3328     ecx = edi; /* 0x38017C26: mov ecx, edi */
   3329     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(ecx);
   3330     _cf = (ecx) != 0;
   3331     ecx = (uint32_t)(-(int32_t)ecx); /* 0x38017C28: neg ecx */
   3332     _flag_k = FK_CMP;
   3333     { uint32_t _sa = ecx, _sb = ecx, _sc = _cf; /* 0x38017C2A: sbb ecx, ecx */
   3334       ecx = _sc ? 0xFFFFFFFFu : 0;
   3335       _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0;
   3336       _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; }
   3337     eax = edi + 0x20; /* 0x38017C2C: lea eax, [edi + 0x20] */
   3338     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   3339     ecx = ecx & eax; /* 0x38017C2F: and ecx, eax */
   3340     _cf = 0;
   3341     _flag_k = FK_TEST;
   3342     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x38017C31: mov byte ptr [ebp - 4], 0 */
   3343     RECOMP_ICALL(0x380428C0u); /* 0x38017C35: call 0x380428c0 */ /* not lifted */
   3344     RECOMP_FLAGS_IN();
   3345     ecx = edi; /* 0x38017C3A: mov ecx, edi */
   3346     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x38017C3C: mov dword ptr [ebp - 4], 0xffffffff */
   3347     RECOMP_ICALL(0x3801B550u); /* 0x38017C43: call 0x3801b550 */ /* not lifted */
   3348     RECOMP_FLAGS_IN();
   3349     ecx = MEM32(ebp + (-0xC)); /* 0x38017C48: mov ecx, dword ptr [ebp - 0xc] */
   3350     edi = POP32_VAL(esp); /* 0x38017C4B: pop edi */
   3351     esi = POP32_VAL(esp); /* 0x38017C4C: pop esi */
   3352     ebx = POP32_VAL(esp); /* 0x38017C4D: pop ebx */
   3353     MEM32(FS_BASE + (0)) = ecx; /* 0x38017C4E: mov dword ptr fs:[0], ecx */
   3354     esp = ebp; /* 0x38017C55: mov esp, ebp */
   3355     ebp = POP32_VAL(esp); /* 0x38017C57: pop ebp */
   3356     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017C58: ret  */
   3357     RECOMP_REGS_OUT();
   3358 }
   3359 
   3360 void sub_38017BB6(void) {
   3361     int _fpu_cmp = 0;
   3362     uint32_t _cf = 0;
   3363     int _df = 1;
   3364     uint32_t _flag_k = FK_NONE;
   3365     uint32_t _flag_a = 0, _flag_b = 0;
   3366     uint32_t _itail_tgt = 0;
   3367     RECOMP_REGS_LOCALS
   3368     RECOMP_ENTER(0x38017BB6u);
   3369 
   3370     goto L_38017BB6;
   3371 L_38017B50:
   3372     eax = MEM32(esi + 0xC); /* 0x38017B50: mov eax, dword ptr [esi + 0xc] */
   3373     ecx = MEM32(esi + 0x8); /* 0x38017B53: mov ecx, dword ptr [esi + 8] */
   3374     /* cmp eax, ecx */ /* 0x38017B56: cmp eax, ecx */
   3375     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3376     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3377     _flag_k = FK_CMP;
   3378     ebx = MEM32(esi + 0x10); /* 0x38017B58: mov ebx, dword ptr [esi + 0x10] */
   3379     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017B8A; /* 0x38017B5B: je 0x38017b8a */
   3380 L_38017B5D:
   3381     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
   3382     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3383     eax = eax + 4; /* 0x38017B5D: add eax, 4 */
   3384     _flag_k = FK_ADD;
   3385     /* cmp eax, ecx */ /* 0x38017B60: cmp eax, ecx */
   3386     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3387     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3388     _flag_k = FK_CMP;
   3389     MEM32(esi + 0xC) = eax; /* 0x38017B62: mov dword ptr [esi + 0xc], eax */
   3390     if (CMP_NE(_flag_a, _flag_b)) goto L_38017B8A; /* 0x38017B65: jne 0x38017b8a */
   3391 L_38017B67:
   3392     eax = MEM32(esi + 0x10); /* 0x38017B67: mov eax, dword ptr [esi + 0x10] */
   3393     ecx = MEM32(eax + 0x4); /* 0x38017B6A: mov ecx, dword ptr [eax + 4] */
   3394     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
   3395     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3396     eax = eax + 4; /* 0x38017B6D: add eax, 4 */
   3397     _flag_k = FK_ADD;
   3398     /* test ecx, ecx */ /* 0x38017B70: test ecx, ecx */
   3399     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   3400     _cf = 0;
   3401     _flag_k = FK_TEST;
   3402     if (TEST_Z(_flag_a, _flag_b)) goto L_38017B8A; /* 0x38017B72: je 0x38017b8a */
   3403 L_38017B74:
   3404     MEM32(esi + 0x10) = eax; /* 0x38017B74: mov dword ptr [esi + 0x10], eax */
   3405     eax = MEM32(eax); /* 0x38017B77: mov eax, dword ptr [eax] */
   3406     MEM32(esi + 0x4) = eax; /* 0x38017B79: mov dword ptr [esi + 4], eax */
   3407     edx = MEM32(esi + 0x4); /* 0x38017B7C: mov edx, dword ptr [esi + 4] */
   3408     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x1000u);
   3409     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3410     eax = eax + 0x1000u; /* 0x38017B7F: add eax, 0x1000 */
   3411     _flag_k = FK_ADD;
   3412     MEM32(esi + 0x8) = eax; /* 0x38017B84: mov dword ptr [esi + 8], eax */
   3413     MEM32(esi + 0xC) = edx; /* 0x38017B87: mov dword ptr [esi + 0xc], edx */
   3414 L_38017B8A:
   3415     ecx = MEM32(esi + 0x2C); /* 0x38017B8A: mov ecx, dword ptr [esi + 0x2c] */
   3416     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   3417     ecx = ecx - 1; /* 0x38017B8D: dec ecx */
   3418     _flag_k = FK_DEC;
   3419     eax = ecx; /* 0x38017B8E: mov eax, ecx */
   3420     /* test eax, eax */ /* 0x38017B90: test eax, eax */
   3421     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3422     _cf = 0;
   3423     _flag_k = FK_TEST;
   3424     MEM32(esi + 0x2C) = ecx; /* 0x38017B92: mov dword ptr [esi + 0x2c], ecx */
   3425     if (TEST_NZ(_flag_a, _flag_b)) goto L_38017BA0; /* 0x38017B95: jne 0x38017ba0 */
   3426 L_38017B97:
   3427     ecx = esi; /* 0x38017B97: mov ecx, esi */
   3428     RECOMP_ICALL(0x380232A0u); /* 0x38017B99: call 0x380232a0 */ /* not lifted */
   3429     RECOMP_FLAGS_IN();
   3430     goto L_38017BB6; /* 0x38017B9E: jmp 0x38017bb6 */
   3431 L_38017BA0:
   3432     /* cmp ebx, MEM32(esi + 0x10) */ /* 0x38017BA0: cmp ebx, dword ptr [esi + 0x10] */
   3433     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x10));
   3434     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3435     _flag_k = FK_CMP;
   3436     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017BB6; /* 0x38017BA3: je 0x38017bb6 */
   3437 L_38017BA5:
   3438     eax = MEM32(ebx); /* 0x38017BA5: mov eax, dword ptr [ebx] */
   3439     PUSH32(esp, eax); /* 0x38017BA7: push eax */
   3440     RECOMP_ICALL(0x3804B4F6u); /* 0x38017BA8: call 0x3804b4f6 */ /* not lifted */
   3441     RECOMP_FLAGS_IN();
   3442     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3443     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3444     esp = esp + 4; /* 0x38017BAD: add esp, 4 */
   3445     _flag_k = FK_ADD;
   3446     MEM32(ebx) = 0; /* 0x38017BB0: mov dword ptr [ebx], 0 */
   3447 L_38017BB6:
   3448     eax = MEM32(esi + 0x2C); /* 0x38017BB6: mov eax, dword ptr [esi + 0x2c] */
   3449     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3450     ebx = 0; /* 0x38017BB9: xor ebx, ebx */
   3451     _cf = 0;
   3452     _flag_k = FK_TEST;
   3453     /* cmp eax, ebx */ /* 0x38017BBB: cmp eax, ebx */
   3454     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   3455     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3456     _flag_k = FK_CMP;
   3457     RECOMP_BACKEDGE();
   3458     if (CMP_NE(_flag_a, _flag_b)) goto L_38017B50; /* 0x38017BBD: jne 0x38017b50 */
   3459 L_38017BBF:
   3460     PUSH32(esp, esi); /* 0x38017BBF: push esi */
   3461     RECOMP_ICALL(0x3804B4F6u); /* 0x38017BC0: call 0x3804b4f6 */ /* not lifted */
   3462     RECOMP_FLAGS_IN();
   3463     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3464     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3465     esp = esp + 4; /* 0x38017BC5: add esp, 4 */
   3466     _flag_k = FK_ADD;
   3467     ecx = edi; /* 0x38017BC8: mov ecx, edi */
   3468     MEM32(edi + 0x84) = ebx; /* 0x38017BCA: mov dword ptr [edi + 0x84], ebx */
   3469     RECOMP_ICALL(0x38019D60u); /* 0x38017BD0: call 0x38019d60 */ /* not lifted */
   3470     RECOMP_FLAGS_IN();
   3471     ecx = MEM32(edi + 0x60); /* 0x38017BD5: mov ecx, dword ptr [edi + 0x60] */
   3472     /* cmp ecx, ebx */ /* 0x38017BD8: cmp ecx, ebx */
   3473     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   3474     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3475     _flag_k = FK_CMP;
   3476     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017BE3; /* 0x38017BDA: je 0x38017be3 */
   3477 L_38017BDC:
   3478     eax = MEM32(ecx); /* 0x38017BDC: mov eax, dword ptr [ecx] */
   3479     PUSH32(esp, 1); /* 0x38017BDE: push 1 */
   3480     RECOMP_ICALL(MEM32(eax + 0x18)); /* 0x38017BE0: call dword ptr [eax + 0x18] */
   3481     RECOMP_FLAGS_IN();
   3482 L_38017BE3:
   3483     esi = MEM32(edi + 0x28); /* 0x38017BE3: mov esi, dword ptr [edi + 0x28] */
   3484     /* cmp esi, ebx */ /* 0x38017BE6: cmp esi, ebx */
   3485     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   3486     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3487     _flag_k = FK_CMP;
   3488     MEM32(edi + 0x60) = ebx; /* 0x38017BE8: mov dword ptr [edi + 0x60], ebx */
   3489     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017C0B; /* 0x38017BEB: je 0x38017c0b */
   3490 L_38017BED:
   3491     eax = MEM32(esi + 0x4); /* 0x38017BED: mov eax, dword ptr [esi + 4] */
   3492     PUSH32(esp, eax); /* 0x38017BF0: push eax */
   3493     MEM32(ebp + (-0x24)) = eax; /* 0x38017BF1: mov dword ptr [ebp - 0x24], eax */
   3494     RECOMP_ICALL(0x3804B4F6u); /* 0x38017BF4: call 0x3804b4f6 */ /* not lifted */
   3495     RECOMP_FLAGS_IN();
   3496     PUSH32(esp, esi); /* 0x38017BF9: push esi */
   3497     MEM32(esi + 0x4) = ebx; /* 0x38017BFA: mov dword ptr [esi + 4], ebx */
   3498     MEM32(esi + 0x8) = ebx; /* 0x38017BFD: mov dword ptr [esi + 8], ebx */
   3499     MEM32(esi + 0xC) = ebx; /* 0x38017C00: mov dword ptr [esi + 0xc], ebx */
   3500     RECOMP_ICALL(0x3804B4F6u); /* 0x38017C03: call 0x3804b4f6 */ /* not lifted */
   3501     RECOMP_FLAGS_IN();
   3502     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3503     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3504     esp = esp + 8; /* 0x38017C08: add esp, 8 */
   3505     _flag_k = FK_ADD;
   3506 L_38017C0B:
   3507     ecx = edi + 0x34; /* 0x38017C0B: lea ecx, [edi + 0x34] */
   3508     MEM32(edi + 0x28) = ebx; /* 0x38017C0E: mov dword ptr [edi + 0x28], ebx */
   3509     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x38017C11: mov byte ptr [ebp - 4], 2 */
   3510     RECOMP_ICALL(0x3801EAA0u); /* 0x38017C15: call 0x3801eaa0 */ /* not lifted */
   3511     RECOMP_FLAGS_IN();
   3512     ecx = edi + 0x2C; /* 0x38017C1A: lea ecx, [edi + 0x2c] */
   3513     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x38017C1D: mov byte ptr [ebp - 4], 1 */
   3514     RECOMP_ICALL(0x3801E660u); /* 0x38017C21: call 0x3801e660 */ /* not lifted */
   3515     RECOMP_FLAGS_IN();
   3516     ecx = edi; /* 0x38017C26: mov ecx, edi */
   3517     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(ecx);
   3518     _cf = (ecx) != 0;
   3519     ecx = (uint32_t)(-(int32_t)ecx); /* 0x38017C28: neg ecx */
   3520     _flag_k = FK_CMP;
   3521     { uint32_t _sa = ecx, _sb = ecx, _sc = _cf; /* 0x38017C2A: sbb ecx, ecx */
   3522       ecx = _sc ? 0xFFFFFFFFu : 0;
   3523       _flag_a = recomp_flags_sbb(_sa, _sb, _sc); _flag_b = 0;
   3524       _flag_k = FK_EFLAGS; _cf = _flag_a & 1u; }
   3525     eax = edi + 0x20; /* 0x38017C2C: lea eax, [edi + 0x20] */
   3526     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   3527     ecx = ecx & eax; /* 0x38017C2F: and ecx, eax */
   3528     _cf = 0;
   3529     _flag_k = FK_TEST;
   3530     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x38017C31: mov byte ptr [ebp - 4], 0 */
   3531     RECOMP_ICALL(0x380428C0u); /* 0x38017C35: call 0x380428c0 */ /* not lifted */
   3532     RECOMP_FLAGS_IN();
   3533     ecx = edi; /* 0x38017C3A: mov ecx, edi */
   3534     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x38017C3C: mov dword ptr [ebp - 4], 0xffffffff */
   3535     RECOMP_ICALL(0x3801B550u); /* 0x38017C43: call 0x3801b550 */ /* not lifted */
   3536     RECOMP_FLAGS_IN();
   3537     ecx = MEM32(ebp + (-0xC)); /* 0x38017C48: mov ecx, dword ptr [ebp - 0xc] */
   3538     edi = POP32_VAL(esp); /* 0x38017C4B: pop edi */
   3539     esi = POP32_VAL(esp); /* 0x38017C4C: pop esi */
   3540     ebx = POP32_VAL(esp); /* 0x38017C4D: pop ebx */
   3541     MEM32(FS_BASE + (0)) = ecx; /* 0x38017C4E: mov dword ptr fs:[0], ecx */
   3542     esp = ebp; /* 0x38017C55: mov esp, ebp */
   3543     ebp = POP32_VAL(esp); /* 0x38017C57: pop ebp */
   3544     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017C58: ret  */
   3545     RECOMP_REGS_OUT();
   3546 }
   3547 
   3548 void sub_38017C60(void) {
   3549     int _fpu_cmp = 0;
   3550     uint32_t _cf = 0;
   3551     int _df = 1;
   3552     uint32_t _flag_k = FK_NONE;
   3553     uint32_t _flag_a = 0, _flag_b = 0;
   3554     uint32_t _itail_tgt = 0;
   3555     RECOMP_REGS_LOCALS
   3556     RECOMP_ENTER(0x38017C60u);
   3557 
   3558 L_38017C60:
   3559     SET_LO8(eax, MEM8(ecx + 0x83)); /* 0x38017C60: mov al, byte ptr [ecx + 0x83] */
   3560     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017C66: ret  */
   3561     RECOMP_REGS_OUT();
   3562 }
   3563 
   3564 void sub_38017C70(void) {
   3565     int _fpu_cmp = 0;
   3566     uint32_t _cf = 0;
   3567     int _df = 1;
   3568     uint32_t _flag_k = FK_NONE;
   3569     uint32_t _flag_a = 0, _flag_b = 0;
   3570     uint32_t _itail_tgt = 0;
   3571     RECOMP_REGS_LOCALS
   3572     RECOMP_ENTER(0x38017C70u);
   3573 
   3574 L_38017C70:
   3575     PUSH32(esp, ebp); /* 0x38017C70: push ebp */
   3576     ebp = esp; /* 0x38017C71: mov ebp, esp */
   3577     PUSH32(esp, 0xFFFFFFFFu); /* 0x38017C73: push -1 */
   3578     PUSH32(esp, 0x3804C0FBu); /* 0x38017C75: push 0x3804c0fb */
   3579     eax = MEM32(FS_BASE + (0)); /* 0x38017C7A: mov eax, dword ptr fs:[0] */
   3580     PUSH32(esp, eax); /* 0x38017C80: push eax */
   3581     MEM32(FS_BASE + (0)) = esp; /* 0x38017C81: mov dword ptr fs:[0], esp */
   3582     PUSH32(esp, ecx); /* 0x38017C88: push ecx */
   3583     PUSH32(esp, 0x13Cu); /* 0x38017C89: push 0x13c */
   3584     RECOMP_ICALL(0x3804B676u); /* 0x38017C8E: call 0x3804b676 */ /* not lifted */
   3585     RECOMP_FLAGS_IN();
   3586     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3587     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3588     esp = esp + 4; /* 0x38017C93: add esp, 4 */
   3589     _flag_k = FK_ADD;
   3590     MEM32(ebp + (-0x10)) = eax; /* 0x38017C96: mov dword ptr [ebp - 0x10], eax */
   3591     /* test eax, eax */ /* 0x38017C99: test eax, eax */
   3592     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3593     _cf = 0;
   3594     _flag_k = FK_TEST;
   3595     MEM32(ebp + (-0x4)) = 0; /* 0x38017C9B: mov dword ptr [ebp - 4], 0 */
   3596     if (TEST_Z(_flag_a, _flag_b)) goto L_38017CB9; /* 0x38017CA2: je 0x38017cb9 */
   3597 L_38017CA4:
   3598     ecx = eax; /* 0x38017CA4: mov ecx, eax */
   3599     RECOMP_ICALL(0x380141B0u); /* 0x38017CA6: call 0x380141b0 */ /* not lifted */
   3600     RECOMP_FLAGS_IN();
   3601     ecx = MEM32(ebp + (-0xC)); /* 0x38017CAB: mov ecx, dword ptr [ebp - 0xc] */
   3602     MEM32(FS_BASE + (0)) = ecx; /* 0x38017CAE: mov dword ptr fs:[0], ecx */
   3603     esp = ebp; /* 0x38017CB5: mov esp, ebp */
   3604     ebp = POP32_VAL(esp); /* 0x38017CB7: pop ebp */
   3605     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017CB8: ret  */
   3606 L_38017CB9:
   3607     ecx = MEM32(ebp + (-0xC)); /* 0x38017CB9: mov ecx, dword ptr [ebp - 0xc] */
   3608     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3609     eax = 0; /* 0x38017CBC: xor eax, eax */
   3610     _cf = 0;
   3611     _flag_k = FK_TEST;
   3612     MEM32(FS_BASE + (0)) = ecx; /* 0x38017CBE: mov dword ptr fs:[0], ecx */
   3613     esp = ebp; /* 0x38017CC5: mov esp, ebp */
   3614     ebp = POP32_VAL(esp); /* 0x38017CC7: pop ebp */
   3615     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017CC8: ret  */
   3616     RECOMP_REGS_OUT();
   3617 }
   3618 
   3619 void sub_38017CD0(void) {
   3620     int _fpu_cmp = 0;
   3621     uint32_t _cf = 0;
   3622     int _df = 1;
   3623     uint32_t _flag_k = FK_NONE;
   3624     uint32_t _flag_a = 0, _flag_b = 0;
   3625     uint32_t _itail_tgt = 0;
   3626     RECOMP_REGS_LOCALS
   3627     RECOMP_ENTER(0x38017CD0u);
   3628 
   3629 L_38017CD0:
   3630     PUSH32(esp, ebp); /* 0x38017CD0: push ebp */
   3631     ebp = esp; /* 0x38017CD1: mov ebp, esp */
   3632     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3633     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3634     esp = esp - 8; /* 0x38017CD3: sub esp, 8 */
   3635     _flag_k = FK_CMP;
   3636     PUSH32(esp, esi); /* 0x38017CD6: push esi */
   3637     esi = ecx; /* 0x38017CD7: mov esi, ecx */
   3638     ecx = MEM32(0x3806EC04); /* 0x38017CD9: mov ecx, dword ptr [0x3806ec04] */
   3639     eax = MEM32(ecx); /* 0x38017CDF: mov eax, dword ptr [ecx] */
   3640     edx = ebp + (-0x8); /* 0x38017CE1: lea edx, [ebp - 8] */
   3641     PUSH32(esp, edx); /* 0x38017CE4: push edx */
   3642     RECOMP_ICALL(MEM32(eax + 0x24)); /* 0x38017CE5: call dword ptr [eax + 0x24] */
   3643     RECOMP_FLAGS_IN();
   3644     ecx = MEM32(eax + 0x4); /* 0x38017CE8: mov ecx, dword ptr [eax + 4] */
   3645     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x38017CEB: cmp ecx, dword ptr [esi + 8] */
   3646     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   3647     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3648     _flag_k = FK_CMP;
   3649     if (CMP_NE(_flag_a, _flag_b)) goto L_38017CFE; /* 0x38017CEE: jne 0x38017cfe */
   3650 L_38017CF0:
   3651     edx = MEM32(eax); /* 0x38017CF0: mov edx, dword ptr [eax] */
   3652     /* cmp edx, MEM32(esi + 0x4) */ /* 0x38017CF2: cmp edx, dword ptr [esi + 4] */
   3653     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
   3654     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3655     _flag_k = FK_CMP;
   3656     if (CMP_NE(_flag_a, _flag_b)) goto L_38017CFE; /* 0x38017CF5: jne 0x38017cfe */
   3657 L_38017CF7:
   3658     SET_LO8(eax, 1); /* 0x38017CF7: mov al, 1 */
   3659     esi = POP32_VAL(esp); /* 0x38017CF9: pop esi */
   3660     esp = ebp; /* 0x38017CFA: mov esp, ebp */
   3661     ebp = POP32_VAL(esp); /* 0x38017CFC: pop ebp */
   3662     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017CFD: ret  */
   3663 L_38017CFE:
   3664     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
   3665     SET_LO8(eax, 0); /* 0x38017CFE: xor al, al */
   3666     _cf = 0;
   3667     _flag_k = FK_NARROW(FK_TEST, 24);
   3668     esi = POP32_VAL(esp); /* 0x38017D00: pop esi */
   3669     esp = ebp; /* 0x38017D01: mov esp, ebp */
   3670     ebp = POP32_VAL(esp); /* 0x38017D03: pop ebp */
   3671     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017D04: ret  */
   3672     RECOMP_REGS_OUT();
   3673 }
   3674 
   3675 void sub_38017D10(void) {
   3676     int _fpu_cmp = 0;
   3677     uint32_t _cf = 0;
   3678     int _df = 1;
   3679     uint32_t _flag_k = FK_NONE;
   3680     uint32_t _flag_a = 0, _flag_b = 0;
   3681     uint32_t _itail_tgt = 0;
   3682     RECOMP_REGS_LOCALS
   3683     RECOMP_ENTER(0x38017D10u);
   3684 
   3685 L_38017D10:
   3686     eax = MEM32(ecx + 0x64); /* 0x38017D10: mov eax, dword ptr [ecx + 0x64] */
   3687     ecx = MEM32(ecx + 0x60); /* 0x38017D13: mov ecx, dword ptr [ecx + 0x60] */
   3688     PUSH32(esp, eax); /* 0x38017D16: push eax */
   3689     RECOMP_ICALL(MEM32(0x3804E690)); /* 0x38017D17: call dword ptr [0x3804e690] */
   3690     RECOMP_FLAGS_IN();
   3691     SET_LO8(eax, 1); /* 0x38017D1D: mov al, 1 */
   3692     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017D1F: ret  */
   3693     RECOMP_REGS_OUT();
   3694 }
   3695 
   3696 void sub_38017D20(void) {
   3697     int _fpu_cmp = 0;
   3698     uint32_t _cf = 0;
   3699     int _df = 1;
   3700     uint32_t _flag_k = FK_NONE;
   3701     uint32_t _flag_a = 0, _flag_b = 0;
   3702     uint32_t _itail_tgt = 0;
   3703     RECOMP_REGS_LOCALS
   3704     RECOMP_ENTER(0x38017D20u);
   3705 
   3706 L_38017D20:
   3707     eax = MEM32(ecx); /* 0x38017D20: mov eax, dword ptr [ecx] */
   3708 L_38017D22:
   3709     { _itail_tgt = (uint32_t)(MEM32(eax + 0x2C)); goto _ljump; }
   3710     { RECOMP_REGS_OUT(); return; } /* end of function */
   3711   _ljump:
   3712     switch (_itail_tgt) {
   3713       case 0x38017D20u: goto L_38017D20;
   3714       case 0x38017D22u: goto L_38017D22;
   3715       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   3716     }
   3717     RECOMP_REGS_OUT();
   3718 }
   3719 
   3720 void sub_38017D30(void) {
   3721     int _fpu_cmp = 0;
   3722     uint32_t _cf = 0;
   3723     int _df = 1;
   3724     uint32_t _flag_k = FK_NONE;
   3725     uint32_t _flag_a = 0, _flag_b = 0;
   3726     uint32_t _itail_tgt = 0;
   3727     RECOMP_REGS_LOCALS
   3728     RECOMP_ENTER(0x38017D30u);
   3729 
   3730 L_38017D30:
   3731     PUSH32(esp, ebp); /* 0x38017D30: push ebp */
   3732     ebp = esp; /* 0x38017D31: mov ebp, esp */
   3733     eax = ecx; /* 0x38017D33: mov eax, ecx */
   3734     ecx = MEM32(ebp + 0x8); /* 0x38017D35: mov ecx, dword ptr [ebp + 8] */
   3735     eax = MEM32(eax + 0x60); /* 0x38017D38: mov eax, dword ptr [eax + 0x60] */
   3736     edx = MEM32(ecx); /* 0x38017D3B: mov edx, dword ptr [ecx] */
   3737     PUSH32(esp, eax); /* 0x38017D3D: push eax */
   3738     RECOMP_ICALL(MEM32(edx + 0xC)); /* 0x38017D3E: call dword ptr [edx + 0xc] */
   3739     RECOMP_FLAGS_IN();
   3740     ebp = POP32_VAL(esp); /* 0x38017D41: pop ebp */
   3741     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017D42: ret 4 */
   3742     RECOMP_REGS_OUT();
   3743 }
   3744 
   3745 void sub_38017D50(void) {
   3746     int _fpu_cmp = 0;
   3747     uint32_t _cf = 0;
   3748     int _df = 1;
   3749     uint32_t _flag_k = FK_NONE;
   3750     uint32_t _flag_a = 0, _flag_b = 0;
   3751     uint32_t _itail_tgt = 0;
   3752     RECOMP_REGS_LOCALS
   3753     RECOMP_ENTER(0x38017D50u);
   3754 
   3755 L_38017D50:
   3756     PUSH32(esp, ebp); /* 0x38017D50: push ebp */
   3757     ebp = esp; /* 0x38017D51: mov ebp, esp */
   3758     eax = ecx; /* 0x38017D53: mov eax, ecx */
   3759     ecx = MEM32(ebp + 0x8); /* 0x38017D55: mov ecx, dword ptr [ebp + 8] */
   3760     eax = MEM32(eax + 0x60); /* 0x38017D58: mov eax, dword ptr [eax + 0x60] */
   3761     edx = MEM32(ecx); /* 0x38017D5B: mov edx, dword ptr [ecx] */
   3762     PUSH32(esp, eax); /* 0x38017D5D: push eax */
   3763     RECOMP_ICALL(MEM32(edx + 0x14)); /* 0x38017D5E: call dword ptr [edx + 0x14] */
   3764     RECOMP_FLAGS_IN();
   3765     ebp = POP32_VAL(esp); /* 0x38017D61: pop ebp */
   3766     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017D62: ret 4 */
   3767     RECOMP_REGS_OUT();
   3768 }
   3769 
   3770 void sub_38017D70(void)
   3771 {
   3772     uint32_t _cf = 0, _flag_k = FK_NONE, _flag_a = 0, _flag_b = 0;
   3773     RECOMP_REGS_LOCALS
   3774     RECOMP_ENTER(0x38017D70u);
   3775 
   3776     /* n3Dynel_t::GetDynel uses a unique-key directory. Compare signed types,
   3777      * then unsigned instance IDs, and stop as soon as the identity matches. */
   3778     uint32_t key = MEM32(esp + 4);
   3779     int32_t type = MEM32(key);
   3780     uint32_t instance = MEM32(key + 4);
   3781     ecx = MEM32(0x3806C110);
   3782     uint32_t header = MEM32(ecx + 4), nil = MEM32(ecx + 8);
   3783     uint32_t node = MEM32(header + 4), lower = header;
   3784     while (node != nil) {
   3785         int32_t node_type = MEM32(node + 12);
   3786         uint32_t node_instance = MEM32(node + 16);
   3787         if (node_type < type || (node_type == type && node_instance < instance)) {
   3788             node = MEM32(node + 8);
   3789         } else {
   3790             lower = node;
   3791             if (node_type == type && node_instance == instance) break;
   3792             node = MEM32(node);
   3793         }
   3794         RECOMP_BACKEDGE();
   3795     }
   3796 
   3797     /* Preserve the guest function's live stack, volatile registers and flags. */
   3798     MEM32(esp + 4) = lower;
   3799     edx = lower == header ? nil : MEM32(lower + 12);
   3800     eax = 0;
   3801     if (lower != header && (int32_t)edx == type && MEM32(lower + 16) == instance) {
   3802         eax = MEM32(lower + 20);
   3803         _flag_k = FK_CMP; _flag_a = lower; _flag_b = header; _cf = lower < header;
   3804     } else {
   3805         _flag_k = FK_TEST;
   3806     }
   3807     esp += 4;
   3808     RECOMP_FLAGS_OUT();
   3809     RECOMP_REGS_OUT();
   3810 }
   3811 
   3812 void sub_38017DD0(void) {
   3813     int _fpu_cmp = 0;
   3814     uint32_t _cf = 0;
   3815     int _df = 1;
   3816     uint32_t _flag_k = FK_NONE;
   3817     uint32_t _flag_a = 0, _flag_b = 0;
   3818     uint32_t _itail_tgt = 0;
   3819     RECOMP_REGS_LOCALS
   3820     RECOMP_ENTER(0x38017DD0u);
   3821 
   3822 L_38017DD0:
   3823     PUSH32(esp, ebp); /* 0x38017DD0: push ebp */
   3824     ebp = esp; /* 0x38017DD1: mov ebp, esp */
   3825     PUSH32(esp, ecx); /* 0x38017DD3: push ecx */
   3826     PUSH32(esp, esi); /* 0x38017DD4: push esi */
   3827     esi = MEM32(0x3806C110); /* 0x38017DD5: mov esi, dword ptr [0x3806c110] */
   3828     PUSH32(esp, edi); /* 0x38017DDB: push edi */
   3829     edi = MEM32(ebp + 0x8); /* 0x38017DDC: mov edi, dword ptr [ebp + 8] */
   3830     PUSH32(esp, edi); /* 0x38017DDF: push edi */
   3831     ecx = esi; /* 0x38017DE0: mov ecx, esi */
   3832     RECOMP_ICALL(0x38040680u); /* 0x38017DE2: call 0x38040680 */ /* not lifted */
   3833     RECOMP_FLAGS_IN();
   3834     /* cmp eax, MEM32(esi + 0x4) */ /* 0x38017DE7: cmp eax, dword ptr [esi + 4] */
   3835     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(esi + 0x4));
   3836     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3837     _flag_k = FK_CMP;
   3838     MEM32(ebp + 0x8) = eax; /* 0x38017DEA: mov dword ptr [ebp + 8], eax */
   3839     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017E03; /* 0x38017DED: je 0x38017e03 */
   3840 L_38017DEF:
   3841     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu);
   3842     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3843     eax = eax + 0xCu; /* 0x38017DEF: add eax, 0xc */
   3844     _flag_k = FK_ADD;
   3845     PUSH32(esp, eax); /* 0x38017DF2: push eax */
   3846     ecx = edi; /* 0x38017DF3: mov ecx, edi */
   3847     RECOMP_ICALL(0x380179F0u); /* 0x38017DF5: call 0x380179f0 */ /* not lifted */
   3848     RECOMP_FLAGS_IN();
   3849     /* test LO8(eax), LO8(eax) */ /* 0x38017DFA: test al, al */
   3850     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   3851     _cf = 0;
   3852     _flag_k = FK_NARROW(FK_TEST, 24);
   3853     if (TEST_NZ(_flag_a, _flag_b)) goto L_38017E03; /* 0x38017DFC: jne 0x38017e03 */
   3854 L_38017DFE:
   3855     eax = ebp + 0x8; /* 0x38017DFE: lea eax, [ebp + 8] */
   3856     goto L_38017E0C; /* 0x38017E01: jmp 0x38017e0c */
   3857 L_38017E03:
   3858     eax = MEM32(esi + 0x4); /* 0x38017E03: mov eax, dword ptr [esi + 4] */
   3859     MEM32(ebp + (-0x4)) = eax; /* 0x38017E06: mov dword ptr [ebp - 4], eax */
   3860     eax = ebp + (-0x4); /* 0x38017E09: lea eax, [ebp - 4] */
   3861 L_38017E0C:
   3862     edx = MEM32(0x3806C110); /* 0x38017E0C: mov edx, dword ptr [0x3806c110] */
   3863     ecx = MEM32(eax); /* 0x38017E12: mov ecx, dword ptr [eax] */
   3864     esi = MEM32(edx + 0x4); /* 0x38017E14: mov esi, dword ptr [edx + 4] */
   3865     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3866     eax = 0; /* 0x38017E17: xor eax, eax */
   3867     _cf = 0;
   3868     _flag_k = FK_TEST;
   3869     edi = POP32_VAL(esp); /* 0x38017E19: pop edi */
   3870     /* cmp ecx, esi */ /* 0x38017E1A: cmp ecx, esi */
   3871     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi);
   3872     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3873     _flag_k = FK_CMP;
   3874     esi = POP32_VAL(esp); /* 0x38017E1C: pop esi */
   3875     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017E22; /* 0x38017E1D: je 0x38017e22 */
   3876 L_38017E1F:
   3877     eax = MEM32(ecx + 0x14); /* 0x38017E1F: mov eax, dword ptr [ecx + 0x14] */
   3878 L_38017E22:
   3879     esp = ebp; /* 0x38017E22: mov esp, ebp */
   3880     ebp = POP32_VAL(esp); /* 0x38017E24: pop ebp */
   3881     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017E25: ret  */
   3882     RECOMP_REGS_OUT();
   3883 }
   3884 
   3885 void sub_38017E30(void) {
   3886     int _fpu_cmp = 0;
   3887     uint32_t _cf = 0;
   3888     int _df = 1;
   3889     uint32_t _flag_k = FK_NONE;
   3890     uint32_t _flag_a = 0, _flag_b = 0;
   3891     uint32_t _itail_tgt = 0;
   3892     RECOMP_REGS_LOCALS
   3893     RECOMP_ENTER(0x38017E30u);
   3894 
   3895 L_38017E30:
   3896     PUSH32(esp, ebp); /* 0x38017E30: push ebp */
   3897     ebp = esp; /* 0x38017E31: mov ebp, esp */
   3898     PUSH32(esp, ecx); /* 0x38017E33: push ecx */
   3899     PUSH32(esp, esi); /* 0x38017E34: push esi */
   3900     esi = MEM32(0x3806C110); /* 0x38017E35: mov esi, dword ptr [0x3806c110] */
   3901     PUSH32(esp, edi); /* 0x38017E3B: push edi */
   3902     edi = MEM32(ebp + 0x8); /* 0x38017E3C: mov edi, dword ptr [ebp + 8] */
   3903     PUSH32(esp, edi); /* 0x38017E3F: push edi */
   3904     ecx = esi; /* 0x38017E40: mov ecx, esi */
   3905     RECOMP_ICALL(0x38040680u); /* 0x38017E42: call 0x38040680 */ /* not lifted */
   3906     RECOMP_FLAGS_IN();
   3907     esi = MEM32(esi + 0x4); /* 0x38017E47: mov esi, dword ptr [esi + 4] */
   3908     /* cmp eax, esi */ /* 0x38017E4A: cmp eax, esi */
   3909     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi);
   3910     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3911     _flag_k = FK_CMP;
   3912     MEM32(ebp + 0x8) = eax; /* 0x38017E4C: mov dword ptr [ebp + 8], eax */
   3913     if (CMP_EQ(_flag_a, _flag_b)) goto L_38017E73; /* 0x38017E4F: je 0x38017e73 */
   3914 L_38017E51:
   3915     ecx = MEM32(edi); /* 0x38017E51: mov ecx, dword ptr [edi] */
   3916     edx = MEM32(eax + 0xC); /* 0x38017E53: mov edx, dword ptr [eax + 0xc] */
   3917     /* cmp ecx, edx */ /* 0x38017E56: cmp ecx, edx */
   3918     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
   3919     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3920     _flag_k = FK_CMP;
   3921     if (CMP_NE(_flag_a, _flag_b)) goto L_38017E67; /* 0x38017E58: jne 0x38017e67 */
   3922 L_38017E5A:
   3923     edx = MEM32(eax + 0x10); /* 0x38017E5A: mov edx, dword ptr [eax + 0x10] */
   3924     ecx = MEM32(edi + 0x4); /* 0x38017E5D: mov ecx, dword ptr [edi + 4] */
   3925     /* cmp ecx, edx */ /* 0x38017E60: cmp ecx, edx */
   3926     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
   3927     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3928     _flag_k = FK_CMP;
   3929     SET_LO8(eax, (CMP_B(_flag_a, _flag_b)) ? 1 : 0); /* 0x38017E62: setb al */
   3930     goto L_38017E6A; /* 0x38017E65: jmp 0x38017e6a */
   3931 L_38017E67:
   3932     SET_LO8(eax, (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_L, _cf)) ? 1 : 0); /* 0x38017E67: setl al */
   3933 L_38017E6A:
   3934     /* test LO8(eax), LO8(eax) */ /* 0x38017E6A: test al, al */
   3935     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   3936     _cf = 0;
   3937     _flag_k = FK_NARROW(FK_TEST, 24);
   3938     if (TEST_NZ(_flag_a, _flag_b)) goto L_38017E73; /* 0x38017E6C: jne 0x38017e73 */
   3939 L_38017E6E:
   3940     eax = ebp + 0x8; /* 0x38017E6E: lea eax, [ebp + 8] */
   3941     goto L_38017E79; /* 0x38017E71: jmp 0x38017e79 */
   3942 L_38017E73:
   3943     MEM32(ebp + (-0x4)) = esi; /* 0x38017E73: mov dword ptr [ebp - 4], esi */
   3944     eax = ebp + (-0x4); /* 0x38017E76: lea eax, [ebp - 4] */
   3945 L_38017E79:
   3946     edx = MEM32(0x3806C110); /* 0x38017E79: mov edx, dword ptr [0x3806c110] */
   3947     eax = MEM32(eax); /* 0x38017E7F: mov eax, dword ptr [eax] */
   3948     /* cmp eax, MEM32(edx + 0x4) */ /* 0x38017E81: cmp eax, dword ptr [edx + 4] */
   3949     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4));
   3950     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3951     _flag_k = FK_CMP;
   3952     edi = POP32_VAL(esp); /* 0x38017E84: pop edi */
   3953     SET_LO8(eax, (CMP_NE(_flag_a, _flag_b)) ? 1 : 0); /* 0x38017E85: setne al */
   3954     esi = POP32_VAL(esp); /* 0x38017E88: pop esi */
   3955     esp = ebp; /* 0x38017E89: mov esp, ebp */
   3956     ebp = POP32_VAL(esp); /* 0x38017E8B: pop ebp */
   3957     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017E8C: ret  */
   3958     RECOMP_REGS_OUT();
   3959 }
   3960 
   3961 void sub_38017E90(void) {
   3962     int _fpu_cmp = 0;
   3963     uint32_t _cf = 0;
   3964     int _df = 1;
   3965     uint32_t _flag_k = FK_NONE;
   3966     uint32_t _flag_a = 0, _flag_b = 0;
   3967     uint32_t _itail_tgt = 0;
   3968     RECOMP_REGS_LOCALS
   3969     RECOMP_ENTER(0x38017E90u);
   3970 
   3971 L_38017E90:
   3972     eax = MEM32(ecx + 0x60); /* 0x38017E90: mov eax, dword ptr [ecx + 0x60] */
   3973     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x54u);
   3974     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3975     eax = eax + 0x54u; /* 0x38017E93: add eax, 0x54 */
   3976     _flag_k = FK_ADD;
   3977     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017E96: ret  */
   3978     RECOMP_REGS_OUT();
   3979 }
   3980 
   3981 void sub_38017EA0(void) {
   3982     int _fpu_cmp = 0;
   3983     uint32_t _cf = 0;
   3984     int _df = 1;
   3985     uint32_t _flag_k = FK_NONE;
   3986     uint32_t _flag_a = 0, _flag_b = 0;
   3987     uint32_t _itail_tgt = 0;
   3988     RECOMP_REGS_LOCALS
   3989     RECOMP_ENTER(0x38017EA0u);
   3990 
   3991 L_38017EA0:
   3992     PUSH32(esp, ebp); /* 0x38017EA0: push ebp */
   3993     ebp = esp; /* 0x38017EA1: mov ebp, esp */
   3994     eax = MEM32(ebp + 0x8); /* 0x38017EA3: mov eax, dword ptr [ebp + 8] */
   3995     ecx = MEM32(ecx + 0x60); /* 0x38017EA6: mov ecx, dword ptr [ecx + 0x60] */
   3996     PUSH32(esp, eax); /* 0x38017EA9: push eax */
   3997     RECOMP_ICALL(MEM32(0x3804E6F4)); /* 0x38017EAA: call dword ptr [0x3804e6f4] */
   3998     RECOMP_FLAGS_IN();
   3999     ebp = POP32_VAL(esp); /* 0x38017EB0: pop ebp */
   4000     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017EB1: ret 4 */
   4001     RECOMP_REGS_OUT();
   4002 }
   4003 
   4004 void sub_38017EC0(void) {
   4005     int _fpu_cmp = 0;
   4006     uint32_t _cf = 0;
   4007     int _df = 1;
   4008     uint32_t _flag_k = FK_NONE;
   4009     uint32_t _flag_a = 0, _flag_b = 0;
   4010     uint32_t _itail_tgt = 0;
   4011     RECOMP_REGS_LOCALS
   4012     RECOMP_ENTER(0x38017EC0u);
   4013 
   4014 L_38017EC0:
   4015     ecx = MEM32(ecx + 0x60); /* 0x38017EC0: mov ecx, dword ptr [ecx + 0x60] */
   4016 L_38017EC3:
   4017     /* test ecx, ecx */ /* 0x38017EC3: test ecx, ecx */
   4018     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   4019     _cf = 0;
   4020     _flag_k = FK_TEST;
   4021 L_38017EC5:
   4022     if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_38017ECD; /* 0x38017EC5: je 0x38017ecd */
   4023 L_38017EC7:
   4024     { _itail_tgt = (uint32_t)(MEM32(0x3804E6A4)); goto _ljump; }
   4025 L_38017ECD:
   4026     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38017ECD: ret  */
   4027   _ljump:
   4028     switch (_itail_tgt) {
   4029       case 0x38017EC0u: goto L_38017EC0;
   4030       case 0x38017EC3u: goto L_38017EC3;
   4031       case 0x38017EC5u: goto L_38017EC5;
   4032       case 0x38017EC7u: goto L_38017EC7;
   4033       case 0x38017ECDu: goto L_38017ECD;
   4034       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   4035     }
   4036     RECOMP_REGS_OUT();
   4037 }
   4038 
   4039 void sub_38017ED0(void) {
   4040     int _fpu_cmp = 0;
   4041     uint32_t _cf = 0;
   4042     int _df = 1;
   4043     uint32_t _flag_k = FK_NONE;
   4044     uint32_t _flag_a = 0, _flag_b = 0;
   4045     uint32_t _itail_tgt = 0;
   4046     RECOMP_REGS_LOCALS
   4047     RECOMP_ENTER(0x38017ED0u);
   4048 
   4049 L_38017ED0:
   4050     PUSH32(esp, ebp); /* 0x38017ED0: push ebp */
   4051     ebp = esp; /* 0x38017ED1: mov ebp, esp */
   4052     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   4053     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4054     esp = esp - 0x10u; /* 0x38017ED3: sub esp, 0x10 */
   4055     _flag_k = FK_CMP;
   4056     PUSH32(esp, esi); /* 0x38017ED6: push esi */
   4057     esi = ecx; /* 0x38017ED7: mov esi, ecx */
   4058     RECOMP_ICALL(0x38018E80u); /* 0x38017ED9: call 0x38018e80 */ /* not lifted */
   4059     RECOMP_FLAGS_IN();
   4060     /* test eax, eax */ /* 0x38017EDE: test eax, eax */
   4061     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4062     _cf = 0;
   4063     _flag_k = FK_TEST;
   4064     if (TEST_NZ(_flag_a, _flag_b)) goto L_38017F15; /* 0x38017EE0: jne 0x38017f15 */
   4065 L_38017EE2:
   4066     MEM32(ebp + (-0x10)) = eax; /* 0x38017EE2: mov dword ptr [ebp - 0x10], eax */
   4067     edx = MEM32(ebp + (-0x10)); /* 0x38017EE5: mov edx, dword ptr [ebp - 0x10] */
   4068     MEM32(ebp + (-0x8)) = eax; /* 0x38017EE8: mov dword ptr [ebp - 8], eax */
   4069     MEM32(ebp + (-0x4)) = eax; /* 0x38017EEB: mov dword ptr [ebp - 4], eax */
   4070     eax = MEM32(ebp + 0x8); /* 0x38017EEE: mov eax, dword ptr [ebp + 8] */
   4071     ecx = eax; /* 0x38017EF1: mov ecx, eax */
   4072     MEM32(ecx) = edx; /* 0x38017EF3: mov dword ptr [ecx], edx */
   4073     MEM32(ebp + (-0xC)) = 0x3F800000u; /* 0x38017EF5: mov dword ptr [ebp - 0xc], 0x3f800000 */
   4074     edx = MEM32(ebp + (-0xC)); /* 0x38017EFC: mov edx, dword ptr [ebp - 0xc] */
   4075     MEM32(ecx + 0x4) = edx; /* 0x38017EFF: mov dword ptr [ecx + 4], edx */
   4076     edx = MEM32(ebp + (-0x8)); /* 0x38017F02: mov edx, dword ptr [ebp - 8] */
   4077     MEM32(ecx + 0x8) = edx; /* 0x38017F05: mov dword ptr [ecx + 8], edx */
   4078     edx = MEM32(ebp + (-0x4)); /* 0x38017F08: mov edx, dword ptr [ebp - 4] */
   4079     MEM32(ecx + 0xC) = edx; /* 0x38017F0B: mov dword ptr [ecx + 0xc], edx */
   4080     esi = POP32_VAL(esp); /* 0x38017F0E: pop esi */
   4081     esp = ebp; /* 0x38017F0F: mov esp, ebp */
   4082     ebp = POP32_VAL(esp); /* 0x38017F11: pop ebp */
   4083     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017F12: ret 4 */
   4084 L_38017F15:
   4085     eax = ebp + (-0x10); /* 0x38017F15: lea eax, [ebp - 0x10] */
   4086     PUSH32(esp, eax); /* 0x38017F18: push eax */
   4087     ecx = esi; /* 0x38017F19: mov ecx, esi */
   4088     RECOMP_ICALL(0x38018E80u); /* 0x38017F1B: call 0x38018e80 */ /* not lifted */
   4089     RECOMP_FLAGS_IN();
   4090     ecx = eax; /* 0x38017F20: mov ecx, eax */
   4091     RECOMP_ICALL(0x38017FB0u); /* 0x38017F22: call 0x38017fb0 */ /* not lifted */
   4092     RECOMP_FLAGS_IN();
   4093     ecx = eax; /* 0x38017F27: mov ecx, eax */
   4094     esi = MEM32(ecx); /* 0x38017F29: mov esi, dword ptr [ecx] */
   4095     eax = MEM32(ebp + 0x8); /* 0x38017F2B: mov eax, dword ptr [ebp + 8] */
   4096     edx = eax; /* 0x38017F2E: mov edx, eax */
   4097     MEM32(edx) = esi; /* 0x38017F30: mov dword ptr [edx], esi */
   4098     esi = MEM32(ecx + 0x4); /* 0x38017F32: mov esi, dword ptr [ecx + 4] */
   4099     MEM32(edx + 0x4) = esi; /* 0x38017F35: mov dword ptr [edx + 4], esi */
   4100     esi = MEM32(ecx + 0x8); /* 0x38017F38: mov esi, dword ptr [ecx + 8] */
   4101     MEM32(edx + 0x8) = esi; /* 0x38017F3B: mov dword ptr [edx + 8], esi */
   4102     ecx = MEM32(ecx + 0xC); /* 0x38017F3E: mov ecx, dword ptr [ecx + 0xc] */
   4103     MEM32(edx + 0xC) = ecx; /* 0x38017F41: mov dword ptr [edx + 0xc], ecx */
   4104     esi = POP32_VAL(esp); /* 0x38017F44: pop esi */
   4105     esp = ebp; /* 0x38017F45: mov esp, ebp */
   4106     ebp = POP32_VAL(esp); /* 0x38017F47: pop ebp */
   4107     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017F48: ret 4 */
   4108     RECOMP_REGS_OUT();
   4109 }
   4110 
   4111 void sub_38017F50(void) {
   4112     int _fpu_cmp = 0;
   4113     uint32_t _cf = 0;
   4114     int _df = 1;
   4115     uint32_t _flag_k = FK_NONE;
   4116     uint32_t _flag_a = 0, _flag_b = 0;
   4117     uint32_t _itail_tgt = 0;
   4118     RECOMP_REGS_LOCALS
   4119     RECOMP_ENTER(0x38017F50u);
   4120 
   4121 L_38017F50:
   4122     ecx = MEM32(ecx + 0x60); /* 0x38017F50: mov ecx, dword ptr [ecx + 0x60] */
   4123 L_38017F53:
   4124     { _itail_tgt = (uint32_t)(MEM32(0x3804E6DC)); goto _ljump; }
   4125     { RECOMP_REGS_OUT(); return; } /* end of function */
   4126   _ljump:
   4127     switch (_itail_tgt) {
   4128       case 0x38017F50u: goto L_38017F50;
   4129       case 0x38017F53u: goto L_38017F53;
   4130       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   4131     }
   4132     RECOMP_REGS_OUT();
   4133 }
   4134 
   4135 void sub_38017F60(void) {
   4136     int _fpu_cmp = 0;
   4137     uint32_t _cf = 0;
   4138     int _df = 1;
   4139     uint32_t _flag_k = FK_NONE;
   4140     uint32_t _flag_a = 0, _flag_b = 0;
   4141     uint32_t _itail_tgt = 0;
   4142     RECOMP_REGS_LOCALS
   4143     RECOMP_ENTER(0x38017F60u);
   4144 
   4145 L_38017F60:
   4146     PUSH32(esp, ebp); /* 0x38017F60: push ebp */
   4147     ebp = esp; /* 0x38017F61: mov ebp, esp */
   4148     ecx = MEM32(ecx + 0x60); /* 0x38017F63: mov ecx, dword ptr [ecx + 0x60] */
   4149     PUSH32(esp, esi); /* 0x38017F66: push esi */
   4150     RECOMP_ICALL(MEM32(0x3804E6CC)); /* 0x38017F67: call dword ptr [0x3804e6cc] */
   4151     RECOMP_FLAGS_IN();
   4152     ecx = eax; /* 0x38017F6D: mov ecx, eax */
   4153     esi = MEM32(ecx); /* 0x38017F6F: mov esi, dword ptr [ecx] */
   4154     eax = MEM32(ebp + 0x8); /* 0x38017F71: mov eax, dword ptr [ebp + 8] */
   4155     edx = eax; /* 0x38017F74: mov edx, eax */
   4156     MEM32(edx) = esi; /* 0x38017F76: mov dword ptr [edx], esi */
   4157     esi = MEM32(ecx + 0x4); /* 0x38017F78: mov esi, dword ptr [ecx + 4] */
   4158     MEM32(edx + 0x4) = esi; /* 0x38017F7B: mov dword ptr [edx + 4], esi */
   4159     esi = MEM32(ecx + 0x8); /* 0x38017F7E: mov esi, dword ptr [ecx + 8] */
   4160     MEM32(edx + 0x8) = esi; /* 0x38017F81: mov dword ptr [edx + 8], esi */
   4161     ecx = MEM32(ecx + 0xC); /* 0x38017F84: mov ecx, dword ptr [ecx + 0xc] */
   4162     MEM32(edx + 0xC) = ecx; /* 0x38017F87: mov dword ptr [edx + 0xc], ecx */
   4163     esi = POP32_VAL(esp); /* 0x38017F8A: pop esi */
   4164     ebp = POP32_VAL(esp); /* 0x38017F8B: pop ebp */
   4165     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017F8C: ret 4 */
   4166     RECOMP_REGS_OUT();
   4167 }
   4168 
   4169 void sub_38017F90(void) {
   4170     int _fpu_cmp = 0;
   4171     uint32_t _cf = 0;
   4172     int _df = 1;
   4173     uint32_t _flag_k = FK_NONE;
   4174     uint32_t _flag_a = 0, _flag_b = 0;
   4175     uint32_t _itail_tgt = 0;
   4176     RECOMP_REGS_LOCALS
   4177     RECOMP_ENTER(0x38017F90u);
   4178 
   4179 L_38017F90:
   4180     PUSH32(esp, ebp); /* 0x38017F90: push ebp */
   4181     ebp = esp; /* 0x38017F91: mov ebp, esp */
   4182     eax = MEM32(ebp + 0x8); /* 0x38017F93: mov eax, dword ptr [ebp + 8] */
   4183     ecx = MEM32(ecx + 0x60); /* 0x38017F96: mov ecx, dword ptr [ecx + 0x60] */
   4184     PUSH32(esp, eax); /* 0x38017F99: push eax */
   4185     RECOMP_ICALL(MEM32(0x3804E6A8)); /* 0x38017F9A: call dword ptr [0x3804e6a8] */
   4186     RECOMP_FLAGS_IN();
   4187     ebp = POP32_VAL(esp); /* 0x38017FA0: pop ebp */
   4188     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017FA1: ret 4 */
   4189     RECOMP_REGS_OUT();
   4190 }
   4191 
   4192 void sub_38017FB0(void) {
   4193     int _fpu_cmp = 0;
   4194     uint32_t _cf = 0;
   4195     int _df = 1;
   4196     uint32_t _flag_k = FK_NONE;
   4197     uint32_t _flag_a = 0, _flag_b = 0;
   4198     uint32_t _itail_tgt = 0;
   4199     RECOMP_REGS_LOCALS
   4200     RECOMP_ENTER(0x38017FB0u);
   4201 
   4202 L_38017FB0:
   4203     PUSH32(esp, ebp); /* 0x38017FB0: push ebp */
   4204     ebp = esp; /* 0x38017FB1: mov ebp, esp */
   4205     ecx = MEM32(ecx + 0x60); /* 0x38017FB3: mov ecx, dword ptr [ecx + 0x60] */
   4206     PUSH32(esp, esi); /* 0x38017FB6: push esi */
   4207     RECOMP_ICALL(MEM32(0x3804E6F0)); /* 0x38017FB7: call dword ptr [0x3804e6f0] */
   4208     RECOMP_FLAGS_IN();
   4209     ecx = eax; /* 0x38017FBD: mov ecx, eax */
   4210     esi = MEM32(ecx); /* 0x38017FBF: mov esi, dword ptr [ecx] */
   4211     eax = MEM32(ebp + 0x8); /* 0x38017FC1: mov eax, dword ptr [ebp + 8] */
   4212     edx = eax; /* 0x38017FC4: mov edx, eax */
   4213     MEM32(edx) = esi; /* 0x38017FC6: mov dword ptr [edx], esi */
   4214     esi = MEM32(ecx + 0x4); /* 0x38017FC8: mov esi, dword ptr [ecx + 4] */
   4215     MEM32(edx + 0x4) = esi; /* 0x38017FCB: mov dword ptr [edx + 4], esi */
   4216     esi = MEM32(ecx + 0x8); /* 0x38017FCE: mov esi, dword ptr [ecx + 8] */
   4217     MEM32(edx + 0x8) = esi; /* 0x38017FD1: mov dword ptr [edx + 8], esi */
   4218     ecx = MEM32(ecx + 0xC); /* 0x38017FD4: mov ecx, dword ptr [ecx + 0xc] */
   4219     MEM32(edx + 0xC) = ecx; /* 0x38017FD7: mov dword ptr [edx + 0xc], ecx */
   4220     esi = POP32_VAL(esp); /* 0x38017FDA: pop esi */
   4221     ebp = POP32_VAL(esp); /* 0x38017FDB: pop ebp */
   4222     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x38017FDC: ret 4 */
   4223     RECOMP_REGS_OUT();
   4224 }
   4225 
   4226 void sub_38017FE0(void) {
   4227     int _fpu_cmp = 0;
   4228     uint32_t _cf = 0;
   4229     int _df = 1;
   4230     uint32_t _flag_k = FK_NONE;
   4231     uint32_t _flag_a = 0, _flag_b = 0;
   4232     uint32_t _itail_tgt = 0;
   4233     RECOMP_REGS_LOCALS
   4234     RECOMP_ENTER(0x38017FE0u);
   4235 
   4236 L_38017FE0:
   4237     PUSH32(esp, ebp); /* 0x38017FE0: push ebp */
   4238     ebp = esp; /* 0x38017FE1: mov ebp, esp */
   4239     eax = MEM32(ebp + 0xC); /* 0x38017FE3: mov eax, dword ptr [ebp + 0xc] */
   4240     edx = MEM32(ebp + 0x8); /* 0x38017FE6: mov edx, dword ptr [ebp + 8] */
   4241     ecx = MEM32(ecx + 0x60); /* 0x38017FE9: mov ecx, dword ptr [ecx + 0x60] */
   4242     PUSH32(esp, eax); /* 0x38017FEC: push eax */
   4243     PUSH32(esp, edx); /* 0x38017FED: push edx */
   4244     RECOMP_ICALL(MEM32(0x3804E6AC)); /* 0x38017FEE: call dword ptr [0x3804e6ac] */
   4245     RECOMP_FLAGS_IN();
   4246     ebp = POP32_VAL(esp); /* 0x38017FF4: pop ebp */
   4247     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x38017FF5: ret 8 */
   4248     RECOMP_REGS_OUT();
   4249 }
   4250 
   4251 void sub_38018000(void) {
   4252     int _fpu_cmp = 0;
   4253     uint32_t _cf = 0;
   4254     int _df = 1;
   4255     uint32_t _flag_k = FK_NONE;
   4256     uint32_t _flag_a = 0, _flag_b = 0;
   4257     uint32_t _itail_tgt = 0;
   4258     RECOMP_REGS_LOCALS
   4259     RECOMP_ENTER(0x38018000u);
   4260 
   4261 L_38018000:
   4262     PUSH32(esp, ebp); /* 0x38018000: push ebp */
   4263     ebp = esp; /* 0x38018001: mov ebp, esp */
   4264     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x60u);
   4265     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4266     esp = esp - 0x60u; /* 0x38018003: sub esp, 0x60 */
   4267     _flag_k = FK_CMP;
   4268     PUSH32(esp, ebx); /* 0x38018006: push ebx */
   4269     PUSH32(esp, esi); /* 0x38018007: push esi */
   4270     esi = MEM32(ebp + 0x18); /* 0x38018008: mov esi, dword ptr [ebp + 0x18] */
   4271     /* test esi, esi */ /* 0x3801800B: test esi, esi */
   4272     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   4273     _cf = 0;
   4274     _flag_k = FK_TEST;
   4275     PUSH32(esp, edi); /* 0x3801800D: push edi */
   4276     edi = ecx; /* 0x3801800E: mov edi, ecx */
   4277     if (TEST_NZ(_flag_a, _flag_b)) goto L_38018019; /* 0x38018010: jne 0x38018019 */
   4278 L_38018012:
   4279     RECOMP_ICALL(0x38017F50u); /* 0x38018012: call 0x38017f50 */ /* not lifted */
   4280     RECOMP_FLAGS_IN();
   4281     esi = eax; /* 0x38018017: mov esi, eax */
   4282 L_38018019:
   4283     eax = MEM32(ebp + 0x1C); /* 0x38018019: mov eax, dword ptr [ebp + 0x1c] */
   4284     /* test eax, eax */ /* 0x3801801C: test eax, eax */
   4285     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4286     _cf = 0;
   4287     _flag_k = FK_TEST;
   4288     if (TEST_NZ(_flag_a, _flag_b)) goto L_3801802B; /* 0x3801801E: jne 0x3801802b */
   4289 L_38018020:
   4290     eax = ebp + (-0x40); /* 0x38018020: lea eax, [ebp - 0x40] */
   4291     PUSH32(esp, eax); /* 0x38018023: push eax */
   4292     ecx = edi; /* 0x38018024: mov ecx, edi */
   4293     RECOMP_ICALL(0x38017FB0u); /* 0x38018026: call 0x38017fb0 */ /* not lifted */
   4294     RECOMP_FLAGS_IN();
   4295 L_3801802B:
   4296     ecx = eax; /* 0x3801802B: mov ecx, eax */
   4297     edi = MEM32(ecx); /* 0x3801802D: mov edi, dword ptr [ecx] */
   4298     ebx = MEM32(ecx + 0x4); /* 0x3801802F: mov ebx, dword ptr [ecx + 4] */
   4299     edx = MEM32(ecx + 0x8); /* 0x38018032: mov edx, dword ptr [ecx + 8] */
   4300     ecx = MEM32(ecx + 0xC); /* 0x38018035: mov ecx, dword ptr [ecx + 0xc] */
   4301     MEM32(ebp + (-0x58)) = edx; /* 0x38018038: mov dword ptr [ebp - 0x58], edx */
   4302     edx = MEM32(eax); /* 0x3801803B: mov edx, dword ptr [eax] */
   4303     MEM32(ebp + (-0x54)) = ecx; /* 0x3801803D: mov dword ptr [ebp - 0x54], ecx */
   4304     ecx = MEM32(eax + 0x4); /* 0x38018040: mov ecx, dword ptr [eax + 4] */
   4305     MEM32(ebp + (-0x50)) = edx; /* 0x38018043: mov dword ptr [ebp - 0x50], edx */
   4306     edx = MEM32(eax + 0x8); /* 0x38018046: mov edx, dword ptr [eax + 8] */
   4307     eax = MEM32(eax + 0xC); /* 0x38018049: mov eax, dword ptr [eax + 0xc] */
   4308     MEM32(ebp + (-0x44)) = eax; /* 0x3801804C: mov dword ptr [ebp - 0x44], eax */
   4309     fp_push(*(float*)&MEM32(ebp + (-0x44))); /* 0x3801804F: fld dword ptr [ebp - 0x44] */
   4310     _st[0] *= (double)*(float*)ADDR(ebp + (-0x44)); /* 0x38018052: fmul dword ptr [ebp - 0x44] */
   4311     MEM32(ebp + (-0x48)) = edx; /* 0x38018055: mov dword ptr [ebp - 0x48], edx */
   4312     fp_push(*(float*)&MEM32(ebp + (-0x48))); /* 0x38018058: fld dword ptr [ebp - 0x48] */
   4313     MEM32(ebp + (-0x4C)) = ecx; /* 0x3801805B: mov dword ptr [ebp - 0x4c], ecx */
   4314     _st[0] *= (double)*(float*)ADDR(ebp + (-0x48)); /* 0x3801805E: fmul dword ptr [ebp - 0x48] */
   4315     ecx = MEM32(ebp + 0x8); /* 0x38018061: mov ecx, dword ptr [ebp + 8] */
   4316     edx = MEM32(ecx); /* 0x38018064: mov edx, dword ptr [ecx] */
   4317     eax = MEM32(ecx + 0x4); /* 0x38018066: mov eax, dword ptr [ecx + 4] */
   4318     { double _v = fp_pop(); _st[0] += _v; } /* 0x38018069: faddp st(1) */
   4319     ecx = MEM32(ecx + 0x8); /* 0x3801806B: mov ecx, dword ptr [ecx + 8] */
   4320     fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3801806E: fld dword ptr [ebp - 0x4c] */
   4321     MEM32(ebp + (-0xC)) = edx; /* 0x38018071: mov dword ptr [ebp - 0xc], edx */
   4322     _st[0] *= (double)*(float*)ADDR(ebp + (-0x4C)); /* 0x38018074: fmul dword ptr [ebp - 0x4c] */
   4323     MEM32(ebp + (-0x8)) = eax; /* 0x38018077: mov dword ptr [ebp - 8], eax */
   4324     MEM32(ebp + (-0x4)) = ecx; /* 0x3801807A: mov dword ptr [ebp - 4], ecx */
   4325     MEM32(ebp + (-0x60)) = edi; /* 0x3801807D: mov dword ptr [ebp - 0x60], edi */
   4326     { double _v = fp_pop(); _st[0] += _v; } /* 0x38018080: faddp st(1) */
   4327     MEM32(ebp + (-0x5C)) = ebx; /* 0x38018082: mov dword ptr [ebp - 0x5c], ebx */
   4328     fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x38018085: fld dword ptr [ebp - 0x50] */
   4329     _st[0] *= (double)*(float*)ADDR(ebp + (-0x50)); /* 0x38018088: fmul dword ptr [ebp - 0x50] */
   4330     { double _v = fp_pop(); _st[0] += _v; } /* 0x3801808B: faddp st(1) */
   4331     _st[0] = (double)*(float*)ADDR(0x3804E8CC) / _st[0]; /* 0x3801808D: fdivr dword ptr [0x3804e8cc] */
   4332     fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x38018093: fld dword ptr [ebp - 0x50] */
   4333     _st[0] *= _st[1]; /* 0x38018096: fmul st(1) */
   4334     _st[0] = -_st[0]; /* 0x38018098: fchs  */
   4335     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x50)) = _v; } /* 0x3801809A: fstp dword ptr [ebp - 0x50] */
   4336     fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x3801809D: fld dword ptr [ebp - 0x4c] */
   4337     _st[0] *= _st[1]; /* 0x380180A0: fmul st(1) */
   4338     _st[0] = -_st[0]; /* 0x380180A2: fchs  */
   4339     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4C)) = _v; } /* 0x380180A4: fstp dword ptr [ebp - 0x4c] */
   4340     fp_push(*(float*)&MEM32(ebp + (-0x48))); /* 0x380180A7: fld dword ptr [ebp - 0x48] */
   4341     _st[0] *= _st[1]; /* 0x380180AA: fmul st(1) */
   4342     _st[0] = -_st[0]; /* 0x380180AC: fchs  */
   4343     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x48)) = _v; } /* 0x380180AE: fstp dword ptr [ebp - 0x48] */
   4344     fp_push(*(float*)&MEM32(ebp + (-0x44))); /* 0x380180B1: fld dword ptr [ebp - 0x44] */
   4345     _st[0] *= _st[1]; /* 0x380180B4: fmul st(1) */
   4346     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x44)) = _v; } /* 0x380180B6: fstp dword ptr [ebp - 0x44] */
   4347     { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x380180B9: fstp st(0) */
   4348     fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x380180BB: fld dword ptr [ebp - 0xc] */
   4349     _st[0] -= (double)*(float*)ADDR(esi); /* 0x380180BE: fsub dword ptr [esi] */
   4350     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x380180C0: fstp dword ptr [ebp - 0xc] */
   4351     edx = MEM32(ebp + (-0xC)); /* 0x380180C3: mov edx, dword ptr [ebp - 0xc] */
   4352     fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x380180C6: fld dword ptr [ebp - 8] */
   4353     MEM32(ebp + (-0x18)) = edx; /* 0x380180C9: mov dword ptr [ebp - 0x18], edx */
   4354     _st[0] -= (double)*(float*)ADDR(esi + 0x4); /* 0x380180CC: fsub dword ptr [esi + 4] */
   4355     edx = MEM32(ebp + (-0x4C)); /* 0x380180CF: mov edx, dword ptr [ebp - 0x4c] */
   4356     MEM32(ebp + (-0x2C)) = edx; /* 0x380180D2: mov dword ptr [ebp - 0x2c], edx */
   4357     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x380180D5: fstp dword ptr [ebp - 8] */
   4358     eax = MEM32(ebp + (-0x8)); /* 0x380180D8: mov eax, dword ptr [ebp - 8] */
   4359     fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x380180DB: fld dword ptr [ebp - 4] */
   4360     MEM32(ebp + (-0x14)) = eax; /* 0x380180DE: mov dword ptr [ebp - 0x14], eax */
   4361     _st[0] -= (double)*(float*)ADDR(esi + 0x8); /* 0x380180E1: fsub dword ptr [esi + 8] */
   4362     eax = MEM32(ebp + (-0x48)); /* 0x380180E4: mov eax, dword ptr [ebp - 0x48] */
   4363     esi = MEM32(ebp + (-0x50)); /* 0x380180E7: mov esi, dword ptr [ebp - 0x50] */
   4364     MEM32(ebp + (-0x30)) = esi; /* 0x380180EA: mov dword ptr [ebp - 0x30], esi */
   4365     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x380180ED: fstp dword ptr [ebp - 4] */
   4366     ecx = MEM32(ebp + (-0x4)); /* 0x380180F0: mov ecx, dword ptr [ebp - 4] */
   4367     MEM32(ebp + (-0x10)) = ecx; /* 0x380180F3: mov dword ptr [ebp - 0x10], ecx */
   4368     ecx = ebp + (-0x18); /* 0x380180F6: lea ecx, [ebp - 0x18] */
   4369     PUSH32(esp, ecx); /* 0x380180F9: push ecx */
   4370     ecx = ebp + (-0x30); /* 0x380180FA: lea ecx, [ebp - 0x30] */
   4371     MEM32(ebp + (-0x28)) = eax; /* 0x380180FD: mov dword ptr [ebp - 0x28], eax */
   4372     RECOMP_ICALL(MEM32(0x3804E4C8)); /* 0x38018100: call dword ptr [0x3804e4c8] */
   4373     RECOMP_FLAGS_IN();
   4374     edx = MEM32(eax); /* 0x38018106: mov edx, dword ptr [eax] */
   4375     MEM32(ebp + (-0xC)) = edx; /* 0x38018108: mov dword ptr [ebp - 0xc], edx */
   4376     ecx = MEM32(eax + 0x4); /* 0x3801810B: mov ecx, dword ptr [eax + 4] */
   4377     MEM32(ebp + (-0x8)) = ecx; /* 0x3801810E: mov dword ptr [ebp - 8], ecx */
   4378     edx = MEM32(eax + 0x8); /* 0x38018111: mov edx, dword ptr [eax + 8] */
   4379     ecx = MEM32(ebp + (-0x48)); /* 0x38018114: mov ecx, dword ptr [ebp - 0x48] */
   4380     eax = MEM32(ebp + (-0x4C)); /* 0x38018117: mov eax, dword ptr [ebp - 0x4c] */
   4381     MEM32(ebp + (-0x4)) = edx; /* 0x3801811A: mov dword ptr [ebp - 4], edx */
   4382     edx = ebp + (-0xC); /* 0x3801811D: lea edx, [ebp - 0xc] */
   4383     MEM32(ebp + (-0x34)) = ecx; /* 0x38018120: mov dword ptr [ebp - 0x34], ecx */
   4384     PUSH32(esp, edx); /* 0x38018123: push edx */
   4385     ecx = ebp + (-0x3C); /* 0x38018124: lea ecx, [ebp - 0x3c] */
   4386     MEM32(ebp + (-0x3C)) = esi; /* 0x38018127: mov dword ptr [ebp - 0x3c], esi */
   4387     MEM32(ebp + (-0x38)) = eax; /* 0x3801812A: mov dword ptr [ebp - 0x38], eax */
   4388     RECOMP_ICALL(MEM32(0x3804E4C8)); /* 0x3801812D: call dword ptr [0x3804e4c8] */
   4389     RECOMP_FLAGS_IN();
   4390     fp_push(*(float*)&MEM32(ebp + (-0x44))); /* 0x38018133: fld dword ptr [ebp - 0x44] */
   4391     ecx = MEM32(eax); /* 0x38018136: mov ecx, dword ptr [eax] */
   4392     _st[0] += _st[0]; /* 0x38018138: fadd st(0), st(0) */
   4393     MEM32(ebp + (-0x24)) = ecx; /* 0x3801813A: mov dword ptr [ebp - 0x24], ecx */
   4394     edx = MEM32(eax + 0x4); /* 0x3801813D: mov edx, dword ptr [eax + 4] */
   4395     MEM32(ebp + (-0x20)) = edx; /* 0x38018140: mov dword ptr [ebp - 0x20], edx */
   4396     eax = MEM32(eax + 0x8); /* 0x38018143: mov eax, dword ptr [eax + 8] */
   4397     PUSH32(esp, ecx); /* 0x38018146: push ecx */
   4398     ecx = ebp + (-0xC); /* 0x38018147: lea ecx, [ebp - 0xc] */
   4399     { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x3801814A: fstp dword ptr [esp] */
   4400     MEM32(ebp + (-0x1C)) = eax; /* 0x3801814D: mov dword ptr [ebp - 0x1c], eax */
   4401     RECOMP_ICALL(MEM32(0x3804E4D4)); /* 0x38018150: call dword ptr [0x3804e4d4] */
   4402     RECOMP_FLAGS_IN();
   4403     PUSH32(esp, 0x40000000u); /* 0x38018156: push 0x40000000 */
   4404     ecx = ebp + (-0x24); /* 0x3801815B: lea ecx, [ebp - 0x24] */
   4405     RECOMP_ICALL(MEM32(0x3804E4D4)); /* 0x3801815E: call dword ptr [0x3804e4d4] */
   4406     RECOMP_FLAGS_IN();
   4407     ecx = ebp + (-0xC); /* 0x38018164: lea ecx, [ebp - 0xc] */
   4408     PUSH32(esp, ecx); /* 0x38018167: push ecx */
   4409     ecx = ebp + (-0x18); /* 0x38018168: lea ecx, [ebp - 0x18] */
   4410     RECOMP_ICALL(MEM32(0x3804E4E8)); /* 0x3801816B: call dword ptr [0x3804e4e8] */
   4411     RECOMP_FLAGS_IN();
   4412     edx = ebp + (-0x24); /* 0x38018171: lea edx, [ebp - 0x24] */
   4413     PUSH32(esp, edx); /* 0x38018174: push edx */
   4414     ecx = ebp + (-0x18); /* 0x38018175: lea ecx, [ebp - 0x18] */
   4415     RECOMP_ICALL(MEM32(0x3804E4E8)); /* 0x38018178: call dword ptr [0x3804e4e8] */
   4416     RECOMP_FLAGS_IN();
   4417     fp_push(*(float*)&MEM32(ebp + (-0x60))); /* 0x3801817E: fld dword ptr [ebp - 0x60] */
   4418     _st[0] *= (double)*(float*)ADDR(ebp + (-0x60)); /* 0x38018181: fmul dword ptr [ebp - 0x60] */
   4419     ecx = MEM32(ebp + (-0x18)); /* 0x38018184: mov ecx, dword ptr [ebp - 0x18] */
   4420     fp_push(*(float*)&MEM32(ebp + (-0x5C))); /* 0x38018187: fld dword ptr [ebp - 0x5c] */
   4421     eax = MEM32(ebp + 0x10); /* 0x3801818A: mov eax, dword ptr [ebp + 0x10] */
   4422     _st[0] *= (double)*(float*)ADDR(ebp + (-0x5C)); /* 0x3801818D: fmul dword ptr [ebp - 0x5c] */
   4423     edx = MEM32(ebp + (-0x14)); /* 0x38018190: mov edx, dword ptr [ebp - 0x14] */
   4424     MEM32(eax) = ecx; /* 0x38018193: mov dword ptr [eax], ecx */
   4425     ecx = MEM32(ebp + (-0x10)); /* 0x38018195: mov ecx, dword ptr [ebp - 0x10] */
   4426     { double _v = fp_pop(); _st[0] += _v; } /* 0x38018198: faddp st(1) */
   4427     MEM32(ebp + (-0x50)) = edi; /* 0x3801819A: mov dword ptr [ebp - 0x50], edi */
   4428     fp_push(*(float*)&MEM32(ebp + (-0x58))); /* 0x3801819D: fld dword ptr [ebp - 0x58] */
   4429     MEM32(ebp + (-0x4C)) = ebx; /* 0x380181A0: mov dword ptr [ebp - 0x4c], ebx */
   4430     _st[0] *= (double)*(float*)ADDR(ebp + (-0x58)); /* 0x380181A3: fmul dword ptr [ebp - 0x58] */
   4431     MEM32(eax + 0x4) = edx; /* 0x380181A6: mov dword ptr [eax + 4], edx */
   4432     edx = MEM32(ebp + (-0x58)); /* 0x380181A9: mov edx, dword ptr [ebp - 0x58] */
   4433     MEM32(ebp + (-0x48)) = edx; /* 0x380181AC: mov dword ptr [ebp - 0x48], edx */
   4434     { double _v = fp_pop(); _st[0] += _v; } /* 0x380181AF: faddp st(1) */
   4435     MEM32(eax + 0x8) = ecx; /* 0x380181B1: mov dword ptr [eax + 8], ecx */
   4436     fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x380181B4: fld dword ptr [ebp - 0x54] */
   4437     eax = MEM32(ebp + (-0x54)); /* 0x380181B7: mov eax, dword ptr [ebp - 0x54] */
   4438     _st[0] *= (double)*(float*)ADDR(ebp + (-0x54)); /* 0x380181BA: fmul dword ptr [ebp - 0x54] */
   4439     MEM32(ebp + (-0x44)) = eax; /* 0x380181BD: mov dword ptr [ebp - 0x44], eax */
   4440     { double _v = fp_pop(); _st[0] += _v; } /* 0x380181C0: faddp st(1) */
   4441     _st[0] = (double)*(float*)ADDR(0x3804E8CC) / _st[0]; /* 0x380181C2: fdivr dword ptr [0x3804e8cc] */
   4442     fp_push(*(float*)&MEM32(ebp + (-0x60))); /* 0x380181C8: fld dword ptr [ebp - 0x60] */
   4443     _st[0] *= _st[1]; /* 0x380181CB: fmul st(1) */
   4444     _st[0] = -_st[0]; /* 0x380181CD: fchs  */
   4445     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x50)) = _v; } /* 0x380181CF: fstp dword ptr [ebp - 0x50] */
   4446     ecx = MEM32(ebp + (-0x50)); /* 0x380181D2: mov ecx, dword ptr [ebp - 0x50] */
   4447     fp_push(*(float*)&MEM32(ebp + (-0x4C))); /* 0x380181D5: fld dword ptr [ebp - 0x4c] */
   4448     MEM32(ebp + (-0x60)) = ecx; /* 0x380181D8: mov dword ptr [ebp - 0x60], ecx */
   4449     _st[0] *= _st[1]; /* 0x380181DB: fmul st(1) */
   4450     _st[0] = -_st[0]; /* 0x380181DD: fchs  */
   4451     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4C)) = _v; } /* 0x380181DF: fstp dword ptr [ebp - 0x4c] */
   4452     edx = MEM32(ebp + (-0x4C)); /* 0x380181E2: mov edx, dword ptr [ebp - 0x4c] */
   4453     fp_push(*(float*)&MEM32(ebp + (-0x48))); /* 0x380181E5: fld dword ptr [ebp - 0x48] */
   4454     MEM32(ebp + (-0x5C)) = edx; /* 0x380181E8: mov dword ptr [ebp - 0x5c], edx */
   4455     _st[0] *= _st[1]; /* 0x380181EB: fmul st(1) */
   4456     _st[0] = -_st[0]; /* 0x380181ED: fchs  */
   4457     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x48)) = _v; } /* 0x380181EF: fstp dword ptr [ebp - 0x48] */
   4458     eax = MEM32(ebp + (-0x48)); /* 0x380181F2: mov eax, dword ptr [ebp - 0x48] */
   4459     fp_push(*(float*)&MEM32(ebp + (-0x44))); /* 0x380181F5: fld dword ptr [ebp - 0x44] */
   4460     MEM32(ebp + (-0x58)) = eax; /* 0x380181F8: mov dword ptr [ebp - 0x58], eax */
   4461     _st[0] *= _st[1]; /* 0x380181FB: fmul st(1) */
   4462     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x44)) = _v; } /* 0x380181FD: fstp dword ptr [ebp - 0x44] */
   4463     { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x38018200: fstp st(0) */
   4464     ecx = MEM32(ebp + (-0x44)); /* 0x38018202: mov ecx, dword ptr [ebp - 0x44] */
   4465     edx = MEM32(ebp + 0xC); /* 0x38018205: mov edx, dword ptr [ebp + 0xc] */
   4466     MEM32(ebp + (-0x54)) = ecx; /* 0x38018208: mov dword ptr [ebp - 0x54], ecx */
   4467     PUSH32(esp, edx); /* 0x3801820B: push edx */
   4468     ecx = ebp + (-0x60); /* 0x3801820C: lea ecx, [ebp - 0x60] */
   4469     RECOMP_ICALL(MEM32(0x3804E514)); /* 0x3801820F: call dword ptr [0x3804e514] */
   4470     RECOMP_FLAGS_IN();
   4471     edx = MEM32(eax); /* 0x38018215: mov edx, dword ptr [eax] */
   4472     ecx = MEM32(ebp + 0x14); /* 0x38018217: mov ecx, dword ptr [ebp + 0x14] */
   4473     MEM32(ecx) = edx; /* 0x3801821A: mov dword ptr [ecx], edx */
   4474     edx = MEM32(eax + 0x4); /* 0x3801821C: mov edx, dword ptr [eax + 4] */
   4475     MEM32(ecx + 0x4) = edx; /* 0x3801821F: mov dword ptr [ecx + 4], edx */
   4476     edx = MEM32(eax + 0x8); /* 0x38018222: mov edx, dword ptr [eax + 8] */
   4477     edi = POP32_VAL(esp); /* 0x38018225: pop edi */
   4478     MEM32(ecx + 0x8) = edx; /* 0x38018226: mov dword ptr [ecx + 8], edx */
   4479     eax = MEM32(eax + 0xC); /* 0x38018229: mov eax, dword ptr [eax + 0xc] */
   4480     esi = POP32_VAL(esp); /* 0x3801822C: pop esi */
   4481     MEM32(ecx + 0xC) = eax; /* 0x3801822D: mov dword ptr [ecx + 0xc], eax */
   4482     ebx = POP32_VAL(esp); /* 0x38018230: pop ebx */
   4483     esp = ebp; /* 0x38018231: mov esp, ebp */
   4484     ebp = POP32_VAL(esp); /* 0x38018233: pop ebp */
   4485     RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x38018234: ret 0x18 */
   4486     RECOMP_REGS_OUT();
   4487 }
   4488 
   4489 void sub_38018240(void) {
   4490     int _fpu_cmp = 0;
   4491     uint32_t _cf = 0;
   4492     int _df = 1;
   4493     uint32_t _flag_k = FK_NONE;
   4494     uint32_t _flag_a = 0, _flag_b = 0;
   4495     uint32_t _itail_tgt = 0;
   4496     RECOMP_REGS_LOCALS
   4497     RECOMP_ENTER(0x38018240u);
   4498 
   4499 L_38018240:
   4500     fp_push(*(float*)&MEM32(ecx + 0x68)); /* 0x38018240: fld dword ptr [ecx + 0x68] */
   4501     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38018243: ret  */
   4502     RECOMP_REGS_OUT();
   4503 }
   4504 
   4505 void sub_38018250(void) {
   4506     int _fpu_cmp = 0;
   4507     uint32_t _cf = 0;
   4508     int _df = 1;
   4509     uint32_t _flag_k = FK_NONE;
   4510     uint32_t _flag_a = 0, _flag_b = 0;
   4511     uint32_t _itail_tgt = 0;
   4512     RECOMP_REGS_LOCALS
   4513     RECOMP_ENTER(0x38018250u);
   4514 
   4515 L_38018250:
   4516     RECOMP_ICALL(0x38018E70u); /* 0x38018250: call 0x38018e70 */ /* not lifted */
   4517     RECOMP_FLAGS_IN();
   4518     ecx = eax; /* 0x38018255: mov ecx, eax */
   4519     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4520     eax = 0; /* 0x38018257: xor eax, eax */
   4521     _cf = 0;
   4522     _flag_k = FK_TEST;
   4523     /* test ecx, ecx */ /* 0x38018259: test ecx, ecx */
   4524     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   4525     _cf = 0;
   4526     _flag_k = FK_TEST;
   4527     if (TEST_Z(_flag_a, _flag_b)) goto L_38018262; /* 0x3801825B: je 0x38018262 */
   4528 L_3801825D:
   4529     goto L_38029DF0; /* 0x3801825D: jmp 0x38029df0 */
   4530 L_38018262:
   4531     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38018262: ret  */
   4532 L_38029DF0:
   4533     PUSH32(esp, esi); /* 0x38029DF0: push esi */
   4534     esi = ecx; /* 0x38029DF1: mov esi, ecx */
   4535     eax = MEM32(esi + 0x60); /* 0x38029DF3: mov eax, dword ptr [esi + 0x60] */
   4536     /* test eax, eax */ /* 0x38029DF6: test eax, eax */
   4537     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4538     _cf = 0;
   4539     _flag_k = FK_TEST;
   4540     if (TEST_NZ(_flag_a, _flag_b)) goto L_38029DFF; /* 0x38029DF8: jne 0x38029dff */
   4541 L_38029DFA:
   4542     RECOMP_ICALL(0x38029E80u); /* 0x38029DFA: call 0x38029e80 */ /* not lifted */
   4543     RECOMP_FLAGS_IN();
   4544 L_38029DFF:
   4545     eax = MEM32(esi + 0x60); /* 0x38029DFF: mov eax, dword ptr [esi + 0x60] */
   4546     esi = POP32_VAL(esp); /* 0x38029E02: pop esi */
   4547     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38029E03: ret  */
   4548     RECOMP_REGS_OUT();
   4549 }
   4550 
   4551 void sub_38018270(void) {
   4552     int _fpu_cmp = 0;
   4553     uint32_t _cf = 0;
   4554     int _df = 1;
   4555     uint32_t _flag_k = FK_NONE;
   4556     uint32_t _flag_a = 0, _flag_b = 0;
   4557     uint32_t _itail_tgt = 0;
   4558     RECOMP_REGS_LOCALS
   4559     RECOMP_ENTER(0x38018270u);
   4560 
   4561 L_38018270:
   4562     PUSH32(esp, ebp); /* 0x38018270: push ebp */
   4563     ebp = esp; /* 0x38018271: mov ebp, esp */
   4564     PUSH32(esp, ecx); /* 0x38018273: push ecx */
   4565     ecx = MEM32(ecx + 0x28); /* 0x38018274: mov ecx, dword ptr [ecx + 0x28] */
   4566     eax = MEM32(ecx + 0x4); /* 0x38018277: mov eax, dword ptr [ecx + 4] */
   4567     /* test eax, eax */ /* 0x3801827A: test eax, eax */
   4568     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4569     _cf = 0;
   4570     _flag_k = FK_TEST;
   4571     MEM32(ebp + (-0x4)) = ecx; /* 0x3801827C: mov dword ptr [ebp - 4], ecx */
   4572     if (TEST_Z(_flag_a, _flag_b)) goto L_380182CC; /* 0x3801827F: je 0x380182cc */
   4573 L_38018281:
   4574     edx = MEM32(ecx + 0x8); /* 0x38018281: mov edx, dword ptr [ecx + 8] */
   4575     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   4576     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4577     edx = edx - eax; /* 0x38018284: sub edx, eax */
   4578     _flag_k = FK_CMP;
   4579     eax = 0x66666667u; /* 0x38018286: mov eax, 0x66666667 */
   4580     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x3801828B: imul edx */
   4581       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   4582       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   4583     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3801828D: sar edx, 3 */
   4584     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4585     edx = (uint32_t)((int32_t)edx >> 3u);
   4586     eax = edx; /* 0x38018290: mov eax, edx */
   4587     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x38018292: shr eax, 0x1f */
   4588     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4589     eax = eax >> 31u; /* 0x38018292: shr eax, 0x1f */
   4590     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   4591     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4592     edx = edx + eax; /* 0x38018295: add edx, eax */
   4593     _flag_k = FK_ADD;
   4594     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_380182CC; /* 0x38018297: je 0x380182cc */
   4595 L_38018299:
   4596     edx = MEM32(ecx + 0x4); /* 0x38018299: mov edx, dword ptr [ecx + 4] */
   4597     PUSH32(esp, ebx); /* 0x3801829C: push ebx */
   4598     ebx = MEM32(ecx + 0x8); /* 0x3801829D: mov ebx, dword ptr [ecx + 8] */
   4599     eax = ebx; /* 0x380182A0: mov eax, ebx */
   4600     /* cmp eax, ebx */ /* 0x380182A2: cmp eax, ebx */
   4601     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   4602     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4603     _flag_k = FK_CMP;
   4604     if (CMP_EQ(_flag_a, _flag_b)) goto L_380182C2; /* 0x380182A4: je 0x380182c2 */
   4605 L_380182A6:
   4606     PUSH32(esp, esi); /* 0x380182A6: push esi */
   4607     PUSH32(esp, edi); /* 0x380182A7: push edi */
   4608 L_380182A8:
   4609     esi = eax; /* 0x380182A8: mov esi, eax */
   4610     edi = edx; /* 0x380182AA: mov edi, edx */
   4611     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x14u);
   4612     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4613     eax = eax + 0x14u; /* 0x380182AC: add eax, 0x14 */
   4614     _flag_k = FK_ADD;
   4615     ecx = 5; /* 0x380182AF: mov ecx, 5 */
   4616     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x14u);
   4617     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4618     edx = edx + 0x14u; /* 0x380182B4: add edx, 0x14 */
   4619     _flag_k = FK_ADD;
   4620     /* cmp eax, ebx */ /* 0x380182B7: cmp eax, ebx */
   4621     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   4622     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4623     _flag_k = FK_CMP;
   4624     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x380182B9: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   4625     RECOMP_BACKEDGE();
   4626     if (CMP_NE(_flag_a, _flag_b)) goto L_380182A8; /* 0x380182BB: jne 0x380182a8 */
   4627 L_380182BD:
   4628     ecx = MEM32(ebp + (-0x4)); /* 0x380182BD: mov ecx, dword ptr [ebp - 4] */
   4629     edi = POP32_VAL(esp); /* 0x380182C0: pop edi */
   4630     esi = POP32_VAL(esp); /* 0x380182C1: pop esi */
   4631 L_380182C2:
   4632     eax = MEM32(ecx + 0x8); /* 0x380182C2: mov eax, dword ptr [ecx + 8] */
   4633     MEM32(ebp + (-0x4)) = eax; /* 0x380182C5: mov dword ptr [ebp - 4], eax */
   4634     MEM32(ecx + 0x8) = edx; /* 0x380182C8: mov dword ptr [ecx + 8], edx */
   4635     ebx = POP32_VAL(esp); /* 0x380182CB: pop ebx */
   4636 L_380182CC:
   4637     esp = ebp; /* 0x380182CC: mov esp, ebp */
   4638     ebp = POP32_VAL(esp); /* 0x380182CE: pop ebp */
   4639     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380182CF: ret  */
   4640     RECOMP_REGS_OUT();
   4641 }
   4642 
   4643 void sub_380182D0(void) {
   4644     int _fpu_cmp = 0;
   4645     uint32_t _cf = 0;
   4646     int _df = 1;
   4647     uint32_t _flag_k = FK_NONE;
   4648     uint32_t _flag_a = 0, _flag_b = 0;
   4649     uint32_t _itail_tgt = 0;
   4650     RECOMP_REGS_LOCALS
   4651     RECOMP_ENTER(0x380182D0u);
   4652 
   4653 L_380182D0:
   4654     eax = MEM32(ecx + 0x28); /* 0x380182D0: mov eax, dword ptr [ecx + 0x28] */
   4655     edx = MEM32(eax + 0x4); /* 0x380182D3: mov edx, dword ptr [eax + 4] */
   4656     /* test edx, edx */ /* 0x380182D6: test edx, edx */
   4657     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx);
   4658     _cf = 0;
   4659     _flag_k = FK_TEST;
   4660     if (TEST_NZ(_flag_a, _flag_b)) goto L_380182E0; /* 0x380182D8: jne 0x380182e0 */
   4661 L_380182DA:
   4662     /* test edx, edx */ /* 0x380182DA: test edx, edx */
   4663     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx);
   4664     _cf = 0;
   4665     _flag_k = FK_TEST;
   4666     SET_LO8(eax, (TEST_NZ(_flag_a, _flag_b)) ? 1 : 0); /* 0x380182DC: setne al */
   4667     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380182DF: ret  */
   4668 L_380182E0:
   4669     ecx = MEM32(eax + 0x8); /* 0x380182E0: mov ecx, dword ptr [eax + 8] */
   4670     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
   4671     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4672     ecx = ecx - edx; /* 0x380182E3: sub ecx, edx */
   4673     _flag_k = FK_CMP;
   4674     eax = 0x66666667u; /* 0x380182E5: mov eax, 0x66666667 */
   4675     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x380182EA: imul ecx */
   4676       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   4677       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   4678     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x380182EC: sar edx, 3 */
   4679     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4680     edx = (uint32_t)((int32_t)edx >> 3u);
   4681     eax = edx; /* 0x380182EF: mov eax, edx */
   4682     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x380182F1: shr eax, 0x1f */
   4683     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4684     eax = eax >> 31u; /* 0x380182F1: shr eax, 0x1f */
   4685     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   4686     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4687     edx = edx + eax; /* 0x380182F4: add edx, eax */
   4688     _flag_k = FK_ADD;
   4689     /* test edx, edx */ /* 0x380182F6: test edx, edx */
   4690     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx);
   4691     _cf = 0;
   4692     _flag_k = FK_TEST;
   4693     SET_LO8(eax, (TEST_NZ(_flag_a, _flag_b)) ? 1 : 0); /* 0x380182F8: setne al */
   4694     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380182FB: ret  */
   4695     RECOMP_REGS_OUT();
   4696 }
   4697 
   4698 void sub_38018300(void) {
   4699     int _fpu_cmp = 0;
   4700     uint32_t _cf = 0;
   4701     int _df = 1;
   4702     uint32_t _flag_k = FK_NONE;
   4703     uint32_t _flag_a = 0, _flag_b = 0;
   4704     uint32_t _itail_tgt = 0;
   4705     RECOMP_REGS_LOCALS
   4706     RECOMP_ENTER(0x38018300u);
   4707 
   4708 L_38018300:
   4709     eax = MEM32(ecx + 0x28); /* 0x38018300: mov eax, dword ptr [ecx + 0x28] */
   4710     eax = MEM32(eax + 0x4); /* 0x38018303: mov eax, dword ptr [eax + 4] */
   4711     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38018306: ret  */
   4712     RECOMP_REGS_OUT();
   4713 }
   4714 
   4715 void sub_38018310(void) {
   4716     int _fpu_cmp = 0;
   4717     uint32_t _cf = 0;
   4718     int _df = 1;
   4719     uint32_t _flag_k = FK_NONE;
   4720     uint32_t _flag_a = 0, _flag_b = 0;
   4721     uint32_t _itail_tgt = 0;
   4722     RECOMP_REGS_LOCALS
   4723     RECOMP_ENTER(0x38018310u);
   4724 
   4725 L_38018310:
   4726     PUSH32(esp, ebp); /* 0x38018310: push ebp */
   4727     ebp = esp; /* 0x38018311: mov ebp, esp */
   4728     PUSH32(esp, ecx); /* 0x38018313: push ecx */
   4729     ecx = MEM32(ecx + 0x28); /* 0x38018314: mov ecx, dword ptr [ecx + 0x28] */
   4730     eax = MEM32(ecx + 0x4); /* 0x38018317: mov eax, dword ptr [ecx + 4] */
   4731     PUSH32(esp, ebx); /* 0x3801831A: push ebx */
   4732     ebx = MEM32(ecx + 0x8); /* 0x3801831B: mov ebx, dword ptr [ecx + 8] */
   4733     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x14u);
   4734     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4735     eax = eax + 0x14u; /* 0x3801831E: add eax, 0x14 */
   4736     _flag_k = FK_ADD;
   4737     /* cmp eax, ebx */ /* 0x38018321: cmp eax, ebx */
   4738     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   4739     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4740     _flag_k = FK_CMP;
   4741     MEM32(ebp + (-0x4)) = ecx; /* 0x38018323: mov dword ptr [ebp - 4], ecx */
   4742     if (CMP_EQ(_flag_a, _flag_b)) goto L_38018347; /* 0x38018326: je 0x38018347 */
   4743 L_38018328:
   4744     PUSH32(esp, esi); /* 0x38018328: push esi */
   4745     PUSH32(esp, edi); /* 0x38018329: push edi */
   4746     edx = eax + (-0x14); /* 0x3801832A: lea edx, [eax - 0x14] */
   4747 L_3801832D:
   4748     esi = eax; /* 0x3801832D: mov esi, eax */
   4749     edi = edx; /* 0x3801832F: mov edi, edx */
   4750     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x14u);
   4751     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4752     eax = eax + 0x14u; /* 0x38018331: add eax, 0x14 */
   4753     _flag_k = FK_ADD;
   4754     ecx = 5; /* 0x38018334: mov ecx, 5 */
   4755     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x14u);
   4756     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4757     edx = edx + 0x14u; /* 0x38018339: add edx, 0x14 */
   4758     _flag_k = FK_ADD;
   4759     /* cmp eax, ebx */ /* 0x3801833C: cmp eax, ebx */
   4760     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   4761     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4762     _flag_k = FK_CMP;
   4763     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x3801833E: rep movsd dword ptr es:[edi], dword ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 4u), (void*)ADDR(esi - _b + 4u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   4764     RECOMP_BACKEDGE();
   4765     if (CMP_NE(_flag_a, _flag_b)) goto L_3801832D; /* 0x38018340: jne 0x3801832d */
   4766 L_38018342:
   4767     ecx = MEM32(ebp + (-0x4)); /* 0x38018342: mov ecx, dword ptr [ebp - 4] */
   4768     edi = POP32_VAL(esp); /* 0x38018345: pop edi */
   4769     esi = POP32_VAL(esp); /* 0x38018346: pop esi */
   4770 L_38018347:
   4771     eax = MEM32(ecx + 0x8); /* 0x38018347: mov eax, dword ptr [ecx + 8] */
   4772     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   4773     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4774     eax = eax + 0xFFFFFFECu; /* 0x3801834A: add eax, -0x14 */
   4775     _flag_k = FK_ADD;
   4776     MEM32(ebp + (-0x4)) = eax; /* 0x3801834D: mov dword ptr [ebp - 4], eax */
   4777     MEM32(ecx + 0x8) = eax; /* 0x38018350: mov dword ptr [ecx + 8], eax */
   4778     ebx = POP32_VAL(esp); /* 0x38018353: pop ebx */
   4779     esp = ebp; /* 0x38018354: mov esp, ebp */
   4780     ebp = POP32_VAL(esp); /* 0x38018356: pop ebp */
   4781     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38018357: ret  */
   4782     RECOMP_REGS_OUT();
   4783 }
   4784 
   4785 void sub_38018360(void) {
   4786     int _fpu_cmp = 0;
   4787     uint32_t _cf = 0;
   4788     int _df = 1;
   4789     uint32_t _flag_k = FK_NONE;
   4790     uint32_t _flag_a = 0, _flag_b = 0;
   4791     uint32_t _itail_tgt = 0;
   4792     RECOMP_REGS_LOCALS
   4793     RECOMP_ENTER(0x38018360u);
   4794 
   4795 L_38018360:
   4796     MEM8(ecx + 0x6C) = (uint8_t)(1); /* 0x38018360: mov byte ptr [ecx + 0x6c], 1 */
   4797 L_38018364:
   4798     ecx = MEM32(ecx + 0x60); /* 0x38018364: mov ecx, dword ptr [ecx + 0x60] */
   4799 L_38018367:
   4800     /* test ecx, ecx */ /* 0x38018367: test ecx, ecx */
   4801     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   4802     _cf = 0;
   4803     _flag_k = FK_TEST;
   4804 L_38018369:
   4805     if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_38018371; /* 0x38018369: je 0x38018371 */
   4806 L_3801836B:
   4807     { _itail_tgt = (uint32_t)(MEM32(0x3804E618)); goto _ljump; }
   4808 L_38018371:
   4809     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38018371: ret  */
   4810   _ljump:
   4811     switch (_itail_tgt) {
   4812       case 0x38018360u: goto L_38018360;
   4813       case 0x38018364u: goto L_38018364;
   4814       case 0x38018367u: goto L_38018367;
   4815       case 0x38018369u: goto L_38018369;
   4816       case 0x3801836Bu: goto L_3801836B;
   4817       case 0x38018371u: goto L_38018371;
   4818       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   4819     }
   4820     RECOMP_REGS_OUT();
   4821 }
   4822 
   4823 void sub_38018380(void) {
   4824     int _fpu_cmp = 0;
   4825     uint32_t _cf = 0;
   4826     int _df = 1;
   4827     uint32_t _flag_k = FK_NONE;
   4828     uint32_t _flag_a = 0, _flag_b = 0;
   4829     uint32_t _itail_tgt = 0;
   4830     RECOMP_REGS_LOCALS
   4831     RECOMP_ENTER(0x38018380u);
   4832 
   4833 L_38018380:
   4834     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4835     eax = 0; /* 0x38018380: xor eax, eax */
   4836     _cf = 0;
   4837     _flag_k = FK_TEST;
   4838 L_38018382:
   4839     MEM8(ecx + 0x6C) = (uint8_t)(LO8(eax)); /* 0x38018382: mov byte ptr [ecx + 0x6c], al */
   4840 L_38018385:
   4841     MEM32(ecx + 0x68) = eax; /* 0x38018385: mov dword ptr [ecx + 0x68], eax */
   4842 L_38018388:
   4843     ecx = MEM32(ecx + 0x60); /* 0x38018388: mov ecx, dword ptr [ecx + 0x60] */
   4844 L_3801838B:
   4845     /* cmp ecx, eax */ /* 0x3801838B: cmp ecx, eax */
   4846     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   4847     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4848     _flag_k = FK_CMP;
   4849 L_3801838D:
   4850     if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_38018395; /* 0x3801838D: je 0x38018395 */
   4851 L_3801838F:
   4852     { _itail_tgt = (uint32_t)(MEM32(0x3804E6A0)); goto _ljump; }
   4853 L_38018395:
   4854     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38018395: ret  */
   4855   _ljump:
   4856     switch (_itail_tgt) {
   4857       case 0x38018380u: goto L_38018380;
   4858       case 0x38018382u: goto L_38018382;
   4859       case 0x38018385u: goto L_38018385;
   4860       case 0x38018388u: goto L_38018388;
   4861       case 0x3801838Bu: goto L_3801838B;
   4862       case 0x3801838Du: goto L_3801838D;
   4863       case 0x3801838Fu: goto L_3801838F;
   4864       case 0x38018395u: goto L_38018395;
   4865       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   4866     }
   4867     RECOMP_REGS_OUT();
   4868 }
   4869 
   4870 void sub_380183A0(void) {
   4871     int _fpu_cmp = 0;
   4872     uint32_t _cf = 0;
   4873     int _df = 1;
   4874     uint32_t _flag_k = FK_NONE;
   4875     uint32_t _flag_a = 0, _flag_b = 0;
   4876     uint32_t _itail_tgt = 0;
   4877     RECOMP_REGS_LOCALS
   4878     RECOMP_ENTER(0x380183A0u);
   4879 
   4880 L_380183A0:
   4881     SET_LO8(eax, MEM8(ecx + 0x70)); /* 0x380183A0: mov al, byte ptr [ecx + 0x70] */
   4882     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380183A3: ret  */
   4883     RECOMP_REGS_OUT();
   4884 }
   4885 
   4886 void sub_380183B0(void) {
   4887     int _fpu_cmp = 0;
   4888     uint32_t _cf = 0;
   4889     int _df = 1;
   4890     uint32_t _flag_k = FK_NONE;
   4891     uint32_t _flag_a = 0, _flag_b = 0;
   4892     uint32_t _itail_tgt = 0;
   4893     RECOMP_REGS_LOCALS
   4894     RECOMP_ENTER(0x380183B0u);
   4895 
   4896 L_380183B0:
   4897     MEM8(ecx + 0x70) = (uint8_t)(1); /* 0x380183B0: mov byte ptr [ecx + 0x70], 1 */
   4898     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380183B4: ret  */
   4899     RECOMP_REGS_OUT();
   4900 }
   4901 
   4902 void sub_380183C0(void) {
   4903     int _fpu_cmp = 0;
   4904     uint32_t _cf = 0;
   4905     int _df = 1;
   4906     uint32_t _flag_k = FK_NONE;
   4907     uint32_t _flag_a = 0, _flag_b = 0;
   4908     uint32_t _itail_tgt = 0;
   4909     RECOMP_REGS_LOCALS
   4910     RECOMP_ENTER(0x380183C0u);
   4911 
   4912 L_380183C0:
   4913     MEM8(ecx + 0x70) = (uint8_t)(0); /* 0x380183C0: mov byte ptr [ecx + 0x70], 0 */
   4914     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380183C4: ret  */
   4915     RECOMP_REGS_OUT();
   4916 }
   4917 
   4918 void sub_380183D0(void) {
   4919     int _fpu_cmp = 0;
   4920     uint32_t _cf = 0;
   4921     int _df = 1;
   4922     uint32_t _flag_k = FK_NONE;
   4923     uint32_t _flag_a = 0, _flag_b = 0;
   4924     uint32_t _itail_tgt = 0;
   4925     RECOMP_REGS_LOCALS
   4926     RECOMP_ENTER(0x380183D0u);
   4927 
   4928 L_380183D0:
   4929     SET_LO8(eax, MEM8(ecx + 0x71)); /* 0x380183D0: mov al, byte ptr [ecx + 0x71] */
   4930     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380183D3: ret  */
   4931     RECOMP_REGS_OUT();
   4932 }
   4933 
   4934 void sub_380183E0(void) {
   4935     int _fpu_cmp = 0;
   4936     uint32_t _cf = 0;
   4937     int _df = 1;
   4938     uint32_t _flag_k = FK_NONE;
   4939     uint32_t _flag_a = 0, _flag_b = 0;
   4940     uint32_t _itail_tgt = 0;
   4941     RECOMP_REGS_LOCALS
   4942     RECOMP_ENTER(0x380183E0u);
   4943 
   4944 L_380183E0:
   4945     SET_LO8(eax, 1); /* 0x380183E0: mov al, 1 */
   4946     MEM8(ecx + 0x71) = (uint8_t)(LO8(eax)); /* 0x380183E2: mov byte ptr [ecx + 0x71], al */
   4947     MEM8(ecx + 0x6D) = (uint8_t)(LO8(eax)); /* 0x380183E5: mov byte ptr [ecx + 0x6d], al */
   4948     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380183E8: ret  */
   4949     RECOMP_REGS_OUT();
   4950 }
   4951 
   4952 void sub_380183F0(void) {
   4953     int _fpu_cmp = 0;
   4954     uint32_t _cf = 0;
   4955     int _df = 1;
   4956     uint32_t _flag_k = FK_NONE;
   4957     uint32_t _flag_a = 0, _flag_b = 0;
   4958     uint32_t _itail_tgt = 0;
   4959     RECOMP_REGS_LOCALS
   4960     RECOMP_ENTER(0x380183F0u);
   4961 
   4962 L_380183F0:
   4963     MEM8(ecx + 0x71) = (uint8_t)(0); /* 0x380183F0: mov byte ptr [ecx + 0x71], 0 */
   4964     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380183F4: ret  */
   4965     RECOMP_REGS_OUT();
   4966 }
   4967 
   4968 void sub_38018400(void) {
   4969     int _fpu_cmp = 0;
   4970     uint32_t _cf = 0;
   4971     int _df = 1;
   4972     uint32_t _flag_k = FK_NONE;
   4973     uint32_t _flag_a = 0, _flag_b = 0;
   4974     uint32_t _itail_tgt = 0;
   4975     RECOMP_REGS_LOCALS
   4976     RECOMP_ENTER(0x38018400u);
   4977 
   4978 L_38018400:
   4979     fp_push(*(float*)&MEM32(ecx + 0x64)); /* 0x38018400: fld dword ptr [ecx + 0x64] */
   4980     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x38018403: ret  */
   4981     RECOMP_REGS_OUT();
   4982 }
   4983 
   4984 void sub_38018410(void) {
   4985     int _fpu_cmp = 0;
   4986     uint32_t _cf = 0;
   4987     int _df = 1;
   4988     uint32_t _flag_k = FK_NONE;
   4989     uint32_t _flag_a = 0, _flag_b = 0;
   4990     uint32_t _itail_tgt = 0;
   4991     RECOMP_REGS_LOCALS
   4992     RECOMP_ENTER(0x38018410u);
   4993 
   4994 L_38018410:
   4995     PUSH32(esp, ebp); /* 0x38018410: push ebp */
   4996     ebp = esp; /* 0x38018411: mov ebp, esp */
   4997     fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x38018413: fld dword ptr [ebp + 8] */
   4998     _fpu_cmp = FPU_CMP(_st[0], *(double*)ADDR(0x3804E928)); /* 0x38018416: fcomp qword ptr [0x3804e928] */
   4999     fp_pop();
   5000     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3801841C: fnstsw ax */
   5001     /* test HI8(eax), 1 */ /* 0x3801841E: test ah, 1 */
   5002     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
   5003     _cf = 0;
   5004     _flag_k = FK_NARROW(FK_TEST, 24);
   5005     if (TEST_NZ(_flag_a, _flag_b)) goto L_38018449; /* 0x38018421: jne 0x38018449 */
   5006 L_38018423:
   5007     fp_push(*(float*)&MEM32(ebp + 0x8)); /* 0x38018423: fld dword ptr [ebp + 8] */
   5008     _fpu_cmp = FPU_CMP(_st[0], *(double*)ADDR(0x3804F098)); /* 0x38018426: fcomp qword ptr [0x3804f098] */
   5009     fp_pop();
   5010     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3801842C: fnstsw ax */
   5011     /* test HI8(eax), 1 */ /* 0x3801842E: test ah, 1 */
   5012     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
   5013     _cf = 0;
   5014     _flag_k = FK_NARROW(FK_TEST, 24);
   5015     if (TEST_Z(_flag_a, _flag_b)) goto L_38018449; /* 0x38018431: je 0x38018449 */
   5016 L_38018433:
   5017     eax = MEM32(ebp + 0x8); /* 0x38018433: mov eax, dword ptr [ebp + 8] */
   5018     MEM32(ecx + 0x64) = eax; /* 0x38018436: mov dword ptr [ecx + 0x64], eax */
   5019     ecx = MEM32(ecx + 0x60); /* 0x38018439: mov ecx, dword ptr [ecx + 0x60] */
   5020     /* test ecx, ecx */ /* 0x3801843C: test ecx, ecx */
   5021     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   5022     _cf = 0;
   5023     _flag_k = FK_TEST;
   5024     if (TEST_Z(_flag_a, _flag_b)) goto L_38018449; /* 0x3801843E: je 0x38018449 */
   5025 L_38018440:
   5026     edx = eax; /* 0x38018440: mov edx, eax */
   5027     PUSH32(esp, edx); /* 0x38018442: push edx */
   5028     RECOMP_ICALL(MEM32(0x3804E690)); /* 0x38018443: call dword ptr [0x3804e690] */
   5029     RECOMP_FLAGS_IN();
   5030 L_38018449:
   5031     ebp = POP32_VAL(esp); /* 0x38018449: pop ebp */
   5032     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3801844A: ret 4 */
   5033     RECOMP_REGS_OUT();
   5034 }
   5035 
   5036 void sub_38018450(void) {
   5037     int _fpu_cmp = 0;
   5038     uint32_t _cf = 0;
   5039     int _df = 1;
   5040     uint32_t _flag_k = FK_NONE;
   5041     uint32_t _flag_a = 0, _flag_b = 0;
   5042     uint32_t _itail_tgt = 0;
   5043     RECOMP_REGS_LOCALS
   5044     RECOMP_ENTER(0x38018450u);
   5045 
   5046 L_38018450:
   5047     PUSH32(esp, ebp); /* 0x38018450: push ebp */
   5048     ebp = esp; /* 0x38018451: mov ebp, esp */
   5049     PUSH32(esp, 0xFFFFFFFFu); /* 0x38018453: push -1 */
   5050     PUSH32(esp, 0x3804C118u); /* 0x38018455: push 0x3804c118 */
   5051     eax = MEM32(FS_BASE + (0)); /* 0x3801845A: mov eax, dword ptr fs:[0] */
   5052     PUSH32(esp, eax); /* 0x38018460: push eax */
   5053     MEM32(FS_BASE + (0)) = esp; /* 0x38018461: mov dword ptr fs:[0], esp */
   5054     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5055     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5056     esp = esp - 8; /* 0x38018468: sub esp, 8 */
   5057     _flag_k = FK_CMP;
   5058     PUSH32(esp, ebx); /* 0x3801846B: push ebx */
   5059     PUSH32(esp, esi); /* 0x3801846C: push esi */
   5060     PUSH32(esp, edi); /* 0x3801846D: push edi */
   5061     edi = MEM32(ebp + 0x8); /* 0x3801846E: mov edi, dword ptr [ebp + 8] */
   5062     esi = ecx; /* 0x38018471: mov esi, ecx */
   5063     PUSH32(esp, edi); /* 0x38018473: push edi */
   5064     ecx = ebp + (-0x14); /* 0x38018474: lea ecx, [ebp - 0x14] */
   5065     RECOMP_ICALL(0x3801B560u); /* 0x38018477: call 0x3801b560 */ /* not lifted */
   5066     RECOMP_FLAGS_IN();
   5067     ecx = MEM32(esi + 0x88); /* 0x3801847C: mov ecx, dword ptr [esi + 0x88] */
   5068     edx = MEM32(ecx + 0x8); /* 0x38018482: mov edx, dword ptr [ecx + 8] */
   5069     PUSH32(esp, eax); /* 0x38018485: push eax */
   5070     PUSH32(esp, 1); /* 0x38018486: push 1 */
   5071     PUSH32(esp, edx); /* 0x38018488: push edx */
   5072     MEM32(ebp + (-0x4)) = 0; /* 0x38018489: mov dword ptr [ebp - 4], 0 */
   5073     RECOMP_ICALL(0x3801AA00u); /* 0x38018490: call 0x3801aa00 */ /* not lifted */
   5074     RECOMP_FLAGS_IN();
   5075     ecx = ebp + (-0x14); /* 0x38018495: lea ecx, [ebp - 0x14] */
   5076     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x38018498: mov dword ptr [ebp - 4], 0xffffffff */
   5077     RECOMP_ICALL(0x3801B610u); /* 0x3801849F: call 0x3801b610 */ /* not lifted */
   5078     RECOMP_FLAGS_IN();
   5079     eax = MEM32(esi + 0x4); /* 0x380184A4: mov eax, dword ptr [esi + 4] */
   5080     ecx = MEM32(esi + 0x8); /* 0x380184A7: mov ecx, dword ptr [esi + 8] */
   5081     MEM32(edi + 0x8C) = eax; /* 0x380184AA: mov dword ptr [edi + 0x8c], eax */
   5082     MEM32(edi + 0x90) = ecx; /* 0x380184B0: mov dword ptr [edi + 0x90], ecx */
   5083     ecx = esi; /* 0x380184B6: mov ecx, esi */
   5084     RECOMP_ICALL(0x38017C60u); /* 0x380184B8: call 0x38017c60 */ /* not lifted */
   5085     RECOMP_FLAGS_IN();
   5086     ecx = edi; /* 0x380184BD: mov ecx, edi */
   5087     PUSH32(esp, eax); /* 0x380184BF: push eax */
   5088     RECOMP_ICALL(0x38018850u); /* 0x380184C0: call 0x38018850 */ /* not lifted */
   5089     RECOMP_FLAGS_IN();
   5090     ebx = MEM32(ebp + 0xC); /* 0x380184C5: mov ebx, dword ptr [ebp + 0xc] */
   5091     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   5092     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5093     esp = esp - 0xCu; /* 0x380184C8: sub esp, 0xc */
   5094     _flag_k = FK_CMP;
   5095     eax = ebx; /* 0x380184CB: mov eax, ebx */
   5096     edx = MEM32(eax); /* 0x380184CD: mov edx, dword ptr [eax] */
   5097     ecx = esp; /* 0x380184CF: mov ecx, esp */
   5098     MEM32(ecx) = edx; /* 0x380184D1: mov dword ptr [ecx], edx */
   5099     edx = MEM32(eax + 0x4); /* 0x380184D3: mov edx, dword ptr [eax + 4] */
   5100     eax = MEM32(eax + 0x8); /* 0x380184D6: mov eax, dword ptr [eax + 8] */
   5101     MEM32(ecx + 0x4) = edx; /* 0x380184D9: mov dword ptr [ecx + 4], edx */
   5102     MEM32(ecx + 0x8) = eax; /* 0x380184DC: mov dword ptr [ecx + 8], eax */
   5103     ecx = MEM32(esi + 0x60); /* 0x380184DF: mov ecx, dword ptr [esi + 0x60] */
   5104     PUSH32(esp, ecx); /* 0x380184E2: push ecx */
   5105     ecx = MEM32(edi + 0x60); /* 0x380184E3: mov ecx, dword ptr [edi + 0x60] */
   5106     RECOMP_ICALL(MEM32(0x3804E614)); /* 0x380184E6: call dword ptr [0x3804e614] */
   5107     RECOMP_FLAGS_IN();
   5108     ecx = edi; /* 0x380184EC: mov ecx, edi */
   5109     RECOMP_ICALL(0x38019DD0u); /* 0x380184EE: call 0x38019dd0 */ /* not lifted */
   5110     RECOMP_FLAGS_IN();
   5111     edx = MEM32(ebp + 0x10); /* 0x380184F3: mov edx, dword ptr [ebp + 0x10] */
   5112     eax = MEM32(esi + 0x78); /* 0x380184F6: mov eax, dword ptr [esi + 0x78] */
   5113     PUSH32(esp, edx); /* 0x380184F9: push edx */
   5114     PUSH32(esp, ebx); /* 0x380184FA: push ebx */
   5115     PUSH32(esp, eax); /* 0x380184FB: push eax */
   5116     ecx = edi; /* 0x380184FC: mov ecx, edi */
   5117     RECOMP_ICALL(0x38018770u); /* 0x380184FE: call 0x38018770 */ /* not lifted */
   5118     RECOMP_FLAGS_IN();
   5119     edx = MEM32(esi); /* 0x38018503: mov edx, dword ptr [esi] */
   5120     PUSH32(esp, edi); /* 0x38018505: push edi */
   5121     ecx = esi; /* 0x38018506: mov ecx, esi */
   5122     RECOMP_ICALL(MEM32(edx + 0x40)); /* 0x38018508: call dword ptr [edx + 0x40] */
   5123     RECOMP_FLAGS_IN();
   5124     eax = MEM32(esi + 0x78); /* 0x3801850B: mov eax, dword ptr [esi + 0x78] */
   5125     /* test eax, eax */ /* 0x3801850E: test eax, eax */
   5126     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5127     _cf = 0;
   5128     _flag_k = FK_TEST;
   5129     if (TEST_Z(_flag_a, _flag_b)) goto L_38018519; /* 0x38018510: je 0x38018519 */
   5130 L_38018512:
   5131     eax = MEM32(edi); /* 0x38018512: mov eax, dword ptr [edi] */
   5132     ecx = edi; /* 0x38018514: mov ecx, edi */
   5133     RECOMP_ICALL(MEM32(eax + 0x54)); /* 0x38018516: call dword ptr [eax + 0x54] */
   5134     RECOMP_FLAGS_IN();
   5135 L_38018519:
   5136     ecx = MEM32(ebp + (-0xC)); /* 0x38018519: mov ecx, dword ptr [ebp - 0xc] */
   5137     edi = POP32_VAL(esp); /* 0x3801851C: pop edi */
   5138     esi = POP32_VAL(esp); /* 0x3801851D: pop esi */
   5139     MEM32(FS_BASE + (0)) = ecx; /* 0x3801851E: mov dword ptr fs:[0], ecx */
   5140     ebx = POP32_VAL(esp); /* 0x38018525: pop ebx */
   5141     esp = ebp; /* 0x38018526: mov esp, ebp */
   5142     ebp = POP32_VAL(esp); /* 0x38018528: pop ebp */
   5143     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x38018529: ret 0xc */
   5144     RECOMP_REGS_OUT();
   5145 }
   5146 
   5147 void sub_38018530(void) {
   5148     int _fpu_cmp = 0;
   5149     uint32_t _cf = 0;
   5150     int _df = 1;
   5151     uint32_t _flag_k = FK_NONE;
   5152     uint32_t _flag_a = 0, _flag_b = 0;
   5153     uint32_t _itail_tgt = 0;
   5154     RECOMP_REGS_LOCALS
   5155     RECOMP_ENTER(0x38018530u);
   5156 
   5157 L_38018530:
   5158     PUSH32(esp, ebp); /* 0x38018530: push ebp */
   5159     ebp = esp; /* 0x38018531: mov ebp, esp */
   5160     PUSH32(esp, 0xFFFFFFFFu); /* 0x38018533: push -1 */
   5161     PUSH32(esp, 0x3804C138u); /* 0x38018535: push 0x3804c138 */
   5162     eax = MEM32(FS_BASE + (0)); /* 0x3801853A: mov eax, dword ptr fs:[0] */
   5163     PUSH32(esp, eax); /* 0x38018540: push eax */
   5164     MEM32(FS_BASE + (0)) = esp; /* 0x38018541: mov dword ptr fs:[0], esp */
   5165     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5166     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5167     esp = esp - 8; /* 0x38018548: sub esp, 8 */
   5168     _flag_k = FK_CMP;
   5169     PUSH32(esp, ebx); /* 0x3801854B: push ebx */
   5170     PUSH32(esp, esi); /* 0x3801854C: push esi */
   5171     esi = MEM32(ebp + 0x8); /* 0x3801854D: mov esi, dword ptr [ebp + 8] */
   5172     PUSH32(esp, edi); /* 0x38018550: push edi */
   5173     edi = ecx; /* 0x38018551: mov edi, ecx */
   5174     PUSH32(esp, esi); /* 0x38018553: push esi */
   5175     RECOMP_ICALL(0x3801A8B0u); /* 0x38018554: call 0x3801a8b0 */ /* not lifted */
   5176     RECOMP_FLAGS_IN();
   5177     /* test LO8(eax), LO8(eax) */ /* 0x38018559: test al, al */
   5178     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   5179     _cf = 0;
   5180     _flag_k = FK_NARROW(FK_TEST, 24);
   5181     if (TEST_NZ(_flag_a, _flag_b)) goto L_38018676; /* 0x3801855B: jne 0x38018676 */
   5182 L_38018561:
   5183     ecx = esi; /* 0x38018561: mov ecx, esi */
   5184     RECOMP_ICALL(0x38017C60u); /* 0x38018563: call 0x38017c60 */ /* not lifted */
   5185     RECOMP_FLAGS_IN();
   5186     /* test LO8(eax), LO8(eax) */ /* 0x38018568: test al, al */
   5187     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   5188     _cf = 0;
   5189     _flag_k = FK_NARROW(FK_TEST, 24);
   5190     if (TEST_NZ(_flag_a, _flag_b)) goto L_3801858F; /* 0x3801856A: jne 0x3801858f */
   5191 L_3801856C:
   5192     ecx = MEM32(ebp + 0x10); /* 0x3801856C: mov ecx, dword ptr [ebp + 0x10] */
   5193     edx = MEM32(ebp + 0xC); /* 0x3801856F: mov edx, dword ptr [ebp + 0xc] */
   5194     eax = MEM32(edi); /* 0x38018572: mov eax, dword ptr [edi] */
   5195     PUSH32(esp, ecx); /* 0x38018574: push ecx */
   5196     PUSH32(esp, edx); /* 0x38018575: push edx */
   5197     PUSH32(esp, esi); /* 0x38018576: push esi */
   5198     ecx = edi; /* 0x38018577: mov ecx, edi */
   5199     RECOMP_ICALL(MEM32(eax + 0x1C)); /* 0x38018579: call dword ptr [eax + 0x1c] */
   5200     RECOMP_FLAGS_IN();
   5201     ecx = MEM32(ebp + (-0xC)); /* 0x3801857C: mov ecx, dword ptr [ebp - 0xc] */
   5202     MEM32(FS_BASE + (0)) = ecx; /* 0x3801857F: mov dword ptr fs:[0], ecx */
   5203     edi = POP32_VAL(esp); /* 0x38018586: pop edi */
   5204     esi = POP32_VAL(esp); /* 0x38018587: pop esi */
   5205     ebx = POP32_VAL(esp); /* 0x38018588: pop ebx */
   5206     esp = ebp; /* 0x38018589: mov esp, ebp */
   5207     ebp = POP32_VAL(esp); /* 0x3801858B: pop ebp */
   5208     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3801858C: ret 0xc */
   5209 L_3801858F:
   5210     PUSH32(esp, esi); /* 0x3801858F: push esi */
   5211     ecx = ebp + (-0x14); /* 0x38018590: lea ecx, [ebp - 0x14] */
   5212     RECOMP_ICALL(0x3801B560u); /* 0x38018593: call 0x3801b560 */ /* not lifted */
   5213     RECOMP_FLAGS_IN();
   5214     ecx = MEM32(edi + 0x88); /* 0x38018598: mov ecx, dword ptr [edi + 0x88] */
   5215     edx = MEM32(ecx + 0x8); /* 0x3801859E: mov edx, dword ptr [ecx + 8] */
   5216     PUSH32(esp, eax); /* 0x380185A1: push eax */
   5217     PUSH32(esp, 1); /* 0x380185A2: push 1 */
   5218     PUSH32(esp, edx); /* 0x380185A4: push edx */
   5219     MEM32(ebp + (-0x4)) = 0; /* 0x380185A5: mov dword ptr [ebp - 4], 0 */
   5220     RECOMP_ICALL(0x3801AA00u); /* 0x380185AC: call 0x3801aa00 */ /* not lifted */
   5221     RECOMP_FLAGS_IN();
   5222     ecx = ebp + (-0x14); /* 0x380185B1: lea ecx, [ebp - 0x14] */
   5223     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x380185B4: mov dword ptr [ebp - 4], 0xffffffff */
   5224     RECOMP_ICALL(0x3801B610u); /* 0x380185BB: call 0x3801b610 */ /* not lifted */
   5225     RECOMP_FLAGS_IN();
   5226     ebx = esi + 0x8C; /* 0x380185C0: lea ebx, [esi + 0x8c] */
   5227     eax = ebp + (-0x14); /* 0x380185C6: lea eax, [ebp - 0x14] */
   5228     /* cmp eax, ebx */ /* 0x380185C9: cmp eax, ebx */
   5229     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   5230     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5231     _flag_k = FK_CMP;
   5232     if (CMP_EQ(_flag_a, _flag_b)) goto L_380185D8; /* 0x380185CB: je 0x380185d8 */
   5233 L_380185CD:
   5234     ecx = MEM32(ebx); /* 0x380185CD: mov ecx, dword ptr [ebx] */
   5235     edx = MEM32(ebx + 0x4); /* 0x380185CF: mov edx, dword ptr [ebx + 4] */
   5236     MEM32(ebp + (-0x14)) = ecx; /* 0x380185D2: mov dword ptr [ebp - 0x14], ecx */
   5237     MEM32(ebp + (-0x10)) = edx; /* 0x380185D5: mov dword ptr [ebp - 0x10], edx */
   5238 L_380185D8:
   5239     eax = MEM32(esi + 0x78); /* 0x380185D8: mov eax, dword ptr [esi + 0x78] */
   5240     ecx = esi; /* 0x380185DB: mov ecx, esi */
   5241     MEM32(ebp + 0x8) = eax; /* 0x380185DD: mov dword ptr [ebp + 8], eax */
   5242     RECOMP_ICALL(0x38018690u); /* 0x380185E0: call 0x38018690 */ /* not lifted */
   5243     RECOMP_FLAGS_IN();
   5244     eax = MEM32(ebp + (-0x14)); /* 0x380185E5: mov eax, dword ptr [ebp - 0x14] */
   5245     /* test eax, eax */ /* 0x380185E8: test eax, eax */
   5246     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5247     _cf = 0;
   5248     _flag_k = FK_TEST;
   5249     if (TEST_NZ(_flag_a, _flag_b)) goto L_38018624; /* 0x380185EA: jne 0x38018624 */
   5250 L_380185EC:
   5251     eax = MEM32(ebp + (-0x10)); /* 0x380185EC: mov eax, dword ptr [ebp - 0x10] */
   5252     /* test eax, eax */ /* 0x380185EF: test eax, eax */
   5253     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5254     _cf = 0;
   5255     _flag_k = FK_TEST;
   5256     if (TEST_NZ(_flag_a, _flag_b)) goto L_38018624; /* 0x380185F1: jne 0x38018624 */
   5257 L_380185F3:
   5258     ecx = edi; /* 0x380185F3: mov ecx, edi */
   5259     RECOMP_ICALL(0x38017F50u); /* 0x380185F5: call 0x38017f50 */ /* not lifted */
   5260     RECOMP_FLAGS_IN();
   5261     PUSH32(esp, eax); /* 0x380185FA: push eax */
   5262     ecx = esi; /* 0x380185FB: mov ecx, esi */
   5263     RECOMP_ICALL(0x38017EA0u); /* 0x380185FD: call 0x38017ea0 */ /* not lifted */
   5264     RECOMP_FLAGS_IN();
   5265     ecx = MEM32(ebp + 0x8); /* 0x38018602: mov ecx, dword ptr [ebp + 8] */
   5266     PUSH32(esp, ecx); /* 0x38018605: push ecx */
   5267     MEM32(esi + 0x78) = 0xFFFFFFFFu; /* 0x38018606: mov dword ptr [esi + 0x78], 0xffffffff */
   5268     RECOMP_ICALL(0x380295A0u); /* 0x3801860D: call 0x380295a0 */ /* not lifted */
   5269     RECOMP_FLAGS_IN();
   5270     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5271     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5272     esp = esp + 4; /* 0x38018612: add esp, 4 */
   5273     _flag_k = FK_ADD;
   5274     ecx = eax; /* 0x38018615: mov ecx, eax */
   5275     RECOMP_ICALL(0x38029DF0u); /* 0x38018617: call 0x38029df0 */ /* not lifted */
   5276     RECOMP_FLAGS_IN();
   5277     PUSH32(esp, eax); /* 0x3801861C: push eax */
   5278     ecx = esi; /* 0x3801861D: mov ecx, esi */
   5279     RECOMP_ICALL(0x38017D50u); /* 0x3801861F: call 0x38017d50 */ /* not lifted */
   5280     RECOMP_FLAGS_IN();
   5281 L_38018624:
   5282     edx = MEM32(ebp + 0xC); /* 0x38018624: mov edx, dword ptr [ebp + 0xc] */
   5283     ecx = MEM32(edx); /* 0x38018627: mov ecx, dword ptr [edx] */
   5284     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   5285     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5286     esp = esp - 0xCu; /* 0x38018629: sub esp, 0xc */
   5287     _flag_k = FK_CMP;
   5288     eax = esp; /* 0x3801862C: mov eax, esp */
   5289     MEM32(eax) = ecx; /* 0x3801862E: mov dword ptr [eax], ecx */
   5290     ecx = MEM32(edx + 0x4); /* 0x38018630: mov ecx, dword ptr [edx + 4] */
   5291     edx = MEM32(edx + 0x8); /* 0x38018633: mov edx, dword ptr [edx + 8] */
   5292     MEM32(eax + 0x4) = ecx; /* 0x38018636: mov dword ptr [eax + 4], ecx */
   5293     ecx = MEM32(esi + 0x60); /* 0x38018639: mov ecx, dword ptr [esi + 0x60] */
   5294     MEM32(eax + 0x8) = edx; /* 0x3801863C: mov dword ptr [eax + 8], edx */
   5295     eax = MEM32(edi + 0x60); /* 0x3801863F: mov eax, dword ptr [edi + 0x60] */
   5296     PUSH32(esp, eax); /* 0x38018642: push eax */
   5297     RECOMP_ICALL(MEM32(0x3804E614)); /* 0x38018643: call dword ptr [0x3804e614] */
   5298     RECOMP_FLAGS_IN();
   5299     ecx = esi; /* 0x38018649: mov ecx, esi */
   5300     RECOMP_ICALL(0x38019DD0u); /* 0x3801864B: call 0x38019dd0 */ /* not lifted */
   5301     RECOMP_FLAGS_IN();
   5302     eax = MEM32(edi + 0x4); /* 0x38018650: mov eax, dword ptr [edi + 4] */
   5303     ecx = MEM32(edi + 0x8); /* 0x38018653: mov ecx, dword ptr [edi + 8] */
   5304     edx = MEM32(ebp + 0xC); /* 0x38018656: mov edx, dword ptr [ebp + 0xc] */
   5305     MEM32(ebx) = eax; /* 0x38018659: mov dword ptr [ebx], eax */
   5306     MEM32(ebx + 0x4) = ecx; /* 0x3801865B: mov dword ptr [ebx + 4], ecx */
   5307     ecx = MEM32(ebp + 0x10); /* 0x3801865E: mov ecx, dword ptr [ebp + 0x10] */
   5308     eax = MEM32(edi + 0x78); /* 0x38018661: mov eax, dword ptr [edi + 0x78] */
   5309     PUSH32(esp, ecx); /* 0x38018664: push ecx */
   5310     PUSH32(esp, edx); /* 0x38018665: push edx */
   5311     PUSH32(esp, eax); /* 0x38018666: push eax */
   5312     ecx = esi; /* 0x38018667: mov ecx, esi */
   5313     RECOMP_ICALL(0x38018770u); /* 0x38018669: call 0x38018770 */ /* not lifted */
   5314     RECOMP_FLAGS_IN();
   5315     edx = MEM32(edi); /* 0x3801866E: mov edx, dword ptr [edi] */
   5316     PUSH32(esp, esi); /* 0x38018670: push esi */
   5317     ecx = edi; /* 0x38018671: mov ecx, edi */
   5318     RECOMP_ICALL(MEM32(edx + 0x40)); /* 0x38018673: call dword ptr [edx + 0x40] */
   5319     RECOMP_FLAGS_IN();
   5320 L_38018676:
   5321     ecx = MEM32(ebp + (-0xC)); /* 0x38018676: mov ecx, dword ptr [ebp - 0xc] */
   5322     edi = POP32_VAL(esp); /* 0x38018679: pop edi */
   5323     esi = POP32_VAL(esp); /* 0x3801867A: pop esi */
   5324     MEM32(FS_BASE + (0)) = ecx; /* 0x3801867B: mov dword ptr fs:[0], ecx */
   5325     ebx = POP32_VAL(esp); /* 0x38018682: pop ebx */
   5326     esp = ebp; /* 0x38018683: mov esp, ebp */
   5327     ebp = POP32_VAL(esp); /* 0x38018685: pop ebp */
   5328     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x38018686: ret 0xc */
   5329     RECOMP_REGS_OUT();
   5330 }
   5331 
   5332 void sub_38018690(void) {
   5333     int _fpu_cmp = 0;
   5334     uint32_t _cf = 0;
   5335     int _df = 1;
   5336     uint32_t _flag_k = FK_NONE;
   5337     uint32_t _flag_a = 0, _flag_b = 0;
   5338     uint32_t _itail_tgt = 0;
   5339     RECOMP_REGS_LOCALS
   5340     RECOMP_ENTER(0x38018690u);
   5341 
   5342 L_38018690:
   5343     PUSH32(esp, esi); /* 0x38018690: push esi */
   5344     esi = ecx; /* 0x38018691: mov esi, ecx */
   5345     RECOMP_ICALL(0x38018E80u); /* 0x38018693: call 0x38018e80 */ /* not lifted */
   5346     RECOMP_FLAGS_IN();
   5347     /* test eax, eax */ /* 0x38018698: test eax, eax */
   5348     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5349     _cf = 0;
   5350     _flag_k = FK_TEST;
   5351     if (TEST_NZ(_flag_a, _flag_b)) goto L_380186B8; /* 0x3801869A: jne 0x380186b8 */
   5352 L_3801869C:
   5353     ecx = esi; /* 0x3801869C: mov ecx, esi */
   5354     RECOMP_ICALL(0x38018E70u); /* 0x3801869E: call 0x38018e70 */ /* not lifted */
   5355     RECOMP_FLAGS_IN();
   5356     /* test eax, eax */ /* 0x380186A3: test eax, eax */
   5357     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5358     _cf = 0;
   5359     _flag_k = FK_TEST;
   5360     if (TEST_Z(_flag_a, _flag_b)) goto L_380186C7; /* 0x380186A5: je 0x380186c7 */
   5361 L_380186A7:
   5362     PUSH32(esp, esi); /* 0x380186A7: push esi */
   5363     ecx = esi; /* 0x380186A8: mov ecx, esi */
   5364     RECOMP_ICALL(0x38018E70u); /* 0x380186AA: call 0x38018e70 */ /* not lifted */
   5365     RECOMP_FLAGS_IN();
   5366     ecx = eax; /* 0x380186AF: mov ecx, eax */
   5367     RECOMP_ICALL(0x3802A310u); /* 0x380186B1: call 0x3802a310 */ /* not lifted */
   5368     RECOMP_FLAGS_IN();
   5369     esi = POP32_VAL(esp); /* 0x380186B6: pop esi */
   5370     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380186B7: ret  */
   5371 L_380186B8:
   5372     PUSH32(esp, esi); /* 0x380186B8: push esi */
   5373     ecx = esi; /* 0x380186B9: mov ecx, esi */
   5374     RECOMP_ICALL(0x38018E80u); /* 0x380186BB: call 0x38018e80 */ /* not lifted */
   5375     RECOMP_FLAGS_IN();
   5376     ecx = eax; /* 0x380186C0: mov ecx, eax */
   5377     RECOMP_ICALL(0x380186D0u); /* 0x380186C2: call 0x380186d0 */ /* not lifted */
   5378     RECOMP_FLAGS_IN();
   5379 L_380186C7:
   5380     esi = POP32_VAL(esp); /* 0x380186C7: pop esi */
   5381     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x380186C8: ret  */
   5382     RECOMP_REGS_OUT();
   5383 }