aorecomp

Anarchy Online classic in the browser

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


client/game/lr.dll/lifted-0000.c (1095968B)


      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_39001000(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(0x39001000u);
     17 
     18 L_39001000:
     19     PUSH32(esp, ebp); /* 0x39001000: push ebp */
     20     ebp = esp; /* 0x39001001: mov ebp, esp */
     21     PUSH32(esp, 0xFFFFFFFFu); /* 0x39001003: push -1 */
     22     PUSH32(esp, 0x3900A484u); /* 0x39001005: push 0x3900a484 */
     23     eax = MEM32(FS_BASE + (0)); /* 0x3900100A: mov eax, dword ptr fs:[0] */
     24     PUSH32(esp, eax); /* 0x39001010: push eax */
     25     MEM32(FS_BASE + (0)) = esp; /* 0x39001011: mov dword ptr fs:[0], esp */
     26     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
     27     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
     28     esp = esp - 0xCu; /* 0x39001018: sub esp, 0xc */
     29     _flag_k = FK_CMP;
     30     SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x3900101B: mov al, byte ptr [ebp - 0xd] */
     31     PUSH32(esp, ebx); /* 0x3900101E: push ebx */
     32     PUSH32(esp, esi); /* 0x3900101F: push esi */
     33     esi = ecx; /* 0x39001020: mov esi, ecx */
     34     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
     35     ebx = 0; /* 0x39001022: xor ebx, ebx */
     36     _cf = 0;
     37     _flag_k = FK_TEST;
     38     PUSH32(esp, edi); /* 0x39001024: push edi */
     39     PUSH32(esp, ebx); /* 0x39001025: push ebx */
     40     MEM32(ebp + (-0x14)) = esi; /* 0x39001026: mov dword ptr [ebp - 0x14], esi */
     41     MEM8(esi) = (uint8_t)(LO8(eax)); /* 0x39001029: mov byte ptr [esi], al */
     42     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x3900102B: call dword ptr [0x3900b040] */
     43     RECOMP_FLAGS_IN();
     44     SET_LO8(edx, MEM8(ebp + (-0xD))); /* 0x39001031: mov dl, byte ptr [ebp - 0xd] */
     45     ecx = esi + 0x10; /* 0x39001034: lea ecx, [esi + 0x10] */
     46     PUSH32(esp, ebx); /* 0x39001037: push ebx */
     47     MEM32(ebp + (-0x4)) = ebx; /* 0x39001038: mov dword ptr [ebp - 4], ebx */
     48     MEM8(ecx) = (uint8_t)(LO8(edx)); /* 0x3900103B: mov byte ptr [ecx], dl */
     49     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x3900103D: call dword ptr [0x3900b040] */
     50     RECOMP_FLAGS_IN();
     51     SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x39001043: mov al, byte ptr [ebp - 0xd] */
     52     ecx = esi + 0x20; /* 0x39001046: lea ecx, [esi + 0x20] */
     53     PUSH32(esp, ebx); /* 0x39001049: push ebx */
     54     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x3900104A: mov byte ptr [ebp - 4], 1 */
     55     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x3900104E: mov byte ptr [ecx], al */
     56     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001050: call dword ptr [0x3900b040] */
     57     RECOMP_FLAGS_IN();
     58     PUSH32(esp, 0x14u); /* 0x39001056: push 0x14 */
     59     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x39001058: mov byte ptr [ebp - 4], 2 */
     60     RECOMP_ICALL(0x3900A0ACu); /* 0x3900105C: call 0x3900a0ac */ /* not lifted */
     61     RECOMP_FLAGS_IN();
     62     edi = eax; /* 0x39001061: mov edi, eax */
     63     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
     64     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
     65     esp = esp + 4; /* 0x39001063: add esp, 4 */
     66     _flag_k = FK_ADD;
     67     MEM32(ebp + (-0x18)) = edi; /* 0x39001066: mov dword ptr [ebp - 0x18], edi */
     68     /* cmp edi, ebx */ /* 0x39001069: cmp edi, ebx */
     69     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
     70     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
     71     _flag_k = FK_CMP;
     72     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x3900106B: mov byte ptr [ebp - 4], 3 */
     73     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001088; /* 0x3900106F: je 0x39001088 */
     74 L_39001071:
     75     SET_LO8(ecx, MEM8(ebp + (-0xD))); /* 0x39001071: mov cl, byte ptr [ebp - 0xd] */
     76     SET_LO8(edx, MEM8(ebp + (-0xD))); /* 0x39001074: mov dl, byte ptr [ebp - 0xd] */
     77     MEM8(edi) = (uint8_t)(LO8(ecx)); /* 0x39001077: mov byte ptr [edi], cl */
     78     ecx = edi; /* 0x39001079: mov ecx, edi */
     79     MEM8(edi + 0x1) = (uint8_t)(LO8(edx)); /* 0x3900107B: mov byte ptr [edi + 1], dl */
     80     MEM8(edi + 0xC) = (uint8_t)(LO8(ebx)); /* 0x3900107E: mov byte ptr [edi + 0xc], bl */
     81     RECOMP_ICALL(0x39005B10u); /* 0x39001081: call 0x39005b10 */ /* not lifted */
     82     RECOMP_FLAGS_IN();
     83     goto L_3900108A; /* 0x39001086: jmp 0x3900108a */
     84 L_39001088:
     85     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
     86     edi = 0; /* 0x39001088: xor edi, edi */
     87     _cf = 0;
     88     _flag_k = FK_TEST;
     89 L_3900108A:
     90     PUSH32(esp, 0x14u); /* 0x3900108A: push 0x14 */
     91     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x3900108C: mov byte ptr [ebp - 4], 2 */
     92     MEM32(esi + 0x30) = edi; /* 0x39001090: mov dword ptr [esi + 0x30], edi */
     93     RECOMP_ICALL(0x3900A0ACu); /* 0x39001093: call 0x3900a0ac */ /* not lifted */
     94     RECOMP_FLAGS_IN();
     95     edi = eax; /* 0x39001098: mov edi, eax */
     96     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
     97     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
     98     esp = esp + 4; /* 0x3900109A: add esp, 4 */
     99     _flag_k = FK_ADD;
    100     MEM32(ebp + (-0x18)) = edi; /* 0x3900109D: mov dword ptr [ebp - 0x18], edi */
    101     /* cmp edi, ebx */ /* 0x390010A0: cmp edi, ebx */
    102     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
    103     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    104     _flag_k = FK_CMP;
    105     MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x390010A2: mov byte ptr [ebp - 4], 4 */
    106     if (CMP_EQ(_flag_a, _flag_b)) goto L_390010BF; /* 0x390010A6: je 0x390010bf */
    107 L_390010A8:
    108     SET_LO8(ecx, MEM8(ebp + (-0xD))); /* 0x390010A8: mov cl, byte ptr [ebp - 0xd] */
    109     SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x390010AB: mov al, byte ptr [ebp - 0xd] */
    110     MEM8(edi + 0x1) = (uint8_t)(LO8(ecx)); /* 0x390010AE: mov byte ptr [edi + 1], cl */
    111     ecx = edi; /* 0x390010B1: mov ecx, edi */
    112     MEM8(edi) = (uint8_t)(LO8(eax)); /* 0x390010B3: mov byte ptr [edi], al */
    113     MEM8(edi + 0xC) = (uint8_t)(LO8(ebx)); /* 0x390010B5: mov byte ptr [edi + 0xc], bl */
    114     RECOMP_ICALL(0x39005B10u); /* 0x390010B8: call 0x39005b10 */ /* not lifted */
    115     RECOMP_FLAGS_IN();
    116     goto L_390010C1; /* 0x390010BD: jmp 0x390010c1 */
    117 L_390010BF:
    118     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    119     edi = 0; /* 0x390010BF: xor edi, edi */
    120     _cf = 0;
    121     _flag_k = FK_TEST;
    122 L_390010C1:
    123     PUSH32(esp, 0x14u); /* 0x390010C1: push 0x14 */
    124     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x390010C3: mov byte ptr [ebp - 4], 2 */
    125     MEM32(esi + 0x34) = edi; /* 0x390010C7: mov dword ptr [esi + 0x34], edi */
    126     RECOMP_ICALL(0x3900A0ACu); /* 0x390010CA: call 0x3900a0ac */ /* not lifted */
    127     RECOMP_FLAGS_IN();
    128     edi = eax; /* 0x390010CF: mov edi, eax */
    129     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    130     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    131     esp = esp + 4; /* 0x390010D1: add esp, 4 */
    132     _flag_k = FK_ADD;
    133     MEM32(ebp + (-0x18)) = edi; /* 0x390010D4: mov dword ptr [ebp - 0x18], edi */
    134     /* cmp edi, ebx */ /* 0x390010D7: cmp edi, ebx */
    135     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
    136     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    137     _flag_k = FK_CMP;
    138     MEM8(ebp + (-0x4)) = (uint8_t)(5); /* 0x390010D9: mov byte ptr [ebp - 4], 5 */
    139     if (CMP_EQ(_flag_a, _flag_b)) goto L_390010F6; /* 0x390010DD: je 0x390010f6 */
    140 L_390010DF:
    141     SET_LO8(edx, MEM8(ebp + (-0xD))); /* 0x390010DF: mov dl, byte ptr [ebp - 0xd] */
    142     SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x390010E2: mov al, byte ptr [ebp - 0xd] */
    143     ecx = edi; /* 0x390010E5: mov ecx, edi */
    144     MEM8(edi) = (uint8_t)(LO8(edx)); /* 0x390010E7: mov byte ptr [edi], dl */
    145     MEM8(edi + 0x1) = (uint8_t)(LO8(eax)); /* 0x390010E9: mov byte ptr [edi + 1], al */
    146     MEM8(edi + 0xC) = (uint8_t)(LO8(ebx)); /* 0x390010EC: mov byte ptr [edi + 0xc], bl */
    147     RECOMP_ICALL(0x39006670u); /* 0x390010EF: call 0x39006670 */ /* not lifted */
    148     RECOMP_FLAGS_IN();
    149     goto L_390010F8; /* 0x390010F4: jmp 0x390010f8 */
    150 L_390010F6:
    151     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    152     edi = 0; /* 0x390010F6: xor edi, edi */
    153     _cf = 0;
    154     _flag_k = FK_TEST;
    155 L_390010F8:
    156     PUSH32(esp, 0x14u); /* 0x390010F8: push 0x14 */
    157     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x390010FA: mov byte ptr [ebp - 4], 2 */
    158     MEM32(esi + 0x38) = edi; /* 0x390010FE: mov dword ptr [esi + 0x38], edi */
    159     RECOMP_ICALL(0x3900A0ACu); /* 0x39001101: call 0x3900a0ac */ /* not lifted */
    160     RECOMP_FLAGS_IN();
    161     edi = eax; /* 0x39001106: mov edi, eax */
    162     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    163     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    164     esp = esp + 4; /* 0x39001108: add esp, 4 */
    165     _flag_k = FK_ADD;
    166     MEM32(ebp + (-0x18)) = edi; /* 0x3900110B: mov dword ptr [ebp - 0x18], edi */
    167     /* cmp edi, ebx */ /* 0x3900110E: cmp edi, ebx */
    168     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
    169     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    170     _flag_k = FK_CMP;
    171     MEM8(ebp + (-0x4)) = (uint8_t)(6); /* 0x39001110: mov byte ptr [ebp - 4], 6 */
    172     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900112D; /* 0x39001114: je 0x3900112d */
    173 L_39001116:
    174     SET_LO8(ecx, MEM8(ebp + (-0xD))); /* 0x39001116: mov cl, byte ptr [ebp - 0xd] */
    175     SET_LO8(edx, MEM8(ebp + (-0xD))); /* 0x39001119: mov dl, byte ptr [ebp - 0xd] */
    176     MEM8(edi) = (uint8_t)(LO8(ecx)); /* 0x3900111C: mov byte ptr [edi], cl */
    177     ecx = edi; /* 0x3900111E: mov ecx, edi */
    178     MEM8(edi + 0x1) = (uint8_t)(LO8(edx)); /* 0x39001120: mov byte ptr [edi + 1], dl */
    179     MEM8(edi + 0xC) = (uint8_t)(LO8(ebx)); /* 0x39001123: mov byte ptr [edi + 0xc], bl */
    180     RECOMP_ICALL(0x39005B10u); /* 0x39001126: call 0x39005b10 */ /* not lifted */
    181     RECOMP_FLAGS_IN();
    182     goto L_3900112F; /* 0x3900112B: jmp 0x3900112f */
    183 L_3900112D:
    184     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    185     edi = 0; /* 0x3900112D: xor edi, edi */
    186     _cf = 0;
    187     _flag_k = FK_TEST;
    188 L_3900112F:
    189     PUSH32(esp, 0x14u); /* 0x3900112F: push 0x14 */
    190     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x39001131: mov byte ptr [ebp - 4], 2 */
    191     MEM32(esi + 0x3C) = edi; /* 0x39001135: mov dword ptr [esi + 0x3c], edi */
    192     RECOMP_ICALL(0x3900A0ACu); /* 0x39001138: call 0x3900a0ac */ /* not lifted */
    193     RECOMP_FLAGS_IN();
    194     edi = eax; /* 0x3900113D: mov edi, eax */
    195     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    196     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    197     esp = esp + 4; /* 0x3900113F: add esp, 4 */
    198     _flag_k = FK_ADD;
    199     MEM32(ebp + (-0x18)) = edi; /* 0x39001142: mov dword ptr [ebp - 0x18], edi */
    200     /* cmp edi, ebx */ /* 0x39001145: cmp edi, ebx */
    201     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
    202     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    203     _flag_k = FK_CMP;
    204     MEM8(ebp + (-0x4)) = (uint8_t)(7); /* 0x39001147: mov byte ptr [ebp - 4], 7 */
    205     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001164; /* 0x3900114B: je 0x39001164 */
    206 L_3900114D:
    207     SET_LO8(ecx, MEM8(ebp + (-0xD))); /* 0x3900114D: mov cl, byte ptr [ebp - 0xd] */
    208     SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x39001150: mov al, byte ptr [ebp - 0xd] */
    209     MEM8(edi + 0x1) = (uint8_t)(LO8(ecx)); /* 0x39001153: mov byte ptr [edi + 1], cl */
    210     ecx = edi; /* 0x39001156: mov ecx, edi */
    211     MEM8(edi) = (uint8_t)(LO8(eax)); /* 0x39001158: mov byte ptr [edi], al */
    212     MEM8(edi + 0xC) = (uint8_t)(LO8(ebx)); /* 0x3900115A: mov byte ptr [edi + 0xc], bl */
    213     RECOMP_ICALL(0x39005B10u); /* 0x3900115D: call 0x39005b10 */ /* not lifted */
    214     RECOMP_FLAGS_IN();
    215     goto L_39001166; /* 0x39001162: jmp 0x39001166 */
    216 L_39001164:
    217     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    218     edi = 0; /* 0x39001164: xor edi, edi */
    219     _cf = 0;
    220     _flag_k = FK_TEST;
    221 L_39001166:
    222     PUSH32(esp, 0x14u); /* 0x39001166: push 0x14 */
    223     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x39001168: mov byte ptr [ebp - 4], 2 */
    224     MEM32(esi + 0x40) = edi; /* 0x3900116C: mov dword ptr [esi + 0x40], edi */
    225     RECOMP_ICALL(0x3900A0ACu); /* 0x3900116F: call 0x3900a0ac */ /* not lifted */
    226     RECOMP_FLAGS_IN();
    227     edi = eax; /* 0x39001174: mov edi, eax */
    228     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    229     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    230     esp = esp + 4; /* 0x39001176: add esp, 4 */
    231     _flag_k = FK_ADD;
    232     MEM32(ebp + (-0x18)) = edi; /* 0x39001179: mov dword ptr [ebp - 0x18], edi */
    233     /* cmp edi, ebx */ /* 0x3900117C: cmp edi, ebx */
    234     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
    235     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    236     _flag_k = FK_CMP;
    237     MEM8(ebp + (-0x4)) = (uint8_t)(8); /* 0x3900117E: mov byte ptr [ebp - 4], 8 */
    238     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900119B; /* 0x39001182: je 0x3900119b */
    239 L_39001184:
    240     SET_LO8(edx, MEM8(ebp + (-0xD))); /* 0x39001184: mov dl, byte ptr [ebp - 0xd] */
    241     SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x39001187: mov al, byte ptr [ebp - 0xd] */
    242     ecx = edi; /* 0x3900118A: mov ecx, edi */
    243     MEM8(edi) = (uint8_t)(LO8(edx)); /* 0x3900118C: mov byte ptr [edi], dl */
    244     MEM8(edi + 0x1) = (uint8_t)(LO8(eax)); /* 0x3900118E: mov byte ptr [edi + 1], al */
    245     MEM8(edi + 0xC) = (uint8_t)(LO8(ebx)); /* 0x39001191: mov byte ptr [edi + 0xc], bl */
    246     RECOMP_ICALL(0x39006670u); /* 0x39001194: call 0x39006670 */ /* not lifted */
    247     RECOMP_FLAGS_IN();
    248     goto L_3900119D; /* 0x39001199: jmp 0x3900119d */
    249 L_3900119B:
    250     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    251     edi = 0; /* 0x3900119B: xor edi, edi */
    252     _cf = 0;
    253     _flag_k = FK_TEST;
    254 L_3900119D:
    255     PUSH32(esp, 0x14u); /* 0x3900119D: push 0x14 */
    256     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x3900119F: mov byte ptr [ebp - 4], 2 */
    257     MEM32(esi + 0x44) = edi; /* 0x390011A3: mov dword ptr [esi + 0x44], edi */
    258     RECOMP_ICALL(0x3900A0ACu); /* 0x390011A6: call 0x3900a0ac */ /* not lifted */
    259     RECOMP_FLAGS_IN();
    260     edi = eax; /* 0x390011AB: mov edi, eax */
    261     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    262     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    263     esp = esp + 4; /* 0x390011AD: add esp, 4 */
    264     _flag_k = FK_ADD;
    265     MEM32(ebp + (-0x18)) = edi; /* 0x390011B0: mov dword ptr [ebp - 0x18], edi */
    266     /* cmp edi, ebx */ /* 0x390011B3: cmp edi, ebx */
    267     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
    268     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    269     _flag_k = FK_CMP;
    270     MEM8(ebp + (-0x4)) = (uint8_t)(9); /* 0x390011B5: mov byte ptr [ebp - 4], 9 */
    271     if (CMP_EQ(_flag_a, _flag_b)) goto L_390011D2; /* 0x390011B9: je 0x390011d2 */
    272 L_390011BB:
    273     SET_LO8(ecx, MEM8(ebp + (-0xD))); /* 0x390011BB: mov cl, byte ptr [ebp - 0xd] */
    274     SET_LO8(edx, MEM8(ebp + (-0xD))); /* 0x390011BE: mov dl, byte ptr [ebp - 0xd] */
    275     MEM8(edi) = (uint8_t)(LO8(ecx)); /* 0x390011C1: mov byte ptr [edi], cl */
    276     ecx = edi; /* 0x390011C3: mov ecx, edi */
    277     MEM8(edi + 0x1) = (uint8_t)(LO8(edx)); /* 0x390011C5: mov byte ptr [edi + 1], dl */
    278     MEM8(edi + 0xC) = (uint8_t)(LO8(ebx)); /* 0x390011C8: mov byte ptr [edi + 0xc], bl */
    279     RECOMP_ICALL(0x39005B10u); /* 0x390011CB: call 0x39005b10 */ /* not lifted */
    280     RECOMP_FLAGS_IN();
    281     goto L_390011D4; /* 0x390011D0: jmp 0x390011d4 */
    282 L_390011D2:
    283     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    284     edi = 0; /* 0x390011D2: xor edi, edi */
    285     _cf = 0;
    286     _flag_k = FK_TEST;
    287 L_390011D4:
    288     PUSH32(esp, 0x14u); /* 0x390011D4: push 0x14 */
    289     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x390011D6: mov byte ptr [ebp - 4], 2 */
    290     MEM32(esi + 0x48) = edi; /* 0x390011DA: mov dword ptr [esi + 0x48], edi */
    291     RECOMP_ICALL(0x3900A0ACu); /* 0x390011DD: call 0x3900a0ac */ /* not lifted */
    292     RECOMP_FLAGS_IN();
    293     edi = eax; /* 0x390011E2: mov edi, eax */
    294     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    295     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    296     esp = esp + 4; /* 0x390011E4: add esp, 4 */
    297     _flag_k = FK_ADD;
    298     MEM32(ebp + (-0x18)) = edi; /* 0x390011E7: mov dword ptr [ebp - 0x18], edi */
    299     /* cmp edi, ebx */ /* 0x390011EA: cmp edi, ebx */
    300     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
    301     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    302     _flag_k = FK_CMP;
    303     MEM8(ebp + (-0x4)) = (uint8_t)(0xAu); /* 0x390011EC: mov byte ptr [ebp - 4], 0xa */
    304     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001204; /* 0x390011F0: je 0x39001204 */
    305 L_390011F2:
    306     eax = ebp + (-0xD); /* 0x390011F2: lea eax, [ebp - 0xd] */
    307     ecx = ebp + (-0xE); /* 0x390011F5: lea ecx, [ebp - 0xe] */
    308     PUSH32(esp, eax); /* 0x390011F8: push eax */
    309     PUSH32(esp, ebx); /* 0x390011F9: push ebx */
    310     PUSH32(esp, ecx); /* 0x390011FA: push ecx */
    311     ecx = edi; /* 0x390011FB: mov ecx, edi */
    312     RECOMP_ICALL(0x39004A70u); /* 0x390011FD: call 0x39004a70 */ /* not lifted */
    313     RECOMP_FLAGS_IN();
    314     goto L_39001206; /* 0x39001202: jmp 0x39001206 */
    315 L_39001204:
    316     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    317     edi = 0; /* 0x39001204: xor edi, edi */
    318     _cf = 0;
    319     _flag_k = FK_TEST;
    320 L_39001206:
    321     PUSH32(esp, 0x14u); /* 0x39001206: push 0x14 */
    322     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x39001208: mov byte ptr [ebp - 4], 2 */
    323     MEM32(esi + 0x4C) = edi; /* 0x3900120C: mov dword ptr [esi + 0x4c], edi */
    324     RECOMP_ICALL(0x3900A0ACu); /* 0x3900120F: call 0x3900a0ac */ /* not lifted */
    325     RECOMP_FLAGS_IN();
    326     edi = eax; /* 0x39001214: mov edi, eax */
    327     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    328     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    329     esp = esp + 4; /* 0x39001216: add esp, 4 */
    330     _flag_k = FK_ADD;
    331     MEM32(ebp + (-0x18)) = edi; /* 0x39001219: mov dword ptr [ebp - 0x18], edi */
    332     /* cmp edi, ebx */ /* 0x3900121C: cmp edi, ebx */
    333     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
    334     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    335     _flag_k = FK_CMP;
    336     MEM8(ebp + (-0x4)) = (uint8_t)(0xBu); /* 0x3900121E: mov byte ptr [ebp - 4], 0xb */
    337     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001236; /* 0x39001222: je 0x39001236 */
    338 L_39001224:
    339     edx = ebp + (-0xE); /* 0x39001224: lea edx, [ebp - 0xe] */
    340     eax = ebp + (-0xD); /* 0x39001227: lea eax, [ebp - 0xd] */
    341     PUSH32(esp, edx); /* 0x3900122A: push edx */
    342     PUSH32(esp, ebx); /* 0x3900122B: push ebx */
    343     PUSH32(esp, eax); /* 0x3900122C: push eax */
    344     ecx = edi; /* 0x3900122D: mov ecx, edi */
    345     RECOMP_ICALL(0x39004CE0u); /* 0x3900122F: call 0x39004ce0 */ /* not lifted */
    346     RECOMP_FLAGS_IN();
    347     goto L_39001238; /* 0x39001234: jmp 0x39001238 */
    348 L_39001236:
    349     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    350     edi = 0; /* 0x39001236: xor edi, edi */
    351     _cf = 0;
    352     _flag_k = FK_TEST;
    353 L_39001238:
    354     ecx = MEM32(ebp + (-0xC)); /* 0x39001238: mov ecx, dword ptr [ebp - 0xc] */
    355     MEM32(esi + 0x50) = edi; /* 0x3900123B: mov dword ptr [esi + 0x50], edi */
    356     MEM32(0x3900E520) = esi; /* 0x3900123E: mov dword ptr [0x3900e520], esi */
    357     eax = esi; /* 0x39001244: mov eax, esi */
    358     edi = POP32_VAL(esp); /* 0x39001246: pop edi */
    359     esi = POP32_VAL(esp); /* 0x39001247: pop esi */
    360     ebx = POP32_VAL(esp); /* 0x39001248: pop ebx */
    361     MEM32(FS_BASE + (0)) = ecx; /* 0x39001249: mov dword ptr fs:[0], ecx */
    362     esp = ebp; /* 0x39001250: mov esp, ebp */
    363     ebp = POP32_VAL(esp); /* 0x39001252: pop ebp */
    364     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39001253: ret  */
    365     RECOMP_REGS_OUT();
    366 }
    367 
    368 void sub_39001260(void) {
    369     int _fpu_cmp = 0;
    370     uint32_t _cf = 0;
    371     int _df = 1;
    372     uint32_t _flag_k = FK_NONE;
    373     uint32_t _flag_a = 0, _flag_b = 0;
    374     uint32_t _itail_tgt = 0;
    375     RECOMP_REGS_LOCALS
    376     RECOMP_ENTER(0x39001260u);
    377 
    378 L_39001260:
    379     PUSH32(esp, ebp); /* 0x39001260: push ebp */
    380     ebp = esp; /* 0x39001261: mov ebp, esp */
    381     PUSH32(esp, 0xFFFFFFFFu); /* 0x39001263: push -1 */
    382     PUSH32(esp, 0x3900A4B1u); /* 0x39001265: push 0x3900a4b1 */
    383     eax = MEM32(FS_BASE + (0)); /* 0x3900126A: mov eax, dword ptr fs:[0] */
    384     PUSH32(esp, eax); /* 0x39001270: push eax */
    385     MEM32(FS_BASE + (0)) = esp; /* 0x39001271: mov dword ptr fs:[0], esp */
    386     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
    387     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    388     esp = esp - 0xCu; /* 0x39001278: sub esp, 0xc */
    389     _flag_k = FK_CMP;
    390     PUSH32(esp, ebx); /* 0x3900127B: push ebx */
    391     PUSH32(esp, esi); /* 0x3900127C: push esi */
    392     PUSH32(esp, edi); /* 0x3900127D: push edi */
    393     edi = ecx; /* 0x3900127E: mov edi, ecx */
    394     MEM32(ebp + (-0x10)) = edi; /* 0x39001280: mov dword ptr [ebp - 0x10], edi */
    395     esi = MEM32(edi + 0x30); /* 0x39001283: mov esi, dword ptr [edi + 0x30] */
    396     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    397     ebx = 0; /* 0x39001286: xor ebx, ebx */
    398     _cf = 0;
    399     _flag_k = FK_TEST;
    400     /* cmp esi, ebx */ /* 0x39001288: cmp esi, ebx */
    401     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    402     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    403     _flag_k = FK_CMP;
    404     MEM32(ebp + (-0x4)) = 2; /* 0x3900128A: mov dword ptr [ebp - 4], 2 */
    405     if (CMP_EQ(_flag_a, _flag_b)) goto L_390012A3; /* 0x39001291: je 0x390012a3 */
    406 L_39001293:
    407     ecx = esi; /* 0x39001293: mov ecx, esi */
    408     RECOMP_ICALL(0x39004430u); /* 0x39001295: call 0x39004430 */ /* not lifted */
    409     RECOMP_FLAGS_IN();
    410     PUSH32(esp, esi); /* 0x3900129A: push esi */
    411     RECOMP_ICALL(0x3900A0A0u); /* 0x3900129B: call 0x3900a0a0 */ /* not lifted */
    412     RECOMP_FLAGS_IN();
    413     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    414     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    415     esp = esp + 4; /* 0x390012A0: add esp, 4 */
    416     _flag_k = FK_ADD;
    417 L_390012A3:
    418     esi = MEM32(edi + 0x34); /* 0x390012A3: mov esi, dword ptr [edi + 0x34] */
    419     /* cmp esi, ebx */ /* 0x390012A6: cmp esi, ebx */
    420     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    421     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    422     _flag_k = FK_CMP;
    423     if (CMP_EQ(_flag_a, _flag_b)) goto L_390012BA; /* 0x390012A8: je 0x390012ba */
    424 L_390012AA:
    425     ecx = esi; /* 0x390012AA: mov ecx, esi */
    426     RECOMP_ICALL(0x390044F0u); /* 0x390012AC: call 0x390044f0 */ /* not lifted */
    427     RECOMP_FLAGS_IN();
    428     PUSH32(esp, esi); /* 0x390012B1: push esi */
    429     RECOMP_ICALL(0x3900A0A0u); /* 0x390012B2: call 0x3900a0a0 */ /* not lifted */
    430     RECOMP_FLAGS_IN();
    431     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    432     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    433     esp = esp + 4; /* 0x390012B7: add esp, 4 */
    434     _flag_k = FK_ADD;
    435 L_390012BA:
    436     esi = MEM32(edi + 0x38); /* 0x390012BA: mov esi, dword ptr [edi + 0x38] */
    437     /* cmp esi, ebx */ /* 0x390012BD: cmp esi, ebx */
    438     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    439     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    440     _flag_k = FK_CMP;
    441     if (CMP_EQ(_flag_a, _flag_b)) goto L_390012D1; /* 0x390012BF: je 0x390012d1 */
    442 L_390012C1:
    443     ecx = esi; /* 0x390012C1: mov ecx, esi */
    444     RECOMP_ICALL(0x390045B0u); /* 0x390012C3: call 0x390045b0 */ /* not lifted */
    445     RECOMP_FLAGS_IN();
    446     PUSH32(esp, esi); /* 0x390012C8: push esi */
    447     RECOMP_ICALL(0x3900A0A0u); /* 0x390012C9: call 0x3900a0a0 */ /* not lifted */
    448     RECOMP_FLAGS_IN();
    449     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    450     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    451     esp = esp + 4; /* 0x390012CE: add esp, 4 */
    452     _flag_k = FK_ADD;
    453 L_390012D1:
    454     esi = MEM32(edi + 0x3C); /* 0x390012D1: mov esi, dword ptr [edi + 0x3c] */
    455     /* cmp esi, ebx */ /* 0x390012D4: cmp esi, ebx */
    456     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    457     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    458     _flag_k = FK_CMP;
    459     if (CMP_EQ(_flag_a, _flag_b)) goto L_390012E8; /* 0x390012D6: je 0x390012e8 */
    460 L_390012D8:
    461     ecx = esi; /* 0x390012D8: mov ecx, esi */
    462     RECOMP_ICALL(0x39004430u); /* 0x390012DA: call 0x39004430 */ /* not lifted */
    463     RECOMP_FLAGS_IN();
    464     PUSH32(esp, esi); /* 0x390012DF: push esi */
    465     RECOMP_ICALL(0x3900A0A0u); /* 0x390012E0: call 0x3900a0a0 */ /* not lifted */
    466     RECOMP_FLAGS_IN();
    467     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    468     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    469     esp = esp + 4; /* 0x390012E5: add esp, 4 */
    470     _flag_k = FK_ADD;
    471 L_390012E8:
    472     esi = MEM32(edi + 0x40); /* 0x390012E8: mov esi, dword ptr [edi + 0x40] */
    473     /* cmp esi, ebx */ /* 0x390012EB: cmp esi, ebx */
    474     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    475     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    476     _flag_k = FK_CMP;
    477     if (CMP_EQ(_flag_a, _flag_b)) goto L_390012FF; /* 0x390012ED: je 0x390012ff */
    478 L_390012EF:
    479     ecx = esi; /* 0x390012EF: mov ecx, esi */
    480     RECOMP_ICALL(0x390044F0u); /* 0x390012F1: call 0x390044f0 */ /* not lifted */
    481     RECOMP_FLAGS_IN();
    482     PUSH32(esp, esi); /* 0x390012F6: push esi */
    483     RECOMP_ICALL(0x3900A0A0u); /* 0x390012F7: call 0x3900a0a0 */ /* not lifted */
    484     RECOMP_FLAGS_IN();
    485     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    486     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    487     esp = esp + 4; /* 0x390012FC: add esp, 4 */
    488     _flag_k = FK_ADD;
    489 L_390012FF:
    490     esi = MEM32(edi + 0x44); /* 0x390012FF: mov esi, dword ptr [edi + 0x44] */
    491     /* cmp esi, ebx */ /* 0x39001302: cmp esi, ebx */
    492     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    493     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    494     _flag_k = FK_CMP;
    495     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001316; /* 0x39001304: je 0x39001316 */
    496 L_39001306:
    497     ecx = esi; /* 0x39001306: mov ecx, esi */
    498     RECOMP_ICALL(0x390045B0u); /* 0x39001308: call 0x390045b0 */ /* not lifted */
    499     RECOMP_FLAGS_IN();
    500     PUSH32(esp, esi); /* 0x3900130D: push esi */
    501     RECOMP_ICALL(0x3900A0A0u); /* 0x3900130E: call 0x3900a0a0 */ /* not lifted */
    502     RECOMP_FLAGS_IN();
    503     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    504     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    505     esp = esp + 4; /* 0x39001313: add esp, 4 */
    506     _flag_k = FK_ADD;
    507 L_39001316:
    508     esi = MEM32(edi + 0x48); /* 0x39001316: mov esi, dword ptr [edi + 0x48] */
    509     /* cmp esi, ebx */ /* 0x39001319: cmp esi, ebx */
    510     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    511     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    512     _flag_k = FK_CMP;
    513     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900132D; /* 0x3900131B: je 0x3900132d */
    514 L_3900131D:
    515     ecx = esi; /* 0x3900131D: mov ecx, esi */
    516     RECOMP_ICALL(0x39004430u); /* 0x3900131F: call 0x39004430 */ /* not lifted */
    517     RECOMP_FLAGS_IN();
    518     PUSH32(esp, esi); /* 0x39001324: push esi */
    519     RECOMP_ICALL(0x3900A0A0u); /* 0x39001325: call 0x3900a0a0 */ /* not lifted */
    520     RECOMP_FLAGS_IN();
    521     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    522     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    523     esp = esp + 4; /* 0x3900132A: add esp, 4 */
    524     _flag_k = FK_ADD;
    525 L_3900132D:
    526     esi = MEM32(edi + 0x4C); /* 0x3900132D: mov esi, dword ptr [edi + 0x4c] */
    527     /* cmp esi, ebx */ /* 0x39001330: cmp esi, ebx */
    528     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    529     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    530     _flag_k = FK_CMP;
    531     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001344; /* 0x39001332: je 0x39001344 */
    532 L_39001334:
    533     ecx = esi; /* 0x39001334: mov ecx, esi */
    534     RECOMP_ICALL(0x390044F0u); /* 0x39001336: call 0x390044f0 */ /* not lifted */
    535     RECOMP_FLAGS_IN();
    536     PUSH32(esp, esi); /* 0x3900133B: push esi */
    537     RECOMP_ICALL(0x3900A0A0u); /* 0x3900133C: call 0x3900a0a0 */ /* not lifted */
    538     RECOMP_FLAGS_IN();
    539     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    540     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    541     esp = esp + 4; /* 0x39001341: add esp, 4 */
    542     _flag_k = FK_ADD;
    543 L_39001344:
    544     esi = MEM32(edi + 0x50); /* 0x39001344: mov esi, dword ptr [edi + 0x50] */
    545     /* cmp esi, ebx */ /* 0x39001347: cmp esi, ebx */
    546     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    547     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    548     _flag_k = FK_CMP;
    549     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900138C; /* 0x39001349: je 0x3900138c */
    550 L_3900134B:
    551     eax = MEM32(esi + 0x4); /* 0x3900134B: mov eax, dword ptr [esi + 4] */
    552     ecx = esi; /* 0x3900134E: mov ecx, esi */
    553     PUSH32(esp, eax); /* 0x39001350: push eax */
    554     eax = ebp + (-0x14); /* 0x39001351: lea eax, [ebp - 0x14] */
    555     PUSH32(esp, eax); /* 0x39001354: push eax */
    556     RECOMP_ICALL(0x39009C30u); /* 0x39001355: call 0x39009c30 */ /* not lifted */
    557     RECOMP_FLAGS_IN();
    558     ecx = MEM32(eax); /* 0x3900135A: mov ecx, dword ptr [eax] */
    559     edx = ebp + (-0x18); /* 0x3900135C: lea edx, [ebp - 0x18] */
    560     PUSH32(esp, ecx); /* 0x3900135F: push ecx */
    561     PUSH32(esp, edx); /* 0x39001360: push edx */
    562     ecx = esi; /* 0x39001361: mov ecx, esi */
    563     RECOMP_ICALL(0x39004D50u); /* 0x39001363: call 0x39004d50 */ /* not lifted */
    564     RECOMP_FLAGS_IN();
    565     eax = MEM32(esi + 0x4); /* 0x39001368: mov eax, dword ptr [esi + 4] */
    566     PUSH32(esp, eax); /* 0x3900136B: push eax */
    567     RECOMP_ICALL(0x3900A0A0u); /* 0x3900136C: call 0x3900a0a0 */ /* not lifted */
    568     RECOMP_FLAGS_IN();
    569     eax = MEM32(esi + 0x8); /* 0x39001371: mov eax, dword ptr [esi + 8] */
    570     MEM32(esi + 0x4) = ebx; /* 0x39001374: mov dword ptr [esi + 4], ebx */
    571     PUSH32(esp, eax); /* 0x39001377: push eax */
    572     MEM32(esi + 0x10) = ebx; /* 0x39001378: mov dword ptr [esi + 0x10], ebx */
    573     RECOMP_ICALL(0x3900A0A0u); /* 0x3900137B: call 0x3900a0a0 */ /* not lifted */
    574     RECOMP_FLAGS_IN();
    575     PUSH32(esp, esi); /* 0x39001380: push esi */
    576     MEM32(esi + 0x8) = ebx; /* 0x39001381: mov dword ptr [esi + 8], ebx */
    577     RECOMP_ICALL(0x3900A0A0u); /* 0x39001384: call 0x3900a0a0 */ /* not lifted */
    578     RECOMP_FLAGS_IN();
    579     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
    580     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    581     esp = esp + 0xCu; /* 0x39001389: add esp, 0xc */
    582     _flag_k = FK_ADD;
    583 L_3900138C:
    584     PUSH32(esp, 1); /* 0x3900138C: push 1 */
    585     ecx = edi + 0x20; /* 0x3900138E: lea ecx, [edi + 0x20] */
    586     MEM32(0x3900E520) = ebx; /* 0x39001391: mov dword ptr [0x3900e520], ebx */
    587     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x39001397: mov byte ptr [ebp - 4], 1 */
    588     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x3900139B: call dword ptr [0x3900b040] */
    589     RECOMP_FLAGS_IN();
    590     eax = MEM32(edi + 0x14); /* 0x390013A1: mov eax, dword ptr [edi + 0x14] */
    591     /* cmp eax, ebx */ /* 0x390013A4: cmp eax, ebx */
    592     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
    593     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    594     _flag_k = FK_CMP;
    595     if (CMP_EQ(_flag_a, _flag_b)) goto L_390013C5; /* 0x390013A6: je 0x390013c5 */
    596 L_390013A8:
    597     ecx = eax + (-0x1); /* 0x390013A8: lea ecx, [eax - 1] */
    598     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x390013AB: mov al, byte ptr [eax - 1] */
    599     /* cmp LO8(eax), LO8(ebx) */ /* 0x390013AE: cmp al, bl */
    600     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
    601     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    602     _flag_k = FK_NARROW(FK_CMP, 24);
    603     if (CMP_EQ(_flag_a, _flag_b)) goto L_390013BC; /* 0x390013B0: je 0x390013bc */
    604 L_390013B2:
    605     /* cmp LO8(eax), 0xFFu */ /* 0x390013B2: cmp al, 0xff */
    606     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
    607     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    608     _flag_k = FK_NARROW(FK_CMP, 24);
    609     if (CMP_EQ(_flag_a, _flag_b)) goto L_390013BC; /* 0x390013B4: je 0x390013bc */
    610 L_390013B6:
    611     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
    612     SET_LO8(eax, LO8(eax) - 1); /* 0x390013B6: dec al */
    613     _flag_k = FK_NARROW(FK_DEC, 24);
    614     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x390013B8: mov byte ptr [ecx], al */
    615     goto L_390013C5; /* 0x390013BA: jmp 0x390013c5 */
    616 L_390013BC:
    617     PUSH32(esp, ecx); /* 0x390013BC: push ecx */
    618     RECOMP_ICALL(0x3900A0A0u); /* 0x390013BD: call 0x3900a0a0 */ /* not lifted */
    619     RECOMP_FLAGS_IN();
    620     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    621     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    622     esp = esp + 4; /* 0x390013C2: add esp, 4 */
    623     _flag_k = FK_ADD;
    624 L_390013C5:
    625     MEM32(edi + 0x14) = ebx; /* 0x390013C5: mov dword ptr [edi + 0x14], ebx */
    626     MEM32(edi + 0x18) = ebx; /* 0x390013C8: mov dword ptr [edi + 0x18], ebx */
    627     MEM32(edi + 0x1C) = ebx; /* 0x390013CB: mov dword ptr [edi + 0x1c], ebx */
    628     eax = MEM32(edi + 0x4); /* 0x390013CE: mov eax, dword ptr [edi + 4] */
    629     /* cmp eax, ebx */ /* 0x390013D1: cmp eax, ebx */
    630     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
    631     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    632     _flag_k = FK_CMP;
    633     if (CMP_EQ(_flag_a, _flag_b)) goto L_390013F2; /* 0x390013D3: je 0x390013f2 */
    634 L_390013D5:
    635     ecx = eax + (-0x1); /* 0x390013D5: lea ecx, [eax - 1] */
    636     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x390013D8: mov al, byte ptr [eax - 1] */
    637     /* cmp LO8(eax), LO8(ebx) */ /* 0x390013DB: cmp al, bl */
    638     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
    639     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    640     _flag_k = FK_NARROW(FK_CMP, 24);
    641     if (CMP_EQ(_flag_a, _flag_b)) goto L_390013E9; /* 0x390013DD: je 0x390013e9 */
    642 L_390013DF:
    643     /* cmp LO8(eax), 0xFFu */ /* 0x390013DF: cmp al, 0xff */
    644     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
    645     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    646     _flag_k = FK_NARROW(FK_CMP, 24);
    647     if (CMP_EQ(_flag_a, _flag_b)) goto L_390013E9; /* 0x390013E1: je 0x390013e9 */
    648 L_390013E3:
    649     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
    650     SET_LO8(eax, LO8(eax) - 1); /* 0x390013E3: dec al */
    651     _flag_k = FK_NARROW(FK_DEC, 24);
    652     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x390013E5: mov byte ptr [ecx], al */
    653     goto L_390013F2; /* 0x390013E7: jmp 0x390013f2 */
    654 L_390013E9:
    655     PUSH32(esp, ecx); /* 0x390013E9: push ecx */
    656     RECOMP_ICALL(0x3900A0A0u); /* 0x390013EA: call 0x3900a0a0 */ /* not lifted */
    657     RECOMP_FLAGS_IN();
    658     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    659     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    660     esp = esp + 4; /* 0x390013EF: add esp, 4 */
    661     _flag_k = FK_ADD;
    662 L_390013F2:
    663     ecx = MEM32(ebp + (-0xC)); /* 0x390013F2: mov ecx, dword ptr [ebp - 0xc] */
    664     MEM32(edi + 0x4) = ebx; /* 0x390013F5: mov dword ptr [edi + 4], ebx */
    665     MEM32(edi + 0x8) = ebx; /* 0x390013F8: mov dword ptr [edi + 8], ebx */
    666     MEM32(edi + 0xC) = ebx; /* 0x390013FB: mov dword ptr [edi + 0xc], ebx */
    667     edi = POP32_VAL(esp); /* 0x390013FE: pop edi */
    668     esi = POP32_VAL(esp); /* 0x390013FF: pop esi */
    669     ebx = POP32_VAL(esp); /* 0x39001400: pop ebx */
    670     MEM32(FS_BASE + (0)) = ecx; /* 0x39001401: mov dword ptr fs:[0], ecx */
    671     esp = ebp; /* 0x39001408: mov esp, ebp */
    672     ebp = POP32_VAL(esp); /* 0x3900140A: pop ebp */
    673     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3900140B: ret  */
    674     RECOMP_REGS_OUT();
    675 }
    676 
    677 void sub_39001410(void) {
    678     int _fpu_cmp = 0;
    679     uint32_t _cf = 0;
    680     int _df = 1;
    681     uint32_t _flag_k = FK_NONE;
    682     uint32_t _flag_a = 0, _flag_b = 0;
    683     uint32_t _itail_tgt = 0;
    684     RECOMP_REGS_LOCALS
    685     RECOMP_ENTER(0x39001410u);
    686 
    687 L_39001410:
    688     PUSH32(esp, ebp); /* 0x39001410: push ebp */
    689     ebp = esp; /* 0x39001411: mov ebp, esp */
    690     PUSH32(esp, ecx); /* 0x39001413: push ecx */
    691     PUSH32(esp, ebx); /* 0x39001414: push ebx */
    692     PUSH32(esp, esi); /* 0x39001415: push esi */
    693     PUSH32(esp, edi); /* 0x39001416: push edi */
    694     edi = MEM32(ebp + 0x8); /* 0x39001417: mov edi, dword ptr [ebp + 8] */
    695     /* test edi, edi */ /* 0x3900141A: test edi, edi */
    696     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
    697     _cf = 0;
    698     _flag_k = FK_TEST;
    699     esi = ecx; /* 0x3900141C: mov esi, ecx */
    700     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001425; /* 0x3900141E: jne 0x39001425 */
    701 L_39001420:
    702     ecx = MEM32(esi + 0x30); /* 0x39001420: mov ecx, dword ptr [esi + 0x30] */
    703     goto L_39001432; /* 0x39001423: jmp 0x39001432 */
    704 L_39001425:
    705     /* cmp edi, 2 */ /* 0x39001425: cmp edi, 2 */
    706     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2);
    707     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    708     _flag_k = FK_CMP;
    709     if (CMP_NE(_flag_a, _flag_b)) goto L_3900142F; /* 0x39001428: jne 0x3900142f */
    710 L_3900142A:
    711     ecx = MEM32(esi + 0x48); /* 0x3900142A: mov ecx, dword ptr [esi + 0x48] */
    712     goto L_39001432; /* 0x3900142D: jmp 0x39001432 */
    713 L_3900142F:
    714     ecx = MEM32(esi + 0x3C); /* 0x3900142F: mov ecx, dword ptr [esi + 0x3c] */
    715 L_39001432:
    716     eax = MEM32(ecx + 0x4); /* 0x39001432: mov eax, dword ptr [ecx + 4] */
    717     PUSH32(esp, eax); /* 0x39001435: push eax */
    718     edx = MEM32(eax); /* 0x39001436: mov edx, dword ptr [eax] */
    719     eax = ebp + 0x8; /* 0x39001438: lea eax, [ebp + 8] */
    720     PUSH32(esp, edx); /* 0x3900143B: push edx */
    721     PUSH32(esp, eax); /* 0x3900143C: push eax */
    722     RECOMP_ICALL(0x39004930u); /* 0x3900143D: call 0x39004930 */ /* not lifted */
    723     RECOMP_FLAGS_IN();
    724     /* test edi, edi */ /* 0x39001442: test edi, edi */
    725     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
    726     _cf = 0;
    727     _flag_k = FK_TEST;
    728     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900144B; /* 0x39001444: jne 0x3900144b */
    729 L_39001446:
    730     ecx = MEM32(esi + 0x34); /* 0x39001446: mov ecx, dword ptr [esi + 0x34] */
    731     goto L_39001458; /* 0x39001449: jmp 0x39001458 */
    732 L_3900144B:
    733     /* cmp edi, 2 */ /* 0x3900144B: cmp edi, 2 */
    734     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2);
    735     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    736     _flag_k = FK_CMP;
    737     if (CMP_NE(_flag_a, _flag_b)) goto L_39001455; /* 0x3900144E: jne 0x39001455 */
    738 L_39001450:
    739     ecx = MEM32(esi + 0x4C); /* 0x39001450: mov ecx, dword ptr [esi + 0x4c] */
    740     goto L_39001458; /* 0x39001453: jmp 0x39001458 */
    741 L_39001455:
    742     ecx = MEM32(esi + 0x40); /* 0x39001455: mov ecx, dword ptr [esi + 0x40] */
    743 L_39001458:
    744     eax = MEM32(ecx + 0x4); /* 0x39001458: mov eax, dword ptr [ecx + 4] */
    745     PUSH32(esp, eax); /* 0x3900145B: push eax */
    746     edx = MEM32(eax); /* 0x3900145C: mov edx, dword ptr [eax] */
    747     PUSH32(esp, edx); /* 0x3900145E: push edx */
    748     edx = ebp + 0x8; /* 0x3900145F: lea edx, [ebp + 8] */
    749     PUSH32(esp, edx); /* 0x39001462: push edx */
    750     RECOMP_ICALL(0x39004AF0u); /* 0x39001463: call 0x39004af0 */ /* not lifted */
    751     RECOMP_FLAGS_IN();
    752     /* test edi, edi */ /* 0x39001468: test edi, edi */
    753     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
    754     _cf = 0;
    755     _flag_k = FK_TEST;
    756     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001471; /* 0x3900146A: jne 0x39001471 */
    757 L_3900146C:
    758     esi = MEM32(esi + 0x38); /* 0x3900146C: mov esi, dword ptr [esi + 0x38] */
    759     goto L_3900147E; /* 0x3900146F: jmp 0x3900147e */
    760 L_39001471:
    761     /* cmp edi, 2 */ /* 0x39001471: cmp edi, 2 */
    762     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2);
    763     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    764     _flag_k = FK_CMP;
    765     if (CMP_NE(_flag_a, _flag_b)) goto L_3900147B; /* 0x39001474: jne 0x3900147b */
    766 L_39001476:
    767     esi = MEM32(esi + 0x50); /* 0x39001476: mov esi, dword ptr [esi + 0x50] */
    768     goto L_3900147E; /* 0x39001479: jmp 0x3900147e */
    769 L_3900147B:
    770     esi = MEM32(esi + 0x44); /* 0x3900147B: mov esi, dword ptr [esi + 0x44] */
    771 L_3900147E:
    772     edi = MEM32(esi + 0x4); /* 0x3900147E: mov edi, dword ptr [esi + 4] */
    773     ecx = MEM32(esi + 0x10); /* 0x39001481: mov ecx, dword ptr [esi + 0x10] */
    774     /* test ecx, ecx */ /* 0x39001484: test ecx, ecx */
    775     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
    776     _cf = 0;
    777     _flag_k = FK_TEST;
    778     eax = MEM32(edi); /* 0x39001486: mov eax, dword ptr [edi] */
    779     MEM32(ebp + 0x8) = eax; /* 0x39001488: mov dword ptr [ebp + 8], eax */
    780     if (TEST_Z(_flag_a, _flag_b)) goto L_390014F0; /* 0x3900148B: je 0x390014f0 */
    781 L_3900148D:
    782     ecx = eax; /* 0x3900148D: mov ecx, eax */
    783     /* cmp eax, ecx */ /* 0x3900148F: cmp eax, ecx */
    784     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
    785     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    786     _flag_k = FK_CMP;
    787     if (CMP_NE(_flag_a, _flag_b)) goto L_390014F0; /* 0x39001491: jne 0x390014f0 */
    788 L_39001493:
    789     /* cmp edi, edi */ /* 0x39001493: cmp edi, edi */
    790     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
    791     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    792     _flag_k = FK_CMP;
    793     if (CMP_NE(_flag_a, _flag_b)) goto L_390014F0; /* 0x39001495: jne 0x390014f0 */
    794 L_39001497:
    795     ebx = MEM32(edi + 0x4); /* 0x39001497: mov ebx, dword ptr [edi + 4] */
    796     eax = MEM32(esi + 0x8); /* 0x3900149A: mov eax, dword ptr [esi + 8] */
    797     /* cmp ebx, eax */ /* 0x3900149D: cmp ebx, eax */
    798     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
    799     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    800     _flag_k = FK_CMP;
    801     edi = ebx; /* 0x3900149F: mov edi, ebx */
    802     if (CMP_EQ(_flag_a, _flag_b)) goto L_390014CC; /* 0x390014A1: je 0x390014cc */
    803 L_390014A3:
    804     eax = MEM32(edi + 0x8); /* 0x390014A3: mov eax, dword ptr [edi + 8] */
    805     ecx = esi; /* 0x390014A6: mov ecx, esi */
    806     PUSH32(esp, eax); /* 0x390014A8: push eax */
    807     RECOMP_ICALL(0x39006620u); /* 0x390014A9: call 0x39006620 */ /* not lifted */
    808     RECOMP_FLAGS_IN();
    809     edi = MEM32(edi); /* 0x390014AE: mov edi, dword ptr [edi] */
    810     PUSH32(esp, 0); /* 0x390014B0: push 0 */
    811     ecx = ebx + 0xC; /* 0x390014B2: lea ecx, [ebx + 0xc] */
    812     RECOMP_ICALL(0x39007720u); /* 0x390014B5: call 0x39007720 */ /* not lifted */
    813     RECOMP_FLAGS_IN();
    814     PUSH32(esp, ebx); /* 0x390014BA: push ebx */
    815     RECOMP_ICALL(0x3900A0A0u); /* 0x390014BB: call 0x3900a0a0 */ /* not lifted */
    816     RECOMP_FLAGS_IN();
    817     eax = MEM32(esi + 0x8); /* 0x390014C0: mov eax, dword ptr [esi + 8] */
    818     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    819     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    820     esp = esp + 4; /* 0x390014C3: add esp, 4 */
    821     _flag_k = FK_ADD;
    822     /* cmp edi, eax */ /* 0x390014C6: cmp edi, eax */
    823     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
    824     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    825     _flag_k = FK_CMP;
    826     ebx = edi; /* 0x390014C8: mov ebx, edi */
    827     RECOMP_BACKEDGE();
    828     if (CMP_NE(_flag_a, _flag_b)) goto L_390014A3; /* 0x390014CA: jne 0x390014a3 */
    829 L_390014CC:
    830     ecx = MEM32(esi + 0x4); /* 0x390014CC: mov ecx, dword ptr [esi + 4] */
    831     edx = MEM32(esi + 0x8); /* 0x390014CF: mov edx, dword ptr [esi + 8] */
    832     edi = POP32_VAL(esp); /* 0x390014D2: pop edi */
    833     MEM32(ecx + 0x4) = edx; /* 0x390014D3: mov dword ptr [ecx + 4], edx */
    834     eax = MEM32(esi + 0x4); /* 0x390014D6: mov eax, dword ptr [esi + 4] */
    835     MEM32(esi + 0x10) = 0; /* 0x390014D9: mov dword ptr [esi + 0x10], 0 */
    836     MEM32(eax) = eax; /* 0x390014E0: mov dword ptr [eax], eax */
    837     esi = MEM32(esi + 0x4); /* 0x390014E2: mov esi, dword ptr [esi + 4] */
    838     MEM32(esi + 0x8) = esi; /* 0x390014E5: mov dword ptr [esi + 8], esi */
    839     esi = POP32_VAL(esp); /* 0x390014E8: pop esi */
    840     ebx = POP32_VAL(esp); /* 0x390014E9: pop ebx */
    841     esp = ebp; /* 0x390014EA: mov esp, ebp */
    842     ebp = POP32_VAL(esp); /* 0x390014EC: pop ebp */
    843     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x390014ED: ret 4 */
    844 L_390014F0:
    845     /* cmp eax, edi */ /* 0x390014F0: cmp eax, edi */
    846     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
    847     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    848     _flag_k = FK_CMP;
    849     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001511; /* 0x390014F2: je 0x39001511 */
    850 L_390014F4:
    851     ecx = ebp + 0x8; /* 0x390014F4: lea ecx, [ebp + 8] */
    852     ebx = eax; /* 0x390014F7: mov ebx, eax */
    853     RECOMP_ICALL(0x39004F50u); /* 0x390014F9: call 0x39004f50 */ /* not lifted */
    854     RECOMP_FLAGS_IN();
    855     eax = ebp + (-0x4); /* 0x390014FE: lea eax, [ebp - 4] */
    856     PUSH32(esp, ebx); /* 0x39001501: push ebx */
    857     PUSH32(esp, eax); /* 0x39001502: push eax */
    858     ecx = esi; /* 0x39001503: mov ecx, esi */
    859     RECOMP_ICALL(0x39006250u); /* 0x39001505: call 0x39006250 */ /* not lifted */
    860     RECOMP_FLAGS_IN();
    861     eax = MEM32(ebp + 0x8); /* 0x3900150A: mov eax, dword ptr [ebp + 8] */
    862     /* cmp eax, edi */ /* 0x3900150D: cmp eax, edi */
    863     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
    864     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    865     _flag_k = FK_CMP;
    866     RECOMP_BACKEDGE();
    867     if (CMP_NE(_flag_a, _flag_b)) goto L_390014F4; /* 0x3900150F: jne 0x390014f4 */
    868 L_39001511:
    869     edi = POP32_VAL(esp); /* 0x39001511: pop edi */
    870     esi = POP32_VAL(esp); /* 0x39001512: pop esi */
    871     ebx = POP32_VAL(esp); /* 0x39001513: pop ebx */
    872     esp = ebp; /* 0x39001514: mov esp, ebp */
    873     ebp = POP32_VAL(esp); /* 0x39001516: pop ebp */
    874     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39001517: ret 4 */
    875     RECOMP_REGS_OUT();
    876 }
    877 
    878 void sub_39001520(void) {
    879     int _fpu_cmp = 0;
    880     uint32_t _cf = 0;
    881     int _df = 1;
    882     uint32_t _flag_k = FK_NONE;
    883     uint32_t _flag_a = 0, _flag_b = 0;
    884     uint32_t _itail_tgt = 0;
    885     RECOMP_REGS_LOCALS
    886     RECOMP_ENTER(0x39001520u);
    887 
    888 L_39001520:
    889     PUSH32(esp, ebp); /* 0x39001520: push ebp */
    890     ebp = esp; /* 0x39001521: mov ebp, esp */
    891     PUSH32(esp, 0xFFFFFFFFu); /* 0x39001523: push -1 */
    892     PUSH32(esp, 0x3900A4D2u); /* 0x39001525: push 0x3900a4d2 */
    893     eax = MEM32(FS_BASE + (0)); /* 0x3900152A: mov eax, dword ptr fs:[0] */
    894     PUSH32(esp, eax); /* 0x39001530: push eax */
    895     MEM32(FS_BASE + (0)) = esp; /* 0x39001531: mov dword ptr fs:[0], esp */
    896     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xB68u);
    897     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    898     esp = esp - 0xB68u; /* 0x39001538: sub esp, 0xb68 */
    899     _flag_k = FK_CMP;
    900     eax = MEM32(ebp + 0xC); /* 0x3900153E: mov eax, dword ptr [ebp + 0xc] */
    901     PUSH32(esp, ebx); /* 0x39001541: push ebx */
    902     edx = ecx; /* 0x39001542: mov edx, ecx */
    903     PUSH32(esp, esi); /* 0x39001544: push esi */
    904     /* cmp eax, 1 */ /* 0x39001545: cmp eax, 1 */
    905     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
    906     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    907     _flag_k = FK_CMP;
    908     PUSH32(esp, edi); /* 0x39001548: push edi */
    909     MEM32(ebp + (-0x10)) = edx; /* 0x39001549: mov dword ptr [ebp - 0x10], edx */
    910     if (CMP_NE(_flag_a, _flag_b)) goto L_390015F9; /* 0x3900154C: jne 0x390015f9 */
    911 L_39001552:
    912     edi = MEM32(ebp + 0x8); /* 0x39001552: mov edi, dword ptr [ebp + 8] */
    913     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
    914     ecx = ecx | 0xFFFFFFFFu; /* 0x39001555: or ecx, 0xffffffff */
    915     _cf = 0;
    916     _flag_k = FK_TEST;
    917     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    918     eax = 0; /* 0x39001558: xor eax, eax */
    919     _cf = 0;
    920     _flag_k = FK_TEST;
    921     esi = edx + 0x20; /* 0x3900155A: lea esi, [edx + 0x20] */
    922     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x3900155D: repne scasb al, byte ptr es:[edi] */
    923     ecx = ~ecx; /* 0x3900155F: not ecx */
    924     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
    925     ecx = ecx - 1; /* 0x39001561: dec ecx */
    926     _flag_k = FK_DEC;
    927     ebx = ecx; /* 0x39001562: mov ebx, ecx */
    928     /* cmp ebx, 0xFFFFFFFDu */ /* 0x39001564: cmp ebx, -3 */
    929     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0xFFFFFFFDu);
    930     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    931     _flag_k = FK_CMP;
    932     if (CMP_BE(_flag_a, _flag_b)) goto L_3900156F; /* 0x39001567: jbe 0x3900156f */
    933 L_39001569:
    934     RECOMP_ICALL(MEM32(0x3900B048)); /* 0x39001569: call dword ptr [0x3900b048] */
    935     RECOMP_FLAGS_IN();
    936 L_3900156F:
    937     eax = MEM32(esi + 0x4); /* 0x3900156F: mov eax, dword ptr [esi + 4] */
    938     MEM32(esi + 0x8) = 0; /* 0x39001572: mov dword ptr [esi + 8], 0 */
    939     /* test eax, eax */ /* 0x39001579: test eax, eax */
    940     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
    941     _cf = 0;
    942     _flag_k = FK_TEST;
    943     if (TEST_Z(_flag_a, _flag_b)) goto L_3900159B; /* 0x3900157B: je 0x3900159b */
    944 L_3900157D:
    945     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x3900157D: mov al, byte ptr [eax - 1] */
    946     /* test LO8(eax), LO8(eax) */ /* 0x39001580: test al, al */
    947     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
    948     _cf = 0;
    949     _flag_k = FK_NARROW(FK_TEST, 24);
    950     if (TEST_Z(_flag_a, _flag_b)) goto L_3900159B; /* 0x39001582: je 0x3900159b */
    951 L_39001584:
    952     /* cmp LO8(eax), 0xFFu */ /* 0x39001584: cmp al, 0xff */
    953     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
    954     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    955     _flag_k = FK_NARROW(FK_CMP, 24);
    956     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900159B; /* 0x39001586: je 0x3900159b */
    957 L_39001588:
    958     /* test ebx, ebx */ /* 0x39001588: test ebx, ebx */
    959     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
    960     _cf = 0;
    961     _flag_k = FK_TEST;
    962     if (TEST_NZ(_flag_a, _flag_b)) goto L_390015C4; /* 0x3900158A: jne 0x390015c4 */
    963 L_3900158C:
    964     PUSH32(esp, 1); /* 0x3900158C: push 1 */
    965     ecx = esi; /* 0x3900158E: mov ecx, esi */
    966     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001590: call dword ptr [0x3900b040] */
    967     RECOMP_FLAGS_IN();
    968     goto L_3900174D; /* 0x39001596: jmp 0x3900174d */
    969 L_3900159B:
    970     /* test ebx, ebx */ /* 0x3900159B: test ebx, ebx */
    971     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
    972     _cf = 0;
    973     _flag_k = FK_TEST;
    974     if (TEST_NZ(_flag_a, _flag_b)) goto L_390015AE; /* 0x3900159D: jne 0x390015ae */
    975 L_3900159F:
    976     PUSH32(esp, 1); /* 0x3900159F: push 1 */
    977     ecx = esi; /* 0x390015A1: mov ecx, esi */
    978     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390015A3: call dword ptr [0x3900b040] */
    979     RECOMP_FLAGS_IN();
    980     goto L_3900174D; /* 0x390015A9: jmp 0x3900174d */
    981 L_390015AE:
    982     eax = MEM32(esi + 0xC); /* 0x390015AE: mov eax, dword ptr [esi + 0xc] */
    983     /* cmp eax, 0x1Fu */ /* 0x390015B1: cmp eax, 0x1f */
    984     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x1Fu);
    985     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    986     _flag_k = FK_CMP;
    987     if (CMP_A(_flag_a, _flag_b)) goto L_390015BA; /* 0x390015B4: ja 0x390015ba */
    988 L_390015B6:
    989     /* cmp eax, ebx */ /* 0x390015B6: cmp eax, ebx */
    990     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
    991     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    992     _flag_k = FK_CMP;
    993     if (CMP_AE(_flag_a, _flag_b)) goto L_390015CD; /* 0x390015B8: jae 0x390015cd */
    994 L_390015BA:
    995     PUSH32(esp, 1); /* 0x390015BA: push 1 */
    996     ecx = esi; /* 0x390015BC: mov ecx, esi */
    997     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390015BE: call dword ptr [0x3900b040] */
    998     RECOMP_FLAGS_IN();
    999 L_390015C4:
   1000     PUSH32(esp, ebx); /* 0x390015C4: push ebx */
   1001     ecx = esi; /* 0x390015C5: mov ecx, esi */
   1002     RECOMP_ICALL(MEM32(0x3900B044)); /* 0x390015C7: call dword ptr [0x3900b044] */
   1003     RECOMP_FLAGS_IN();
   1004 L_390015CD:
   1005     edi = MEM32(esi + 0x4); /* 0x390015CD: mov edi, dword ptr [esi + 4] */
   1006     esi = MEM32(ebp + 0x8); /* 0x390015D0: mov esi, dword ptr [ebp + 8] */
   1007     ecx = ebx; /* 0x390015D3: mov ecx, ebx */
   1008     eax = ecx; /* 0x390015D5: mov eax, ecx */
   1009     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x390015D7: shr ecx, 2 */
   1010     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1011     ecx = ecx >> 2u; /* 0x390015D7: shr ecx, 2 */
   1012     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390015DA: 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; }
   1013     ecx = eax; /* 0x390015DC: mov ecx, eax */
   1014     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   1015     ecx = ecx & 3; /* 0x390015DE: and ecx, 3 */
   1016     _cf = 0;
   1017     _flag_k = FK_TEST;
   1018     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x390015E1: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   1019     ecx = MEM32(ebp + (-0x10)); /* 0x390015E3: mov ecx, dword ptr [ebp - 0x10] */
   1020     eax = ecx + 0x20; /* 0x390015E6: lea eax, [ecx + 0x20] */
   1021     ecx = MEM32(ecx + 0x24); /* 0x390015E9: mov ecx, dword ptr [ecx + 0x24] */
   1022     MEM32(eax + 0x8) = ebx; /* 0x390015EC: mov dword ptr [eax + 8], ebx */
   1023     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ecx);
   1024     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1025     ebx = ebx + ecx; /* 0x390015EF: add ebx, ecx */
   1026     _flag_k = FK_ADD;
   1027     MEM8(ebx) = (uint8_t)(0); /* 0x390015F1: mov byte ptr [ebx], 0 */
   1028     goto L_3900174D; /* 0x390015F4: jmp 0x3900174d */
   1029 L_390015F9:
   1030     /* cmp eax, 2 */ /* 0x390015F9: cmp eax, 2 */
   1031     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   1032     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1033     _flag_k = FK_CMP;
   1034     if (CMP_NE(_flag_a, _flag_b)) goto L_390016AA; /* 0x390015FC: jne 0x390016aa */
   1035 L_39001602:
   1036     esi = MEM32(ebp + 0x8); /* 0x39001602: mov esi, dword ptr [ebp + 8] */
   1037     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   1038     ecx = ecx | 0xFFFFFFFFu; /* 0x39001605: or ecx, 0xffffffff */
   1039     _cf = 0;
   1040     _flag_k = FK_TEST;
   1041     edi = esi; /* 0x39001608: mov edi, esi */
   1042     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1043     eax = 0; /* 0x3900160A: xor eax, eax */
   1044     _cf = 0;
   1045     _flag_k = FK_TEST;
   1046     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x3900160C: repne scasb al, byte ptr es:[edi] */
   1047     ecx = ~ecx; /* 0x3900160E: not ecx */
   1048     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   1049     ecx = ecx - 1; /* 0x39001610: dec ecx */
   1050     _flag_k = FK_DEC;
   1051     ebx = edx + 0x10; /* 0x39001611: lea ebx, [edx + 0x10] */
   1052     edi = ecx; /* 0x39001614: mov edi, ecx */
   1053     /* cmp edi, 0xFFFFFFFDu */ /* 0x39001616: cmp edi, -3 */
   1054     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFDu);
   1055     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1056     _flag_k = FK_CMP;
   1057     MEM32(ebp + (-0x14)) = edi; /* 0x39001619: mov dword ptr [ebp - 0x14], edi */
   1058     if (CMP_BE(_flag_a, _flag_b)) goto L_39001624; /* 0x3900161C: jbe 0x39001624 */
   1059 L_3900161E:
   1060     RECOMP_ICALL(MEM32(0x3900B048)); /* 0x3900161E: call dword ptr [0x3900b048] */
   1061     RECOMP_FLAGS_IN();
   1062 L_39001624:
   1063     eax = MEM32(ebx + 0x4); /* 0x39001624: mov eax, dword ptr [ebx + 4] */
   1064     MEM32(ebx + 0x8) = 0; /* 0x39001627: mov dword ptr [ebx + 8], 0 */
   1065     /* test eax, eax */ /* 0x3900162E: test eax, eax */
   1066     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1067     _cf = 0;
   1068     _flag_k = FK_TEST;
   1069     if (TEST_Z(_flag_a, _flag_b)) goto L_39001650; /* 0x39001630: je 0x39001650 */
   1070 L_39001632:
   1071     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x39001632: mov al, byte ptr [eax - 1] */
   1072     /* test LO8(eax), LO8(eax) */ /* 0x39001635: test al, al */
   1073     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   1074     _cf = 0;
   1075     _flag_k = FK_NARROW(FK_TEST, 24);
   1076     if (TEST_Z(_flag_a, _flag_b)) goto L_39001650; /* 0x39001637: je 0x39001650 */
   1077 L_39001639:
   1078     /* cmp LO8(eax), 0xFFu */ /* 0x39001639: cmp al, 0xff */
   1079     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
   1080     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1081     _flag_k = FK_NARROW(FK_CMP, 24);
   1082     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001650; /* 0x3900163B: je 0x39001650 */
   1083 L_3900163D:
   1084     /* test edi, edi */ /* 0x3900163D: test edi, edi */
   1085     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   1086     _cf = 0;
   1087     _flag_k = FK_TEST;
   1088     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001679; /* 0x3900163F: jne 0x39001679 */
   1089 L_39001641:
   1090     PUSH32(esp, 1); /* 0x39001641: push 1 */
   1091     ecx = ebx; /* 0x39001643: mov ecx, ebx */
   1092     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001645: call dword ptr [0x3900b040] */
   1093     RECOMP_FLAGS_IN();
   1094     goto L_3900174D; /* 0x3900164B: jmp 0x3900174d */
   1095 L_39001650:
   1096     /* test edi, edi */ /* 0x39001650: test edi, edi */
   1097     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   1098     _cf = 0;
   1099     _flag_k = FK_TEST;
   1100     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001663; /* 0x39001652: jne 0x39001663 */
   1101 L_39001654:
   1102     PUSH32(esp, 1); /* 0x39001654: push 1 */
   1103     ecx = ebx; /* 0x39001656: mov ecx, ebx */
   1104     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001658: call dword ptr [0x3900b040] */
   1105     RECOMP_FLAGS_IN();
   1106     goto L_3900174D; /* 0x3900165E: jmp 0x3900174d */
   1107 L_39001663:
   1108     eax = MEM32(ebx + 0xC); /* 0x39001663: mov eax, dword ptr [ebx + 0xc] */
   1109     /* cmp eax, 0x1Fu */ /* 0x39001666: cmp eax, 0x1f */
   1110     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x1Fu);
   1111     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1112     _flag_k = FK_CMP;
   1113     if (CMP_A(_flag_a, _flag_b)) goto L_3900166F; /* 0x39001669: ja 0x3900166f */
   1114 L_3900166B:
   1115     /* cmp eax, edi */ /* 0x3900166B: cmp eax, edi */
   1116     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1117     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1118     _flag_k = FK_CMP;
   1119     if (CMP_AE(_flag_a, _flag_b)) goto L_39001682; /* 0x3900166D: jae 0x39001682 */
   1120 L_3900166F:
   1121     PUSH32(esp, 1); /* 0x3900166F: push 1 */
   1122     ecx = ebx; /* 0x39001671: mov ecx, ebx */
   1123     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001673: call dword ptr [0x3900b040] */
   1124     RECOMP_FLAGS_IN();
   1125 L_39001679:
   1126     PUSH32(esp, edi); /* 0x39001679: push edi */
   1127     ecx = ebx; /* 0x3900167A: mov ecx, ebx */
   1128     RECOMP_ICALL(MEM32(0x3900B044)); /* 0x3900167C: call dword ptr [0x3900b044] */
   1129     RECOMP_FLAGS_IN();
   1130 L_39001682:
   1131     eax = MEM32(ebx + 0x4); /* 0x39001682: mov eax, dword ptr [ebx + 4] */
   1132     ecx = edi; /* 0x39001685: mov ecx, edi */
   1133     edx = ecx; /* 0x39001687: mov edx, ecx */
   1134     edi = eax; /* 0x39001689: mov edi, eax */
   1135     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x3900168B: shr ecx, 2 */
   1136     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1137     ecx = ecx >> 2u; /* 0x3900168B: shr ecx, 2 */
   1138     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x3900168E: 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; }
   1139     eax = MEM32(ebp + (-0x14)); /* 0x39001690: mov eax, dword ptr [ebp - 0x14] */
   1140     ecx = edx; /* 0x39001693: mov ecx, edx */
   1141     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   1142     ecx = ecx & 3; /* 0x39001695: and ecx, 3 */
   1143     _cf = 0;
   1144     _flag_k = FK_TEST;
   1145     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39001698: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   1146     MEM32(ebx + 0x8) = eax; /* 0x3900169A: mov dword ptr [ebx + 8], eax */
   1147     ebx = MEM32(ebx + 0x4); /* 0x3900169D: mov ebx, dword ptr [ebx + 4] */
   1148     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
   1149     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1150     ebx = ebx + eax; /* 0x390016A0: add ebx, eax */
   1151     _flag_k = FK_ADD;
   1152     MEM8(ebx) = (uint8_t)(0); /* 0x390016A2: mov byte ptr [ebx], 0 */
   1153     goto L_3900174D; /* 0x390016A5: jmp 0x3900174d */
   1154 L_390016AA:
   1155     esi = MEM32(ebp + 0x8); /* 0x390016AA: mov esi, dword ptr [ebp + 8] */
   1156     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   1157     ecx = ecx | 0xFFFFFFFFu; /* 0x390016AD: or ecx, 0xffffffff */
   1158     _cf = 0;
   1159     _flag_k = FK_TEST;
   1160     edi = esi; /* 0x390016B0: mov edi, esi */
   1161     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1162     eax = 0; /* 0x390016B2: xor eax, eax */
   1163     _cf = 0;
   1164     _flag_k = FK_TEST;
   1165     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x390016B4: repne scasb al, byte ptr es:[edi] */
   1166     ecx = ~ecx; /* 0x390016B6: not ecx */
   1167     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   1168     ecx = ecx - 1; /* 0x390016B8: dec ecx */
   1169     _flag_k = FK_DEC;
   1170     ebx = ecx; /* 0x390016B9: mov ebx, ecx */
   1171     /* cmp ebx, 0xFFFFFFFDu */ /* 0x390016BB: cmp ebx, -3 */
   1172     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0xFFFFFFFDu);
   1173     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1174     _flag_k = FK_CMP;
   1175     if (CMP_BE(_flag_a, _flag_b)) goto L_390016C9; /* 0x390016BE: jbe 0x390016c9 */
   1176 L_390016C0:
   1177     RECOMP_ICALL(MEM32(0x3900B048)); /* 0x390016C0: call dword ptr [0x3900b048] */
   1178     RECOMP_FLAGS_IN();
   1179     edx = MEM32(ebp + (-0x10)); /* 0x390016C6: mov edx, dword ptr [ebp - 0x10] */
   1180 L_390016C9:
   1181     edi = MEM32(edx + 0x4); /* 0x390016C9: mov edi, dword ptr [edx + 4] */
   1182     MEM32(edx + 0x8) = 0; /* 0x390016CC: mov dword ptr [edx + 8], 0 */
   1183     /* test edi, edi */ /* 0x390016D3: test edi, edi */
   1184     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   1185     _cf = 0;
   1186     _flag_k = FK_TEST;
   1187     if (TEST_Z(_flag_a, _flag_b)) goto L_390016F7; /* 0x390016D5: je 0x390016f7 */
   1188 L_390016D7:
   1189     SET_LO8(eax, MEM8(edi + (-0x1))); /* 0x390016D7: mov al, byte ptr [edi - 1] */
   1190     /* test LO8(eax), LO8(eax) */ /* 0x390016DA: test al, al */
   1191     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   1192     _cf = 0;
   1193     _flag_k = FK_NARROW(FK_TEST, 24);
   1194     if (TEST_Z(_flag_a, _flag_b)) goto L_390016F7; /* 0x390016DC: je 0x390016f7 */
   1195 L_390016DE:
   1196     /* cmp LO8(eax), 0xFFu */ /* 0x390016DE: cmp al, 0xff */
   1197     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
   1198     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1199     _flag_k = FK_NARROW(FK_CMP, 24);
   1200     if (CMP_EQ(_flag_a, _flag_b)) goto L_390016F7; /* 0x390016E0: je 0x390016f7 */
   1201 L_390016E2:
   1202     /* test ebx, ebx */ /* 0x390016E2: test ebx, ebx */
   1203     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
   1204     _cf = 0;
   1205     _flag_k = FK_TEST;
   1206     if (TEST_NZ(_flag_a, _flag_b)) goto L_390016F2; /* 0x390016E4: jne 0x390016f2 */
   1207 L_390016E6:
   1208     PUSH32(esp, 1); /* 0x390016E6: push 1 */
   1209     ecx = edx; /* 0x390016E8: mov ecx, edx */
   1210     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390016EA: call dword ptr [0x3900b040] */
   1211     RECOMP_FLAGS_IN();
   1212     goto L_3900174D; /* 0x390016F0: jmp 0x3900174d */
   1213 L_390016F2:
   1214     PUSH32(esp, ebx); /* 0x390016F2: push ebx */
   1215     ecx = edx; /* 0x390016F3: mov ecx, edx */
   1216     goto L_39001721; /* 0x390016F5: jmp 0x39001721 */
   1217 L_390016F7:
   1218     /* test ebx, ebx */ /* 0x390016F7: test ebx, ebx */
   1219     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
   1220     _cf = 0;
   1221     _flag_k = FK_TEST;
   1222     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001707; /* 0x390016F9: jne 0x39001707 */
   1223 L_390016FB:
   1224     PUSH32(esp, 1); /* 0x390016FB: push 1 */
   1225     ecx = edx; /* 0x390016FD: mov ecx, edx */
   1226     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390016FF: call dword ptr [0x3900b040] */
   1227     RECOMP_FLAGS_IN();
   1228     goto L_3900174D; /* 0x39001705: jmp 0x3900174d */
   1229 L_39001707:
   1230     eax = MEM32(edx + 0xC); /* 0x39001707: mov eax, dword ptr [edx + 0xc] */
   1231     /* cmp eax, 0x1Fu */ /* 0x3900170A: cmp eax, 0x1f */
   1232     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x1Fu);
   1233     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1234     _flag_k = FK_CMP;
   1235     if (CMP_A(_flag_a, _flag_b)) goto L_39001713; /* 0x3900170D: ja 0x39001713 */
   1236 L_3900170F:
   1237     /* cmp eax, ebx */ /* 0x3900170F: cmp eax, ebx */
   1238     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   1239     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1240     _flag_k = FK_CMP;
   1241     if (CMP_AE(_flag_a, _flag_b)) goto L_3900172A; /* 0x39001711: jae 0x3900172a */
   1242 L_39001713:
   1243     PUSH32(esp, 1); /* 0x39001713: push 1 */
   1244     ecx = edx; /* 0x39001715: mov ecx, edx */
   1245     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001717: call dword ptr [0x3900b040] */
   1246     RECOMP_FLAGS_IN();
   1247     ecx = MEM32(ebp + (-0x10)); /* 0x3900171D: mov ecx, dword ptr [ebp - 0x10] */
   1248     PUSH32(esp, ebx); /* 0x39001720: push ebx */
   1249 L_39001721:
   1250     RECOMP_ICALL(MEM32(0x3900B044)); /* 0x39001721: call dword ptr [0x3900b044] */
   1251     RECOMP_FLAGS_IN();
   1252     edx = MEM32(ebp + (-0x10)); /* 0x39001727: mov edx, dword ptr [ebp - 0x10] */
   1253 L_3900172A:
   1254     edx = MEM32(edx + 0x4); /* 0x3900172A: mov edx, dword ptr [edx + 4] */
   1255     ecx = ebx; /* 0x3900172D: mov ecx, ebx */
   1256     eax = ecx; /* 0x3900172F: mov eax, ecx */
   1257     edi = edx; /* 0x39001731: mov edi, edx */
   1258     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39001733: shr ecx, 2 */
   1259     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1260     ecx = ecx >> 2u; /* 0x39001733: shr ecx, 2 */
   1261     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39001736: 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; }
   1262     ecx = eax; /* 0x39001738: mov ecx, eax */
   1263     eax = MEM32(ebp + (-0x10)); /* 0x3900173A: mov eax, dword ptr [ebp - 0x10] */
   1264     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   1265     ecx = ecx & 3; /* 0x3900173D: and ecx, 3 */
   1266     _cf = 0;
   1267     _flag_k = FK_TEST;
   1268     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39001740: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   1269     MEM32(eax + 0x8) = ebx; /* 0x39001742: mov dword ptr [eax + 8], ebx */
   1270     eax = MEM32(eax + 0x4); /* 0x39001745: mov eax, dword ptr [eax + 4] */
   1271     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   1272     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1273     eax = eax + ebx; /* 0x39001748: add eax, ebx */
   1274     _flag_k = FK_ADD;
   1275     MEM8(eax) = (uint8_t)(0); /* 0x3900174A: mov byte ptr [eax], 0 */
   1276 L_3900174D:
   1277     ecx = MEM32(ebp + 0x8); /* 0x3900174D: mov ecx, dword ptr [ebp + 8] */
   1278     PUSH32(esp, 0x180u); /* 0x39001750: push 0x180 */
   1279     PUSH32(esp, ecx); /* 0x39001755: push ecx */
   1280     RECOMP_ICALL(MEM32(0x3900B0B8)); /* 0x39001756: call dword ptr [0x3900b0b8] */
   1281     RECOMP_FLAGS_IN();
   1282     edx = MEM32(ebp + 0x8); /* 0x3900175C: mov edx, dword ptr [ebp + 8] */
   1283     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1284     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1285     esp = esp + 8; /* 0x3900175F: add esp, 8 */
   1286     _flag_k = FK_ADD;
   1287     ecx = ebp + (-0x34); /* 0x39001762: lea ecx, [ebp - 0x34] */
   1288     PUSH32(esp, edx); /* 0x39001765: push edx */
   1289     RECOMP_ICALL(MEM32(0x3900B0B4)); /* 0x39001766: call dword ptr [0x3900b0b4] */
   1290     RECOMP_FLAGS_IN();
   1291     ecx = ebp + (-0x34); /* 0x3900176C: lea ecx, [ebp - 0x34] */
   1292     MEM32(ebp + (-0x4)) = 0; /* 0x3900176F: mov dword ptr [ebp - 4], 0 */
   1293     RECOMP_ICALL(MEM32(0x3900B0B0)); /* 0x39001776: call dword ptr [0x3900b0b0] */
   1294     RECOMP_FLAGS_IN();
   1295     /* test LO8(eax), LO8(eax) */ /* 0x3900177C: test al, al */
   1296     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   1297     _cf = 0;
   1298     _flag_k = FK_NARROW(FK_TEST, 24);
   1299     if (TEST_Z(_flag_a, _flag_b)) goto L_390017FA; /* 0x3900177E: je 0x390017fa */
   1300 L_39001780:
   1301     edi = MEM32(0x3900B0AC); /* 0x39001780: mov edi, dword ptr [0x3900b0ac] */
   1302     PUSH32(esp, 0); /* 0x39001786: push 0 */
   1303     RECOMP_ICALL(edi); /* 0x39001788: call edi */
   1304     RECOMP_FLAGS_IN();
   1305     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1306     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1307     esp = esp + 4; /* 0x3900178A: add esp, 4 */
   1308     _flag_k = FK_ADD;
   1309     MEM32(ebp + (-0x18)) = eax; /* 0x3900178D: mov dword ptr [ebp - 0x18], eax */
   1310     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1311     eax = 0; /* 0x39001790: xor eax, eax */
   1312     _cf = 0;
   1313     _flag_k = FK_TEST;
   1314     ecx = ebp + (-0x34); /* 0x39001792: lea ecx, [ebp - 0x34] */
   1315     PUSH32(esp, 1); /* 0x39001795: push 1 */
   1316     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
   1317     SET_LO8(ebx, 0); /* 0x39001797: xor bl, bl */
   1318     _cf = 0;
   1319     _flag_k = FK_NARROW(FK_TEST, 24);
   1320     MEM32(ebp + 0x8) = eax; /* 0x39001799: mov dword ptr [ebp + 8], eax */
   1321     MEM32(ebp + (-0x14)) = eax; /* 0x3900179C: mov dword ptr [ebp - 0x14], eax */
   1322     RECOMP_ICALL(MEM32(0x3900B0A0)); /* 0x3900179F: call dword ptr [0x3900b0a0] */
   1323     RECOMP_FLAGS_IN();
   1324     /* test eax, eax */ /* 0x390017A5: test eax, eax */
   1325     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1326     _cf = 0;
   1327     _flag_k = FK_TEST;
   1328     if (TEST_NZ(_flag_a, _flag_b)) goto L_390017E1; /* 0x390017A7: jne 0x390017e1 */
   1329 L_390017A9:
   1330     ecx = ebp + (-0x34); /* 0x390017A9: lea ecx, [ebp - 0x34] */
   1331     RECOMP_ICALL(MEM32(0x3900B0A8)); /* 0x390017AC: call dword ptr [0x3900b0a8] */
   1332     RECOMP_FLAGS_IN();
   1333     esi = eax; /* 0x390017B2: mov esi, eax */
   1334     /* test esi, esi */ /* 0x390017B4: test esi, esi */
   1335     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   1336     _cf = 0;
   1337     _flag_k = FK_TEST;
   1338     MEM32(ebp + (-0x14)) = esi; /* 0x390017B6: mov dword ptr [ebp - 0x14], esi */
   1339     if (TEST_LE(_flag_a, _flag_b)) goto L_390017D8; /* 0x390017B9: jle 0x390017d8 */
   1340 L_390017BB:
   1341     PUSH32(esp, esi); /* 0x390017BB: push esi */
   1342     RECOMP_ICALL(0x3900A0ACu); /* 0x390017BC: call 0x3900a0ac */ /* not lifted */
   1343     RECOMP_FLAGS_IN();
   1344     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1345     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1346     esp = esp + 4; /* 0x390017C1: add esp, 4 */
   1347     _flag_k = FK_ADD;
   1348     ecx = ebp + (-0x34); /* 0x390017C4: lea ecx, [ebp - 0x34] */
   1349     MEM32(ebp + 0x8) = eax; /* 0x390017C7: mov dword ptr [ebp + 8], eax */
   1350     PUSH32(esp, esi); /* 0x390017CA: push esi */
   1351     PUSH32(esp, eax); /* 0x390017CB: push eax */
   1352     RECOMP_ICALL(MEM32(0x3900B0A4)); /* 0x390017CC: call dword ptr [0x3900b0a4] */
   1353     RECOMP_FLAGS_IN();
   1354     /* test eax, eax */ /* 0x390017D2: test eax, eax */
   1355     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1356     _cf = 0;
   1357     _flag_k = FK_TEST;
   1358     if (TEST_NZ(_flag_a, _flag_b)) goto L_390017D8; /* 0x390017D4: jne 0x390017d8 */
   1359 L_390017D6:
   1360     SET_LO8(ebx, 1); /* 0x390017D6: mov bl, 1 */
   1361 L_390017D8:
   1362     ecx = ebp + (-0x34); /* 0x390017D8: lea ecx, [ebp - 0x34] */
   1363     RECOMP_ICALL(MEM32(0x3900B09C)); /* 0x390017DB: call dword ptr [0x3900b09c] */
   1364     RECOMP_FLAGS_IN();
   1365 L_390017E1:
   1366     eax = MEM32(ebp + (-0x18)); /* 0x390017E1: mov eax, dword ptr [ebp - 0x18] */
   1367     PUSH32(esp, eax); /* 0x390017E4: push eax */
   1368     RECOMP_ICALL(edi); /* 0x390017E5: call edi */
   1369     RECOMP_FLAGS_IN();
   1370     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1371     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1372     esp = esp + 4; /* 0x390017E7: add esp, 4 */
   1373     _flag_k = FK_ADD;
   1374     /* test LO8(ebx), LO8(ebx) */ /* 0x390017EA: test bl, bl */
   1375     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
   1376     _cf = 0;
   1377     _flag_k = FK_NARROW(FK_TEST, 24);
   1378     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900181F; /* 0x390017EC: jne 0x3900181f */
   1379 L_390017EE:
   1380     ecx = MEM32(ebp + 0x8); /* 0x390017EE: mov ecx, dword ptr [ebp + 8] */
   1381     PUSH32(esp, ecx); /* 0x390017F1: push ecx */
   1382     RECOMP_ICALL(0x3900A0A0u); /* 0x390017F2: call 0x3900a0a0 */ /* not lifted */
   1383     RECOMP_FLAGS_IN();
   1384     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1385     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1386     esp = esp + 4; /* 0x390017F7: add esp, 4 */
   1387     _flag_k = FK_ADD;
   1388 L_390017FA:
   1389     ecx = ebp + (-0x34); /* 0x390017FA: lea ecx, [ebp - 0x34] */
   1390     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x390017FD: mov dword ptr [ebp - 4], 0xffffffff */
   1391     RECOMP_ICALL(MEM32(0x3900B0C4)); /* 0x39001804: call dword ptr [0x3900b0c4] */
   1392     RECOMP_FLAGS_IN();
   1393     edi = POP32_VAL(esp); /* 0x3900180A: pop edi */
   1394     esi = POP32_VAL(esp); /* 0x3900180B: pop esi */
   1395     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
   1396     SET_LO8(eax, 0); /* 0x3900180C: xor al, al */
   1397     _cf = 0;
   1398     _flag_k = FK_NARROW(FK_TEST, 24);
   1399     ebx = POP32_VAL(esp); /* 0x3900180E: pop ebx */
   1400     ecx = MEM32(ebp + (-0xC)); /* 0x3900180F: mov ecx, dword ptr [ebp - 0xc] */
   1401     MEM32(FS_BASE + (0)) = ecx; /* 0x39001812: mov dword ptr fs:[0], ecx */
   1402     esp = ebp; /* 0x39001819: mov esp, ebp */
   1403     ebp = POP32_VAL(esp); /* 0x3900181B: pop ebp */
   1404     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900181C: ret 8 */
   1405 L_3900181F:
   1406     edx = MEM32(ebp + (-0x14)); /* 0x3900181F: mov edx, dword ptr [ebp - 0x14] */
   1407     eax = MEM32(ebp + 0x8); /* 0x39001822: mov eax, dword ptr [ebp + 8] */
   1408     PUSH32(esp, edx); /* 0x39001825: push edx */
   1409     PUSH32(esp, eax); /* 0x39001826: push eax */
   1410     ecx = ebp + (-0x54); /* 0x39001827: lea ecx, [ebp - 0x54] */
   1411     RECOMP_ICALL(MEM32(0x3900B0D0)); /* 0x3900182A: call dword ptr [0x3900b0d0] */
   1412     RECOMP_FLAGS_IN();
   1413     PUSH32(esp, 1); /* 0x39001830: push 1 */
   1414     ecx = ebp + (-0x54); /* 0x39001832: lea ecx, [ebp - 0x54] */
   1415     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x39001835: mov byte ptr [ebp - 4], 1 */
   1416     RECOMP_ICALL(MEM32(0x3900B098)); /* 0x39001839: call dword ptr [0x3900b098] */
   1417     RECOMP_FLAGS_IN();
   1418     ebx = MEM32(0x3900B074); /* 0x3900183F: mov ebx, dword ptr [0x3900b074] */
   1419 L_39001845:
   1420     ecx = ebp + (-0x54); /* 0x39001845: lea ecx, [ebp - 0x54] */
   1421     RECOMP_ICALL(MEM32(0x3900B0C8)); /* 0x39001848: call dword ptr [0x3900b0c8] */
   1422     RECOMP_FLAGS_IN();
   1423     /* cmp eax, MEM32(ebp + (-0x14)) */ /* 0x3900184E: cmp eax, dword ptr [ebp - 0x14] */
   1424     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + (-0x14)));
   1425     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1426     _flag_k = FK_CMP;
   1427     if (CMP_GE(_flag_a, _flag_b)) goto L_39001A38; /* 0x39001851: jge 0x39001a38 */
   1428 L_39001857:
   1429     PUSH32(esp, 0xAu); /* 0x39001857: push 0xa */
   1430     ecx = ebp + (-0xB74); /* 0x39001859: lea ecx, [ebp - 0xb74] */
   1431     PUSH32(esp, 0x800u); /* 0x3900185F: push 0x800 */
   1432     PUSH32(esp, ecx); /* 0x39001864: push ecx */
   1433     ecx = ebp + (-0x54); /* 0x39001865: lea ecx, [ebp - 0x54] */
   1434     RECOMP_ICALL(MEM32(0x3900B0CC)); /* 0x39001868: call dword ptr [0x3900b0cc] */
   1435     RECOMP_FLAGS_IN();
   1436     /* test eax, eax */ /* 0x3900186E: test eax, eax */
   1437     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1438     _cf = 0;
   1439     _flag_k = FK_TEST;
   1440     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001A38; /* 0x39001870: jne 0x39001a38 */
   1441 L_39001876:
   1442     ecx = 0x63u; /* 0x39001876: mov ecx, 0x63 */
   1443     edi = ebp + (-0x373); /* 0x3900187B: lea edi, [ebp - 0x373] */
   1444     MEM8(ebp + (-0x374)) = (uint8_t)(LO8(eax)); /* 0x39001881: mov byte ptr [ebp - 0x374], al */
   1445     edx = ebp + (-0x1E4); /* 0x39001887: lea edx, [ebp - 0x1e4] */
   1446     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x3900188D: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; }
   1447     MEM16(edi) = (uint16_t)LO16(eax); edi += _df * 2; /* 0x3900188F: stosw word ptr es:[edi], ax */
   1448     MEM8(edi) = LO8(eax); edi += _df; /* 0x39001891: stosb byte ptr es:[edi], al */
   1449     ecx = 0x63u; /* 0x39001892: mov ecx, 0x63 */
   1450     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1451     eax = 0; /* 0x39001897: xor eax, eax */
   1452     _cf = 0;
   1453     _flag_k = FK_TEST;
   1454     edi = ebp + (-0x1E3); /* 0x39001899: lea edi, [ebp - 0x1e3] */
   1455     MEM8(ebp + (-0x1E4)) = (uint8_t)(0); /* 0x3900189F: mov byte ptr [ebp - 0x1e4], 0 */
   1456     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390018A6: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; }
   1457     MEM16(edi) = (uint16_t)LO16(eax); edi += _df * 2; /* 0x390018A8: stosw word ptr es:[edi], ax */
   1458     MEM8(edi) = LO8(eax); edi += _df; /* 0x390018AA: stosb byte ptr es:[edi], al */
   1459     eax = ebp + (-0x374); /* 0x390018AB: lea eax, [ebp - 0x374] */
   1460     PUSH32(esp, edx); /* 0x390018B1: push edx */
   1461     PUSH32(esp, eax); /* 0x390018B2: push eax */
   1462     ecx = ebp + (-0xB74); /* 0x390018B3: lea ecx, [ebp - 0xb74] */
   1463     PUSH32(esp, 0x3900E040u); /* 0x390018B9: push 0x3900e040 */
   1464     PUSH32(esp, ecx); /* 0x390018BE: push ecx */
   1465     RECOMP_ICALL(ebx); /* 0x390018BF: call ebx */
   1466     RECOMP_FLAGS_IN();
   1467     SET_LO8(eax, MEM8(ebp + (-0x374))); /* 0x390018C1: mov al, byte ptr [ebp - 0x374] */
   1468     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   1469     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1470     esp = esp + 0x10u; /* 0x390018C7: add esp, 0x10 */
   1471     _flag_k = FK_ADD;
   1472     /* test LO8(eax), LO8(eax) */ /* 0x390018CA: test al, al */
   1473     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   1474     _cf = 0;
   1475     _flag_k = FK_NARROW(FK_TEST, 24);
   1476     RECOMP_BACKEDGE();
   1477     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x390018CC: je 0x39001845 */
   1478 L_390018D2:
   1479     /* cmp LO8(eax), 0xAu */ /* 0x390018D2: cmp al, 0xa */
   1480     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xAu) << 24;
   1481     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1482     _flag_k = FK_NARROW(FK_CMP, 24);
   1483     RECOMP_BACKEDGE();
   1484     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x390018D4: je 0x39001845 */
   1485 L_390018DA:
   1486     /* cmp LO8(eax), 0x2Fu */ /* 0x390018DA: cmp al, 0x2f */
   1487     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x2Fu) << 24;
   1488     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1489     _flag_k = FK_NARROW(FK_CMP, 24);
   1490     RECOMP_BACKEDGE();
   1491     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x390018DC: je 0x39001845 */
   1492 L_390018E2:
   1493     /* cmp LO8(eax), 0x23u */ /* 0x390018E2: cmp al, 0x23 */
   1494     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x23u) << 24;
   1495     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1496     _flag_k = FK_NARROW(FK_CMP, 24);
   1497     RECOMP_BACKEDGE();
   1498     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x390018E4: je 0x39001845 */
   1499 L_390018EA:
   1500     edx = ebp + (-0x374); /* 0x390018EA: lea edx, [ebp - 0x374] */
   1501     PUSH32(esp, 0x3900E034u); /* 0x390018F0: push 0x3900e034 */
   1502     PUSH32(esp, edx); /* 0x390018F5: push edx */
   1503     RECOMP_ICALL(MEM32(0x3900B070)); /* 0x390018F6: call dword ptr [0x3900b070] */
   1504     RECOMP_FLAGS_IN();
   1505     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1506     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1507     esp = esp + 8; /* 0x390018FC: add esp, 8 */
   1508     _flag_k = FK_ADD;
   1509     /* test eax, eax */ /* 0x390018FF: test eax, eax */
   1510     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1511     _cf = 0;
   1512     _flag_k = FK_TEST;
   1513     RECOMP_BACKEDGE();
   1514     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x39001901: je 0x39001845 */
   1515 L_39001907:
   1516     eax = ebp + (-0x374); /* 0x39001907: lea eax, [ebp - 0x374] */
   1517     PUSH32(esp, 0x3900E028u); /* 0x3900190D: push 0x3900e028 */
   1518     PUSH32(esp, eax); /* 0x39001912: push eax */
   1519     RECOMP_ICALL(MEM32(0x3900B070)); /* 0x39001913: call dword ptr [0x3900b070] */
   1520     RECOMP_FLAGS_IN();
   1521     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1522     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1523     esp = esp + 8; /* 0x39001919: add esp, 8 */
   1524     _flag_k = FK_ADD;
   1525     /* test eax, eax */ /* 0x3900191C: test eax, eax */
   1526     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1527     _cf = 0;
   1528     _flag_k = FK_TEST;
   1529     RECOMP_BACKEDGE();
   1530     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x3900191E: je 0x39001845 */
   1531 L_39001924:
   1532     SET_LO8(eax, MEM8(ebp + (-0x1E4))); /* 0x39001924: mov al, byte ptr [ebp - 0x1e4] */
   1533     /* cmp LO8(eax), 0x22u */ /* 0x3900192A: cmp al, 0x22 */
   1534     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x22u) << 24;
   1535     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1536     _flag_k = FK_NARROW(FK_CMP, 24);
   1537     if (CMP_NE(_flag_a, _flag_b)) goto L_390019B9; /* 0x3900192C: jne 0x390019b9 */
   1538 L_39001932:
   1539     SET_LO8(ecx, MEM8(ebp + (-0xB74))); /* 0x39001932: mov cl, byte ptr [ebp - 0xb74] */
   1540     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1541     eax = 0; /* 0x39001938: xor eax, eax */
   1542     _cf = 0;
   1543     _flag_k = FK_TEST;
   1544     /* test LO8(ecx), LO8(ecx) */ /* 0x3900193A: test cl, cl */
   1545     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   1546     _cf = 0;
   1547     _flag_k = FK_NARROW(FK_TEST, 24);
   1548     RECOMP_BACKEDGE();
   1549     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x3900193C: je 0x39001845 */
   1550 L_39001942:
   1551     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x39001942: mov cl, byte ptr [ebp + eax - 0xb74] */
   1552     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   1553     eax = eax + 1; /* 0x39001949: inc eax */
   1554     _flag_k = FK_INC;
   1555     /* cmp LO8(ecx), 0x22u */ /* 0x3900194A: cmp cl, 0x22 */
   1556     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0x22u) << 24;
   1557     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1558     _flag_k = FK_NARROW(FK_CMP, 24);
   1559     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900195F; /* 0x3900194D: je 0x3900195f */
   1560 L_3900194F:
   1561     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x3900194F: mov cl, byte ptr [ebp + eax - 0xb74] */
   1562     /* test LO8(ecx), LO8(ecx) */ /* 0x39001956: test cl, cl */
   1563     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   1564     _cf = 0;
   1565     _flag_k = FK_NARROW(FK_TEST, 24);
   1566     RECOMP_BACKEDGE();
   1567     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001942; /* 0x39001958: jne 0x39001942 */
   1568 L_3900195A:
   1569     RECOMP_BACKEDGE();
   1570     goto L_39001845; /* 0x3900195A: jmp 0x39001845 */
   1571 L_3900195F:
   1572     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x3900195F: mov cl, byte ptr [ebp + eax - 0xb74] */
   1573     esi = ebp + eax + (-0xB74); /* 0x39001966: lea esi, [ebp + eax - 0xb74] */
   1574     /* test LO8(ecx), LO8(ecx) */ /* 0x3900196D: test cl, cl */
   1575     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   1576     _cf = 0;
   1577     _flag_k = FK_NARROW(FK_TEST, 24);
   1578     edi = eax; /* 0x3900196F: mov edi, eax */
   1579     edx = eax; /* 0x39001971: mov edx, eax */
   1580     RECOMP_BACKEDGE();
   1581     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x39001973: je 0x39001845 */
   1582 L_39001979:
   1583     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   1584     eax = eax + 1; /* 0x39001979: inc eax */
   1585     _flag_k = FK_INC;
   1586     /* cmp LO8(ecx), 0x22u */ /* 0x3900197A: cmp cl, 0x22 */
   1587     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0x22u) << 24;
   1588     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1589     _flag_k = FK_NARROW(FK_CMP, 24);
   1590     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900198C; /* 0x3900197D: je 0x3900198c */
   1591 L_3900197F:
   1592     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x3900197F: mov cl, byte ptr [ebp + eax - 0xb74] */
   1593     /* test LO8(ecx), LO8(ecx) */ /* 0x39001986: test cl, cl */
   1594     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   1595     _cf = 0;
   1596     _flag_k = FK_NARROW(FK_TEST, 24);
   1597     RECOMP_BACKEDGE();
   1598     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001979; /* 0x39001988: jne 0x39001979 */
   1599 L_3900198A:
   1600     goto L_3900198E; /* 0x3900198A: jmp 0x3900198e */
   1601 L_3900198C:
   1602     edx = eax; /* 0x3900198C: mov edx, eax */
   1603 L_3900198E:
   1604     /* cmp edi, edx */ /* 0x3900198E: cmp edi, edx */
   1605     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx);
   1606     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1607     _flag_k = FK_CMP;
   1608     RECOMP_BACKEDGE();
   1609     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x39001990: je 0x39001845 */
   1610 L_39001996:
   1611     ecx = MEM32(ebp + (-0x10)); /* 0x39001996: mov ecx, dword ptr [ebp - 0x10] */
   1612     MEM8(ebp + edx + (-0xB75)) = (uint8_t)(0); /* 0x39001999: mov byte ptr [ebp + edx - 0xb75], 0 */
   1613     edx = MEM32(ebp + 0xC); /* 0x390019A1: mov edx, dword ptr [ebp + 0xc] */
   1614     PUSH32(esp, 1); /* 0x390019A4: push 1 */
   1615     PUSH32(esp, edx); /* 0x390019A6: push edx */
   1616     eax = ebp + (-0x374); /* 0x390019A7: lea eax, [ebp - 0x374] */
   1617     PUSH32(esp, esi); /* 0x390019AD: push esi */
   1618     PUSH32(esp, eax); /* 0x390019AE: push eax */
   1619     RECOMP_ICALL(0x39002040u); /* 0x390019AF: call 0x39002040 */ /* not lifted */
   1620     RECOMP_FLAGS_IN();
   1621     RECOMP_BACKEDGE();
   1622     goto L_39001845; /* 0x390019B4: jmp 0x39001845 */
   1623 L_390019B9:
   1624     /* test LO8(eax), LO8(eax) */ /* 0x390019B9: test al, al */
   1625     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   1626     _cf = 0;
   1627     _flag_k = FK_NARROW(FK_TEST, 24);
   1628     if (TEST_Z(_flag_a, _flag_b)) goto L_390019D0; /* 0x390019BB: je 0x390019d0 */
   1629 L_390019BD:
   1630     eax = ebp + (-0x1E4); /* 0x390019BD: lea eax, [ebp - 0x1e4] */
   1631 L_390019C3:
   1632     SET_LO8(ecx, MEM8(eax)); /* 0x390019C3: mov cl, byte ptr [eax] */
   1633     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   1634     eax = eax + 1; /* 0x390019C5: inc eax */
   1635     _flag_k = FK_INC;
   1636     /* cmp LO8(ecx), 0x2Eu */ /* 0x390019C6: cmp cl, 0x2e */
   1637     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0x2Eu) << 24;
   1638     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1639     _flag_k = FK_NARROW(FK_CMP, 24);
   1640     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001A03; /* 0x390019C9: je 0x39001a03 */
   1641 L_390019CB:
   1642     /* cmp MEM8(eax), 0 */ /* 0x390019CB: cmp byte ptr [eax], 0 */
   1643     _flag_a = (uint32_t)(MEM8(eax)) << 24; _flag_b = (uint32_t)(0) << 24;
   1644     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1645     _flag_k = FK_NARROW(FK_CMP, 24);
   1646     RECOMP_BACKEDGE();
   1647     if (CMP_NE(_flag_a, _flag_b)) goto L_390019C3; /* 0x390019CE: jne 0x390019c3 */
   1648 L_390019D0:
   1649     ecx = ebp + (-0x1C); /* 0x390019D0: lea ecx, [ebp - 0x1c] */
   1650     edx = ebp + (-0x1E4); /* 0x390019D3: lea edx, [ebp - 0x1e4] */
   1651     PUSH32(esp, ecx); /* 0x390019D9: push ecx */
   1652     PUSH32(esp, 0x3900E024u); /* 0x390019DA: push 0x3900e024 */
   1653     PUSH32(esp, edx); /* 0x390019DF: push edx */
   1654     RECOMP_ICALL(ebx); /* 0x390019E0: call ebx */
   1655     RECOMP_FLAGS_IN();
   1656     eax = MEM32(ebp + 0xC); /* 0x390019E2: mov eax, dword ptr [ebp + 0xc] */
   1657     ecx = MEM32(ebp + (-0x1C)); /* 0x390019E5: mov ecx, dword ptr [ebp - 0x1c] */
   1658     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   1659     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1660     esp = esp + 0xCu; /* 0x390019E8: add esp, 0xc */
   1661     _flag_k = FK_ADD;
   1662     edx = ebp + (-0x374); /* 0x390019EB: lea edx, [ebp - 0x374] */
   1663     PUSH32(esp, 1); /* 0x390019F1: push 1 */
   1664     PUSH32(esp, eax); /* 0x390019F3: push eax */
   1665     PUSH32(esp, ecx); /* 0x390019F4: push ecx */
   1666     ecx = MEM32(ebp + (-0x10)); /* 0x390019F5: mov ecx, dword ptr [ebp - 0x10] */
   1667     PUSH32(esp, edx); /* 0x390019F8: push edx */
   1668     RECOMP_ICALL(0x39001D30u); /* 0x390019F9: call 0x39001d30 */ /* not lifted */
   1669     RECOMP_FLAGS_IN();
   1670     RECOMP_BACKEDGE();
   1671     goto L_39001845; /* 0x390019FE: jmp 0x39001845 */
   1672 L_39001A03:
   1673     edx = ebp + (-0x18); /* 0x39001A03: lea edx, [ebp - 0x18] */
   1674     eax = ebp + (-0x1E4); /* 0x39001A06: lea eax, [ebp - 0x1e4] */
   1675     PUSH32(esp, edx); /* 0x39001A0C: push edx */
   1676     PUSH32(esp, 0x3900E020u); /* 0x39001A0D: push 0x3900e020 */
   1677     PUSH32(esp, eax); /* 0x39001A12: push eax */
   1678     RECOMP_ICALL(ebx); /* 0x39001A13: call ebx */
   1679     RECOMP_FLAGS_IN();
   1680     ecx = MEM32(ebp + 0xC); /* 0x39001A15: mov ecx, dword ptr [ebp + 0xc] */
   1681     edx = MEM32(ebp + (-0x18)); /* 0x39001A18: mov edx, dword ptr [ebp - 0x18] */
   1682     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   1683     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1684     esp = esp + 0xCu; /* 0x39001A1B: add esp, 0xc */
   1685     _flag_k = FK_ADD;
   1686     eax = ebp + (-0x374); /* 0x39001A1E: lea eax, [ebp - 0x374] */
   1687     PUSH32(esp, 1); /* 0x39001A24: push 1 */
   1688     PUSH32(esp, ecx); /* 0x39001A26: push ecx */
   1689     ecx = MEM32(ebp + (-0x10)); /* 0x39001A27: mov ecx, dword ptr [ebp - 0x10] */
   1690     PUSH32(esp, edx); /* 0x39001A2A: push edx */
   1691     PUSH32(esp, eax); /* 0x39001A2B: push eax */
   1692     RECOMP_ICALL(0x39001EB0u); /* 0x39001A2C: call 0x39001eb0 */ /* not lifted */
   1693     RECOMP_FLAGS_IN();
   1694     { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x39001A31: fstp st(0) */
   1695     RECOMP_BACKEDGE();
   1696     goto L_39001845; /* 0x39001A33: jmp 0x39001845 */
   1697 L_39001A38:
   1698     eax = MEM32(ebp + 0x8); /* 0x39001A38: mov eax, dword ptr [ebp + 8] */
   1699     PUSH32(esp, eax); /* 0x39001A3B: push eax */
   1700     RECOMP_ICALL(0x3900A0A0u); /* 0x39001A3C: call 0x3900a0a0 */ /* not lifted */
   1701     RECOMP_FLAGS_IN();
   1702     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1703     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1704     esp = esp + 4; /* 0x39001A41: add esp, 4 */
   1705     _flag_k = FK_ADD;
   1706     ecx = ebp + (-0x54); /* 0x39001A44: lea ecx, [ebp - 0x54] */
   1707     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x39001A47: mov byte ptr [ebp - 4], 0 */
   1708     RECOMP_ICALL(MEM32(0x3900B0C0)); /* 0x39001A4B: call dword ptr [0x3900b0c0] */
   1709     RECOMP_FLAGS_IN();
   1710     ecx = ebp + (-0x34); /* 0x39001A51: lea ecx, [ebp - 0x34] */
   1711     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39001A54: mov dword ptr [ebp - 4], 0xffffffff */
   1712     RECOMP_ICALL(MEM32(0x3900B0C4)); /* 0x39001A5B: call dword ptr [0x3900b0c4] */
   1713     RECOMP_FLAGS_IN();
   1714     ecx = MEM32(ebp + (-0xC)); /* 0x39001A61: mov ecx, dword ptr [ebp - 0xc] */
   1715     edi = POP32_VAL(esp); /* 0x39001A64: pop edi */
   1716     esi = POP32_VAL(esp); /* 0x39001A65: pop esi */
   1717     SET_LO8(eax, 1); /* 0x39001A66: mov al, 1 */
   1718     ebx = POP32_VAL(esp); /* 0x39001A68: pop ebx */
   1719     MEM32(FS_BASE + (0)) = ecx; /* 0x39001A69: mov dword ptr fs:[0], ecx */
   1720     esp = ebp; /* 0x39001A70: mov esp, ebp */
   1721     ebp = POP32_VAL(esp); /* 0x39001A72: pop ebp */
   1722     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39001A73: ret 8 */
   1723     RECOMP_REGS_OUT();
   1724 }
   1725 
   1726 void sub_3900174D(void) {
   1727     int _fpu_cmp = 0;
   1728     uint32_t _cf = 0;
   1729     int _df = 1;
   1730     uint32_t _flag_k = FK_NONE;
   1731     uint32_t _flag_a = 0, _flag_b = 0;
   1732     uint32_t _itail_tgt = 0;
   1733     RECOMP_REGS_LOCALS
   1734     RECOMP_ENTER(0x3900174Du);
   1735 
   1736 L_3900174D:
   1737     ecx = MEM32(ebp + 0x8); /* 0x3900174D: mov ecx, dword ptr [ebp + 8] */
   1738     PUSH32(esp, 0x180u); /* 0x39001750: push 0x180 */
   1739     PUSH32(esp, ecx); /* 0x39001755: push ecx */
   1740     RECOMP_ICALL(MEM32(0x3900B0B8)); /* 0x39001756: call dword ptr [0x3900b0b8] */
   1741     RECOMP_FLAGS_IN();
   1742     edx = MEM32(ebp + 0x8); /* 0x3900175C: mov edx, dword ptr [ebp + 8] */
   1743     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1744     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1745     esp = esp + 8; /* 0x3900175F: add esp, 8 */
   1746     _flag_k = FK_ADD;
   1747     ecx = ebp + (-0x34); /* 0x39001762: lea ecx, [ebp - 0x34] */
   1748     PUSH32(esp, edx); /* 0x39001765: push edx */
   1749     RECOMP_ICALL(MEM32(0x3900B0B4)); /* 0x39001766: call dword ptr [0x3900b0b4] */
   1750     RECOMP_FLAGS_IN();
   1751     ecx = ebp + (-0x34); /* 0x3900176C: lea ecx, [ebp - 0x34] */
   1752     MEM32(ebp + (-0x4)) = 0; /* 0x3900176F: mov dword ptr [ebp - 4], 0 */
   1753     RECOMP_ICALL(MEM32(0x3900B0B0)); /* 0x39001776: call dword ptr [0x3900b0b0] */
   1754     RECOMP_FLAGS_IN();
   1755     /* test LO8(eax), LO8(eax) */ /* 0x3900177C: test al, al */
   1756     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   1757     _cf = 0;
   1758     _flag_k = FK_NARROW(FK_TEST, 24);
   1759     if (TEST_Z(_flag_a, _flag_b)) goto L_390017FA; /* 0x3900177E: je 0x390017fa */
   1760 L_39001780:
   1761     edi = MEM32(0x3900B0AC); /* 0x39001780: mov edi, dword ptr [0x3900b0ac] */
   1762     PUSH32(esp, 0); /* 0x39001786: push 0 */
   1763     RECOMP_ICALL(edi); /* 0x39001788: call edi */
   1764     RECOMP_FLAGS_IN();
   1765     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1766     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1767     esp = esp + 4; /* 0x3900178A: add esp, 4 */
   1768     _flag_k = FK_ADD;
   1769     MEM32(ebp + (-0x18)) = eax; /* 0x3900178D: mov dword ptr [ebp - 0x18], eax */
   1770     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1771     eax = 0; /* 0x39001790: xor eax, eax */
   1772     _cf = 0;
   1773     _flag_k = FK_TEST;
   1774     ecx = ebp + (-0x34); /* 0x39001792: lea ecx, [ebp - 0x34] */
   1775     PUSH32(esp, 1); /* 0x39001795: push 1 */
   1776     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
   1777     SET_LO8(ebx, 0); /* 0x39001797: xor bl, bl */
   1778     _cf = 0;
   1779     _flag_k = FK_NARROW(FK_TEST, 24);
   1780     MEM32(ebp + 0x8) = eax; /* 0x39001799: mov dword ptr [ebp + 8], eax */
   1781     MEM32(ebp + (-0x14)) = eax; /* 0x3900179C: mov dword ptr [ebp - 0x14], eax */
   1782     RECOMP_ICALL(MEM32(0x3900B0A0)); /* 0x3900179F: call dword ptr [0x3900b0a0] */
   1783     RECOMP_FLAGS_IN();
   1784     /* test eax, eax */ /* 0x390017A5: test eax, eax */
   1785     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1786     _cf = 0;
   1787     _flag_k = FK_TEST;
   1788     if (TEST_NZ(_flag_a, _flag_b)) goto L_390017E1; /* 0x390017A7: jne 0x390017e1 */
   1789 L_390017A9:
   1790     ecx = ebp + (-0x34); /* 0x390017A9: lea ecx, [ebp - 0x34] */
   1791     RECOMP_ICALL(MEM32(0x3900B0A8)); /* 0x390017AC: call dword ptr [0x3900b0a8] */
   1792     RECOMP_FLAGS_IN();
   1793     esi = eax; /* 0x390017B2: mov esi, eax */
   1794     /* test esi, esi */ /* 0x390017B4: test esi, esi */
   1795     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   1796     _cf = 0;
   1797     _flag_k = FK_TEST;
   1798     MEM32(ebp + (-0x14)) = esi; /* 0x390017B6: mov dword ptr [ebp - 0x14], esi */
   1799     if (TEST_LE(_flag_a, _flag_b)) goto L_390017D8; /* 0x390017B9: jle 0x390017d8 */
   1800 L_390017BB:
   1801     PUSH32(esp, esi); /* 0x390017BB: push esi */
   1802     RECOMP_ICALL(0x3900A0ACu); /* 0x390017BC: call 0x3900a0ac */ /* not lifted */
   1803     RECOMP_FLAGS_IN();
   1804     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1805     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1806     esp = esp + 4; /* 0x390017C1: add esp, 4 */
   1807     _flag_k = FK_ADD;
   1808     ecx = ebp + (-0x34); /* 0x390017C4: lea ecx, [ebp - 0x34] */
   1809     MEM32(ebp + 0x8) = eax; /* 0x390017C7: mov dword ptr [ebp + 8], eax */
   1810     PUSH32(esp, esi); /* 0x390017CA: push esi */
   1811     PUSH32(esp, eax); /* 0x390017CB: push eax */
   1812     RECOMP_ICALL(MEM32(0x3900B0A4)); /* 0x390017CC: call dword ptr [0x3900b0a4] */
   1813     RECOMP_FLAGS_IN();
   1814     /* test eax, eax */ /* 0x390017D2: test eax, eax */
   1815     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1816     _cf = 0;
   1817     _flag_k = FK_TEST;
   1818     if (TEST_NZ(_flag_a, _flag_b)) goto L_390017D8; /* 0x390017D4: jne 0x390017d8 */
   1819 L_390017D6:
   1820     SET_LO8(ebx, 1); /* 0x390017D6: mov bl, 1 */
   1821 L_390017D8:
   1822     ecx = ebp + (-0x34); /* 0x390017D8: lea ecx, [ebp - 0x34] */
   1823     RECOMP_ICALL(MEM32(0x3900B09C)); /* 0x390017DB: call dword ptr [0x3900b09c] */
   1824     RECOMP_FLAGS_IN();
   1825 L_390017E1:
   1826     eax = MEM32(ebp + (-0x18)); /* 0x390017E1: mov eax, dword ptr [ebp - 0x18] */
   1827     PUSH32(esp, eax); /* 0x390017E4: push eax */
   1828     RECOMP_ICALL(edi); /* 0x390017E5: call edi */
   1829     RECOMP_FLAGS_IN();
   1830     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1831     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1832     esp = esp + 4; /* 0x390017E7: add esp, 4 */
   1833     _flag_k = FK_ADD;
   1834     /* test LO8(ebx), LO8(ebx) */ /* 0x390017EA: test bl, bl */
   1835     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
   1836     _cf = 0;
   1837     _flag_k = FK_NARROW(FK_TEST, 24);
   1838     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900181F; /* 0x390017EC: jne 0x3900181f */
   1839 L_390017EE:
   1840     ecx = MEM32(ebp + 0x8); /* 0x390017EE: mov ecx, dword ptr [ebp + 8] */
   1841     PUSH32(esp, ecx); /* 0x390017F1: push ecx */
   1842     RECOMP_ICALL(0x3900A0A0u); /* 0x390017F2: call 0x3900a0a0 */ /* not lifted */
   1843     RECOMP_FLAGS_IN();
   1844     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1845     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1846     esp = esp + 4; /* 0x390017F7: add esp, 4 */
   1847     _flag_k = FK_ADD;
   1848 L_390017FA:
   1849     ecx = ebp + (-0x34); /* 0x390017FA: lea ecx, [ebp - 0x34] */
   1850     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x390017FD: mov dword ptr [ebp - 4], 0xffffffff */
   1851     RECOMP_ICALL(MEM32(0x3900B0C4)); /* 0x39001804: call dword ptr [0x3900b0c4] */
   1852     RECOMP_FLAGS_IN();
   1853     edi = POP32_VAL(esp); /* 0x3900180A: pop edi */
   1854     esi = POP32_VAL(esp); /* 0x3900180B: pop esi */
   1855     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
   1856     SET_LO8(eax, 0); /* 0x3900180C: xor al, al */
   1857     _cf = 0;
   1858     _flag_k = FK_NARROW(FK_TEST, 24);
   1859     ebx = POP32_VAL(esp); /* 0x3900180E: pop ebx */
   1860     ecx = MEM32(ebp + (-0xC)); /* 0x3900180F: mov ecx, dword ptr [ebp - 0xc] */
   1861     MEM32(FS_BASE + (0)) = ecx; /* 0x39001812: mov dword ptr fs:[0], ecx */
   1862     esp = ebp; /* 0x39001819: mov esp, ebp */
   1863     ebp = POP32_VAL(esp); /* 0x3900181B: pop ebp */
   1864     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900181C: ret 8 */
   1865 L_3900181F:
   1866     edx = MEM32(ebp + (-0x14)); /* 0x3900181F: mov edx, dword ptr [ebp - 0x14] */
   1867     eax = MEM32(ebp + 0x8); /* 0x39001822: mov eax, dword ptr [ebp + 8] */
   1868     PUSH32(esp, edx); /* 0x39001825: push edx */
   1869     PUSH32(esp, eax); /* 0x39001826: push eax */
   1870     ecx = ebp + (-0x54); /* 0x39001827: lea ecx, [ebp - 0x54] */
   1871     RECOMP_ICALL(MEM32(0x3900B0D0)); /* 0x3900182A: call dword ptr [0x3900b0d0] */
   1872     RECOMP_FLAGS_IN();
   1873     PUSH32(esp, 1); /* 0x39001830: push 1 */
   1874     ecx = ebp + (-0x54); /* 0x39001832: lea ecx, [ebp - 0x54] */
   1875     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x39001835: mov byte ptr [ebp - 4], 1 */
   1876     RECOMP_ICALL(MEM32(0x3900B098)); /* 0x39001839: call dword ptr [0x3900b098] */
   1877     RECOMP_FLAGS_IN();
   1878     ebx = MEM32(0x3900B074); /* 0x3900183F: mov ebx, dword ptr [0x3900b074] */
   1879 L_39001845:
   1880     ecx = ebp + (-0x54); /* 0x39001845: lea ecx, [ebp - 0x54] */
   1881     RECOMP_ICALL(MEM32(0x3900B0C8)); /* 0x39001848: call dword ptr [0x3900b0c8] */
   1882     RECOMP_FLAGS_IN();
   1883     /* cmp eax, MEM32(ebp + (-0x14)) */ /* 0x3900184E: cmp eax, dword ptr [ebp - 0x14] */
   1884     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + (-0x14)));
   1885     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1886     _flag_k = FK_CMP;
   1887     if (CMP_GE(_flag_a, _flag_b)) goto L_39001A38; /* 0x39001851: jge 0x39001a38 */
   1888 L_39001857:
   1889     PUSH32(esp, 0xAu); /* 0x39001857: push 0xa */
   1890     ecx = ebp + (-0xB74); /* 0x39001859: lea ecx, [ebp - 0xb74] */
   1891     PUSH32(esp, 0x800u); /* 0x3900185F: push 0x800 */
   1892     PUSH32(esp, ecx); /* 0x39001864: push ecx */
   1893     ecx = ebp + (-0x54); /* 0x39001865: lea ecx, [ebp - 0x54] */
   1894     RECOMP_ICALL(MEM32(0x3900B0CC)); /* 0x39001868: call dword ptr [0x3900b0cc] */
   1895     RECOMP_FLAGS_IN();
   1896     /* test eax, eax */ /* 0x3900186E: test eax, eax */
   1897     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1898     _cf = 0;
   1899     _flag_k = FK_TEST;
   1900     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001A38; /* 0x39001870: jne 0x39001a38 */
   1901 L_39001876:
   1902     ecx = 0x63u; /* 0x39001876: mov ecx, 0x63 */
   1903     edi = ebp + (-0x373); /* 0x3900187B: lea edi, [ebp - 0x373] */
   1904     MEM8(ebp + (-0x374)) = (uint8_t)(LO8(eax)); /* 0x39001881: mov byte ptr [ebp - 0x374], al */
   1905     edx = ebp + (-0x1E4); /* 0x39001887: lea edx, [ebp - 0x1e4] */
   1906     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x3900188D: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; }
   1907     MEM16(edi) = (uint16_t)LO16(eax); edi += _df * 2; /* 0x3900188F: stosw word ptr es:[edi], ax */
   1908     MEM8(edi) = LO8(eax); edi += _df; /* 0x39001891: stosb byte ptr es:[edi], al */
   1909     ecx = 0x63u; /* 0x39001892: mov ecx, 0x63 */
   1910     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1911     eax = 0; /* 0x39001897: xor eax, eax */
   1912     _cf = 0;
   1913     _flag_k = FK_TEST;
   1914     edi = ebp + (-0x1E3); /* 0x39001899: lea edi, [ebp - 0x1e3] */
   1915     MEM8(ebp + (-0x1E4)) = (uint8_t)(0); /* 0x3900189F: mov byte ptr [ebp - 0x1e4], 0 */
   1916     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390018A6: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; }
   1917     MEM16(edi) = (uint16_t)LO16(eax); edi += _df * 2; /* 0x390018A8: stosw word ptr es:[edi], ax */
   1918     MEM8(edi) = LO8(eax); edi += _df; /* 0x390018AA: stosb byte ptr es:[edi], al */
   1919     eax = ebp + (-0x374); /* 0x390018AB: lea eax, [ebp - 0x374] */
   1920     PUSH32(esp, edx); /* 0x390018B1: push edx */
   1921     PUSH32(esp, eax); /* 0x390018B2: push eax */
   1922     ecx = ebp + (-0xB74); /* 0x390018B3: lea ecx, [ebp - 0xb74] */
   1923     PUSH32(esp, 0x3900E040u); /* 0x390018B9: push 0x3900e040 */
   1924     PUSH32(esp, ecx); /* 0x390018BE: push ecx */
   1925     RECOMP_ICALL(ebx); /* 0x390018BF: call ebx */
   1926     RECOMP_FLAGS_IN();
   1927     SET_LO8(eax, MEM8(ebp + (-0x374))); /* 0x390018C1: mov al, byte ptr [ebp - 0x374] */
   1928     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   1929     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1930     esp = esp + 0x10u; /* 0x390018C7: add esp, 0x10 */
   1931     _flag_k = FK_ADD;
   1932     /* test LO8(eax), LO8(eax) */ /* 0x390018CA: test al, al */
   1933     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   1934     _cf = 0;
   1935     _flag_k = FK_NARROW(FK_TEST, 24);
   1936     RECOMP_BACKEDGE();
   1937     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x390018CC: je 0x39001845 */
   1938 L_390018D2:
   1939     /* cmp LO8(eax), 0xAu */ /* 0x390018D2: cmp al, 0xa */
   1940     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xAu) << 24;
   1941     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1942     _flag_k = FK_NARROW(FK_CMP, 24);
   1943     RECOMP_BACKEDGE();
   1944     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x390018D4: je 0x39001845 */
   1945 L_390018DA:
   1946     /* cmp LO8(eax), 0x2Fu */ /* 0x390018DA: cmp al, 0x2f */
   1947     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x2Fu) << 24;
   1948     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1949     _flag_k = FK_NARROW(FK_CMP, 24);
   1950     RECOMP_BACKEDGE();
   1951     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x390018DC: je 0x39001845 */
   1952 L_390018E2:
   1953     /* cmp LO8(eax), 0x23u */ /* 0x390018E2: cmp al, 0x23 */
   1954     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x23u) << 24;
   1955     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1956     _flag_k = FK_NARROW(FK_CMP, 24);
   1957     RECOMP_BACKEDGE();
   1958     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x390018E4: je 0x39001845 */
   1959 L_390018EA:
   1960     edx = ebp + (-0x374); /* 0x390018EA: lea edx, [ebp - 0x374] */
   1961     PUSH32(esp, 0x3900E034u); /* 0x390018F0: push 0x3900e034 */
   1962     PUSH32(esp, edx); /* 0x390018F5: push edx */
   1963     RECOMP_ICALL(MEM32(0x3900B070)); /* 0x390018F6: call dword ptr [0x3900b070] */
   1964     RECOMP_FLAGS_IN();
   1965     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1966     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1967     esp = esp + 8; /* 0x390018FC: add esp, 8 */
   1968     _flag_k = FK_ADD;
   1969     /* test eax, eax */ /* 0x390018FF: test eax, eax */
   1970     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1971     _cf = 0;
   1972     _flag_k = FK_TEST;
   1973     RECOMP_BACKEDGE();
   1974     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x39001901: je 0x39001845 */
   1975 L_39001907:
   1976     eax = ebp + (-0x374); /* 0x39001907: lea eax, [ebp - 0x374] */
   1977     PUSH32(esp, 0x3900E028u); /* 0x3900190D: push 0x3900e028 */
   1978     PUSH32(esp, eax); /* 0x39001912: push eax */
   1979     RECOMP_ICALL(MEM32(0x3900B070)); /* 0x39001913: call dword ptr [0x3900b070] */
   1980     RECOMP_FLAGS_IN();
   1981     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1982     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1983     esp = esp + 8; /* 0x39001919: add esp, 8 */
   1984     _flag_k = FK_ADD;
   1985     /* test eax, eax */ /* 0x3900191C: test eax, eax */
   1986     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1987     _cf = 0;
   1988     _flag_k = FK_TEST;
   1989     RECOMP_BACKEDGE();
   1990     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x3900191E: je 0x39001845 */
   1991 L_39001924:
   1992     SET_LO8(eax, MEM8(ebp + (-0x1E4))); /* 0x39001924: mov al, byte ptr [ebp - 0x1e4] */
   1993     /* cmp LO8(eax), 0x22u */ /* 0x3900192A: cmp al, 0x22 */
   1994     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x22u) << 24;
   1995     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1996     _flag_k = FK_NARROW(FK_CMP, 24);
   1997     if (CMP_NE(_flag_a, _flag_b)) goto L_390019B9; /* 0x3900192C: jne 0x390019b9 */
   1998 L_39001932:
   1999     SET_LO8(ecx, MEM8(ebp + (-0xB74))); /* 0x39001932: mov cl, byte ptr [ebp - 0xb74] */
   2000     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2001     eax = 0; /* 0x39001938: xor eax, eax */
   2002     _cf = 0;
   2003     _flag_k = FK_TEST;
   2004     /* test LO8(ecx), LO8(ecx) */ /* 0x3900193A: test cl, cl */
   2005     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2006     _cf = 0;
   2007     _flag_k = FK_NARROW(FK_TEST, 24);
   2008     RECOMP_BACKEDGE();
   2009     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x3900193C: je 0x39001845 */
   2010 L_39001942:
   2011     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x39001942: mov cl, byte ptr [ebp + eax - 0xb74] */
   2012     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   2013     eax = eax + 1; /* 0x39001949: inc eax */
   2014     _flag_k = FK_INC;
   2015     /* cmp LO8(ecx), 0x22u */ /* 0x3900194A: cmp cl, 0x22 */
   2016     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0x22u) << 24;
   2017     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2018     _flag_k = FK_NARROW(FK_CMP, 24);
   2019     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900195F; /* 0x3900194D: je 0x3900195f */
   2020 L_3900194F:
   2021     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x3900194F: mov cl, byte ptr [ebp + eax - 0xb74] */
   2022     /* test LO8(ecx), LO8(ecx) */ /* 0x39001956: test cl, cl */
   2023     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2024     _cf = 0;
   2025     _flag_k = FK_NARROW(FK_TEST, 24);
   2026     RECOMP_BACKEDGE();
   2027     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001942; /* 0x39001958: jne 0x39001942 */
   2028 L_3900195A:
   2029     RECOMP_BACKEDGE();
   2030     goto L_39001845; /* 0x3900195A: jmp 0x39001845 */
   2031 L_3900195F:
   2032     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x3900195F: mov cl, byte ptr [ebp + eax - 0xb74] */
   2033     esi = ebp + eax + (-0xB74); /* 0x39001966: lea esi, [ebp + eax - 0xb74] */
   2034     /* test LO8(ecx), LO8(ecx) */ /* 0x3900196D: test cl, cl */
   2035     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2036     _cf = 0;
   2037     _flag_k = FK_NARROW(FK_TEST, 24);
   2038     edi = eax; /* 0x3900196F: mov edi, eax */
   2039     edx = eax; /* 0x39001971: mov edx, eax */
   2040     RECOMP_BACKEDGE();
   2041     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x39001973: je 0x39001845 */
   2042 L_39001979:
   2043     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   2044     eax = eax + 1; /* 0x39001979: inc eax */
   2045     _flag_k = FK_INC;
   2046     /* cmp LO8(ecx), 0x22u */ /* 0x3900197A: cmp cl, 0x22 */
   2047     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0x22u) << 24;
   2048     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2049     _flag_k = FK_NARROW(FK_CMP, 24);
   2050     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900198C; /* 0x3900197D: je 0x3900198c */
   2051 L_3900197F:
   2052     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x3900197F: mov cl, byte ptr [ebp + eax - 0xb74] */
   2053     /* test LO8(ecx), LO8(ecx) */ /* 0x39001986: test cl, cl */
   2054     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2055     _cf = 0;
   2056     _flag_k = FK_NARROW(FK_TEST, 24);
   2057     RECOMP_BACKEDGE();
   2058     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001979; /* 0x39001988: jne 0x39001979 */
   2059 L_3900198A:
   2060     goto L_3900198E; /* 0x3900198A: jmp 0x3900198e */
   2061 L_3900198C:
   2062     edx = eax; /* 0x3900198C: mov edx, eax */
   2063 L_3900198E:
   2064     /* cmp edi, edx */ /* 0x3900198E: cmp edi, edx */
   2065     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx);
   2066     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2067     _flag_k = FK_CMP;
   2068     RECOMP_BACKEDGE();
   2069     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x39001990: je 0x39001845 */
   2070 L_39001996:
   2071     ecx = MEM32(ebp + (-0x10)); /* 0x39001996: mov ecx, dword ptr [ebp - 0x10] */
   2072     MEM8(ebp + edx + (-0xB75)) = (uint8_t)(0); /* 0x39001999: mov byte ptr [ebp + edx - 0xb75], 0 */
   2073     edx = MEM32(ebp + 0xC); /* 0x390019A1: mov edx, dword ptr [ebp + 0xc] */
   2074     PUSH32(esp, 1); /* 0x390019A4: push 1 */
   2075     PUSH32(esp, edx); /* 0x390019A6: push edx */
   2076     eax = ebp + (-0x374); /* 0x390019A7: lea eax, [ebp - 0x374] */
   2077     PUSH32(esp, esi); /* 0x390019AD: push esi */
   2078     PUSH32(esp, eax); /* 0x390019AE: push eax */
   2079     RECOMP_ICALL(0x39002040u); /* 0x390019AF: call 0x39002040 */ /* not lifted */
   2080     RECOMP_FLAGS_IN();
   2081     RECOMP_BACKEDGE();
   2082     goto L_39001845; /* 0x390019B4: jmp 0x39001845 */
   2083 L_390019B9:
   2084     /* test LO8(eax), LO8(eax) */ /* 0x390019B9: test al, al */
   2085     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   2086     _cf = 0;
   2087     _flag_k = FK_NARROW(FK_TEST, 24);
   2088     if (TEST_Z(_flag_a, _flag_b)) goto L_390019D0; /* 0x390019BB: je 0x390019d0 */
   2089 L_390019BD:
   2090     eax = ebp + (-0x1E4); /* 0x390019BD: lea eax, [ebp - 0x1e4] */
   2091 L_390019C3:
   2092     SET_LO8(ecx, MEM8(eax)); /* 0x390019C3: mov cl, byte ptr [eax] */
   2093     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   2094     eax = eax + 1; /* 0x390019C5: inc eax */
   2095     _flag_k = FK_INC;
   2096     /* cmp LO8(ecx), 0x2Eu */ /* 0x390019C6: cmp cl, 0x2e */
   2097     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0x2Eu) << 24;
   2098     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2099     _flag_k = FK_NARROW(FK_CMP, 24);
   2100     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001A03; /* 0x390019C9: je 0x39001a03 */
   2101 L_390019CB:
   2102     /* cmp MEM8(eax), 0 */ /* 0x390019CB: cmp byte ptr [eax], 0 */
   2103     _flag_a = (uint32_t)(MEM8(eax)) << 24; _flag_b = (uint32_t)(0) << 24;
   2104     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2105     _flag_k = FK_NARROW(FK_CMP, 24);
   2106     RECOMP_BACKEDGE();
   2107     if (CMP_NE(_flag_a, _flag_b)) goto L_390019C3; /* 0x390019CE: jne 0x390019c3 */
   2108 L_390019D0:
   2109     ecx = ebp + (-0x1C); /* 0x390019D0: lea ecx, [ebp - 0x1c] */
   2110     edx = ebp + (-0x1E4); /* 0x390019D3: lea edx, [ebp - 0x1e4] */
   2111     PUSH32(esp, ecx); /* 0x390019D9: push ecx */
   2112     PUSH32(esp, 0x3900E024u); /* 0x390019DA: push 0x3900e024 */
   2113     PUSH32(esp, edx); /* 0x390019DF: push edx */
   2114     RECOMP_ICALL(ebx); /* 0x390019E0: call ebx */
   2115     RECOMP_FLAGS_IN();
   2116     eax = MEM32(ebp + 0xC); /* 0x390019E2: mov eax, dword ptr [ebp + 0xc] */
   2117     ecx = MEM32(ebp + (-0x1C)); /* 0x390019E5: mov ecx, dword ptr [ebp - 0x1c] */
   2118     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   2119     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2120     esp = esp + 0xCu; /* 0x390019E8: add esp, 0xc */
   2121     _flag_k = FK_ADD;
   2122     edx = ebp + (-0x374); /* 0x390019EB: lea edx, [ebp - 0x374] */
   2123     PUSH32(esp, 1); /* 0x390019F1: push 1 */
   2124     PUSH32(esp, eax); /* 0x390019F3: push eax */
   2125     PUSH32(esp, ecx); /* 0x390019F4: push ecx */
   2126     ecx = MEM32(ebp + (-0x10)); /* 0x390019F5: mov ecx, dword ptr [ebp - 0x10] */
   2127     PUSH32(esp, edx); /* 0x390019F8: push edx */
   2128     RECOMP_ICALL(0x39001D30u); /* 0x390019F9: call 0x39001d30 */ /* not lifted */
   2129     RECOMP_FLAGS_IN();
   2130     RECOMP_BACKEDGE();
   2131     goto L_39001845; /* 0x390019FE: jmp 0x39001845 */
   2132 L_39001A03:
   2133     edx = ebp + (-0x18); /* 0x39001A03: lea edx, [ebp - 0x18] */
   2134     eax = ebp + (-0x1E4); /* 0x39001A06: lea eax, [ebp - 0x1e4] */
   2135     PUSH32(esp, edx); /* 0x39001A0C: push edx */
   2136     PUSH32(esp, 0x3900E020u); /* 0x39001A0D: push 0x3900e020 */
   2137     PUSH32(esp, eax); /* 0x39001A12: push eax */
   2138     RECOMP_ICALL(ebx); /* 0x39001A13: call ebx */
   2139     RECOMP_FLAGS_IN();
   2140     ecx = MEM32(ebp + 0xC); /* 0x39001A15: mov ecx, dword ptr [ebp + 0xc] */
   2141     edx = MEM32(ebp + (-0x18)); /* 0x39001A18: mov edx, dword ptr [ebp - 0x18] */
   2142     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   2143     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2144     esp = esp + 0xCu; /* 0x39001A1B: add esp, 0xc */
   2145     _flag_k = FK_ADD;
   2146     eax = ebp + (-0x374); /* 0x39001A1E: lea eax, [ebp - 0x374] */
   2147     PUSH32(esp, 1); /* 0x39001A24: push 1 */
   2148     PUSH32(esp, ecx); /* 0x39001A26: push ecx */
   2149     ecx = MEM32(ebp + (-0x10)); /* 0x39001A27: mov ecx, dword ptr [ebp - 0x10] */
   2150     PUSH32(esp, edx); /* 0x39001A2A: push edx */
   2151     PUSH32(esp, eax); /* 0x39001A2B: push eax */
   2152     RECOMP_ICALL(0x39001EB0u); /* 0x39001A2C: call 0x39001eb0 */ /* not lifted */
   2153     RECOMP_FLAGS_IN();
   2154     { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x39001A31: fstp st(0) */
   2155     RECOMP_BACKEDGE();
   2156     goto L_39001845; /* 0x39001A33: jmp 0x39001845 */
   2157 L_39001A38:
   2158     eax = MEM32(ebp + 0x8); /* 0x39001A38: mov eax, dword ptr [ebp + 8] */
   2159     PUSH32(esp, eax); /* 0x39001A3B: push eax */
   2160     RECOMP_ICALL(0x3900A0A0u); /* 0x39001A3C: call 0x3900a0a0 */ /* not lifted */
   2161     RECOMP_FLAGS_IN();
   2162     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2163     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2164     esp = esp + 4; /* 0x39001A41: add esp, 4 */
   2165     _flag_k = FK_ADD;
   2166     ecx = ebp + (-0x54); /* 0x39001A44: lea ecx, [ebp - 0x54] */
   2167     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x39001A47: mov byte ptr [ebp - 4], 0 */
   2168     RECOMP_ICALL(MEM32(0x3900B0C0)); /* 0x39001A4B: call dword ptr [0x3900b0c0] */
   2169     RECOMP_FLAGS_IN();
   2170     ecx = ebp + (-0x34); /* 0x39001A51: lea ecx, [ebp - 0x34] */
   2171     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39001A54: mov dword ptr [ebp - 4], 0xffffffff */
   2172     RECOMP_ICALL(MEM32(0x3900B0C4)); /* 0x39001A5B: call dword ptr [0x3900b0c4] */
   2173     RECOMP_FLAGS_IN();
   2174     ecx = MEM32(ebp + (-0xC)); /* 0x39001A61: mov ecx, dword ptr [ebp - 0xc] */
   2175     edi = POP32_VAL(esp); /* 0x39001A64: pop edi */
   2176     esi = POP32_VAL(esp); /* 0x39001A65: pop esi */
   2177     SET_LO8(eax, 1); /* 0x39001A66: mov al, 1 */
   2178     ebx = POP32_VAL(esp); /* 0x39001A68: pop ebx */
   2179     MEM32(FS_BASE + (0)) = ecx; /* 0x39001A69: mov dword ptr fs:[0], ecx */
   2180     esp = ebp; /* 0x39001A70: mov esp, ebp */
   2181     ebp = POP32_VAL(esp); /* 0x39001A72: pop ebp */
   2182     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39001A73: ret 8 */
   2183     RECOMP_REGS_OUT();
   2184 }
   2185 
   2186 void sub_39001845(void) {
   2187     int _fpu_cmp = 0;
   2188     uint32_t _cf = 0;
   2189     int _df = 1;
   2190     uint32_t _flag_k = FK_NONE;
   2191     uint32_t _flag_a = 0, _flag_b = 0;
   2192     uint32_t _itail_tgt = 0;
   2193     RECOMP_REGS_LOCALS
   2194     RECOMP_ENTER(0x39001845u);
   2195 
   2196 L_39001845:
   2197     ecx = ebp + (-0x54); /* 0x39001845: lea ecx, [ebp - 0x54] */
   2198     RECOMP_ICALL(MEM32(0x3900B0C8)); /* 0x39001848: call dword ptr [0x3900b0c8] */
   2199     RECOMP_FLAGS_IN();
   2200     /* cmp eax, MEM32(ebp + (-0x14)) */ /* 0x3900184E: cmp eax, dword ptr [ebp - 0x14] */
   2201     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + (-0x14)));
   2202     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2203     _flag_k = FK_CMP;
   2204     if (CMP_GE(_flag_a, _flag_b)) goto L_39001A38; /* 0x39001851: jge 0x39001a38 */
   2205 L_39001857:
   2206     PUSH32(esp, 0xAu); /* 0x39001857: push 0xa */
   2207     ecx = ebp + (-0xB74); /* 0x39001859: lea ecx, [ebp - 0xb74] */
   2208     PUSH32(esp, 0x800u); /* 0x3900185F: push 0x800 */
   2209     PUSH32(esp, ecx); /* 0x39001864: push ecx */
   2210     ecx = ebp + (-0x54); /* 0x39001865: lea ecx, [ebp - 0x54] */
   2211     RECOMP_ICALL(MEM32(0x3900B0CC)); /* 0x39001868: call dword ptr [0x3900b0cc] */
   2212     RECOMP_FLAGS_IN();
   2213     /* test eax, eax */ /* 0x3900186E: test eax, eax */
   2214     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   2215     _cf = 0;
   2216     _flag_k = FK_TEST;
   2217     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001A38; /* 0x39001870: jne 0x39001a38 */
   2218 L_39001876:
   2219     ecx = 0x63u; /* 0x39001876: mov ecx, 0x63 */
   2220     edi = ebp + (-0x373); /* 0x3900187B: lea edi, [ebp - 0x373] */
   2221     MEM8(ebp + (-0x374)) = (uint8_t)(LO8(eax)); /* 0x39001881: mov byte ptr [ebp - 0x374], al */
   2222     edx = ebp + (-0x1E4); /* 0x39001887: lea edx, [ebp - 0x1e4] */
   2223     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x3900188D: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; }
   2224     MEM16(edi) = (uint16_t)LO16(eax); edi += _df * 2; /* 0x3900188F: stosw word ptr es:[edi], ax */
   2225     MEM8(edi) = LO8(eax); edi += _df; /* 0x39001891: stosb byte ptr es:[edi], al */
   2226     ecx = 0x63u; /* 0x39001892: mov ecx, 0x63 */
   2227     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2228     eax = 0; /* 0x39001897: xor eax, eax */
   2229     _cf = 0;
   2230     _flag_k = FK_TEST;
   2231     edi = ebp + (-0x1E3); /* 0x39001899: lea edi, [ebp - 0x1e3] */
   2232     MEM8(ebp + (-0x1E4)) = (uint8_t)(0); /* 0x3900189F: mov byte ptr [ebp - 0x1e4], 0 */
   2233     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390018A6: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; }
   2234     MEM16(edi) = (uint16_t)LO16(eax); edi += _df * 2; /* 0x390018A8: stosw word ptr es:[edi], ax */
   2235     MEM8(edi) = LO8(eax); edi += _df; /* 0x390018AA: stosb byte ptr es:[edi], al */
   2236     eax = ebp + (-0x374); /* 0x390018AB: lea eax, [ebp - 0x374] */
   2237     PUSH32(esp, edx); /* 0x390018B1: push edx */
   2238     PUSH32(esp, eax); /* 0x390018B2: push eax */
   2239     ecx = ebp + (-0xB74); /* 0x390018B3: lea ecx, [ebp - 0xb74] */
   2240     PUSH32(esp, 0x3900E040u); /* 0x390018B9: push 0x3900e040 */
   2241     PUSH32(esp, ecx); /* 0x390018BE: push ecx */
   2242     RECOMP_ICALL(ebx); /* 0x390018BF: call ebx */
   2243     RECOMP_FLAGS_IN();
   2244     SET_LO8(eax, MEM8(ebp + (-0x374))); /* 0x390018C1: mov al, byte ptr [ebp - 0x374] */
   2245     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   2246     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2247     esp = esp + 0x10u; /* 0x390018C7: add esp, 0x10 */
   2248     _flag_k = FK_ADD;
   2249     /* test LO8(eax), LO8(eax) */ /* 0x390018CA: test al, al */
   2250     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   2251     _cf = 0;
   2252     _flag_k = FK_NARROW(FK_TEST, 24);
   2253     RECOMP_BACKEDGE();
   2254     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x390018CC: je 0x39001845 */
   2255 L_390018D2:
   2256     /* cmp LO8(eax), 0xAu */ /* 0x390018D2: cmp al, 0xa */
   2257     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xAu) << 24;
   2258     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2259     _flag_k = FK_NARROW(FK_CMP, 24);
   2260     RECOMP_BACKEDGE();
   2261     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x390018D4: je 0x39001845 */
   2262 L_390018DA:
   2263     /* cmp LO8(eax), 0x2Fu */ /* 0x390018DA: cmp al, 0x2f */
   2264     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x2Fu) << 24;
   2265     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2266     _flag_k = FK_NARROW(FK_CMP, 24);
   2267     RECOMP_BACKEDGE();
   2268     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x390018DC: je 0x39001845 */
   2269 L_390018E2:
   2270     /* cmp LO8(eax), 0x23u */ /* 0x390018E2: cmp al, 0x23 */
   2271     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x23u) << 24;
   2272     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2273     _flag_k = FK_NARROW(FK_CMP, 24);
   2274     RECOMP_BACKEDGE();
   2275     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x390018E4: je 0x39001845 */
   2276 L_390018EA:
   2277     edx = ebp + (-0x374); /* 0x390018EA: lea edx, [ebp - 0x374] */
   2278     PUSH32(esp, 0x3900E034u); /* 0x390018F0: push 0x3900e034 */
   2279     PUSH32(esp, edx); /* 0x390018F5: push edx */
   2280     RECOMP_ICALL(MEM32(0x3900B070)); /* 0x390018F6: call dword ptr [0x3900b070] */
   2281     RECOMP_FLAGS_IN();
   2282     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2283     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2284     esp = esp + 8; /* 0x390018FC: add esp, 8 */
   2285     _flag_k = FK_ADD;
   2286     /* test eax, eax */ /* 0x390018FF: test eax, eax */
   2287     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   2288     _cf = 0;
   2289     _flag_k = FK_TEST;
   2290     RECOMP_BACKEDGE();
   2291     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x39001901: je 0x39001845 */
   2292 L_39001907:
   2293     eax = ebp + (-0x374); /* 0x39001907: lea eax, [ebp - 0x374] */
   2294     PUSH32(esp, 0x3900E028u); /* 0x3900190D: push 0x3900e028 */
   2295     PUSH32(esp, eax); /* 0x39001912: push eax */
   2296     RECOMP_ICALL(MEM32(0x3900B070)); /* 0x39001913: call dword ptr [0x3900b070] */
   2297     RECOMP_FLAGS_IN();
   2298     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2299     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2300     esp = esp + 8; /* 0x39001919: add esp, 8 */
   2301     _flag_k = FK_ADD;
   2302     /* test eax, eax */ /* 0x3900191C: test eax, eax */
   2303     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   2304     _cf = 0;
   2305     _flag_k = FK_TEST;
   2306     RECOMP_BACKEDGE();
   2307     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x3900191E: je 0x39001845 */
   2308 L_39001924:
   2309     SET_LO8(eax, MEM8(ebp + (-0x1E4))); /* 0x39001924: mov al, byte ptr [ebp - 0x1e4] */
   2310     /* cmp LO8(eax), 0x22u */ /* 0x3900192A: cmp al, 0x22 */
   2311     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x22u) << 24;
   2312     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2313     _flag_k = FK_NARROW(FK_CMP, 24);
   2314     if (CMP_NE(_flag_a, _flag_b)) goto L_390019B9; /* 0x3900192C: jne 0x390019b9 */
   2315 L_39001932:
   2316     SET_LO8(ecx, MEM8(ebp + (-0xB74))); /* 0x39001932: mov cl, byte ptr [ebp - 0xb74] */
   2317     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2318     eax = 0; /* 0x39001938: xor eax, eax */
   2319     _cf = 0;
   2320     _flag_k = FK_TEST;
   2321     /* test LO8(ecx), LO8(ecx) */ /* 0x3900193A: test cl, cl */
   2322     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2323     _cf = 0;
   2324     _flag_k = FK_NARROW(FK_TEST, 24);
   2325     RECOMP_BACKEDGE();
   2326     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x3900193C: je 0x39001845 */
   2327 L_39001942:
   2328     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x39001942: mov cl, byte ptr [ebp + eax - 0xb74] */
   2329     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   2330     eax = eax + 1; /* 0x39001949: inc eax */
   2331     _flag_k = FK_INC;
   2332     /* cmp LO8(ecx), 0x22u */ /* 0x3900194A: cmp cl, 0x22 */
   2333     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0x22u) << 24;
   2334     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2335     _flag_k = FK_NARROW(FK_CMP, 24);
   2336     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900195F; /* 0x3900194D: je 0x3900195f */
   2337 L_3900194F:
   2338     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x3900194F: mov cl, byte ptr [ebp + eax - 0xb74] */
   2339     /* test LO8(ecx), LO8(ecx) */ /* 0x39001956: test cl, cl */
   2340     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2341     _cf = 0;
   2342     _flag_k = FK_NARROW(FK_TEST, 24);
   2343     RECOMP_BACKEDGE();
   2344     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001942; /* 0x39001958: jne 0x39001942 */
   2345 L_3900195A:
   2346     RECOMP_BACKEDGE();
   2347     goto L_39001845; /* 0x3900195A: jmp 0x39001845 */
   2348 L_3900195F:
   2349     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x3900195F: mov cl, byte ptr [ebp + eax - 0xb74] */
   2350     esi = ebp + eax + (-0xB74); /* 0x39001966: lea esi, [ebp + eax - 0xb74] */
   2351     /* test LO8(ecx), LO8(ecx) */ /* 0x3900196D: test cl, cl */
   2352     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2353     _cf = 0;
   2354     _flag_k = FK_NARROW(FK_TEST, 24);
   2355     edi = eax; /* 0x3900196F: mov edi, eax */
   2356     edx = eax; /* 0x39001971: mov edx, eax */
   2357     RECOMP_BACKEDGE();
   2358     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x39001973: je 0x39001845 */
   2359 L_39001979:
   2360     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   2361     eax = eax + 1; /* 0x39001979: inc eax */
   2362     _flag_k = FK_INC;
   2363     /* cmp LO8(ecx), 0x22u */ /* 0x3900197A: cmp cl, 0x22 */
   2364     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0x22u) << 24;
   2365     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2366     _flag_k = FK_NARROW(FK_CMP, 24);
   2367     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900198C; /* 0x3900197D: je 0x3900198c */
   2368 L_3900197F:
   2369     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x3900197F: mov cl, byte ptr [ebp + eax - 0xb74] */
   2370     /* test LO8(ecx), LO8(ecx) */ /* 0x39001986: test cl, cl */
   2371     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2372     _cf = 0;
   2373     _flag_k = FK_NARROW(FK_TEST, 24);
   2374     RECOMP_BACKEDGE();
   2375     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001979; /* 0x39001988: jne 0x39001979 */
   2376 L_3900198A:
   2377     goto L_3900198E; /* 0x3900198A: jmp 0x3900198e */
   2378 L_3900198C:
   2379     edx = eax; /* 0x3900198C: mov edx, eax */
   2380 L_3900198E:
   2381     /* cmp edi, edx */ /* 0x3900198E: cmp edi, edx */
   2382     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx);
   2383     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2384     _flag_k = FK_CMP;
   2385     RECOMP_BACKEDGE();
   2386     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x39001990: je 0x39001845 */
   2387 L_39001996:
   2388     ecx = MEM32(ebp + (-0x10)); /* 0x39001996: mov ecx, dword ptr [ebp - 0x10] */
   2389     MEM8(ebp + edx + (-0xB75)) = (uint8_t)(0); /* 0x39001999: mov byte ptr [ebp + edx - 0xb75], 0 */
   2390     edx = MEM32(ebp + 0xC); /* 0x390019A1: mov edx, dword ptr [ebp + 0xc] */
   2391     PUSH32(esp, 1); /* 0x390019A4: push 1 */
   2392     PUSH32(esp, edx); /* 0x390019A6: push edx */
   2393     eax = ebp + (-0x374); /* 0x390019A7: lea eax, [ebp - 0x374] */
   2394     PUSH32(esp, esi); /* 0x390019AD: push esi */
   2395     PUSH32(esp, eax); /* 0x390019AE: push eax */
   2396     RECOMP_ICALL(0x39002040u); /* 0x390019AF: call 0x39002040 */ /* not lifted */
   2397     RECOMP_FLAGS_IN();
   2398     RECOMP_BACKEDGE();
   2399     goto L_39001845; /* 0x390019B4: jmp 0x39001845 */
   2400 L_390019B9:
   2401     /* test LO8(eax), LO8(eax) */ /* 0x390019B9: test al, al */
   2402     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   2403     _cf = 0;
   2404     _flag_k = FK_NARROW(FK_TEST, 24);
   2405     if (TEST_Z(_flag_a, _flag_b)) goto L_390019D0; /* 0x390019BB: je 0x390019d0 */
   2406 L_390019BD:
   2407     eax = ebp + (-0x1E4); /* 0x390019BD: lea eax, [ebp - 0x1e4] */
   2408 L_390019C3:
   2409     SET_LO8(ecx, MEM8(eax)); /* 0x390019C3: mov cl, byte ptr [eax] */
   2410     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   2411     eax = eax + 1; /* 0x390019C5: inc eax */
   2412     _flag_k = FK_INC;
   2413     /* cmp LO8(ecx), 0x2Eu */ /* 0x390019C6: cmp cl, 0x2e */
   2414     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0x2Eu) << 24;
   2415     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2416     _flag_k = FK_NARROW(FK_CMP, 24);
   2417     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001A03; /* 0x390019C9: je 0x39001a03 */
   2418 L_390019CB:
   2419     /* cmp MEM8(eax), 0 */ /* 0x390019CB: cmp byte ptr [eax], 0 */
   2420     _flag_a = (uint32_t)(MEM8(eax)) << 24; _flag_b = (uint32_t)(0) << 24;
   2421     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2422     _flag_k = FK_NARROW(FK_CMP, 24);
   2423     RECOMP_BACKEDGE();
   2424     if (CMP_NE(_flag_a, _flag_b)) goto L_390019C3; /* 0x390019CE: jne 0x390019c3 */
   2425 L_390019D0:
   2426     ecx = ebp + (-0x1C); /* 0x390019D0: lea ecx, [ebp - 0x1c] */
   2427     edx = ebp + (-0x1E4); /* 0x390019D3: lea edx, [ebp - 0x1e4] */
   2428     PUSH32(esp, ecx); /* 0x390019D9: push ecx */
   2429     PUSH32(esp, 0x3900E024u); /* 0x390019DA: push 0x3900e024 */
   2430     PUSH32(esp, edx); /* 0x390019DF: push edx */
   2431     RECOMP_ICALL(ebx); /* 0x390019E0: call ebx */
   2432     RECOMP_FLAGS_IN();
   2433     eax = MEM32(ebp + 0xC); /* 0x390019E2: mov eax, dword ptr [ebp + 0xc] */
   2434     ecx = MEM32(ebp + (-0x1C)); /* 0x390019E5: mov ecx, dword ptr [ebp - 0x1c] */
   2435     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   2436     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2437     esp = esp + 0xCu; /* 0x390019E8: add esp, 0xc */
   2438     _flag_k = FK_ADD;
   2439     edx = ebp + (-0x374); /* 0x390019EB: lea edx, [ebp - 0x374] */
   2440     PUSH32(esp, 1); /* 0x390019F1: push 1 */
   2441     PUSH32(esp, eax); /* 0x390019F3: push eax */
   2442     PUSH32(esp, ecx); /* 0x390019F4: push ecx */
   2443     ecx = MEM32(ebp + (-0x10)); /* 0x390019F5: mov ecx, dword ptr [ebp - 0x10] */
   2444     PUSH32(esp, edx); /* 0x390019F8: push edx */
   2445     RECOMP_ICALL(0x39001D30u); /* 0x390019F9: call 0x39001d30 */ /* not lifted */
   2446     RECOMP_FLAGS_IN();
   2447     RECOMP_BACKEDGE();
   2448     goto L_39001845; /* 0x390019FE: jmp 0x39001845 */
   2449 L_39001A03:
   2450     edx = ebp + (-0x18); /* 0x39001A03: lea edx, [ebp - 0x18] */
   2451     eax = ebp + (-0x1E4); /* 0x39001A06: lea eax, [ebp - 0x1e4] */
   2452     PUSH32(esp, edx); /* 0x39001A0C: push edx */
   2453     PUSH32(esp, 0x3900E020u); /* 0x39001A0D: push 0x3900e020 */
   2454     PUSH32(esp, eax); /* 0x39001A12: push eax */
   2455     RECOMP_ICALL(ebx); /* 0x39001A13: call ebx */
   2456     RECOMP_FLAGS_IN();
   2457     ecx = MEM32(ebp + 0xC); /* 0x39001A15: mov ecx, dword ptr [ebp + 0xc] */
   2458     edx = MEM32(ebp + (-0x18)); /* 0x39001A18: mov edx, dword ptr [ebp - 0x18] */
   2459     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   2460     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2461     esp = esp + 0xCu; /* 0x39001A1B: add esp, 0xc */
   2462     _flag_k = FK_ADD;
   2463     eax = ebp + (-0x374); /* 0x39001A1E: lea eax, [ebp - 0x374] */
   2464     PUSH32(esp, 1); /* 0x39001A24: push 1 */
   2465     PUSH32(esp, ecx); /* 0x39001A26: push ecx */
   2466     ecx = MEM32(ebp + (-0x10)); /* 0x39001A27: mov ecx, dword ptr [ebp - 0x10] */
   2467     PUSH32(esp, edx); /* 0x39001A2A: push edx */
   2468     PUSH32(esp, eax); /* 0x39001A2B: push eax */
   2469     RECOMP_ICALL(0x39001EB0u); /* 0x39001A2C: call 0x39001eb0 */ /* not lifted */
   2470     RECOMP_FLAGS_IN();
   2471     { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x39001A31: fstp st(0) */
   2472     RECOMP_BACKEDGE();
   2473     goto L_39001845; /* 0x39001A33: jmp 0x39001845 */
   2474 L_39001A38:
   2475     eax = MEM32(ebp + 0x8); /* 0x39001A38: mov eax, dword ptr [ebp + 8] */
   2476     PUSH32(esp, eax); /* 0x39001A3B: push eax */
   2477     RECOMP_ICALL(0x3900A0A0u); /* 0x39001A3C: call 0x3900a0a0 */ /* 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; /* 0x39001A41: add esp, 4 */
   2482     _flag_k = FK_ADD;
   2483     ecx = ebp + (-0x54); /* 0x39001A44: lea ecx, [ebp - 0x54] */
   2484     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x39001A47: mov byte ptr [ebp - 4], 0 */
   2485     RECOMP_ICALL(MEM32(0x3900B0C0)); /* 0x39001A4B: call dword ptr [0x3900b0c0] */
   2486     RECOMP_FLAGS_IN();
   2487     ecx = ebp + (-0x34); /* 0x39001A51: lea ecx, [ebp - 0x34] */
   2488     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39001A54: mov dword ptr [ebp - 4], 0xffffffff */
   2489     RECOMP_ICALL(MEM32(0x3900B0C4)); /* 0x39001A5B: call dword ptr [0x3900b0c4] */
   2490     RECOMP_FLAGS_IN();
   2491     ecx = MEM32(ebp + (-0xC)); /* 0x39001A61: mov ecx, dword ptr [ebp - 0xc] */
   2492     edi = POP32_VAL(esp); /* 0x39001A64: pop edi */
   2493     esi = POP32_VAL(esp); /* 0x39001A65: pop esi */
   2494     SET_LO8(eax, 1); /* 0x39001A66: mov al, 1 */
   2495     ebx = POP32_VAL(esp); /* 0x39001A68: pop ebx */
   2496     MEM32(FS_BASE + (0)) = ecx; /* 0x39001A69: mov dword ptr fs:[0], ecx */
   2497     esp = ebp; /* 0x39001A70: mov esp, ebp */
   2498     ebp = POP32_VAL(esp); /* 0x39001A72: pop ebp */
   2499     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39001A73: ret 8 */
   2500     RECOMP_REGS_OUT();
   2501 }
   2502 
   2503 void sub_3900198E(void) {
   2504     int _fpu_cmp = 0;
   2505     uint32_t _cf = 0;
   2506     int _df = 1;
   2507     uint32_t _flag_k = FK_NONE;
   2508     uint32_t _flag_a = 0, _flag_b = 0;
   2509     uint32_t _itail_tgt = 0;
   2510     RECOMP_REGS_LOCALS
   2511     RECOMP_ENTER(0x3900198Eu);
   2512 
   2513     goto L_3900198E;
   2514 L_39001845:
   2515     ecx = ebp + (-0x54); /* 0x39001845: lea ecx, [ebp - 0x54] */
   2516     RECOMP_ICALL(MEM32(0x3900B0C8)); /* 0x39001848: call dword ptr [0x3900b0c8] */
   2517     RECOMP_FLAGS_IN();
   2518     /* cmp eax, MEM32(ebp + (-0x14)) */ /* 0x3900184E: cmp eax, dword ptr [ebp - 0x14] */
   2519     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + (-0x14)));
   2520     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2521     _flag_k = FK_CMP;
   2522     if (CMP_GE(_flag_a, _flag_b)) goto L_39001A38; /* 0x39001851: jge 0x39001a38 */
   2523 L_39001857:
   2524     PUSH32(esp, 0xAu); /* 0x39001857: push 0xa */
   2525     ecx = ebp + (-0xB74); /* 0x39001859: lea ecx, [ebp - 0xb74] */
   2526     PUSH32(esp, 0x800u); /* 0x3900185F: push 0x800 */
   2527     PUSH32(esp, ecx); /* 0x39001864: push ecx */
   2528     ecx = ebp + (-0x54); /* 0x39001865: lea ecx, [ebp - 0x54] */
   2529     RECOMP_ICALL(MEM32(0x3900B0CC)); /* 0x39001868: call dword ptr [0x3900b0cc] */
   2530     RECOMP_FLAGS_IN();
   2531     /* test eax, eax */ /* 0x3900186E: test eax, eax */
   2532     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   2533     _cf = 0;
   2534     _flag_k = FK_TEST;
   2535     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001A38; /* 0x39001870: jne 0x39001a38 */
   2536 L_39001876:
   2537     ecx = 0x63u; /* 0x39001876: mov ecx, 0x63 */
   2538     edi = ebp + (-0x373); /* 0x3900187B: lea edi, [ebp - 0x373] */
   2539     MEM8(ebp + (-0x374)) = (uint8_t)(LO8(eax)); /* 0x39001881: mov byte ptr [ebp - 0x374], al */
   2540     edx = ebp + (-0x1E4); /* 0x39001887: lea edx, [ebp - 0x1e4] */
   2541     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x3900188D: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; }
   2542     MEM16(edi) = (uint16_t)LO16(eax); edi += _df * 2; /* 0x3900188F: stosw word ptr es:[edi], ax */
   2543     MEM8(edi) = LO8(eax); edi += _df; /* 0x39001891: stosb byte ptr es:[edi], al */
   2544     ecx = 0x63u; /* 0x39001892: mov ecx, 0x63 */
   2545     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2546     eax = 0; /* 0x39001897: xor eax, eax */
   2547     _cf = 0;
   2548     _flag_k = FK_TEST;
   2549     edi = ebp + (-0x1E3); /* 0x39001899: lea edi, [ebp - 0x1e3] */
   2550     MEM8(ebp + (-0x1E4)) = (uint8_t)(0); /* 0x3900189F: mov byte ptr [ebp - 0x1e4], 0 */
   2551     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390018A6: rep stosd dword ptr es:[edi], eax */ if (_df > 0) { MEMSET32((void*)ADDR(edi), eax, _n); edi += _b; } else { MEMSET32((void*)ADDR(edi - _b + 4u), eax, _n); edi -= _b; } ecx = 0; }
   2552     MEM16(edi) = (uint16_t)LO16(eax); edi += _df * 2; /* 0x390018A8: stosw word ptr es:[edi], ax */
   2553     MEM8(edi) = LO8(eax); edi += _df; /* 0x390018AA: stosb byte ptr es:[edi], al */
   2554     eax = ebp + (-0x374); /* 0x390018AB: lea eax, [ebp - 0x374] */
   2555     PUSH32(esp, edx); /* 0x390018B1: push edx */
   2556     PUSH32(esp, eax); /* 0x390018B2: push eax */
   2557     ecx = ebp + (-0xB74); /* 0x390018B3: lea ecx, [ebp - 0xb74] */
   2558     PUSH32(esp, 0x3900E040u); /* 0x390018B9: push 0x3900e040 */
   2559     PUSH32(esp, ecx); /* 0x390018BE: push ecx */
   2560     RECOMP_ICALL(ebx); /* 0x390018BF: call ebx */
   2561     RECOMP_FLAGS_IN();
   2562     SET_LO8(eax, MEM8(ebp + (-0x374))); /* 0x390018C1: mov al, byte ptr [ebp - 0x374] */
   2563     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   2564     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2565     esp = esp + 0x10u; /* 0x390018C7: add esp, 0x10 */
   2566     _flag_k = FK_ADD;
   2567     /* test LO8(eax), LO8(eax) */ /* 0x390018CA: test al, al */
   2568     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   2569     _cf = 0;
   2570     _flag_k = FK_NARROW(FK_TEST, 24);
   2571     RECOMP_BACKEDGE();
   2572     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x390018CC: je 0x39001845 */
   2573 L_390018D2:
   2574     /* cmp LO8(eax), 0xAu */ /* 0x390018D2: cmp al, 0xa */
   2575     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xAu) << 24;
   2576     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2577     _flag_k = FK_NARROW(FK_CMP, 24);
   2578     RECOMP_BACKEDGE();
   2579     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x390018D4: je 0x39001845 */
   2580 L_390018DA:
   2581     /* cmp LO8(eax), 0x2Fu */ /* 0x390018DA: cmp al, 0x2f */
   2582     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x2Fu) << 24;
   2583     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2584     _flag_k = FK_NARROW(FK_CMP, 24);
   2585     RECOMP_BACKEDGE();
   2586     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x390018DC: je 0x39001845 */
   2587 L_390018E2:
   2588     /* cmp LO8(eax), 0x23u */ /* 0x390018E2: cmp al, 0x23 */
   2589     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x23u) << 24;
   2590     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2591     _flag_k = FK_NARROW(FK_CMP, 24);
   2592     RECOMP_BACKEDGE();
   2593     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x390018E4: je 0x39001845 */
   2594 L_390018EA:
   2595     edx = ebp + (-0x374); /* 0x390018EA: lea edx, [ebp - 0x374] */
   2596     PUSH32(esp, 0x3900E034u); /* 0x390018F0: push 0x3900e034 */
   2597     PUSH32(esp, edx); /* 0x390018F5: push edx */
   2598     RECOMP_ICALL(MEM32(0x3900B070)); /* 0x390018F6: call dword ptr [0x3900b070] */
   2599     RECOMP_FLAGS_IN();
   2600     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2601     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2602     esp = esp + 8; /* 0x390018FC: add esp, 8 */
   2603     _flag_k = FK_ADD;
   2604     /* test eax, eax */ /* 0x390018FF: test eax, eax */
   2605     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   2606     _cf = 0;
   2607     _flag_k = FK_TEST;
   2608     RECOMP_BACKEDGE();
   2609     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x39001901: je 0x39001845 */
   2610 L_39001907:
   2611     eax = ebp + (-0x374); /* 0x39001907: lea eax, [ebp - 0x374] */
   2612     PUSH32(esp, 0x3900E028u); /* 0x3900190D: push 0x3900e028 */
   2613     PUSH32(esp, eax); /* 0x39001912: push eax */
   2614     RECOMP_ICALL(MEM32(0x3900B070)); /* 0x39001913: call dword ptr [0x3900b070] */
   2615     RECOMP_FLAGS_IN();
   2616     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2617     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2618     esp = esp + 8; /* 0x39001919: add esp, 8 */
   2619     _flag_k = FK_ADD;
   2620     /* test eax, eax */ /* 0x3900191C: test eax, eax */
   2621     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   2622     _cf = 0;
   2623     _flag_k = FK_TEST;
   2624     RECOMP_BACKEDGE();
   2625     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x3900191E: je 0x39001845 */
   2626 L_39001924:
   2627     SET_LO8(eax, MEM8(ebp + (-0x1E4))); /* 0x39001924: mov al, byte ptr [ebp - 0x1e4] */
   2628     /* cmp LO8(eax), 0x22u */ /* 0x3900192A: cmp al, 0x22 */
   2629     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0x22u) << 24;
   2630     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2631     _flag_k = FK_NARROW(FK_CMP, 24);
   2632     if (CMP_NE(_flag_a, _flag_b)) goto L_390019B9; /* 0x3900192C: jne 0x390019b9 */
   2633 L_39001932:
   2634     SET_LO8(ecx, MEM8(ebp + (-0xB74))); /* 0x39001932: mov cl, byte ptr [ebp - 0xb74] */
   2635     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2636     eax = 0; /* 0x39001938: xor eax, eax */
   2637     _cf = 0;
   2638     _flag_k = FK_TEST;
   2639     /* test LO8(ecx), LO8(ecx) */ /* 0x3900193A: test cl, cl */
   2640     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2641     _cf = 0;
   2642     _flag_k = FK_NARROW(FK_TEST, 24);
   2643     RECOMP_BACKEDGE();
   2644     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x3900193C: je 0x39001845 */
   2645 L_39001942:
   2646     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x39001942: mov cl, byte ptr [ebp + eax - 0xb74] */
   2647     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   2648     eax = eax + 1; /* 0x39001949: inc eax */
   2649     _flag_k = FK_INC;
   2650     /* cmp LO8(ecx), 0x22u */ /* 0x3900194A: cmp cl, 0x22 */
   2651     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0x22u) << 24;
   2652     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2653     _flag_k = FK_NARROW(FK_CMP, 24);
   2654     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900195F; /* 0x3900194D: je 0x3900195f */
   2655 L_3900194F:
   2656     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x3900194F: mov cl, byte ptr [ebp + eax - 0xb74] */
   2657     /* test LO8(ecx), LO8(ecx) */ /* 0x39001956: test cl, cl */
   2658     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2659     _cf = 0;
   2660     _flag_k = FK_NARROW(FK_TEST, 24);
   2661     RECOMP_BACKEDGE();
   2662     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001942; /* 0x39001958: jne 0x39001942 */
   2663 L_3900195A:
   2664     RECOMP_BACKEDGE();
   2665     goto L_39001845; /* 0x3900195A: jmp 0x39001845 */
   2666 L_3900195F:
   2667     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x3900195F: mov cl, byte ptr [ebp + eax - 0xb74] */
   2668     esi = ebp + eax + (-0xB74); /* 0x39001966: lea esi, [ebp + eax - 0xb74] */
   2669     /* test LO8(ecx), LO8(ecx) */ /* 0x3900196D: test cl, cl */
   2670     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2671     _cf = 0;
   2672     _flag_k = FK_NARROW(FK_TEST, 24);
   2673     edi = eax; /* 0x3900196F: mov edi, eax */
   2674     edx = eax; /* 0x39001971: mov edx, eax */
   2675     RECOMP_BACKEDGE();
   2676     if (TEST_Z(_flag_a, _flag_b)) goto L_39001845; /* 0x39001973: je 0x39001845 */
   2677 L_39001979:
   2678     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   2679     eax = eax + 1; /* 0x39001979: inc eax */
   2680     _flag_k = FK_INC;
   2681     /* cmp LO8(ecx), 0x22u */ /* 0x3900197A: cmp cl, 0x22 */
   2682     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0x22u) << 24;
   2683     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2684     _flag_k = FK_NARROW(FK_CMP, 24);
   2685     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900198C; /* 0x3900197D: je 0x3900198c */
   2686 L_3900197F:
   2687     SET_LO8(ecx, MEM8(ebp + eax + (-0xB74))); /* 0x3900197F: mov cl, byte ptr [ebp + eax - 0xb74] */
   2688     /* test LO8(ecx), LO8(ecx) */ /* 0x39001986: test cl, cl */
   2689     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   2690     _cf = 0;
   2691     _flag_k = FK_NARROW(FK_TEST, 24);
   2692     RECOMP_BACKEDGE();
   2693     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001979; /* 0x39001988: jne 0x39001979 */
   2694 L_3900198A:
   2695     goto L_3900198E; /* 0x3900198A: jmp 0x3900198e */
   2696 L_3900198C:
   2697     edx = eax; /* 0x3900198C: mov edx, eax */
   2698 L_3900198E:
   2699     /* cmp edi, edx */ /* 0x3900198E: cmp edi, edx */
   2700     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx);
   2701     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2702     _flag_k = FK_CMP;
   2703     RECOMP_BACKEDGE();
   2704     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001845; /* 0x39001990: je 0x39001845 */
   2705 L_39001996:
   2706     ecx = MEM32(ebp + (-0x10)); /* 0x39001996: mov ecx, dword ptr [ebp - 0x10] */
   2707     MEM8(ebp + edx + (-0xB75)) = (uint8_t)(0); /* 0x39001999: mov byte ptr [ebp + edx - 0xb75], 0 */
   2708     edx = MEM32(ebp + 0xC); /* 0x390019A1: mov edx, dword ptr [ebp + 0xc] */
   2709     PUSH32(esp, 1); /* 0x390019A4: push 1 */
   2710     PUSH32(esp, edx); /* 0x390019A6: push edx */
   2711     eax = ebp + (-0x374); /* 0x390019A7: lea eax, [ebp - 0x374] */
   2712     PUSH32(esp, esi); /* 0x390019AD: push esi */
   2713     PUSH32(esp, eax); /* 0x390019AE: push eax */
   2714     RECOMP_ICALL(0x39002040u); /* 0x390019AF: call 0x39002040 */ /* not lifted */
   2715     RECOMP_FLAGS_IN();
   2716     RECOMP_BACKEDGE();
   2717     goto L_39001845; /* 0x390019B4: jmp 0x39001845 */
   2718 L_390019B9:
   2719     /* test LO8(eax), LO8(eax) */ /* 0x390019B9: test al, al */
   2720     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   2721     _cf = 0;
   2722     _flag_k = FK_NARROW(FK_TEST, 24);
   2723     if (TEST_Z(_flag_a, _flag_b)) goto L_390019D0; /* 0x390019BB: je 0x390019d0 */
   2724 L_390019BD:
   2725     eax = ebp + (-0x1E4); /* 0x390019BD: lea eax, [ebp - 0x1e4] */
   2726 L_390019C3:
   2727     SET_LO8(ecx, MEM8(eax)); /* 0x390019C3: mov cl, byte ptr [eax] */
   2728     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   2729     eax = eax + 1; /* 0x390019C5: inc eax */
   2730     _flag_k = FK_INC;
   2731     /* cmp LO8(ecx), 0x2Eu */ /* 0x390019C6: cmp cl, 0x2e */
   2732     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0x2Eu) << 24;
   2733     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2734     _flag_k = FK_NARROW(FK_CMP, 24);
   2735     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001A03; /* 0x390019C9: je 0x39001a03 */
   2736 L_390019CB:
   2737     /* cmp MEM8(eax), 0 */ /* 0x390019CB: cmp byte ptr [eax], 0 */
   2738     _flag_a = (uint32_t)(MEM8(eax)) << 24; _flag_b = (uint32_t)(0) << 24;
   2739     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2740     _flag_k = FK_NARROW(FK_CMP, 24);
   2741     RECOMP_BACKEDGE();
   2742     if (CMP_NE(_flag_a, _flag_b)) goto L_390019C3; /* 0x390019CE: jne 0x390019c3 */
   2743 L_390019D0:
   2744     ecx = ebp + (-0x1C); /* 0x390019D0: lea ecx, [ebp - 0x1c] */
   2745     edx = ebp + (-0x1E4); /* 0x390019D3: lea edx, [ebp - 0x1e4] */
   2746     PUSH32(esp, ecx); /* 0x390019D9: push ecx */
   2747     PUSH32(esp, 0x3900E024u); /* 0x390019DA: push 0x3900e024 */
   2748     PUSH32(esp, edx); /* 0x390019DF: push edx */
   2749     RECOMP_ICALL(ebx); /* 0x390019E0: call ebx */
   2750     RECOMP_FLAGS_IN();
   2751     eax = MEM32(ebp + 0xC); /* 0x390019E2: mov eax, dword ptr [ebp + 0xc] */
   2752     ecx = MEM32(ebp + (-0x1C)); /* 0x390019E5: mov ecx, dword ptr [ebp - 0x1c] */
   2753     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   2754     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2755     esp = esp + 0xCu; /* 0x390019E8: add esp, 0xc */
   2756     _flag_k = FK_ADD;
   2757     edx = ebp + (-0x374); /* 0x390019EB: lea edx, [ebp - 0x374] */
   2758     PUSH32(esp, 1); /* 0x390019F1: push 1 */
   2759     PUSH32(esp, eax); /* 0x390019F3: push eax */
   2760     PUSH32(esp, ecx); /* 0x390019F4: push ecx */
   2761     ecx = MEM32(ebp + (-0x10)); /* 0x390019F5: mov ecx, dword ptr [ebp - 0x10] */
   2762     PUSH32(esp, edx); /* 0x390019F8: push edx */
   2763     RECOMP_ICALL(0x39001D30u); /* 0x390019F9: call 0x39001d30 */ /* not lifted */
   2764     RECOMP_FLAGS_IN();
   2765     RECOMP_BACKEDGE();
   2766     goto L_39001845; /* 0x390019FE: jmp 0x39001845 */
   2767 L_39001A03:
   2768     edx = ebp + (-0x18); /* 0x39001A03: lea edx, [ebp - 0x18] */
   2769     eax = ebp + (-0x1E4); /* 0x39001A06: lea eax, [ebp - 0x1e4] */
   2770     PUSH32(esp, edx); /* 0x39001A0C: push edx */
   2771     PUSH32(esp, 0x3900E020u); /* 0x39001A0D: push 0x3900e020 */
   2772     PUSH32(esp, eax); /* 0x39001A12: push eax */
   2773     RECOMP_ICALL(ebx); /* 0x39001A13: call ebx */
   2774     RECOMP_FLAGS_IN();
   2775     ecx = MEM32(ebp + 0xC); /* 0x39001A15: mov ecx, dword ptr [ebp + 0xc] */
   2776     edx = MEM32(ebp + (-0x18)); /* 0x39001A18: mov edx, dword ptr [ebp - 0x18] */
   2777     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   2778     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2779     esp = esp + 0xCu; /* 0x39001A1B: add esp, 0xc */
   2780     _flag_k = FK_ADD;
   2781     eax = ebp + (-0x374); /* 0x39001A1E: lea eax, [ebp - 0x374] */
   2782     PUSH32(esp, 1); /* 0x39001A24: push 1 */
   2783     PUSH32(esp, ecx); /* 0x39001A26: push ecx */
   2784     ecx = MEM32(ebp + (-0x10)); /* 0x39001A27: mov ecx, dword ptr [ebp - 0x10] */
   2785     PUSH32(esp, edx); /* 0x39001A2A: push edx */
   2786     PUSH32(esp, eax); /* 0x39001A2B: push eax */
   2787     RECOMP_ICALL(0x39001EB0u); /* 0x39001A2C: call 0x39001eb0 */ /* not lifted */
   2788     RECOMP_FLAGS_IN();
   2789     { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x39001A31: fstp st(0) */
   2790     RECOMP_BACKEDGE();
   2791     goto L_39001845; /* 0x39001A33: jmp 0x39001845 */
   2792 L_39001A38:
   2793     eax = MEM32(ebp + 0x8); /* 0x39001A38: mov eax, dword ptr [ebp + 8] */
   2794     PUSH32(esp, eax); /* 0x39001A3B: push eax */
   2795     RECOMP_ICALL(0x3900A0A0u); /* 0x39001A3C: call 0x3900a0a0 */ /* not lifted */
   2796     RECOMP_FLAGS_IN();
   2797     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2798     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2799     esp = esp + 4; /* 0x39001A41: add esp, 4 */
   2800     _flag_k = FK_ADD;
   2801     ecx = ebp + (-0x54); /* 0x39001A44: lea ecx, [ebp - 0x54] */
   2802     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x39001A47: mov byte ptr [ebp - 4], 0 */
   2803     RECOMP_ICALL(MEM32(0x3900B0C0)); /* 0x39001A4B: call dword ptr [0x3900b0c0] */
   2804     RECOMP_FLAGS_IN();
   2805     ecx = ebp + (-0x34); /* 0x39001A51: lea ecx, [ebp - 0x34] */
   2806     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39001A54: mov dword ptr [ebp - 4], 0xffffffff */
   2807     RECOMP_ICALL(MEM32(0x3900B0C4)); /* 0x39001A5B: call dword ptr [0x3900b0c4] */
   2808     RECOMP_FLAGS_IN();
   2809     ecx = MEM32(ebp + (-0xC)); /* 0x39001A61: mov ecx, dword ptr [ebp - 0xc] */
   2810     edi = POP32_VAL(esp); /* 0x39001A64: pop edi */
   2811     esi = POP32_VAL(esp); /* 0x39001A65: pop esi */
   2812     SET_LO8(eax, 1); /* 0x39001A66: mov al, 1 */
   2813     ebx = POP32_VAL(esp); /* 0x39001A68: pop ebx */
   2814     MEM32(FS_BASE + (0)) = ecx; /* 0x39001A69: mov dword ptr fs:[0], ecx */
   2815     esp = ebp; /* 0x39001A70: mov esp, ebp */
   2816     ebp = POP32_VAL(esp); /* 0x39001A72: pop ebp */
   2817     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39001A73: ret 8 */
   2818     RECOMP_REGS_OUT();
   2819 }
   2820 
   2821 void sub_39001A80(void) {
   2822     int _fpu_cmp = 0;
   2823     uint32_t _cf = 0;
   2824     int _df = 1;
   2825     uint32_t _flag_k = FK_NONE;
   2826     uint32_t _flag_a = 0, _flag_b = 0;
   2827     uint32_t _itail_tgt = 0;
   2828     RECOMP_REGS_LOCALS
   2829     RECOMP_ENTER(0x39001A80u);
   2830 
   2831 L_39001A80:
   2832     PUSH32(esp, ebp); /* 0x39001A80: push ebp */
   2833     ebp = esp; /* 0x39001A81: mov ebp, esp */
   2834     PUSH32(esp, 0xFFFFFFFFu); /* 0x39001A83: push -1 */
   2835     PUSH32(esp, 0x3900A4E9u); /* 0x39001A85: push 0x3900a4e9 */
   2836     eax = MEM32(FS_BASE + (0)); /* 0x39001A8A: mov eax, dword ptr fs:[0] */
   2837     PUSH32(esp, eax); /* 0x39001A90: push eax */
   2838     MEM32(FS_BASE + (0)) = esp; /* 0x39001A91: mov dword ptr fs:[0], esp */
   2839     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1B8u);
   2840     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2841     esp = esp - 0x1B8u; /* 0x39001A98: sub esp, 0x1b8 */
   2842     _flag_k = FK_CMP;
   2843     eax = MEM32(ebp + 0x8); /* 0x39001A9E: mov eax, dword ptr [ebp + 8] */
   2844     PUSH32(esp, ebx); /* 0x39001AA1: push ebx */
   2845     PUSH32(esp, esi); /* 0x39001AA2: push esi */
   2846     /* cmp eax, 1 */ /* 0x39001AA3: cmp eax, 1 */
   2847     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   2848     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2849     _flag_k = FK_CMP;
   2850     PUSH32(esp, edi); /* 0x39001AA6: push edi */
   2851     MEM32(ebp + (-0x10)) = ecx; /* 0x39001AA7: mov dword ptr [ebp - 0x10], ecx */
   2852     if (CMP_NE(_flag_a, _flag_b)) goto L_39001AB5; /* 0x39001AAA: jne 0x39001ab5 */
   2853 L_39001AAC:
   2854     esi = MEM32(ecx + 0x24); /* 0x39001AAC: mov esi, dword ptr [ecx + 0x24] */
   2855     /* test esi, esi */ /* 0x39001AAF: test esi, esi */
   2856     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   2857     _cf = 0;
   2858     _flag_k = FK_TEST;
   2859     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001AD0; /* 0x39001AB1: jne 0x39001ad0 */
   2860 L_39001AB3:
   2861     goto L_39001ACA; /* 0x39001AB3: jmp 0x39001aca */
   2862 L_39001AB5:
   2863     /* cmp eax, 2 */ /* 0x39001AB5: cmp eax, 2 */
   2864     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   2865     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2866     _flag_k = FK_CMP;
   2867     if (CMP_NE(_flag_a, _flag_b)) goto L_39001AC3; /* 0x39001AB8: jne 0x39001ac3 */
   2868 L_39001ABA:
   2869     esi = MEM32(ecx + 0x14); /* 0x39001ABA: mov esi, dword ptr [ecx + 0x14] */
   2870     /* test esi, esi */ /* 0x39001ABD: test esi, esi */
   2871     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   2872     _cf = 0;
   2873     _flag_k = FK_TEST;
   2874     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001AD0; /* 0x39001ABF: jne 0x39001ad0 */
   2875 L_39001AC1:
   2876     goto L_39001ACA; /* 0x39001AC1: jmp 0x39001aca */
   2877 L_39001AC3:
   2878     esi = MEM32(ecx + 0x4); /* 0x39001AC3: mov esi, dword ptr [ecx + 4] */
   2879     /* test esi, esi */ /* 0x39001AC6: test esi, esi */
   2880     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   2881     _cf = 0;
   2882     _flag_k = FK_TEST;
   2883     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001AD0; /* 0x39001AC8: jne 0x39001ad0 */
   2884 L_39001ACA:
   2885     esi = MEM32(0x3900B02C); /* 0x39001ACA: mov esi, dword ptr [0x3900b02c] */
   2886 L_39001AD0:
   2887     PUSH32(esp, 0x180u); /* 0x39001AD0: push 0x180 */
   2888     PUSH32(esp, esi); /* 0x39001AD5: push esi */
   2889     RECOMP_ICALL(MEM32(0x3900B0B8)); /* 0x39001AD6: call dword ptr [0x3900b0b8] */
   2890     RECOMP_FLAGS_IN();
   2891     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2892     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2893     esp = esp + 8; /* 0x39001ADC: add esp, 8 */
   2894     _flag_k = FK_ADD;
   2895     ecx = ebp + (-0x34); /* 0x39001ADF: lea ecx, [ebp - 0x34] */
   2896     PUSH32(esp, esi); /* 0x39001AE2: push esi */
   2897     RECOMP_ICALL(MEM32(0x3900B0B4)); /* 0x39001AE3: call dword ptr [0x3900b0b4] */
   2898     RECOMP_FLAGS_IN();
   2899     esi = MEM32(0x3900B0AC); /* 0x39001AE9: mov esi, dword ptr [0x3900b0ac] */
   2900     PUSH32(esp, 0); /* 0x39001AEF: push 0 */
   2901     MEM32(ebp + (-0x4)) = 0; /* 0x39001AF1: mov dword ptr [ebp - 4], 0 */
   2902     RECOMP_ICALL(esi); /* 0x39001AF8: call esi */
   2903     RECOMP_FLAGS_IN();
   2904     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2905     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2906     esp = esp + 4; /* 0x39001AFA: add esp, 4 */
   2907     _flag_k = FK_ADD;
   2908     ecx = ebp + (-0x34); /* 0x39001AFD: lea ecx, [ebp - 0x34] */
   2909     edi = eax; /* 0x39001B00: mov edi, eax */
   2910     PUSH32(esp, 2); /* 0x39001B02: push 2 */
   2911     RECOMP_ICALL(MEM32(0x3900B0A0)); /* 0x39001B04: call dword ptr [0x3900b0a0] */
   2912     RECOMP_FLAGS_IN();
   2913     PUSH32(esp, edi); /* 0x39001B0A: push edi */
   2914     ebx = eax; /* 0x39001B0B: mov ebx, eax */
   2915     RECOMP_ICALL(esi); /* 0x39001B0D: call esi */
   2916     RECOMP_FLAGS_IN();
   2917     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2918     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2919     esp = esp + 4; /* 0x39001B0F: add esp, 4 */
   2920     _flag_k = FK_ADD;
   2921     /* test ebx, ebx */ /* 0x39001B12: test ebx, ebx */
   2922     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
   2923     _cf = 0;
   2924     _flag_k = FK_TEST;
   2925     if (TEST_Z(_flag_a, _flag_b)) goto L_39001B3B; /* 0x39001B14: je 0x39001b3b */
   2926 L_39001B16:
   2927     ecx = ebp + (-0x34); /* 0x39001B16: lea ecx, [ebp - 0x34] */
   2928     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39001B19: mov dword ptr [ebp - 4], 0xffffffff */
   2929     RECOMP_ICALL(MEM32(0x3900B0C4)); /* 0x39001B20: call dword ptr [0x3900b0c4] */
   2930     RECOMP_FLAGS_IN();
   2931     edi = POP32_VAL(esp); /* 0x39001B26: pop edi */
   2932     esi = POP32_VAL(esp); /* 0x39001B27: pop esi */
   2933     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
   2934     SET_LO8(eax, 0); /* 0x39001B28: xor al, al */
   2935     _cf = 0;
   2936     _flag_k = FK_NARROW(FK_TEST, 24);
   2937     ebx = POP32_VAL(esp); /* 0x39001B2A: pop ebx */
   2938     ecx = MEM32(ebp + (-0xC)); /* 0x39001B2B: mov ecx, dword ptr [ebp - 0xc] */
   2939     MEM32(FS_BASE + (0)) = ecx; /* 0x39001B2E: mov dword ptr fs:[0], ecx */
   2940     esp = ebp; /* 0x39001B35: mov esp, ebp */
   2941     ebp = POP32_VAL(esp); /* 0x39001B37: pop ebp */
   2942     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39001B38: ret 4 */
   2943 L_39001B3B:
   2944     eax = MEM32(ebp + 0x8); /* 0x39001B3B: mov eax, dword ptr [ebp + 8] */
   2945     /* test eax, eax */ /* 0x39001B3E: test eax, eax */
   2946     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   2947     _cf = 0;
   2948     _flag_k = FK_TEST;
   2949     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001B4A; /* 0x39001B40: jne 0x39001b4a */
   2950 L_39001B42:
   2951     edi = MEM32(ebp + (-0x10)); /* 0x39001B42: mov edi, dword ptr [ebp - 0x10] */
   2952     esi = MEM32(edi + 0x30); /* 0x39001B45: mov esi, dword ptr [edi + 0x30] */
   2953     goto L_39001B60; /* 0x39001B48: jmp 0x39001b60 */
   2954 L_39001B4A:
   2955     /* cmp eax, 2 */ /* 0x39001B4A: cmp eax, 2 */
   2956     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   2957     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2958     _flag_k = FK_CMP;
   2959     if (CMP_NE(_flag_a, _flag_b)) goto L_39001B57; /* 0x39001B4D: jne 0x39001b57 */
   2960 L_39001B4F:
   2961     eax = MEM32(ebp + (-0x10)); /* 0x39001B4F: mov eax, dword ptr [ebp - 0x10] */
   2962     esi = MEM32(eax + 0x48); /* 0x39001B52: mov esi, dword ptr [eax + 0x48] */
   2963     goto L_39001B5D; /* 0x39001B55: jmp 0x39001b5d */
   2964 L_39001B57:
   2965     ecx = MEM32(ebp + (-0x10)); /* 0x39001B57: mov ecx, dword ptr [ebp - 0x10] */
   2966     esi = MEM32(ecx + 0x3C); /* 0x39001B5A: mov esi, dword ptr [ecx + 0x3c] */
   2967 L_39001B5D:
   2968     edi = MEM32(ebp + (-0x10)); /* 0x39001B5D: mov edi, dword ptr [ebp - 0x10] */
   2969 L_39001B60:
   2970     edx = ebp + (-0x10); /* 0x39001B60: lea edx, [ebp - 0x10] */
   2971     ecx = esi; /* 0x39001B63: mov ecx, esi */
   2972     PUSH32(esp, edx); /* 0x39001B65: push edx */
   2973     RECOMP_ICALL(0x39009C30u); /* 0x39001B66: call 0x39009c30 */ /* not lifted */
   2974     RECOMP_FLAGS_IN();
   2975     eax = MEM32(eax); /* 0x39001B6B: mov eax, dword ptr [eax] */
   2976     ebx = MEM32(0x3900B078); /* 0x39001B6D: mov ebx, dword ptr [0x3900b078] */
   2977     MEM32(ebp + (-0x18)) = eax; /* 0x39001B73: mov dword ptr [ebp - 0x18], eax */
   2978     ecx = MEM32(esi + 0x4); /* 0x39001B76: mov ecx, dword ptr [esi + 4] */
   2979     /* cmp eax, ecx */ /* 0x39001B79: cmp eax, ecx */
   2980     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   2981     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2982     _flag_k = FK_CMP;
   2983     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001BC4; /* 0x39001B7B: je 0x39001bc4 */
   2984 L_39001B7D:
   2985     ecx = MEM32(eax + 0x10); /* 0x39001B7D: mov ecx, dword ptr [eax + 0x10] */
   2986     /* test ecx, ecx */ /* 0x39001B80: test ecx, ecx */
   2987     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   2988     _cf = 0;
   2989     _flag_k = FK_TEST;
   2990     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001B8A; /* 0x39001B82: jne 0x39001b8a */
   2991 L_39001B84:
   2992     ecx = MEM32(0x3900B02C); /* 0x39001B84: mov ecx, dword ptr [0x3900b02c] */
   2993 L_39001B8A:
   2994     eax = MEM32(eax + 0x1C); /* 0x39001B8A: mov eax, dword ptr [eax + 0x1c] */
   2995     PUSH32(esp, eax); /* 0x39001B8D: push eax */
   2996     PUSH32(esp, ecx); /* 0x39001B8E: push ecx */
   2997     ecx = ebp + (-0x1C4); /* 0x39001B8F: lea ecx, [ebp - 0x1c4] */
   2998     PUSH32(esp, 0x3900E060u); /* 0x39001B95: push 0x3900e060 */
   2999     PUSH32(esp, ecx); /* 0x39001B9A: push ecx */
   3000     RECOMP_ICALL(ebx); /* 0x39001B9B: call ebx */
   3001     RECOMP_FLAGS_IN();
   3002     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   3003     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3004     esp = esp + 0x10u; /* 0x39001B9D: add esp, 0x10 */
   3005     _flag_k = FK_ADD;
   3006     edx = ebp + (-0x1C4); /* 0x39001BA0: lea edx, [ebp - 0x1c4] */
   3007     ecx = ebp + (-0x34); /* 0x39001BA6: lea ecx, [ebp - 0x34] */
   3008     PUSH32(esp, 0); /* 0x39001BA9: push 0 */
   3009     PUSH32(esp, edx); /* 0x39001BAB: push edx */
   3010     RECOMP_ICALL(MEM32(0x3900B0BC)); /* 0x39001BAC: call dword ptr [0x3900b0bc] */
   3011     RECOMP_FLAGS_IN();
   3012     ecx = ebp + (-0x18); /* 0x39001BB2: lea ecx, [ebp - 0x18] */
   3013     RECOMP_ICALL(0x39004BA0u); /* 0x39001BB5: call 0x39004ba0 */ /* not lifted */
   3014     RECOMP_FLAGS_IN();
   3015     ecx = MEM32(esi + 0x4); /* 0x39001BBA: mov ecx, dword ptr [esi + 4] */
   3016     eax = MEM32(ebp + (-0x18)); /* 0x39001BBD: mov eax, dword ptr [ebp - 0x18] */
   3017     /* cmp eax, ecx */ /* 0x39001BC0: cmp eax, ecx */
   3018     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3019     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3020     _flag_k = FK_CMP;
   3021     RECOMP_BACKEDGE();
   3022     if (CMP_NE(_flag_a, _flag_b)) goto L_39001B7D; /* 0x39001BC2: jne 0x39001b7d */
   3023 L_39001BC4:
   3024     ecx = MEM32(ebp + 0x8); /* 0x39001BC4: mov ecx, dword ptr [ebp + 8] */
   3025     /* test ecx, ecx */ /* 0x39001BC7: test ecx, ecx */
   3026     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   3027     _cf = 0;
   3028     _flag_k = FK_TEST;
   3029     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001BD0; /* 0x39001BC9: jne 0x39001bd0 */
   3030 L_39001BCB:
   3031     esi = MEM32(edi + 0x34); /* 0x39001BCB: mov esi, dword ptr [edi + 0x34] */
   3032     goto L_39001BDD; /* 0x39001BCE: jmp 0x39001bdd */
   3033 L_39001BD0:
   3034     /* cmp ecx, 2 */ /* 0x39001BD0: cmp ecx, 2 */
   3035     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(2);
   3036     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3037     _flag_k = FK_CMP;
   3038     if (CMP_NE(_flag_a, _flag_b)) goto L_39001BDA; /* 0x39001BD3: jne 0x39001bda */
   3039 L_39001BD5:
   3040     esi = MEM32(edi + 0x4C); /* 0x39001BD5: mov esi, dword ptr [edi + 0x4c] */
   3041     goto L_39001BDD; /* 0x39001BD8: jmp 0x39001bdd */
   3042 L_39001BDA:
   3043     esi = MEM32(edi + 0x40); /* 0x39001BDA: mov esi, dword ptr [edi + 0x40] */
   3044 L_39001BDD:
   3045     eax = MEM32(esi + 0x4); /* 0x39001BDD: mov eax, dword ptr [esi + 4] */
   3046     eax = MEM32(eax); /* 0x39001BE0: mov eax, dword ptr [eax] */
   3047     MEM32(ebp + (-0x1C)) = eax; /* 0x39001BE2: mov dword ptr [ebp - 0x1c], eax */
   3048     edx = MEM32(esi + 0x4); /* 0x39001BE5: mov edx, dword ptr [esi + 4] */
   3049     /* cmp eax, edx */ /* 0x39001BE8: cmp eax, edx */
   3050     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   3051     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3052     _flag_k = FK_CMP;
   3053     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001C3B; /* 0x39001BEA: je 0x39001c3b */
   3054 L_39001BEC:
   3055     ecx = MEM32(eax + 0x10); /* 0x39001BEC: mov ecx, dword ptr [eax + 0x10] */
   3056     /* test ecx, ecx */ /* 0x39001BEF: test ecx, ecx */
   3057     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   3058     _cf = 0;
   3059     _flag_k = FK_TEST;
   3060     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001BF9; /* 0x39001BF1: jne 0x39001bf9 */
   3061 L_39001BF3:
   3062     ecx = MEM32(0x3900B02C); /* 0x39001BF3: mov ecx, dword ptr [0x3900b02c] */
   3063 L_39001BF9:
   3064     fp_push(*(float*)&MEM32(eax + 0x1C)); /* 0x39001BF9: fld dword ptr [eax + 0x1c] */
   3065     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3066     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3067     esp = esp - 8; /* 0x39001BFC: sub esp, 8 */
   3068     _flag_k = FK_CMP;
   3069     eax = ebp + (-0x1C4); /* 0x39001BFF: lea eax, [ebp - 0x1c4] */
   3070     { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x39001C05: fstp qword ptr [esp] */
   3071     PUSH32(esp, ecx); /* 0x39001C08: push ecx */
   3072     PUSH32(esp, 0x3900E058u); /* 0x39001C09: push 0x3900e058 */
   3073     PUSH32(esp, eax); /* 0x39001C0E: push eax */
   3074     RECOMP_ICALL(ebx); /* 0x39001C0F: call ebx */
   3075     RECOMP_FLAGS_IN();
   3076     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   3077     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3078     esp = esp + 0x14u; /* 0x39001C11: add esp, 0x14 */
   3079     _flag_k = FK_ADD;
   3080     ecx = ebp + (-0x1C4); /* 0x39001C14: lea ecx, [ebp - 0x1c4] */
   3081     PUSH32(esp, 0); /* 0x39001C1A: push 0 */
   3082     PUSH32(esp, ecx); /* 0x39001C1C: push ecx */
   3083     ecx = ebp + (-0x34); /* 0x39001C1D: lea ecx, [ebp - 0x34] */
   3084     RECOMP_ICALL(MEM32(0x3900B0BC)); /* 0x39001C20: call dword ptr [0x3900b0bc] */
   3085     RECOMP_FLAGS_IN();
   3086     ecx = ebp + (-0x1C); /* 0x39001C26: lea ecx, [ebp - 0x1c] */
   3087     RECOMP_ICALL(0x39004BA0u); /* 0x39001C29: call 0x39004ba0 */ /* not lifted */
   3088     RECOMP_FLAGS_IN();
   3089     ecx = MEM32(esi + 0x4); /* 0x39001C2E: mov ecx, dword ptr [esi + 4] */
   3090     eax = MEM32(ebp + (-0x1C)); /* 0x39001C31: mov eax, dword ptr [ebp - 0x1c] */
   3091     /* cmp eax, ecx */ /* 0x39001C34: cmp eax, ecx */
   3092     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3093     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3094     _flag_k = FK_CMP;
   3095     RECOMP_BACKEDGE();
   3096     if (CMP_NE(_flag_a, _flag_b)) goto L_39001BEC; /* 0x39001C36: jne 0x39001bec */
   3097 L_39001C38:
   3098     ecx = MEM32(ebp + 0x8); /* 0x39001C38: mov ecx, dword ptr [ebp + 8] */
   3099 L_39001C3B:
   3100     /* test ecx, ecx */ /* 0x39001C3B: test ecx, ecx */
   3101     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   3102     _cf = 0;
   3103     _flag_k = FK_TEST;
   3104     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001C44; /* 0x39001C3D: jne 0x39001c44 */
   3105 L_39001C3F:
   3106     esi = MEM32(edi + 0x38); /* 0x39001C3F: mov esi, dword ptr [edi + 0x38] */
   3107     goto L_39001C51; /* 0x39001C42: jmp 0x39001c51 */
   3108 L_39001C44:
   3109     /* cmp ecx, 2 */ /* 0x39001C44: cmp ecx, 2 */
   3110     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(2);
   3111     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3112     _flag_k = FK_CMP;
   3113     if (CMP_NE(_flag_a, _flag_b)) goto L_39001C4E; /* 0x39001C47: jne 0x39001c4e */
   3114 L_39001C49:
   3115     esi = MEM32(edi + 0x50); /* 0x39001C49: mov esi, dword ptr [edi + 0x50] */
   3116     goto L_39001C51; /* 0x39001C4C: jmp 0x39001c51 */
   3117 L_39001C4E:
   3118     esi = MEM32(edi + 0x44); /* 0x39001C4E: mov esi, dword ptr [edi + 0x44] */
   3119 L_39001C51:
   3120     eax = MEM32(esi + 0x4); /* 0x39001C51: mov eax, dword ptr [esi + 4] */
   3121     eax = MEM32(eax); /* 0x39001C54: mov eax, dword ptr [eax] */
   3122     MEM32(ebp + (-0x14)) = eax; /* 0x39001C56: mov dword ptr [ebp - 0x14], eax */
   3123     ecx = MEM32(esi + 0x4); /* 0x39001C59: mov ecx, dword ptr [esi + 4] */
   3124     /* cmp eax, ecx */ /* 0x39001C5C: cmp eax, ecx */
   3125     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3126     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3127     _flag_k = FK_CMP;
   3128     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001CF9; /* 0x39001C5E: je 0x39001cf9 */
   3129 L_39001C64:
   3130     edi = MEM32(0x3900B070); /* 0x39001C64: mov edi, dword ptr [0x3900b070] */
   3131 L_39001C6A:
   3132     eax = MEM32(eax + 0x10); /* 0x39001C6A: mov eax, dword ptr [eax + 0x10] */
   3133     /* test eax, eax */ /* 0x39001C6D: test eax, eax */
   3134     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3135     _cf = 0;
   3136     _flag_k = FK_TEST;
   3137     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001C76; /* 0x39001C6F: jne 0x39001c76 */
   3138 L_39001C71:
   3139     eax = MEM32(0x3900B02C); /* 0x39001C71: mov eax, dword ptr [0x3900b02c] */
   3140 L_39001C76:
   3141     PUSH32(esp, 0x3900E034u); /* 0x39001C76: push 0x3900e034 */
   3142     PUSH32(esp, eax); /* 0x39001C7B: push eax */
   3143     RECOMP_ICALL(edi); /* 0x39001C7C: call edi */
   3144     RECOMP_FLAGS_IN();
   3145     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3146     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3147     esp = esp + 8; /* 0x39001C7E: add esp, 8 */
   3148     _flag_k = FK_ADD;
   3149     /* test eax, eax */ /* 0x39001C81: test eax, eax */
   3150     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3151     _cf = 0;
   3152     _flag_k = FK_TEST;
   3153     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001CA3; /* 0x39001C83: jne 0x39001ca3 */
   3154 L_39001C85:
   3155     edx = MEM32(ebp + (-0x14)); /* 0x39001C85: mov edx, dword ptr [ebp - 0x14] */
   3156     eax = MEM32(edx + 0x10); /* 0x39001C88: mov eax, dword ptr [edx + 0x10] */
   3157     /* test eax, eax */ /* 0x39001C8B: test eax, eax */
   3158     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3159     _cf = 0;
   3160     _flag_k = FK_TEST;
   3161     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001C94; /* 0x39001C8D: jne 0x39001c94 */
   3162 L_39001C8F:
   3163     eax = MEM32(0x3900B02C); /* 0x39001C8F: mov eax, dword ptr [0x3900b02c] */
   3164 L_39001C94:
   3165     PUSH32(esp, 0x3900E028u); /* 0x39001C94: push 0x3900e028 */
   3166     PUSH32(esp, eax); /* 0x39001C99: push eax */
   3167     RECOMP_ICALL(edi); /* 0x39001C9A: call edi */
   3168     RECOMP_FLAGS_IN();
   3169     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3170     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3171     esp = esp + 8; /* 0x39001C9C: add esp, 8 */
   3172     _flag_k = FK_ADD;
   3173     /* test eax, eax */ /* 0x39001C9F: test eax, eax */
   3174     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3175     _cf = 0;
   3176     _flag_k = FK_TEST;
   3177     if (TEST_Z(_flag_a, _flag_b)) goto L_39001CE3; /* 0x39001CA1: je 0x39001ce3 */
   3178 L_39001CA3:
   3179     eax = MEM32(ebp + (-0x14)); /* 0x39001CA3: mov eax, dword ptr [ebp - 0x14] */
   3180     edx = MEM32(0x3900B02C); /* 0x39001CA6: mov edx, dword ptr [0x3900b02c] */
   3181     ecx = MEM32(eax + 0x20); /* 0x39001CAC: mov ecx, dword ptr [eax + 0x20] */
   3182     /* test ecx, ecx */ /* 0x39001CAF: test ecx, ecx */
   3183     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   3184     _cf = 0;
   3185     _flag_k = FK_TEST;
   3186     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001CB5; /* 0x39001CB1: jne 0x39001cb5 */
   3187 L_39001CB3:
   3188     ecx = edx; /* 0x39001CB3: mov ecx, edx */
   3189 L_39001CB5:
   3190     eax = MEM32(eax + 0x10); /* 0x39001CB5: mov eax, dword ptr [eax + 0x10] */
   3191     /* test eax, eax */ /* 0x39001CB8: test eax, eax */
   3192     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3193     _cf = 0;
   3194     _flag_k = FK_TEST;
   3195     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001CBE; /* 0x39001CBA: jne 0x39001cbe */
   3196 L_39001CBC:
   3197     eax = edx; /* 0x39001CBC: mov eax, edx */
   3198 L_39001CBE:
   3199     PUSH32(esp, ecx); /* 0x39001CBE: push ecx */
   3200     PUSH32(esp, eax); /* 0x39001CBF: push eax */
   3201     eax = ebp + (-0x1C4); /* 0x39001CC0: lea eax, [ebp - 0x1c4] */
   3202     PUSH32(esp, 0x3900E04Cu); /* 0x39001CC6: push 0x3900e04c */
   3203     PUSH32(esp, eax); /* 0x39001CCB: push eax */
   3204     RECOMP_ICALL(ebx); /* 0x39001CCC: call ebx */
   3205     RECOMP_FLAGS_IN();
   3206     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   3207     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3208     esp = esp + 0x10u; /* 0x39001CCE: add esp, 0x10 */
   3209     _flag_k = FK_ADD;
   3210     ecx = ebp + (-0x1C4); /* 0x39001CD1: lea ecx, [ebp - 0x1c4] */
   3211     PUSH32(esp, 0); /* 0x39001CD7: push 0 */
   3212     PUSH32(esp, ecx); /* 0x39001CD9: push ecx */
   3213     ecx = ebp + (-0x34); /* 0x39001CDA: lea ecx, [ebp - 0x34] */
   3214     RECOMP_ICALL(MEM32(0x3900B0BC)); /* 0x39001CDD: call dword ptr [0x3900b0bc] */
   3215     RECOMP_FLAGS_IN();
   3216 L_39001CE3:
   3217     ecx = ebp + (-0x14); /* 0x39001CE3: lea ecx, [ebp - 0x14] */
   3218     RECOMP_ICALL(0x39004F50u); /* 0x39001CE6: call 0x39004f50 */ /* not lifted */
   3219     RECOMP_FLAGS_IN();
   3220     ecx = MEM32(esi + 0x4); /* 0x39001CEB: mov ecx, dword ptr [esi + 4] */
   3221     eax = MEM32(ebp + (-0x14)); /* 0x39001CEE: mov eax, dword ptr [ebp - 0x14] */
   3222     /* cmp eax, ecx */ /* 0x39001CF1: cmp eax, ecx */
   3223     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3224     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3225     _flag_k = FK_CMP;
   3226     RECOMP_BACKEDGE();
   3227     if (CMP_NE(_flag_a, _flag_b)) goto L_39001C6A; /* 0x39001CF3: jne 0x39001c6a */
   3228 L_39001CF9:
   3229     ecx = ebp + (-0x34); /* 0x39001CF9: lea ecx, [ebp - 0x34] */
   3230     RECOMP_ICALL(MEM32(0x3900B09C)); /* 0x39001CFC: call dword ptr [0x3900b09c] */
   3231     RECOMP_FLAGS_IN();
   3232     ecx = ebp + (-0x34); /* 0x39001D02: lea ecx, [ebp - 0x34] */
   3233     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39001D05: mov dword ptr [ebp - 4], 0xffffffff */
   3234     RECOMP_ICALL(MEM32(0x3900B0C4)); /* 0x39001D0C: call dword ptr [0x3900b0c4] */
   3235     RECOMP_FLAGS_IN();
   3236     ecx = MEM32(ebp + (-0xC)); /* 0x39001D12: mov ecx, dword ptr [ebp - 0xc] */
   3237     edi = POP32_VAL(esp); /* 0x39001D15: pop edi */
   3238     esi = POP32_VAL(esp); /* 0x39001D16: pop esi */
   3239     SET_LO8(eax, 1); /* 0x39001D17: mov al, 1 */
   3240     ebx = POP32_VAL(esp); /* 0x39001D19: pop ebx */
   3241     MEM32(FS_BASE + (0)) = ecx; /* 0x39001D1A: mov dword ptr fs:[0], ecx */
   3242     esp = ebp; /* 0x39001D21: mov esp, ebp */
   3243     ebp = POP32_VAL(esp); /* 0x39001D23: pop ebp */
   3244     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39001D24: ret 4 */
   3245     RECOMP_REGS_OUT();
   3246 }
   3247 
   3248 void sub_39001D30(void) {
   3249     int _fpu_cmp = 0;
   3250     uint32_t _cf = 0;
   3251     int _df = 1;
   3252     uint32_t _flag_k = FK_NONE;
   3253     uint32_t _flag_a = 0, _flag_b = 0;
   3254     uint32_t _itail_tgt = 0;
   3255     RECOMP_REGS_LOCALS
   3256     RECOMP_ENTER(0x39001D30u);
   3257 
   3258 L_39001D30:
   3259     PUSH32(esp, ebp); /* 0x39001D30: push ebp */
   3260     ebp = esp; /* 0x39001D31: mov ebp, esp */
   3261     PUSH32(esp, 0xFFFFFFFFu); /* 0x39001D33: push -1 */
   3262     PUSH32(esp, 0x3900A509u); /* 0x39001D35: push 0x3900a509 */
   3263     eax = MEM32(FS_BASE + (0)); /* 0x39001D3A: mov eax, dword ptr fs:[0] */
   3264     PUSH32(esp, eax); /* 0x39001D40: push eax */
   3265     MEM32(FS_BASE + (0)) = esp; /* 0x39001D41: mov dword ptr fs:[0], esp */
   3266     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu);
   3267     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3268     esp = esp - 0x1Cu; /* 0x39001D48: sub esp, 0x1c */
   3269     _flag_k = FK_CMP;
   3270     PUSH32(esp, ebx); /* 0x39001D4B: push ebx */
   3271     PUSH32(esp, esi); /* 0x39001D4C: push esi */
   3272     PUSH32(esp, edi); /* 0x39001D4D: push edi */
   3273     MEM32(ebp + (-0x14)) = ecx; /* 0x39001D4E: mov dword ptr [ebp - 0x14], ecx */
   3274 L_39001D51:
   3275     eax = MEM32(ebp + 0x10); /* 0x39001D51: mov eax, dword ptr [ebp + 0x10] */
   3276     /* test eax, eax */ /* 0x39001D54: test eax, eax */
   3277     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3278     _cf = 0;
   3279     _flag_k = FK_TEST;
   3280     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001D60; /* 0x39001D56: jne 0x39001d60 */
   3281 L_39001D58:
   3282     eax = MEM32(ecx + 0x30); /* 0x39001D58: mov eax, dword ptr [ecx + 0x30] */
   3283     MEM32(ebp + (-0x10)) = eax; /* 0x39001D5B: mov dword ptr [ebp - 0x10], eax */
   3284     goto L_39001D73; /* 0x39001D5E: jmp 0x39001d73 */
   3285 L_39001D60:
   3286     /* cmp eax, 2 */ /* 0x39001D60: cmp eax, 2 */
   3287     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   3288     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3289     _flag_k = FK_CMP;
   3290     if (CMP_NE(_flag_a, _flag_b)) goto L_39001D6D; /* 0x39001D63: jne 0x39001d6d */
   3291 L_39001D65:
   3292     ecx = MEM32(ecx + 0x48); /* 0x39001D65: mov ecx, dword ptr [ecx + 0x48] */
   3293     MEM32(ebp + (-0x10)) = ecx; /* 0x39001D68: mov dword ptr [ebp - 0x10], ecx */
   3294     goto L_39001D73; /* 0x39001D6B: jmp 0x39001d73 */
   3295 L_39001D6D:
   3296     edx = MEM32(ecx + 0x3C); /* 0x39001D6D: mov edx, dword ptr [ecx + 0x3c] */
   3297     MEM32(ebp + (-0x10)) = edx; /* 0x39001D70: mov dword ptr [ebp - 0x10], edx */
   3298 L_39001D73:
   3299     SET_LO8(eax, MEM8(ebp + 0x17)); /* 0x39001D73: mov al, byte ptr [ebp + 0x17] */
   3300     PUSH32(esp, 0); /* 0x39001D76: push 0 */
   3301     ecx = ebp + (-0x28); /* 0x39001D78: lea ecx, [ebp - 0x28] */
   3302     MEM8(ebp + (-0x28)) = (uint8_t)(LO8(eax)); /* 0x39001D7B: mov byte ptr [ebp - 0x28], al */
   3303     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001D7E: call dword ptr [0x3900b040] */
   3304     RECOMP_FLAGS_IN();
   3305     esi = MEM32(ebp + 0x8); /* 0x39001D84: mov esi, dword ptr [ebp + 8] */
   3306     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   3307     ecx = ecx | 0xFFFFFFFFu; /* 0x39001D87: or ecx, 0xffffffff */
   3308     _cf = 0;
   3309     _flag_k = FK_TEST;
   3310     edi = esi; /* 0x39001D8A: mov edi, esi */
   3311     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3312     eax = 0; /* 0x39001D8C: xor eax, eax */
   3313     _cf = 0;
   3314     _flag_k = FK_TEST;
   3315     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39001D8E: repne scasb al, byte ptr es:[edi] */
   3316     ecx = ~ecx; /* 0x39001D90: not ecx */
   3317     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   3318     ecx = ecx - 1; /* 0x39001D92: dec ecx */
   3319     _flag_k = FK_DEC;
   3320     PUSH32(esp, 1); /* 0x39001D93: push 1 */
   3321     ebx = ecx; /* 0x39001D95: mov ebx, ecx */
   3322     ecx = ebp + (-0x28); /* 0x39001D97: lea ecx, [ebp - 0x28] */
   3323     PUSH32(esp, ebx); /* 0x39001D9A: push ebx */
   3324     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39001D9B: call dword ptr [0x3900b034] */
   3325     RECOMP_FLAGS_IN();
   3326     /* test LO8(eax), LO8(eax) */ /* 0x39001DA1: test al, al */
   3327     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   3328     _cf = 0;
   3329     _flag_k = FK_NARROW(FK_TEST, 24);
   3330     if (TEST_Z(_flag_a, _flag_b)) goto L_39001DC5; /* 0x39001DA3: je 0x39001dc5 */
   3331 L_39001DA5:
   3332     edi = MEM32(ebp + (-0x24)); /* 0x39001DA5: mov edi, dword ptr [ebp - 0x24] */
   3333     ecx = ebx; /* 0x39001DA8: mov ecx, ebx */
   3334     edx = ecx; /* 0x39001DAA: mov edx, ecx */
   3335     PUSH32(esp, ebx); /* 0x39001DAC: push ebx */
   3336     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39001DAD: shr ecx, 2 */
   3337     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3338     ecx = ecx >> 2u; /* 0x39001DAD: shr ecx, 2 */
   3339     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39001DB0: 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; }
   3340     ecx = edx; /* 0x39001DB2: mov ecx, edx */
   3341     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   3342     ecx = ecx & 3; /* 0x39001DB4: and ecx, 3 */
   3343     _cf = 0;
   3344     _flag_k = FK_TEST;
   3345     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39001DB7: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   3346     ecx = ebp + (-0x28); /* 0x39001DB9: lea ecx, [ebp - 0x28] */
   3347     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39001DBC: call dword ptr [0x3900b038] */
   3348     RECOMP_FLAGS_IN();
   3349     esi = MEM32(ebp + 0x8); /* 0x39001DC2: mov esi, dword ptr [ebp + 8] */
   3350 L_39001DC5:
   3351     ebx = MEM32(ebp + (-0x10)); /* 0x39001DC5: mov ebx, dword ptr [ebp - 0x10] */
   3352     eax = ebp + (-0x28); /* 0x39001DC8: lea eax, [ebp - 0x28] */
   3353     ecx = ebp + (-0x18); /* 0x39001DCB: lea ecx, [ebp - 0x18] */
   3354     PUSH32(esp, eax); /* 0x39001DCE: push eax */
   3355     PUSH32(esp, ecx); /* 0x39001DCF: push ecx */
   3356     ecx = ebx; /* 0x39001DD0: mov ecx, ebx */
   3357     MEM32(ebp + (-0x4)) = 0; /* 0x39001DD2: mov dword ptr [ebp - 4], 0 */
   3358     RECOMP_ICALL(0x390049E0u); /* 0x39001DD9: call 0x390049e0 */ /* not lifted */
   3359     RECOMP_FLAGS_IN();
   3360     edi = MEM32(eax); /* 0x39001DDE: mov edi, dword ptr [eax] */
   3361     PUSH32(esp, 1); /* 0x39001DE0: push 1 */
   3362     ecx = ebp + (-0x28); /* 0x39001DE2: lea ecx, [ebp - 0x28] */
   3363     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39001DE5: mov dword ptr [ebp - 4], 0xffffffff */
   3364     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001DEC: call dword ptr [0x3900b040] */
   3365     RECOMP_FLAGS_IN();
   3366     /* cmp edi, MEM32(ebx + 0x4) */ /* 0x39001DF2: cmp edi, dword ptr [ebx + 4] */
   3367     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebx + 0x4));
   3368     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3369     _flag_k = FK_CMP;
   3370     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E1A; /* 0x39001DF5: jne 0x39001e1a */
   3371 L_39001DF7:
   3372     edx = MEM32(ebp + 0x10); /* 0x39001DF7: mov edx, dword ptr [ebp + 0x10] */
   3373     eax = MEM32(ebp + 0xC); /* 0x39001DFA: mov eax, dword ptr [ebp + 0xc] */
   3374     ecx = MEM32(ebp + (-0x14)); /* 0x39001DFD: mov ecx, dword ptr [ebp - 0x14] */
   3375     PUSH32(esp, edx); /* 0x39001E00: push edx */
   3376     PUSH32(esp, 0x7FFFFFFFu); /* 0x39001E01: push 0x7fffffff */
   3377     PUSH32(esp, 0x80000000u); /* 0x39001E06: push 0x80000000 */
   3378     PUSH32(esp, eax); /* 0x39001E0B: push eax */
   3379     PUSH32(esp, esi); /* 0x39001E0C: push esi */
   3380     RECOMP_ICALL(0x39002570u); /* 0x39001E0D: call 0x39002570 */ /* not lifted */
   3381     RECOMP_FLAGS_IN();
   3382     ecx = MEM32(ebp + (-0x14)); /* 0x39001E12: mov ecx, dword ptr [ebp - 0x14] */
   3383     RECOMP_BACKEDGE();
   3384     goto L_39001D51; /* 0x39001E15: jmp 0x39001d51 */
   3385 L_39001E1A:
   3386     eax = MEM32(edi + 0x20); /* 0x39001E1A: mov eax, dword ptr [edi + 0x20] */
   3387     ebx = MEM32(ebp + 0xC); /* 0x39001E1D: mov ebx, dword ptr [ebp + 0xc] */
   3388     /* cmp ebx, eax */ /* 0x39001E20: cmp ebx, eax */
   3389     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
   3390     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3391     _flag_k = FK_CMP;
   3392     if (CMP_GE(_flag_a, _flag_b)) goto L_39001E29; /* 0x39001E22: jge 0x39001e29 */
   3393 L_39001E24:
   3394     MEM32(ebp + 0xC) = eax; /* 0x39001E24: mov dword ptr [ebp + 0xc], eax */
   3395     ebx = eax; /* 0x39001E27: mov ebx, eax */
   3396 L_39001E29:
   3397     eax = MEM32(edi + 0x24); /* 0x39001E29: mov eax, dword ptr [edi + 0x24] */
   3398     /* cmp ebx, eax */ /* 0x39001E2C: cmp ebx, eax */
   3399     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
   3400     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3401     _flag_k = FK_CMP;
   3402     if (CMP_LE(_flag_a, _flag_b)) goto L_39001E35; /* 0x39001E2E: jle 0x39001e35 */
   3403 L_39001E30:
   3404     MEM32(ebp + 0xC) = eax; /* 0x39001E30: mov dword ptr [ebp + 0xc], eax */
   3405     ebx = eax; /* 0x39001E33: mov ebx, eax */
   3406 L_39001E35:
   3407     SET_LO8(eax, MEM8(ebp + 0x14)); /* 0x39001E35: mov al, byte ptr [ebp + 0x14] */
   3408     MEM32(edi + 0x1C) = ebx; /* 0x39001E38: mov dword ptr [edi + 0x1c], ebx */
   3409     /* test LO8(eax), LO8(eax) */ /* 0x39001E3B: test al, al */
   3410     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   3411     _cf = 0;
   3412     _flag_k = FK_NARROW(FK_TEST, 24);
   3413     if (TEST_Z(_flag_a, _flag_b)) goto L_39001E90; /* 0x39001E3D: je 0x39001e90 */
   3414 L_39001E3F:
   3415     eax = MEM32(edi + 0x28); /* 0x39001E3F: mov eax, dword ptr [edi + 0x28] */
   3416     /* test eax, eax */ /* 0x39001E42: test eax, eax */
   3417     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3418     _cf = 0;
   3419     _flag_k = FK_TEST;
   3420     if (TEST_Z(_flag_a, _flag_b)) goto L_39001E90; /* 0x39001E44: je 0x39001e90 */
   3421 L_39001E46:
   3422     eax = MEM32(eax + 0x4); /* 0x39001E46: mov eax, dword ptr [eax + 4] */
   3423     esi = MEM32(eax); /* 0x39001E49: mov esi, dword ptr [eax] */
   3424     /* cmp esi, eax */ /* 0x39001E4B: cmp esi, eax */
   3425     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   3426     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3427     _flag_k = FK_CMP;
   3428     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E90; /* 0x39001E4D: je 0x39001e90 */
   3429 L_39001E4F:
   3430     ecx = MEM32(esi + 0x10); /* 0x39001E4F: mov ecx, dword ptr [esi + 0x10] */
   3431     PUSH32(esp, ebx); /* 0x39001E52: push ebx */
   3432     PUSH32(esp, ecx); /* 0x39001E53: push ecx */
   3433     RECOMP_ICALL(MEM32(esi + 0xC)); /* 0x39001E54: call dword ptr [esi + 0xc] */
   3434     RECOMP_FLAGS_IN();
   3435     eax = MEM32(esi + 0x8); /* 0x39001E57: mov eax, dword ptr [esi + 8] */
   3436     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3437     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3438     esp = esp + 8; /* 0x39001E5A: add esp, 8 */
   3439     _flag_k = FK_ADD;
   3440     SET_LO8(ecx, MEM8(eax + 0x15)); /* 0x39001E5D: mov cl, byte ptr [eax + 0x15] */
   3441     /* test LO8(ecx), LO8(ecx) */ /* 0x39001E60: test cl, cl */
   3442     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   3443     _cf = 0;
   3444     _flag_k = FK_NARROW(FK_TEST, 24);
   3445     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001E6F; /* 0x39001E62: jne 0x39001e6f */
   3446 L_39001E64:
   3447     PUSH32(esp, eax); /* 0x39001E64: push eax */
   3448     RECOMP_ICALL(0x39006910u); /* 0x39001E65: call 0x39006910 */ /* not lifted */
   3449     RECOMP_FLAGS_IN();
   3450     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3451     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3452     esp = esp + 4; /* 0x39001E6A: add esp, 4 */
   3453     _flag_k = FK_ADD;
   3454     goto L_39001E86; /* 0x39001E6D: jmp 0x39001e86 */
   3455 L_39001E6F:
   3456     eax = MEM32(esi + 0x4); /* 0x39001E6F: mov eax, dword ptr [esi + 4] */
   3457     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39001E72: cmp esi, dword ptr [eax + 8] */
   3458     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   3459     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3460     _flag_k = FK_CMP;
   3461     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E81; /* 0x39001E75: jne 0x39001e81 */
   3462 L_39001E77:
   3463     esi = eax; /* 0x39001E77: mov esi, eax */
   3464     eax = MEM32(eax + 0x4); /* 0x39001E79: mov eax, dword ptr [eax + 4] */
   3465     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39001E7C: cmp esi, dword ptr [eax + 8] */
   3466     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   3467     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3468     _flag_k = FK_CMP;
   3469     RECOMP_BACKEDGE();
   3470     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E77; /* 0x39001E7F: je 0x39001e77 */
   3471 L_39001E81:
   3472     /* cmp MEM32(esi + 0x8), eax */ /* 0x39001E81: cmp dword ptr [esi + 8], eax */
   3473     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(eax);
   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_39001E88; /* 0x39001E84: je 0x39001e88 */
   3477 L_39001E86:
   3478     esi = eax; /* 0x39001E86: mov esi, eax */
   3479 L_39001E88:
   3480     edx = MEM32(edi + 0x28); /* 0x39001E88: mov edx, dword ptr [edi + 0x28] */
   3481     /* cmp esi, MEM32(edx + 0x4) */ /* 0x39001E8B: cmp esi, dword ptr [edx + 4] */
   3482     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edx + 0x4));
   3483     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3484     _flag_k = FK_CMP;
   3485     RECOMP_BACKEDGE();
   3486     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E4F; /* 0x39001E8E: jne 0x39001e4f */
   3487 L_39001E90:
   3488     ecx = MEM32(ebp + (-0xC)); /* 0x39001E90: mov ecx, dword ptr [ebp - 0xc] */
   3489     edi = POP32_VAL(esp); /* 0x39001E93: pop edi */
   3490     eax = ebx; /* 0x39001E94: mov eax, ebx */
   3491     esi = POP32_VAL(esp); /* 0x39001E96: pop esi */
   3492     ebx = POP32_VAL(esp); /* 0x39001E97: pop ebx */
   3493     MEM32(FS_BASE + (0)) = ecx; /* 0x39001E98: mov dword ptr fs:[0], ecx */
   3494     esp = ebp; /* 0x39001E9F: mov esp, ebp */
   3495     ebp = POP32_VAL(esp); /* 0x39001EA1: pop ebp */
   3496     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39001EA2: ret 0x10 */
   3497     RECOMP_REGS_OUT();
   3498 }
   3499 
   3500 void sub_39001D51(void) {
   3501     int _fpu_cmp = 0;
   3502     uint32_t _cf = 0;
   3503     int _df = 1;
   3504     uint32_t _flag_k = FK_NONE;
   3505     uint32_t _flag_a = 0, _flag_b = 0;
   3506     uint32_t _itail_tgt = 0;
   3507     RECOMP_REGS_LOCALS
   3508     RECOMP_ENTER(0x39001D51u);
   3509 
   3510 L_39001D51:
   3511     eax = MEM32(ebp + 0x10); /* 0x39001D51: mov eax, dword ptr [ebp + 0x10] */
   3512     /* test eax, eax */ /* 0x39001D54: test eax, eax */
   3513     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3514     _cf = 0;
   3515     _flag_k = FK_TEST;
   3516     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001D60; /* 0x39001D56: jne 0x39001d60 */
   3517 L_39001D58:
   3518     eax = MEM32(ecx + 0x30); /* 0x39001D58: mov eax, dword ptr [ecx + 0x30] */
   3519     MEM32(ebp + (-0x10)) = eax; /* 0x39001D5B: mov dword ptr [ebp - 0x10], eax */
   3520     goto L_39001D73; /* 0x39001D5E: jmp 0x39001d73 */
   3521 L_39001D60:
   3522     /* cmp eax, 2 */ /* 0x39001D60: cmp eax, 2 */
   3523     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   3524     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3525     _flag_k = FK_CMP;
   3526     if (CMP_NE(_flag_a, _flag_b)) goto L_39001D6D; /* 0x39001D63: jne 0x39001d6d */
   3527 L_39001D65:
   3528     ecx = MEM32(ecx + 0x48); /* 0x39001D65: mov ecx, dword ptr [ecx + 0x48] */
   3529     MEM32(ebp + (-0x10)) = ecx; /* 0x39001D68: mov dword ptr [ebp - 0x10], ecx */
   3530     goto L_39001D73; /* 0x39001D6B: jmp 0x39001d73 */
   3531 L_39001D6D:
   3532     edx = MEM32(ecx + 0x3C); /* 0x39001D6D: mov edx, dword ptr [ecx + 0x3c] */
   3533     MEM32(ebp + (-0x10)) = edx; /* 0x39001D70: mov dword ptr [ebp - 0x10], edx */
   3534 L_39001D73:
   3535     SET_LO8(eax, MEM8(ebp + 0x17)); /* 0x39001D73: mov al, byte ptr [ebp + 0x17] */
   3536     PUSH32(esp, 0); /* 0x39001D76: push 0 */
   3537     ecx = ebp + (-0x28); /* 0x39001D78: lea ecx, [ebp - 0x28] */
   3538     MEM8(ebp + (-0x28)) = (uint8_t)(LO8(eax)); /* 0x39001D7B: mov byte ptr [ebp - 0x28], al */
   3539     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001D7E: call dword ptr [0x3900b040] */
   3540     RECOMP_FLAGS_IN();
   3541     esi = MEM32(ebp + 0x8); /* 0x39001D84: mov esi, dword ptr [ebp + 8] */
   3542     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   3543     ecx = ecx | 0xFFFFFFFFu; /* 0x39001D87: or ecx, 0xffffffff */
   3544     _cf = 0;
   3545     _flag_k = FK_TEST;
   3546     edi = esi; /* 0x39001D8A: mov edi, esi */
   3547     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3548     eax = 0; /* 0x39001D8C: xor eax, eax */
   3549     _cf = 0;
   3550     _flag_k = FK_TEST;
   3551     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39001D8E: repne scasb al, byte ptr es:[edi] */
   3552     ecx = ~ecx; /* 0x39001D90: not ecx */
   3553     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   3554     ecx = ecx - 1; /* 0x39001D92: dec ecx */
   3555     _flag_k = FK_DEC;
   3556     PUSH32(esp, 1); /* 0x39001D93: push 1 */
   3557     ebx = ecx; /* 0x39001D95: mov ebx, ecx */
   3558     ecx = ebp + (-0x28); /* 0x39001D97: lea ecx, [ebp - 0x28] */
   3559     PUSH32(esp, ebx); /* 0x39001D9A: push ebx */
   3560     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39001D9B: call dword ptr [0x3900b034] */
   3561     RECOMP_FLAGS_IN();
   3562     /* test LO8(eax), LO8(eax) */ /* 0x39001DA1: test al, al */
   3563     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   3564     _cf = 0;
   3565     _flag_k = FK_NARROW(FK_TEST, 24);
   3566     if (TEST_Z(_flag_a, _flag_b)) goto L_39001DC5; /* 0x39001DA3: je 0x39001dc5 */
   3567 L_39001DA5:
   3568     edi = MEM32(ebp + (-0x24)); /* 0x39001DA5: mov edi, dword ptr [ebp - 0x24] */
   3569     ecx = ebx; /* 0x39001DA8: mov ecx, ebx */
   3570     edx = ecx; /* 0x39001DAA: mov edx, ecx */
   3571     PUSH32(esp, ebx); /* 0x39001DAC: push ebx */
   3572     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39001DAD: shr ecx, 2 */
   3573     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3574     ecx = ecx >> 2u; /* 0x39001DAD: shr ecx, 2 */
   3575     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39001DB0: 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; }
   3576     ecx = edx; /* 0x39001DB2: mov ecx, edx */
   3577     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   3578     ecx = ecx & 3; /* 0x39001DB4: and ecx, 3 */
   3579     _cf = 0;
   3580     _flag_k = FK_TEST;
   3581     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39001DB7: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   3582     ecx = ebp + (-0x28); /* 0x39001DB9: lea ecx, [ebp - 0x28] */
   3583     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39001DBC: call dword ptr [0x3900b038] */
   3584     RECOMP_FLAGS_IN();
   3585     esi = MEM32(ebp + 0x8); /* 0x39001DC2: mov esi, dword ptr [ebp + 8] */
   3586 L_39001DC5:
   3587     ebx = MEM32(ebp + (-0x10)); /* 0x39001DC5: mov ebx, dword ptr [ebp - 0x10] */
   3588     eax = ebp + (-0x28); /* 0x39001DC8: lea eax, [ebp - 0x28] */
   3589     ecx = ebp + (-0x18); /* 0x39001DCB: lea ecx, [ebp - 0x18] */
   3590     PUSH32(esp, eax); /* 0x39001DCE: push eax */
   3591     PUSH32(esp, ecx); /* 0x39001DCF: push ecx */
   3592     ecx = ebx; /* 0x39001DD0: mov ecx, ebx */
   3593     MEM32(ebp + (-0x4)) = 0; /* 0x39001DD2: mov dword ptr [ebp - 4], 0 */
   3594     RECOMP_ICALL(0x390049E0u); /* 0x39001DD9: call 0x390049e0 */ /* not lifted */
   3595     RECOMP_FLAGS_IN();
   3596     edi = MEM32(eax); /* 0x39001DDE: mov edi, dword ptr [eax] */
   3597     PUSH32(esp, 1); /* 0x39001DE0: push 1 */
   3598     ecx = ebp + (-0x28); /* 0x39001DE2: lea ecx, [ebp - 0x28] */
   3599     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39001DE5: mov dword ptr [ebp - 4], 0xffffffff */
   3600     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001DEC: call dword ptr [0x3900b040] */
   3601     RECOMP_FLAGS_IN();
   3602     /* cmp edi, MEM32(ebx + 0x4) */ /* 0x39001DF2: cmp edi, dword ptr [ebx + 4] */
   3603     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebx + 0x4));
   3604     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3605     _flag_k = FK_CMP;
   3606     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E1A; /* 0x39001DF5: jne 0x39001e1a */
   3607 L_39001DF7:
   3608     edx = MEM32(ebp + 0x10); /* 0x39001DF7: mov edx, dword ptr [ebp + 0x10] */
   3609     eax = MEM32(ebp + 0xC); /* 0x39001DFA: mov eax, dword ptr [ebp + 0xc] */
   3610     ecx = MEM32(ebp + (-0x14)); /* 0x39001DFD: mov ecx, dword ptr [ebp - 0x14] */
   3611     PUSH32(esp, edx); /* 0x39001E00: push edx */
   3612     PUSH32(esp, 0x7FFFFFFFu); /* 0x39001E01: push 0x7fffffff */
   3613     PUSH32(esp, 0x80000000u); /* 0x39001E06: push 0x80000000 */
   3614     PUSH32(esp, eax); /* 0x39001E0B: push eax */
   3615     PUSH32(esp, esi); /* 0x39001E0C: push esi */
   3616     RECOMP_ICALL(0x39002570u); /* 0x39001E0D: call 0x39002570 */ /* not lifted */
   3617     RECOMP_FLAGS_IN();
   3618     ecx = MEM32(ebp + (-0x14)); /* 0x39001E12: mov ecx, dword ptr [ebp - 0x14] */
   3619     RECOMP_BACKEDGE();
   3620     goto L_39001D51; /* 0x39001E15: jmp 0x39001d51 */
   3621 L_39001E1A:
   3622     eax = MEM32(edi + 0x20); /* 0x39001E1A: mov eax, dword ptr [edi + 0x20] */
   3623     ebx = MEM32(ebp + 0xC); /* 0x39001E1D: mov ebx, dword ptr [ebp + 0xc] */
   3624     /* cmp ebx, eax */ /* 0x39001E20: cmp ebx, eax */
   3625     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
   3626     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3627     _flag_k = FK_CMP;
   3628     if (CMP_GE(_flag_a, _flag_b)) goto L_39001E29; /* 0x39001E22: jge 0x39001e29 */
   3629 L_39001E24:
   3630     MEM32(ebp + 0xC) = eax; /* 0x39001E24: mov dword ptr [ebp + 0xc], eax */
   3631     ebx = eax; /* 0x39001E27: mov ebx, eax */
   3632 L_39001E29:
   3633     eax = MEM32(edi + 0x24); /* 0x39001E29: mov eax, dword ptr [edi + 0x24] */
   3634     /* cmp ebx, eax */ /* 0x39001E2C: cmp ebx, eax */
   3635     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
   3636     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3637     _flag_k = FK_CMP;
   3638     if (CMP_LE(_flag_a, _flag_b)) goto L_39001E35; /* 0x39001E2E: jle 0x39001e35 */
   3639 L_39001E30:
   3640     MEM32(ebp + 0xC) = eax; /* 0x39001E30: mov dword ptr [ebp + 0xc], eax */
   3641     ebx = eax; /* 0x39001E33: mov ebx, eax */
   3642 L_39001E35:
   3643     SET_LO8(eax, MEM8(ebp + 0x14)); /* 0x39001E35: mov al, byte ptr [ebp + 0x14] */
   3644     MEM32(edi + 0x1C) = ebx; /* 0x39001E38: mov dword ptr [edi + 0x1c], ebx */
   3645     /* test LO8(eax), LO8(eax) */ /* 0x39001E3B: test al, al */
   3646     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   3647     _cf = 0;
   3648     _flag_k = FK_NARROW(FK_TEST, 24);
   3649     if (TEST_Z(_flag_a, _flag_b)) goto L_39001E90; /* 0x39001E3D: je 0x39001e90 */
   3650 L_39001E3F:
   3651     eax = MEM32(edi + 0x28); /* 0x39001E3F: mov eax, dword ptr [edi + 0x28] */
   3652     /* test eax, eax */ /* 0x39001E42: test eax, eax */
   3653     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3654     _cf = 0;
   3655     _flag_k = FK_TEST;
   3656     if (TEST_Z(_flag_a, _flag_b)) goto L_39001E90; /* 0x39001E44: je 0x39001e90 */
   3657 L_39001E46:
   3658     eax = MEM32(eax + 0x4); /* 0x39001E46: mov eax, dword ptr [eax + 4] */
   3659     esi = MEM32(eax); /* 0x39001E49: mov esi, dword ptr [eax] */
   3660     /* cmp esi, eax */ /* 0x39001E4B: cmp esi, eax */
   3661     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   3662     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3663     _flag_k = FK_CMP;
   3664     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E90; /* 0x39001E4D: je 0x39001e90 */
   3665 L_39001E4F:
   3666     ecx = MEM32(esi + 0x10); /* 0x39001E4F: mov ecx, dword ptr [esi + 0x10] */
   3667     PUSH32(esp, ebx); /* 0x39001E52: push ebx */
   3668     PUSH32(esp, ecx); /* 0x39001E53: push ecx */
   3669     RECOMP_ICALL(MEM32(esi + 0xC)); /* 0x39001E54: call dword ptr [esi + 0xc] */
   3670     RECOMP_FLAGS_IN();
   3671     eax = MEM32(esi + 0x8); /* 0x39001E57: mov eax, dword ptr [esi + 8] */
   3672     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3673     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3674     esp = esp + 8; /* 0x39001E5A: add esp, 8 */
   3675     _flag_k = FK_ADD;
   3676     SET_LO8(ecx, MEM8(eax + 0x15)); /* 0x39001E5D: mov cl, byte ptr [eax + 0x15] */
   3677     /* test LO8(ecx), LO8(ecx) */ /* 0x39001E60: test cl, cl */
   3678     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   3679     _cf = 0;
   3680     _flag_k = FK_NARROW(FK_TEST, 24);
   3681     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001E6F; /* 0x39001E62: jne 0x39001e6f */
   3682 L_39001E64:
   3683     PUSH32(esp, eax); /* 0x39001E64: push eax */
   3684     RECOMP_ICALL(0x39006910u); /* 0x39001E65: call 0x39006910 */ /* not lifted */
   3685     RECOMP_FLAGS_IN();
   3686     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3687     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3688     esp = esp + 4; /* 0x39001E6A: add esp, 4 */
   3689     _flag_k = FK_ADD;
   3690     goto L_39001E86; /* 0x39001E6D: jmp 0x39001e86 */
   3691 L_39001E6F:
   3692     eax = MEM32(esi + 0x4); /* 0x39001E6F: mov eax, dword ptr [esi + 4] */
   3693     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39001E72: cmp esi, dword ptr [eax + 8] */
   3694     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   3695     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3696     _flag_k = FK_CMP;
   3697     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E81; /* 0x39001E75: jne 0x39001e81 */
   3698 L_39001E77:
   3699     esi = eax; /* 0x39001E77: mov esi, eax */
   3700     eax = MEM32(eax + 0x4); /* 0x39001E79: mov eax, dword ptr [eax + 4] */
   3701     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39001E7C: cmp esi, dword ptr [eax + 8] */
   3702     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   3703     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3704     _flag_k = FK_CMP;
   3705     RECOMP_BACKEDGE();
   3706     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E77; /* 0x39001E7F: je 0x39001e77 */
   3707 L_39001E81:
   3708     /* cmp MEM32(esi + 0x8), eax */ /* 0x39001E81: cmp dword ptr [esi + 8], eax */
   3709     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(eax);
   3710     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3711     _flag_k = FK_CMP;
   3712     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E88; /* 0x39001E84: je 0x39001e88 */
   3713 L_39001E86:
   3714     esi = eax; /* 0x39001E86: mov esi, eax */
   3715 L_39001E88:
   3716     edx = MEM32(edi + 0x28); /* 0x39001E88: mov edx, dword ptr [edi + 0x28] */
   3717     /* cmp esi, MEM32(edx + 0x4) */ /* 0x39001E8B: cmp esi, dword ptr [edx + 4] */
   3718     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edx + 0x4));
   3719     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3720     _flag_k = FK_CMP;
   3721     RECOMP_BACKEDGE();
   3722     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E4F; /* 0x39001E8E: jne 0x39001e4f */
   3723 L_39001E90:
   3724     ecx = MEM32(ebp + (-0xC)); /* 0x39001E90: mov ecx, dword ptr [ebp - 0xc] */
   3725     edi = POP32_VAL(esp); /* 0x39001E93: pop edi */
   3726     eax = ebx; /* 0x39001E94: mov eax, ebx */
   3727     esi = POP32_VAL(esp); /* 0x39001E96: pop esi */
   3728     ebx = POP32_VAL(esp); /* 0x39001E97: pop ebx */
   3729     MEM32(FS_BASE + (0)) = ecx; /* 0x39001E98: mov dword ptr fs:[0], ecx */
   3730     esp = ebp; /* 0x39001E9F: mov esp, ebp */
   3731     ebp = POP32_VAL(esp); /* 0x39001EA1: pop ebp */
   3732     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39001EA2: ret 0x10 */
   3733     RECOMP_REGS_OUT();
   3734 }
   3735 
   3736 void sub_39001D73(void) {
   3737     int _fpu_cmp = 0;
   3738     uint32_t _cf = 0;
   3739     int _df = 1;
   3740     uint32_t _flag_k = FK_NONE;
   3741     uint32_t _flag_a = 0, _flag_b = 0;
   3742     uint32_t _itail_tgt = 0;
   3743     RECOMP_REGS_LOCALS
   3744     RECOMP_ENTER(0x39001D73u);
   3745 
   3746     goto L_39001D73;
   3747 L_39001D51:
   3748     eax = MEM32(ebp + 0x10); /* 0x39001D51: mov eax, dword ptr [ebp + 0x10] */
   3749     /* test eax, eax */ /* 0x39001D54: test eax, eax */
   3750     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3751     _cf = 0;
   3752     _flag_k = FK_TEST;
   3753     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001D60; /* 0x39001D56: jne 0x39001d60 */
   3754 L_39001D58:
   3755     eax = MEM32(ecx + 0x30); /* 0x39001D58: mov eax, dword ptr [ecx + 0x30] */
   3756     MEM32(ebp + (-0x10)) = eax; /* 0x39001D5B: mov dword ptr [ebp - 0x10], eax */
   3757     goto L_39001D73; /* 0x39001D5E: jmp 0x39001d73 */
   3758 L_39001D60:
   3759     /* cmp eax, 2 */ /* 0x39001D60: cmp eax, 2 */
   3760     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   3761     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3762     _flag_k = FK_CMP;
   3763     if (CMP_NE(_flag_a, _flag_b)) goto L_39001D6D; /* 0x39001D63: jne 0x39001d6d */
   3764 L_39001D65:
   3765     ecx = MEM32(ecx + 0x48); /* 0x39001D65: mov ecx, dword ptr [ecx + 0x48] */
   3766     MEM32(ebp + (-0x10)) = ecx; /* 0x39001D68: mov dword ptr [ebp - 0x10], ecx */
   3767     goto L_39001D73; /* 0x39001D6B: jmp 0x39001d73 */
   3768 L_39001D6D:
   3769     edx = MEM32(ecx + 0x3C); /* 0x39001D6D: mov edx, dword ptr [ecx + 0x3c] */
   3770     MEM32(ebp + (-0x10)) = edx; /* 0x39001D70: mov dword ptr [ebp - 0x10], edx */
   3771 L_39001D73:
   3772     SET_LO8(eax, MEM8(ebp + 0x17)); /* 0x39001D73: mov al, byte ptr [ebp + 0x17] */
   3773     PUSH32(esp, 0); /* 0x39001D76: push 0 */
   3774     ecx = ebp + (-0x28); /* 0x39001D78: lea ecx, [ebp - 0x28] */
   3775     MEM8(ebp + (-0x28)) = (uint8_t)(LO8(eax)); /* 0x39001D7B: mov byte ptr [ebp - 0x28], al */
   3776     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001D7E: call dword ptr [0x3900b040] */
   3777     RECOMP_FLAGS_IN();
   3778     esi = MEM32(ebp + 0x8); /* 0x39001D84: mov esi, dword ptr [ebp + 8] */
   3779     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   3780     ecx = ecx | 0xFFFFFFFFu; /* 0x39001D87: or ecx, 0xffffffff */
   3781     _cf = 0;
   3782     _flag_k = FK_TEST;
   3783     edi = esi; /* 0x39001D8A: mov edi, esi */
   3784     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3785     eax = 0; /* 0x39001D8C: xor eax, eax */
   3786     _cf = 0;
   3787     _flag_k = FK_TEST;
   3788     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39001D8E: repne scasb al, byte ptr es:[edi] */
   3789     ecx = ~ecx; /* 0x39001D90: not ecx */
   3790     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   3791     ecx = ecx - 1; /* 0x39001D92: dec ecx */
   3792     _flag_k = FK_DEC;
   3793     PUSH32(esp, 1); /* 0x39001D93: push 1 */
   3794     ebx = ecx; /* 0x39001D95: mov ebx, ecx */
   3795     ecx = ebp + (-0x28); /* 0x39001D97: lea ecx, [ebp - 0x28] */
   3796     PUSH32(esp, ebx); /* 0x39001D9A: push ebx */
   3797     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39001D9B: call dword ptr [0x3900b034] */
   3798     RECOMP_FLAGS_IN();
   3799     /* test LO8(eax), LO8(eax) */ /* 0x39001DA1: test al, al */
   3800     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   3801     _cf = 0;
   3802     _flag_k = FK_NARROW(FK_TEST, 24);
   3803     if (TEST_Z(_flag_a, _flag_b)) goto L_39001DC5; /* 0x39001DA3: je 0x39001dc5 */
   3804 L_39001DA5:
   3805     edi = MEM32(ebp + (-0x24)); /* 0x39001DA5: mov edi, dword ptr [ebp - 0x24] */
   3806     ecx = ebx; /* 0x39001DA8: mov ecx, ebx */
   3807     edx = ecx; /* 0x39001DAA: mov edx, ecx */
   3808     PUSH32(esp, ebx); /* 0x39001DAC: push ebx */
   3809     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39001DAD: shr ecx, 2 */
   3810     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3811     ecx = ecx >> 2u; /* 0x39001DAD: shr ecx, 2 */
   3812     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39001DB0: 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; }
   3813     ecx = edx; /* 0x39001DB2: mov ecx, edx */
   3814     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   3815     ecx = ecx & 3; /* 0x39001DB4: and ecx, 3 */
   3816     _cf = 0;
   3817     _flag_k = FK_TEST;
   3818     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39001DB7: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   3819     ecx = ebp + (-0x28); /* 0x39001DB9: lea ecx, [ebp - 0x28] */
   3820     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39001DBC: call dword ptr [0x3900b038] */
   3821     RECOMP_FLAGS_IN();
   3822     esi = MEM32(ebp + 0x8); /* 0x39001DC2: mov esi, dword ptr [ebp + 8] */
   3823 L_39001DC5:
   3824     ebx = MEM32(ebp + (-0x10)); /* 0x39001DC5: mov ebx, dword ptr [ebp - 0x10] */
   3825     eax = ebp + (-0x28); /* 0x39001DC8: lea eax, [ebp - 0x28] */
   3826     ecx = ebp + (-0x18); /* 0x39001DCB: lea ecx, [ebp - 0x18] */
   3827     PUSH32(esp, eax); /* 0x39001DCE: push eax */
   3828     PUSH32(esp, ecx); /* 0x39001DCF: push ecx */
   3829     ecx = ebx; /* 0x39001DD0: mov ecx, ebx */
   3830     MEM32(ebp + (-0x4)) = 0; /* 0x39001DD2: mov dword ptr [ebp - 4], 0 */
   3831     RECOMP_ICALL(0x390049E0u); /* 0x39001DD9: call 0x390049e0 */ /* not lifted */
   3832     RECOMP_FLAGS_IN();
   3833     edi = MEM32(eax); /* 0x39001DDE: mov edi, dword ptr [eax] */
   3834     PUSH32(esp, 1); /* 0x39001DE0: push 1 */
   3835     ecx = ebp + (-0x28); /* 0x39001DE2: lea ecx, [ebp - 0x28] */
   3836     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39001DE5: mov dword ptr [ebp - 4], 0xffffffff */
   3837     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001DEC: call dword ptr [0x3900b040] */
   3838     RECOMP_FLAGS_IN();
   3839     /* cmp edi, MEM32(ebx + 0x4) */ /* 0x39001DF2: cmp edi, dword ptr [ebx + 4] */
   3840     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebx + 0x4));
   3841     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3842     _flag_k = FK_CMP;
   3843     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E1A; /* 0x39001DF5: jne 0x39001e1a */
   3844 L_39001DF7:
   3845     edx = MEM32(ebp + 0x10); /* 0x39001DF7: mov edx, dword ptr [ebp + 0x10] */
   3846     eax = MEM32(ebp + 0xC); /* 0x39001DFA: mov eax, dword ptr [ebp + 0xc] */
   3847     ecx = MEM32(ebp + (-0x14)); /* 0x39001DFD: mov ecx, dword ptr [ebp - 0x14] */
   3848     PUSH32(esp, edx); /* 0x39001E00: push edx */
   3849     PUSH32(esp, 0x7FFFFFFFu); /* 0x39001E01: push 0x7fffffff */
   3850     PUSH32(esp, 0x80000000u); /* 0x39001E06: push 0x80000000 */
   3851     PUSH32(esp, eax); /* 0x39001E0B: push eax */
   3852     PUSH32(esp, esi); /* 0x39001E0C: push esi */
   3853     RECOMP_ICALL(0x39002570u); /* 0x39001E0D: call 0x39002570 */ /* not lifted */
   3854     RECOMP_FLAGS_IN();
   3855     ecx = MEM32(ebp + (-0x14)); /* 0x39001E12: mov ecx, dword ptr [ebp - 0x14] */
   3856     RECOMP_BACKEDGE();
   3857     goto L_39001D51; /* 0x39001E15: jmp 0x39001d51 */
   3858 L_39001E1A:
   3859     eax = MEM32(edi + 0x20); /* 0x39001E1A: mov eax, dword ptr [edi + 0x20] */
   3860     ebx = MEM32(ebp + 0xC); /* 0x39001E1D: mov ebx, dword ptr [ebp + 0xc] */
   3861     /* cmp ebx, eax */ /* 0x39001E20: cmp ebx, eax */
   3862     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
   3863     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3864     _flag_k = FK_CMP;
   3865     if (CMP_GE(_flag_a, _flag_b)) goto L_39001E29; /* 0x39001E22: jge 0x39001e29 */
   3866 L_39001E24:
   3867     MEM32(ebp + 0xC) = eax; /* 0x39001E24: mov dword ptr [ebp + 0xc], eax */
   3868     ebx = eax; /* 0x39001E27: mov ebx, eax */
   3869 L_39001E29:
   3870     eax = MEM32(edi + 0x24); /* 0x39001E29: mov eax, dword ptr [edi + 0x24] */
   3871     /* cmp ebx, eax */ /* 0x39001E2C: cmp ebx, eax */
   3872     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
   3873     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3874     _flag_k = FK_CMP;
   3875     if (CMP_LE(_flag_a, _flag_b)) goto L_39001E35; /* 0x39001E2E: jle 0x39001e35 */
   3876 L_39001E30:
   3877     MEM32(ebp + 0xC) = eax; /* 0x39001E30: mov dword ptr [ebp + 0xc], eax */
   3878     ebx = eax; /* 0x39001E33: mov ebx, eax */
   3879 L_39001E35:
   3880     SET_LO8(eax, MEM8(ebp + 0x14)); /* 0x39001E35: mov al, byte ptr [ebp + 0x14] */
   3881     MEM32(edi + 0x1C) = ebx; /* 0x39001E38: mov dword ptr [edi + 0x1c], ebx */
   3882     /* test LO8(eax), LO8(eax) */ /* 0x39001E3B: test al, al */
   3883     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   3884     _cf = 0;
   3885     _flag_k = FK_NARROW(FK_TEST, 24);
   3886     if (TEST_Z(_flag_a, _flag_b)) goto L_39001E90; /* 0x39001E3D: je 0x39001e90 */
   3887 L_39001E3F:
   3888     eax = MEM32(edi + 0x28); /* 0x39001E3F: mov eax, dword ptr [edi + 0x28] */
   3889     /* test eax, eax */ /* 0x39001E42: test eax, eax */
   3890     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3891     _cf = 0;
   3892     _flag_k = FK_TEST;
   3893     if (TEST_Z(_flag_a, _flag_b)) goto L_39001E90; /* 0x39001E44: je 0x39001e90 */
   3894 L_39001E46:
   3895     eax = MEM32(eax + 0x4); /* 0x39001E46: mov eax, dword ptr [eax + 4] */
   3896     esi = MEM32(eax); /* 0x39001E49: mov esi, dword ptr [eax] */
   3897     /* cmp esi, eax */ /* 0x39001E4B: cmp esi, eax */
   3898     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   3899     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3900     _flag_k = FK_CMP;
   3901     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E90; /* 0x39001E4D: je 0x39001e90 */
   3902 L_39001E4F:
   3903     ecx = MEM32(esi + 0x10); /* 0x39001E4F: mov ecx, dword ptr [esi + 0x10] */
   3904     PUSH32(esp, ebx); /* 0x39001E52: push ebx */
   3905     PUSH32(esp, ecx); /* 0x39001E53: push ecx */
   3906     RECOMP_ICALL(MEM32(esi + 0xC)); /* 0x39001E54: call dword ptr [esi + 0xc] */
   3907     RECOMP_FLAGS_IN();
   3908     eax = MEM32(esi + 0x8); /* 0x39001E57: mov eax, dword ptr [esi + 8] */
   3909     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3910     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3911     esp = esp + 8; /* 0x39001E5A: add esp, 8 */
   3912     _flag_k = FK_ADD;
   3913     SET_LO8(ecx, MEM8(eax + 0x15)); /* 0x39001E5D: mov cl, byte ptr [eax + 0x15] */
   3914     /* test LO8(ecx), LO8(ecx) */ /* 0x39001E60: test cl, cl */
   3915     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   3916     _cf = 0;
   3917     _flag_k = FK_NARROW(FK_TEST, 24);
   3918     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001E6F; /* 0x39001E62: jne 0x39001e6f */
   3919 L_39001E64:
   3920     PUSH32(esp, eax); /* 0x39001E64: push eax */
   3921     RECOMP_ICALL(0x39006910u); /* 0x39001E65: call 0x39006910 */ /* not lifted */
   3922     RECOMP_FLAGS_IN();
   3923     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3924     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3925     esp = esp + 4; /* 0x39001E6A: add esp, 4 */
   3926     _flag_k = FK_ADD;
   3927     goto L_39001E86; /* 0x39001E6D: jmp 0x39001e86 */
   3928 L_39001E6F:
   3929     eax = MEM32(esi + 0x4); /* 0x39001E6F: mov eax, dword ptr [esi + 4] */
   3930     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39001E72: cmp esi, dword ptr [eax + 8] */
   3931     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   3932     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3933     _flag_k = FK_CMP;
   3934     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E81; /* 0x39001E75: jne 0x39001e81 */
   3935 L_39001E77:
   3936     esi = eax; /* 0x39001E77: mov esi, eax */
   3937     eax = MEM32(eax + 0x4); /* 0x39001E79: mov eax, dword ptr [eax + 4] */
   3938     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39001E7C: cmp esi, dword ptr [eax + 8] */
   3939     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   3940     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3941     _flag_k = FK_CMP;
   3942     RECOMP_BACKEDGE();
   3943     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E77; /* 0x39001E7F: je 0x39001e77 */
   3944 L_39001E81:
   3945     /* cmp MEM32(esi + 0x8), eax */ /* 0x39001E81: cmp dword ptr [esi + 8], eax */
   3946     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(eax);
   3947     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3948     _flag_k = FK_CMP;
   3949     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E88; /* 0x39001E84: je 0x39001e88 */
   3950 L_39001E86:
   3951     esi = eax; /* 0x39001E86: mov esi, eax */
   3952 L_39001E88:
   3953     edx = MEM32(edi + 0x28); /* 0x39001E88: mov edx, dword ptr [edi + 0x28] */
   3954     /* cmp esi, MEM32(edx + 0x4) */ /* 0x39001E8B: cmp esi, dword ptr [edx + 4] */
   3955     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edx + 0x4));
   3956     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3957     _flag_k = FK_CMP;
   3958     RECOMP_BACKEDGE();
   3959     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E4F; /* 0x39001E8E: jne 0x39001e4f */
   3960 L_39001E90:
   3961     ecx = MEM32(ebp + (-0xC)); /* 0x39001E90: mov ecx, dword ptr [ebp - 0xc] */
   3962     edi = POP32_VAL(esp); /* 0x39001E93: pop edi */
   3963     eax = ebx; /* 0x39001E94: mov eax, ebx */
   3964     esi = POP32_VAL(esp); /* 0x39001E96: pop esi */
   3965     ebx = POP32_VAL(esp); /* 0x39001E97: pop ebx */
   3966     MEM32(FS_BASE + (0)) = ecx; /* 0x39001E98: mov dword ptr fs:[0], ecx */
   3967     esp = ebp; /* 0x39001E9F: mov esp, ebp */
   3968     ebp = POP32_VAL(esp); /* 0x39001EA1: pop ebp */
   3969     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39001EA2: ret 0x10 */
   3970     RECOMP_REGS_OUT();
   3971 }
   3972 
   3973 void sub_39001E4F(void) {
   3974     int _fpu_cmp = 0;
   3975     uint32_t _cf = 0;
   3976     int _df = 1;
   3977     uint32_t _flag_k = FK_NONE;
   3978     uint32_t _flag_a = 0, _flag_b = 0;
   3979     uint32_t _itail_tgt = 0;
   3980     RECOMP_REGS_LOCALS
   3981     RECOMP_ENTER(0x39001E4Fu);
   3982 
   3983 L_39001E4F:
   3984     ecx = MEM32(esi + 0x10); /* 0x39001E4F: mov ecx, dword ptr [esi + 0x10] */
   3985     PUSH32(esp, ebx); /* 0x39001E52: push ebx */
   3986     PUSH32(esp, ecx); /* 0x39001E53: push ecx */
   3987     RECOMP_ICALL(MEM32(esi + 0xC)); /* 0x39001E54: call dword ptr [esi + 0xc] */
   3988     RECOMP_FLAGS_IN();
   3989     eax = MEM32(esi + 0x8); /* 0x39001E57: mov eax, dword ptr [esi + 8] */
   3990     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3991     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3992     esp = esp + 8; /* 0x39001E5A: add esp, 8 */
   3993     _flag_k = FK_ADD;
   3994     SET_LO8(ecx, MEM8(eax + 0x15)); /* 0x39001E5D: mov cl, byte ptr [eax + 0x15] */
   3995     /* test LO8(ecx), LO8(ecx) */ /* 0x39001E60: test cl, cl */
   3996     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   3997     _cf = 0;
   3998     _flag_k = FK_NARROW(FK_TEST, 24);
   3999     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001E6F; /* 0x39001E62: jne 0x39001e6f */
   4000 L_39001E64:
   4001     PUSH32(esp, eax); /* 0x39001E64: push eax */
   4002     RECOMP_ICALL(0x39006910u); /* 0x39001E65: call 0x39006910 */ /* not lifted */
   4003     RECOMP_FLAGS_IN();
   4004     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4005     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4006     esp = esp + 4; /* 0x39001E6A: add esp, 4 */
   4007     _flag_k = FK_ADD;
   4008     goto L_39001E86; /* 0x39001E6D: jmp 0x39001e86 */
   4009 L_39001E6F:
   4010     eax = MEM32(esi + 0x4); /* 0x39001E6F: mov eax, dword ptr [esi + 4] */
   4011     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39001E72: cmp esi, dword ptr [eax + 8] */
   4012     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   4013     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4014     _flag_k = FK_CMP;
   4015     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E81; /* 0x39001E75: jne 0x39001e81 */
   4016 L_39001E77:
   4017     esi = eax; /* 0x39001E77: mov esi, eax */
   4018     eax = MEM32(eax + 0x4); /* 0x39001E79: mov eax, dword ptr [eax + 4] */
   4019     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39001E7C: cmp esi, dword ptr [eax + 8] */
   4020     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   4021     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4022     _flag_k = FK_CMP;
   4023     RECOMP_BACKEDGE();
   4024     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E77; /* 0x39001E7F: je 0x39001e77 */
   4025 L_39001E81:
   4026     /* cmp MEM32(esi + 0x8), eax */ /* 0x39001E81: cmp dword ptr [esi + 8], eax */
   4027     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(eax);
   4028     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4029     _flag_k = FK_CMP;
   4030     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E88; /* 0x39001E84: je 0x39001e88 */
   4031 L_39001E86:
   4032     esi = eax; /* 0x39001E86: mov esi, eax */
   4033 L_39001E88:
   4034     edx = MEM32(edi + 0x28); /* 0x39001E88: mov edx, dword ptr [edi + 0x28] */
   4035     /* cmp esi, MEM32(edx + 0x4) */ /* 0x39001E8B: cmp esi, dword ptr [edx + 4] */
   4036     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edx + 0x4));
   4037     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4038     _flag_k = FK_CMP;
   4039     RECOMP_BACKEDGE();
   4040     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E4F; /* 0x39001E8E: jne 0x39001e4f */
   4041 L_39001E90:
   4042     ecx = MEM32(ebp + (-0xC)); /* 0x39001E90: mov ecx, dword ptr [ebp - 0xc] */
   4043     edi = POP32_VAL(esp); /* 0x39001E93: pop edi */
   4044     eax = ebx; /* 0x39001E94: mov eax, ebx */
   4045     esi = POP32_VAL(esp); /* 0x39001E96: pop esi */
   4046     ebx = POP32_VAL(esp); /* 0x39001E97: pop ebx */
   4047     MEM32(FS_BASE + (0)) = ecx; /* 0x39001E98: mov dword ptr fs:[0], ecx */
   4048     esp = ebp; /* 0x39001E9F: mov esp, ebp */
   4049     ebp = POP32_VAL(esp); /* 0x39001EA1: pop ebp */
   4050     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39001EA2: ret 0x10 */
   4051     RECOMP_REGS_OUT();
   4052 }
   4053 
   4054 void sub_39001E86(void) {
   4055     int _fpu_cmp = 0;
   4056     uint32_t _cf = 0;
   4057     int _df = 1;
   4058     uint32_t _flag_k = FK_NONE;
   4059     uint32_t _flag_a = 0, _flag_b = 0;
   4060     uint32_t _itail_tgt = 0;
   4061     RECOMP_REGS_LOCALS
   4062     RECOMP_ENTER(0x39001E86u);
   4063 
   4064     goto L_39001E86;
   4065 L_39001E4F:
   4066     ecx = MEM32(esi + 0x10); /* 0x39001E4F: mov ecx, dword ptr [esi + 0x10] */
   4067     PUSH32(esp, ebx); /* 0x39001E52: push ebx */
   4068     PUSH32(esp, ecx); /* 0x39001E53: push ecx */
   4069     RECOMP_ICALL(MEM32(esi + 0xC)); /* 0x39001E54: call dword ptr [esi + 0xc] */
   4070     RECOMP_FLAGS_IN();
   4071     eax = MEM32(esi + 0x8); /* 0x39001E57: mov eax, dword ptr [esi + 8] */
   4072     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4073     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4074     esp = esp + 8; /* 0x39001E5A: add esp, 8 */
   4075     _flag_k = FK_ADD;
   4076     SET_LO8(ecx, MEM8(eax + 0x15)); /* 0x39001E5D: mov cl, byte ptr [eax + 0x15] */
   4077     /* test LO8(ecx), LO8(ecx) */ /* 0x39001E60: test cl, cl */
   4078     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   4079     _cf = 0;
   4080     _flag_k = FK_NARROW(FK_TEST, 24);
   4081     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001E6F; /* 0x39001E62: jne 0x39001e6f */
   4082 L_39001E64:
   4083     PUSH32(esp, eax); /* 0x39001E64: push eax */
   4084     RECOMP_ICALL(0x39006910u); /* 0x39001E65: call 0x39006910 */ /* not lifted */
   4085     RECOMP_FLAGS_IN();
   4086     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4087     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4088     esp = esp + 4; /* 0x39001E6A: add esp, 4 */
   4089     _flag_k = FK_ADD;
   4090     goto L_39001E86; /* 0x39001E6D: jmp 0x39001e86 */
   4091 L_39001E6F:
   4092     eax = MEM32(esi + 0x4); /* 0x39001E6F: mov eax, dword ptr [esi + 4] */
   4093     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39001E72: cmp esi, dword ptr [eax + 8] */
   4094     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   4095     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4096     _flag_k = FK_CMP;
   4097     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E81; /* 0x39001E75: jne 0x39001e81 */
   4098 L_39001E77:
   4099     esi = eax; /* 0x39001E77: mov esi, eax */
   4100     eax = MEM32(eax + 0x4); /* 0x39001E79: mov eax, dword ptr [eax + 4] */
   4101     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39001E7C: cmp esi, dword ptr [eax + 8] */
   4102     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   4103     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4104     _flag_k = FK_CMP;
   4105     RECOMP_BACKEDGE();
   4106     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E77; /* 0x39001E7F: je 0x39001e77 */
   4107 L_39001E81:
   4108     /* cmp MEM32(esi + 0x8), eax */ /* 0x39001E81: cmp dword ptr [esi + 8], eax */
   4109     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(eax);
   4110     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4111     _flag_k = FK_CMP;
   4112     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E88; /* 0x39001E84: je 0x39001e88 */
   4113 L_39001E86:
   4114     esi = eax; /* 0x39001E86: mov esi, eax */
   4115 L_39001E88:
   4116     edx = MEM32(edi + 0x28); /* 0x39001E88: mov edx, dword ptr [edi + 0x28] */
   4117     /* cmp esi, MEM32(edx + 0x4) */ /* 0x39001E8B: cmp esi, dword ptr [edx + 4] */
   4118     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edx + 0x4));
   4119     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4120     _flag_k = FK_CMP;
   4121     RECOMP_BACKEDGE();
   4122     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E4F; /* 0x39001E8E: jne 0x39001e4f */
   4123 L_39001E90:
   4124     ecx = MEM32(ebp + (-0xC)); /* 0x39001E90: mov ecx, dword ptr [ebp - 0xc] */
   4125     edi = POP32_VAL(esp); /* 0x39001E93: pop edi */
   4126     eax = ebx; /* 0x39001E94: mov eax, ebx */
   4127     esi = POP32_VAL(esp); /* 0x39001E96: pop esi */
   4128     ebx = POP32_VAL(esp); /* 0x39001E97: pop ebx */
   4129     MEM32(FS_BASE + (0)) = ecx; /* 0x39001E98: mov dword ptr fs:[0], ecx */
   4130     esp = ebp; /* 0x39001E9F: mov esp, ebp */
   4131     ebp = POP32_VAL(esp); /* 0x39001EA1: pop ebp */
   4132     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39001EA2: ret 0x10 */
   4133     RECOMP_REGS_OUT();
   4134 }
   4135 
   4136 void sub_39001E88(void) {
   4137     int _fpu_cmp = 0;
   4138     uint32_t _cf = 0;
   4139     int _df = 1;
   4140     uint32_t _flag_k = FK_NONE;
   4141     uint32_t _flag_a = 0, _flag_b = 0;
   4142     uint32_t _itail_tgt = 0;
   4143     RECOMP_REGS_LOCALS
   4144     RECOMP_ENTER(0x39001E88u);
   4145 
   4146     goto L_39001E88;
   4147 L_39001E4F:
   4148     ecx = MEM32(esi + 0x10); /* 0x39001E4F: mov ecx, dword ptr [esi + 0x10] */
   4149     PUSH32(esp, ebx); /* 0x39001E52: push ebx */
   4150     PUSH32(esp, ecx); /* 0x39001E53: push ecx */
   4151     RECOMP_ICALL(MEM32(esi + 0xC)); /* 0x39001E54: call dword ptr [esi + 0xc] */
   4152     RECOMP_FLAGS_IN();
   4153     eax = MEM32(esi + 0x8); /* 0x39001E57: mov eax, dword ptr [esi + 8] */
   4154     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4155     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4156     esp = esp + 8; /* 0x39001E5A: add esp, 8 */
   4157     _flag_k = FK_ADD;
   4158     SET_LO8(ecx, MEM8(eax + 0x15)); /* 0x39001E5D: mov cl, byte ptr [eax + 0x15] */
   4159     /* test LO8(ecx), LO8(ecx) */ /* 0x39001E60: test cl, cl */
   4160     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   4161     _cf = 0;
   4162     _flag_k = FK_NARROW(FK_TEST, 24);
   4163     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001E6F; /* 0x39001E62: jne 0x39001e6f */
   4164 L_39001E64:
   4165     PUSH32(esp, eax); /* 0x39001E64: push eax */
   4166     RECOMP_ICALL(0x39006910u); /* 0x39001E65: call 0x39006910 */ /* not lifted */
   4167     RECOMP_FLAGS_IN();
   4168     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4169     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4170     esp = esp + 4; /* 0x39001E6A: add esp, 4 */
   4171     _flag_k = FK_ADD;
   4172     goto L_39001E86; /* 0x39001E6D: jmp 0x39001e86 */
   4173 L_39001E6F:
   4174     eax = MEM32(esi + 0x4); /* 0x39001E6F: mov eax, dword ptr [esi + 4] */
   4175     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39001E72: cmp esi, dword ptr [eax + 8] */
   4176     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   4177     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4178     _flag_k = FK_CMP;
   4179     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E81; /* 0x39001E75: jne 0x39001e81 */
   4180 L_39001E77:
   4181     esi = eax; /* 0x39001E77: mov esi, eax */
   4182     eax = MEM32(eax + 0x4); /* 0x39001E79: mov eax, dword ptr [eax + 4] */
   4183     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39001E7C: cmp esi, dword ptr [eax + 8] */
   4184     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   4185     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4186     _flag_k = FK_CMP;
   4187     RECOMP_BACKEDGE();
   4188     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E77; /* 0x39001E7F: je 0x39001e77 */
   4189 L_39001E81:
   4190     /* cmp MEM32(esi + 0x8), eax */ /* 0x39001E81: cmp dword ptr [esi + 8], eax */
   4191     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(eax);
   4192     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4193     _flag_k = FK_CMP;
   4194     if (CMP_EQ(_flag_a, _flag_b)) goto L_39001E88; /* 0x39001E84: je 0x39001e88 */
   4195 L_39001E86:
   4196     esi = eax; /* 0x39001E86: mov esi, eax */
   4197 L_39001E88:
   4198     edx = MEM32(edi + 0x28); /* 0x39001E88: mov edx, dword ptr [edi + 0x28] */
   4199     /* cmp esi, MEM32(edx + 0x4) */ /* 0x39001E8B: cmp esi, dword ptr [edx + 4] */
   4200     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edx + 0x4));
   4201     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4202     _flag_k = FK_CMP;
   4203     RECOMP_BACKEDGE();
   4204     if (CMP_NE(_flag_a, _flag_b)) goto L_39001E4F; /* 0x39001E8E: jne 0x39001e4f */
   4205 L_39001E90:
   4206     ecx = MEM32(ebp + (-0xC)); /* 0x39001E90: mov ecx, dword ptr [ebp - 0xc] */
   4207     edi = POP32_VAL(esp); /* 0x39001E93: pop edi */
   4208     eax = ebx; /* 0x39001E94: mov eax, ebx */
   4209     esi = POP32_VAL(esp); /* 0x39001E96: pop esi */
   4210     ebx = POP32_VAL(esp); /* 0x39001E97: pop ebx */
   4211     MEM32(FS_BASE + (0)) = ecx; /* 0x39001E98: mov dword ptr fs:[0], ecx */
   4212     esp = ebp; /* 0x39001E9F: mov esp, ebp */
   4213     ebp = POP32_VAL(esp); /* 0x39001EA1: pop ebp */
   4214     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39001EA2: ret 0x10 */
   4215     RECOMP_REGS_OUT();
   4216 }
   4217 
   4218 void sub_39001EB0(void) {
   4219     int _fpu_cmp = 0;
   4220     uint32_t _cf = 0;
   4221     int _df = 1;
   4222     uint32_t _flag_k = FK_NONE;
   4223     uint32_t _flag_a = 0, _flag_b = 0;
   4224     uint32_t _itail_tgt = 0;
   4225     RECOMP_REGS_LOCALS
   4226     RECOMP_ENTER(0x39001EB0u);
   4227 
   4228 L_39001EB0:
   4229     PUSH32(esp, ebp); /* 0x39001EB0: push ebp */
   4230     ebp = esp; /* 0x39001EB1: mov ebp, esp */
   4231     PUSH32(esp, 0xFFFFFFFFu); /* 0x39001EB3: push -1 */
   4232     PUSH32(esp, 0x3900A529u); /* 0x39001EB5: push 0x3900a529 */
   4233     eax = MEM32(FS_BASE + (0)); /* 0x39001EBA: mov eax, dword ptr fs:[0] */
   4234     PUSH32(esp, eax); /* 0x39001EC0: push eax */
   4235     MEM32(FS_BASE + (0)) = esp; /* 0x39001EC1: mov dword ptr fs:[0], esp */
   4236     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu);
   4237     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4238     esp = esp - 0x1Cu; /* 0x39001EC8: sub esp, 0x1c */
   4239     _flag_k = FK_CMP;
   4240     PUSH32(esp, ebx); /* 0x39001ECB: push ebx */
   4241     PUSH32(esp, esi); /* 0x39001ECC: push esi */
   4242     PUSH32(esp, edi); /* 0x39001ECD: push edi */
   4243     MEM32(ebp + (-0x14)) = ecx; /* 0x39001ECE: mov dword ptr [ebp - 0x14], ecx */
   4244 L_39001ED1:
   4245     eax = MEM32(ebp + 0x10); /* 0x39001ED1: mov eax, dword ptr [ebp + 0x10] */
   4246     /* test eax, eax */ /* 0x39001ED4: test eax, eax */
   4247     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4248     _cf = 0;
   4249     _flag_k = FK_TEST;
   4250     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001EE0; /* 0x39001ED6: jne 0x39001ee0 */
   4251 L_39001ED8:
   4252     eax = MEM32(ecx + 0x34); /* 0x39001ED8: mov eax, dword ptr [ecx + 0x34] */
   4253     MEM32(ebp + (-0x10)) = eax; /* 0x39001EDB: mov dword ptr [ebp - 0x10], eax */
   4254     goto L_39001EF3; /* 0x39001EDE: jmp 0x39001ef3 */
   4255 L_39001EE0:
   4256     /* cmp eax, 2 */ /* 0x39001EE0: cmp eax, 2 */
   4257     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   4258     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4259     _flag_k = FK_CMP;
   4260     if (CMP_NE(_flag_a, _flag_b)) goto L_39001EED; /* 0x39001EE3: jne 0x39001eed */
   4261 L_39001EE5:
   4262     ecx = MEM32(ecx + 0x4C); /* 0x39001EE5: mov ecx, dword ptr [ecx + 0x4c] */
   4263     MEM32(ebp + (-0x10)) = ecx; /* 0x39001EE8: mov dword ptr [ebp - 0x10], ecx */
   4264     goto L_39001EF3; /* 0x39001EEB: jmp 0x39001ef3 */
   4265 L_39001EED:
   4266     edx = MEM32(ecx + 0x40); /* 0x39001EED: mov edx, dword ptr [ecx + 0x40] */
   4267     MEM32(ebp + (-0x10)) = edx; /* 0x39001EF0: mov dword ptr [ebp - 0x10], edx */
   4268 L_39001EF3:
   4269     SET_LO8(eax, MEM8(ebp + 0x17)); /* 0x39001EF3: mov al, byte ptr [ebp + 0x17] */
   4270     PUSH32(esp, 0); /* 0x39001EF6: push 0 */
   4271     ecx = ebp + (-0x28); /* 0x39001EF8: lea ecx, [ebp - 0x28] */
   4272     MEM8(ebp + (-0x28)) = (uint8_t)(LO8(eax)); /* 0x39001EFB: mov byte ptr [ebp - 0x28], al */
   4273     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001EFE: call dword ptr [0x3900b040] */
   4274     RECOMP_FLAGS_IN();
   4275     esi = MEM32(ebp + 0x8); /* 0x39001F04: mov esi, dword ptr [ebp + 8] */
   4276     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   4277     ecx = ecx | 0xFFFFFFFFu; /* 0x39001F07: or ecx, 0xffffffff */
   4278     _cf = 0;
   4279     _flag_k = FK_TEST;
   4280     edi = esi; /* 0x39001F0A: mov edi, esi */
   4281     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4282     eax = 0; /* 0x39001F0C: xor eax, eax */
   4283     _cf = 0;
   4284     _flag_k = FK_TEST;
   4285     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39001F0E: repne scasb al, byte ptr es:[edi] */
   4286     ecx = ~ecx; /* 0x39001F10: not ecx */
   4287     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   4288     ecx = ecx - 1; /* 0x39001F12: dec ecx */
   4289     _flag_k = FK_DEC;
   4290     PUSH32(esp, 1); /* 0x39001F13: push 1 */
   4291     ebx = ecx; /* 0x39001F15: mov ebx, ecx */
   4292     ecx = ebp + (-0x28); /* 0x39001F17: lea ecx, [ebp - 0x28] */
   4293     PUSH32(esp, ebx); /* 0x39001F1A: push ebx */
   4294     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39001F1B: call dword ptr [0x3900b034] */
   4295     RECOMP_FLAGS_IN();
   4296     /* test LO8(eax), LO8(eax) */ /* 0x39001F21: test al, al */
   4297     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   4298     _cf = 0;
   4299     _flag_k = FK_NARROW(FK_TEST, 24);
   4300     if (TEST_Z(_flag_a, _flag_b)) goto L_39001F45; /* 0x39001F23: je 0x39001f45 */
   4301 L_39001F25:
   4302     edi = MEM32(ebp + (-0x24)); /* 0x39001F25: mov edi, dword ptr [ebp - 0x24] */
   4303     ecx = ebx; /* 0x39001F28: mov ecx, ebx */
   4304     edx = ecx; /* 0x39001F2A: mov edx, ecx */
   4305     PUSH32(esp, ebx); /* 0x39001F2C: push ebx */
   4306     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39001F2D: shr ecx, 2 */
   4307     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4308     ecx = ecx >> 2u; /* 0x39001F2D: shr ecx, 2 */
   4309     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39001F30: 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; }
   4310     ecx = edx; /* 0x39001F32: mov ecx, edx */
   4311     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   4312     ecx = ecx & 3; /* 0x39001F34: and ecx, 3 */
   4313     _cf = 0;
   4314     _flag_k = FK_TEST;
   4315     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39001F37: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   4316     ecx = ebp + (-0x28); /* 0x39001F39: lea ecx, [ebp - 0x28] */
   4317     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39001F3C: call dword ptr [0x3900b038] */
   4318     RECOMP_FLAGS_IN();
   4319     esi = MEM32(ebp + 0x8); /* 0x39001F42: mov esi, dword ptr [ebp + 8] */
   4320 L_39001F45:
   4321     ebx = MEM32(ebp + (-0x10)); /* 0x39001F45: mov ebx, dword ptr [ebp - 0x10] */
   4322     eax = ebp + (-0x28); /* 0x39001F48: lea eax, [ebp - 0x28] */
   4323     ecx = ebp + (-0x18); /* 0x39001F4B: lea ecx, [ebp - 0x18] */
   4324     PUSH32(esp, eax); /* 0x39001F4E: push eax */
   4325     PUSH32(esp, ecx); /* 0x39001F4F: push ecx */
   4326     ecx = ebx; /* 0x39001F50: mov ecx, ebx */
   4327     MEM32(ebp + (-0x4)) = 0; /* 0x39001F52: mov dword ptr [ebp - 4], 0 */
   4328     RECOMP_ICALL(0x390049E0u); /* 0x39001F59: call 0x390049e0 */ /* not lifted */
   4329     RECOMP_FLAGS_IN();
   4330     edi = MEM32(eax); /* 0x39001F5E: mov edi, dword ptr [eax] */
   4331     PUSH32(esp, 1); /* 0x39001F60: push 1 */
   4332     ecx = ebp + (-0x28); /* 0x39001F62: lea ecx, [ebp - 0x28] */
   4333     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39001F65: mov dword ptr [ebp - 4], 0xffffffff */
   4334     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001F6C: call dword ptr [0x3900b040] */
   4335     RECOMP_FLAGS_IN();
   4336     /* cmp edi, MEM32(ebx + 0x4) */ /* 0x39001F72: cmp edi, dword ptr [ebx + 4] */
   4337     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebx + 0x4));
   4338     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4339     _flag_k = FK_CMP;
   4340     if (CMP_NE(_flag_a, _flag_b)) goto L_39001F9A; /* 0x39001F75: jne 0x39001f9a */
   4341 L_39001F77:
   4342     edx = MEM32(ebp + 0x10); /* 0x39001F77: mov edx, dword ptr [ebp + 0x10] */
   4343     eax = MEM32(ebp + 0xC); /* 0x39001F7A: mov eax, dword ptr [ebp + 0xc] */
   4344     ecx = MEM32(ebp + (-0x14)); /* 0x39001F7D: mov ecx, dword ptr [ebp - 0x14] */
   4345     PUSH32(esp, edx); /* 0x39001F80: push edx */
   4346     PUSH32(esp, 0x7F7FFFFFu); /* 0x39001F81: push 0x7f7fffff */
   4347     PUSH32(esp, 0xFF7FFFFFu); /* 0x39001F86: push 0xff7fffff */
   4348     PUSH32(esp, eax); /* 0x39001F8B: push eax */
   4349     PUSH32(esp, esi); /* 0x39001F8C: push esi */
   4350     RECOMP_ICALL(0x39002760u); /* 0x39001F8D: call 0x39002760 */ /* not lifted */
   4351     RECOMP_FLAGS_IN();
   4352     ecx = MEM32(ebp + (-0x14)); /* 0x39001F92: mov ecx, dword ptr [ebp - 0x14] */
   4353     RECOMP_BACKEDGE();
   4354     goto L_39001ED1; /* 0x39001F95: jmp 0x39001ed1 */
   4355 L_39001F9A:
   4356     fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x39001F9A: fld dword ptr [ebp + 0xc] */
   4357     _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edi + 0x20)); /* 0x39001F9D: fcomp dword ptr [edi + 0x20] */
   4358     fp_pop();
   4359     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x39001FA0: fnstsw ax */
   4360     /* test HI8(eax), 1 */ /* 0x39001FA2: test ah, 1 */
   4361     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
   4362     _cf = 0;
   4363     _flag_k = FK_NARROW(FK_TEST, 24);
   4364     if (TEST_Z(_flag_a, _flag_b)) goto L_39001FAD; /* 0x39001FA5: je 0x39001fad */
   4365 L_39001FA7:
   4366     ecx = MEM32(edi + 0x20); /* 0x39001FA7: mov ecx, dword ptr [edi + 0x20] */
   4367     MEM32(ebp + 0xC) = ecx; /* 0x39001FAA: mov dword ptr [ebp + 0xc], ecx */
   4368 L_39001FAD:
   4369     fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x39001FAD: fld dword ptr [ebp + 0xc] */
   4370     _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edi + 0x24)); /* 0x39001FB0: fcomp dword ptr [edi + 0x24] */
   4371     fp_pop();
   4372     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x39001FB3: fnstsw ax */
   4373     /* test HI8(eax), 0x41u */ /* 0x39001FB5: test ah, 0x41 */
   4374     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24;
   4375     _cf = 0;
   4376     _flag_k = FK_NARROW(FK_TEST, 24);
   4377     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001FC0; /* 0x39001FB8: jne 0x39001fc0 */
   4378 L_39001FBA:
   4379     edx = MEM32(edi + 0x24); /* 0x39001FBA: mov edx, dword ptr [edi + 0x24] */
   4380     MEM32(ebp + 0xC) = edx; /* 0x39001FBD: mov dword ptr [ebp + 0xc], edx */
   4381 L_39001FC0:
   4382     eax = MEM32(ebp + 0xC); /* 0x39001FC0: mov eax, dword ptr [ebp + 0xc] */
   4383     MEM32(edi + 0x1C) = eax; /* 0x39001FC3: mov dword ptr [edi + 0x1c], eax */
   4384     SET_LO8(eax, MEM8(ebp + 0x14)); /* 0x39001FC6: mov al, byte ptr [ebp + 0x14] */
   4385     /* test LO8(eax), LO8(eax) */ /* 0x39001FC9: test al, al */
   4386     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   4387     _cf = 0;
   4388     _flag_k = FK_NARROW(FK_TEST, 24);
   4389     if (TEST_Z(_flag_a, _flag_b)) goto L_39002021; /* 0x39001FCB: je 0x39002021 */
   4390 L_39001FCD:
   4391     eax = MEM32(edi + 0x28); /* 0x39001FCD: mov eax, dword ptr [edi + 0x28] */
   4392     /* test eax, eax */ /* 0x39001FD0: test eax, eax */
   4393     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4394     _cf = 0;
   4395     _flag_k = FK_TEST;
   4396     if (TEST_Z(_flag_a, _flag_b)) goto L_39002021; /* 0x39001FD2: je 0x39002021 */
   4397 L_39001FD4:
   4398     eax = MEM32(eax + 0x4); /* 0x39001FD4: mov eax, dword ptr [eax + 4] */
   4399     esi = MEM32(eax); /* 0x39001FD7: mov esi, dword ptr [eax] */
   4400     /* cmp esi, eax */ /* 0x39001FD9: cmp esi, eax */
   4401     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   4402     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4403     _flag_k = FK_CMP;
   4404     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002021; /* 0x39001FDB: je 0x39002021 */
   4405 L_39001FDD:
   4406     ecx = MEM32(ebp + 0xC); /* 0x39001FDD: mov ecx, dword ptr [ebp + 0xc] */
   4407     edx = MEM32(esi + 0x10); /* 0x39001FE0: mov edx, dword ptr [esi + 0x10] */
   4408     PUSH32(esp, ecx); /* 0x39001FE3: push ecx */
   4409     PUSH32(esp, edx); /* 0x39001FE4: push edx */
   4410     RECOMP_ICALL(MEM32(esi + 0xC)); /* 0x39001FE5: call dword ptr [esi + 0xc] */
   4411     RECOMP_FLAGS_IN();
   4412     eax = MEM32(esi + 0x8); /* 0x39001FE8: mov eax, dword ptr [esi + 8] */
   4413     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4414     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4415     esp = esp + 8; /* 0x39001FEB: add esp, 8 */
   4416     _flag_k = FK_ADD;
   4417     SET_LO8(ecx, MEM8(eax + 0x15)); /* 0x39001FEE: mov cl, byte ptr [eax + 0x15] */
   4418     /* test LO8(ecx), LO8(ecx) */ /* 0x39001FF1: test cl, cl */
   4419     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   4420     _cf = 0;
   4421     _flag_k = FK_NARROW(FK_TEST, 24);
   4422     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002000; /* 0x39001FF3: jne 0x39002000 */
   4423 L_39001FF5:
   4424     PUSH32(esp, eax); /* 0x39001FF5: push eax */
   4425     RECOMP_ICALL(0x39006910u); /* 0x39001FF6: call 0x39006910 */ /* not lifted */
   4426     RECOMP_FLAGS_IN();
   4427     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4428     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4429     esp = esp + 4; /* 0x39001FFB: add esp, 4 */
   4430     _flag_k = FK_ADD;
   4431     goto L_39002017; /* 0x39001FFE: jmp 0x39002017 */
   4432 L_39002000:
   4433     eax = MEM32(esi + 0x4); /* 0x39002000: mov eax, dword ptr [esi + 4] */
   4434     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39002003: cmp esi, dword ptr [eax + 8] */
   4435     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   4436     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4437     _flag_k = FK_CMP;
   4438     if (CMP_NE(_flag_a, _flag_b)) goto L_39002012; /* 0x39002006: jne 0x39002012 */
   4439 L_39002008:
   4440     esi = eax; /* 0x39002008: mov esi, eax */
   4441     eax = MEM32(eax + 0x4); /* 0x3900200A: mov eax, dword ptr [eax + 4] */
   4442     /* cmp esi, MEM32(eax + 0x8) */ /* 0x3900200D: cmp esi, dword ptr [eax + 8] */
   4443     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   4444     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4445     _flag_k = FK_CMP;
   4446     RECOMP_BACKEDGE();
   4447     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002008; /* 0x39002010: je 0x39002008 */
   4448 L_39002012:
   4449     /* cmp MEM32(esi + 0x8), eax */ /* 0x39002012: cmp dword ptr [esi + 8], eax */
   4450     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(eax);
   4451     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4452     _flag_k = FK_CMP;
   4453     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002019; /* 0x39002015: je 0x39002019 */
   4454 L_39002017:
   4455     esi = eax; /* 0x39002017: mov esi, eax */
   4456 L_39002019:
   4457     eax = MEM32(edi + 0x28); /* 0x39002019: mov eax, dword ptr [edi + 0x28] */
   4458     /* cmp esi, MEM32(eax + 0x4) */ /* 0x3900201C: cmp esi, dword ptr [eax + 4] */
   4459     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x4));
   4460     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4461     _flag_k = FK_CMP;
   4462     RECOMP_BACKEDGE();
   4463     if (CMP_NE(_flag_a, _flag_b)) goto L_39001FDD; /* 0x3900201F: jne 0x39001fdd */
   4464 L_39002021:
   4465     ecx = MEM32(ebp + (-0xC)); /* 0x39002021: mov ecx, dword ptr [ebp - 0xc] */
   4466     edi = POP32_VAL(esp); /* 0x39002024: pop edi */
   4467     fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x39002025: fld dword ptr [ebp + 0xc] */
   4468     esi = POP32_VAL(esp); /* 0x39002028: pop esi */
   4469     ebx = POP32_VAL(esp); /* 0x39002029: pop ebx */
   4470     MEM32(FS_BASE + (0)) = ecx; /* 0x3900202A: mov dword ptr fs:[0], ecx */
   4471     esp = ebp; /* 0x39002031: mov esp, ebp */
   4472     ebp = POP32_VAL(esp); /* 0x39002033: pop ebp */
   4473     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39002034: ret 0x10 */
   4474     RECOMP_REGS_OUT();
   4475 }
   4476 
   4477 void sub_39001ED1(void) {
   4478     int _fpu_cmp = 0;
   4479     uint32_t _cf = 0;
   4480     int _df = 1;
   4481     uint32_t _flag_k = FK_NONE;
   4482     uint32_t _flag_a = 0, _flag_b = 0;
   4483     uint32_t _itail_tgt = 0;
   4484     RECOMP_REGS_LOCALS
   4485     RECOMP_ENTER(0x39001ED1u);
   4486 
   4487 L_39001ED1:
   4488     eax = MEM32(ebp + 0x10); /* 0x39001ED1: mov eax, dword ptr [ebp + 0x10] */
   4489     /* test eax, eax */ /* 0x39001ED4: test eax, eax */
   4490     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4491     _cf = 0;
   4492     _flag_k = FK_TEST;
   4493     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001EE0; /* 0x39001ED6: jne 0x39001ee0 */
   4494 L_39001ED8:
   4495     eax = MEM32(ecx + 0x34); /* 0x39001ED8: mov eax, dword ptr [ecx + 0x34] */
   4496     MEM32(ebp + (-0x10)) = eax; /* 0x39001EDB: mov dword ptr [ebp - 0x10], eax */
   4497     goto L_39001EF3; /* 0x39001EDE: jmp 0x39001ef3 */
   4498 L_39001EE0:
   4499     /* cmp eax, 2 */ /* 0x39001EE0: cmp eax, 2 */
   4500     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   4501     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4502     _flag_k = FK_CMP;
   4503     if (CMP_NE(_flag_a, _flag_b)) goto L_39001EED; /* 0x39001EE3: jne 0x39001eed */
   4504 L_39001EE5:
   4505     ecx = MEM32(ecx + 0x4C); /* 0x39001EE5: mov ecx, dword ptr [ecx + 0x4c] */
   4506     MEM32(ebp + (-0x10)) = ecx; /* 0x39001EE8: mov dword ptr [ebp - 0x10], ecx */
   4507     goto L_39001EF3; /* 0x39001EEB: jmp 0x39001ef3 */
   4508 L_39001EED:
   4509     edx = MEM32(ecx + 0x40); /* 0x39001EED: mov edx, dword ptr [ecx + 0x40] */
   4510     MEM32(ebp + (-0x10)) = edx; /* 0x39001EF0: mov dword ptr [ebp - 0x10], edx */
   4511 L_39001EF3:
   4512     SET_LO8(eax, MEM8(ebp + 0x17)); /* 0x39001EF3: mov al, byte ptr [ebp + 0x17] */
   4513     PUSH32(esp, 0); /* 0x39001EF6: push 0 */
   4514     ecx = ebp + (-0x28); /* 0x39001EF8: lea ecx, [ebp - 0x28] */
   4515     MEM8(ebp + (-0x28)) = (uint8_t)(LO8(eax)); /* 0x39001EFB: mov byte ptr [ebp - 0x28], al */
   4516     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001EFE: call dword ptr [0x3900b040] */
   4517     RECOMP_FLAGS_IN();
   4518     esi = MEM32(ebp + 0x8); /* 0x39001F04: mov esi, dword ptr [ebp + 8] */
   4519     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   4520     ecx = ecx | 0xFFFFFFFFu; /* 0x39001F07: or ecx, 0xffffffff */
   4521     _cf = 0;
   4522     _flag_k = FK_TEST;
   4523     edi = esi; /* 0x39001F0A: mov edi, esi */
   4524     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4525     eax = 0; /* 0x39001F0C: xor eax, eax */
   4526     _cf = 0;
   4527     _flag_k = FK_TEST;
   4528     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39001F0E: repne scasb al, byte ptr es:[edi] */
   4529     ecx = ~ecx; /* 0x39001F10: not ecx */
   4530     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   4531     ecx = ecx - 1; /* 0x39001F12: dec ecx */
   4532     _flag_k = FK_DEC;
   4533     PUSH32(esp, 1); /* 0x39001F13: push 1 */
   4534     ebx = ecx; /* 0x39001F15: mov ebx, ecx */
   4535     ecx = ebp + (-0x28); /* 0x39001F17: lea ecx, [ebp - 0x28] */
   4536     PUSH32(esp, ebx); /* 0x39001F1A: push ebx */
   4537     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39001F1B: call dword ptr [0x3900b034] */
   4538     RECOMP_FLAGS_IN();
   4539     /* test LO8(eax), LO8(eax) */ /* 0x39001F21: test al, al */
   4540     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   4541     _cf = 0;
   4542     _flag_k = FK_NARROW(FK_TEST, 24);
   4543     if (TEST_Z(_flag_a, _flag_b)) goto L_39001F45; /* 0x39001F23: je 0x39001f45 */
   4544 L_39001F25:
   4545     edi = MEM32(ebp + (-0x24)); /* 0x39001F25: mov edi, dword ptr [ebp - 0x24] */
   4546     ecx = ebx; /* 0x39001F28: mov ecx, ebx */
   4547     edx = ecx; /* 0x39001F2A: mov edx, ecx */
   4548     PUSH32(esp, ebx); /* 0x39001F2C: push ebx */
   4549     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39001F2D: shr ecx, 2 */
   4550     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4551     ecx = ecx >> 2u; /* 0x39001F2D: shr ecx, 2 */
   4552     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39001F30: 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; }
   4553     ecx = edx; /* 0x39001F32: mov ecx, edx */
   4554     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   4555     ecx = ecx & 3; /* 0x39001F34: and ecx, 3 */
   4556     _cf = 0;
   4557     _flag_k = FK_TEST;
   4558     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39001F37: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   4559     ecx = ebp + (-0x28); /* 0x39001F39: lea ecx, [ebp - 0x28] */
   4560     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39001F3C: call dword ptr [0x3900b038] */
   4561     RECOMP_FLAGS_IN();
   4562     esi = MEM32(ebp + 0x8); /* 0x39001F42: mov esi, dword ptr [ebp + 8] */
   4563 L_39001F45:
   4564     ebx = MEM32(ebp + (-0x10)); /* 0x39001F45: mov ebx, dword ptr [ebp - 0x10] */
   4565     eax = ebp + (-0x28); /* 0x39001F48: lea eax, [ebp - 0x28] */
   4566     ecx = ebp + (-0x18); /* 0x39001F4B: lea ecx, [ebp - 0x18] */
   4567     PUSH32(esp, eax); /* 0x39001F4E: push eax */
   4568     PUSH32(esp, ecx); /* 0x39001F4F: push ecx */
   4569     ecx = ebx; /* 0x39001F50: mov ecx, ebx */
   4570     MEM32(ebp + (-0x4)) = 0; /* 0x39001F52: mov dword ptr [ebp - 4], 0 */
   4571     RECOMP_ICALL(0x390049E0u); /* 0x39001F59: call 0x390049e0 */ /* not lifted */
   4572     RECOMP_FLAGS_IN();
   4573     edi = MEM32(eax); /* 0x39001F5E: mov edi, dword ptr [eax] */
   4574     PUSH32(esp, 1); /* 0x39001F60: push 1 */
   4575     ecx = ebp + (-0x28); /* 0x39001F62: lea ecx, [ebp - 0x28] */
   4576     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39001F65: mov dword ptr [ebp - 4], 0xffffffff */
   4577     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001F6C: call dword ptr [0x3900b040] */
   4578     RECOMP_FLAGS_IN();
   4579     /* cmp edi, MEM32(ebx + 0x4) */ /* 0x39001F72: cmp edi, dword ptr [ebx + 4] */
   4580     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebx + 0x4));
   4581     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4582     _flag_k = FK_CMP;
   4583     if (CMP_NE(_flag_a, _flag_b)) goto L_39001F9A; /* 0x39001F75: jne 0x39001f9a */
   4584 L_39001F77:
   4585     edx = MEM32(ebp + 0x10); /* 0x39001F77: mov edx, dword ptr [ebp + 0x10] */
   4586     eax = MEM32(ebp + 0xC); /* 0x39001F7A: mov eax, dword ptr [ebp + 0xc] */
   4587     ecx = MEM32(ebp + (-0x14)); /* 0x39001F7D: mov ecx, dword ptr [ebp - 0x14] */
   4588     PUSH32(esp, edx); /* 0x39001F80: push edx */
   4589     PUSH32(esp, 0x7F7FFFFFu); /* 0x39001F81: push 0x7f7fffff */
   4590     PUSH32(esp, 0xFF7FFFFFu); /* 0x39001F86: push 0xff7fffff */
   4591     PUSH32(esp, eax); /* 0x39001F8B: push eax */
   4592     PUSH32(esp, esi); /* 0x39001F8C: push esi */
   4593     RECOMP_ICALL(0x39002760u); /* 0x39001F8D: call 0x39002760 */ /* not lifted */
   4594     RECOMP_FLAGS_IN();
   4595     ecx = MEM32(ebp + (-0x14)); /* 0x39001F92: mov ecx, dword ptr [ebp - 0x14] */
   4596     RECOMP_BACKEDGE();
   4597     goto L_39001ED1; /* 0x39001F95: jmp 0x39001ed1 */
   4598 L_39001F9A:
   4599     fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x39001F9A: fld dword ptr [ebp + 0xc] */
   4600     _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edi + 0x20)); /* 0x39001F9D: fcomp dword ptr [edi + 0x20] */
   4601     fp_pop();
   4602     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x39001FA0: fnstsw ax */
   4603     /* test HI8(eax), 1 */ /* 0x39001FA2: test ah, 1 */
   4604     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
   4605     _cf = 0;
   4606     _flag_k = FK_NARROW(FK_TEST, 24);
   4607     if (TEST_Z(_flag_a, _flag_b)) goto L_39001FAD; /* 0x39001FA5: je 0x39001fad */
   4608 L_39001FA7:
   4609     ecx = MEM32(edi + 0x20); /* 0x39001FA7: mov ecx, dword ptr [edi + 0x20] */
   4610     MEM32(ebp + 0xC) = ecx; /* 0x39001FAA: mov dword ptr [ebp + 0xc], ecx */
   4611 L_39001FAD:
   4612     fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x39001FAD: fld dword ptr [ebp + 0xc] */
   4613     _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edi + 0x24)); /* 0x39001FB0: fcomp dword ptr [edi + 0x24] */
   4614     fp_pop();
   4615     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x39001FB3: fnstsw ax */
   4616     /* test HI8(eax), 0x41u */ /* 0x39001FB5: test ah, 0x41 */
   4617     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24;
   4618     _cf = 0;
   4619     _flag_k = FK_NARROW(FK_TEST, 24);
   4620     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001FC0; /* 0x39001FB8: jne 0x39001fc0 */
   4621 L_39001FBA:
   4622     edx = MEM32(edi + 0x24); /* 0x39001FBA: mov edx, dword ptr [edi + 0x24] */
   4623     MEM32(ebp + 0xC) = edx; /* 0x39001FBD: mov dword ptr [ebp + 0xc], edx */
   4624 L_39001FC0:
   4625     eax = MEM32(ebp + 0xC); /* 0x39001FC0: mov eax, dword ptr [ebp + 0xc] */
   4626     MEM32(edi + 0x1C) = eax; /* 0x39001FC3: mov dword ptr [edi + 0x1c], eax */
   4627     SET_LO8(eax, MEM8(ebp + 0x14)); /* 0x39001FC6: mov al, byte ptr [ebp + 0x14] */
   4628     /* test LO8(eax), LO8(eax) */ /* 0x39001FC9: test al, al */
   4629     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   4630     _cf = 0;
   4631     _flag_k = FK_NARROW(FK_TEST, 24);
   4632     if (TEST_Z(_flag_a, _flag_b)) goto L_39002021; /* 0x39001FCB: je 0x39002021 */
   4633 L_39001FCD:
   4634     eax = MEM32(edi + 0x28); /* 0x39001FCD: mov eax, dword ptr [edi + 0x28] */
   4635     /* test eax, eax */ /* 0x39001FD0: test eax, eax */
   4636     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4637     _cf = 0;
   4638     _flag_k = FK_TEST;
   4639     if (TEST_Z(_flag_a, _flag_b)) goto L_39002021; /* 0x39001FD2: je 0x39002021 */
   4640 L_39001FD4:
   4641     eax = MEM32(eax + 0x4); /* 0x39001FD4: mov eax, dword ptr [eax + 4] */
   4642     esi = MEM32(eax); /* 0x39001FD7: mov esi, dword ptr [eax] */
   4643     /* cmp esi, eax */ /* 0x39001FD9: cmp esi, eax */
   4644     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   4645     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4646     _flag_k = FK_CMP;
   4647     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002021; /* 0x39001FDB: je 0x39002021 */
   4648 L_39001FDD:
   4649     ecx = MEM32(ebp + 0xC); /* 0x39001FDD: mov ecx, dword ptr [ebp + 0xc] */
   4650     edx = MEM32(esi + 0x10); /* 0x39001FE0: mov edx, dword ptr [esi + 0x10] */
   4651     PUSH32(esp, ecx); /* 0x39001FE3: push ecx */
   4652     PUSH32(esp, edx); /* 0x39001FE4: push edx */
   4653     RECOMP_ICALL(MEM32(esi + 0xC)); /* 0x39001FE5: call dword ptr [esi + 0xc] */
   4654     RECOMP_FLAGS_IN();
   4655     eax = MEM32(esi + 0x8); /* 0x39001FE8: mov eax, dword ptr [esi + 8] */
   4656     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4657     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4658     esp = esp + 8; /* 0x39001FEB: add esp, 8 */
   4659     _flag_k = FK_ADD;
   4660     SET_LO8(ecx, MEM8(eax + 0x15)); /* 0x39001FEE: mov cl, byte ptr [eax + 0x15] */
   4661     /* test LO8(ecx), LO8(ecx) */ /* 0x39001FF1: test cl, cl */
   4662     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   4663     _cf = 0;
   4664     _flag_k = FK_NARROW(FK_TEST, 24);
   4665     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002000; /* 0x39001FF3: jne 0x39002000 */
   4666 L_39001FF5:
   4667     PUSH32(esp, eax); /* 0x39001FF5: push eax */
   4668     RECOMP_ICALL(0x39006910u); /* 0x39001FF6: call 0x39006910 */ /* not lifted */
   4669     RECOMP_FLAGS_IN();
   4670     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4671     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4672     esp = esp + 4; /* 0x39001FFB: add esp, 4 */
   4673     _flag_k = FK_ADD;
   4674     goto L_39002017; /* 0x39001FFE: jmp 0x39002017 */
   4675 L_39002000:
   4676     eax = MEM32(esi + 0x4); /* 0x39002000: mov eax, dword ptr [esi + 4] */
   4677     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39002003: cmp esi, dword ptr [eax + 8] */
   4678     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   4679     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4680     _flag_k = FK_CMP;
   4681     if (CMP_NE(_flag_a, _flag_b)) goto L_39002012; /* 0x39002006: jne 0x39002012 */
   4682 L_39002008:
   4683     esi = eax; /* 0x39002008: mov esi, eax */
   4684     eax = MEM32(eax + 0x4); /* 0x3900200A: mov eax, dword ptr [eax + 4] */
   4685     /* cmp esi, MEM32(eax + 0x8) */ /* 0x3900200D: cmp esi, dword ptr [eax + 8] */
   4686     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   4687     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4688     _flag_k = FK_CMP;
   4689     RECOMP_BACKEDGE();
   4690     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002008; /* 0x39002010: je 0x39002008 */
   4691 L_39002012:
   4692     /* cmp MEM32(esi + 0x8), eax */ /* 0x39002012: cmp dword ptr [esi + 8], eax */
   4693     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(eax);
   4694     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4695     _flag_k = FK_CMP;
   4696     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002019; /* 0x39002015: je 0x39002019 */
   4697 L_39002017:
   4698     esi = eax; /* 0x39002017: mov esi, eax */
   4699 L_39002019:
   4700     eax = MEM32(edi + 0x28); /* 0x39002019: mov eax, dword ptr [edi + 0x28] */
   4701     /* cmp esi, MEM32(eax + 0x4) */ /* 0x3900201C: cmp esi, dword ptr [eax + 4] */
   4702     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x4));
   4703     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4704     _flag_k = FK_CMP;
   4705     RECOMP_BACKEDGE();
   4706     if (CMP_NE(_flag_a, _flag_b)) goto L_39001FDD; /* 0x3900201F: jne 0x39001fdd */
   4707 L_39002021:
   4708     ecx = MEM32(ebp + (-0xC)); /* 0x39002021: mov ecx, dword ptr [ebp - 0xc] */
   4709     edi = POP32_VAL(esp); /* 0x39002024: pop edi */
   4710     fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x39002025: fld dword ptr [ebp + 0xc] */
   4711     esi = POP32_VAL(esp); /* 0x39002028: pop esi */
   4712     ebx = POP32_VAL(esp); /* 0x39002029: pop ebx */
   4713     MEM32(FS_BASE + (0)) = ecx; /* 0x3900202A: mov dword ptr fs:[0], ecx */
   4714     esp = ebp; /* 0x39002031: mov esp, ebp */
   4715     ebp = POP32_VAL(esp); /* 0x39002033: pop ebp */
   4716     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39002034: ret 0x10 */
   4717     RECOMP_REGS_OUT();
   4718 }
   4719 
   4720 void sub_39001EF3(void) {
   4721     int _fpu_cmp = 0;
   4722     uint32_t _cf = 0;
   4723     int _df = 1;
   4724     uint32_t _flag_k = FK_NONE;
   4725     uint32_t _flag_a = 0, _flag_b = 0;
   4726     uint32_t _itail_tgt = 0;
   4727     RECOMP_REGS_LOCALS
   4728     RECOMP_ENTER(0x39001EF3u);
   4729 
   4730     goto L_39001EF3;
   4731 L_39001ED1:
   4732     eax = MEM32(ebp + 0x10); /* 0x39001ED1: mov eax, dword ptr [ebp + 0x10] */
   4733     /* test eax, eax */ /* 0x39001ED4: test eax, eax */
   4734     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4735     _cf = 0;
   4736     _flag_k = FK_TEST;
   4737     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001EE0; /* 0x39001ED6: jne 0x39001ee0 */
   4738 L_39001ED8:
   4739     eax = MEM32(ecx + 0x34); /* 0x39001ED8: mov eax, dword ptr [ecx + 0x34] */
   4740     MEM32(ebp + (-0x10)) = eax; /* 0x39001EDB: mov dword ptr [ebp - 0x10], eax */
   4741     goto L_39001EF3; /* 0x39001EDE: jmp 0x39001ef3 */
   4742 L_39001EE0:
   4743     /* cmp eax, 2 */ /* 0x39001EE0: cmp eax, 2 */
   4744     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   4745     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4746     _flag_k = FK_CMP;
   4747     if (CMP_NE(_flag_a, _flag_b)) goto L_39001EED; /* 0x39001EE3: jne 0x39001eed */
   4748 L_39001EE5:
   4749     ecx = MEM32(ecx + 0x4C); /* 0x39001EE5: mov ecx, dword ptr [ecx + 0x4c] */
   4750     MEM32(ebp + (-0x10)) = ecx; /* 0x39001EE8: mov dword ptr [ebp - 0x10], ecx */
   4751     goto L_39001EF3; /* 0x39001EEB: jmp 0x39001ef3 */
   4752 L_39001EED:
   4753     edx = MEM32(ecx + 0x40); /* 0x39001EED: mov edx, dword ptr [ecx + 0x40] */
   4754     MEM32(ebp + (-0x10)) = edx; /* 0x39001EF0: mov dword ptr [ebp - 0x10], edx */
   4755 L_39001EF3:
   4756     SET_LO8(eax, MEM8(ebp + 0x17)); /* 0x39001EF3: mov al, byte ptr [ebp + 0x17] */
   4757     PUSH32(esp, 0); /* 0x39001EF6: push 0 */
   4758     ecx = ebp + (-0x28); /* 0x39001EF8: lea ecx, [ebp - 0x28] */
   4759     MEM8(ebp + (-0x28)) = (uint8_t)(LO8(eax)); /* 0x39001EFB: mov byte ptr [ebp - 0x28], al */
   4760     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001EFE: call dword ptr [0x3900b040] */
   4761     RECOMP_FLAGS_IN();
   4762     esi = MEM32(ebp + 0x8); /* 0x39001F04: mov esi, dword ptr [ebp + 8] */
   4763     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   4764     ecx = ecx | 0xFFFFFFFFu; /* 0x39001F07: or ecx, 0xffffffff */
   4765     _cf = 0;
   4766     _flag_k = FK_TEST;
   4767     edi = esi; /* 0x39001F0A: mov edi, esi */
   4768     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4769     eax = 0; /* 0x39001F0C: xor eax, eax */
   4770     _cf = 0;
   4771     _flag_k = FK_TEST;
   4772     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39001F0E: repne scasb al, byte ptr es:[edi] */
   4773     ecx = ~ecx; /* 0x39001F10: not ecx */
   4774     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   4775     ecx = ecx - 1; /* 0x39001F12: dec ecx */
   4776     _flag_k = FK_DEC;
   4777     PUSH32(esp, 1); /* 0x39001F13: push 1 */
   4778     ebx = ecx; /* 0x39001F15: mov ebx, ecx */
   4779     ecx = ebp + (-0x28); /* 0x39001F17: lea ecx, [ebp - 0x28] */
   4780     PUSH32(esp, ebx); /* 0x39001F1A: push ebx */
   4781     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39001F1B: call dword ptr [0x3900b034] */
   4782     RECOMP_FLAGS_IN();
   4783     /* test LO8(eax), LO8(eax) */ /* 0x39001F21: test al, al */
   4784     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   4785     _cf = 0;
   4786     _flag_k = FK_NARROW(FK_TEST, 24);
   4787     if (TEST_Z(_flag_a, _flag_b)) goto L_39001F45; /* 0x39001F23: je 0x39001f45 */
   4788 L_39001F25:
   4789     edi = MEM32(ebp + (-0x24)); /* 0x39001F25: mov edi, dword ptr [ebp - 0x24] */
   4790     ecx = ebx; /* 0x39001F28: mov ecx, ebx */
   4791     edx = ecx; /* 0x39001F2A: mov edx, ecx */
   4792     PUSH32(esp, ebx); /* 0x39001F2C: push ebx */
   4793     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39001F2D: shr ecx, 2 */
   4794     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4795     ecx = ecx >> 2u; /* 0x39001F2D: shr ecx, 2 */
   4796     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39001F30: 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; }
   4797     ecx = edx; /* 0x39001F32: mov ecx, edx */
   4798     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   4799     ecx = ecx & 3; /* 0x39001F34: and ecx, 3 */
   4800     _cf = 0;
   4801     _flag_k = FK_TEST;
   4802     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39001F37: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   4803     ecx = ebp + (-0x28); /* 0x39001F39: lea ecx, [ebp - 0x28] */
   4804     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39001F3C: call dword ptr [0x3900b038] */
   4805     RECOMP_FLAGS_IN();
   4806     esi = MEM32(ebp + 0x8); /* 0x39001F42: mov esi, dword ptr [ebp + 8] */
   4807 L_39001F45:
   4808     ebx = MEM32(ebp + (-0x10)); /* 0x39001F45: mov ebx, dword ptr [ebp - 0x10] */
   4809     eax = ebp + (-0x28); /* 0x39001F48: lea eax, [ebp - 0x28] */
   4810     ecx = ebp + (-0x18); /* 0x39001F4B: lea ecx, [ebp - 0x18] */
   4811     PUSH32(esp, eax); /* 0x39001F4E: push eax */
   4812     PUSH32(esp, ecx); /* 0x39001F4F: push ecx */
   4813     ecx = ebx; /* 0x39001F50: mov ecx, ebx */
   4814     MEM32(ebp + (-0x4)) = 0; /* 0x39001F52: mov dword ptr [ebp - 4], 0 */
   4815     RECOMP_ICALL(0x390049E0u); /* 0x39001F59: call 0x390049e0 */ /* not lifted */
   4816     RECOMP_FLAGS_IN();
   4817     edi = MEM32(eax); /* 0x39001F5E: mov edi, dword ptr [eax] */
   4818     PUSH32(esp, 1); /* 0x39001F60: push 1 */
   4819     ecx = ebp + (-0x28); /* 0x39001F62: lea ecx, [ebp - 0x28] */
   4820     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39001F65: mov dword ptr [ebp - 4], 0xffffffff */
   4821     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39001F6C: call dword ptr [0x3900b040] */
   4822     RECOMP_FLAGS_IN();
   4823     /* cmp edi, MEM32(ebx + 0x4) */ /* 0x39001F72: cmp edi, dword ptr [ebx + 4] */
   4824     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebx + 0x4));
   4825     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4826     _flag_k = FK_CMP;
   4827     if (CMP_NE(_flag_a, _flag_b)) goto L_39001F9A; /* 0x39001F75: jne 0x39001f9a */
   4828 L_39001F77:
   4829     edx = MEM32(ebp + 0x10); /* 0x39001F77: mov edx, dword ptr [ebp + 0x10] */
   4830     eax = MEM32(ebp + 0xC); /* 0x39001F7A: mov eax, dword ptr [ebp + 0xc] */
   4831     ecx = MEM32(ebp + (-0x14)); /* 0x39001F7D: mov ecx, dword ptr [ebp - 0x14] */
   4832     PUSH32(esp, edx); /* 0x39001F80: push edx */
   4833     PUSH32(esp, 0x7F7FFFFFu); /* 0x39001F81: push 0x7f7fffff */
   4834     PUSH32(esp, 0xFF7FFFFFu); /* 0x39001F86: push 0xff7fffff */
   4835     PUSH32(esp, eax); /* 0x39001F8B: push eax */
   4836     PUSH32(esp, esi); /* 0x39001F8C: push esi */
   4837     RECOMP_ICALL(0x39002760u); /* 0x39001F8D: call 0x39002760 */ /* not lifted */
   4838     RECOMP_FLAGS_IN();
   4839     ecx = MEM32(ebp + (-0x14)); /* 0x39001F92: mov ecx, dword ptr [ebp - 0x14] */
   4840     RECOMP_BACKEDGE();
   4841     goto L_39001ED1; /* 0x39001F95: jmp 0x39001ed1 */
   4842 L_39001F9A:
   4843     fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x39001F9A: fld dword ptr [ebp + 0xc] */
   4844     _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edi + 0x20)); /* 0x39001F9D: fcomp dword ptr [edi + 0x20] */
   4845     fp_pop();
   4846     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x39001FA0: fnstsw ax */
   4847     /* test HI8(eax), 1 */ /* 0x39001FA2: test ah, 1 */
   4848     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
   4849     _cf = 0;
   4850     _flag_k = FK_NARROW(FK_TEST, 24);
   4851     if (TEST_Z(_flag_a, _flag_b)) goto L_39001FAD; /* 0x39001FA5: je 0x39001fad */
   4852 L_39001FA7:
   4853     ecx = MEM32(edi + 0x20); /* 0x39001FA7: mov ecx, dword ptr [edi + 0x20] */
   4854     MEM32(ebp + 0xC) = ecx; /* 0x39001FAA: mov dword ptr [ebp + 0xc], ecx */
   4855 L_39001FAD:
   4856     fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x39001FAD: fld dword ptr [ebp + 0xc] */
   4857     _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(edi + 0x24)); /* 0x39001FB0: fcomp dword ptr [edi + 0x24] */
   4858     fp_pop();
   4859     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x39001FB3: fnstsw ax */
   4860     /* test HI8(eax), 0x41u */ /* 0x39001FB5: test ah, 0x41 */
   4861     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24;
   4862     _cf = 0;
   4863     _flag_k = FK_NARROW(FK_TEST, 24);
   4864     if (TEST_NZ(_flag_a, _flag_b)) goto L_39001FC0; /* 0x39001FB8: jne 0x39001fc0 */
   4865 L_39001FBA:
   4866     edx = MEM32(edi + 0x24); /* 0x39001FBA: mov edx, dword ptr [edi + 0x24] */
   4867     MEM32(ebp + 0xC) = edx; /* 0x39001FBD: mov dword ptr [ebp + 0xc], edx */
   4868 L_39001FC0:
   4869     eax = MEM32(ebp + 0xC); /* 0x39001FC0: mov eax, dword ptr [ebp + 0xc] */
   4870     MEM32(edi + 0x1C) = eax; /* 0x39001FC3: mov dword ptr [edi + 0x1c], eax */
   4871     SET_LO8(eax, MEM8(ebp + 0x14)); /* 0x39001FC6: mov al, byte ptr [ebp + 0x14] */
   4872     /* test LO8(eax), LO8(eax) */ /* 0x39001FC9: test al, al */
   4873     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   4874     _cf = 0;
   4875     _flag_k = FK_NARROW(FK_TEST, 24);
   4876     if (TEST_Z(_flag_a, _flag_b)) goto L_39002021; /* 0x39001FCB: je 0x39002021 */
   4877 L_39001FCD:
   4878     eax = MEM32(edi + 0x28); /* 0x39001FCD: mov eax, dword ptr [edi + 0x28] */
   4879     /* test eax, eax */ /* 0x39001FD0: test eax, eax */
   4880     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4881     _cf = 0;
   4882     _flag_k = FK_TEST;
   4883     if (TEST_Z(_flag_a, _flag_b)) goto L_39002021; /* 0x39001FD2: je 0x39002021 */
   4884 L_39001FD4:
   4885     eax = MEM32(eax + 0x4); /* 0x39001FD4: mov eax, dword ptr [eax + 4] */
   4886     esi = MEM32(eax); /* 0x39001FD7: mov esi, dword ptr [eax] */
   4887     /* cmp esi, eax */ /* 0x39001FD9: cmp esi, eax */
   4888     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   4889     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4890     _flag_k = FK_CMP;
   4891     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002021; /* 0x39001FDB: je 0x39002021 */
   4892 L_39001FDD:
   4893     ecx = MEM32(ebp + 0xC); /* 0x39001FDD: mov ecx, dword ptr [ebp + 0xc] */
   4894     edx = MEM32(esi + 0x10); /* 0x39001FE0: mov edx, dword ptr [esi + 0x10] */
   4895     PUSH32(esp, ecx); /* 0x39001FE3: push ecx */
   4896     PUSH32(esp, edx); /* 0x39001FE4: push edx */
   4897     RECOMP_ICALL(MEM32(esi + 0xC)); /* 0x39001FE5: call dword ptr [esi + 0xc] */
   4898     RECOMP_FLAGS_IN();
   4899     eax = MEM32(esi + 0x8); /* 0x39001FE8: mov eax, dword ptr [esi + 8] */
   4900     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4901     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4902     esp = esp + 8; /* 0x39001FEB: add esp, 8 */
   4903     _flag_k = FK_ADD;
   4904     SET_LO8(ecx, MEM8(eax + 0x15)); /* 0x39001FEE: mov cl, byte ptr [eax + 0x15] */
   4905     /* test LO8(ecx), LO8(ecx) */ /* 0x39001FF1: test cl, cl */
   4906     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   4907     _cf = 0;
   4908     _flag_k = FK_NARROW(FK_TEST, 24);
   4909     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002000; /* 0x39001FF3: jne 0x39002000 */
   4910 L_39001FF5:
   4911     PUSH32(esp, eax); /* 0x39001FF5: push eax */
   4912     RECOMP_ICALL(0x39006910u); /* 0x39001FF6: call 0x39006910 */ /* not lifted */
   4913     RECOMP_FLAGS_IN();
   4914     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4915     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4916     esp = esp + 4; /* 0x39001FFB: add esp, 4 */
   4917     _flag_k = FK_ADD;
   4918     goto L_39002017; /* 0x39001FFE: jmp 0x39002017 */
   4919 L_39002000:
   4920     eax = MEM32(esi + 0x4); /* 0x39002000: mov eax, dword ptr [esi + 4] */
   4921     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39002003: cmp esi, dword ptr [eax + 8] */
   4922     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   4923     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4924     _flag_k = FK_CMP;
   4925     if (CMP_NE(_flag_a, _flag_b)) goto L_39002012; /* 0x39002006: jne 0x39002012 */
   4926 L_39002008:
   4927     esi = eax; /* 0x39002008: mov esi, eax */
   4928     eax = MEM32(eax + 0x4); /* 0x3900200A: mov eax, dword ptr [eax + 4] */
   4929     /* cmp esi, MEM32(eax + 0x8) */ /* 0x3900200D: cmp esi, dword ptr [eax + 8] */
   4930     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   4931     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4932     _flag_k = FK_CMP;
   4933     RECOMP_BACKEDGE();
   4934     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002008; /* 0x39002010: je 0x39002008 */
   4935 L_39002012:
   4936     /* cmp MEM32(esi + 0x8), eax */ /* 0x39002012: cmp dword ptr [esi + 8], eax */
   4937     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(eax);
   4938     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4939     _flag_k = FK_CMP;
   4940     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002019; /* 0x39002015: je 0x39002019 */
   4941 L_39002017:
   4942     esi = eax; /* 0x39002017: mov esi, eax */
   4943 L_39002019:
   4944     eax = MEM32(edi + 0x28); /* 0x39002019: mov eax, dword ptr [edi + 0x28] */
   4945     /* cmp esi, MEM32(eax + 0x4) */ /* 0x3900201C: cmp esi, dword ptr [eax + 4] */
   4946     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x4));
   4947     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4948     _flag_k = FK_CMP;
   4949     RECOMP_BACKEDGE();
   4950     if (CMP_NE(_flag_a, _flag_b)) goto L_39001FDD; /* 0x3900201F: jne 0x39001fdd */
   4951 L_39002021:
   4952     ecx = MEM32(ebp + (-0xC)); /* 0x39002021: mov ecx, dword ptr [ebp - 0xc] */
   4953     edi = POP32_VAL(esp); /* 0x39002024: pop edi */
   4954     fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x39002025: fld dword ptr [ebp + 0xc] */
   4955     esi = POP32_VAL(esp); /* 0x39002028: pop esi */
   4956     ebx = POP32_VAL(esp); /* 0x39002029: pop ebx */
   4957     MEM32(FS_BASE + (0)) = ecx; /* 0x3900202A: mov dword ptr fs:[0], ecx */
   4958     esp = ebp; /* 0x39002031: mov esp, ebp */
   4959     ebp = POP32_VAL(esp); /* 0x39002033: pop ebp */
   4960     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39002034: ret 0x10 */
   4961     RECOMP_REGS_OUT();
   4962 }
   4963 
   4964 void sub_39001FDD(void) {
   4965     int _fpu_cmp = 0;
   4966     uint32_t _cf = 0;
   4967     int _df = 1;
   4968     uint32_t _flag_k = FK_NONE;
   4969     uint32_t _flag_a = 0, _flag_b = 0;
   4970     uint32_t _itail_tgt = 0;
   4971     RECOMP_REGS_LOCALS
   4972     RECOMP_ENTER(0x39001FDDu);
   4973 
   4974 L_39001FDD:
   4975     ecx = MEM32(ebp + 0xC); /* 0x39001FDD: mov ecx, dword ptr [ebp + 0xc] */
   4976     edx = MEM32(esi + 0x10); /* 0x39001FE0: mov edx, dword ptr [esi + 0x10] */
   4977     PUSH32(esp, ecx); /* 0x39001FE3: push ecx */
   4978     PUSH32(esp, edx); /* 0x39001FE4: push edx */
   4979     RECOMP_ICALL(MEM32(esi + 0xC)); /* 0x39001FE5: call dword ptr [esi + 0xc] */
   4980     RECOMP_FLAGS_IN();
   4981     eax = MEM32(esi + 0x8); /* 0x39001FE8: mov eax, dword ptr [esi + 8] */
   4982     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4983     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4984     esp = esp + 8; /* 0x39001FEB: add esp, 8 */
   4985     _flag_k = FK_ADD;
   4986     SET_LO8(ecx, MEM8(eax + 0x15)); /* 0x39001FEE: mov cl, byte ptr [eax + 0x15] */
   4987     /* test LO8(ecx), LO8(ecx) */ /* 0x39001FF1: test cl, cl */
   4988     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   4989     _cf = 0;
   4990     _flag_k = FK_NARROW(FK_TEST, 24);
   4991     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002000; /* 0x39001FF3: jne 0x39002000 */
   4992 L_39001FF5:
   4993     PUSH32(esp, eax); /* 0x39001FF5: push eax */
   4994     RECOMP_ICALL(0x39006910u); /* 0x39001FF6: call 0x39006910 */ /* not lifted */
   4995     RECOMP_FLAGS_IN();
   4996     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4997     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4998     esp = esp + 4; /* 0x39001FFB: add esp, 4 */
   4999     _flag_k = FK_ADD;
   5000     goto L_39002017; /* 0x39001FFE: jmp 0x39002017 */
   5001 L_39002000:
   5002     eax = MEM32(esi + 0x4); /* 0x39002000: mov eax, dword ptr [esi + 4] */
   5003     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39002003: cmp esi, dword ptr [eax + 8] */
   5004     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   5005     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5006     _flag_k = FK_CMP;
   5007     if (CMP_NE(_flag_a, _flag_b)) goto L_39002012; /* 0x39002006: jne 0x39002012 */
   5008 L_39002008:
   5009     esi = eax; /* 0x39002008: mov esi, eax */
   5010     eax = MEM32(eax + 0x4); /* 0x3900200A: mov eax, dword ptr [eax + 4] */
   5011     /* cmp esi, MEM32(eax + 0x8) */ /* 0x3900200D: cmp esi, dword ptr [eax + 8] */
   5012     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   5013     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5014     _flag_k = FK_CMP;
   5015     RECOMP_BACKEDGE();
   5016     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002008; /* 0x39002010: je 0x39002008 */
   5017 L_39002012:
   5018     /* cmp MEM32(esi + 0x8), eax */ /* 0x39002012: cmp dword ptr [esi + 8], eax */
   5019     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(eax);
   5020     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5021     _flag_k = FK_CMP;
   5022     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002019; /* 0x39002015: je 0x39002019 */
   5023 L_39002017:
   5024     esi = eax; /* 0x39002017: mov esi, eax */
   5025 L_39002019:
   5026     eax = MEM32(edi + 0x28); /* 0x39002019: mov eax, dword ptr [edi + 0x28] */
   5027     /* cmp esi, MEM32(eax + 0x4) */ /* 0x3900201C: cmp esi, dword ptr [eax + 4] */
   5028     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x4));
   5029     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5030     _flag_k = FK_CMP;
   5031     RECOMP_BACKEDGE();
   5032     if (CMP_NE(_flag_a, _flag_b)) goto L_39001FDD; /* 0x3900201F: jne 0x39001fdd */
   5033 L_39002021:
   5034     ecx = MEM32(ebp + (-0xC)); /* 0x39002021: mov ecx, dword ptr [ebp - 0xc] */
   5035     edi = POP32_VAL(esp); /* 0x39002024: pop edi */
   5036     fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x39002025: fld dword ptr [ebp + 0xc] */
   5037     esi = POP32_VAL(esp); /* 0x39002028: pop esi */
   5038     ebx = POP32_VAL(esp); /* 0x39002029: pop ebx */
   5039     MEM32(FS_BASE + (0)) = ecx; /* 0x3900202A: mov dword ptr fs:[0], ecx */
   5040     esp = ebp; /* 0x39002031: mov esp, ebp */
   5041     ebp = POP32_VAL(esp); /* 0x39002033: pop ebp */
   5042     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39002034: ret 0x10 */
   5043     RECOMP_REGS_OUT();
   5044 }
   5045 
   5046 void sub_39002017(void) {
   5047     int _fpu_cmp = 0;
   5048     uint32_t _cf = 0;
   5049     int _df = 1;
   5050     uint32_t _flag_k = FK_NONE;
   5051     uint32_t _flag_a = 0, _flag_b = 0;
   5052     uint32_t _itail_tgt = 0;
   5053     RECOMP_REGS_LOCALS
   5054     RECOMP_ENTER(0x39002017u);
   5055 
   5056     goto L_39002017;
   5057 L_39001FDD:
   5058     ecx = MEM32(ebp + 0xC); /* 0x39001FDD: mov ecx, dword ptr [ebp + 0xc] */
   5059     edx = MEM32(esi + 0x10); /* 0x39001FE0: mov edx, dword ptr [esi + 0x10] */
   5060     PUSH32(esp, ecx); /* 0x39001FE3: push ecx */
   5061     PUSH32(esp, edx); /* 0x39001FE4: push edx */
   5062     RECOMP_ICALL(MEM32(esi + 0xC)); /* 0x39001FE5: call dword ptr [esi + 0xc] */
   5063     RECOMP_FLAGS_IN();
   5064     eax = MEM32(esi + 0x8); /* 0x39001FE8: mov eax, dword ptr [esi + 8] */
   5065     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5066     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5067     esp = esp + 8; /* 0x39001FEB: add esp, 8 */
   5068     _flag_k = FK_ADD;
   5069     SET_LO8(ecx, MEM8(eax + 0x15)); /* 0x39001FEE: mov cl, byte ptr [eax + 0x15] */
   5070     /* test LO8(ecx), LO8(ecx) */ /* 0x39001FF1: test cl, cl */
   5071     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   5072     _cf = 0;
   5073     _flag_k = FK_NARROW(FK_TEST, 24);
   5074     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002000; /* 0x39001FF3: jne 0x39002000 */
   5075 L_39001FF5:
   5076     PUSH32(esp, eax); /* 0x39001FF5: push eax */
   5077     RECOMP_ICALL(0x39006910u); /* 0x39001FF6: call 0x39006910 */ /* not lifted */
   5078     RECOMP_FLAGS_IN();
   5079     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5080     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5081     esp = esp + 4; /* 0x39001FFB: add esp, 4 */
   5082     _flag_k = FK_ADD;
   5083     goto L_39002017; /* 0x39001FFE: jmp 0x39002017 */
   5084 L_39002000:
   5085     eax = MEM32(esi + 0x4); /* 0x39002000: mov eax, dword ptr [esi + 4] */
   5086     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39002003: cmp esi, dword ptr [eax + 8] */
   5087     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   5088     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5089     _flag_k = FK_CMP;
   5090     if (CMP_NE(_flag_a, _flag_b)) goto L_39002012; /* 0x39002006: jne 0x39002012 */
   5091 L_39002008:
   5092     esi = eax; /* 0x39002008: mov esi, eax */
   5093     eax = MEM32(eax + 0x4); /* 0x3900200A: mov eax, dword ptr [eax + 4] */
   5094     /* cmp esi, MEM32(eax + 0x8) */ /* 0x3900200D: cmp esi, dword ptr [eax + 8] */
   5095     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   5096     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5097     _flag_k = FK_CMP;
   5098     RECOMP_BACKEDGE();
   5099     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002008; /* 0x39002010: je 0x39002008 */
   5100 L_39002012:
   5101     /* cmp MEM32(esi + 0x8), eax */ /* 0x39002012: cmp dword ptr [esi + 8], eax */
   5102     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(eax);
   5103     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5104     _flag_k = FK_CMP;
   5105     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002019; /* 0x39002015: je 0x39002019 */
   5106 L_39002017:
   5107     esi = eax; /* 0x39002017: mov esi, eax */
   5108 L_39002019:
   5109     eax = MEM32(edi + 0x28); /* 0x39002019: mov eax, dword ptr [edi + 0x28] */
   5110     /* cmp esi, MEM32(eax + 0x4) */ /* 0x3900201C: cmp esi, dword ptr [eax + 4] */
   5111     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x4));
   5112     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5113     _flag_k = FK_CMP;
   5114     RECOMP_BACKEDGE();
   5115     if (CMP_NE(_flag_a, _flag_b)) goto L_39001FDD; /* 0x3900201F: jne 0x39001fdd */
   5116 L_39002021:
   5117     ecx = MEM32(ebp + (-0xC)); /* 0x39002021: mov ecx, dword ptr [ebp - 0xc] */
   5118     edi = POP32_VAL(esp); /* 0x39002024: pop edi */
   5119     fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x39002025: fld dword ptr [ebp + 0xc] */
   5120     esi = POP32_VAL(esp); /* 0x39002028: pop esi */
   5121     ebx = POP32_VAL(esp); /* 0x39002029: pop ebx */
   5122     MEM32(FS_BASE + (0)) = ecx; /* 0x3900202A: mov dword ptr fs:[0], ecx */
   5123     esp = ebp; /* 0x39002031: mov esp, ebp */
   5124     ebp = POP32_VAL(esp); /* 0x39002033: pop ebp */
   5125     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39002034: ret 0x10 */
   5126     RECOMP_REGS_OUT();
   5127 }
   5128 
   5129 void sub_39002019(void) {
   5130     int _fpu_cmp = 0;
   5131     uint32_t _cf = 0;
   5132     int _df = 1;
   5133     uint32_t _flag_k = FK_NONE;
   5134     uint32_t _flag_a = 0, _flag_b = 0;
   5135     uint32_t _itail_tgt = 0;
   5136     RECOMP_REGS_LOCALS
   5137     RECOMP_ENTER(0x39002019u);
   5138 
   5139     goto L_39002019;
   5140 L_39001FDD:
   5141     ecx = MEM32(ebp + 0xC); /* 0x39001FDD: mov ecx, dword ptr [ebp + 0xc] */
   5142     edx = MEM32(esi + 0x10); /* 0x39001FE0: mov edx, dword ptr [esi + 0x10] */
   5143     PUSH32(esp, ecx); /* 0x39001FE3: push ecx */
   5144     PUSH32(esp, edx); /* 0x39001FE4: push edx */
   5145     RECOMP_ICALL(MEM32(esi + 0xC)); /* 0x39001FE5: call dword ptr [esi + 0xc] */
   5146     RECOMP_FLAGS_IN();
   5147     eax = MEM32(esi + 0x8); /* 0x39001FE8: mov eax, dword ptr [esi + 8] */
   5148     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5149     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5150     esp = esp + 8; /* 0x39001FEB: add esp, 8 */
   5151     _flag_k = FK_ADD;
   5152     SET_LO8(ecx, MEM8(eax + 0x15)); /* 0x39001FEE: mov cl, byte ptr [eax + 0x15] */
   5153     /* test LO8(ecx), LO8(ecx) */ /* 0x39001FF1: test cl, cl */
   5154     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
   5155     _cf = 0;
   5156     _flag_k = FK_NARROW(FK_TEST, 24);
   5157     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002000; /* 0x39001FF3: jne 0x39002000 */
   5158 L_39001FF5:
   5159     PUSH32(esp, eax); /* 0x39001FF5: push eax */
   5160     RECOMP_ICALL(0x39006910u); /* 0x39001FF6: call 0x39006910 */ /* not lifted */
   5161     RECOMP_FLAGS_IN();
   5162     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5163     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5164     esp = esp + 4; /* 0x39001FFB: add esp, 4 */
   5165     _flag_k = FK_ADD;
   5166     goto L_39002017; /* 0x39001FFE: jmp 0x39002017 */
   5167 L_39002000:
   5168     eax = MEM32(esi + 0x4); /* 0x39002000: mov eax, dword ptr [esi + 4] */
   5169     /* cmp esi, MEM32(eax + 0x8) */ /* 0x39002003: cmp esi, dword ptr [eax + 8] */
   5170     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   5171     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5172     _flag_k = FK_CMP;
   5173     if (CMP_NE(_flag_a, _flag_b)) goto L_39002012; /* 0x39002006: jne 0x39002012 */
   5174 L_39002008:
   5175     esi = eax; /* 0x39002008: mov esi, eax */
   5176     eax = MEM32(eax + 0x4); /* 0x3900200A: mov eax, dword ptr [eax + 4] */
   5177     /* cmp esi, MEM32(eax + 0x8) */ /* 0x3900200D: cmp esi, dword ptr [eax + 8] */
   5178     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
   5179     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5180     _flag_k = FK_CMP;
   5181     RECOMP_BACKEDGE();
   5182     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002008; /* 0x39002010: je 0x39002008 */
   5183 L_39002012:
   5184     /* cmp MEM32(esi + 0x8), eax */ /* 0x39002012: cmp dword ptr [esi + 8], eax */
   5185     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(eax);
   5186     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5187     _flag_k = FK_CMP;
   5188     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002019; /* 0x39002015: je 0x39002019 */
   5189 L_39002017:
   5190     esi = eax; /* 0x39002017: mov esi, eax */
   5191 L_39002019:
   5192     eax = MEM32(edi + 0x28); /* 0x39002019: mov eax, dword ptr [edi + 0x28] */
   5193     /* cmp esi, MEM32(eax + 0x4) */ /* 0x3900201C: cmp esi, dword ptr [eax + 4] */
   5194     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(eax + 0x4));
   5195     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5196     _flag_k = FK_CMP;
   5197     RECOMP_BACKEDGE();
   5198     if (CMP_NE(_flag_a, _flag_b)) goto L_39001FDD; /* 0x3900201F: jne 0x39001fdd */
   5199 L_39002021:
   5200     ecx = MEM32(ebp + (-0xC)); /* 0x39002021: mov ecx, dword ptr [ebp - 0xc] */
   5201     edi = POP32_VAL(esp); /* 0x39002024: pop edi */
   5202     fp_push(*(float*)&MEM32(ebp + 0xC)); /* 0x39002025: fld dword ptr [ebp + 0xc] */
   5203     esi = POP32_VAL(esp); /* 0x39002028: pop esi */
   5204     ebx = POP32_VAL(esp); /* 0x39002029: pop ebx */
   5205     MEM32(FS_BASE + (0)) = ecx; /* 0x3900202A: mov dword ptr fs:[0], ecx */
   5206     esp = ebp; /* 0x39002031: mov esp, ebp */
   5207     ebp = POP32_VAL(esp); /* 0x39002033: pop ebp */
   5208     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39002034: ret 0x10 */
   5209     RECOMP_REGS_OUT();
   5210 }
   5211 
   5212 void sub_39002040(void) {
   5213     int _fpu_cmp = 0;
   5214     uint32_t _cf = 0;
   5215     int _df = 1;
   5216     uint32_t _flag_k = FK_NONE;
   5217     uint32_t _flag_a = 0, _flag_b = 0;
   5218     uint32_t _itail_tgt = 0;
   5219     RECOMP_REGS_LOCALS
   5220     RECOMP_ENTER(0x39002040u);
   5221 
   5222 L_39002040:
   5223     PUSH32(esp, ebp); /* 0x39002040: push ebp */
   5224     ebp = esp; /* 0x39002041: mov ebp, esp */
   5225     PUSH32(esp, 0xFFFFFFFFu); /* 0x39002043: push -1 */
   5226     PUSH32(esp, 0x3900A549u); /* 0x39002045: push 0x3900a549 */
   5227     eax = MEM32(FS_BASE + (0)); /* 0x3900204A: mov eax, dword ptr fs:[0] */
   5228     PUSH32(esp, eax); /* 0x39002050: push eax */
   5229     MEM32(FS_BASE + (0)) = esp; /* 0x39002051: mov dword ptr fs:[0], esp */
   5230     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu);
   5231     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5232     esp = esp - 0x1Cu; /* 0x39002058: sub esp, 0x1c */
   5233     _flag_k = FK_CMP;
   5234     PUSH32(esp, ebx); /* 0x3900205B: push ebx */
   5235     PUSH32(esp, esi); /* 0x3900205C: push esi */
   5236     PUSH32(esp, edi); /* 0x3900205D: push edi */
   5237     MEM32(ebp + (-0x14)) = ecx; /* 0x3900205E: mov dword ptr [ebp - 0x14], ecx */
   5238 L_39002061:
   5239     eax = MEM32(ebp + 0x10); /* 0x39002061: mov eax, dword ptr [ebp + 0x10] */
   5240     /* test eax, eax */ /* 0x39002064: test eax, eax */
   5241     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5242     _cf = 0;
   5243     _flag_k = FK_TEST;
   5244     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002070; /* 0x39002066: jne 0x39002070 */
   5245 L_39002068:
   5246     eax = MEM32(ecx + 0x38); /* 0x39002068: mov eax, dword ptr [ecx + 0x38] */
   5247     MEM32(ebp + (-0x10)) = eax; /* 0x3900206B: mov dword ptr [ebp - 0x10], eax */
   5248     goto L_39002083; /* 0x3900206E: jmp 0x39002083 */
   5249 L_39002070:
   5250     /* cmp eax, 2 */ /* 0x39002070: cmp eax, 2 */
   5251     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   5252     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5253     _flag_k = FK_CMP;
   5254     if (CMP_NE(_flag_a, _flag_b)) goto L_3900207D; /* 0x39002073: jne 0x3900207d */
   5255 L_39002075:
   5256     ecx = MEM32(ecx + 0x50); /* 0x39002075: mov ecx, dword ptr [ecx + 0x50] */
   5257     MEM32(ebp + (-0x10)) = ecx; /* 0x39002078: mov dword ptr [ebp - 0x10], ecx */
   5258     goto L_39002083; /* 0x3900207B: jmp 0x39002083 */
   5259 L_3900207D:
   5260     edx = MEM32(ecx + 0x44); /* 0x3900207D: mov edx, dword ptr [ecx + 0x44] */
   5261     MEM32(ebp + (-0x10)) = edx; /* 0x39002080: mov dword ptr [ebp - 0x10], edx */
   5262 L_39002083:
   5263     SET_LO8(eax, MEM8(ebp + 0x17)); /* 0x39002083: mov al, byte ptr [ebp + 0x17] */
   5264     PUSH32(esp, 0); /* 0x39002086: push 0 */
   5265     ecx = ebp + (-0x28); /* 0x39002088: lea ecx, [ebp - 0x28] */
   5266     MEM8(ebp + (-0x28)) = (uint8_t)(LO8(eax)); /* 0x3900208B: mov byte ptr [ebp - 0x28], al */
   5267     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x3900208E: call dword ptr [0x3900b040] */
   5268     RECOMP_FLAGS_IN();
   5269     esi = MEM32(ebp + 0x8); /* 0x39002094: mov esi, dword ptr [ebp + 8] */
   5270     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   5271     ecx = ecx | 0xFFFFFFFFu; /* 0x39002097: or ecx, 0xffffffff */
   5272     _cf = 0;
   5273     _flag_k = FK_TEST;
   5274     edi = esi; /* 0x3900209A: mov edi, esi */
   5275     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5276     eax = 0; /* 0x3900209C: xor eax, eax */
   5277     _cf = 0;
   5278     _flag_k = FK_TEST;
   5279     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x3900209E: repne scasb al, byte ptr es:[edi] */
   5280     ecx = ~ecx; /* 0x390020A0: not ecx */
   5281     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   5282     ecx = ecx - 1; /* 0x390020A2: dec ecx */
   5283     _flag_k = FK_DEC;
   5284     PUSH32(esp, 1); /* 0x390020A3: push 1 */
   5285     ebx = ecx; /* 0x390020A5: mov ebx, ecx */
   5286     ecx = ebp + (-0x28); /* 0x390020A7: lea ecx, [ebp - 0x28] */
   5287     PUSH32(esp, ebx); /* 0x390020AA: push ebx */
   5288     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x390020AB: call dword ptr [0x3900b034] */
   5289     RECOMP_FLAGS_IN();
   5290     /* test LO8(eax), LO8(eax) */ /* 0x390020B1: test al, al */
   5291     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   5292     _cf = 0;
   5293     _flag_k = FK_NARROW(FK_TEST, 24);
   5294     if (TEST_Z(_flag_a, _flag_b)) goto L_390020D5; /* 0x390020B3: je 0x390020d5 */
   5295 L_390020B5:
   5296     edi = MEM32(ebp + (-0x24)); /* 0x390020B5: mov edi, dword ptr [ebp - 0x24] */
   5297     ecx = ebx; /* 0x390020B8: mov ecx, ebx */
   5298     edx = ecx; /* 0x390020BA: mov edx, ecx */
   5299     PUSH32(esp, ebx); /* 0x390020BC: push ebx */
   5300     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x390020BD: shr ecx, 2 */
   5301     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5302     ecx = ecx >> 2u; /* 0x390020BD: shr ecx, 2 */
   5303     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390020C0: 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; }
   5304     ecx = edx; /* 0x390020C2: mov ecx, edx */
   5305     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   5306     ecx = ecx & 3; /* 0x390020C4: and ecx, 3 */
   5307     _cf = 0;
   5308     _flag_k = FK_TEST;
   5309     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x390020C7: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   5310     ecx = ebp + (-0x28); /* 0x390020C9: lea ecx, [ebp - 0x28] */
   5311     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x390020CC: call dword ptr [0x3900b038] */
   5312     RECOMP_FLAGS_IN();
   5313     esi = MEM32(ebp + 0x8); /* 0x390020D2: mov esi, dword ptr [ebp + 8] */
   5314 L_390020D5:
   5315     edi = MEM32(ebp + (-0x10)); /* 0x390020D5: mov edi, dword ptr [ebp - 0x10] */
   5316     eax = ebp + (-0x28); /* 0x390020D8: lea eax, [ebp - 0x28] */
   5317     ecx = ebp + (-0x18); /* 0x390020DB: lea ecx, [ebp - 0x18] */
   5318     PUSH32(esp, eax); /* 0x390020DE: push eax */
   5319     PUSH32(esp, ecx); /* 0x390020DF: push ecx */
   5320     ecx = edi; /* 0x390020E0: mov ecx, edi */
   5321     MEM32(ebp + (-0x4)) = 0; /* 0x390020E2: mov dword ptr [ebp - 4], 0 */
   5322     RECOMP_ICALL(0x390049E0u); /* 0x390020E9: call 0x390049e0 */ /* not lifted */
   5323     RECOMP_FLAGS_IN();
   5324     ebx = MEM32(eax); /* 0x390020EE: mov ebx, dword ptr [eax] */
   5325     PUSH32(esp, 1); /* 0x390020F0: push 1 */
   5326     ecx = ebp + (-0x28); /* 0x390020F2: lea ecx, [ebp - 0x28] */
   5327     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x390020F5: mov dword ptr [ebp - 4], 0xffffffff */
   5328     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390020FC: call dword ptr [0x3900b040] */
   5329     RECOMP_FLAGS_IN();
   5330     /* cmp ebx, MEM32(edi + 0x4) */ /* 0x39002102: cmp ebx, dword ptr [edi + 4] */
   5331     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(edi + 0x4));
   5332     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5333     _flag_k = FK_CMP;
   5334     if (CMP_NE(_flag_a, _flag_b)) goto L_39002125; /* 0x39002105: jne 0x39002125 */
   5335 L_39002107:
   5336     edx = MEM32(ebp + 0x10); /* 0x39002107: mov edx, dword ptr [ebp + 0x10] */
   5337     eax = MEM32(ebp + 0xC); /* 0x3900210A: mov eax, dword ptr [ebp + 0xc] */
   5338     ecx = MEM32(ebp + (-0x14)); /* 0x3900210D: mov ecx, dword ptr [ebp - 0x14] */
   5339     PUSH32(esp, edx); /* 0x39002110: push edx */
   5340     PUSH32(esp, 0x3E8u); /* 0x39002111: push 0x3e8 */
   5341     PUSH32(esp, eax); /* 0x39002116: push eax */
   5342     PUSH32(esp, esi); /* 0x39002117: push esi */
   5343     RECOMP_ICALL(0x39002940u); /* 0x39002118: call 0x39002940 */ /* not lifted */
   5344     RECOMP_FLAGS_IN();
   5345     ecx = MEM32(ebp + (-0x14)); /* 0x3900211D: mov ecx, dword ptr [ebp - 0x14] */
   5346     RECOMP_BACKEDGE();
   5347     goto L_39002061; /* 0x39002120: jmp 0x39002061 */
   5348 L_39002125:
   5349     esi = MEM32(ebp + 0xC); /* 0x39002125: mov esi, dword ptr [ebp + 0xc] */
   5350     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   5351     ecx = ecx | 0xFFFFFFFFu; /* 0x39002128: or ecx, 0xffffffff */
   5352     _cf = 0;
   5353     _flag_k = FK_TEST;
   5354     edi = esi; /* 0x3900212B: mov edi, esi */
   5355     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5356     eax = 0; /* 0x3900212D: xor eax, eax */
   5357     _cf = 0;
   5358     _flag_k = FK_TEST;
   5359     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x1Cu);
   5360     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5361     ebx = ebx + 0x1Cu; /* 0x3900212F: add ebx, 0x1c */
   5362     _flag_k = FK_ADD;
   5363     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39002132: repne scasb al, byte ptr es:[edi] */
   5364     eax = MEM32(ebx + 0x10); /* 0x39002134: mov eax, dword ptr [ebx + 0x10] */
   5365     ecx = ~ecx; /* 0x39002137: not ecx */
   5366     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   5367     ecx = ecx - 1; /* 0x39002139: dec ecx */
   5368     _flag_k = FK_DEC;
   5369     edi = ecx; /* 0x3900213A: mov edi, ecx */
   5370     /* cmp edi, eax */ /* 0x3900213C: cmp edi, eax */
   5371     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   5372     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5373     _flag_k = FK_CMP;
   5374     MEM32(ebp + 0x8) = edi; /* 0x3900213E: mov dword ptr [ebp + 8], edi */
   5375     if (CMP_LE(_flag_a, _flag_b)) goto L_39002148; /* 0x39002141: jle 0x39002148 */
   5376 L_39002143:
   5377     MEM32(ebp + 0x8) = eax; /* 0x39002143: mov dword ptr [ebp + 8], eax */
   5378     edi = eax; /* 0x39002146: mov edi, eax */
   5379 L_39002148:
   5380     PUSH32(esp, 1); /* 0x39002148: push 1 */
   5381     PUSH32(esp, edi); /* 0x3900214A: push edi */
   5382     ecx = ebx; /* 0x3900214B: mov ecx, ebx */
   5383     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x3900214D: call dword ptr [0x3900b034] */
   5384     RECOMP_FLAGS_IN();
   5385     /* test LO8(eax), LO8(eax) */ /* 0x39002153: test al, al */
   5386     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   5387     _cf = 0;
   5388     _flag_k = FK_NARROW(FK_TEST, 24);
   5389     if (TEST_Z(_flag_a, _flag_b)) goto L_39002177; /* 0x39002155: je 0x39002177 */
   5390 L_39002157:
   5391     ecx = edi; /* 0x39002157: mov ecx, edi */
   5392     edi = MEM32(ebx + 0x4); /* 0x39002159: mov edi, dword ptr [ebx + 4] */
   5393     edx = ecx; /* 0x3900215C: mov edx, ecx */
   5394     eax = MEM32(ebp + 0x8); /* 0x3900215E: mov eax, dword ptr [ebp + 8] */
   5395     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39002161: shr ecx, 2 */
   5396     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5397     ecx = ecx >> 2u; /* 0x39002161: shr ecx, 2 */
   5398     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39002164: 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; }
   5399     ecx = edx; /* 0x39002166: mov ecx, edx */
   5400     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   5401     ecx = ecx & 3; /* 0x39002168: and ecx, 3 */
   5402     _cf = 0;
   5403     _flag_k = FK_TEST;
   5404     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x3900216B: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   5405     ecx = MEM32(ebx + 0x4); /* 0x3900216D: mov ecx, dword ptr [ebx + 4] */
   5406     MEM32(ebx + 0x8) = eax; /* 0x39002170: mov dword ptr [ebx + 8], eax */
   5407     MEM8(ecx + eax) = (uint8_t)(0); /* 0x39002173: mov byte ptr [ecx + eax], 0 */
   5408 L_39002177:
   5409     SET_LO8(eax, MEM8(ebp + 0x14)); /* 0x39002177: mov al, byte ptr [ebp + 0x14] */
   5410     /* test LO8(eax), LO8(eax) */ /* 0x3900217A: test al, al */
   5411     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   5412     _cf = 0;
   5413     _flag_k = FK_NARROW(FK_TEST, 24);
   5414     if (TEST_Z(_flag_a, _flag_b)) goto L_3900219B; /* 0x3900217C: je 0x3900219b */
   5415 L_3900217E:
   5416     ecx = MEM32(ebx + 0x14); /* 0x3900217E: mov ecx, dword ptr [ebx + 0x14] */
   5417     /* test ecx, ecx */ /* 0x39002181: test ecx, ecx */
   5418     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   5419     _cf = 0;
   5420     _flag_k = FK_TEST;
   5421     if (TEST_Z(_flag_a, _flag_b)) goto L_3900219B; /* 0x39002183: je 0x3900219b */
   5422 L_39002185:
   5423     eax = MEM32(ebx + 0x4); /* 0x39002185: mov eax, dword ptr [ebx + 4] */
   5424     /* test eax, eax */ /* 0x39002188: test eax, eax */
   5425     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5426     _cf = 0;
   5427     _flag_k = FK_TEST;
   5428     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002191; /* 0x3900218A: jne 0x39002191 */
   5429 L_3900218C:
   5430     eax = MEM32(0x3900B02C); /* 0x3900218C: mov eax, dword ptr [0x3900b02c] */
   5431 L_39002191:
   5432     edx = MEM32(ebx + 0x18); /* 0x39002191: mov edx, dword ptr [ebx + 0x18] */
   5433     PUSH32(esp, eax); /* 0x39002194: push eax */
   5434     PUSH32(esp, edx); /* 0x39002195: push edx */
   5435     RECOMP_ICALL(ecx); /* 0x39002196: call ecx */
   5436     RECOMP_FLAGS_IN();
   5437     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5438     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5439     esp = esp + 8; /* 0x39002198: add esp, 8 */
   5440     _flag_k = FK_ADD;
   5441 L_3900219B:
   5442     ebx = MEM32(ebx + 0x4); /* 0x3900219B: mov ebx, dword ptr [ebx + 4] */
   5443     eax = MEM32(0x3900B02C); /* 0x3900219E: mov eax, dword ptr [0x3900b02c] */
   5444     /* test ebx, ebx */ /* 0x390021A3: test ebx, ebx */
   5445     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
   5446     _cf = 0;
   5447     _flag_k = FK_TEST;
   5448     if (TEST_Z(_flag_a, _flag_b)) goto L_390021A9; /* 0x390021A5: je 0x390021a9 */
   5449 L_390021A7:
   5450     eax = ebx; /* 0x390021A7: mov eax, ebx */
   5451 L_390021A9:
   5452     ecx = MEM32(ebp + (-0xC)); /* 0x390021A9: mov ecx, dword ptr [ebp - 0xc] */
   5453     edi = POP32_VAL(esp); /* 0x390021AC: pop edi */
   5454     esi = POP32_VAL(esp); /* 0x390021AD: pop esi */
   5455     ebx = POP32_VAL(esp); /* 0x390021AE: pop ebx */
   5456     MEM32(FS_BASE + (0)) = ecx; /* 0x390021AF: mov dword ptr fs:[0], ecx */
   5457     esp = ebp; /* 0x390021B6: mov esp, ebp */
   5458     ebp = POP32_VAL(esp); /* 0x390021B8: pop ebp */
   5459     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x390021B9: ret 0x10 */
   5460     RECOMP_REGS_OUT();
   5461 }
   5462 
   5463 void sub_39002061(void) {
   5464     int _fpu_cmp = 0;
   5465     uint32_t _cf = 0;
   5466     int _df = 1;
   5467     uint32_t _flag_k = FK_NONE;
   5468     uint32_t _flag_a = 0, _flag_b = 0;
   5469     uint32_t _itail_tgt = 0;
   5470     RECOMP_REGS_LOCALS
   5471     RECOMP_ENTER(0x39002061u);
   5472 
   5473 L_39002061:
   5474     eax = MEM32(ebp + 0x10); /* 0x39002061: mov eax, dword ptr [ebp + 0x10] */
   5475     /* test eax, eax */ /* 0x39002064: test eax, eax */
   5476     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5477     _cf = 0;
   5478     _flag_k = FK_TEST;
   5479     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002070; /* 0x39002066: jne 0x39002070 */
   5480 L_39002068:
   5481     eax = MEM32(ecx + 0x38); /* 0x39002068: mov eax, dword ptr [ecx + 0x38] */
   5482     MEM32(ebp + (-0x10)) = eax; /* 0x3900206B: mov dword ptr [ebp - 0x10], eax */
   5483     goto L_39002083; /* 0x3900206E: jmp 0x39002083 */
   5484 L_39002070:
   5485     /* cmp eax, 2 */ /* 0x39002070: cmp eax, 2 */
   5486     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   5487     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5488     _flag_k = FK_CMP;
   5489     if (CMP_NE(_flag_a, _flag_b)) goto L_3900207D; /* 0x39002073: jne 0x3900207d */
   5490 L_39002075:
   5491     ecx = MEM32(ecx + 0x50); /* 0x39002075: mov ecx, dword ptr [ecx + 0x50] */
   5492     MEM32(ebp + (-0x10)) = ecx; /* 0x39002078: mov dword ptr [ebp - 0x10], ecx */
   5493     goto L_39002083; /* 0x3900207B: jmp 0x39002083 */
   5494 L_3900207D:
   5495     edx = MEM32(ecx + 0x44); /* 0x3900207D: mov edx, dword ptr [ecx + 0x44] */
   5496     MEM32(ebp + (-0x10)) = edx; /* 0x39002080: mov dword ptr [ebp - 0x10], edx */
   5497 L_39002083:
   5498     SET_LO8(eax, MEM8(ebp + 0x17)); /* 0x39002083: mov al, byte ptr [ebp + 0x17] */
   5499     PUSH32(esp, 0); /* 0x39002086: push 0 */
   5500     ecx = ebp + (-0x28); /* 0x39002088: lea ecx, [ebp - 0x28] */
   5501     MEM8(ebp + (-0x28)) = (uint8_t)(LO8(eax)); /* 0x3900208B: mov byte ptr [ebp - 0x28], al */
   5502     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x3900208E: call dword ptr [0x3900b040] */
   5503     RECOMP_FLAGS_IN();
   5504     esi = MEM32(ebp + 0x8); /* 0x39002094: mov esi, dword ptr [ebp + 8] */
   5505     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   5506     ecx = ecx | 0xFFFFFFFFu; /* 0x39002097: or ecx, 0xffffffff */
   5507     _cf = 0;
   5508     _flag_k = FK_TEST;
   5509     edi = esi; /* 0x3900209A: mov edi, esi */
   5510     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5511     eax = 0; /* 0x3900209C: xor eax, eax */
   5512     _cf = 0;
   5513     _flag_k = FK_TEST;
   5514     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x3900209E: repne scasb al, byte ptr es:[edi] */
   5515     ecx = ~ecx; /* 0x390020A0: not ecx */
   5516     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   5517     ecx = ecx - 1; /* 0x390020A2: dec ecx */
   5518     _flag_k = FK_DEC;
   5519     PUSH32(esp, 1); /* 0x390020A3: push 1 */
   5520     ebx = ecx; /* 0x390020A5: mov ebx, ecx */
   5521     ecx = ebp + (-0x28); /* 0x390020A7: lea ecx, [ebp - 0x28] */
   5522     PUSH32(esp, ebx); /* 0x390020AA: push ebx */
   5523     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x390020AB: call dword ptr [0x3900b034] */
   5524     RECOMP_FLAGS_IN();
   5525     /* test LO8(eax), LO8(eax) */ /* 0x390020B1: test al, al */
   5526     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   5527     _cf = 0;
   5528     _flag_k = FK_NARROW(FK_TEST, 24);
   5529     if (TEST_Z(_flag_a, _flag_b)) goto L_390020D5; /* 0x390020B3: je 0x390020d5 */
   5530 L_390020B5:
   5531     edi = MEM32(ebp + (-0x24)); /* 0x390020B5: mov edi, dword ptr [ebp - 0x24] */
   5532     ecx = ebx; /* 0x390020B8: mov ecx, ebx */
   5533     edx = ecx; /* 0x390020BA: mov edx, ecx */
   5534     PUSH32(esp, ebx); /* 0x390020BC: push ebx */
   5535     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x390020BD: shr ecx, 2 */
   5536     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5537     ecx = ecx >> 2u; /* 0x390020BD: shr ecx, 2 */
   5538     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390020C0: 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; }
   5539     ecx = edx; /* 0x390020C2: mov ecx, edx */
   5540     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   5541     ecx = ecx & 3; /* 0x390020C4: and ecx, 3 */
   5542     _cf = 0;
   5543     _flag_k = FK_TEST;
   5544     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x390020C7: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   5545     ecx = ebp + (-0x28); /* 0x390020C9: lea ecx, [ebp - 0x28] */
   5546     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x390020CC: call dword ptr [0x3900b038] */
   5547     RECOMP_FLAGS_IN();
   5548     esi = MEM32(ebp + 0x8); /* 0x390020D2: mov esi, dword ptr [ebp + 8] */
   5549 L_390020D5:
   5550     edi = MEM32(ebp + (-0x10)); /* 0x390020D5: mov edi, dword ptr [ebp - 0x10] */
   5551     eax = ebp + (-0x28); /* 0x390020D8: lea eax, [ebp - 0x28] */
   5552     ecx = ebp + (-0x18); /* 0x390020DB: lea ecx, [ebp - 0x18] */
   5553     PUSH32(esp, eax); /* 0x390020DE: push eax */
   5554     PUSH32(esp, ecx); /* 0x390020DF: push ecx */
   5555     ecx = edi; /* 0x390020E0: mov ecx, edi */
   5556     MEM32(ebp + (-0x4)) = 0; /* 0x390020E2: mov dword ptr [ebp - 4], 0 */
   5557     RECOMP_ICALL(0x390049E0u); /* 0x390020E9: call 0x390049e0 */ /* not lifted */
   5558     RECOMP_FLAGS_IN();
   5559     ebx = MEM32(eax); /* 0x390020EE: mov ebx, dword ptr [eax] */
   5560     PUSH32(esp, 1); /* 0x390020F0: push 1 */
   5561     ecx = ebp + (-0x28); /* 0x390020F2: lea ecx, [ebp - 0x28] */
   5562     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x390020F5: mov dword ptr [ebp - 4], 0xffffffff */
   5563     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390020FC: call dword ptr [0x3900b040] */
   5564     RECOMP_FLAGS_IN();
   5565     /* cmp ebx, MEM32(edi + 0x4) */ /* 0x39002102: cmp ebx, dword ptr [edi + 4] */
   5566     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(edi + 0x4));
   5567     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5568     _flag_k = FK_CMP;
   5569     if (CMP_NE(_flag_a, _flag_b)) goto L_39002125; /* 0x39002105: jne 0x39002125 */
   5570 L_39002107:
   5571     edx = MEM32(ebp + 0x10); /* 0x39002107: mov edx, dword ptr [ebp + 0x10] */
   5572     eax = MEM32(ebp + 0xC); /* 0x3900210A: mov eax, dword ptr [ebp + 0xc] */
   5573     ecx = MEM32(ebp + (-0x14)); /* 0x3900210D: mov ecx, dword ptr [ebp - 0x14] */
   5574     PUSH32(esp, edx); /* 0x39002110: push edx */
   5575     PUSH32(esp, 0x3E8u); /* 0x39002111: push 0x3e8 */
   5576     PUSH32(esp, eax); /* 0x39002116: push eax */
   5577     PUSH32(esp, esi); /* 0x39002117: push esi */
   5578     RECOMP_ICALL(0x39002940u); /* 0x39002118: call 0x39002940 */ /* not lifted */
   5579     RECOMP_FLAGS_IN();
   5580     ecx = MEM32(ebp + (-0x14)); /* 0x3900211D: mov ecx, dword ptr [ebp - 0x14] */
   5581     RECOMP_BACKEDGE();
   5582     goto L_39002061; /* 0x39002120: jmp 0x39002061 */
   5583 L_39002125:
   5584     esi = MEM32(ebp + 0xC); /* 0x39002125: mov esi, dword ptr [ebp + 0xc] */
   5585     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   5586     ecx = ecx | 0xFFFFFFFFu; /* 0x39002128: or ecx, 0xffffffff */
   5587     _cf = 0;
   5588     _flag_k = FK_TEST;
   5589     edi = esi; /* 0x3900212B: mov edi, esi */
   5590     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5591     eax = 0; /* 0x3900212D: xor eax, eax */
   5592     _cf = 0;
   5593     _flag_k = FK_TEST;
   5594     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x1Cu);
   5595     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5596     ebx = ebx + 0x1Cu; /* 0x3900212F: add ebx, 0x1c */
   5597     _flag_k = FK_ADD;
   5598     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39002132: repne scasb al, byte ptr es:[edi] */
   5599     eax = MEM32(ebx + 0x10); /* 0x39002134: mov eax, dword ptr [ebx + 0x10] */
   5600     ecx = ~ecx; /* 0x39002137: not ecx */
   5601     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   5602     ecx = ecx - 1; /* 0x39002139: dec ecx */
   5603     _flag_k = FK_DEC;
   5604     edi = ecx; /* 0x3900213A: mov edi, ecx */
   5605     /* cmp edi, eax */ /* 0x3900213C: cmp edi, eax */
   5606     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   5607     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5608     _flag_k = FK_CMP;
   5609     MEM32(ebp + 0x8) = edi; /* 0x3900213E: mov dword ptr [ebp + 8], edi */
   5610     if (CMP_LE(_flag_a, _flag_b)) goto L_39002148; /* 0x39002141: jle 0x39002148 */
   5611 L_39002143:
   5612     MEM32(ebp + 0x8) = eax; /* 0x39002143: mov dword ptr [ebp + 8], eax */
   5613     edi = eax; /* 0x39002146: mov edi, eax */
   5614 L_39002148:
   5615     PUSH32(esp, 1); /* 0x39002148: push 1 */
   5616     PUSH32(esp, edi); /* 0x3900214A: push edi */
   5617     ecx = ebx; /* 0x3900214B: mov ecx, ebx */
   5618     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x3900214D: call dword ptr [0x3900b034] */
   5619     RECOMP_FLAGS_IN();
   5620     /* test LO8(eax), LO8(eax) */ /* 0x39002153: test al, al */
   5621     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   5622     _cf = 0;
   5623     _flag_k = FK_NARROW(FK_TEST, 24);
   5624     if (TEST_Z(_flag_a, _flag_b)) goto L_39002177; /* 0x39002155: je 0x39002177 */
   5625 L_39002157:
   5626     ecx = edi; /* 0x39002157: mov ecx, edi */
   5627     edi = MEM32(ebx + 0x4); /* 0x39002159: mov edi, dword ptr [ebx + 4] */
   5628     edx = ecx; /* 0x3900215C: mov edx, ecx */
   5629     eax = MEM32(ebp + 0x8); /* 0x3900215E: mov eax, dword ptr [ebp + 8] */
   5630     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39002161: shr ecx, 2 */
   5631     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5632     ecx = ecx >> 2u; /* 0x39002161: shr ecx, 2 */
   5633     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39002164: 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; }
   5634     ecx = edx; /* 0x39002166: mov ecx, edx */
   5635     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   5636     ecx = ecx & 3; /* 0x39002168: and ecx, 3 */
   5637     _cf = 0;
   5638     _flag_k = FK_TEST;
   5639     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x3900216B: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   5640     ecx = MEM32(ebx + 0x4); /* 0x3900216D: mov ecx, dword ptr [ebx + 4] */
   5641     MEM32(ebx + 0x8) = eax; /* 0x39002170: mov dword ptr [ebx + 8], eax */
   5642     MEM8(ecx + eax) = (uint8_t)(0); /* 0x39002173: mov byte ptr [ecx + eax], 0 */
   5643 L_39002177:
   5644     SET_LO8(eax, MEM8(ebp + 0x14)); /* 0x39002177: mov al, byte ptr [ebp + 0x14] */
   5645     /* test LO8(eax), LO8(eax) */ /* 0x3900217A: test al, al */
   5646     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   5647     _cf = 0;
   5648     _flag_k = FK_NARROW(FK_TEST, 24);
   5649     if (TEST_Z(_flag_a, _flag_b)) goto L_3900219B; /* 0x3900217C: je 0x3900219b */
   5650 L_3900217E:
   5651     ecx = MEM32(ebx + 0x14); /* 0x3900217E: mov ecx, dword ptr [ebx + 0x14] */
   5652     /* test ecx, ecx */ /* 0x39002181: test ecx, ecx */
   5653     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   5654     _cf = 0;
   5655     _flag_k = FK_TEST;
   5656     if (TEST_Z(_flag_a, _flag_b)) goto L_3900219B; /* 0x39002183: je 0x3900219b */
   5657 L_39002185:
   5658     eax = MEM32(ebx + 0x4); /* 0x39002185: mov eax, dword ptr [ebx + 4] */
   5659     /* test eax, eax */ /* 0x39002188: test eax, eax */
   5660     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5661     _cf = 0;
   5662     _flag_k = FK_TEST;
   5663     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002191; /* 0x3900218A: jne 0x39002191 */
   5664 L_3900218C:
   5665     eax = MEM32(0x3900B02C); /* 0x3900218C: mov eax, dword ptr [0x3900b02c] */
   5666 L_39002191:
   5667     edx = MEM32(ebx + 0x18); /* 0x39002191: mov edx, dword ptr [ebx + 0x18] */
   5668     PUSH32(esp, eax); /* 0x39002194: push eax */
   5669     PUSH32(esp, edx); /* 0x39002195: push edx */
   5670     RECOMP_ICALL(ecx); /* 0x39002196: call ecx */
   5671     RECOMP_FLAGS_IN();
   5672     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5673     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5674     esp = esp + 8; /* 0x39002198: add esp, 8 */
   5675     _flag_k = FK_ADD;
   5676 L_3900219B:
   5677     ebx = MEM32(ebx + 0x4); /* 0x3900219B: mov ebx, dword ptr [ebx + 4] */
   5678     eax = MEM32(0x3900B02C); /* 0x3900219E: mov eax, dword ptr [0x3900b02c] */
   5679     /* test ebx, ebx */ /* 0x390021A3: test ebx, ebx */
   5680     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
   5681     _cf = 0;
   5682     _flag_k = FK_TEST;
   5683     if (TEST_Z(_flag_a, _flag_b)) goto L_390021A9; /* 0x390021A5: je 0x390021a9 */
   5684 L_390021A7:
   5685     eax = ebx; /* 0x390021A7: mov eax, ebx */
   5686 L_390021A9:
   5687     ecx = MEM32(ebp + (-0xC)); /* 0x390021A9: mov ecx, dword ptr [ebp - 0xc] */
   5688     edi = POP32_VAL(esp); /* 0x390021AC: pop edi */
   5689     esi = POP32_VAL(esp); /* 0x390021AD: pop esi */
   5690     ebx = POP32_VAL(esp); /* 0x390021AE: pop ebx */
   5691     MEM32(FS_BASE + (0)) = ecx; /* 0x390021AF: mov dword ptr fs:[0], ecx */
   5692     esp = ebp; /* 0x390021B6: mov esp, ebp */
   5693     ebp = POP32_VAL(esp); /* 0x390021B8: pop ebp */
   5694     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x390021B9: ret 0x10 */
   5695     RECOMP_REGS_OUT();
   5696 }
   5697 
   5698 void sub_39002083(void) {
   5699     int _fpu_cmp = 0;
   5700     uint32_t _cf = 0;
   5701     int _df = 1;
   5702     uint32_t _flag_k = FK_NONE;
   5703     uint32_t _flag_a = 0, _flag_b = 0;
   5704     uint32_t _itail_tgt = 0;
   5705     RECOMP_REGS_LOCALS
   5706     RECOMP_ENTER(0x39002083u);
   5707 
   5708     goto L_39002083;
   5709 L_39002061:
   5710     eax = MEM32(ebp + 0x10); /* 0x39002061: mov eax, dword ptr [ebp + 0x10] */
   5711     /* test eax, eax */ /* 0x39002064: test eax, eax */
   5712     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5713     _cf = 0;
   5714     _flag_k = FK_TEST;
   5715     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002070; /* 0x39002066: jne 0x39002070 */
   5716 L_39002068:
   5717     eax = MEM32(ecx + 0x38); /* 0x39002068: mov eax, dword ptr [ecx + 0x38] */
   5718     MEM32(ebp + (-0x10)) = eax; /* 0x3900206B: mov dword ptr [ebp - 0x10], eax */
   5719     goto L_39002083; /* 0x3900206E: jmp 0x39002083 */
   5720 L_39002070:
   5721     /* cmp eax, 2 */ /* 0x39002070: cmp eax, 2 */
   5722     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   5723     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5724     _flag_k = FK_CMP;
   5725     if (CMP_NE(_flag_a, _flag_b)) goto L_3900207D; /* 0x39002073: jne 0x3900207d */
   5726 L_39002075:
   5727     ecx = MEM32(ecx + 0x50); /* 0x39002075: mov ecx, dword ptr [ecx + 0x50] */
   5728     MEM32(ebp + (-0x10)) = ecx; /* 0x39002078: mov dword ptr [ebp - 0x10], ecx */
   5729     goto L_39002083; /* 0x3900207B: jmp 0x39002083 */
   5730 L_3900207D:
   5731     edx = MEM32(ecx + 0x44); /* 0x3900207D: mov edx, dword ptr [ecx + 0x44] */
   5732     MEM32(ebp + (-0x10)) = edx; /* 0x39002080: mov dword ptr [ebp - 0x10], edx */
   5733 L_39002083:
   5734     SET_LO8(eax, MEM8(ebp + 0x17)); /* 0x39002083: mov al, byte ptr [ebp + 0x17] */
   5735     PUSH32(esp, 0); /* 0x39002086: push 0 */
   5736     ecx = ebp + (-0x28); /* 0x39002088: lea ecx, [ebp - 0x28] */
   5737     MEM8(ebp + (-0x28)) = (uint8_t)(LO8(eax)); /* 0x3900208B: mov byte ptr [ebp - 0x28], al */
   5738     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x3900208E: call dword ptr [0x3900b040] */
   5739     RECOMP_FLAGS_IN();
   5740     esi = MEM32(ebp + 0x8); /* 0x39002094: mov esi, dword ptr [ebp + 8] */
   5741     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   5742     ecx = ecx | 0xFFFFFFFFu; /* 0x39002097: or ecx, 0xffffffff */
   5743     _cf = 0;
   5744     _flag_k = FK_TEST;
   5745     edi = esi; /* 0x3900209A: mov edi, esi */
   5746     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5747     eax = 0; /* 0x3900209C: xor eax, eax */
   5748     _cf = 0;
   5749     _flag_k = FK_TEST;
   5750     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x3900209E: repne scasb al, byte ptr es:[edi] */
   5751     ecx = ~ecx; /* 0x390020A0: not ecx */
   5752     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   5753     ecx = ecx - 1; /* 0x390020A2: dec ecx */
   5754     _flag_k = FK_DEC;
   5755     PUSH32(esp, 1); /* 0x390020A3: push 1 */
   5756     ebx = ecx; /* 0x390020A5: mov ebx, ecx */
   5757     ecx = ebp + (-0x28); /* 0x390020A7: lea ecx, [ebp - 0x28] */
   5758     PUSH32(esp, ebx); /* 0x390020AA: push ebx */
   5759     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x390020AB: call dword ptr [0x3900b034] */
   5760     RECOMP_FLAGS_IN();
   5761     /* test LO8(eax), LO8(eax) */ /* 0x390020B1: test al, al */
   5762     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   5763     _cf = 0;
   5764     _flag_k = FK_NARROW(FK_TEST, 24);
   5765     if (TEST_Z(_flag_a, _flag_b)) goto L_390020D5; /* 0x390020B3: je 0x390020d5 */
   5766 L_390020B5:
   5767     edi = MEM32(ebp + (-0x24)); /* 0x390020B5: mov edi, dword ptr [ebp - 0x24] */
   5768     ecx = ebx; /* 0x390020B8: mov ecx, ebx */
   5769     edx = ecx; /* 0x390020BA: mov edx, ecx */
   5770     PUSH32(esp, ebx); /* 0x390020BC: push ebx */
   5771     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x390020BD: shr ecx, 2 */
   5772     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5773     ecx = ecx >> 2u; /* 0x390020BD: shr ecx, 2 */
   5774     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390020C0: 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; }
   5775     ecx = edx; /* 0x390020C2: mov ecx, edx */
   5776     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   5777     ecx = ecx & 3; /* 0x390020C4: and ecx, 3 */
   5778     _cf = 0;
   5779     _flag_k = FK_TEST;
   5780     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x390020C7: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   5781     ecx = ebp + (-0x28); /* 0x390020C9: lea ecx, [ebp - 0x28] */
   5782     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x390020CC: call dword ptr [0x3900b038] */
   5783     RECOMP_FLAGS_IN();
   5784     esi = MEM32(ebp + 0x8); /* 0x390020D2: mov esi, dword ptr [ebp + 8] */
   5785 L_390020D5:
   5786     edi = MEM32(ebp + (-0x10)); /* 0x390020D5: mov edi, dword ptr [ebp - 0x10] */
   5787     eax = ebp + (-0x28); /* 0x390020D8: lea eax, [ebp - 0x28] */
   5788     ecx = ebp + (-0x18); /* 0x390020DB: lea ecx, [ebp - 0x18] */
   5789     PUSH32(esp, eax); /* 0x390020DE: push eax */
   5790     PUSH32(esp, ecx); /* 0x390020DF: push ecx */
   5791     ecx = edi; /* 0x390020E0: mov ecx, edi */
   5792     MEM32(ebp + (-0x4)) = 0; /* 0x390020E2: mov dword ptr [ebp - 4], 0 */
   5793     RECOMP_ICALL(0x390049E0u); /* 0x390020E9: call 0x390049e0 */ /* not lifted */
   5794     RECOMP_FLAGS_IN();
   5795     ebx = MEM32(eax); /* 0x390020EE: mov ebx, dword ptr [eax] */
   5796     PUSH32(esp, 1); /* 0x390020F0: push 1 */
   5797     ecx = ebp + (-0x28); /* 0x390020F2: lea ecx, [ebp - 0x28] */
   5798     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x390020F5: mov dword ptr [ebp - 4], 0xffffffff */
   5799     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390020FC: call dword ptr [0x3900b040] */
   5800     RECOMP_FLAGS_IN();
   5801     /* cmp ebx, MEM32(edi + 0x4) */ /* 0x39002102: cmp ebx, dword ptr [edi + 4] */
   5802     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(edi + 0x4));
   5803     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5804     _flag_k = FK_CMP;
   5805     if (CMP_NE(_flag_a, _flag_b)) goto L_39002125; /* 0x39002105: jne 0x39002125 */
   5806 L_39002107:
   5807     edx = MEM32(ebp + 0x10); /* 0x39002107: mov edx, dword ptr [ebp + 0x10] */
   5808     eax = MEM32(ebp + 0xC); /* 0x3900210A: mov eax, dword ptr [ebp + 0xc] */
   5809     ecx = MEM32(ebp + (-0x14)); /* 0x3900210D: mov ecx, dword ptr [ebp - 0x14] */
   5810     PUSH32(esp, edx); /* 0x39002110: push edx */
   5811     PUSH32(esp, 0x3E8u); /* 0x39002111: push 0x3e8 */
   5812     PUSH32(esp, eax); /* 0x39002116: push eax */
   5813     PUSH32(esp, esi); /* 0x39002117: push esi */
   5814     RECOMP_ICALL(0x39002940u); /* 0x39002118: call 0x39002940 */ /* not lifted */
   5815     RECOMP_FLAGS_IN();
   5816     ecx = MEM32(ebp + (-0x14)); /* 0x3900211D: mov ecx, dword ptr [ebp - 0x14] */
   5817     RECOMP_BACKEDGE();
   5818     goto L_39002061; /* 0x39002120: jmp 0x39002061 */
   5819 L_39002125:
   5820     esi = MEM32(ebp + 0xC); /* 0x39002125: mov esi, dword ptr [ebp + 0xc] */
   5821     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   5822     ecx = ecx | 0xFFFFFFFFu; /* 0x39002128: or ecx, 0xffffffff */
   5823     _cf = 0;
   5824     _flag_k = FK_TEST;
   5825     edi = esi; /* 0x3900212B: mov edi, esi */
   5826     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5827     eax = 0; /* 0x3900212D: xor eax, eax */
   5828     _cf = 0;
   5829     _flag_k = FK_TEST;
   5830     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x1Cu);
   5831     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5832     ebx = ebx + 0x1Cu; /* 0x3900212F: add ebx, 0x1c */
   5833     _flag_k = FK_ADD;
   5834     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39002132: repne scasb al, byte ptr es:[edi] */
   5835     eax = MEM32(ebx + 0x10); /* 0x39002134: mov eax, dword ptr [ebx + 0x10] */
   5836     ecx = ~ecx; /* 0x39002137: not ecx */
   5837     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   5838     ecx = ecx - 1; /* 0x39002139: dec ecx */
   5839     _flag_k = FK_DEC;
   5840     edi = ecx; /* 0x3900213A: mov edi, ecx */
   5841     /* cmp edi, eax */ /* 0x3900213C: cmp edi, eax */
   5842     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   5843     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5844     _flag_k = FK_CMP;
   5845     MEM32(ebp + 0x8) = edi; /* 0x3900213E: mov dword ptr [ebp + 8], edi */
   5846     if (CMP_LE(_flag_a, _flag_b)) goto L_39002148; /* 0x39002141: jle 0x39002148 */
   5847 L_39002143:
   5848     MEM32(ebp + 0x8) = eax; /* 0x39002143: mov dword ptr [ebp + 8], eax */
   5849     edi = eax; /* 0x39002146: mov edi, eax */
   5850 L_39002148:
   5851     PUSH32(esp, 1); /* 0x39002148: push 1 */
   5852     PUSH32(esp, edi); /* 0x3900214A: push edi */
   5853     ecx = ebx; /* 0x3900214B: mov ecx, ebx */
   5854     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x3900214D: call dword ptr [0x3900b034] */
   5855     RECOMP_FLAGS_IN();
   5856     /* test LO8(eax), LO8(eax) */ /* 0x39002153: test al, al */
   5857     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   5858     _cf = 0;
   5859     _flag_k = FK_NARROW(FK_TEST, 24);
   5860     if (TEST_Z(_flag_a, _flag_b)) goto L_39002177; /* 0x39002155: je 0x39002177 */
   5861 L_39002157:
   5862     ecx = edi; /* 0x39002157: mov ecx, edi */
   5863     edi = MEM32(ebx + 0x4); /* 0x39002159: mov edi, dword ptr [ebx + 4] */
   5864     edx = ecx; /* 0x3900215C: mov edx, ecx */
   5865     eax = MEM32(ebp + 0x8); /* 0x3900215E: mov eax, dword ptr [ebp + 8] */
   5866     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39002161: shr ecx, 2 */
   5867     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5868     ecx = ecx >> 2u; /* 0x39002161: shr ecx, 2 */
   5869     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39002164: 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; }
   5870     ecx = edx; /* 0x39002166: mov ecx, edx */
   5871     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   5872     ecx = ecx & 3; /* 0x39002168: and ecx, 3 */
   5873     _cf = 0;
   5874     _flag_k = FK_TEST;
   5875     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x3900216B: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   5876     ecx = MEM32(ebx + 0x4); /* 0x3900216D: mov ecx, dword ptr [ebx + 4] */
   5877     MEM32(ebx + 0x8) = eax; /* 0x39002170: mov dword ptr [ebx + 8], eax */
   5878     MEM8(ecx + eax) = (uint8_t)(0); /* 0x39002173: mov byte ptr [ecx + eax], 0 */
   5879 L_39002177:
   5880     SET_LO8(eax, MEM8(ebp + 0x14)); /* 0x39002177: mov al, byte ptr [ebp + 0x14] */
   5881     /* test LO8(eax), LO8(eax) */ /* 0x3900217A: test al, al */
   5882     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   5883     _cf = 0;
   5884     _flag_k = FK_NARROW(FK_TEST, 24);
   5885     if (TEST_Z(_flag_a, _flag_b)) goto L_3900219B; /* 0x3900217C: je 0x3900219b */
   5886 L_3900217E:
   5887     ecx = MEM32(ebx + 0x14); /* 0x3900217E: mov ecx, dword ptr [ebx + 0x14] */
   5888     /* test ecx, ecx */ /* 0x39002181: test ecx, ecx */
   5889     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   5890     _cf = 0;
   5891     _flag_k = FK_TEST;
   5892     if (TEST_Z(_flag_a, _flag_b)) goto L_3900219B; /* 0x39002183: je 0x3900219b */
   5893 L_39002185:
   5894     eax = MEM32(ebx + 0x4); /* 0x39002185: mov eax, dword ptr [ebx + 4] */
   5895     /* test eax, eax */ /* 0x39002188: test eax, eax */
   5896     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5897     _cf = 0;
   5898     _flag_k = FK_TEST;
   5899     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002191; /* 0x3900218A: jne 0x39002191 */
   5900 L_3900218C:
   5901     eax = MEM32(0x3900B02C); /* 0x3900218C: mov eax, dword ptr [0x3900b02c] */
   5902 L_39002191:
   5903     edx = MEM32(ebx + 0x18); /* 0x39002191: mov edx, dword ptr [ebx + 0x18] */
   5904     PUSH32(esp, eax); /* 0x39002194: push eax */
   5905     PUSH32(esp, edx); /* 0x39002195: push edx */
   5906     RECOMP_ICALL(ecx); /* 0x39002196: call ecx */
   5907     RECOMP_FLAGS_IN();
   5908     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5909     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5910     esp = esp + 8; /* 0x39002198: add esp, 8 */
   5911     _flag_k = FK_ADD;
   5912 L_3900219B:
   5913     ebx = MEM32(ebx + 0x4); /* 0x3900219B: mov ebx, dword ptr [ebx + 4] */
   5914     eax = MEM32(0x3900B02C); /* 0x3900219E: mov eax, dword ptr [0x3900b02c] */
   5915     /* test ebx, ebx */ /* 0x390021A3: test ebx, ebx */
   5916     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
   5917     _cf = 0;
   5918     _flag_k = FK_TEST;
   5919     if (TEST_Z(_flag_a, _flag_b)) goto L_390021A9; /* 0x390021A5: je 0x390021a9 */
   5920 L_390021A7:
   5921     eax = ebx; /* 0x390021A7: mov eax, ebx */
   5922 L_390021A9:
   5923     ecx = MEM32(ebp + (-0xC)); /* 0x390021A9: mov ecx, dword ptr [ebp - 0xc] */
   5924     edi = POP32_VAL(esp); /* 0x390021AC: pop edi */
   5925     esi = POP32_VAL(esp); /* 0x390021AD: pop esi */
   5926     ebx = POP32_VAL(esp); /* 0x390021AE: pop ebx */
   5927     MEM32(FS_BASE + (0)) = ecx; /* 0x390021AF: mov dword ptr fs:[0], ecx */
   5928     esp = ebp; /* 0x390021B6: mov esp, ebp */
   5929     ebp = POP32_VAL(esp); /* 0x390021B8: pop ebp */
   5930     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x390021B9: ret 0x10 */
   5931     RECOMP_REGS_OUT();
   5932 }
   5933 
   5934 void sub_390021C0(void) {
   5935     int _fpu_cmp = 0;
   5936     uint32_t _cf = 0;
   5937     int _df = 1;
   5938     uint32_t _flag_k = FK_NONE;
   5939     uint32_t _flag_a = 0, _flag_b = 0;
   5940     uint32_t _itail_tgt = 0;
   5941     RECOMP_REGS_LOCALS
   5942     RECOMP_ENTER(0x390021C0u);
   5943 
   5944 L_390021C0:
   5945     PUSH32(esp, ebp); /* 0x390021C0: push ebp */
   5946     ebp = esp; /* 0x390021C1: mov ebp, esp */
   5947     PUSH32(esp, 0xFFFFFFFFu); /* 0x390021C3: push -1 */
   5948     PUSH32(esp, 0x3900A569u); /* 0x390021C5: push 0x3900a569 */
   5949     eax = MEM32(FS_BASE + (0)); /* 0x390021CA: mov eax, dword ptr fs:[0] */
   5950     PUSH32(esp, eax); /* 0x390021D0: push eax */
   5951     MEM32(FS_BASE + (0)) = esp; /* 0x390021D1: mov dword ptr fs:[0], esp */
   5952     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   5953     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5954     esp = esp - 0x14u; /* 0x390021D8: sub esp, 0x14 */
   5955     _flag_k = FK_CMP;
   5956     eax = MEM32(ebp + 0xC); /* 0x390021DB: mov eax, dword ptr [ebp + 0xc] */
   5957     /* test eax, eax */ /* 0x390021DE: test eax, eax */
   5958     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5959     _cf = 0;
   5960     _flag_k = FK_TEST;
   5961     if (TEST_NZ(_flag_a, _flag_b)) goto L_390021EA; /* 0x390021E0: jne 0x390021ea */
   5962 L_390021E2:
   5963     eax = MEM32(ecx + 0x30); /* 0x390021E2: mov eax, dword ptr [ecx + 0x30] */
   5964     MEM32(ebp + 0xC) = eax; /* 0x390021E5: mov dword ptr [ebp + 0xc], eax */
   5965     goto L_390021FD; /* 0x390021E8: jmp 0x390021fd */
   5966 L_390021EA:
   5967     /* cmp eax, 2 */ /* 0x390021EA: cmp eax, 2 */
   5968     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   5969     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5970     _flag_k = FK_CMP;
   5971     if (CMP_NE(_flag_a, _flag_b)) goto L_390021F7; /* 0x390021ED: jne 0x390021f7 */
   5972 L_390021EF:
   5973     ecx = MEM32(ecx + 0x48); /* 0x390021EF: mov ecx, dword ptr [ecx + 0x48] */
   5974     MEM32(ebp + 0xC) = ecx; /* 0x390021F2: mov dword ptr [ebp + 0xc], ecx */
   5975     goto L_390021FD; /* 0x390021F5: jmp 0x390021fd */
   5976 L_390021F7:
   5977     edx = MEM32(ecx + 0x3C); /* 0x390021F7: mov edx, dword ptr [ecx + 0x3c] */
   5978     MEM32(ebp + 0xC) = edx; /* 0x390021FA: mov dword ptr [ebp + 0xc], edx */
   5979 L_390021FD:
   5980     SET_LO8(eax, MEM8(ebp + 0xF)); /* 0x390021FD: mov al, byte ptr [ebp + 0xf] */
   5981     PUSH32(esp, ebx); /* 0x39002200: push ebx */
   5982     PUSH32(esp, esi); /* 0x39002201: push esi */
   5983     PUSH32(esp, edi); /* 0x39002202: push edi */
   5984     PUSH32(esp, 0); /* 0x39002203: push 0 */
   5985     ecx = ebp + (-0x20); /* 0x39002205: lea ecx, [ebp - 0x20] */
   5986     MEM8(ebp + (-0x20)) = (uint8_t)(LO8(eax)); /* 0x39002208: mov byte ptr [ebp - 0x20], al */
   5987     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x3900220B: call dword ptr [0x3900b040] */
   5988     RECOMP_FLAGS_IN();
   5989     esi = MEM32(ebp + 0x8); /* 0x39002211: mov esi, dword ptr [ebp + 8] */
   5990     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   5991     ecx = ecx | 0xFFFFFFFFu; /* 0x39002214: or ecx, 0xffffffff */
   5992     _cf = 0;
   5993     _flag_k = FK_TEST;
   5994     edi = esi; /* 0x39002217: mov edi, esi */
   5995     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5996     eax = 0; /* 0x39002219: xor eax, eax */
   5997     _cf = 0;
   5998     _flag_k = FK_TEST;
   5999     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x3900221B: repne scasb al, byte ptr es:[edi] */
   6000     ecx = ~ecx; /* 0x3900221D: not ecx */
   6001     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   6002     ecx = ecx - 1; /* 0x3900221F: dec ecx */
   6003     _flag_k = FK_DEC;
   6004     PUSH32(esp, 1); /* 0x39002220: push 1 */
   6005     ebx = ecx; /* 0x39002222: mov ebx, ecx */
   6006     ecx = ebp + (-0x20); /* 0x39002224: lea ecx, [ebp - 0x20] */
   6007     PUSH32(esp, ebx); /* 0x39002227: push ebx */
   6008     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39002228: call dword ptr [0x3900b034] */
   6009     RECOMP_FLAGS_IN();
   6010     /* test LO8(eax), LO8(eax) */ /* 0x3900222E: test al, al */
   6011     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   6012     _cf = 0;
   6013     _flag_k = FK_NARROW(FK_TEST, 24);
   6014     if (TEST_Z(_flag_a, _flag_b)) goto L_3900224F; /* 0x39002230: je 0x3900224f */
   6015 L_39002232:
   6016     edi = MEM32(ebp + (-0x1C)); /* 0x39002232: mov edi, dword ptr [ebp - 0x1c] */
   6017     ecx = ebx; /* 0x39002235: mov ecx, ebx */
   6018     edx = ecx; /* 0x39002237: mov edx, ecx */
   6019     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39002239: shr ecx, 2 */
   6020     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6021     ecx = ecx >> 2u; /* 0x39002239: shr ecx, 2 */
   6022     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x3900223C: 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; }
   6023     ecx = edx; /* 0x3900223E: mov ecx, edx */
   6024     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   6025     ecx = ecx & 3; /* 0x39002240: and ecx, 3 */
   6026     _cf = 0;
   6027     _flag_k = FK_TEST;
   6028     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39002243: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   6029     eax = MEM32(ebp + (-0x1C)); /* 0x39002245: mov eax, dword ptr [ebp - 0x1c] */
   6030     MEM32(ebp + (-0x18)) = ebx; /* 0x39002248: mov dword ptr [ebp - 0x18], ebx */
   6031     MEM8(eax + ebx) = (uint8_t)(0); /* 0x3900224B: mov byte ptr [eax + ebx], 0 */
   6032 L_3900224F:
   6033     edi = MEM32(ebp + 0xC); /* 0x3900224F: mov edi, dword ptr [ebp + 0xc] */
   6034     ecx = ebp + (-0x20); /* 0x39002252: lea ecx, [ebp - 0x20] */
   6035     edx = ebp + (-0x10); /* 0x39002255: lea edx, [ebp - 0x10] */
   6036     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6037     ebx = 0; /* 0x39002258: xor ebx, ebx */
   6038     _cf = 0;
   6039     _flag_k = FK_TEST;
   6040     PUSH32(esp, ecx); /* 0x3900225A: push ecx */
   6041     PUSH32(esp, edx); /* 0x3900225B: push edx */
   6042     ecx = edi; /* 0x3900225C: mov ecx, edi */
   6043     MEM32(ebp + (-0x4)) = ebx; /* 0x3900225E: mov dword ptr [ebp - 4], ebx */
   6044     RECOMP_ICALL(0x390061B0u); /* 0x39002261: call 0x390061b0 */ /* not lifted */
   6045     RECOMP_FLAGS_IN();
   6046     eax = MEM32(eax); /* 0x39002266: mov eax, dword ptr [eax] */
   6047     ecx = MEM32(edi + 0x4); /* 0x39002268: mov ecx, dword ptr [edi + 4] */
   6048     /* cmp eax, ecx */ /* 0x3900226B: cmp eax, ecx */
   6049     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   6050     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6051     _flag_k = FK_CMP;
   6052     MEM32(ebp + 0xC) = eax; /* 0x3900226D: mov dword ptr [ebp + 0xc], eax */
   6053     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900228C; /* 0x39002270: je 0x3900228c */
   6054 L_39002272:
   6055     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu);
   6056     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6057     eax = eax + 0xCu; /* 0x39002272: add eax, 0xc */
   6058     _flag_k = FK_ADD;
   6059     PUSH32(esp, eax); /* 0x39002275: push eax */
   6060     eax = ebp + (-0x20); /* 0x39002276: lea eax, [ebp - 0x20] */
   6061     PUSH32(esp, eax); /* 0x39002279: push eax */
   6062     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x3900227A: call dword ptr [0x3900b030] */
   6063     RECOMP_FLAGS_IN();
   6064     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   6065     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6066     esp = esp + 8; /* 0x39002280: add esp, 8 */
   6067     _flag_k = FK_ADD;
   6068     /* test LO8(eax), LO8(eax) */ /* 0x39002283: test al, al */
   6069     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   6070     _cf = 0;
   6071     _flag_k = FK_NARROW(FK_TEST, 24);
   6072     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900228C; /* 0x39002285: jne 0x3900228c */
   6073 L_39002287:
   6074     eax = ebp + 0xC; /* 0x39002287: lea eax, [ebp + 0xc] */
   6075     goto L_39002295; /* 0x3900228A: jmp 0x39002295 */
   6076 L_3900228C:
   6077     ecx = MEM32(edi + 0x4); /* 0x3900228C: mov ecx, dword ptr [edi + 4] */
   6078     eax = ebp + 0x8; /* 0x3900228F: lea eax, [ebp + 8] */
   6079     MEM32(ebp + 0x8) = ecx; /* 0x39002292: mov dword ptr [ebp + 8], ecx */
   6080 L_39002295:
   6081     esi = MEM32(eax); /* 0x39002295: mov esi, dword ptr [eax] */
   6082     eax = MEM32(ebp + (-0x1C)); /* 0x39002297: mov eax, dword ptr [ebp - 0x1c] */
   6083     /* cmp eax, ebx */ /* 0x3900229A: cmp eax, ebx */
   6084     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   6085     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6086     _flag_k = FK_CMP;
   6087     if (CMP_EQ(_flag_a, _flag_b)) goto L_390022BB; /* 0x3900229C: je 0x390022bb */
   6088 L_3900229E:
   6089     ecx = eax + (-0x1); /* 0x3900229E: lea ecx, [eax - 1] */
   6090     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x390022A1: mov al, byte ptr [eax - 1] */
   6091     /* test LO8(eax), LO8(eax) */ /* 0x390022A4: test al, al */
   6092     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   6093     _cf = 0;
   6094     _flag_k = FK_NARROW(FK_TEST, 24);
   6095     if (TEST_Z(_flag_a, _flag_b)) goto L_390022B2; /* 0x390022A6: je 0x390022b2 */
   6096 L_390022A8:
   6097     /* cmp LO8(eax), 0xFFu */ /* 0x390022A8: cmp al, 0xff */
   6098     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
   6099     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6100     _flag_k = FK_NARROW(FK_CMP, 24);
   6101     if (CMP_EQ(_flag_a, _flag_b)) goto L_390022B2; /* 0x390022AA: je 0x390022b2 */
   6102 L_390022AC:
   6103     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
   6104     SET_LO8(eax, LO8(eax) - 1); /* 0x390022AC: dec al */
   6105     _flag_k = FK_NARROW(FK_DEC, 24);
   6106     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x390022AE: mov byte ptr [ecx], al */
   6107     goto L_390022BB; /* 0x390022B0: jmp 0x390022bb */
   6108 L_390022B2:
   6109     PUSH32(esp, ecx); /* 0x390022B2: push ecx */
   6110     RECOMP_ICALL(0x3900A0A0u); /* 0x390022B3: call 0x3900a0a0 */ /* not lifted */
   6111     RECOMP_FLAGS_IN();
   6112     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6113     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6114     esp = esp + 4; /* 0x390022B8: add esp, 4 */
   6115     _flag_k = FK_ADD;
   6116 L_390022BB:
   6117     eax = MEM32(edi + 0x4); /* 0x390022BB: mov eax, dword ptr [edi + 4] */
   6118     MEM32(ebp + (-0x1C)) = ebx; /* 0x390022BE: mov dword ptr [ebp - 0x1c], ebx */
   6119     /* cmp esi, eax */ /* 0x390022C1: cmp esi, eax */
   6120     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   6121     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6122     _flag_k = FK_CMP;
   6123     MEM32(ebp + (-0x18)) = ebx; /* 0x390022C3: mov dword ptr [ebp - 0x18], ebx */
   6124     MEM32(ebp + (-0x14)) = ebx; /* 0x390022C6: mov dword ptr [ebp - 0x14], ebx */
   6125     if (CMP_EQ(_flag_a, _flag_b)) goto L_390022E1; /* 0x390022C9: je 0x390022e1 */
   6126 L_390022CB:
   6127     eax = MEM32(esi + 0x1C); /* 0x390022CB: mov eax, dword ptr [esi + 0x1c] */
   6128     edi = POP32_VAL(esp); /* 0x390022CE: pop edi */
   6129     esi = POP32_VAL(esp); /* 0x390022CF: pop esi */
   6130     ebx = POP32_VAL(esp); /* 0x390022D0: pop ebx */
   6131     ecx = MEM32(ebp + (-0xC)); /* 0x390022D1: mov ecx, dword ptr [ebp - 0xc] */
   6132     MEM32(FS_BASE + (0)) = ecx; /* 0x390022D4: mov dword ptr fs:[0], ecx */
   6133     esp = ebp; /* 0x390022DB: mov esp, ebp */
   6134     ebp = POP32_VAL(esp); /* 0x390022DD: pop ebp */
   6135     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x390022DE: ret 8 */
   6136 L_390022E1:
   6137     ecx = MEM32(ebp + (-0xC)); /* 0x390022E1: mov ecx, dword ptr [ebp - 0xc] */
   6138     edi = POP32_VAL(esp); /* 0x390022E4: pop edi */
   6139     esi = POP32_VAL(esp); /* 0x390022E5: pop esi */
   6140     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6141     eax = 0; /* 0x390022E6: xor eax, eax */
   6142     _cf = 0;
   6143     _flag_k = FK_TEST;
   6144     ebx = POP32_VAL(esp); /* 0x390022E8: pop ebx */
   6145     MEM32(FS_BASE + (0)) = ecx; /* 0x390022E9: mov dword ptr fs:[0], ecx */
   6146     esp = ebp; /* 0x390022F0: mov esp, ebp */
   6147     ebp = POP32_VAL(esp); /* 0x390022F2: pop ebp */
   6148     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x390022F3: ret 8 */
   6149     RECOMP_REGS_OUT();
   6150 }
   6151 
   6152 void sub_39002300(void) {
   6153     int _fpu_cmp = 0;
   6154     uint32_t _cf = 0;
   6155     int _df = 1;
   6156     uint32_t _flag_k = FK_NONE;
   6157     uint32_t _flag_a = 0, _flag_b = 0;
   6158     uint32_t _itail_tgt = 0;
   6159     RECOMP_REGS_LOCALS
   6160     RECOMP_ENTER(0x39002300u);
   6161 
   6162 L_39002300:
   6163     PUSH32(esp, ebp); /* 0x39002300: push ebp */
   6164     ebp = esp; /* 0x39002301: mov ebp, esp */
   6165     PUSH32(esp, 0xFFFFFFFFu); /* 0x39002303: push -1 */
   6166     PUSH32(esp, 0x3900A589u); /* 0x39002305: push 0x3900a589 */
   6167     eax = MEM32(FS_BASE + (0)); /* 0x3900230A: mov eax, dword ptr fs:[0] */
   6168     PUSH32(esp, eax); /* 0x39002310: push eax */
   6169     MEM32(FS_BASE + (0)) = esp; /* 0x39002311: mov dword ptr fs:[0], esp */
   6170     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   6171     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6172     esp = esp - 0x14u; /* 0x39002318: sub esp, 0x14 */
   6173     _flag_k = FK_CMP;
   6174     eax = MEM32(ebp + 0xC); /* 0x3900231B: mov eax, dword ptr [ebp + 0xc] */
   6175     /* test eax, eax */ /* 0x3900231E: test eax, eax */
   6176     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   6177     _cf = 0;
   6178     _flag_k = FK_TEST;
   6179     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900232A; /* 0x39002320: jne 0x3900232a */
   6180 L_39002322:
   6181     eax = MEM32(ecx + 0x34); /* 0x39002322: mov eax, dword ptr [ecx + 0x34] */
   6182     MEM32(ebp + 0xC) = eax; /* 0x39002325: mov dword ptr [ebp + 0xc], eax */
   6183     goto L_3900233D; /* 0x39002328: jmp 0x3900233d */
   6184 L_3900232A:
   6185     /* cmp eax, 2 */ /* 0x3900232A: cmp eax, 2 */
   6186     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   6187     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6188     _flag_k = FK_CMP;
   6189     if (CMP_NE(_flag_a, _flag_b)) goto L_39002337; /* 0x3900232D: jne 0x39002337 */
   6190 L_3900232F:
   6191     ecx = MEM32(ecx + 0x4C); /* 0x3900232F: mov ecx, dword ptr [ecx + 0x4c] */
   6192     MEM32(ebp + 0xC) = ecx; /* 0x39002332: mov dword ptr [ebp + 0xc], ecx */
   6193     goto L_3900233D; /* 0x39002335: jmp 0x3900233d */
   6194 L_39002337:
   6195     edx = MEM32(ecx + 0x40); /* 0x39002337: mov edx, dword ptr [ecx + 0x40] */
   6196     MEM32(ebp + 0xC) = edx; /* 0x3900233A: mov dword ptr [ebp + 0xc], edx */
   6197 L_3900233D:
   6198     SET_LO8(eax, MEM8(ebp + 0xF)); /* 0x3900233D: mov al, byte ptr [ebp + 0xf] */
   6199     PUSH32(esp, ebx); /* 0x39002340: push ebx */
   6200     PUSH32(esp, esi); /* 0x39002341: push esi */
   6201     PUSH32(esp, edi); /* 0x39002342: push edi */
   6202     PUSH32(esp, 0); /* 0x39002343: push 0 */
   6203     ecx = ebp + (-0x20); /* 0x39002345: lea ecx, [ebp - 0x20] */
   6204     MEM8(ebp + (-0x20)) = (uint8_t)(LO8(eax)); /* 0x39002348: mov byte ptr [ebp - 0x20], al */
   6205     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x3900234B: call dword ptr [0x3900b040] */
   6206     RECOMP_FLAGS_IN();
   6207     esi = MEM32(ebp + 0x8); /* 0x39002351: mov esi, dword ptr [ebp + 8] */
   6208     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   6209     ecx = ecx | 0xFFFFFFFFu; /* 0x39002354: or ecx, 0xffffffff */
   6210     _cf = 0;
   6211     _flag_k = FK_TEST;
   6212     edi = esi; /* 0x39002357: mov edi, esi */
   6213     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6214     eax = 0; /* 0x39002359: xor eax, eax */
   6215     _cf = 0;
   6216     _flag_k = FK_TEST;
   6217     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x3900235B: repne scasb al, byte ptr es:[edi] */
   6218     ecx = ~ecx; /* 0x3900235D: not ecx */
   6219     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   6220     ecx = ecx - 1; /* 0x3900235F: dec ecx */
   6221     _flag_k = FK_DEC;
   6222     PUSH32(esp, 1); /* 0x39002360: push 1 */
   6223     ebx = ecx; /* 0x39002362: mov ebx, ecx */
   6224     ecx = ebp + (-0x20); /* 0x39002364: lea ecx, [ebp - 0x20] */
   6225     PUSH32(esp, ebx); /* 0x39002367: push ebx */
   6226     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39002368: call dword ptr [0x3900b034] */
   6227     RECOMP_FLAGS_IN();
   6228     /* test LO8(eax), LO8(eax) */ /* 0x3900236E: test al, al */
   6229     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   6230     _cf = 0;
   6231     _flag_k = FK_NARROW(FK_TEST, 24);
   6232     if (TEST_Z(_flag_a, _flag_b)) goto L_3900238F; /* 0x39002370: je 0x3900238f */
   6233 L_39002372:
   6234     edi = MEM32(ebp + (-0x1C)); /* 0x39002372: mov edi, dword ptr [ebp - 0x1c] */
   6235     ecx = ebx; /* 0x39002375: mov ecx, ebx */
   6236     edx = ecx; /* 0x39002377: mov edx, ecx */
   6237     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39002379: shr ecx, 2 */
   6238     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6239     ecx = ecx >> 2u; /* 0x39002379: shr ecx, 2 */
   6240     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x3900237C: 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; }
   6241     ecx = edx; /* 0x3900237E: mov ecx, edx */
   6242     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   6243     ecx = ecx & 3; /* 0x39002380: and ecx, 3 */
   6244     _cf = 0;
   6245     _flag_k = FK_TEST;
   6246     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39002383: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   6247     eax = MEM32(ebp + (-0x1C)); /* 0x39002385: mov eax, dword ptr [ebp - 0x1c] */
   6248     MEM32(ebp + (-0x18)) = ebx; /* 0x39002388: mov dword ptr [ebp - 0x18], ebx */
   6249     MEM8(eax + ebx) = (uint8_t)(0); /* 0x3900238B: mov byte ptr [eax + ebx], 0 */
   6250 L_3900238F:
   6251     edi = MEM32(ebp + 0xC); /* 0x3900238F: mov edi, dword ptr [ebp + 0xc] */
   6252     ecx = ebp + (-0x20); /* 0x39002392: lea ecx, [ebp - 0x20] */
   6253     edx = ebp + (-0x10); /* 0x39002395: lea edx, [ebp - 0x10] */
   6254     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6255     ebx = 0; /* 0x39002398: xor ebx, ebx */
   6256     _cf = 0;
   6257     _flag_k = FK_TEST;
   6258     PUSH32(esp, ecx); /* 0x3900239A: push ecx */
   6259     PUSH32(esp, edx); /* 0x3900239B: push edx */
   6260     ecx = edi; /* 0x3900239C: mov ecx, edi */
   6261     MEM32(ebp + (-0x4)) = ebx; /* 0x3900239E: mov dword ptr [ebp - 4], ebx */
   6262     RECOMP_ICALL(0x390061B0u); /* 0x390023A1: call 0x390061b0 */ /* not lifted */
   6263     RECOMP_FLAGS_IN();
   6264     eax = MEM32(eax); /* 0x390023A6: mov eax, dword ptr [eax] */
   6265     ecx = MEM32(edi + 0x4); /* 0x390023A8: mov ecx, dword ptr [edi + 4] */
   6266     /* cmp eax, ecx */ /* 0x390023AB: cmp eax, ecx */
   6267     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   6268     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6269     _flag_k = FK_CMP;
   6270     MEM32(ebp + 0xC) = eax; /* 0x390023AD: mov dword ptr [ebp + 0xc], eax */
   6271     if (CMP_EQ(_flag_a, _flag_b)) goto L_390023CC; /* 0x390023B0: je 0x390023cc */
   6272 L_390023B2:
   6273     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu);
   6274     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6275     eax = eax + 0xCu; /* 0x390023B2: add eax, 0xc */
   6276     _flag_k = FK_ADD;
   6277     PUSH32(esp, eax); /* 0x390023B5: push eax */
   6278     eax = ebp + (-0x20); /* 0x390023B6: lea eax, [ebp - 0x20] */
   6279     PUSH32(esp, eax); /* 0x390023B9: push eax */
   6280     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x390023BA: call dword ptr [0x3900b030] */
   6281     RECOMP_FLAGS_IN();
   6282     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   6283     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6284     esp = esp + 8; /* 0x390023C0: add esp, 8 */
   6285     _flag_k = FK_ADD;
   6286     /* test LO8(eax), LO8(eax) */ /* 0x390023C3: test al, al */
   6287     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   6288     _cf = 0;
   6289     _flag_k = FK_NARROW(FK_TEST, 24);
   6290     if (TEST_NZ(_flag_a, _flag_b)) goto L_390023CC; /* 0x390023C5: jne 0x390023cc */
   6291 L_390023C7:
   6292     eax = ebp + 0xC; /* 0x390023C7: lea eax, [ebp + 0xc] */
   6293     goto L_390023D5; /* 0x390023CA: jmp 0x390023d5 */
   6294 L_390023CC:
   6295     ecx = MEM32(edi + 0x4); /* 0x390023CC: mov ecx, dword ptr [edi + 4] */
   6296     eax = ebp + 0x8; /* 0x390023CF: lea eax, [ebp + 8] */
   6297     MEM32(ebp + 0x8) = ecx; /* 0x390023D2: mov dword ptr [ebp + 8], ecx */
   6298 L_390023D5:
   6299     esi = MEM32(eax); /* 0x390023D5: mov esi, dword ptr [eax] */
   6300     eax = MEM32(ebp + (-0x1C)); /* 0x390023D7: mov eax, dword ptr [ebp - 0x1c] */
   6301     /* cmp eax, ebx */ /* 0x390023DA: cmp eax, ebx */
   6302     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   6303     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6304     _flag_k = FK_CMP;
   6305     if (CMP_EQ(_flag_a, _flag_b)) goto L_390023FB; /* 0x390023DC: je 0x390023fb */
   6306 L_390023DE:
   6307     ecx = eax + (-0x1); /* 0x390023DE: lea ecx, [eax - 1] */
   6308     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x390023E1: mov al, byte ptr [eax - 1] */
   6309     /* test LO8(eax), LO8(eax) */ /* 0x390023E4: test al, al */
   6310     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   6311     _cf = 0;
   6312     _flag_k = FK_NARROW(FK_TEST, 24);
   6313     if (TEST_Z(_flag_a, _flag_b)) goto L_390023F2; /* 0x390023E6: je 0x390023f2 */
   6314 L_390023E8:
   6315     /* cmp LO8(eax), 0xFFu */ /* 0x390023E8: cmp al, 0xff */
   6316     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
   6317     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6318     _flag_k = FK_NARROW(FK_CMP, 24);
   6319     if (CMP_EQ(_flag_a, _flag_b)) goto L_390023F2; /* 0x390023EA: je 0x390023f2 */
   6320 L_390023EC:
   6321     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
   6322     SET_LO8(eax, LO8(eax) - 1); /* 0x390023EC: dec al */
   6323     _flag_k = FK_NARROW(FK_DEC, 24);
   6324     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x390023EE: mov byte ptr [ecx], al */
   6325     goto L_390023FB; /* 0x390023F0: jmp 0x390023fb */
   6326 L_390023F2:
   6327     PUSH32(esp, ecx); /* 0x390023F2: push ecx */
   6328     RECOMP_ICALL(0x3900A0A0u); /* 0x390023F3: call 0x3900a0a0 */ /* not lifted */
   6329     RECOMP_FLAGS_IN();
   6330     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6331     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6332     esp = esp + 4; /* 0x390023F8: add esp, 4 */
   6333     _flag_k = FK_ADD;
   6334 L_390023FB:
   6335     eax = MEM32(edi + 0x4); /* 0x390023FB: mov eax, dword ptr [edi + 4] */
   6336     MEM32(ebp + (-0x1C)) = ebx; /* 0x390023FE: mov dword ptr [ebp - 0x1c], ebx */
   6337     /* cmp esi, eax */ /* 0x39002401: cmp esi, eax */
   6338     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   6339     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6340     _flag_k = FK_CMP;
   6341     MEM32(ebp + (-0x18)) = ebx; /* 0x39002403: mov dword ptr [ebp - 0x18], ebx */
   6342     MEM32(ebp + (-0x14)) = ebx; /* 0x39002406: mov dword ptr [ebp - 0x14], ebx */
   6343     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002421; /* 0x39002409: je 0x39002421 */
   6344 L_3900240B:
   6345     fp_push(*(float*)&MEM32(esi + 0x1C)); /* 0x3900240B: fld dword ptr [esi + 0x1c] */
   6346     edi = POP32_VAL(esp); /* 0x3900240E: pop edi */
   6347     esi = POP32_VAL(esp); /* 0x3900240F: pop esi */
   6348     ebx = POP32_VAL(esp); /* 0x39002410: pop ebx */
   6349     ecx = MEM32(ebp + (-0xC)); /* 0x39002411: mov ecx, dword ptr [ebp - 0xc] */
   6350     MEM32(FS_BASE + (0)) = ecx; /* 0x39002414: mov dword ptr fs:[0], ecx */
   6351     esp = ebp; /* 0x3900241B: mov esp, ebp */
   6352     ebp = POP32_VAL(esp); /* 0x3900241D: pop ebp */
   6353     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900241E: ret 8 */
   6354 L_39002421:
   6355     ecx = MEM32(ebp + (-0xC)); /* 0x39002421: mov ecx, dword ptr [ebp - 0xc] */
   6356     edi = POP32_VAL(esp); /* 0x39002424: pop edi */
   6357     fp_push(*(float*)&MEM32(0x3900B0DC)); /* 0x39002425: fld dword ptr [0x3900b0dc] */
   6358     esi = POP32_VAL(esp); /* 0x3900242B: pop esi */
   6359     ebx = POP32_VAL(esp); /* 0x3900242C: pop ebx */
   6360     MEM32(FS_BASE + (0)) = ecx; /* 0x3900242D: mov dword ptr fs:[0], ecx */
   6361     esp = ebp; /* 0x39002434: mov esp, ebp */
   6362     ebp = POP32_VAL(esp); /* 0x39002436: pop ebp */
   6363     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39002437: ret 8 */
   6364     RECOMP_REGS_OUT();
   6365 }
   6366 
   6367 void sub_39002440(void) {
   6368     int _fpu_cmp = 0;
   6369     uint32_t _cf = 0;
   6370     int _df = 1;
   6371     uint32_t _flag_k = FK_NONE;
   6372     uint32_t _flag_a = 0, _flag_b = 0;
   6373     uint32_t _itail_tgt = 0;
   6374     RECOMP_REGS_LOCALS
   6375     RECOMP_ENTER(0x39002440u);
   6376 
   6377 L_39002440:
   6378     PUSH32(esp, ebp); /* 0x39002440: push ebp */
   6379     ebp = esp; /* 0x39002441: mov ebp, esp */
   6380     PUSH32(esp, 0xFFFFFFFFu); /* 0x39002443: push -1 */
   6381     PUSH32(esp, 0x3900A5A9u); /* 0x39002445: push 0x3900a5a9 */
   6382     eax = MEM32(FS_BASE + (0)); /* 0x3900244A: mov eax, dword ptr fs:[0] */
   6383     PUSH32(esp, eax); /* 0x39002450: push eax */
   6384     MEM32(FS_BASE + (0)) = esp; /* 0x39002451: mov dword ptr fs:[0], esp */
   6385     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   6386     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6387     esp = esp - 0x14u; /* 0x39002458: sub esp, 0x14 */
   6388     _flag_k = FK_CMP;
   6389     eax = MEM32(ebp + 0xC); /* 0x3900245B: mov eax, dword ptr [ebp + 0xc] */
   6390     PUSH32(esp, esi); /* 0x3900245E: push esi */
   6391     /* test eax, eax */ /* 0x3900245F: test eax, eax */
   6392     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   6393     _cf = 0;
   6394     _flag_k = FK_TEST;
   6395     PUSH32(esp, edi); /* 0x39002461: push edi */
   6396     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900246C; /* 0x39002462: jne 0x3900246c */
   6397 L_39002464:
   6398     esi = MEM32(ecx + 0x38); /* 0x39002464: mov esi, dword ptr [ecx + 0x38] */
   6399     MEM32(ebp + 0xC) = esi; /* 0x39002467: mov dword ptr [ebp + 0xc], esi */
   6400     goto L_39002482; /* 0x3900246A: jmp 0x39002482 */
   6401 L_3900246C:
   6402     /* cmp eax, 2 */ /* 0x3900246C: cmp eax, 2 */
   6403     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   6404     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6405     _flag_k = FK_CMP;
   6406     if (CMP_NE(_flag_a, _flag_b)) goto L_39002479; /* 0x3900246F: jne 0x39002479 */
   6407 L_39002471:
   6408     eax = MEM32(ecx + 0x50); /* 0x39002471: mov eax, dword ptr [ecx + 0x50] */
   6409     MEM32(ebp + 0xC) = eax; /* 0x39002474: mov dword ptr [ebp + 0xc], eax */
   6410     goto L_3900247F; /* 0x39002477: jmp 0x3900247f */
   6411 L_39002479:
   6412     ecx = MEM32(ecx + 0x44); /* 0x39002479: mov ecx, dword ptr [ecx + 0x44] */
   6413     MEM32(ebp + 0xC) = ecx; /* 0x3900247C: mov dword ptr [ebp + 0xc], ecx */
   6414 L_3900247F:
   6415     esi = MEM32(ebp + 0xC); /* 0x3900247F: mov esi, dword ptr [ebp + 0xc] */
   6416 L_39002482:
   6417     SET_LO8(edx, MEM8(ebp + 0xB)); /* 0x39002482: mov dl, byte ptr [ebp + 0xb] */
   6418     PUSH32(esp, ebx); /* 0x39002485: push ebx */
   6419     PUSH32(esp, 0); /* 0x39002486: push 0 */
   6420     ecx = ebp + (-0x20); /* 0x39002488: lea ecx, [ebp - 0x20] */
   6421     MEM8(ebp + (-0x20)) = (uint8_t)(LO8(edx)); /* 0x3900248B: mov byte ptr [ebp - 0x20], dl */
   6422     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x3900248E: call dword ptr [0x3900b040] */
   6423     RECOMP_FLAGS_IN();
   6424     edi = MEM32(ebp + 0x8); /* 0x39002494: mov edi, dword ptr [ebp + 8] */
   6425     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   6426     ecx = ecx | 0xFFFFFFFFu; /* 0x39002497: or ecx, 0xffffffff */
   6427     _cf = 0;
   6428     _flag_k = FK_TEST;
   6429     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6430     eax = 0; /* 0x3900249A: xor eax, eax */
   6431     _cf = 0;
   6432     _flag_k = FK_TEST;
   6433     PUSH32(esp, 1); /* 0x3900249C: push 1 */
   6434     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x3900249E: repne scasb al, byte ptr es:[edi] */
   6435     ecx = ~ecx; /* 0x390024A0: not ecx */
   6436     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   6437     ecx = ecx - 1; /* 0x390024A2: dec ecx */
   6438     _flag_k = FK_DEC;
   6439     ebx = ecx; /* 0x390024A3: mov ebx, ecx */
   6440     ecx = ebp + (-0x20); /* 0x390024A5: lea ecx, [ebp - 0x20] */
   6441     PUSH32(esp, ebx); /* 0x390024A8: push ebx */
   6442     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x390024A9: call dword ptr [0x3900b034] */
   6443     RECOMP_FLAGS_IN();
   6444     /* test LO8(eax), LO8(eax) */ /* 0x390024AF: test al, al */
   6445     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   6446     _cf = 0;
   6447     _flag_k = FK_NARROW(FK_TEST, 24);
   6448     if (TEST_Z(_flag_a, _flag_b)) goto L_390024D6; /* 0x390024B1: je 0x390024d6 */
   6449 L_390024B3:
   6450     esi = MEM32(ebp + 0x8); /* 0x390024B3: mov esi, dword ptr [ebp + 8] */
   6451     edi = MEM32(ebp + (-0x1C)); /* 0x390024B6: mov edi, dword ptr [ebp - 0x1c] */
   6452     ecx = ebx; /* 0x390024B9: mov ecx, ebx */
   6453     eax = ecx; /* 0x390024BB: mov eax, ecx */
   6454     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x390024BD: shr ecx, 2 */
   6455     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6456     ecx = ecx >> 2u; /* 0x390024BD: shr ecx, 2 */
   6457     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390024C0: 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; }
   6458     ecx = eax; /* 0x390024C2: mov ecx, eax */
   6459     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   6460     ecx = ecx & 3; /* 0x390024C4: and ecx, 3 */
   6461     _cf = 0;
   6462     _flag_k = FK_TEST;
   6463     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x390024C7: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   6464     ecx = MEM32(ebp + (-0x1C)); /* 0x390024C9: mov ecx, dword ptr [ebp - 0x1c] */
   6465     esi = MEM32(ebp + 0xC); /* 0x390024CC: mov esi, dword ptr [ebp + 0xc] */
   6466     MEM32(ebp + (-0x18)) = ebx; /* 0x390024CF: mov dword ptr [ebp - 0x18], ebx */
   6467     MEM8(ecx + ebx) = (uint8_t)(0); /* 0x390024D2: mov byte ptr [ecx + ebx], 0 */
   6468 L_390024D6:
   6469     edx = ebp + (-0x20); /* 0x390024D6: lea edx, [ebp - 0x20] */
   6470     eax = ebp + (-0x10); /* 0x390024D9: lea eax, [ebp - 0x10] */
   6471     PUSH32(esp, edx); /* 0x390024DC: push edx */
   6472     PUSH32(esp, eax); /* 0x390024DD: push eax */
   6473     ecx = esi; /* 0x390024DE: mov ecx, esi */
   6474     MEM32(ebp + (-0x4)) = 0; /* 0x390024E0: mov dword ptr [ebp - 4], 0 */
   6475     RECOMP_ICALL(0x390061B0u); /* 0x390024E7: call 0x390061b0 */ /* not lifted */
   6476     RECOMP_FLAGS_IN();
   6477     eax = MEM32(eax); /* 0x390024EC: mov eax, dword ptr [eax] */
   6478     ecx = MEM32(esi + 0x4); /* 0x390024EE: mov ecx, dword ptr [esi + 4] */
   6479     /* cmp eax, ecx */ /* 0x390024F1: cmp eax, ecx */
   6480     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   6481     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6482     _flag_k = FK_CMP;
   6483     MEM32(ebp + 0x8) = eax; /* 0x390024F3: mov dword ptr [ebp + 8], eax */
   6484     ebx = POP32_VAL(esp); /* 0x390024F6: pop ebx */
   6485     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002513; /* 0x390024F7: je 0x39002513 */
   6486 L_390024F9:
   6487     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu);
   6488     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6489     eax = eax + 0xCu; /* 0x390024F9: add eax, 0xc */
   6490     _flag_k = FK_ADD;
   6491     ecx = ebp + (-0x20); /* 0x390024FC: lea ecx, [ebp - 0x20] */
   6492     PUSH32(esp, eax); /* 0x390024FF: push eax */
   6493     PUSH32(esp, ecx); /* 0x39002500: push ecx */
   6494     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x39002501: call dword ptr [0x3900b030] */
   6495     RECOMP_FLAGS_IN();
   6496     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   6497     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6498     esp = esp + 8; /* 0x39002507: add esp, 8 */
   6499     _flag_k = FK_ADD;
   6500     /* test LO8(eax), LO8(eax) */ /* 0x3900250A: test al, al */
   6501     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   6502     _cf = 0;
   6503     _flag_k = FK_NARROW(FK_TEST, 24);
   6504     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002513; /* 0x3900250C: jne 0x39002513 */
   6505 L_3900250E:
   6506     eax = ebp + 0x8; /* 0x3900250E: lea eax, [ebp + 8] */
   6507     goto L_3900251C; /* 0x39002511: jmp 0x3900251c */
   6508 L_39002513:
   6509     eax = MEM32(esi + 0x4); /* 0x39002513: mov eax, dword ptr [esi + 4] */
   6510     MEM32(ebp + 0xC) = eax; /* 0x39002516: mov dword ptr [ebp + 0xc], eax */
   6511     eax = ebp + 0xC; /* 0x39002519: lea eax, [ebp + 0xc] */
   6512 L_3900251C:
   6513     edi = MEM32(eax); /* 0x3900251C: mov edi, dword ptr [eax] */
   6514     PUSH32(esp, 1); /* 0x3900251E: push 1 */
   6515     ecx = ebp + (-0x20); /* 0x39002520: lea ecx, [ebp - 0x20] */
   6516     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39002523: mov dword ptr [ebp - 4], 0xffffffff */
   6517     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x3900252A: call dword ptr [0x3900b040] */
   6518     RECOMP_FLAGS_IN();
   6519     /* cmp edi, MEM32(esi + 0x4) */ /* 0x39002530: cmp edi, dword ptr [esi + 4] */
   6520     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x4));
   6521     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6522     _flag_k = FK_CMP;
   6523     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002555; /* 0x39002533: je 0x39002555 */
   6524 L_39002535:
   6525     edi = MEM32(edi + 0x20); /* 0x39002535: mov edi, dword ptr [edi + 0x20] */
   6526     eax = MEM32(0x3900B02C); /* 0x39002538: mov eax, dword ptr [0x3900b02c] */
   6527     /* test edi, edi */ /* 0x3900253D: test edi, edi */
   6528     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   6529     _cf = 0;
   6530     _flag_k = FK_TEST;
   6531     if (TEST_Z(_flag_a, _flag_b)) goto L_3900255A; /* 0x3900253F: je 0x3900255a */
   6532 L_39002541:
   6533     eax = edi; /* 0x39002541: mov eax, edi */
   6534     edi = POP32_VAL(esp); /* 0x39002543: pop edi */
   6535     esi = POP32_VAL(esp); /* 0x39002544: pop esi */
   6536     ecx = MEM32(ebp + (-0xC)); /* 0x39002545: mov ecx, dword ptr [ebp - 0xc] */
   6537     MEM32(FS_BASE + (0)) = ecx; /* 0x39002548: mov dword ptr fs:[0], ecx */
   6538     esp = ebp; /* 0x3900254F: mov esp, ebp */
   6539     ebp = POP32_VAL(esp); /* 0x39002551: pop ebp */
   6540     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39002552: ret 8 */
   6541 L_39002555:
   6542     eax = 0x3900B0D8u; /* 0x39002555: mov eax, 0x3900b0d8 */
   6543 L_3900255A:
   6544     ecx = MEM32(ebp + (-0xC)); /* 0x3900255A: mov ecx, dword ptr [ebp - 0xc] */
   6545     edi = POP32_VAL(esp); /* 0x3900255D: pop edi */
   6546     esi = POP32_VAL(esp); /* 0x3900255E: pop esi */
   6547     MEM32(FS_BASE + (0)) = ecx; /* 0x3900255F: mov dword ptr fs:[0], ecx */
   6548     esp = ebp; /* 0x39002566: mov esp, ebp */
   6549     ebp = POP32_VAL(esp); /* 0x39002568: pop ebp */
   6550     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39002569: ret 8 */
   6551     RECOMP_REGS_OUT();
   6552 }
   6553 
   6554 void sub_39002570(void) {
   6555     int _fpu_cmp = 0;
   6556     uint32_t _cf = 0;
   6557     int _df = 1;
   6558     uint32_t _flag_k = FK_NONE;
   6559     uint32_t _flag_a = 0, _flag_b = 0;
   6560     uint32_t _itail_tgt = 0;
   6561     RECOMP_REGS_LOCALS
   6562     RECOMP_ENTER(0x39002570u);
   6563 
   6564 L_39002570:
   6565     PUSH32(esp, ebp); /* 0x39002570: push ebp */
   6566     ebp = esp; /* 0x39002571: mov ebp, esp */
   6567     PUSH32(esp, 0xFFFFFFFFu); /* 0x39002573: push -1 */
   6568     PUSH32(esp, 0x3900A5EAu); /* 0x39002575: push 0x3900a5ea */
   6569     eax = MEM32(FS_BASE + (0)); /* 0x3900257A: mov eax, dword ptr fs:[0] */
   6570     PUSH32(esp, eax); /* 0x39002580: push eax */
   6571     MEM32(FS_BASE + (0)) = esp; /* 0x39002581: mov dword ptr fs:[0], esp */
   6572     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x5Cu);
   6573     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6574     esp = esp - 0x5Cu; /* 0x39002588: sub esp, 0x5c */
   6575     _flag_k = FK_CMP;
   6576     eax = MEM32(ebp + 0x18); /* 0x3900258B: mov eax, dword ptr [ebp + 0x18] */
   6577     /* test eax, eax */ /* 0x3900258E: test eax, eax */
   6578     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   6579     _cf = 0;
   6580     _flag_k = FK_TEST;
   6581     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900259A; /* 0x39002590: jne 0x3900259a */
   6582 L_39002592:
   6583     eax = MEM32(ecx + 0x30); /* 0x39002592: mov eax, dword ptr [ecx + 0x30] */
   6584     MEM32(ebp + 0x18) = eax; /* 0x39002595: mov dword ptr [ebp + 0x18], eax */
   6585     goto L_390025AD; /* 0x39002598: jmp 0x390025ad */
   6586 L_3900259A:
   6587     /* cmp eax, 2 */ /* 0x3900259A: cmp eax, 2 */
   6588     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   6589     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6590     _flag_k = FK_CMP;
   6591     if (CMP_NE(_flag_a, _flag_b)) goto L_390025A7; /* 0x3900259D: jne 0x390025a7 */
   6592 L_3900259F:
   6593     ecx = MEM32(ecx + 0x48); /* 0x3900259F: mov ecx, dword ptr [ecx + 0x48] */
   6594     MEM32(ebp + 0x18) = ecx; /* 0x390025A2: mov dword ptr [ebp + 0x18], ecx */
   6595     goto L_390025AD; /* 0x390025A5: jmp 0x390025ad */
   6596 L_390025A7:
   6597     edx = MEM32(ecx + 0x3C); /* 0x390025A7: mov edx, dword ptr [ecx + 0x3c] */
   6598     MEM32(ebp + 0x18) = edx; /* 0x390025AA: mov dword ptr [ebp + 0x18], edx */
   6599 L_390025AD:
   6600     SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x390025AD: mov al, byte ptr [ebp + 0xb] */
   6601     PUSH32(esp, ebx); /* 0x390025B0: push ebx */
   6602     PUSH32(esp, esi); /* 0x390025B1: push esi */
   6603     PUSH32(esp, edi); /* 0x390025B2: push edi */
   6604     PUSH32(esp, 0); /* 0x390025B3: push 0 */
   6605     ecx = ebp + (-0x48); /* 0x390025B5: lea ecx, [ebp - 0x48] */
   6606     MEM8(ebp + (-0x48)) = (uint8_t)(LO8(eax)); /* 0x390025B8: mov byte ptr [ebp - 0x48], al */
   6607     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390025BB: call dword ptr [0x3900b040] */
   6608     RECOMP_FLAGS_IN();
   6609     esi = MEM32(ebp + 0x8); /* 0x390025C1: mov esi, dword ptr [ebp + 8] */
   6610     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   6611     ecx = ecx | 0xFFFFFFFFu; /* 0x390025C4: or ecx, 0xffffffff */
   6612     _cf = 0;
   6613     _flag_k = FK_TEST;
   6614     edi = esi; /* 0x390025C7: mov edi, esi */
   6615     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6616     eax = 0; /* 0x390025C9: xor eax, eax */
   6617     _cf = 0;
   6618     _flag_k = FK_TEST;
   6619     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x390025CB: repne scasb al, byte ptr es:[edi] */
   6620     ecx = ~ecx; /* 0x390025CD: not ecx */
   6621     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   6622     ecx = ecx - 1; /* 0x390025CF: dec ecx */
   6623     _flag_k = FK_DEC;
   6624     PUSH32(esp, 1); /* 0x390025D0: push 1 */
   6625     ebx = ecx; /* 0x390025D2: mov ebx, ecx */
   6626     ecx = ebp + (-0x48); /* 0x390025D4: lea ecx, [ebp - 0x48] */
   6627     PUSH32(esp, ebx); /* 0x390025D7: push ebx */
   6628     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x390025D8: call dword ptr [0x3900b034] */
   6629     RECOMP_FLAGS_IN();
   6630     /* test LO8(eax), LO8(eax) */ /* 0x390025DE: test al, al */
   6631     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   6632     _cf = 0;
   6633     _flag_k = FK_NARROW(FK_TEST, 24);
   6634     if (TEST_Z(_flag_a, _flag_b)) goto L_39002602; /* 0x390025E0: je 0x39002602 */
   6635 L_390025E2:
   6636     edi = MEM32(ebp + (-0x44)); /* 0x390025E2: mov edi, dword ptr [ebp - 0x44] */
   6637     ecx = ebx; /* 0x390025E5: mov ecx, ebx */
   6638     edx = ecx; /* 0x390025E7: mov edx, ecx */
   6639     PUSH32(esp, ebx); /* 0x390025E9: push ebx */
   6640     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x390025EA: shr ecx, 2 */
   6641     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6642     ecx = ecx >> 2u; /* 0x390025EA: shr ecx, 2 */
   6643     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390025ED: 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; }
   6644     ecx = edx; /* 0x390025EF: mov ecx, edx */
   6645     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   6646     ecx = ecx & 3; /* 0x390025F1: and ecx, 3 */
   6647     _cf = 0;
   6648     _flag_k = FK_TEST;
   6649     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x390025F4: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   6650     ecx = ebp + (-0x48); /* 0x390025F6: lea ecx, [ebp - 0x48] */
   6651     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x390025F9: call dword ptr [0x3900b038] */
   6652     RECOMP_FLAGS_IN();
   6653     esi = MEM32(ebp + 0x8); /* 0x390025FF: mov esi, dword ptr [ebp + 8] */
   6654 L_39002602:
   6655     eax = ebp + (-0x48); /* 0x39002602: lea eax, [ebp - 0x48] */
   6656     ecx = ebp + (-0x10); /* 0x39002605: lea ecx, [ebp - 0x10] */
   6657     PUSH32(esp, eax); /* 0x39002608: push eax */
   6658     PUSH32(esp, ecx); /* 0x39002609: push ecx */
   6659     ecx = MEM32(ebp + 0x18); /* 0x3900260A: mov ecx, dword ptr [ebp + 0x18] */
   6660     MEM32(ebp + (-0x4)) = 0; /* 0x3900260D: mov dword ptr [ebp - 4], 0 */
   6661     RECOMP_ICALL(0x390049E0u); /* 0x39002614: call 0x390049e0 */ /* not lifted */
   6662     RECOMP_FLAGS_IN();
   6663     PUSH32(esp, 1); /* 0x39002619: push 1 */
   6664     ecx = ebp + (-0x48); /* 0x3900261B: lea ecx, [ebp - 0x48] */
   6665     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3900261E: mov dword ptr [ebp - 4], 0xffffffff */
   6666     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002625: call dword ptr [0x3900b040] */
   6667     RECOMP_FLAGS_IN();
   6668     SET_LO8(edx, MEM8(ebp + 0xB)); /* 0x3900262B: mov dl, byte ptr [ebp + 0xb] */
   6669     PUSH32(esp, 0); /* 0x3900262E: push 0 */
   6670     ecx = ebp + (-0x38); /* 0x39002630: lea ecx, [ebp - 0x38] */
   6671     MEM8(ebp + (-0x38)) = (uint8_t)(LO8(edx)); /* 0x39002633: mov byte ptr [ebp - 0x38], dl */
   6672     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002636: call dword ptr [0x3900b040] */
   6673     RECOMP_FLAGS_IN();
   6674     edi = esi; /* 0x3900263C: mov edi, esi */
   6675     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   6676     ecx = ecx | 0xFFFFFFFFu; /* 0x3900263E: or ecx, 0xffffffff */
   6677     _cf = 0;
   6678     _flag_k = FK_TEST;
   6679     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6680     eax = 0; /* 0x39002641: xor eax, eax */
   6681     _cf = 0;
   6682     _flag_k = FK_TEST;
   6683     PUSH32(esp, 1); /* 0x39002643: push 1 */
   6684     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39002645: repne scasb al, byte ptr es:[edi] */
   6685     ecx = ~ecx; /* 0x39002647: not ecx */
   6686     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   6687     ecx = ecx - 1; /* 0x39002649: dec ecx */
   6688     _flag_k = FK_DEC;
   6689     ebx = ecx; /* 0x3900264A: mov ebx, ecx */
   6690     ecx = ebp + (-0x38); /* 0x3900264C: lea ecx, [ebp - 0x38] */
   6691     PUSH32(esp, ebx); /* 0x3900264F: push ebx */
   6692     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39002650: call dword ptr [0x3900b034] */
   6693     RECOMP_FLAGS_IN();
   6694     /* test LO8(eax), LO8(eax) */ /* 0x39002656: test al, al */
   6695     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   6696     _cf = 0;
   6697     _flag_k = FK_NARROW(FK_TEST, 24);
   6698     if (TEST_Z(_flag_a, _flag_b)) goto L_3900267A; /* 0x39002658: je 0x3900267a */
   6699 L_3900265A:
   6700     esi = MEM32(ebp + 0x8); /* 0x3900265A: mov esi, dword ptr [ebp + 8] */
   6701     edi = MEM32(ebp + (-0x34)); /* 0x3900265D: mov edi, dword ptr [ebp - 0x34] */
   6702     ecx = ebx; /* 0x39002660: mov ecx, ebx */
   6703     eax = ecx; /* 0x39002662: mov eax, ecx */
   6704     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39002664: shr ecx, 2 */
   6705     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6706     ecx = ecx >> 2u; /* 0x39002664: shr ecx, 2 */
   6707     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39002667: 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; }
   6708     ecx = eax; /* 0x39002669: mov ecx, eax */
   6709     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   6710     ecx = ecx & 3; /* 0x3900266B: and ecx, 3 */
   6711     _cf = 0;
   6712     _flag_k = FK_TEST;
   6713     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x3900266E: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   6714     ecx = MEM32(ebp + (-0x34)); /* 0x39002670: mov ecx, dword ptr [ebp - 0x34] */
   6715     MEM32(ebp + (-0x30)) = ebx; /* 0x39002673: mov dword ptr [ebp - 0x30], ebx */
   6716     MEM8(ecx + ebx) = (uint8_t)(0); /* 0x39002676: mov byte ptr [ecx + ebx], 0 */
   6717 L_3900267A:
   6718     edi = MEM32(ebp + 0xC); /* 0x3900267A: mov edi, dword ptr [ebp + 0xc] */
   6719     ebx = MEM32(ebp + 0x10); /* 0x3900267D: mov ebx, dword ptr [ebp + 0x10] */
   6720     edx = MEM32(ebp + 0x14); /* 0x39002680: mov edx, dword ptr [ebp + 0x14] */
   6721     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6722     esi = 0; /* 0x39002683: xor esi, esi */
   6723     _cf = 0;
   6724     _flag_k = FK_TEST;
   6725     MEM32(ebp + (-0x4)) = 1; /* 0x39002685: mov dword ptr [ebp - 4], 1 */
   6726     MEM32(ebp + (-0x3C)) = esi; /* 0x3900268C: mov dword ptr [ebp - 0x3c], esi */
   6727     MEM32(ebp + (-0x48)) = edi; /* 0x3900268F: mov dword ptr [ebp - 0x48], edi */
   6728     MEM32(ebp + (-0x44)) = ebx; /* 0x39002692: mov dword ptr [ebp - 0x44], ebx */
   6729     MEM32(ebp + (-0x40)) = edx; /* 0x39002695: mov dword ptr [ebp - 0x40], edx */
   6730     MEM32(ebp + (-0x28)) = esi; /* 0x39002698: mov dword ptr [ebp - 0x28], esi */
   6731     MEM32(ebp + (-0x24)) = esi; /* 0x3900269B: mov dword ptr [ebp - 0x24], esi */
   6732     MEM32(ebp + (-0x20)) = esi; /* 0x3900269E: mov dword ptr [ebp - 0x20], esi */
   6733     MEM32(ebp + (-0x1C)) = esi; /* 0x390026A1: mov dword ptr [ebp - 0x1c], esi */
   6734     eax = ebp + (-0x38); /* 0x390026A4: lea eax, [ebp - 0x38] */
   6735     ecx = ebp + (-0x68); /* 0x390026A7: lea ecx, [ebp - 0x68] */
   6736     PUSH32(esp, eax); /* 0x390026AA: push eax */
   6737     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x390026AB: mov byte ptr [ebp - 4], 3 */
   6738     RECOMP_ICALL(MEM32(0x3900B014)); /* 0x390026AF: call dword ptr [0x3900b014] */
   6739     RECOMP_FLAGS_IN();
   6740     ecx = MEM32(ebp + (-0x28)); /* 0x390026B5: mov ecx, dword ptr [ebp - 0x28] */
   6741     edx = MEM32(ebp + (-0x24)); /* 0x390026B8: mov edx, dword ptr [ebp - 0x24] */
   6742     eax = MEM32(ebp + (-0x20)); /* 0x390026BB: mov eax, dword ptr [ebp - 0x20] */
   6743     MEM32(ebp + (-0x58)) = ecx; /* 0x390026BE: mov dword ptr [ebp - 0x58], ecx */
   6744     ecx = MEM32(ebp + (-0x1C)); /* 0x390026C1: mov ecx, dword ptr [ebp - 0x1c] */
   6745     MEM32(ebp + (-0x54)) = edx; /* 0x390026C4: mov dword ptr [ebp - 0x54], edx */
   6746     MEM32(ebp + (-0x50)) = eax; /* 0x390026C7: mov dword ptr [ebp - 0x50], eax */
   6747     MEM32(ebp + (-0x4C)) = ecx; /* 0x390026CA: mov dword ptr [ebp - 0x4c], ecx */
   6748     ecx = MEM32(ebp + 0x18); /* 0x390026CD: mov ecx, dword ptr [ebp + 0x18] */
   6749     edx = ebp + (-0x68); /* 0x390026D0: lea edx, [ebp - 0x68] */
   6750     eax = ebp + (-0x18); /* 0x390026D3: lea eax, [ebp - 0x18] */
   6751     PUSH32(esp, edx); /* 0x390026D6: push edx */
   6752     PUSH32(esp, eax); /* 0x390026D7: push eax */
   6753     MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x390026D8: mov byte ptr [ebp - 4], 4 */
   6754     RECOMP_ICALL(0x39004840u); /* 0x390026DC: call 0x39004840 */ /* not lifted */
   6755     RECOMP_FLAGS_IN();
   6756     ecx = MEM32(eax); /* 0x390026E1: mov ecx, dword ptr [eax] */
   6757     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x390026E3: mov byte ptr [ebp - 4], 3 */
   6758     MEM32(ebp + 0x8) = ecx; /* 0x390026E7: mov dword ptr [ebp + 8], ecx */
   6759     ecx = ebp + (-0x68); /* 0x390026EA: lea ecx, [ebp - 0x68] */
   6760     RECOMP_ICALL(0x39004670u); /* 0x390026ED: call 0x39004670 */ /* not lifted */
   6761     RECOMP_FLAGS_IN();
   6762     ecx = ebp + (-0x28); /* 0x390026F2: lea ecx, [ebp - 0x28] */
   6763     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x390026F5: mov byte ptr [ebp - 4], 2 */
   6764     RECOMP_ICALL(0x39003D40u); /* 0x390026F9: call 0x39003d40 */ /* not lifted */
   6765     RECOMP_FLAGS_IN();
   6766     edx = MEM32(ebp + 0x8); /* 0x390026FE: mov edx, dword ptr [ebp + 8] */
   6767     eax = MEM32(ebp + (-0x40)); /* 0x39002701: mov eax, dword ptr [ebp - 0x40] */
   6768     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x1Cu);
   6769     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6770     edx = edx + 0x1Cu; /* 0x39002704: add edx, 0x1c */
   6771     _flag_k = FK_ADD;
   6772     MEM32(edx) = edi; /* 0x39002707: mov dword ptr [edx], edi */
   6773     edi = POP32_VAL(esp); /* 0x39002709: pop edi */
   6774     MEM32(edx + 0x4) = ebx; /* 0x3900270A: mov dword ptr [edx + 4], ebx */
   6775     MEM32(edx + 0x8) = eax; /* 0x3900270D: mov dword ptr [edx + 8], eax */
   6776     MEM32(edx + 0xC) = esi; /* 0x39002710: mov dword ptr [edx + 0xc], esi */
   6777     eax = MEM32(ebp + (-0x34)); /* 0x39002713: mov eax, dword ptr [ebp - 0x34] */
   6778     esi = POP32_VAL(esp); /* 0x39002716: pop esi */
   6779     ebx = POP32_VAL(esp); /* 0x39002717: pop ebx */
   6780     /* test eax, eax */ /* 0x39002718: test eax, eax */
   6781     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   6782     _cf = 0;
   6783     _flag_k = FK_TEST;
   6784     if (TEST_Z(_flag_a, _flag_b)) goto L_39002747; /* 0x3900271A: je 0x39002747 */
   6785 L_3900271C:
   6786     ecx = eax + (-0x1); /* 0x3900271C: lea ecx, [eax - 1] */
   6787     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x3900271F: mov al, byte ptr [eax - 1] */
   6788     /* test LO8(eax), LO8(eax) */ /* 0x39002722: test al, al */
   6789     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   6790     _cf = 0;
   6791     _flag_k = FK_NARROW(FK_TEST, 24);
   6792     if (TEST_Z(_flag_a, _flag_b)) goto L_3900273E; /* 0x39002724: je 0x3900273e */
   6793 L_39002726:
   6794     /* cmp LO8(eax), 0xFFu */ /* 0x39002726: cmp al, 0xff */
   6795     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
   6796     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6797     _flag_k = FK_NARROW(FK_CMP, 24);
   6798     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900273E; /* 0x39002728: je 0x3900273e */
   6799 L_3900272A:
   6800     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
   6801     SET_LO8(eax, LO8(eax) - 1); /* 0x3900272A: dec al */
   6802     _flag_k = FK_NARROW(FK_DEC, 24);
   6803     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x3900272C: mov byte ptr [ecx], al */
   6804     ecx = MEM32(ebp + (-0xC)); /* 0x3900272E: mov ecx, dword ptr [ebp - 0xc] */
   6805     MEM32(FS_BASE + (0)) = ecx; /* 0x39002731: mov dword ptr fs:[0], ecx */
   6806     esp = ebp; /* 0x39002738: mov esp, ebp */
   6807     ebp = POP32_VAL(esp); /* 0x3900273A: pop ebp */
   6808     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x3900273B: ret 0x14 */
   6809 L_3900273E:
   6810     PUSH32(esp, ecx); /* 0x3900273E: push ecx */
   6811     RECOMP_ICALL(0x3900A0A0u); /* 0x3900273F: call 0x3900a0a0 */ /* not lifted */
   6812     RECOMP_FLAGS_IN();
   6813     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6814     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6815     esp = esp + 4; /* 0x39002744: add esp, 4 */
   6816     _flag_k = FK_ADD;
   6817 L_39002747:
   6818     ecx = MEM32(ebp + (-0xC)); /* 0x39002747: mov ecx, dword ptr [ebp - 0xc] */
   6819     MEM32(FS_BASE + (0)) = ecx; /* 0x3900274A: mov dword ptr fs:[0], ecx */
   6820     esp = ebp; /* 0x39002751: mov esp, ebp */
   6821     ebp = POP32_VAL(esp); /* 0x39002753: pop ebp */
   6822     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x39002754: ret 0x14 */
   6823     RECOMP_REGS_OUT();
   6824 }
   6825 
   6826 void sub_39002760(void) {
   6827     int _fpu_cmp = 0;
   6828     uint32_t _cf = 0;
   6829     int _df = 1;
   6830     uint32_t _flag_k = FK_NONE;
   6831     uint32_t _flag_a = 0, _flag_b = 0;
   6832     uint32_t _itail_tgt = 0;
   6833     RECOMP_REGS_LOCALS
   6834     RECOMP_ENTER(0x39002760u);
   6835 
   6836 L_39002760:
   6837     PUSH32(esp, ebp); /* 0x39002760: push ebp */
   6838     ebp = esp; /* 0x39002761: mov ebp, esp */
   6839     PUSH32(esp, 0xFFFFFFFFu); /* 0x39002763: push -1 */
   6840     PUSH32(esp, 0x3900A61Au); /* 0x39002765: push 0x3900a61a */
   6841     eax = MEM32(FS_BASE + (0)); /* 0x3900276A: mov eax, dword ptr fs:[0] */
   6842     PUSH32(esp, eax); /* 0x39002770: push eax */
   6843     MEM32(FS_BASE + (0)) = esp; /* 0x39002771: mov dword ptr fs:[0], esp */
   6844     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x68u);
   6845     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6846     esp = esp - 0x68u; /* 0x39002778: sub esp, 0x68 */
   6847     _flag_k = FK_CMP;
   6848     eax = MEM32(ebp + 0x18); /* 0x3900277B: mov eax, dword ptr [ebp + 0x18] */
   6849     PUSH32(esp, ebx); /* 0x3900277E: push ebx */
   6850     PUSH32(esp, esi); /* 0x3900277F: push esi */
   6851     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6852     esi = 0; /* 0x39002780: xor esi, esi */
   6853     _cf = 0;
   6854     _flag_k = FK_TEST;
   6855     /* cmp eax, esi */ /* 0x39002782: cmp eax, esi */
   6856     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi);
   6857     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6858     _flag_k = FK_CMP;
   6859     PUSH32(esp, edi); /* 0x39002784: push edi */
   6860     if (CMP_NE(_flag_a, _flag_b)) goto L_3900278F; /* 0x39002785: jne 0x3900278f */
   6861 L_39002787:
   6862     eax = MEM32(ecx + 0x34); /* 0x39002787: mov eax, dword ptr [ecx + 0x34] */
   6863     MEM32(ebp + 0x18) = eax; /* 0x3900278A: mov dword ptr [ebp + 0x18], eax */
   6864     goto L_390027A2; /* 0x3900278D: jmp 0x390027a2 */
   6865 L_3900278F:
   6866     /* cmp eax, 2 */ /* 0x3900278F: cmp eax, 2 */
   6867     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   6868     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6869     _flag_k = FK_CMP;
   6870     if (CMP_NE(_flag_a, _flag_b)) goto L_3900279C; /* 0x39002792: jne 0x3900279c */
   6871 L_39002794:
   6872     ecx = MEM32(ecx + 0x4C); /* 0x39002794: mov ecx, dword ptr [ecx + 0x4c] */
   6873     MEM32(ebp + 0x18) = ecx; /* 0x39002797: mov dword ptr [ebp + 0x18], ecx */
   6874     goto L_390027A2; /* 0x3900279A: jmp 0x390027a2 */
   6875 L_3900279C:
   6876     edx = MEM32(ecx + 0x40); /* 0x3900279C: mov edx, dword ptr [ecx + 0x40] */
   6877     MEM32(ebp + 0x18) = edx; /* 0x3900279F: mov dword ptr [ebp + 0x18], edx */
   6878 L_390027A2:
   6879     SET_LO8(eax, MEM8(ebp + 0x1B)); /* 0x390027A2: mov al, byte ptr [ebp + 0x1b] */
   6880     PUSH32(esp, esi); /* 0x390027A5: push esi */
   6881     ecx = ebp + (-0x34); /* 0x390027A6: lea ecx, [ebp - 0x34] */
   6882     MEM8(ebp + (-0x34)) = (uint8_t)(LO8(eax)); /* 0x390027A9: mov byte ptr [ebp - 0x34], al */
   6883     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390027AC: call dword ptr [0x3900b040] */
   6884     RECOMP_FLAGS_IN();
   6885     ebx = MEM32(ebp + 0x8); /* 0x390027B2: mov ebx, dword ptr [ebp + 8] */
   6886     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   6887     ecx = ecx | 0xFFFFFFFFu; /* 0x390027B5: or ecx, 0xffffffff */
   6888     _cf = 0;
   6889     _flag_k = FK_TEST;
   6890     edi = ebx; /* 0x390027B8: mov edi, ebx */
   6891     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6892     eax = 0; /* 0x390027BA: xor eax, eax */
   6893     _cf = 0;
   6894     _flag_k = FK_TEST;
   6895     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x390027BC: repne scasb al, byte ptr es:[edi] */
   6896     ecx = ~ecx; /* 0x390027BE: not ecx */
   6897     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   6898     ecx = ecx - 1; /* 0x390027C0: dec ecx */
   6899     _flag_k = FK_DEC;
   6900     PUSH32(esp, 1); /* 0x390027C1: push 1 */
   6901     edi = ecx; /* 0x390027C3: mov edi, ecx */
   6902     ecx = ebp + (-0x34); /* 0x390027C5: lea ecx, [ebp - 0x34] */
   6903     PUSH32(esp, edi); /* 0x390027C8: push edi */
   6904     MEM32(ebp + 0x8) = edi; /* 0x390027C9: mov dword ptr [ebp + 8], edi */
   6905     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x390027CC: call dword ptr [0x3900b034] */
   6906     RECOMP_FLAGS_IN();
   6907     /* test LO8(eax), LO8(eax) */ /* 0x390027D2: test al, al */
   6908     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   6909     _cf = 0;
   6910     _flag_k = FK_NARROW(FK_TEST, 24);
   6911     if (TEST_Z(_flag_a, _flag_b)) goto L_390027F9; /* 0x390027D4: je 0x390027f9 */
   6912 L_390027D6:
   6913     ecx = edi; /* 0x390027D6: mov ecx, edi */
   6914     edi = MEM32(ebp + (-0x30)); /* 0x390027D8: mov edi, dword ptr [ebp - 0x30] */
   6915     edx = ecx; /* 0x390027DB: mov edx, ecx */
   6916     esi = ebx; /* 0x390027DD: mov esi, ebx */
   6917     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x390027DF: shr ecx, 2 */
   6918     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6919     ecx = ecx >> 2u; /* 0x390027DF: shr ecx, 2 */
   6920     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390027E2: 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; }
   6921     ecx = edx; /* 0x390027E4: mov ecx, edx */
   6922     eax = edx; /* 0x390027E6: mov eax, edx */
   6923     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   6924     ecx = ecx & 3; /* 0x390027E8: and ecx, 3 */
   6925     _cf = 0;
   6926     _flag_k = FK_TEST;
   6927     PUSH32(esp, eax); /* 0x390027EB: push eax */
   6928     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x390027EC: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   6929     ecx = ebp + (-0x34); /* 0x390027EE: lea ecx, [ebp - 0x34] */
   6930     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x390027F1: call dword ptr [0x3900b038] */
   6931     RECOMP_FLAGS_IN();
   6932     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6933     esi = 0; /* 0x390027F7: xor esi, esi */
   6934     _cf = 0;
   6935     _flag_k = FK_TEST;
   6936 L_390027F9:
   6937     ecx = ebp + (-0x34); /* 0x390027F9: lea ecx, [ebp - 0x34] */
   6938     edx = ebp + 0x8; /* 0x390027FC: lea edx, [ebp + 8] */
   6939     PUSH32(esp, ecx); /* 0x390027FF: push ecx */
   6940     ecx = MEM32(ebp + 0x18); /* 0x39002800: mov ecx, dword ptr [ebp + 0x18] */
   6941     PUSH32(esp, edx); /* 0x39002803: push edx */
   6942     MEM32(ebp + (-0x4)) = esi; /* 0x39002804: mov dword ptr [ebp - 4], esi */
   6943     RECOMP_ICALL(0x390049E0u); /* 0x39002807: call 0x390049e0 */ /* not lifted */
   6944     RECOMP_FLAGS_IN();
   6945     PUSH32(esp, 1); /* 0x3900280C: push 1 */
   6946     ecx = ebp + (-0x34); /* 0x3900280E: lea ecx, [ebp - 0x34] */
   6947     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39002811: mov dword ptr [ebp - 4], 0xffffffff */
   6948     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002818: call dword ptr [0x3900b040] */
   6949     RECOMP_FLAGS_IN();
   6950     SET_LO8(eax, MEM8(ebp + 0x1B)); /* 0x3900281E: mov al, byte ptr [ebp + 0x1b] */
   6951     edi = ebx; /* 0x39002821: mov edi, ebx */
   6952     MEM8(ebp + (-0x44)) = (uint8_t)(LO8(eax)); /* 0x39002823: mov byte ptr [ebp - 0x44], al */
   6953     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   6954     ecx = ecx | 0xFFFFFFFFu; /* 0x39002826: or ecx, 0xffffffff */
   6955     _cf = 0;
   6956     _flag_k = FK_TEST;
   6957     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6958     eax = 0; /* 0x39002829: xor eax, eax */
   6959     _cf = 0;
   6960     _flag_k = FK_TEST;
   6961     MEM32(ebp + (-0x40)) = esi; /* 0x3900282B: mov dword ptr [ebp - 0x40], esi */
   6962     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x3900282E: repne scasb al, byte ptr es:[edi] */
   6963     ecx = ~ecx; /* 0x39002830: not ecx */
   6964     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   6965     ecx = ecx - 1; /* 0x39002832: dec ecx */
   6966     _flag_k = FK_DEC;
   6967     MEM32(ebp + (-0x3C)) = esi; /* 0x39002833: mov dword ptr [ebp - 0x3c], esi */
   6968     PUSH32(esp, ecx); /* 0x39002836: push ecx */
   6969     PUSH32(esp, ebx); /* 0x39002837: push ebx */
   6970     ecx = ebp + (-0x44); /* 0x39002838: lea ecx, [ebp - 0x44] */
   6971     MEM32(ebp + (-0x38)) = esi; /* 0x3900283B: mov dword ptr [ebp - 0x38], esi */
   6972     RECOMP_ICALL(MEM32(0x3900B028)); /* 0x3900283E: call dword ptr [0x3900b028] */
   6973     RECOMP_FLAGS_IN();
   6974     ecx = MEM32(ebp + 0xC); /* 0x39002844: mov ecx, dword ptr [ebp + 0xc] */
   6975     edx = MEM32(ebp + 0x10); /* 0x39002847: mov edx, dword ptr [ebp + 0x10] */
   6976     eax = MEM32(ebp + 0x14); /* 0x3900284A: mov eax, dword ptr [ebp + 0x14] */
   6977     MEM32(ebp + (-0x54)) = ecx; /* 0x3900284D: mov dword ptr [ebp - 0x54], ecx */
   6978     ecx = ebp + (-0x44); /* 0x39002850: lea ecx, [ebp - 0x44] */
   6979     MEM32(ebp + (-0x4)) = 1; /* 0x39002853: mov dword ptr [ebp - 4], 1 */
   6980     PUSH32(esp, ecx); /* 0x3900285A: push ecx */
   6981     ecx = ebp + (-0x74); /* 0x3900285B: lea ecx, [ebp - 0x74] */
   6982     MEM32(ebp + (-0x50)) = edx; /* 0x3900285E: mov dword ptr [ebp - 0x50], edx */
   6983     MEM32(ebp + (-0x4C)) = eax; /* 0x39002861: mov dword ptr [ebp - 0x4c], eax */
   6984     MEM32(ebp + (-0x34)) = 0; /* 0x39002864: mov dword ptr [ebp - 0x34], 0 */
   6985     MEM32(ebp + (-0x30)) = 0; /* 0x3900286B: mov dword ptr [ebp - 0x30], 0 */
   6986     MEM32(ebp + (-0x2C)) = 0; /* 0x39002872: mov dword ptr [ebp - 0x2c], 0 */
   6987     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6988     edi = 0; /* 0x39002879: xor edi, edi */
   6989     _cf = 0;
   6990     _flag_k = FK_TEST;
   6991     RECOMP_ICALL(MEM32(0x3900B014)); /* 0x3900287B: call dword ptr [0x3900b014] */
   6992     RECOMP_FLAGS_IN();
   6993     edx = MEM32(ebp + (-0x34)); /* 0x39002881: mov edx, dword ptr [ebp - 0x34] */
   6994     eax = MEM32(ebp + (-0x30)); /* 0x39002884: mov eax, dword ptr [ebp - 0x30] */
   6995     ecx = MEM32(ebp + (-0x2C)); /* 0x39002887: mov ecx, dword ptr [ebp - 0x2c] */
   6996     MEM32(ebp + (-0x64)) = edx; /* 0x3900288A: mov dword ptr [ebp - 0x64], edx */
   6997     MEM32(ebp + (-0x60)) = eax; /* 0x3900288D: mov dword ptr [ebp - 0x60], eax */
   6998     MEM32(ebp + (-0x5C)) = ecx; /* 0x39002890: mov dword ptr [ebp - 0x5c], ecx */
   6999     MEM32(ebp + (-0x58)) = edi; /* 0x39002893: mov dword ptr [ebp - 0x58], edi */
   7000     ecx = MEM32(ebp + 0x18); /* 0x39002896: mov ecx, dword ptr [ebp + 0x18] */
   7001     edx = ebp + (-0x74); /* 0x39002899: lea edx, [ebp - 0x74] */
   7002     eax = ebp + (-0x1C); /* 0x3900289C: lea eax, [ebp - 0x1c] */
   7003     PUSH32(esp, edx); /* 0x3900289F: push edx */
   7004     PUSH32(esp, eax); /* 0x390028A0: push eax */
   7005     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x390028A1: mov byte ptr [ebp - 4], 2 */
   7006     RECOMP_ICALL(0x39005B70u); /* 0x390028A5: call 0x39005b70 */ /* not lifted */
   7007     RECOMP_FLAGS_IN();
   7008     ecx = MEM32(eax); /* 0x390028AA: mov ecx, dword ptr [eax] */
   7009     MEM32(ebp + (-0x14)) = ecx; /* 0x390028AC: mov dword ptr [ebp - 0x14], ecx */
   7010     ecx = ebp + (-0x14); /* 0x390028AF: lea ecx, [ebp - 0x14] */
   7011     edx = MEM32(eax + 0x4); /* 0x390028B2: mov edx, dword ptr [eax + 4] */
   7012     eax = ebp + (-0x10); /* 0x390028B5: lea eax, [ebp - 0x10] */
   7013     PUSH32(esp, eax); /* 0x390028B8: push eax */
   7014     PUSH32(esp, ecx); /* 0x390028B9: push ecx */
   7015     ecx = ebp + (-0x24); /* 0x390028BA: lea ecx, [ebp - 0x24] */
   7016     MEM32(ebp + (-0x10)) = edx; /* 0x390028BD: mov dword ptr [ebp - 0x10], edx */
   7017     RECOMP_ICALL(0x390095A0u); /* 0x390028C0: call 0x390095a0 */ /* not lifted */
   7018     RECOMP_FLAGS_IN();
   7019     edi = MEM32(eax); /* 0x390028C5: mov edi, dword ptr [eax] */
   7020     PUSH32(esp, 1); /* 0x390028C7: push 1 */
   7021     ecx = ebp + (-0x74); /* 0x390028C9: lea ecx, [ebp - 0x74] */
   7022     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x390028CC: mov byte ptr [ebp - 4], 1 */
   7023     edx = MEM32(eax + 0x4); /* 0x390028D0: mov edx, dword ptr [eax + 4] */
   7024     MEM32(ebp + (-0x28)) = edx; /* 0x390028D3: mov dword ptr [ebp - 0x28], edx */
   7025     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390028D6: call dword ptr [0x3900b040] */
   7026     RECOMP_FLAGS_IN();
   7027     eax = MEM32(ebp + (-0x54)); /* 0x390028DC: mov eax, dword ptr [ebp - 0x54] */
   7028     ecx = MEM32(ebp + (-0x50)); /* 0x390028DF: mov ecx, dword ptr [ebp - 0x50] */
   7029     edx = MEM32(ebp + (-0x4C)); /* 0x390028E2: mov edx, dword ptr [ebp - 0x4c] */
   7030     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x1Cu);
   7031     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7032     edi = edi + 0x1Cu; /* 0x390028E5: add edi, 0x1c */
   7033     _flag_k = FK_ADD;
   7034     MEM32(edi) = eax; /* 0x390028E8: mov dword ptr [edi], eax */
   7035     MEM32(edi + 0x4) = ecx; /* 0x390028EA: mov dword ptr [edi + 4], ecx */
   7036     MEM32(edi + 0x8) = edx; /* 0x390028ED: mov dword ptr [edi + 8], edx */
   7037     MEM32(edi + 0xC) = esi; /* 0x390028F0: mov dword ptr [edi + 0xc], esi */
   7038     eax = MEM32(ebp + (-0x40)); /* 0x390028F3: mov eax, dword ptr [ebp - 0x40] */
   7039     edi = POP32_VAL(esp); /* 0x390028F6: pop edi */
   7040     /* cmp eax, esi */ /* 0x390028F7: cmp eax, esi */
   7041     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi);
   7042     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7043     _flag_k = FK_CMP;
   7044     esi = POP32_VAL(esp); /* 0x390028F9: pop esi */
   7045     ebx = POP32_VAL(esp); /* 0x390028FA: pop ebx */
   7046     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002928; /* 0x390028FB: je 0x39002928 */
   7047 L_390028FD:
   7048     ecx = eax + (-0x1); /* 0x390028FD: lea ecx, [eax - 1] */
   7049     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x39002900: mov al, byte ptr [eax - 1] */
   7050     /* test LO8(eax), LO8(eax) */ /* 0x39002903: test al, al */
   7051     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   7052     _cf = 0;
   7053     _flag_k = FK_NARROW(FK_TEST, 24);
   7054     if (TEST_Z(_flag_a, _flag_b)) goto L_3900291F; /* 0x39002905: je 0x3900291f */
   7055 L_39002907:
   7056     /* cmp LO8(eax), 0xFFu */ /* 0x39002907: cmp al, 0xff */
   7057     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
   7058     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7059     _flag_k = FK_NARROW(FK_CMP, 24);
   7060     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900291F; /* 0x39002909: je 0x3900291f */
   7061 L_3900290B:
   7062     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
   7063     SET_LO8(eax, LO8(eax) - 1); /* 0x3900290B: dec al */
   7064     _flag_k = FK_NARROW(FK_DEC, 24);
   7065     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x3900290D: mov byte ptr [ecx], al */
   7066     ecx = MEM32(ebp + (-0xC)); /* 0x3900290F: mov ecx, dword ptr [ebp - 0xc] */
   7067     MEM32(FS_BASE + (0)) = ecx; /* 0x39002912: mov dword ptr fs:[0], ecx */
   7068     esp = ebp; /* 0x39002919: mov esp, ebp */
   7069     ebp = POP32_VAL(esp); /* 0x3900291B: pop ebp */
   7070     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x3900291C: ret 0x14 */
   7071 L_3900291F:
   7072     PUSH32(esp, ecx); /* 0x3900291F: push ecx */
   7073     RECOMP_ICALL(0x3900A0A0u); /* 0x39002920: call 0x3900a0a0 */ /* not lifted */
   7074     RECOMP_FLAGS_IN();
   7075     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7076     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7077     esp = esp + 4; /* 0x39002925: add esp, 4 */
   7078     _flag_k = FK_ADD;
   7079 L_39002928:
   7080     ecx = MEM32(ebp + (-0xC)); /* 0x39002928: mov ecx, dword ptr [ebp - 0xc] */
   7081     MEM32(FS_BASE + (0)) = ecx; /* 0x3900292B: mov dword ptr fs:[0], ecx */
   7082     esp = ebp; /* 0x39002932: mov esp, ebp */
   7083     ebp = POP32_VAL(esp); /* 0x39002934: pop ebp */
   7084     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x39002935: ret 0x14 */
   7085     RECOMP_REGS_OUT();
   7086 }
   7087 
   7088 void sub_39002940(void) {
   7089     int _fpu_cmp = 0;
   7090     uint32_t _cf = 0;
   7091     int _df = 1;
   7092     uint32_t _flag_k = FK_NONE;
   7093     uint32_t _flag_a = 0, _flag_b = 0;
   7094     uint32_t _itail_tgt = 0;
   7095     RECOMP_REGS_LOCALS
   7096     RECOMP_ENTER(0x39002940u);
   7097 
   7098 L_39002940:
   7099     PUSH32(esp, ebp); /* 0x39002940: push ebp */
   7100     ebp = esp; /* 0x39002941: mov ebp, esp */
   7101     PUSH32(esp, 0xFFFFFFFFu); /* 0x39002943: push -1 */
   7102     PUSH32(esp, 0x3900A666u); /* 0x39002945: push 0x3900a666 */
   7103     eax = MEM32(FS_BASE + (0)); /* 0x3900294A: mov eax, dword ptr fs:[0] */
   7104     PUSH32(esp, eax); /* 0x39002950: push eax */
   7105     MEM32(FS_BASE + (0)) = esp; /* 0x39002951: mov dword ptr fs:[0], esp */
   7106     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x90u);
   7107     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7108     esp = esp - 0x90u; /* 0x39002958: sub esp, 0x90 */
   7109     _flag_k = FK_CMP;
   7110     eax = MEM32(ebp + 0x14); /* 0x3900295E: mov eax, dword ptr [ebp + 0x14] */
   7111     /* test eax, eax */ /* 0x39002961: test eax, eax */
   7112     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   7113     _cf = 0;
   7114     _flag_k = FK_TEST;
   7115     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900296D; /* 0x39002963: jne 0x3900296d */
   7116 L_39002965:
   7117     eax = MEM32(ecx + 0x38); /* 0x39002965: mov eax, dword ptr [ecx + 0x38] */
   7118     MEM32(ebp + 0x14) = eax; /* 0x39002968: mov dword ptr [ebp + 0x14], eax */
   7119     goto L_39002980; /* 0x3900296B: jmp 0x39002980 */
   7120 L_3900296D:
   7121     /* cmp eax, 2 */ /* 0x3900296D: cmp eax, 2 */
   7122     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   7123     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7124     _flag_k = FK_CMP;
   7125     if (CMP_NE(_flag_a, _flag_b)) goto L_3900297A; /* 0x39002970: jne 0x3900297a */
   7126 L_39002972:
   7127     ecx = MEM32(ecx + 0x50); /* 0x39002972: mov ecx, dword ptr [ecx + 0x50] */
   7128     MEM32(ebp + 0x14) = ecx; /* 0x39002975: mov dword ptr [ebp + 0x14], ecx */
   7129     goto L_39002980; /* 0x39002978: jmp 0x39002980 */
   7130 L_3900297A:
   7131     edx = MEM32(ecx + 0x44); /* 0x3900297A: mov edx, dword ptr [ecx + 0x44] */
   7132     MEM32(ebp + 0x14) = edx; /* 0x3900297D: mov dword ptr [ebp + 0x14], edx */
   7133 L_39002980:
   7134     SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x39002980: mov al, byte ptr [ebp + 0xb] */
   7135     PUSH32(esp, ebx); /* 0x39002983: push ebx */
   7136     PUSH32(esp, esi); /* 0x39002984: push esi */
   7137     PUSH32(esp, edi); /* 0x39002985: push edi */
   7138     PUSH32(esp, 0); /* 0x39002986: push 0 */
   7139     ecx = ebp + (-0x2C); /* 0x39002988: lea ecx, [ebp - 0x2c] */
   7140     MEM8(ebp + (-0x2C)) = (uint8_t)(LO8(eax)); /* 0x3900298B: mov byte ptr [ebp - 0x2c], al */
   7141     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x3900298E: call dword ptr [0x3900b040] */
   7142     RECOMP_FLAGS_IN();
   7143     esi = MEM32(ebp + 0x8); /* 0x39002994: mov esi, dword ptr [ebp + 8] */
   7144     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   7145     ecx = ecx | 0xFFFFFFFFu; /* 0x39002997: or ecx, 0xffffffff */
   7146     _cf = 0;
   7147     _flag_k = FK_TEST;
   7148     edi = esi; /* 0x3900299A: mov edi, esi */
   7149     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7150     eax = 0; /* 0x3900299C: xor eax, eax */
   7151     _cf = 0;
   7152     _flag_k = FK_TEST;
   7153     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x3900299E: repne scasb al, byte ptr es:[edi] */
   7154     ecx = ~ecx; /* 0x390029A0: not ecx */
   7155     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   7156     ecx = ecx - 1; /* 0x390029A2: dec ecx */
   7157     _flag_k = FK_DEC;
   7158     PUSH32(esp, 1); /* 0x390029A3: push 1 */
   7159     ebx = ecx; /* 0x390029A5: mov ebx, ecx */
   7160     ecx = ebp + (-0x2C); /* 0x390029A7: lea ecx, [ebp - 0x2c] */
   7161     PUSH32(esp, ebx); /* 0x390029AA: push ebx */
   7162     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x390029AB: call dword ptr [0x3900b034] */
   7163     RECOMP_FLAGS_IN();
   7164     /* test LO8(eax), LO8(eax) */ /* 0x390029B1: test al, al */
   7165     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   7166     _cf = 0;
   7167     _flag_k = FK_NARROW(FK_TEST, 24);
   7168     if (TEST_Z(_flag_a, _flag_b)) goto L_390029D5; /* 0x390029B3: je 0x390029d5 */
   7169 L_390029B5:
   7170     edi = MEM32(ebp + (-0x28)); /* 0x390029B5: mov edi, dword ptr [ebp - 0x28] */
   7171     ecx = ebx; /* 0x390029B8: mov ecx, ebx */
   7172     edx = ecx; /* 0x390029BA: mov edx, ecx */
   7173     PUSH32(esp, ebx); /* 0x390029BC: push ebx */
   7174     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x390029BD: shr ecx, 2 */
   7175     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7176     ecx = ecx >> 2u; /* 0x390029BD: shr ecx, 2 */
   7177     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390029C0: 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; }
   7178     ecx = edx; /* 0x390029C2: mov ecx, edx */
   7179     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   7180     ecx = ecx & 3; /* 0x390029C4: and ecx, 3 */
   7181     _cf = 0;
   7182     _flag_k = FK_TEST;
   7183     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x390029C7: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   7184     ecx = ebp + (-0x2C); /* 0x390029C9: lea ecx, [ebp - 0x2c] */
   7185     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x390029CC: call dword ptr [0x3900b038] */
   7186     RECOMP_FLAGS_IN();
   7187     esi = MEM32(ebp + 0x8); /* 0x390029D2: mov esi, dword ptr [ebp + 8] */
   7188 L_390029D5:
   7189     eax = ebp + (-0x2C); /* 0x390029D5: lea eax, [ebp - 0x2c] */
   7190     ecx = ebp + (-0x4C); /* 0x390029D8: lea ecx, [ebp - 0x4c] */
   7191     PUSH32(esp, eax); /* 0x390029DB: push eax */
   7192     PUSH32(esp, ecx); /* 0x390029DC: push ecx */
   7193     ecx = MEM32(ebp + 0x14); /* 0x390029DD: mov ecx, dword ptr [ebp + 0x14] */
   7194     MEM32(ebp + (-0x4)) = 0; /* 0x390029E0: mov dword ptr [ebp - 4], 0 */
   7195     RECOMP_ICALL(0x390049E0u); /* 0x390029E7: call 0x390049e0 */ /* not lifted */
   7196     RECOMP_FLAGS_IN();
   7197     PUSH32(esp, 1); /* 0x390029EC: push 1 */
   7198     ecx = ebp + (-0x2C); /* 0x390029EE: lea ecx, [ebp - 0x2c] */
   7199     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x390029F1: mov dword ptr [ebp - 4], 0xffffffff */
   7200     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390029F8: call dword ptr [0x3900b040] */
   7201     RECOMP_FLAGS_IN();
   7202     SET_LO8(edx, MEM8(ebp + 0xB)); /* 0x390029FE: mov dl, byte ptr [ebp + 0xb] */
   7203     PUSH32(esp, 0); /* 0x39002A01: push 0 */
   7204     ecx = ebp + (-0x1C); /* 0x39002A03: lea ecx, [ebp - 0x1c] */
   7205     MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(edx)); /* 0x39002A06: mov byte ptr [ebp - 0x1c], dl */
   7206     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002A09: call dword ptr [0x3900b040] */
   7207     RECOMP_FLAGS_IN();
   7208     edi = esi; /* 0x39002A0F: mov edi, esi */
   7209     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   7210     ecx = ecx | 0xFFFFFFFFu; /* 0x39002A11: or ecx, 0xffffffff */
   7211     _cf = 0;
   7212     _flag_k = FK_TEST;
   7213     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7214     eax = 0; /* 0x39002A14: xor eax, eax */
   7215     _cf = 0;
   7216     _flag_k = FK_TEST;
   7217     PUSH32(esp, 1); /* 0x39002A16: push 1 */
   7218     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39002A18: repne scasb al, byte ptr es:[edi] */
   7219     ecx = ~ecx; /* 0x39002A1A: not ecx */
   7220     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   7221     ecx = ecx - 1; /* 0x39002A1C: dec ecx */
   7222     _flag_k = FK_DEC;
   7223     ebx = ecx; /* 0x39002A1D: mov ebx, ecx */
   7224     ecx = ebp + (-0x1C); /* 0x39002A1F: lea ecx, [ebp - 0x1c] */
   7225     PUSH32(esp, ebx); /* 0x39002A22: push ebx */
   7226     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39002A23: call dword ptr [0x3900b034] */
   7227     RECOMP_FLAGS_IN();
   7228     /* test LO8(eax), LO8(eax) */ /* 0x39002A29: test al, al */
   7229     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   7230     _cf = 0;
   7231     _flag_k = FK_NARROW(FK_TEST, 24);
   7232     if (TEST_Z(_flag_a, _flag_b)) goto L_39002A4D; /* 0x39002A2B: je 0x39002a4d */
   7233 L_39002A2D:
   7234     esi = MEM32(ebp + 0x8); /* 0x39002A2D: mov esi, dword ptr [ebp + 8] */
   7235     edi = MEM32(ebp + (-0x18)); /* 0x39002A30: mov edi, dword ptr [ebp - 0x18] */
   7236     ecx = ebx; /* 0x39002A33: mov ecx, ebx */
   7237     eax = ecx; /* 0x39002A35: mov eax, ecx */
   7238     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39002A37: shr ecx, 2 */
   7239     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7240     ecx = ecx >> 2u; /* 0x39002A37: shr ecx, 2 */
   7241     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39002A3A: 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; }
   7242     ecx = eax; /* 0x39002A3C: mov ecx, eax */
   7243     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   7244     ecx = ecx & 3; /* 0x39002A3E: and ecx, 3 */
   7245     _cf = 0;
   7246     _flag_k = FK_TEST;
   7247     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39002A41: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   7248     ecx = MEM32(ebp + (-0x18)); /* 0x39002A43: mov ecx, dword ptr [ebp - 0x18] */
   7249     MEM32(ebp + (-0x14)) = ebx; /* 0x39002A46: mov dword ptr [ebp - 0x14], ebx */
   7250     MEM8(ecx + ebx) = (uint8_t)(0); /* 0x39002A49: mov byte ptr [ecx + ebx], 0 */
   7251 L_39002A4D:
   7252     SET_LO8(edx, MEM8(ebp + 0xB)); /* 0x39002A4D: mov dl, byte ptr [ebp + 0xb] */
   7253     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7254     ebx = 0; /* 0x39002A50: xor ebx, ebx */
   7255     _cf = 0;
   7256     _flag_k = FK_TEST;
   7257     PUSH32(esp, ebx); /* 0x39002A52: push ebx */
   7258     ecx = ebp + (-0x48); /* 0x39002A53: lea ecx, [ebp - 0x48] */
   7259     MEM32(ebp + (-0x4)) = 1; /* 0x39002A56: mov dword ptr [ebp - 4], 1 */
   7260     MEM8(ebp + (-0x48)) = (uint8_t)(LO8(edx)); /* 0x39002A5D: mov byte ptr [ebp - 0x48], dl */
   7261     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002A60: call dword ptr [0x3900b040] */
   7262     RECOMP_FLAGS_IN();
   7263     edx = MEM32(ebp + 0xC); /* 0x39002A66: mov edx, dword ptr [ebp + 0xc] */
   7264     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   7265     ecx = ecx | 0xFFFFFFFFu; /* 0x39002A69: or ecx, 0xffffffff */
   7266     _cf = 0;
   7267     _flag_k = FK_TEST;
   7268     edi = edx; /* 0x39002A6C: mov edi, edx */
   7269     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7270     eax = 0; /* 0x39002A6E: xor eax, eax */
   7271     _cf = 0;
   7272     _flag_k = FK_TEST;
   7273     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39002A70: repne scasb al, byte ptr es:[edi] */
   7274     ecx = ~ecx; /* 0x39002A72: not ecx */
   7275     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   7276     ecx = ecx - 1; /* 0x39002A74: dec ecx */
   7277     _flag_k = FK_DEC;
   7278     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x39002A75: mov byte ptr [ebp - 4], 2 */
   7279     PUSH32(esp, ecx); /* 0x39002A79: push ecx */
   7280     PUSH32(esp, edx); /* 0x39002A7A: push edx */
   7281     ecx = ebp + (-0x48); /* 0x39002A7B: lea ecx, [ebp - 0x48] */
   7282     MEM32(ebp + (-0x34)) = ebx; /* 0x39002A7E: mov dword ptr [ebp - 0x34], ebx */
   7283     RECOMP_ICALL(MEM32(0x3900B028)); /* 0x39002A81: call dword ptr [0x3900b028] */
   7284     RECOMP_FLAGS_IN();
   7285     eax = MEM32(ebp + 0x10); /* 0x39002A87: mov eax, dword ptr [ebp + 0x10] */
   7286     MEM32(ebp + (-0x38)) = eax; /* 0x39002A8A: mov dword ptr [ebp - 0x38], eax */
   7287     ecx = ebp + 0xB; /* 0x39002A8D: lea ecx, [ebp + 0xb] */
   7288     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x39002A90: mov byte ptr [ebp - 4], 3 */
   7289     PUSH32(esp, ecx); /* 0x39002A94: push ecx */
   7290     ecx = ebp + (-0x68); /* 0x39002A95: lea ecx, [ebp - 0x68] */
   7291     RECOMP_ICALL(MEM32(0x3900B00C)); /* 0x39002A98: call dword ptr [0x3900b00c] */
   7292     RECOMP_FLAGS_IN();
   7293     MEM32(ebp + (-0x58)) = ebx; /* 0x39002A9E: mov dword ptr [ebp - 0x58], ebx */
   7294     MEM32(ebp + (-0x54)) = ebx; /* 0x39002AA1: mov dword ptr [ebp - 0x54], ebx */
   7295     edx = ebp + (-0x68); /* 0x39002AA4: lea edx, [ebp - 0x68] */
   7296     eax = ebp + (-0x1C); /* 0x39002AA7: lea eax, [ebp - 0x1c] */
   7297     PUSH32(esp, edx); /* 0x39002AAA: push edx */
   7298     PUSH32(esp, eax); /* 0x39002AAB: push eax */
   7299     ecx = ebp + (-0x9C); /* 0x39002AAC: lea ecx, [ebp - 0x9c] */
   7300     MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x39002AB2: mov byte ptr [ebp - 4], 4 */
   7301     RECOMP_ICALL(0x39004E00u); /* 0x39002AB6: call 0x39004e00 */ /* not lifted */
   7302     RECOMP_FLAGS_IN();
   7303     ecx = ebp + (-0x70); /* 0x39002ABB: lea ecx, [ebp - 0x70] */
   7304     PUSH32(esp, eax); /* 0x39002ABE: push eax */
   7305     PUSH32(esp, ecx); /* 0x39002ABF: push ecx */
   7306     ecx = MEM32(ebp + 0x14); /* 0x39002AC0: mov ecx, dword ptr [ebp + 0x14] */
   7307     MEM8(ebp + (-0x4)) = (uint8_t)(5); /* 0x39002AC3: mov byte ptr [ebp - 4], 5 */
   7308     RECOMP_ICALL(0x39004BF0u); /* 0x39002AC7: call 0x39004bf0 */ /* not lifted */
   7309     RECOMP_FLAGS_IN();
   7310     esi = MEM32(eax); /* 0x39002ACC: mov esi, dword ptr [eax] */
   7311     ecx = ebp + (-0x9C); /* 0x39002ACE: lea ecx, [ebp - 0x9c] */
   7312     MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x39002AD4: mov byte ptr [ebp - 4], 4 */
   7313     RECOMP_ICALL(0x390047D0u); /* 0x39002AD8: call 0x390047d0 */ /* not lifted */
   7314     RECOMP_FLAGS_IN();
   7315     PUSH32(esp, 1); /* 0x39002ADD: push 1 */
   7316     ecx = ebp + (-0x68); /* 0x39002ADF: lea ecx, [ebp - 0x68] */
   7317     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x39002AE2: mov byte ptr [ebp - 4], 3 */
   7318     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002AE6: call dword ptr [0x3900b040] */
   7319     RECOMP_FLAGS_IN();
   7320     edx = MEM32(0x3900B008); /* 0x39002AEC: mov edx, dword ptr [0x3900b008] */
   7321     ecx = ebp + (-0x48); /* 0x39002AF2: lea ecx, [ebp - 0x48] */
   7322     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x1Cu);
   7323     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7324     esi = esi + 0x1Cu; /* 0x39002AF5: add esi, 0x1c */
   7325     _flag_k = FK_ADD;
   7326     eax = MEM32(edx); /* 0x39002AF8: mov eax, dword ptr [edx] */
   7327     PUSH32(esp, eax); /* 0x39002AFA: push eax */
   7328     PUSH32(esp, ebx); /* 0x39002AFB: push ebx */
   7329     PUSH32(esp, ecx); /* 0x39002AFC: push ecx */
   7330     ecx = esi; /* 0x39002AFD: mov ecx, esi */
   7331     RECOMP_ICALL(MEM32(0x3900B024)); /* 0x39002AFF: call dword ptr [0x3900b024] */
   7332     RECOMP_FLAGS_IN();
   7333     edx = MEM32(ebp + (-0x38)); /* 0x39002B05: mov edx, dword ptr [ebp - 0x38] */
   7334     PUSH32(esp, 1); /* 0x39002B08: push 1 */
   7335     MEM32(esi + 0x10) = edx; /* 0x39002B0A: mov dword ptr [esi + 0x10], edx */
   7336     eax = MEM32(ebp + (-0x34)); /* 0x39002B0D: mov eax, dword ptr [ebp - 0x34] */
   7337     MEM32(esi + 0x14) = eax; /* 0x39002B10: mov dword ptr [esi + 0x14], eax */
   7338     ecx = MEM32(ebp + (-0x30)); /* 0x39002B13: mov ecx, dword ptr [ebp - 0x30] */
   7339     MEM32(esi + 0x18) = ecx; /* 0x39002B16: mov dword ptr [esi + 0x18], ecx */
   7340     ecx = ebp + (-0x48); /* 0x39002B19: lea ecx, [ebp - 0x48] */
   7341     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x39002B1C: mov byte ptr [ebp - 4], 1 */
   7342     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002B20: call dword ptr [0x3900b040] */
   7343     RECOMP_FLAGS_IN();
   7344     eax = MEM32(ebp + (-0x18)); /* 0x39002B26: mov eax, dword ptr [ebp - 0x18] */
   7345     edi = POP32_VAL(esp); /* 0x39002B29: pop edi */
   7346     esi = POP32_VAL(esp); /* 0x39002B2A: pop esi */
   7347     /* cmp eax, ebx */ /* 0x39002B2B: cmp eax, ebx */
   7348     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   7349     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7350     _flag_k = FK_CMP;
   7351     ebx = POP32_VAL(esp); /* 0x39002B2D: pop ebx */
   7352     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002B5B; /* 0x39002B2E: je 0x39002b5b */
   7353 L_39002B30:
   7354     ecx = eax + (-0x1); /* 0x39002B30: lea ecx, [eax - 1] */
   7355     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x39002B33: mov al, byte ptr [eax - 1] */
   7356     /* test LO8(eax), LO8(eax) */ /* 0x39002B36: test al, al */
   7357     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   7358     _cf = 0;
   7359     _flag_k = FK_NARROW(FK_TEST, 24);
   7360     if (TEST_Z(_flag_a, _flag_b)) goto L_39002B52; /* 0x39002B38: je 0x39002b52 */
   7361 L_39002B3A:
   7362     /* cmp LO8(eax), 0xFFu */ /* 0x39002B3A: cmp al, 0xff */
   7363     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
   7364     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7365     _flag_k = FK_NARROW(FK_CMP, 24);
   7366     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002B52; /* 0x39002B3C: je 0x39002b52 */
   7367 L_39002B3E:
   7368     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
   7369     SET_LO8(eax, LO8(eax) - 1); /* 0x39002B3E: dec al */
   7370     _flag_k = FK_NARROW(FK_DEC, 24);
   7371     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x39002B40: mov byte ptr [ecx], al */
   7372     ecx = MEM32(ebp + (-0xC)); /* 0x39002B42: mov ecx, dword ptr [ebp - 0xc] */
   7373     MEM32(FS_BASE + (0)) = ecx; /* 0x39002B45: mov dword ptr fs:[0], ecx */
   7374     esp = ebp; /* 0x39002B4C: mov esp, ebp */
   7375     ebp = POP32_VAL(esp); /* 0x39002B4E: pop ebp */
   7376     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39002B4F: ret 0x10 */
   7377 L_39002B52:
   7378     PUSH32(esp, ecx); /* 0x39002B52: push ecx */
   7379     RECOMP_ICALL(0x3900A0A0u); /* 0x39002B53: call 0x3900a0a0 */ /* not lifted */
   7380     RECOMP_FLAGS_IN();
   7381     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7382     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7383     esp = esp + 4; /* 0x39002B58: add esp, 4 */
   7384     _flag_k = FK_ADD;
   7385 L_39002B5B:
   7386     ecx = MEM32(ebp + (-0xC)); /* 0x39002B5B: mov ecx, dword ptr [ebp - 0xc] */
   7387     MEM32(FS_BASE + (0)) = ecx; /* 0x39002B5E: mov dword ptr fs:[0], ecx */
   7388     esp = ebp; /* 0x39002B65: mov esp, ebp */
   7389     ebp = POP32_VAL(esp); /* 0x39002B67: pop ebp */
   7390     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39002B68: ret 0x10 */
   7391     RECOMP_REGS_OUT();
   7392 }
   7393 
   7394 void sub_39002B70(void) {
   7395     int _fpu_cmp = 0;
   7396     uint32_t _cf = 0;
   7397     int _df = 1;
   7398     uint32_t _flag_k = FK_NONE;
   7399     uint32_t _flag_a = 0, _flag_b = 0;
   7400     uint32_t _itail_tgt = 0;
   7401     RECOMP_REGS_LOCALS
   7402     RECOMP_ENTER(0x39002B70u);
   7403 
   7404 L_39002B70:
   7405     PUSH32(esp, ebp); /* 0x39002B70: push ebp */
   7406     ebp = esp; /* 0x39002B71: mov ebp, esp */
   7407     PUSH32(esp, 0xFFFFFFFFu); /* 0x39002B73: push -1 */
   7408     PUSH32(esp, 0x3900A684u); /* 0x39002B75: push 0x3900a684 */
   7409     eax = MEM32(FS_BASE + (0)); /* 0x39002B7A: mov eax, dword ptr fs:[0] */
   7410     PUSH32(esp, eax); /* 0x39002B80: push eax */
   7411     MEM32(FS_BASE + (0)) = esp; /* 0x39002B81: mov dword ptr fs:[0], esp */
   7412     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x40u);
   7413     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7414     esp = esp - 0x40u; /* 0x39002B88: sub esp, 0x40 */
   7415     _flag_k = FK_CMP;
   7416     eax = MEM32(ebp + 0x14); /* 0x39002B8B: mov eax, dword ptr [ebp + 0x14] */
   7417     PUSH32(esp, ebx); /* 0x39002B8E: push ebx */
   7418     PUSH32(esp, esi); /* 0x39002B8F: push esi */
   7419     PUSH32(esp, edi); /* 0x39002B90: push edi */
   7420     /* test eax, eax */ /* 0x39002B91: test eax, eax */
   7421     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   7422     _cf = 0;
   7423     _flag_k = FK_TEST;
   7424     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002B9A; /* 0x39002B93: jne 0x39002b9a */
   7425 L_39002B95:
   7426     ebx = MEM32(ecx + 0x30); /* 0x39002B95: mov ebx, dword ptr [ecx + 0x30] */
   7427     goto L_39002BA7; /* 0x39002B98: jmp 0x39002ba7 */
   7428 L_39002B9A:
   7429     /* cmp eax, 2 */ /* 0x39002B9A: cmp eax, 2 */
   7430     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   7431     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7432     _flag_k = FK_CMP;
   7433     if (CMP_NE(_flag_a, _flag_b)) goto L_39002BA4; /* 0x39002B9D: jne 0x39002ba4 */
   7434 L_39002B9F:
   7435     ebx = MEM32(ecx + 0x48); /* 0x39002B9F: mov ebx, dword ptr [ecx + 0x48] */
   7436     goto L_39002BA7; /* 0x39002BA2: jmp 0x39002ba7 */
   7437 L_39002BA4:
   7438     ebx = MEM32(ecx + 0x3C); /* 0x39002BA4: mov ebx, dword ptr [ecx + 0x3c] */
   7439 L_39002BA7:
   7440     SET_LO8(eax, MEM8(ebp + 0x1B)); /* 0x39002BA7: mov al, byte ptr [ebp + 0x1b] */
   7441     PUSH32(esp, 0); /* 0x39002BAA: push 0 */
   7442     ecx = ebp + (-0x4C); /* 0x39002BAC: lea ecx, [ebp - 0x4c] */
   7443     MEM8(ebp + (-0x4C)) = (uint8_t)(LO8(eax)); /* 0x39002BAF: mov byte ptr [ebp - 0x4c], al */
   7444     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002BB2: call dword ptr [0x3900b040] */
   7445     RECOMP_FLAGS_IN();
   7446     esi = MEM32(ebp + 0x8); /* 0x39002BB8: mov esi, dword ptr [ebp + 8] */
   7447     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   7448     ecx = ecx | 0xFFFFFFFFu; /* 0x39002BBB: or ecx, 0xffffffff */
   7449     _cf = 0;
   7450     _flag_k = FK_TEST;
   7451     edi = esi; /* 0x39002BBE: mov edi, esi */
   7452     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7453     eax = 0; /* 0x39002BC0: xor eax, eax */
   7454     _cf = 0;
   7455     _flag_k = FK_TEST;
   7456     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39002BC2: repne scasb al, byte ptr es:[edi] */
   7457     ecx = ~ecx; /* 0x39002BC4: not ecx */
   7458     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   7459     ecx = ecx - 1; /* 0x39002BC6: dec ecx */
   7460     _flag_k = FK_DEC;
   7461     PUSH32(esp, 1); /* 0x39002BC7: push 1 */
   7462     edi = ecx; /* 0x39002BC9: mov edi, ecx */
   7463     ecx = ebp + (-0x4C); /* 0x39002BCB: lea ecx, [ebp - 0x4c] */
   7464     PUSH32(esp, edi); /* 0x39002BCE: push edi */
   7465     MEM32(ebp + (-0x14)) = edi; /* 0x39002BCF: mov dword ptr [ebp - 0x14], edi */
   7466     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39002BD2: call dword ptr [0x3900b034] */
   7467     RECOMP_FLAGS_IN();
   7468     /* test LO8(eax), LO8(eax) */ /* 0x39002BD8: test al, al */
   7469     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   7470     _cf = 0;
   7471     _flag_k = FK_NARROW(FK_TEST, 24);
   7472     if (TEST_Z(_flag_a, _flag_b)) goto L_39002BFB; /* 0x39002BDA: je 0x39002bfb */
   7473 L_39002BDC:
   7474     ecx = edi; /* 0x39002BDC: mov ecx, edi */
   7475     edi = MEM32(ebp + (-0x48)); /* 0x39002BDE: mov edi, dword ptr [ebp - 0x48] */
   7476     edx = ecx; /* 0x39002BE1: mov edx, ecx */
   7477     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39002BE3: shr ecx, 2 */
   7478     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7479     ecx = ecx >> 2u; /* 0x39002BE3: shr ecx, 2 */
   7480     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39002BE6: 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; }
   7481     ecx = edx; /* 0x39002BE8: mov ecx, edx */
   7482     eax = edx; /* 0x39002BEA: mov eax, edx */
   7483     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   7484     ecx = ecx & 3; /* 0x39002BEC: and ecx, 3 */
   7485     _cf = 0;
   7486     _flag_k = FK_TEST;
   7487     PUSH32(esp, eax); /* 0x39002BEF: push eax */
   7488     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39002BF0: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   7489     ecx = ebp + (-0x4C); /* 0x39002BF2: lea ecx, [ebp - 0x4c] */
   7490     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39002BF5: call dword ptr [0x3900b038] */
   7491     RECOMP_FLAGS_IN();
   7492 L_39002BFB:
   7493     ecx = ebp + (-0x4C); /* 0x39002BFB: lea ecx, [ebp - 0x4c] */
   7494     edx = ebp + (-0x18); /* 0x39002BFE: lea edx, [ebp - 0x18] */
   7495     PUSH32(esp, ecx); /* 0x39002C01: push ecx */
   7496     PUSH32(esp, edx); /* 0x39002C02: push edx */
   7497     ecx = ebx; /* 0x39002C03: mov ecx, ebx */
   7498     MEM32(ebp + (-0x4)) = 0; /* 0x39002C05: mov dword ptr [ebp - 4], 0 */
   7499     RECOMP_ICALL(0x390049E0u); /* 0x39002C0C: call 0x390049e0 */ /* not lifted */
   7500     RECOMP_FLAGS_IN();
   7501     edi = MEM32(eax); /* 0x39002C11: mov edi, dword ptr [eax] */
   7502     PUSH32(esp, 1); /* 0x39002C13: push 1 */
   7503     ecx = ebp + (-0x4C); /* 0x39002C15: lea ecx, [ebp - 0x4c] */
   7504     MEM32(ebp + (-0x14)) = edi; /* 0x39002C18: mov dword ptr [ebp - 0x14], edi */
   7505     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39002C1B: mov dword ptr [ebp - 4], 0xffffffff */
   7506     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002C22: call dword ptr [0x3900b040] */
   7507     RECOMP_FLAGS_IN();
   7508     /* cmp edi, MEM32(ebx + 0x4) */ /* 0x39002C28: cmp edi, dword ptr [ebx + 4] */
   7509     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebx + 0x4));
   7510     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7511     _flag_k = FK_CMP;
   7512     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002D48; /* 0x39002C2B: je 0x39002d48 */
   7513 L_39002C31:
   7514     eax = MEM32(edi + 0x28); /* 0x39002C31: mov eax, dword ptr [edi + 0x28] */
   7515     /* test eax, eax */ /* 0x39002C34: test eax, eax */
   7516     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   7517     _cf = 0;
   7518     _flag_k = FK_TEST;
   7519     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002C76; /* 0x39002C36: jne 0x39002c76 */
   7520 L_39002C38:
   7521     PUSH32(esp, 0x14u); /* 0x39002C38: push 0x14 */
   7522     RECOMP_ICALL(0x3900A0ACu); /* 0x39002C3A: call 0x3900a0ac */ /* not lifted */
   7523     RECOMP_FLAGS_IN();
   7524     esi = eax; /* 0x39002C3F: mov esi, eax */
   7525     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7526     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7527     esp = esp + 4; /* 0x39002C41: add esp, 4 */
   7528     _flag_k = FK_ADD;
   7529     MEM32(ebp + 0x14) = esi; /* 0x39002C44: mov dword ptr [ebp + 0x14], esi */
   7530     /* test esi, esi */ /* 0x39002C47: test esi, esi */
   7531     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   7532     _cf = 0;
   7533     _flag_k = FK_TEST;
   7534     MEM32(ebp + (-0x4)) = 1; /* 0x39002C49: mov dword ptr [ebp - 4], 1 */
   7535     if (TEST_Z(_flag_a, _flag_b)) goto L_39002C6A; /* 0x39002C50: je 0x39002c6a */
   7536 L_39002C52:
   7537     SET_LO8(ecx, MEM8(ebp + 0x1B)); /* 0x39002C52: mov cl, byte ptr [ebp + 0x1b] */
   7538     SET_LO8(eax, MEM8(ebp + 0x1B)); /* 0x39002C55: mov al, byte ptr [ebp + 0x1b] */
   7539     MEM8(esi + 0x1) = (uint8_t)(LO8(ecx)); /* 0x39002C58: mov byte ptr [esi + 1], cl */
   7540     ecx = esi; /* 0x39002C5B: mov ecx, esi */
   7541     MEM8(esi) = (uint8_t)(LO8(eax)); /* 0x39002C5D: mov byte ptr [esi], al */
   7542     MEM8(esi + 0xC) = (uint8_t)(1); /* 0x39002C5F: mov byte ptr [esi + 0xc], 1 */
   7543     RECOMP_ICALL(0x390053F0u); /* 0x39002C63: call 0x390053f0 */ /* not lifted */
   7544     RECOMP_FLAGS_IN();
   7545     goto L_39002C6C; /* 0x39002C68: jmp 0x39002c6c */
   7546 L_39002C6A:
   7547     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7548     esi = 0; /* 0x39002C6A: xor esi, esi */
   7549     _cf = 0;
   7550     _flag_k = FK_TEST;
   7551 L_39002C6C:
   7552     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39002C6C: mov dword ptr [ebp - 4], 0xffffffff */
   7553     MEM32(edi + 0x28) = esi; /* 0x39002C73: mov dword ptr [edi + 0x28], esi */
   7554 L_39002C76:
   7555     edx = MEM32(ebp + 0xC); /* 0x39002C76: mov edx, dword ptr [ebp + 0xc] */
   7556     eax = MEM32(ebp + 0x10); /* 0x39002C79: mov eax, dword ptr [ebp + 0x10] */
   7557     ebx = MEM32(edi + 0x28); /* 0x39002C7C: mov ebx, dword ptr [edi + 0x28] */
   7558     MEM32(ebp + (-0x2C)) = edx; /* 0x39002C7F: mov dword ptr [ebp - 0x2c], edx */
   7559     MEM32(ebp + (-0x28)) = eax; /* 0x39002C82: mov dword ptr [ebp - 0x28], eax */
   7560     SET_LO8(eax, 1); /* 0x39002C85: mov al, 1 */
   7561     ecx = MEM32(ebx + 0x4); /* 0x39002C87: mov ecx, dword ptr [ebx + 4] */
   7562     edx = MEM32(ebx + 0x8); /* 0x39002C8A: mov edx, dword ptr [ebx + 8] */
   7563     edi = ecx; /* 0x39002C8D: mov edi, ecx */
   7564     esi = MEM32(ecx + 0x4); /* 0x39002C8F: mov esi, dword ptr [ecx + 4] */
   7565     /* cmp esi, edx */ /* 0x39002C92: cmp esi, edx */
   7566     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx);
   7567     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7568     _flag_k = FK_CMP;
   7569     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002CB0; /* 0x39002C94: je 0x39002cb0 */
   7570 L_39002C96:
   7571     eax = MEM32(ebp + 0xC); /* 0x39002C96: mov eax, dword ptr [ebp + 0xc] */
   7572     edi = esi; /* 0x39002C99: mov edi, esi */
   7573     /* cmp eax, MEM32(esi + 0xC) */ /* 0x39002C9B: cmp eax, dword ptr [esi + 0xc] */
   7574     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(esi + 0xC));
   7575     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7576     _flag_k = FK_CMP;
   7577     SET_LO8(eax, (CMP_B(_flag_a, _flag_b)) ? 1 : 0); /* 0x39002C9E: setb al */
   7578     /* test LO8(eax), LO8(eax) */ /* 0x39002CA1: test al, al */
   7579     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   7580     _cf = 0;
   7581     _flag_k = FK_NARROW(FK_TEST, 24);
   7582     if (TEST_Z(_flag_a, _flag_b)) goto L_39002CA9; /* 0x39002CA3: je 0x39002ca9 */
   7583 L_39002CA5:
   7584     esi = MEM32(esi); /* 0x39002CA5: mov esi, dword ptr [esi] */
   7585     goto L_39002CAC; /* 0x39002CA7: jmp 0x39002cac */
   7586 L_39002CA9:
   7587     esi = MEM32(esi + 0x8); /* 0x39002CA9: mov esi, dword ptr [esi + 8] */
   7588 L_39002CAC:
   7589     /* cmp esi, edx */ /* 0x39002CAC: cmp esi, edx */
   7590     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx);
   7591     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7592     _flag_k = FK_CMP;
   7593     RECOMP_BACKEDGE();
   7594     if (CMP_NE(_flag_a, _flag_b)) goto L_39002C96; /* 0x39002CAE: jne 0x39002c96 */
   7595 L_39002CB0:
   7596     SET_LO8(edx, MEM8(ebx + 0xC)); /* 0x39002CB0: mov dl, byte ptr [ebx + 0xc] */
   7597     /* test LO8(edx), LO8(edx) */ /* 0x39002CB3: test dl, dl */
   7598     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
   7599     _cf = 0;
   7600     _flag_k = FK_NARROW(FK_TEST, 24);
   7601     if (TEST_Z(_flag_a, _flag_b)) goto L_39002CCA; /* 0x39002CB5: je 0x39002cca */
   7602 L_39002CB7:
   7603     ecx = ebp + (-0x2C); /* 0x39002CB7: lea ecx, [ebp - 0x2c] */
   7604     edx = ebp + (-0x1C); /* 0x39002CBA: lea edx, [ebp - 0x1c] */
   7605     PUSH32(esp, ecx); /* 0x39002CBD: push ecx */
   7606     PUSH32(esp, edi); /* 0x39002CBE: push edi */
   7607     PUSH32(esp, esi); /* 0x39002CBF: push esi */
   7608     PUSH32(esp, edx); /* 0x39002CC0: push edx */
   7609     ecx = ebx; /* 0x39002CC1: mov ecx, ebx */
   7610     RECOMP_ICALL(0x39005450u); /* 0x39002CC3: call 0x39005450 */ /* not lifted */
   7611     RECOMP_FLAGS_IN();
   7612     goto L_39002D30; /* 0x39002CC8: jmp 0x39002d30 */
   7613 L_39002CCA:
   7614     /* test LO8(eax), LO8(eax) */ /* 0x39002CCA: test al, al */
   7615     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   7616     _cf = 0;
   7617     _flag_k = FK_NARROW(FK_TEST, 24);
   7618     MEM32(ebp + (-0x10)) = edi; /* 0x39002CCC: mov dword ptr [ebp - 0x10], edi */
   7619     if (TEST_Z(_flag_a, _flag_b)) goto L_39002CF0; /* 0x39002CCF: je 0x39002cf0 */
   7620 L_39002CD1:
   7621     /* cmp edi, MEM32(ecx) */ /* 0x39002CD1: cmp edi, dword ptr [ecx] */
   7622     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ecx));
   7623     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7624     _flag_k = FK_CMP;
   7625     if (CMP_NE(_flag_a, _flag_b)) goto L_39002CE8; /* 0x39002CD3: jne 0x39002ce8 */
   7626 L_39002CD5:
   7627     eax = ebp + (-0x2C); /* 0x39002CD5: lea eax, [ebp - 0x2c] */
   7628     ecx = ebp + (-0x20); /* 0x39002CD8: lea ecx, [ebp - 0x20] */
   7629     PUSH32(esp, eax); /* 0x39002CDB: push eax */
   7630     PUSH32(esp, edi); /* 0x39002CDC: push edi */
   7631     PUSH32(esp, esi); /* 0x39002CDD: push esi */
   7632     PUSH32(esp, ecx); /* 0x39002CDE: push ecx */
   7633     ecx = ebx; /* 0x39002CDF: mov ecx, ebx */
   7634     RECOMP_ICALL(0x39005450u); /* 0x39002CE1: call 0x39005450 */ /* not lifted */
   7635     RECOMP_FLAGS_IN();
   7636     goto L_39002D30; /* 0x39002CE6: jmp 0x39002d30 */
   7637 L_39002CE8:
   7638     ecx = ebp + (-0x10); /* 0x39002CE8: lea ecx, [ebp - 0x10] */
   7639     RECOMP_ICALL(0x39006930u); /* 0x39002CEB: call 0x39006930 */ /* not lifted */
   7640     RECOMP_FLAGS_IN();
   7641 L_39002CF0:
   7642     edx = MEM32(ebp + (-0x10)); /* 0x39002CF0: mov edx, dword ptr [ebp - 0x10] */
   7643     ecx = MEM32(ebp + (-0x2C)); /* 0x39002CF3: mov ecx, dword ptr [ebp - 0x2c] */
   7644     eax = MEM32(edx + 0xC); /* 0x39002CF6: mov eax, dword ptr [edx + 0xc] */
   7645     /* cmp eax, ecx */ /* 0x39002CF9: cmp eax, ecx */
   7646     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   7647     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7648     _flag_k = FK_CMP;
   7649     if (CMP_AE(_flag_a, _flag_b)) goto L_39002D1C; /* 0x39002CFB: jae 0x39002d1c */
   7650 L_39002CFD:
   7651     ecx = ebp + 0x17; /* 0x39002CFD: lea ecx, [ebp + 0x17] */
   7652     edx = ebp + (-0x2C); /* 0x39002D00: lea edx, [ebp - 0x2c] */
   7653     PUSH32(esp, ecx); /* 0x39002D03: push ecx */
   7654     PUSH32(esp, edx); /* 0x39002D04: push edx */
   7655     PUSH32(esp, edi); /* 0x39002D05: push edi */
   7656     eax = ebp + (-0x24); /* 0x39002D06: lea eax, [ebp - 0x24] */
   7657     PUSH32(esp, esi); /* 0x39002D09: push esi */
   7658     PUSH32(esp, eax); /* 0x39002D0A: push eax */
   7659     ecx = ebx; /* 0x39002D0B: mov ecx, ebx */
   7660     MEM8(ebp + 0x17) = (uint8_t)(1); /* 0x39002D0D: mov byte ptr [ebp + 0x17], 1 */
   7661     RECOMP_ICALL(0x39005450u); /* 0x39002D11: call 0x39005450 */ /* not lifted */
   7662     RECOMP_FLAGS_IN();
   7663     PUSH32(esp, eax); /* 0x39002D16: push eax */
   7664     ecx = ebp + (-0x34); /* 0x39002D17: lea ecx, [ebp - 0x34] */
   7665     goto L_39002D2B; /* 0x39002D1A: jmp 0x39002d2b */
   7666 L_39002D1C:
   7667     ecx = ebp + 0xB; /* 0x39002D1C: lea ecx, [ebp + 0xb] */
   7668     edx = ebp + (-0x10); /* 0x39002D1F: lea edx, [ebp - 0x10] */
   7669     PUSH32(esp, ecx); /* 0x39002D22: push ecx */
   7670     MEM8(ebp + 0xB) = (uint8_t)(0); /* 0x39002D23: mov byte ptr [ebp + 0xb], 0 */
   7671     PUSH32(esp, edx); /* 0x39002D27: push edx */
   7672     ecx = ebp + (-0x3C); /* 0x39002D28: lea ecx, [ebp - 0x3c] */
   7673 L_39002D2B:
   7674     RECOMP_ICALL(0x390095A0u); /* 0x39002D2B: call 0x390095a0 */ /* not lifted */
   7675     RECOMP_FLAGS_IN();
   7676 L_39002D30:
   7677     SET_LO8(eax, MEM8(ebp + 0x18)); /* 0x39002D30: mov al, byte ptr [ebp + 0x18] */
   7678     /* test LO8(eax), LO8(eax) */ /* 0x39002D33: test al, al */
   7679     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   7680     _cf = 0;
   7681     _flag_k = FK_NARROW(FK_TEST, 24);
   7682     if (TEST_Z(_flag_a, _flag_b)) goto L_39002D48; /* 0x39002D35: je 0x39002d48 */
   7683 L_39002D37:
   7684     eax = MEM32(ebp + (-0x14)); /* 0x39002D37: mov eax, dword ptr [ebp - 0x14] */
   7685     edx = MEM32(ebp + 0x10); /* 0x39002D3A: mov edx, dword ptr [ebp + 0x10] */
   7686     ecx = MEM32(eax + 0x1C); /* 0x39002D3D: mov ecx, dword ptr [eax + 0x1c] */
   7687     PUSH32(esp, ecx); /* 0x39002D40: push ecx */
   7688     PUSH32(esp, edx); /* 0x39002D41: push edx */
   7689     RECOMP_ICALL(MEM32(ebp + 0xC)); /* 0x39002D42: call dword ptr [ebp + 0xc] */
   7690     RECOMP_FLAGS_IN();
   7691     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   7692     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7693     esp = esp + 8; /* 0x39002D45: add esp, 8 */
   7694     _flag_k = FK_ADD;
   7695 L_39002D48:
   7696     ecx = MEM32(ebp + (-0xC)); /* 0x39002D48: mov ecx, dword ptr [ebp - 0xc] */
   7697     edi = POP32_VAL(esp); /* 0x39002D4B: pop edi */
   7698     esi = POP32_VAL(esp); /* 0x39002D4C: pop esi */
   7699     ebx = POP32_VAL(esp); /* 0x39002D4D: pop ebx */
   7700     MEM32(FS_BASE + (0)) = ecx; /* 0x39002D4E: mov dword ptr fs:[0], ecx */
   7701     esp = ebp; /* 0x39002D55: mov esp, ebp */
   7702     ebp = POP32_VAL(esp); /* 0x39002D57: pop ebp */
   7703     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x39002D58: ret 0x14 */
   7704     RECOMP_REGS_OUT();
   7705 }
   7706 
   7707 void sub_39002D60(void) {
   7708     int _fpu_cmp = 0;
   7709     uint32_t _cf = 0;
   7710     int _df = 1;
   7711     uint32_t _flag_k = FK_NONE;
   7712     uint32_t _flag_a = 0, _flag_b = 0;
   7713     uint32_t _itail_tgt = 0;
   7714     RECOMP_REGS_LOCALS
   7715     RECOMP_ENTER(0x39002D60u);
   7716 
   7717 L_39002D60:
   7718     PUSH32(esp, ebp); /* 0x39002D60: push ebp */
   7719     ebp = esp; /* 0x39002D61: mov ebp, esp */
   7720     PUSH32(esp, 0xFFFFFFFFu); /* 0x39002D63: push -1 */
   7721     PUSH32(esp, 0x3900A6A4u); /* 0x39002D65: push 0x3900a6a4 */
   7722     eax = MEM32(FS_BASE + (0)); /* 0x39002D6A: mov eax, dword ptr fs:[0] */
   7723     PUSH32(esp, eax); /* 0x39002D70: push eax */
   7724     MEM32(FS_BASE + (0)) = esp; /* 0x39002D71: mov dword ptr fs:[0], esp */
   7725     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x40u);
   7726     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7727     esp = esp - 0x40u; /* 0x39002D78: sub esp, 0x40 */
   7728     _flag_k = FK_CMP;
   7729     eax = MEM32(ebp + 0x14); /* 0x39002D7B: mov eax, dword ptr [ebp + 0x14] */
   7730     PUSH32(esp, ebx); /* 0x39002D7E: push ebx */
   7731     PUSH32(esp, esi); /* 0x39002D7F: push esi */
   7732     PUSH32(esp, edi); /* 0x39002D80: push edi */
   7733     /* test eax, eax */ /* 0x39002D81: test eax, eax */
   7734     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   7735     _cf = 0;
   7736     _flag_k = FK_TEST;
   7737     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002D8A; /* 0x39002D83: jne 0x39002d8a */
   7738 L_39002D85:
   7739     ebx = MEM32(ecx + 0x34); /* 0x39002D85: mov ebx, dword ptr [ecx + 0x34] */
   7740     goto L_39002D97; /* 0x39002D88: jmp 0x39002d97 */
   7741 L_39002D8A:
   7742     /* cmp eax, 2 */ /* 0x39002D8A: cmp eax, 2 */
   7743     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   7744     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7745     _flag_k = FK_CMP;
   7746     if (CMP_NE(_flag_a, _flag_b)) goto L_39002D94; /* 0x39002D8D: jne 0x39002d94 */
   7747 L_39002D8F:
   7748     ebx = MEM32(ecx + 0x4C); /* 0x39002D8F: mov ebx, dword ptr [ecx + 0x4c] */
   7749     goto L_39002D97; /* 0x39002D92: jmp 0x39002d97 */
   7750 L_39002D94:
   7751     ebx = MEM32(ecx + 0x40); /* 0x39002D94: mov ebx, dword ptr [ecx + 0x40] */
   7752 L_39002D97:
   7753     SET_LO8(eax, MEM8(ebp + 0x1B)); /* 0x39002D97: mov al, byte ptr [ebp + 0x1b] */
   7754     PUSH32(esp, 0); /* 0x39002D9A: push 0 */
   7755     ecx = ebp + (-0x4C); /* 0x39002D9C: lea ecx, [ebp - 0x4c] */
   7756     MEM8(ebp + (-0x4C)) = (uint8_t)(LO8(eax)); /* 0x39002D9F: mov byte ptr [ebp - 0x4c], al */
   7757     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002DA2: call dword ptr [0x3900b040] */
   7758     RECOMP_FLAGS_IN();
   7759     esi = MEM32(ebp + 0x8); /* 0x39002DA8: mov esi, dword ptr [ebp + 8] */
   7760     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   7761     ecx = ecx | 0xFFFFFFFFu; /* 0x39002DAB: or ecx, 0xffffffff */
   7762     _cf = 0;
   7763     _flag_k = FK_TEST;
   7764     edi = esi; /* 0x39002DAE: mov edi, esi */
   7765     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7766     eax = 0; /* 0x39002DB0: xor eax, eax */
   7767     _cf = 0;
   7768     _flag_k = FK_TEST;
   7769     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39002DB2: repne scasb al, byte ptr es:[edi] */
   7770     ecx = ~ecx; /* 0x39002DB4: not ecx */
   7771     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   7772     ecx = ecx - 1; /* 0x39002DB6: dec ecx */
   7773     _flag_k = FK_DEC;
   7774     PUSH32(esp, 1); /* 0x39002DB7: push 1 */
   7775     edi = ecx; /* 0x39002DB9: mov edi, ecx */
   7776     ecx = ebp + (-0x4C); /* 0x39002DBB: lea ecx, [ebp - 0x4c] */
   7777     PUSH32(esp, edi); /* 0x39002DBE: push edi */
   7778     MEM32(ebp + (-0x14)) = edi; /* 0x39002DBF: mov dword ptr [ebp - 0x14], edi */
   7779     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39002DC2: call dword ptr [0x3900b034] */
   7780     RECOMP_FLAGS_IN();
   7781     /* test LO8(eax), LO8(eax) */ /* 0x39002DC8: test al, al */
   7782     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   7783     _cf = 0;
   7784     _flag_k = FK_NARROW(FK_TEST, 24);
   7785     if (TEST_Z(_flag_a, _flag_b)) goto L_39002DEB; /* 0x39002DCA: je 0x39002deb */
   7786 L_39002DCC:
   7787     ecx = edi; /* 0x39002DCC: mov ecx, edi */
   7788     edi = MEM32(ebp + (-0x48)); /* 0x39002DCE: mov edi, dword ptr [ebp - 0x48] */
   7789     edx = ecx; /* 0x39002DD1: mov edx, ecx */
   7790     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39002DD3: shr ecx, 2 */
   7791     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7792     ecx = ecx >> 2u; /* 0x39002DD3: shr ecx, 2 */
   7793     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39002DD6: 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; }
   7794     ecx = edx; /* 0x39002DD8: mov ecx, edx */
   7795     eax = edx; /* 0x39002DDA: mov eax, edx */
   7796     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   7797     ecx = ecx & 3; /* 0x39002DDC: and ecx, 3 */
   7798     _cf = 0;
   7799     _flag_k = FK_TEST;
   7800     PUSH32(esp, eax); /* 0x39002DDF: push eax */
   7801     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39002DE0: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   7802     ecx = ebp + (-0x4C); /* 0x39002DE2: lea ecx, [ebp - 0x4c] */
   7803     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39002DE5: call dword ptr [0x3900b038] */
   7804     RECOMP_FLAGS_IN();
   7805 L_39002DEB:
   7806     ecx = ebp + (-0x4C); /* 0x39002DEB: lea ecx, [ebp - 0x4c] */
   7807     edx = ebp + (-0x18); /* 0x39002DEE: lea edx, [ebp - 0x18] */
   7808     PUSH32(esp, ecx); /* 0x39002DF1: push ecx */
   7809     PUSH32(esp, edx); /* 0x39002DF2: push edx */
   7810     ecx = ebx; /* 0x39002DF3: mov ecx, ebx */
   7811     MEM32(ebp + (-0x4)) = 0; /* 0x39002DF5: mov dword ptr [ebp - 4], 0 */
   7812     RECOMP_ICALL(0x390049E0u); /* 0x39002DFC: call 0x390049e0 */ /* not lifted */
   7813     RECOMP_FLAGS_IN();
   7814     edi = MEM32(eax); /* 0x39002E01: mov edi, dword ptr [eax] */
   7815     PUSH32(esp, 1); /* 0x39002E03: push 1 */
   7816     ecx = ebp + (-0x4C); /* 0x39002E05: lea ecx, [ebp - 0x4c] */
   7817     MEM32(ebp + (-0x14)) = edi; /* 0x39002E08: mov dword ptr [ebp - 0x14], edi */
   7818     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39002E0B: mov dword ptr [ebp - 4], 0xffffffff */
   7819     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002E12: call dword ptr [0x3900b040] */
   7820     RECOMP_FLAGS_IN();
   7821     /* cmp edi, MEM32(ebx + 0x4) */ /* 0x39002E18: cmp edi, dword ptr [ebx + 4] */
   7822     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebx + 0x4));
   7823     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7824     _flag_k = FK_CMP;
   7825     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002F38; /* 0x39002E1B: je 0x39002f38 */
   7826 L_39002E21:
   7827     eax = MEM32(edi + 0x28); /* 0x39002E21: mov eax, dword ptr [edi + 0x28] */
   7828     /* test eax, eax */ /* 0x39002E24: test eax, eax */
   7829     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   7830     _cf = 0;
   7831     _flag_k = FK_TEST;
   7832     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002E66; /* 0x39002E26: jne 0x39002e66 */
   7833 L_39002E28:
   7834     PUSH32(esp, 0x14u); /* 0x39002E28: push 0x14 */
   7835     RECOMP_ICALL(0x3900A0ACu); /* 0x39002E2A: call 0x3900a0ac */ /* not lifted */
   7836     RECOMP_FLAGS_IN();
   7837     esi = eax; /* 0x39002E2F: mov esi, eax */
   7838     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7839     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7840     esp = esp + 4; /* 0x39002E31: add esp, 4 */
   7841     _flag_k = FK_ADD;
   7842     MEM32(ebp + 0x14) = esi; /* 0x39002E34: mov dword ptr [ebp + 0x14], esi */
   7843     /* test esi, esi */ /* 0x39002E37: test esi, esi */
   7844     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   7845     _cf = 0;
   7846     _flag_k = FK_TEST;
   7847     MEM32(ebp + (-0x4)) = 1; /* 0x39002E39: mov dword ptr [ebp - 4], 1 */
   7848     if (TEST_Z(_flag_a, _flag_b)) goto L_39002E5A; /* 0x39002E40: je 0x39002e5a */
   7849 L_39002E42:
   7850     SET_LO8(ecx, MEM8(ebp + 0x1B)); /* 0x39002E42: mov cl, byte ptr [ebp + 0x1b] */
   7851     SET_LO8(eax, MEM8(ebp + 0x1B)); /* 0x39002E45: mov al, byte ptr [ebp + 0x1b] */
   7852     MEM8(esi + 0x1) = (uint8_t)(LO8(ecx)); /* 0x39002E48: mov byte ptr [esi + 1], cl */
   7853     ecx = esi; /* 0x39002E4B: mov ecx, esi */
   7854     MEM8(esi) = (uint8_t)(LO8(eax)); /* 0x39002E4D: mov byte ptr [esi], al */
   7855     MEM8(esi + 0xC) = (uint8_t)(1); /* 0x39002E4F: mov byte ptr [esi + 0xc], 1 */
   7856     RECOMP_ICALL(0x390053F0u); /* 0x39002E53: call 0x390053f0 */ /* not lifted */
   7857     RECOMP_FLAGS_IN();
   7858     goto L_39002E5C; /* 0x39002E58: jmp 0x39002e5c */
   7859 L_39002E5A:
   7860     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7861     esi = 0; /* 0x39002E5A: xor esi, esi */
   7862     _cf = 0;
   7863     _flag_k = FK_TEST;
   7864 L_39002E5C:
   7865     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39002E5C: mov dword ptr [ebp - 4], 0xffffffff */
   7866     MEM32(edi + 0x28) = esi; /* 0x39002E63: mov dword ptr [edi + 0x28], esi */
   7867 L_39002E66:
   7868     edx = MEM32(ebp + 0xC); /* 0x39002E66: mov edx, dword ptr [ebp + 0xc] */
   7869     eax = MEM32(ebp + 0x10); /* 0x39002E69: mov eax, dword ptr [ebp + 0x10] */
   7870     ebx = MEM32(edi + 0x28); /* 0x39002E6C: mov ebx, dword ptr [edi + 0x28] */
   7871     MEM32(ebp + (-0x2C)) = edx; /* 0x39002E6F: mov dword ptr [ebp - 0x2c], edx */
   7872     MEM32(ebp + (-0x28)) = eax; /* 0x39002E72: mov dword ptr [ebp - 0x28], eax */
   7873     SET_LO8(eax, 1); /* 0x39002E75: mov al, 1 */
   7874     ecx = MEM32(ebx + 0x4); /* 0x39002E77: mov ecx, dword ptr [ebx + 4] */
   7875     edx = MEM32(ebx + 0x8); /* 0x39002E7A: mov edx, dword ptr [ebx + 8] */
   7876     edi = ecx; /* 0x39002E7D: mov edi, ecx */
   7877     esi = MEM32(ecx + 0x4); /* 0x39002E7F: mov esi, dword ptr [ecx + 4] */
   7878     /* cmp esi, edx */ /* 0x39002E82: cmp esi, edx */
   7879     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx);
   7880     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7881     _flag_k = FK_CMP;
   7882     if (CMP_EQ(_flag_a, _flag_b)) goto L_39002EA0; /* 0x39002E84: je 0x39002ea0 */
   7883 L_39002E86:
   7884     eax = MEM32(ebp + 0xC); /* 0x39002E86: mov eax, dword ptr [ebp + 0xc] */
   7885     edi = esi; /* 0x39002E89: mov edi, esi */
   7886     /* cmp eax, MEM32(esi + 0xC) */ /* 0x39002E8B: cmp eax, dword ptr [esi + 0xc] */
   7887     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(esi + 0xC));
   7888     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7889     _flag_k = FK_CMP;
   7890     SET_LO8(eax, (CMP_B(_flag_a, _flag_b)) ? 1 : 0); /* 0x39002E8E: setb al */
   7891     /* test LO8(eax), LO8(eax) */ /* 0x39002E91: test al, al */
   7892     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   7893     _cf = 0;
   7894     _flag_k = FK_NARROW(FK_TEST, 24);
   7895     if (TEST_Z(_flag_a, _flag_b)) goto L_39002E99; /* 0x39002E93: je 0x39002e99 */
   7896 L_39002E95:
   7897     esi = MEM32(esi); /* 0x39002E95: mov esi, dword ptr [esi] */
   7898     goto L_39002E9C; /* 0x39002E97: jmp 0x39002e9c */
   7899 L_39002E99:
   7900     esi = MEM32(esi + 0x8); /* 0x39002E99: mov esi, dword ptr [esi + 8] */
   7901 L_39002E9C:
   7902     /* cmp esi, edx */ /* 0x39002E9C: cmp esi, edx */
   7903     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx);
   7904     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7905     _flag_k = FK_CMP;
   7906     RECOMP_BACKEDGE();
   7907     if (CMP_NE(_flag_a, _flag_b)) goto L_39002E86; /* 0x39002E9E: jne 0x39002e86 */
   7908 L_39002EA0:
   7909     SET_LO8(edx, MEM8(ebx + 0xC)); /* 0x39002EA0: mov dl, byte ptr [ebx + 0xc] */
   7910     /* test LO8(edx), LO8(edx) */ /* 0x39002EA3: test dl, dl */
   7911     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
   7912     _cf = 0;
   7913     _flag_k = FK_NARROW(FK_TEST, 24);
   7914     if (TEST_Z(_flag_a, _flag_b)) goto L_39002EBA; /* 0x39002EA5: je 0x39002eba */
   7915 L_39002EA7:
   7916     ecx = ebp + (-0x2C); /* 0x39002EA7: lea ecx, [ebp - 0x2c] */
   7917     edx = ebp + (-0x1C); /* 0x39002EAA: lea edx, [ebp - 0x1c] */
   7918     PUSH32(esp, ecx); /* 0x39002EAD: push ecx */
   7919     PUSH32(esp, edi); /* 0x39002EAE: push edi */
   7920     PUSH32(esp, esi); /* 0x39002EAF: push esi */
   7921     PUSH32(esp, edx); /* 0x39002EB0: push edx */
   7922     ecx = ebx; /* 0x39002EB1: mov ecx, ebx */
   7923     RECOMP_ICALL(0x390066D0u); /* 0x39002EB3: call 0x390066d0 */ /* not lifted */
   7924     RECOMP_FLAGS_IN();
   7925     goto L_39002F20; /* 0x39002EB8: jmp 0x39002f20 */
   7926 L_39002EBA:
   7927     /* test LO8(eax), LO8(eax) */ /* 0x39002EBA: test al, al */
   7928     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   7929     _cf = 0;
   7930     _flag_k = FK_NARROW(FK_TEST, 24);
   7931     MEM32(ebp + (-0x10)) = edi; /* 0x39002EBC: mov dword ptr [ebp - 0x10], edi */
   7932     if (TEST_Z(_flag_a, _flag_b)) goto L_39002EE0; /* 0x39002EBF: je 0x39002ee0 */
   7933 L_39002EC1:
   7934     /* cmp edi, MEM32(ecx) */ /* 0x39002EC1: cmp edi, dword ptr [ecx] */
   7935     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ecx));
   7936     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7937     _flag_k = FK_CMP;
   7938     if (CMP_NE(_flag_a, _flag_b)) goto L_39002ED8; /* 0x39002EC3: jne 0x39002ed8 */
   7939 L_39002EC5:
   7940     eax = ebp + (-0x2C); /* 0x39002EC5: lea eax, [ebp - 0x2c] */
   7941     ecx = ebp + (-0x20); /* 0x39002EC8: lea ecx, [ebp - 0x20] */
   7942     PUSH32(esp, eax); /* 0x39002ECB: push eax */
   7943     PUSH32(esp, edi); /* 0x39002ECC: push edi */
   7944     PUSH32(esp, esi); /* 0x39002ECD: push esi */
   7945     PUSH32(esp, ecx); /* 0x39002ECE: push ecx */
   7946     ecx = ebx; /* 0x39002ECF: mov ecx, ebx */
   7947     RECOMP_ICALL(0x390066D0u); /* 0x39002ED1: call 0x390066d0 */ /* not lifted */
   7948     RECOMP_FLAGS_IN();
   7949     goto L_39002F20; /* 0x39002ED6: jmp 0x39002f20 */
   7950 L_39002ED8:
   7951     ecx = ebp + (-0x10); /* 0x39002ED8: lea ecx, [ebp - 0x10] */
   7952     RECOMP_ICALL(0x39006930u); /* 0x39002EDB: call 0x39006930 */ /* not lifted */
   7953     RECOMP_FLAGS_IN();
   7954 L_39002EE0:
   7955     edx = MEM32(ebp + (-0x10)); /* 0x39002EE0: mov edx, dword ptr [ebp - 0x10] */
   7956     ecx = MEM32(ebp + (-0x2C)); /* 0x39002EE3: mov ecx, dword ptr [ebp - 0x2c] */
   7957     eax = MEM32(edx + 0xC); /* 0x39002EE6: mov eax, dword ptr [edx + 0xc] */
   7958     /* cmp eax, ecx */ /* 0x39002EE9: cmp eax, ecx */
   7959     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   7960     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7961     _flag_k = FK_CMP;
   7962     if (CMP_AE(_flag_a, _flag_b)) goto L_39002F0C; /* 0x39002EEB: jae 0x39002f0c */
   7963 L_39002EED:
   7964     ecx = ebp + 0x17; /* 0x39002EED: lea ecx, [ebp + 0x17] */
   7965     edx = ebp + (-0x2C); /* 0x39002EF0: lea edx, [ebp - 0x2c] */
   7966     PUSH32(esp, ecx); /* 0x39002EF3: push ecx */
   7967     PUSH32(esp, edx); /* 0x39002EF4: push edx */
   7968     PUSH32(esp, edi); /* 0x39002EF5: push edi */
   7969     eax = ebp + (-0x24); /* 0x39002EF6: lea eax, [ebp - 0x24] */
   7970     PUSH32(esp, esi); /* 0x39002EF9: push esi */
   7971     PUSH32(esp, eax); /* 0x39002EFA: push eax */
   7972     ecx = ebx; /* 0x39002EFB: mov ecx, ebx */
   7973     MEM8(ebp + 0x17) = (uint8_t)(1); /* 0x39002EFD: mov byte ptr [ebp + 0x17], 1 */
   7974     RECOMP_ICALL(0x390066D0u); /* 0x39002F01: call 0x390066d0 */ /* not lifted */
   7975     RECOMP_FLAGS_IN();
   7976     PUSH32(esp, eax); /* 0x39002F06: push eax */
   7977     ecx = ebp + (-0x34); /* 0x39002F07: lea ecx, [ebp - 0x34] */
   7978     goto L_39002F1B; /* 0x39002F0A: jmp 0x39002f1b */
   7979 L_39002F0C:
   7980     ecx = ebp + 0xB; /* 0x39002F0C: lea ecx, [ebp + 0xb] */
   7981     edx = ebp + (-0x10); /* 0x39002F0F: lea edx, [ebp - 0x10] */
   7982     PUSH32(esp, ecx); /* 0x39002F12: push ecx */
   7983     MEM8(ebp + 0xB) = (uint8_t)(0); /* 0x39002F13: mov byte ptr [ebp + 0xb], 0 */
   7984     PUSH32(esp, edx); /* 0x39002F17: push edx */
   7985     ecx = ebp + (-0x3C); /* 0x39002F18: lea ecx, [ebp - 0x3c] */
   7986 L_39002F1B:
   7987     RECOMP_ICALL(0x390095A0u); /* 0x39002F1B: call 0x390095a0 */ /* not lifted */
   7988     RECOMP_FLAGS_IN();
   7989 L_39002F20:
   7990     SET_LO8(eax, MEM8(ebp + 0x18)); /* 0x39002F20: mov al, byte ptr [ebp + 0x18] */
   7991     /* test LO8(eax), LO8(eax) */ /* 0x39002F23: test al, al */
   7992     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   7993     _cf = 0;
   7994     _flag_k = FK_NARROW(FK_TEST, 24);
   7995     if (TEST_Z(_flag_a, _flag_b)) goto L_39002F38; /* 0x39002F25: je 0x39002f38 */
   7996 L_39002F27:
   7997     eax = MEM32(ebp + (-0x14)); /* 0x39002F27: mov eax, dword ptr [ebp - 0x14] */
   7998     edx = MEM32(ebp + 0x10); /* 0x39002F2A: mov edx, dword ptr [ebp + 0x10] */
   7999     ecx = MEM32(eax + 0x1C); /* 0x39002F2D: mov ecx, dword ptr [eax + 0x1c] */
   8000     PUSH32(esp, ecx); /* 0x39002F30: push ecx */
   8001     PUSH32(esp, edx); /* 0x39002F31: push edx */
   8002     RECOMP_ICALL(MEM32(ebp + 0xC)); /* 0x39002F32: call dword ptr [ebp + 0xc] */
   8003     RECOMP_FLAGS_IN();
   8004     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   8005     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8006     esp = esp + 8; /* 0x39002F35: add esp, 8 */
   8007     _flag_k = FK_ADD;
   8008 L_39002F38:
   8009     ecx = MEM32(ebp + (-0xC)); /* 0x39002F38: mov ecx, dword ptr [ebp - 0xc] */
   8010     edi = POP32_VAL(esp); /* 0x39002F3B: pop edi */
   8011     esi = POP32_VAL(esp); /* 0x39002F3C: pop esi */
   8012     ebx = POP32_VAL(esp); /* 0x39002F3D: pop ebx */
   8013     MEM32(FS_BASE + (0)) = ecx; /* 0x39002F3E: mov dword ptr fs:[0], ecx */
   8014     esp = ebp; /* 0x39002F45: mov esp, ebp */
   8015     ebp = POP32_VAL(esp); /* 0x39002F47: pop ebp */
   8016     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x39002F48: ret 0x14 */
   8017     RECOMP_REGS_OUT();
   8018 }
   8019 
   8020 void sub_39002F50(void) {
   8021     int _fpu_cmp = 0;
   8022     uint32_t _cf = 0;
   8023     int _df = 1;
   8024     uint32_t _flag_k = FK_NONE;
   8025     uint32_t _flag_a = 0, _flag_b = 0;
   8026     uint32_t _itail_tgt = 0;
   8027     RECOMP_REGS_LOCALS
   8028     RECOMP_ENTER(0x39002F50u);
   8029 
   8030 L_39002F50:
   8031     PUSH32(esp, ebp); /* 0x39002F50: push ebp */
   8032     ebp = esp; /* 0x39002F51: mov ebp, esp */
   8033     PUSH32(esp, 0xFFFFFFFFu); /* 0x39002F53: push -1 */
   8034     PUSH32(esp, 0x3900A6B9u); /* 0x39002F55: push 0x3900a6b9 */
   8035     eax = MEM32(FS_BASE + (0)); /* 0x39002F5A: mov eax, dword ptr fs:[0] */
   8036     PUSH32(esp, eax); /* 0x39002F60: push eax */
   8037     MEM32(FS_BASE + (0)) = esp; /* 0x39002F61: mov dword ptr fs:[0], esp */
   8038     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   8039     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8040     esp = esp - 0x10u; /* 0x39002F68: sub esp, 0x10 */
   8041     _flag_k = FK_CMP;
   8042     eax = MEM32(ebp + 0x14); /* 0x39002F6B: mov eax, dword ptr [ebp + 0x14] */
   8043     PUSH32(esp, ebx); /* 0x39002F6E: push ebx */
   8044     PUSH32(esp, esi); /* 0x39002F6F: push esi */
   8045     PUSH32(esp, edi); /* 0x39002F70: push edi */
   8046     /* test eax, eax */ /* 0x39002F71: test eax, eax */
   8047     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8048     _cf = 0;
   8049     _flag_k = FK_TEST;
   8050     if (TEST_NZ(_flag_a, _flag_b)) goto L_39002F7A; /* 0x39002F73: jne 0x39002f7a */
   8051 L_39002F75:
   8052     ebx = MEM32(ecx + 0x38); /* 0x39002F75: mov ebx, dword ptr [ecx + 0x38] */
   8053     goto L_39002F87; /* 0x39002F78: jmp 0x39002f87 */
   8054 L_39002F7A:
   8055     /* cmp eax, 2 */ /* 0x39002F7A: cmp eax, 2 */
   8056     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   8057     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8058     _flag_k = FK_CMP;
   8059     if (CMP_NE(_flag_a, _flag_b)) goto L_39002F84; /* 0x39002F7D: jne 0x39002f84 */
   8060 L_39002F7F:
   8061     ebx = MEM32(ecx + 0x50); /* 0x39002F7F: mov ebx, dword ptr [ecx + 0x50] */
   8062     goto L_39002F87; /* 0x39002F82: jmp 0x39002f87 */
   8063 L_39002F84:
   8064     ebx = MEM32(ecx + 0x44); /* 0x39002F84: mov ebx, dword ptr [ecx + 0x44] */
   8065 L_39002F87:
   8066     SET_LO8(eax, MEM8(ebp + 0x1B)); /* 0x39002F87: mov al, byte ptr [ebp + 0x1b] */
   8067     PUSH32(esp, 0); /* 0x39002F8A: push 0 */
   8068     ecx = ebp + (-0x1C); /* 0x39002F8C: lea ecx, [ebp - 0x1c] */
   8069     MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(eax)); /* 0x39002F8F: mov byte ptr [ebp - 0x1c], al */
   8070     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002F92: call dword ptr [0x3900b040] */
   8071     RECOMP_FLAGS_IN();
   8072     esi = MEM32(ebp + 0x8); /* 0x39002F98: mov esi, dword ptr [ebp + 8] */
   8073     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   8074     ecx = ecx | 0xFFFFFFFFu; /* 0x39002F9B: or ecx, 0xffffffff */
   8075     _cf = 0;
   8076     _flag_k = FK_TEST;
   8077     edi = esi; /* 0x39002F9E: mov edi, esi */
   8078     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   8079     eax = 0; /* 0x39002FA0: xor eax, eax */
   8080     _cf = 0;
   8081     _flag_k = FK_TEST;
   8082     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x39002FA2: repne scasb al, byte ptr es:[edi] */
   8083     ecx = ~ecx; /* 0x39002FA4: not ecx */
   8084     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   8085     ecx = ecx - 1; /* 0x39002FA6: dec ecx */
   8086     _flag_k = FK_DEC;
   8087     PUSH32(esp, 1); /* 0x39002FA7: push 1 */
   8088     edi = ecx; /* 0x39002FA9: mov edi, ecx */
   8089     ecx = ebp + (-0x1C); /* 0x39002FAB: lea ecx, [ebp - 0x1c] */
   8090     PUSH32(esp, edi); /* 0x39002FAE: push edi */
   8091     MEM32(ebp + 0x14) = edi; /* 0x39002FAF: mov dword ptr [ebp + 0x14], edi */
   8092     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39002FB2: call dword ptr [0x3900b034] */
   8093     RECOMP_FLAGS_IN();
   8094     /* test LO8(eax), LO8(eax) */ /* 0x39002FB8: test al, al */
   8095     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   8096     _cf = 0;
   8097     _flag_k = FK_NARROW(FK_TEST, 24);
   8098     if (TEST_Z(_flag_a, _flag_b)) goto L_39002FDB; /* 0x39002FBA: je 0x39002fdb */
   8099 L_39002FBC:
   8100     ecx = edi; /* 0x39002FBC: mov ecx, edi */
   8101     edi = MEM32(ebp + (-0x18)); /* 0x39002FBE: mov edi, dword ptr [ebp - 0x18] */
   8102     edx = ecx; /* 0x39002FC1: mov edx, ecx */
   8103     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39002FC3: shr ecx, 2 */
   8104     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8105     ecx = ecx >> 2u; /* 0x39002FC3: shr ecx, 2 */
   8106     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39002FC6: 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; }
   8107     ecx = edx; /* 0x39002FC8: mov ecx, edx */
   8108     eax = edx; /* 0x39002FCA: mov eax, edx */
   8109     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
   8110     ecx = ecx & 3; /* 0x39002FCC: and ecx, 3 */
   8111     _cf = 0;
   8112     _flag_k = FK_TEST;
   8113     PUSH32(esp, eax); /* 0x39002FCF: push eax */
   8114     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39002FD0: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
   8115     ecx = ebp + (-0x1C); /* 0x39002FD2: lea ecx, [ebp - 0x1c] */
   8116     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39002FD5: call dword ptr [0x3900b038] */
   8117     RECOMP_FLAGS_IN();
   8118 L_39002FDB:
   8119     ecx = ebp + (-0x1C); /* 0x39002FDB: lea ecx, [ebp - 0x1c] */
   8120     edx = ebp + 0x8; /* 0x39002FDE: lea edx, [ebp + 8] */
   8121     PUSH32(esp, ecx); /* 0x39002FE1: push ecx */
   8122     PUSH32(esp, edx); /* 0x39002FE2: push edx */
   8123     ecx = ebx; /* 0x39002FE3: mov ecx, ebx */
   8124     MEM32(ebp + (-0x4)) = 0; /* 0x39002FE5: mov dword ptr [ebp - 4], 0 */
   8125     RECOMP_ICALL(0x390049E0u); /* 0x39002FEC: call 0x390049e0 */ /* not lifted */
   8126     RECOMP_FLAGS_IN();
   8127     esi = MEM32(eax); /* 0x39002FF1: mov esi, dword ptr [eax] */
   8128     PUSH32(esp, 1); /* 0x39002FF3: push 1 */
   8129     ecx = ebp + (-0x1C); /* 0x39002FF5: lea ecx, [ebp - 0x1c] */
   8130     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x39002FF8: mov dword ptr [ebp - 4], 0xffffffff */
   8131     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39002FFF: call dword ptr [0x3900b040] */
   8132     RECOMP_FLAGS_IN();
   8133     /* cmp esi, MEM32(ebx + 0x4) */ /* 0x39003005: cmp esi, dword ptr [ebx + 4] */
   8134     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(ebx + 0x4));
   8135     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8136     _flag_k = FK_CMP;
   8137     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003031; /* 0x39003008: je 0x39003031 */
   8138 L_3900300A:
   8139     eax = MEM32(ebp + 0xC); /* 0x3900300A: mov eax, dword ptr [ebp + 0xc] */
   8140     SET_LO8(edx, MEM8(ebp + 0x18)); /* 0x3900300D: mov dl, byte ptr [ebp + 0x18] */
   8141     ecx = MEM32(ebp + 0x10); /* 0x39003010: mov ecx, dword ptr [ebp + 0x10] */
   8142     MEM32(esi + 0x30) = eax; /* 0x39003013: mov dword ptr [esi + 0x30], eax */
   8143     /* test LO8(edx), LO8(edx) */ /* 0x39003016: test dl, dl */
   8144     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
   8145     _cf = 0;
   8146     _flag_k = FK_NARROW(FK_TEST, 24);
   8147     MEM32(esi + 0x34) = ecx; /* 0x39003018: mov dword ptr [esi + 0x34], ecx */
   8148     if (TEST_Z(_flag_a, _flag_b)) goto L_39003031; /* 0x3900301B: je 0x39003031 */
   8149 L_3900301D:
   8150     esi = MEM32(esi + 0x20); /* 0x3900301D: mov esi, dword ptr [esi + 0x20] */
   8151     /* test esi, esi */ /* 0x39003020: test esi, esi */
   8152     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   8153     _cf = 0;
   8154     _flag_k = FK_TEST;
   8155     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900302A; /* 0x39003022: jne 0x3900302a */
   8156 L_39003024:
   8157     esi = MEM32(0x3900B02C); /* 0x39003024: mov esi, dword ptr [0x3900b02c] */
   8158 L_3900302A:
   8159     PUSH32(esp, esi); /* 0x3900302A: push esi */
   8160     PUSH32(esp, ecx); /* 0x3900302B: push ecx */
   8161     RECOMP_ICALL(eax); /* 0x3900302C: call eax */
   8162     RECOMP_FLAGS_IN();
   8163     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   8164     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8165     esp = esp + 8; /* 0x3900302E: add esp, 8 */
   8166     _flag_k = FK_ADD;
   8167 L_39003031:
   8168     ecx = MEM32(ebp + (-0xC)); /* 0x39003031: mov ecx, dword ptr [ebp - 0xc] */
   8169     edi = POP32_VAL(esp); /* 0x39003034: pop edi */
   8170     esi = POP32_VAL(esp); /* 0x39003035: pop esi */
   8171     ebx = POP32_VAL(esp); /* 0x39003036: pop ebx */
   8172     MEM32(FS_BASE + (0)) = ecx; /* 0x39003037: mov dword ptr fs:[0], ecx */
   8173     esp = ebp; /* 0x3900303E: mov esp, ebp */
   8174     ebp = POP32_VAL(esp); /* 0x39003040: pop ebp */
   8175     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x39003041: ret 0x14 */
   8176     RECOMP_REGS_OUT();
   8177 }
   8178 
   8179 void sub_39003050(void) {
   8180     int _fpu_cmp = 0;
   8181     uint32_t _cf = 0;
   8182     int _df = 1;
   8183     uint32_t _flag_k = FK_NONE;
   8184     uint32_t _flag_a = 0, _flag_b = 0;
   8185     uint32_t _itail_tgt = 0;
   8186     RECOMP_REGS_LOCALS
   8187     RECOMP_ENTER(0x39003050u);
   8188 
   8189 L_39003050:
   8190     PUSH32(esp, ebp); /* 0x39003050: push ebp */
   8191     ebp = esp; /* 0x39003051: mov ebp, esp */
   8192     PUSH32(esp, 0xFFFFFFFFu); /* 0x39003053: push -1 */
   8193     PUSH32(esp, 0x3900A6D9u); /* 0x39003055: push 0x3900a6d9 */
   8194     eax = MEM32(FS_BASE + (0)); /* 0x3900305A: mov eax, dword ptr fs:[0] */
   8195     PUSH32(esp, eax); /* 0x39003060: push eax */
   8196     MEM32(FS_BASE + (0)) = esp; /* 0x39003061: mov dword ptr fs:[0], esp */
   8197     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   8198     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8199     esp = esp - 0x10u; /* 0x39003068: sub esp, 0x10 */
   8200     _flag_k = FK_CMP;
   8201     eax = MEM32(ebp + 0x14); /* 0x3900306B: mov eax, dword ptr [ebp + 0x14] */
   8202     PUSH32(esp, ebx); /* 0x3900306E: push ebx */
   8203     PUSH32(esp, esi); /* 0x3900306F: push esi */
   8204     PUSH32(esp, edi); /* 0x39003070: push edi */
   8205     /* test eax, eax */ /* 0x39003071: test eax, eax */
   8206     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8207     _cf = 0;
   8208     _flag_k = FK_TEST;
   8209     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900307A; /* 0x39003073: jne 0x3900307a */
   8210 L_39003075:
   8211     esi = MEM32(ecx + 0x30); /* 0x39003075: mov esi, dword ptr [ecx + 0x30] */
   8212     goto L_39003087; /* 0x39003078: jmp 0x39003087 */
   8213 L_3900307A:
   8214     /* cmp eax, 2 */ /* 0x3900307A: cmp eax, 2 */
   8215     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   8216     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8217     _flag_k = FK_CMP;
   8218     if (CMP_NE(_flag_a, _flag_b)) goto L_39003084; /* 0x3900307D: jne 0x39003084 */
   8219 L_3900307F:
   8220     esi = MEM32(ecx + 0x48); /* 0x3900307F: mov esi, dword ptr [ecx + 0x48] */
   8221     goto L_39003087; /* 0x39003082: jmp 0x39003087 */
   8222 L_39003084:
   8223     esi = MEM32(ecx + 0x3C); /* 0x39003084: mov esi, dword ptr [ecx + 0x3c] */
   8224 L_39003087:
   8225     SET_LO8(eax, MEM8(ebp + 0x17)); /* 0x39003087: mov al, byte ptr [ebp + 0x17] */
   8226     PUSH32(esp, 0); /* 0x3900308A: push 0 */
   8227     ecx = ebp + (-0x1C); /* 0x3900308C: lea ecx, [ebp - 0x1c] */
   8228     MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(eax)); /* 0x3900308F: mov byte ptr [ebp - 0x1c], al */
   8229     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39003092: call dword ptr [0x3900b040] */
   8230     RECOMP_FLAGS_IN();
   8231     edx = MEM32(ebp + 0x8); /* 0x39003098: mov edx, dword ptr [ebp + 8] */
   8232     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   8233     ecx = ecx | 0xFFFFFFFFu; /* 0x3900309B: or ecx, 0xffffffff */
   8234     _cf = 0;
   8235     _flag_k = FK_TEST;
   8236     edi = edx; /* 0x3900309E: mov edi, edx */
   8237     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   8238     eax = 0; /* 0x390030A0: xor eax, eax */
   8239     _cf = 0;
   8240     _flag_k = FK_TEST;
   8241     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x390030A2: repne scasb al, byte ptr es:[edi] */
   8242     ecx = ~ecx; /* 0x390030A4: not ecx */
   8243     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   8244     ecx = ecx - 1; /* 0x390030A6: dec ecx */
   8245     _flag_k = FK_DEC;
   8246     PUSH32(esp, ecx); /* 0x390030A7: push ecx */
   8247     PUSH32(esp, edx); /* 0x390030A8: push edx */
   8248     ecx = ebp + (-0x1C); /* 0x390030A9: lea ecx, [ebp - 0x1c] */
   8249     RECOMP_ICALL(MEM32(0x3900B028)); /* 0x390030AC: call dword ptr [0x3900b028] */
   8250     RECOMP_FLAGS_IN();
   8251     ecx = ebp + (-0x1C); /* 0x390030B2: lea ecx, [ebp - 0x1c] */
   8252     edx = ebp + 0x14; /* 0x390030B5: lea edx, [ebp + 0x14] */
   8253     PUSH32(esp, ecx); /* 0x390030B8: push ecx */
   8254     PUSH32(esp, edx); /* 0x390030B9: push edx */
   8255     ecx = esi; /* 0x390030BA: mov ecx, esi */
   8256     MEM32(ebp + (-0x4)) = 0; /* 0x390030BC: mov dword ptr [ebp - 4], 0 */
   8257     RECOMP_ICALL(0x390049E0u); /* 0x390030C3: call 0x390049e0 */ /* not lifted */
   8258     RECOMP_FLAGS_IN();
   8259     edi = MEM32(eax); /* 0x390030C8: mov edi, dword ptr [eax] */
   8260     PUSH32(esp, 1); /* 0x390030CA: push 1 */
   8261     ecx = ebp + (-0x1C); /* 0x390030CC: lea ecx, [ebp - 0x1c] */
   8262     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x390030CF: mov dword ptr [ebp - 4], 0xffffffff */
   8263     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390030D6: call dword ptr [0x3900b040] */
   8264     RECOMP_FLAGS_IN();
   8265     /* cmp edi, MEM32(esi + 0x4) */ /* 0x390030DC: cmp edi, dword ptr [esi + 4] */
   8266     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x4));
   8267     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8268     _flag_k = FK_CMP;
   8269     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003157; /* 0x390030DF: je 0x39003157 */
   8270 L_390030E1:
   8271     eax = MEM32(edi + 0x28); /* 0x390030E1: mov eax, dword ptr [edi + 0x28] */
   8272     /* test eax, eax */ /* 0x390030E4: test eax, eax */
   8273     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8274     _cf = 0;
   8275     _flag_k = FK_TEST;
   8276     if (TEST_Z(_flag_a, _flag_b)) goto L_39003157; /* 0x390030E6: je 0x39003157 */
   8277 L_390030E8:
   8278     ecx = MEM32(eax + 0x4); /* 0x390030E8: mov ecx, dword ptr [eax + 4] */
   8279     eax = MEM32(ecx); /* 0x390030EB: mov eax, dword ptr [ecx] */
   8280     /* cmp eax, ecx */ /* 0x390030ED: cmp eax, ecx */
   8281     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   8282     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8283     _flag_k = FK_CMP;
   8284     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003157; /* 0x390030EF: je 0x39003157 */
   8285 L_390030F1:
   8286     esi = MEM32(ebp + 0x10); /* 0x390030F1: mov esi, dword ptr [ebp + 0x10] */
   8287     ebx = MEM32(ebp + 0xC); /* 0x390030F4: mov ebx, dword ptr [ebp + 0xc] */
   8288 L_390030F7:
   8289     /* cmp MEM32(eax + 0xC), ebx */ /* 0x390030F7: cmp dword ptr [eax + 0xc], ebx */
   8290     _flag_a = (uint32_t)(MEM32(eax + 0xC)); _flag_b = (uint32_t)(ebx);
   8291     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8292     _flag_k = FK_CMP;
   8293     if (CMP_NE(_flag_a, _flag_b)) goto L_39003101; /* 0x390030FA: jne 0x39003101 */
   8294 L_390030FC:
   8295     /* cmp MEM32(eax + 0x10), esi */ /* 0x390030FC: cmp dword ptr [eax + 0x10], esi */
   8296     _flag_a = (uint32_t)(MEM32(eax + 0x10)); _flag_b = (uint32_t)(esi);
   8297     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8298     _flag_k = FK_CMP;
   8299     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900314A; /* 0x390030FF: je 0x3900314a */
   8300 L_39003101:
   8301     ecx = MEM32(eax + 0x8); /* 0x39003101: mov ecx, dword ptr [eax + 8] */
   8302     SET_LO8(edx, MEM8(ecx + 0x15)); /* 0x39003104: mov dl, byte ptr [ecx + 0x15] */
   8303     /* test LO8(edx), LO8(edx) */ /* 0x39003107: test dl, dl */
   8304     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
   8305     _cf = 0;
   8306     _flag_k = FK_NARROW(FK_TEST, 24);
   8307     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003116; /* 0x39003109: jne 0x39003116 */
   8308 L_3900310B:
   8309     PUSH32(esp, ecx); /* 0x3900310B: push ecx */
   8310     RECOMP_ICALL(0x39006910u); /* 0x3900310C: call 0x39006910 */ /* not lifted */
   8311     RECOMP_FLAGS_IN();
   8312     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   8313     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8314     esp = esp + 4; /* 0x39003111: add esp, 4 */
   8315     _flag_k = FK_ADD;
   8316     goto L_3900312F; /* 0x39003114: jmp 0x3900312f */
   8317 L_39003116:
   8318     ecx = MEM32(eax + 0x4); /* 0x39003116: mov ecx, dword ptr [eax + 4] */
   8319     /* cmp eax, MEM32(ecx + 0x8) */ /* 0x39003119: cmp eax, dword ptr [ecx + 8] */
   8320     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8));
   8321     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8322     _flag_k = FK_CMP;
   8323     if (CMP_NE(_flag_a, _flag_b)) goto L_39003128; /* 0x3900311C: jne 0x39003128 */
   8324 L_3900311E:
   8325     eax = ecx; /* 0x3900311E: mov eax, ecx */
   8326     ecx = MEM32(ecx + 0x4); /* 0x39003120: mov ecx, dword ptr [ecx + 4] */
   8327     /* cmp eax, MEM32(ecx + 0x8) */ /* 0x39003123: cmp eax, dword ptr [ecx + 8] */
   8328     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8));
   8329     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8330     _flag_k = FK_CMP;
   8331     RECOMP_BACKEDGE();
   8332     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900311E; /* 0x39003126: je 0x3900311e */
   8333 L_39003128:
   8334     /* cmp MEM32(eax + 0x8), ecx */ /* 0x39003128: cmp dword ptr [eax + 8], ecx */
   8335     _flag_a = (uint32_t)(MEM32(eax + 0x8)); _flag_b = (uint32_t)(ecx);
   8336     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8337     _flag_k = FK_CMP;
   8338     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900312F; /* 0x3900312B: je 0x3900312f */
   8339 L_3900312D:
   8340     eax = ecx; /* 0x3900312D: mov eax, ecx */
   8341 L_3900312F:
   8342     ecx = MEM32(edi + 0x28); /* 0x3900312F: mov ecx, dword ptr [edi + 0x28] */
   8343     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x39003132: cmp eax, dword ptr [ecx + 4] */
   8344     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
   8345     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8346     _flag_k = FK_CMP;
   8347     RECOMP_BACKEDGE();
   8348     if (CMP_NE(_flag_a, _flag_b)) goto L_390030F7; /* 0x39003135: jne 0x390030f7 */
   8349 L_39003137:
   8350     edi = POP32_VAL(esp); /* 0x39003137: pop edi */
   8351     esi = POP32_VAL(esp); /* 0x39003138: pop esi */
   8352     ebx = POP32_VAL(esp); /* 0x39003139: pop ebx */
   8353     ecx = MEM32(ebp + (-0xC)); /* 0x3900313A: mov ecx, dword ptr [ebp - 0xc] */
   8354     MEM32(FS_BASE + (0)) = ecx; /* 0x3900313D: mov dword ptr fs:[0], ecx */
   8355     esp = ebp; /* 0x39003144: mov esp, ebp */
   8356     ebp = POP32_VAL(esp); /* 0x39003146: pop ebp */
   8357     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39003147: ret 0x10 */
   8358 L_3900314A:
   8359     ecx = MEM32(edi + 0x28); /* 0x3900314A: mov ecx, dword ptr [edi + 0x28] */
   8360     edx = ebp + 0x8; /* 0x3900314D: lea edx, [ebp + 8] */
   8361     PUSH32(esp, eax); /* 0x39003150: push eax */
   8362     PUSH32(esp, edx); /* 0x39003151: push edx */
   8363     RECOMP_ICALL(0x39004FA0u); /* 0x39003152: call 0x39004fa0 */ /* not lifted */
   8364     RECOMP_FLAGS_IN();
   8365 L_39003157:
   8366     ecx = MEM32(ebp + (-0xC)); /* 0x39003157: mov ecx, dword ptr [ebp - 0xc] */
   8367     edi = POP32_VAL(esp); /* 0x3900315A: pop edi */
   8368     esi = POP32_VAL(esp); /* 0x3900315B: pop esi */
   8369     ebx = POP32_VAL(esp); /* 0x3900315C: pop ebx */
   8370     MEM32(FS_BASE + (0)) = ecx; /* 0x3900315D: mov dword ptr fs:[0], ecx */
   8371     esp = ebp; /* 0x39003164: mov esp, ebp */
   8372     ebp = POP32_VAL(esp); /* 0x39003166: pop ebp */
   8373     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39003167: ret 0x10 */
   8374     RECOMP_REGS_OUT();
   8375 }
   8376 
   8377 void sub_39003170(void) {
   8378     int _fpu_cmp = 0;
   8379     uint32_t _cf = 0;
   8380     int _df = 1;
   8381     uint32_t _flag_k = FK_NONE;
   8382     uint32_t _flag_a = 0, _flag_b = 0;
   8383     uint32_t _itail_tgt = 0;
   8384     RECOMP_REGS_LOCALS
   8385     RECOMP_ENTER(0x39003170u);
   8386 
   8387 L_39003170:
   8388     PUSH32(esp, ebp); /* 0x39003170: push ebp */
   8389     ebp = esp; /* 0x39003171: mov ebp, esp */
   8390     PUSH32(esp, 0xFFFFFFFFu); /* 0x39003173: push -1 */
   8391     PUSH32(esp, 0x3900A6F9u); /* 0x39003175: push 0x3900a6f9 */
   8392     eax = MEM32(FS_BASE + (0)); /* 0x3900317A: mov eax, dword ptr fs:[0] */
   8393     PUSH32(esp, eax); /* 0x39003180: push eax */
   8394     MEM32(FS_BASE + (0)) = esp; /* 0x39003181: mov dword ptr fs:[0], esp */
   8395     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   8396     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8397     esp = esp - 0x10u; /* 0x39003188: sub esp, 0x10 */
   8398     _flag_k = FK_CMP;
   8399     eax = MEM32(ebp + 0x14); /* 0x3900318B: mov eax, dword ptr [ebp + 0x14] */
   8400     PUSH32(esp, ebx); /* 0x3900318E: push ebx */
   8401     PUSH32(esp, esi); /* 0x3900318F: push esi */
   8402     PUSH32(esp, edi); /* 0x39003190: push edi */
   8403     /* test eax, eax */ /* 0x39003191: test eax, eax */
   8404     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8405     _cf = 0;
   8406     _flag_k = FK_TEST;
   8407     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900319A; /* 0x39003193: jne 0x3900319a */
   8408 L_39003195:
   8409     esi = MEM32(ecx + 0x34); /* 0x39003195: mov esi, dword ptr [ecx + 0x34] */
   8410     goto L_390031A7; /* 0x39003198: jmp 0x390031a7 */
   8411 L_3900319A:
   8412     /* cmp eax, 2 */ /* 0x3900319A: cmp eax, 2 */
   8413     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   8414     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8415     _flag_k = FK_CMP;
   8416     if (CMP_NE(_flag_a, _flag_b)) goto L_390031A4; /* 0x3900319D: jne 0x390031a4 */
   8417 L_3900319F:
   8418     esi = MEM32(ecx + 0x4C); /* 0x3900319F: mov esi, dword ptr [ecx + 0x4c] */
   8419     goto L_390031A7; /* 0x390031A2: jmp 0x390031a7 */
   8420 L_390031A4:
   8421     esi = MEM32(ecx + 0x40); /* 0x390031A4: mov esi, dword ptr [ecx + 0x40] */
   8422 L_390031A7:
   8423     SET_LO8(eax, MEM8(ebp + 0x17)); /* 0x390031A7: mov al, byte ptr [ebp + 0x17] */
   8424     PUSH32(esp, 0); /* 0x390031AA: push 0 */
   8425     ecx = ebp + (-0x1C); /* 0x390031AC: lea ecx, [ebp - 0x1c] */
   8426     MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(eax)); /* 0x390031AF: mov byte ptr [ebp - 0x1c], al */
   8427     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390031B2: call dword ptr [0x3900b040] */
   8428     RECOMP_FLAGS_IN();
   8429     edx = MEM32(ebp + 0x8); /* 0x390031B8: mov edx, dword ptr [ebp + 8] */
   8430     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
   8431     ecx = ecx | 0xFFFFFFFFu; /* 0x390031BB: or ecx, 0xffffffff */
   8432     _cf = 0;
   8433     _flag_k = FK_TEST;
   8434     edi = edx; /* 0x390031BE: mov edi, edx */
   8435     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   8436     eax = 0; /* 0x390031C0: xor eax, eax */
   8437     _cf = 0;
   8438     _flag_k = FK_TEST;
   8439     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x390031C2: repne scasb al, byte ptr es:[edi] */
   8440     ecx = ~ecx; /* 0x390031C4: not ecx */
   8441     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   8442     ecx = ecx - 1; /* 0x390031C6: dec ecx */
   8443     _flag_k = FK_DEC;
   8444     PUSH32(esp, ecx); /* 0x390031C7: push ecx */
   8445     PUSH32(esp, edx); /* 0x390031C8: push edx */
   8446     ecx = ebp + (-0x1C); /* 0x390031C9: lea ecx, [ebp - 0x1c] */
   8447     RECOMP_ICALL(MEM32(0x3900B028)); /* 0x390031CC: call dword ptr [0x3900b028] */
   8448     RECOMP_FLAGS_IN();
   8449     ecx = ebp + (-0x1C); /* 0x390031D2: lea ecx, [ebp - 0x1c] */
   8450     edx = ebp + 0x14; /* 0x390031D5: lea edx, [ebp + 0x14] */
   8451     PUSH32(esp, ecx); /* 0x390031D8: push ecx */
   8452     PUSH32(esp, edx); /* 0x390031D9: push edx */
   8453     ecx = esi; /* 0x390031DA: mov ecx, esi */
   8454     MEM32(ebp + (-0x4)) = 0; /* 0x390031DC: mov dword ptr [ebp - 4], 0 */
   8455     RECOMP_ICALL(0x390049E0u); /* 0x390031E3: call 0x390049e0 */ /* not lifted */
   8456     RECOMP_FLAGS_IN();
   8457     edi = MEM32(eax); /* 0x390031E8: mov edi, dword ptr [eax] */
   8458     PUSH32(esp, 1); /* 0x390031EA: push 1 */
   8459     ecx = ebp + (-0x1C); /* 0x390031EC: lea ecx, [ebp - 0x1c] */
   8460     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x390031EF: mov dword ptr [ebp - 4], 0xffffffff */
   8461     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390031F6: call dword ptr [0x3900b040] */
   8462     RECOMP_FLAGS_IN();
   8463     /* cmp edi, MEM32(esi + 0x4) */ /* 0x390031FC: cmp edi, dword ptr [esi + 4] */
   8464     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x4));
   8465     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8466     _flag_k = FK_CMP;
   8467     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003277; /* 0x390031FF: je 0x39003277 */
   8468 L_39003201:
   8469     eax = MEM32(edi + 0x28); /* 0x39003201: mov eax, dword ptr [edi + 0x28] */
   8470     /* test eax, eax */ /* 0x39003204: test eax, eax */
   8471     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8472     _cf = 0;
   8473     _flag_k = FK_TEST;
   8474     if (TEST_Z(_flag_a, _flag_b)) goto L_39003277; /* 0x39003206: je 0x39003277 */
   8475 L_39003208:
   8476     ecx = MEM32(eax + 0x4); /* 0x39003208: mov ecx, dword ptr [eax + 4] */
   8477     eax = MEM32(ecx); /* 0x3900320B: mov eax, dword ptr [ecx] */
   8478     /* cmp eax, ecx */ /* 0x3900320D: cmp eax, ecx */
   8479     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   8480     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8481     _flag_k = FK_CMP;
   8482     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003277; /* 0x3900320F: je 0x39003277 */
   8483 L_39003211:
   8484     esi = MEM32(ebp + 0x10); /* 0x39003211: mov esi, dword ptr [ebp + 0x10] */
   8485     ebx = MEM32(ebp + 0xC); /* 0x39003214: mov ebx, dword ptr [ebp + 0xc] */
   8486 L_39003217:
   8487     /* cmp MEM32(eax + 0xC), ebx */ /* 0x39003217: cmp dword ptr [eax + 0xc], ebx */
   8488     _flag_a = (uint32_t)(MEM32(eax + 0xC)); _flag_b = (uint32_t)(ebx);
   8489     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8490     _flag_k = FK_CMP;
   8491     if (CMP_NE(_flag_a, _flag_b)) goto L_39003221; /* 0x3900321A: jne 0x39003221 */
   8492 L_3900321C:
   8493     /* cmp MEM32(eax + 0x10), esi */ /* 0x3900321C: cmp dword ptr [eax + 0x10], esi */
   8494     _flag_a = (uint32_t)(MEM32(eax + 0x10)); _flag_b = (uint32_t)(esi);
   8495     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8496     _flag_k = FK_CMP;
   8497     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900326A; /* 0x3900321F: je 0x3900326a */
   8498 L_39003221:
   8499     ecx = MEM32(eax + 0x8); /* 0x39003221: mov ecx, dword ptr [eax + 8] */
   8500     SET_LO8(edx, MEM8(ecx + 0x15)); /* 0x39003224: mov dl, byte ptr [ecx + 0x15] */
   8501     /* test LO8(edx), LO8(edx) */ /* 0x39003227: test dl, dl */
   8502     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
   8503     _cf = 0;
   8504     _flag_k = FK_NARROW(FK_TEST, 24);
   8505     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003236; /* 0x39003229: jne 0x39003236 */
   8506 L_3900322B:
   8507     PUSH32(esp, ecx); /* 0x3900322B: push ecx */
   8508     RECOMP_ICALL(0x39006910u); /* 0x3900322C: call 0x39006910 */ /* not lifted */
   8509     RECOMP_FLAGS_IN();
   8510     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   8511     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8512     esp = esp + 4; /* 0x39003231: add esp, 4 */
   8513     _flag_k = FK_ADD;
   8514     goto L_3900324F; /* 0x39003234: jmp 0x3900324f */
   8515 L_39003236:
   8516     ecx = MEM32(eax + 0x4); /* 0x39003236: mov ecx, dword ptr [eax + 4] */
   8517     /* cmp eax, MEM32(ecx + 0x8) */ /* 0x39003239: cmp eax, dword ptr [ecx + 8] */
   8518     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8));
   8519     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8520     _flag_k = FK_CMP;
   8521     if (CMP_NE(_flag_a, _flag_b)) goto L_39003248; /* 0x3900323C: jne 0x39003248 */
   8522 L_3900323E:
   8523     eax = ecx; /* 0x3900323E: mov eax, ecx */
   8524     ecx = MEM32(ecx + 0x4); /* 0x39003240: mov ecx, dword ptr [ecx + 4] */
   8525     /* cmp eax, MEM32(ecx + 0x8) */ /* 0x39003243: cmp eax, dword ptr [ecx + 8] */
   8526     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8));
   8527     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8528     _flag_k = FK_CMP;
   8529     RECOMP_BACKEDGE();
   8530     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900323E; /* 0x39003246: je 0x3900323e */
   8531 L_39003248:
   8532     /* cmp MEM32(eax + 0x8), ecx */ /* 0x39003248: cmp dword ptr [eax + 8], ecx */
   8533     _flag_a = (uint32_t)(MEM32(eax + 0x8)); _flag_b = (uint32_t)(ecx);
   8534     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8535     _flag_k = FK_CMP;
   8536     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900324F; /* 0x3900324B: je 0x3900324f */
   8537 L_3900324D:
   8538     eax = ecx; /* 0x3900324D: mov eax, ecx */
   8539 L_3900324F:
   8540     ecx = MEM32(edi + 0x28); /* 0x3900324F: mov ecx, dword ptr [edi + 0x28] */
   8541     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x39003252: cmp eax, dword ptr [ecx + 4] */
   8542     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
   8543     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8544     _flag_k = FK_CMP;
   8545     RECOMP_BACKEDGE();
   8546     if (CMP_NE(_flag_a, _flag_b)) goto L_39003217; /* 0x39003255: jne 0x39003217 */
   8547 L_39003257:
   8548     edi = POP32_VAL(esp); /* 0x39003257: pop edi */
   8549     esi = POP32_VAL(esp); /* 0x39003258: pop esi */
   8550     ebx = POP32_VAL(esp); /* 0x39003259: pop ebx */
   8551     ecx = MEM32(ebp + (-0xC)); /* 0x3900325A: mov ecx, dword ptr [ebp - 0xc] */
   8552     MEM32(FS_BASE + (0)) = ecx; /* 0x3900325D: mov dword ptr fs:[0], ecx */
   8553     esp = ebp; /* 0x39003264: mov esp, ebp */
   8554     ebp = POP32_VAL(esp); /* 0x39003266: pop ebp */
   8555     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39003267: ret 0x10 */
   8556 L_3900326A:
   8557     ecx = MEM32(edi + 0x28); /* 0x3900326A: mov ecx, dword ptr [edi + 0x28] */
   8558     edx = ebp + 0x8; /* 0x3900326D: lea edx, [ebp + 8] */
   8559     PUSH32(esp, eax); /* 0x39003270: push eax */
   8560     PUSH32(esp, edx); /* 0x39003271: push edx */
   8561     RECOMP_ICALL(0x39004FA0u); /* 0x39003272: call 0x39004fa0 */ /* not lifted */
   8562     RECOMP_FLAGS_IN();
   8563 L_39003277:
   8564     ecx = MEM32(ebp + (-0xC)); /* 0x39003277: mov ecx, dword ptr [ebp - 0xc] */
   8565     edi = POP32_VAL(esp); /* 0x3900327A: pop edi */
   8566     esi = POP32_VAL(esp); /* 0x3900327B: pop esi */
   8567     ebx = POP32_VAL(esp); /* 0x3900327C: pop ebx */
   8568     MEM32(FS_BASE + (0)) = ecx; /* 0x3900327D: mov dword ptr fs:[0], ecx */
   8569     esp = ebp; /* 0x39003284: mov esp, ebp */
   8570     ebp = POP32_VAL(esp); /* 0x39003286: pop ebp */
   8571     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39003287: ret 0x10 */
   8572     RECOMP_REGS_OUT();
   8573 }
   8574 
   8575 void sub_39003290(void) {
   8576     int _fpu_cmp = 0;
   8577     uint32_t _cf = 0;
   8578     int _df = 1;
   8579     uint32_t _flag_k = FK_NONE;
   8580     uint32_t _flag_a = 0, _flag_b = 0;
   8581     uint32_t _itail_tgt = 0;
   8582     RECOMP_REGS_LOCALS
   8583     RECOMP_ENTER(0x39003290u);
   8584 
   8585 L_39003290:
   8586     PUSH32(esp, ebp); /* 0x39003290: push ebp */
   8587     ebp = esp; /* 0x39003291: mov ebp, esp */
   8588     eax = MEM32(ebp + 0x14); /* 0x39003293: mov eax, dword ptr [ebp + 0x14] */
   8589     PUSH32(esp, esi); /* 0x39003296: push esi */
   8590     /* test eax, eax */ /* 0x39003297: test eax, eax */
   8591     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8592     _cf = 0;
   8593     _flag_k = FK_TEST;
   8594     PUSH32(esp, edi); /* 0x39003299: push edi */
   8595     if (TEST_NZ(_flag_a, _flag_b)) goto L_390032A1; /* 0x3900329A: jne 0x390032a1 */
   8596 L_3900329C:
   8597     esi = MEM32(ecx + 0x30); /* 0x3900329C: mov esi, dword ptr [ecx + 0x30] */
   8598     goto L_390032AE; /* 0x3900329F: jmp 0x390032ae */
   8599 L_390032A1:
   8600     /* cmp eax, 2 */ /* 0x390032A1: cmp eax, 2 */
   8601     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   8602     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8603     _flag_k = FK_CMP;
   8604     if (CMP_NE(_flag_a, _flag_b)) goto L_390032AB; /* 0x390032A4: jne 0x390032ab */
   8605 L_390032A6:
   8606     esi = MEM32(ecx + 0x48); /* 0x390032A6: mov esi, dword ptr [ecx + 0x48] */
   8607     goto L_390032AE; /* 0x390032A9: jmp 0x390032ae */
   8608 L_390032AB:
   8609     esi = MEM32(ecx + 0x3C); /* 0x390032AB: mov esi, dword ptr [ecx + 0x3c] */
   8610 L_390032AE:
   8611     edi = MEM32(ebp + 0x8); /* 0x390032AE: mov edi, dword ptr [ebp + 8] */
   8612     ecx = esi; /* 0x390032B1: mov ecx, esi */
   8613     PUSH32(esp, edi); /* 0x390032B3: push edi */
   8614     RECOMP_ICALL(0x39007110u); /* 0x390032B4: call 0x39007110 */ /* not lifted */
   8615     RECOMP_FLAGS_IN();
   8616     ecx = MEM32(esi + 0x4); /* 0x390032B9: mov ecx, dword ptr [esi + 4] */
   8617     MEM32(ebp + 0x14) = eax; /* 0x390032BC: mov dword ptr [ebp + 0x14], eax */
   8618     /* cmp eax, ecx */ /* 0x390032BF: cmp eax, ecx */
   8619     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   8620     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8621     _flag_k = FK_CMP;
   8622     if (CMP_EQ(_flag_a, _flag_b)) goto L_390032DA; /* 0x390032C1: je 0x390032da */
   8623 L_390032C3:
   8624     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu);
   8625     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8626     eax = eax + 0xCu; /* 0x390032C3: add eax, 0xc */
   8627     _flag_k = FK_ADD;
   8628     PUSH32(esp, eax); /* 0x390032C6: push eax */
   8629     PUSH32(esp, edi); /* 0x390032C7: push edi */
   8630     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x390032C8: call dword ptr [0x3900b030] */
   8631     RECOMP_FLAGS_IN();
   8632     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   8633     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8634     esp = esp + 8; /* 0x390032CE: add esp, 8 */
   8635     _flag_k = FK_ADD;
   8636     /* test LO8(eax), LO8(eax) */ /* 0x390032D1: test al, al */
   8637     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   8638     _cf = 0;
   8639     _flag_k = FK_NARROW(FK_TEST, 24);
   8640     if (TEST_NZ(_flag_a, _flag_b)) goto L_390032DA; /* 0x390032D3: jne 0x390032da */
   8641 L_390032D5:
   8642     eax = ebp + 0x14; /* 0x390032D5: lea eax, [ebp + 0x14] */
   8643     goto L_390032E5; /* 0x390032D8: jmp 0x390032e5 */
   8644 L_390032DA:
   8645     eax = ebp + 0x8; /* 0x390032DA: lea eax, [ebp + 8] */
   8646     ecx = esi; /* 0x390032DD: mov ecx, esi */
   8647     PUSH32(esp, eax); /* 0x390032DF: push eax */
   8648     RECOMP_ICALL(0x39004AE0u); /* 0x390032E0: call 0x39004ae0 */ /* not lifted */
   8649     RECOMP_FLAGS_IN();
   8650 L_390032E5:
   8651     eax = MEM32(eax); /* 0x390032E5: mov eax, dword ptr [eax] */
   8652     ecx = MEM32(esi + 0x4); /* 0x390032E7: mov ecx, dword ptr [esi + 4] */
   8653     edi = POP32_VAL(esp); /* 0x390032EA: pop edi */
   8654     /* cmp eax, ecx */ /* 0x390032EB: cmp eax, ecx */
   8655     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   8656     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8657     _flag_k = FK_CMP;
   8658     esi = POP32_VAL(esp); /* 0x390032ED: pop esi */
   8659     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003306; /* 0x390032EE: je 0x39003306 */
   8660 L_390032F0:
   8661     edx = MEM32(ebp + 0xC); /* 0x390032F0: mov edx, dword ptr [ebp + 0xc] */
   8662     ecx = MEM32(eax + 0x20); /* 0x390032F3: mov ecx, dword ptr [eax + 0x20] */
   8663     MEM32(edx) = ecx; /* 0x390032F6: mov dword ptr [edx], ecx */
   8664     ecx = MEM32(ebp + 0x10); /* 0x390032F8: mov ecx, dword ptr [ebp + 0x10] */
   8665     eax = MEM32(eax + 0x24); /* 0x390032FB: mov eax, dword ptr [eax + 0x24] */
   8666     MEM32(ecx) = eax; /* 0x390032FE: mov dword ptr [ecx], eax */
   8667     SET_LO8(eax, 1); /* 0x39003300: mov al, 1 */
   8668     ebp = POP32_VAL(esp); /* 0x39003302: pop ebp */
   8669     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39003303: ret 0x10 */
   8670 L_39003306:
   8671     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
   8672     SET_LO8(eax, 0); /* 0x39003306: xor al, al */
   8673     _cf = 0;
   8674     _flag_k = FK_NARROW(FK_TEST, 24);
   8675     ebp = POP32_VAL(esp); /* 0x39003308: pop ebp */
   8676     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39003309: ret 0x10 */
   8677     RECOMP_REGS_OUT();
   8678 }
   8679 
   8680 void sub_39003310(void) {
   8681     int _fpu_cmp = 0;
   8682     uint32_t _cf = 0;
   8683     int _df = 1;
   8684     uint32_t _flag_k = FK_NONE;
   8685     uint32_t _flag_a = 0, _flag_b = 0;
   8686     uint32_t _itail_tgt = 0;
   8687     RECOMP_REGS_LOCALS
   8688     RECOMP_ENTER(0x39003310u);
   8689 
   8690 L_39003310:
   8691     PUSH32(esp, ebp); /* 0x39003310: push ebp */
   8692     ebp = esp; /* 0x39003311: mov ebp, esp */
   8693     eax = MEM32(ebp + 0x14); /* 0x39003313: mov eax, dword ptr [ebp + 0x14] */
   8694     PUSH32(esp, esi); /* 0x39003316: push esi */
   8695     /* test eax, eax */ /* 0x39003317: test eax, eax */
   8696     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8697     _cf = 0;
   8698     _flag_k = FK_TEST;
   8699     PUSH32(esp, edi); /* 0x39003319: push edi */
   8700     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003321; /* 0x3900331A: jne 0x39003321 */
   8701 L_3900331C:
   8702     esi = MEM32(ecx + 0x34); /* 0x3900331C: mov esi, dword ptr [ecx + 0x34] */
   8703     goto L_3900332E; /* 0x3900331F: jmp 0x3900332e */
   8704 L_39003321:
   8705     /* cmp eax, 2 */ /* 0x39003321: cmp eax, 2 */
   8706     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
   8707     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8708     _flag_k = FK_CMP;
   8709     if (CMP_NE(_flag_a, _flag_b)) goto L_3900332B; /* 0x39003324: jne 0x3900332b */
   8710 L_39003326:
   8711     esi = MEM32(ecx + 0x4C); /* 0x39003326: mov esi, dword ptr [ecx + 0x4c] */
   8712     goto L_3900332E; /* 0x39003329: jmp 0x3900332e */
   8713 L_3900332B:
   8714     esi = MEM32(ecx + 0x40); /* 0x3900332B: mov esi, dword ptr [ecx + 0x40] */
   8715 L_3900332E:
   8716     edi = MEM32(ebp + 0x8); /* 0x3900332E: mov edi, dword ptr [ebp + 8] */
   8717     ecx = esi; /* 0x39003331: mov ecx, esi */
   8718     PUSH32(esp, edi); /* 0x39003333: push edi */
   8719     RECOMP_ICALL(0x39007110u); /* 0x39003334: call 0x39007110 */ /* not lifted */
   8720     RECOMP_FLAGS_IN();
   8721     ecx = MEM32(esi + 0x4); /* 0x39003339: mov ecx, dword ptr [esi + 4] */
   8722     MEM32(ebp + 0x14) = eax; /* 0x3900333C: mov dword ptr [ebp + 0x14], eax */
   8723     /* cmp eax, ecx */ /* 0x3900333F: cmp eax, ecx */
   8724     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   8725     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8726     _flag_k = FK_CMP;
   8727     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900335A; /* 0x39003341: je 0x3900335a */
   8728 L_39003343:
   8729     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu);
   8730     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8731     eax = eax + 0xCu; /* 0x39003343: add eax, 0xc */
   8732     _flag_k = FK_ADD;
   8733     PUSH32(esp, eax); /* 0x39003346: push eax */
   8734     PUSH32(esp, edi); /* 0x39003347: push edi */
   8735     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x39003348: call dword ptr [0x3900b030] */
   8736     RECOMP_FLAGS_IN();
   8737     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   8738     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8739     esp = esp + 8; /* 0x3900334E: add esp, 8 */
   8740     _flag_k = FK_ADD;
   8741     /* test LO8(eax), LO8(eax) */ /* 0x39003351: test al, al */
   8742     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   8743     _cf = 0;
   8744     _flag_k = FK_NARROW(FK_TEST, 24);
   8745     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900335A; /* 0x39003353: jne 0x3900335a */
   8746 L_39003355:
   8747     eax = ebp + 0x14; /* 0x39003355: lea eax, [ebp + 0x14] */
   8748     goto L_39003365; /* 0x39003358: jmp 0x39003365 */
   8749 L_3900335A:
   8750     eax = ebp + 0x8; /* 0x3900335A: lea eax, [ebp + 8] */
   8751     ecx = esi; /* 0x3900335D: mov ecx, esi */
   8752     PUSH32(esp, eax); /* 0x3900335F: push eax */
   8753     RECOMP_ICALL(0x39004AE0u); /* 0x39003360: call 0x39004ae0 */ /* not lifted */
   8754     RECOMP_FLAGS_IN();
   8755 L_39003365:
   8756     eax = MEM32(eax); /* 0x39003365: mov eax, dword ptr [eax] */
   8757     ecx = MEM32(esi + 0x4); /* 0x39003367: mov ecx, dword ptr [esi + 4] */
   8758     edi = POP32_VAL(esp); /* 0x3900336A: pop edi */
   8759     /* cmp eax, ecx */ /* 0x3900336B: cmp eax, ecx */
   8760     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   8761     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8762     _flag_k = FK_CMP;
   8763     esi = POP32_VAL(esp); /* 0x3900336D: pop esi */
   8764     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003386; /* 0x3900336E: je 0x39003386 */
   8765 L_39003370:
   8766     edx = MEM32(ebp + 0xC); /* 0x39003370: mov edx, dword ptr [ebp + 0xc] */
   8767     ecx = MEM32(eax + 0x20); /* 0x39003373: mov ecx, dword ptr [eax + 0x20] */
   8768     MEM32(edx) = ecx; /* 0x39003376: mov dword ptr [edx], ecx */
   8769     ecx = MEM32(ebp + 0x10); /* 0x39003378: mov ecx, dword ptr [ebp + 0x10] */
   8770     eax = MEM32(eax + 0x24); /* 0x3900337B: mov eax, dword ptr [eax + 0x24] */
   8771     MEM32(ecx) = eax; /* 0x3900337E: mov dword ptr [ecx], eax */
   8772     SET_LO8(eax, 1); /* 0x39003380: mov al, 1 */
   8773     ebp = POP32_VAL(esp); /* 0x39003382: pop ebp */
   8774     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39003383: ret 0x10 */
   8775 L_39003386:
   8776     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
   8777     SET_LO8(eax, 0); /* 0x39003386: xor al, al */
   8778     _cf = 0;
   8779     _flag_k = FK_NARROW(FK_TEST, 24);
   8780     ebp = POP32_VAL(esp); /* 0x39003388: pop ebp */
   8781     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39003389: ret 0x10 */
   8782     RECOMP_REGS_OUT();
   8783 }
   8784 
   8785 void sub_39003390(void) {
   8786     int _fpu_cmp = 0;
   8787     uint32_t _cf = 0;
   8788     int _df = 1;
   8789     uint32_t _flag_k = FK_NONE;
   8790     uint32_t _flag_a = 0, _flag_b = 0;
   8791     uint32_t _itail_tgt = 0;
   8792     RECOMP_REGS_LOCALS
   8793     RECOMP_ENTER(0x39003390u);
   8794 
   8795 L_39003390:
   8796     PUSH32(esp, ebp); /* 0x39003390: push ebp */
   8797     ebp = esp; /* 0x39003391: mov ebp, esp */
   8798     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   8799     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8800     esp = esp - 0xCu; /* 0x39003393: sub esp, 0xc */
   8801     _flag_k = FK_CMP;
   8802     PUSH32(esp, ebx); /* 0x39003396: push ebx */
   8803     ebx = MEM32(ebp + 0xC); /* 0x39003397: mov ebx, dword ptr [ebp + 0xc] */
   8804     PUSH32(esp, esi); /* 0x3900339A: push esi */
   8805     PUSH32(esp, edi); /* 0x3900339B: push edi */
   8806     eax = MEM32(ebx + 0x4); /* 0x3900339C: mov eax, dword ptr [ebx + 4] */
   8807     edi = ecx; /* 0x3900339F: mov edi, ecx */
   8808     /* test eax, eax */ /* 0x390033A1: test eax, eax */
   8809     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8810     _cf = 0;
   8811     _flag_k = FK_TEST;
   8812     if (TEST_NZ(_flag_a, _flag_b)) goto L_390033AA; /* 0x390033A3: jne 0x390033aa */
   8813 L_390033A5:
   8814     eax = MEM32(0x3900B02C); /* 0x390033A5: mov eax, dword ptr [0x3900b02c] */
   8815 L_390033AA:
   8816     PUSH32(esp, eax); /* 0x390033AA: push eax */
   8817     RECOMP_ICALL(MEM32(0x3900B07C)); /* 0x390033AB: call dword ptr [0x3900b07c] */
   8818     RECOMP_FLAGS_IN();
   8819     MEM32(ebp + (-0x4)) = eax; /* 0x390033B1: mov dword ptr [ebp - 4], eax */
   8820     eax = MEM32(ebx + 0x4); /* 0x390033B4: mov eax, dword ptr [ebx + 4] */
   8821     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   8822     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8823     esp = esp + 4; /* 0x390033B7: add esp, 4 */
   8824     _flag_k = FK_ADD;
   8825     /* test eax, eax */ /* 0x390033BA: test eax, eax */
   8826     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8827     _cf = 0;
   8828     _flag_k = FK_TEST;
   8829     if (TEST_NZ(_flag_a, _flag_b)) goto L_390033C3; /* 0x390033BC: jne 0x390033c3 */
   8830 L_390033BE:
   8831     eax = MEM32(0x3900B02C); /* 0x390033BE: mov eax, dword ptr [0x3900b02c] */
   8832 L_390033C3:
   8833     PUSH32(esp, eax); /* 0x390033C3: push eax */
   8834     RECOMP_ICALL(MEM32(0x3900B084)); /* 0x390033C4: call dword ptr [0x3900b084] */
   8835     RECOMP_FLAGS_IN();
   8836     esi = MEM32(ebp + 0x8); /* 0x390033CA: mov esi, dword ptr [ebp + 8] */
   8837     ecx = MEM32(edi + 0x30); /* 0x390033CD: mov ecx, dword ptr [edi + 0x30] */
   8838     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x390033D0: fstp dword ptr [ebp - 8] */
   8839     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   8840     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8841     esp = esp + 4; /* 0x390033D3: add esp, 4 */
   8842     _flag_k = FK_ADD;
   8843     eax = ebp + 0x8; /* 0x390033D6: lea eax, [ebp + 8] */
   8844     PUSH32(esp, esi); /* 0x390033D9: push esi */
   8845     PUSH32(esp, eax); /* 0x390033DA: push eax */
   8846     RECOMP_ICALL(0x390049E0u); /* 0x390033DB: call 0x390049e0 */ /* not lifted */
   8847     RECOMP_FLAGS_IN();
   8848     ecx = MEM32(edi + 0x30); /* 0x390033E0: mov ecx, dword ptr [edi + 0x30] */
   8849     eax = MEM32(eax); /* 0x390033E3: mov eax, dword ptr [eax] */
   8850     /* cmp MEM32(ecx + 0x4), eax */ /* 0x390033E5: cmp dword ptr [ecx + 4], eax */
   8851     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   8852     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8853     _flag_k = FK_CMP;
   8854     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003431; /* 0x390033E8: je 0x39003431 */
   8855 L_390033EA:
   8856     eax = MEM32(esi + 0x4); /* 0x390033EA: mov eax, dword ptr [esi + 4] */
   8857     /* test eax, eax */ /* 0x390033ED: test eax, eax */
   8858     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8859     _cf = 0;
   8860     _flag_k = FK_TEST;
   8861     if (TEST_NZ(_flag_a, _flag_b)) goto L_390033F6; /* 0x390033EF: jne 0x390033f6 */
   8862 L_390033F1:
   8863     eax = MEM32(0x3900B02C); /* 0x390033F1: mov eax, dword ptr [0x3900b02c] */
   8864 L_390033F6:
   8865     edx = MEM32(ebp + (-0x4)); /* 0x390033F6: mov edx, dword ptr [ebp - 4] */
   8866     PUSH32(esp, 1); /* 0x390033F9: push 1 */
   8867     PUSH32(esp, 0); /* 0x390033FB: push 0 */
   8868     PUSH32(esp, edx); /* 0x390033FD: push edx */
   8869     PUSH32(esp, eax); /* 0x390033FE: push eax */
   8870     ecx = edi; /* 0x390033FF: mov ecx, edi */
   8871     RECOMP_ICALL(0x39001D30u); /* 0x39003401: call 0x39001d30 */ /* not lifted */
   8872     RECOMP_FLAGS_IN();
   8873     esi = MEM32(esi + 0x4); /* 0x39003406: mov esi, dword ptr [esi + 4] */
   8874     /* test esi, esi */ /* 0x39003409: test esi, esi */
   8875     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   8876     _cf = 0;
   8877     _flag_k = FK_TEST;
   8878     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003413; /* 0x3900340B: jne 0x39003413 */
   8879 L_3900340D:
   8880     esi = MEM32(0x3900B02C); /* 0x3900340D: mov esi, dword ptr [0x3900b02c] */
   8881 L_39003413:
   8882     PUSH32(esp, eax); /* 0x39003413: push eax */
   8883     eax = MEM32(ebp + 0x10); /* 0x39003414: mov eax, dword ptr [ebp + 0x10] */
   8884     PUSH32(esp, esi); /* 0x39003417: push esi */
   8885     PUSH32(esp, 0x3900E168u); /* 0x39003418: push 0x3900e168 */
   8886     PUSH32(esp, eax); /* 0x3900341D: push eax */
   8887     RECOMP_ICALL(0x39004320u); /* 0x3900341E: call 0x39004320 */ /* not lifted */
   8888     RECOMP_FLAGS_IN();
   8889     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   8890     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8891     esp = esp + 0x10u; /* 0x39003423: add esp, 0x10 */
   8892     _flag_k = FK_ADD;
   8893     SET_LO8(eax, 1); /* 0x39003426: mov al, 1 */
   8894     edi = POP32_VAL(esp); /* 0x39003428: pop edi */
   8895     esi = POP32_VAL(esp); /* 0x39003429: pop esi */
   8896     ebx = POP32_VAL(esp); /* 0x3900342A: pop ebx */
   8897     esp = ebp; /* 0x3900342B: mov esp, ebp */
   8898     ebp = POP32_VAL(esp); /* 0x3900342D: pop ebp */
   8899     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3900342E: ret 0xc */
   8900 L_39003431:
   8901     ecx = MEM32(edi + 0x34); /* 0x39003431: mov ecx, dword ptr [edi + 0x34] */
   8902     edx = ebp + 0x8; /* 0x39003434: lea edx, [ebp + 8] */
   8903     PUSH32(esp, esi); /* 0x39003437: push esi */
   8904     PUSH32(esp, edx); /* 0x39003438: push edx */
   8905     RECOMP_ICALL(0x390049E0u); /* 0x39003439: call 0x390049e0 */ /* not lifted */
   8906     RECOMP_FLAGS_IN();
   8907     ecx = MEM32(edi + 0x34); /* 0x3900343E: mov ecx, dword ptr [edi + 0x34] */
   8908     eax = MEM32(eax); /* 0x39003441: mov eax, dword ptr [eax] */
   8909     /* cmp MEM32(ecx + 0x4), eax */ /* 0x39003443: cmp dword ptr [ecx + 4], eax */
   8910     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   8911     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8912     _flag_k = FK_CMP;
   8913     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003494; /* 0x39003446: je 0x39003494 */
   8914 L_39003448:
   8915     eax = MEM32(esi + 0x4); /* 0x39003448: mov eax, dword ptr [esi + 4] */
   8916     /* test eax, eax */ /* 0x3900344B: test eax, eax */
   8917     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8918     _cf = 0;
   8919     _flag_k = FK_TEST;
   8920     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003454; /* 0x3900344D: jne 0x39003454 */
   8921 L_3900344F:
   8922     eax = MEM32(0x3900B02C); /* 0x3900344F: mov eax, dword ptr [0x3900b02c] */
   8923 L_39003454:
   8924     edx = MEM32(ebp + (-0x8)); /* 0x39003454: mov edx, dword ptr [ebp - 8] */
   8925     PUSH32(esp, 1); /* 0x39003457: push 1 */
   8926     PUSH32(esp, 0); /* 0x39003459: push 0 */
   8927     PUSH32(esp, edx); /* 0x3900345B: push edx */
   8928     PUSH32(esp, eax); /* 0x3900345C: push eax */
   8929     ecx = edi; /* 0x3900345D: mov ecx, edi */
   8930     RECOMP_ICALL(0x39001EB0u); /* 0x3900345F: call 0x39001eb0 */ /* not lifted */
   8931     RECOMP_FLAGS_IN();
   8932     esi = MEM32(esi + 0x4); /* 0x39003464: mov esi, dword ptr [esi + 4] */
   8933     /* test esi, esi */ /* 0x39003467: test esi, esi */
   8934     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   8935     _cf = 0;
   8936     _flag_k = FK_TEST;
   8937     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003471; /* 0x39003469: jne 0x39003471 */
   8938 L_3900346B:
   8939     esi = MEM32(0x3900B02C); /* 0x3900346B: mov esi, dword ptr [0x3900b02c] */
   8940 L_39003471:
   8941     eax = MEM32(ebp + 0x10); /* 0x39003471: mov eax, dword ptr [ebp + 0x10] */
   8942     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   8943     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8944     esp = esp - 8; /* 0x39003474: sub esp, 8 */
   8945     _flag_k = FK_CMP;
   8946     { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x39003477: fstp qword ptr [esp] */
   8947     PUSH32(esp, esi); /* 0x3900347A: push esi */
   8948     PUSH32(esp, 0x3900E148u); /* 0x3900347B: push 0x3900e148 */
   8949     PUSH32(esp, eax); /* 0x39003480: push eax */
   8950     RECOMP_ICALL(0x39004320u); /* 0x39003481: call 0x39004320 */ /* not lifted */
   8951     RECOMP_FLAGS_IN();
   8952     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   8953     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8954     esp = esp + 0x14u; /* 0x39003486: add esp, 0x14 */
   8955     _flag_k = FK_ADD;
   8956     SET_LO8(eax, 1); /* 0x39003489: mov al, 1 */
   8957     edi = POP32_VAL(esp); /* 0x3900348B: pop edi */
   8958     esi = POP32_VAL(esp); /* 0x3900348C: pop esi */
   8959     ebx = POP32_VAL(esp); /* 0x3900348D: pop ebx */
   8960     esp = ebp; /* 0x3900348E: mov esp, ebp */
   8961     ebp = POP32_VAL(esp); /* 0x39003490: pop ebp */
   8962     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x39003491: ret 0xc */
   8963 L_39003494:
   8964     ecx = MEM32(edi + 0x38); /* 0x39003494: mov ecx, dword ptr [edi + 0x38] */
   8965     edx = ebp + 0x8; /* 0x39003497: lea edx, [ebp + 8] */
   8966     PUSH32(esp, esi); /* 0x3900349A: push esi */
   8967     PUSH32(esp, edx); /* 0x3900349B: push edx */
   8968     RECOMP_ICALL(0x390049E0u); /* 0x3900349C: call 0x390049e0 */ /* not lifted */
   8969     RECOMP_FLAGS_IN();
   8970     ecx = MEM32(edi + 0x38); /* 0x390034A1: mov ecx, dword ptr [edi + 0x38] */
   8971     eax = MEM32(eax); /* 0x390034A4: mov eax, dword ptr [eax] */
   8972     /* cmp MEM32(ecx + 0x4), eax */ /* 0x390034A6: cmp dword ptr [ecx + 4], eax */
   8973     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   8974     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8975     _flag_k = FK_CMP;
   8976     if (CMP_EQ(_flag_a, _flag_b)) goto L_390034FB; /* 0x390034A9: je 0x390034fb */
   8977 L_390034AB:
   8978     ecx = MEM32(ebx + 0x4); /* 0x390034AB: mov ecx, dword ptr [ebx + 4] */
   8979     edx = MEM32(0x3900B02C); /* 0x390034AE: mov edx, dword ptr [0x3900b02c] */
   8980     /* test ecx, ecx */ /* 0x390034B4: test ecx, ecx */
   8981     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   8982     _cf = 0;
   8983     _flag_k = FK_TEST;
   8984     if (TEST_NZ(_flag_a, _flag_b)) goto L_390034BA; /* 0x390034B6: jne 0x390034ba */
   8985 L_390034B8:
   8986     ecx = edx; /* 0x390034B8: mov ecx, edx */
   8987 L_390034BA:
   8988     eax = MEM32(esi + 0x4); /* 0x390034BA: mov eax, dword ptr [esi + 4] */
   8989     /* test eax, eax */ /* 0x390034BD: test eax, eax */
   8990     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8991     _cf = 0;
   8992     _flag_k = FK_TEST;
   8993     if (TEST_NZ(_flag_a, _flag_b)) goto L_390034C3; /* 0x390034BF: jne 0x390034c3 */
   8994 L_390034C1:
   8995     eax = edx; /* 0x390034C1: mov eax, edx */
   8996 L_390034C3:
   8997     PUSH32(esp, 1); /* 0x390034C3: push 1 */
   8998     PUSH32(esp, 0); /* 0x390034C5: push 0 */
   8999     PUSH32(esp, ecx); /* 0x390034C7: push ecx */
   9000     PUSH32(esp, eax); /* 0x390034C8: push eax */
   9001     ecx = edi; /* 0x390034C9: mov ecx, edi */
   9002     RECOMP_ICALL(0x39002040u); /* 0x390034CB: call 0x39002040 */ /* not lifted */
   9003     RECOMP_FLAGS_IN();
   9004     esi = MEM32(esi + 0x4); /* 0x390034D0: mov esi, dword ptr [esi + 4] */
   9005     /* test esi, esi */ /* 0x390034D3: test esi, esi */
   9006     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   9007     _cf = 0;
   9008     _flag_k = FK_TEST;
   9009     if (TEST_NZ(_flag_a, _flag_b)) goto L_390034DD; /* 0x390034D5: jne 0x390034dd */
   9010 L_390034D7:
   9011     esi = MEM32(0x3900B02C); /* 0x390034D7: mov esi, dword ptr [0x3900b02c] */
   9012 L_390034DD:
   9013     edx = MEM32(ebp + 0x10); /* 0x390034DD: mov edx, dword ptr [ebp + 0x10] */
   9014     PUSH32(esp, eax); /* 0x390034E0: push eax */
   9015     PUSH32(esp, esi); /* 0x390034E1: push esi */
   9016     PUSH32(esp, 0x3900E128u); /* 0x390034E2: push 0x3900e128 */
   9017     PUSH32(esp, edx); /* 0x390034E7: push edx */
   9018     RECOMP_ICALL(0x39004320u); /* 0x390034E8: call 0x39004320 */ /* not lifted */
   9019     RECOMP_FLAGS_IN();
   9020     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   9021     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9022     esp = esp + 0x10u; /* 0x390034ED: add esp, 0x10 */
   9023     _flag_k = FK_ADD;
   9024     SET_LO8(eax, 1); /* 0x390034F0: mov al, 1 */
   9025     edi = POP32_VAL(esp); /* 0x390034F2: pop edi */
   9026     esi = POP32_VAL(esp); /* 0x390034F3: pop esi */
   9027     ebx = POP32_VAL(esp); /* 0x390034F4: pop ebx */
   9028     esp = ebp; /* 0x390034F5: mov esp, ebp */
   9029     ebp = POP32_VAL(esp); /* 0x390034F7: pop ebp */
   9030     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x390034F8: ret 0xc */
   9031 L_390034FB:
   9032     ecx = MEM32(edi + 0x3C); /* 0x390034FB: mov ecx, dword ptr [edi + 0x3c] */
   9033     eax = ebp + 0x8; /* 0x390034FE: lea eax, [ebp + 8] */
   9034     PUSH32(esp, esi); /* 0x39003501: push esi */
   9035     PUSH32(esp, eax); /* 0x39003502: push eax */
   9036     RECOMP_ICALL(0x390049E0u); /* 0x39003503: call 0x390049e0 */ /* not lifted */
   9037     RECOMP_FLAGS_IN();
   9038     ecx = MEM32(edi + 0x3C); /* 0x39003508: mov ecx, dword ptr [edi + 0x3c] */
   9039     eax = MEM32(eax); /* 0x3900350B: mov eax, dword ptr [eax] */
   9040     /* cmp MEM32(ecx + 0x4), eax */ /* 0x3900350D: cmp dword ptr [ecx + 4], eax */
   9041     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   9042     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9043     _flag_k = FK_CMP;
   9044     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003559; /* 0x39003510: je 0x39003559 */
   9045 L_39003512:
   9046     eax = MEM32(esi + 0x4); /* 0x39003512: mov eax, dword ptr [esi + 4] */
   9047     /* test eax, eax */ /* 0x39003515: test eax, eax */
   9048     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9049     _cf = 0;
   9050     _flag_k = FK_TEST;
   9051     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900351E; /* 0x39003517: jne 0x3900351e */
   9052 L_39003519:
   9053     eax = MEM32(0x3900B02C); /* 0x39003519: mov eax, dword ptr [0x3900b02c] */
   9054 L_3900351E:
   9055     edx = MEM32(ebp + (-0x4)); /* 0x3900351E: mov edx, dword ptr [ebp - 4] */
   9056     PUSH32(esp, 1); /* 0x39003521: push 1 */
   9057     PUSH32(esp, 1); /* 0x39003523: push 1 */
   9058     PUSH32(esp, edx); /* 0x39003525: push edx */
   9059     PUSH32(esp, eax); /* 0x39003526: push eax */
   9060     ecx = edi; /* 0x39003527: mov ecx, edi */
   9061     RECOMP_ICALL(0x39001D30u); /* 0x39003529: call 0x39001d30 */ /* not lifted */
   9062     RECOMP_FLAGS_IN();
   9063     esi = MEM32(esi + 0x4); /* 0x3900352E: mov esi, dword ptr [esi + 4] */
   9064     /* test esi, esi */ /* 0x39003531: test esi, esi */
   9065     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   9066     _cf = 0;
   9067     _flag_k = FK_TEST;
   9068     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900353B; /* 0x39003533: jne 0x3900353b */
   9069 L_39003535:
   9070     esi = MEM32(0x3900B02C); /* 0x39003535: mov esi, dword ptr [0x3900b02c] */
   9071 L_3900353B:
   9072     PUSH32(esp, eax); /* 0x3900353B: push eax */
   9073     eax = MEM32(ebp + 0x10); /* 0x3900353C: mov eax, dword ptr [ebp + 0x10] */
   9074     PUSH32(esp, esi); /* 0x3900353F: push esi */
   9075     PUSH32(esp, 0x3900E108u); /* 0x39003540: push 0x3900e108 */
   9076     PUSH32(esp, eax); /* 0x39003545: push eax */
   9077     RECOMP_ICALL(0x39004320u); /* 0x39003546: call 0x39004320 */ /* not lifted */
   9078     RECOMP_FLAGS_IN();
   9079     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   9080     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9081     esp = esp + 0x10u; /* 0x3900354B: add esp, 0x10 */
   9082     _flag_k = FK_ADD;
   9083     SET_LO8(eax, 1); /* 0x3900354E: mov al, 1 */
   9084     edi = POP32_VAL(esp); /* 0x39003550: pop edi */
   9085     esi = POP32_VAL(esp); /* 0x39003551: pop esi */
   9086     ebx = POP32_VAL(esp); /* 0x39003552: pop ebx */
   9087     esp = ebp; /* 0x39003553: mov esp, ebp */
   9088     ebp = POP32_VAL(esp); /* 0x39003555: pop ebp */
   9089     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x39003556: ret 0xc */
   9090 L_39003559:
   9091     ecx = MEM32(edi + 0x40); /* 0x39003559: mov ecx, dword ptr [edi + 0x40] */
   9092     edx = ebp + 0x8; /* 0x3900355C: lea edx, [ebp + 8] */
   9093     PUSH32(esp, esi); /* 0x3900355F: push esi */
   9094     PUSH32(esp, edx); /* 0x39003560: push edx */
   9095     RECOMP_ICALL(0x390049E0u); /* 0x39003561: call 0x390049e0 */ /* not lifted */
   9096     RECOMP_FLAGS_IN();
   9097     ecx = MEM32(edi + 0x40); /* 0x39003566: mov ecx, dword ptr [edi + 0x40] */
   9098     eax = MEM32(eax); /* 0x39003569: mov eax, dword ptr [eax] */
   9099     /* cmp MEM32(ecx + 0x4), eax */ /* 0x3900356B: cmp dword ptr [ecx + 4], eax */
   9100     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   9101     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9102     _flag_k = FK_CMP;
   9103     if (CMP_EQ(_flag_a, _flag_b)) goto L_390035BC; /* 0x3900356E: je 0x390035bc */
   9104 L_39003570:
   9105     eax = MEM32(esi + 0x4); /* 0x39003570: mov eax, dword ptr [esi + 4] */
   9106     /* test eax, eax */ /* 0x39003573: test eax, eax */
   9107     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9108     _cf = 0;
   9109     _flag_k = FK_TEST;
   9110     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900357C; /* 0x39003575: jne 0x3900357c */
   9111 L_39003577:
   9112     eax = MEM32(0x3900B02C); /* 0x39003577: mov eax, dword ptr [0x3900b02c] */
   9113 L_3900357C:
   9114     edx = MEM32(ebp + (-0x8)); /* 0x3900357C: mov edx, dword ptr [ebp - 8] */
   9115     PUSH32(esp, 1); /* 0x3900357F: push 1 */
   9116     PUSH32(esp, 1); /* 0x39003581: push 1 */
   9117     PUSH32(esp, edx); /* 0x39003583: push edx */
   9118     PUSH32(esp, eax); /* 0x39003584: push eax */
   9119     ecx = edi; /* 0x39003585: mov ecx, edi */
   9120     RECOMP_ICALL(0x39001EB0u); /* 0x39003587: call 0x39001eb0 */ /* not lifted */
   9121     RECOMP_FLAGS_IN();
   9122     esi = MEM32(esi + 0x4); /* 0x3900358C: mov esi, dword ptr [esi + 4] */
   9123     /* test esi, esi */ /* 0x3900358F: test esi, esi */
   9124     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   9125     _cf = 0;
   9126     _flag_k = FK_TEST;
   9127     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003599; /* 0x39003591: jne 0x39003599 */
   9128 L_39003593:
   9129     esi = MEM32(0x3900B02C); /* 0x39003593: mov esi, dword ptr [0x3900b02c] */
   9130 L_39003599:
   9131     eax = MEM32(ebp + 0x10); /* 0x39003599: mov eax, dword ptr [ebp + 0x10] */
   9132     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   9133     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9134     esp = esp - 8; /* 0x3900359C: sub esp, 8 */
   9135     _flag_k = FK_CMP;
   9136     { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x3900359F: fstp qword ptr [esp] */
   9137     PUSH32(esp, esi); /* 0x390035A2: push esi */
   9138     PUSH32(esp, 0x3900E0E8u); /* 0x390035A3: push 0x3900e0e8 */
   9139     PUSH32(esp, eax); /* 0x390035A8: push eax */
   9140     RECOMP_ICALL(0x39004320u); /* 0x390035A9: call 0x39004320 */ /* not lifted */
   9141     RECOMP_FLAGS_IN();
   9142     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   9143     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9144     esp = esp + 0x14u; /* 0x390035AE: add esp, 0x14 */
   9145     _flag_k = FK_ADD;
   9146     SET_LO8(eax, 1); /* 0x390035B1: mov al, 1 */
   9147     edi = POP32_VAL(esp); /* 0x390035B3: pop edi */
   9148     esi = POP32_VAL(esp); /* 0x390035B4: pop esi */
   9149     ebx = POP32_VAL(esp); /* 0x390035B5: pop ebx */
   9150     esp = ebp; /* 0x390035B6: mov esp, ebp */
   9151     ebp = POP32_VAL(esp); /* 0x390035B8: pop ebp */
   9152     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x390035B9: ret 0xc */
   9153 L_390035BC:
   9154     ecx = MEM32(edi + 0x44); /* 0x390035BC: mov ecx, dword ptr [edi + 0x44] */
   9155     edx = ebp + 0x8; /* 0x390035BF: lea edx, [ebp + 8] */
   9156     PUSH32(esp, esi); /* 0x390035C2: push esi */
   9157     PUSH32(esp, edx); /* 0x390035C3: push edx */
   9158     RECOMP_ICALL(0x390049E0u); /* 0x390035C4: call 0x390049e0 */ /* not lifted */
   9159     RECOMP_FLAGS_IN();
   9160     ecx = MEM32(edi + 0x44); /* 0x390035C9: mov ecx, dword ptr [edi + 0x44] */
   9161     eax = MEM32(eax); /* 0x390035CC: mov eax, dword ptr [eax] */
   9162     /* cmp MEM32(ecx + 0x4), eax */ /* 0x390035CE: cmp dword ptr [ecx + 4], eax */
   9163     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   9164     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9165     _flag_k = FK_CMP;
   9166     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003623; /* 0x390035D1: je 0x39003623 */
   9167 L_390035D3:
   9168     ecx = MEM32(ebx + 0x4); /* 0x390035D3: mov ecx, dword ptr [ebx + 4] */
   9169     edx = MEM32(0x3900B02C); /* 0x390035D6: mov edx, dword ptr [0x3900b02c] */
   9170     /* test ecx, ecx */ /* 0x390035DC: test ecx, ecx */
   9171     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   9172     _cf = 0;
   9173     _flag_k = FK_TEST;
   9174     if (TEST_NZ(_flag_a, _flag_b)) goto L_390035E2; /* 0x390035DE: jne 0x390035e2 */
   9175 L_390035E0:
   9176     ecx = edx; /* 0x390035E0: mov ecx, edx */
   9177 L_390035E2:
   9178     eax = MEM32(esi + 0x4); /* 0x390035E2: mov eax, dword ptr [esi + 4] */
   9179     /* test eax, eax */ /* 0x390035E5: test eax, eax */
   9180     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9181     _cf = 0;
   9182     _flag_k = FK_TEST;
   9183     if (TEST_NZ(_flag_a, _flag_b)) goto L_390035EB; /* 0x390035E7: jne 0x390035eb */
   9184 L_390035E9:
   9185     eax = edx; /* 0x390035E9: mov eax, edx */
   9186 L_390035EB:
   9187     PUSH32(esp, 1); /* 0x390035EB: push 1 */
   9188     PUSH32(esp, 1); /* 0x390035ED: push 1 */
   9189     PUSH32(esp, ecx); /* 0x390035EF: push ecx */
   9190     PUSH32(esp, eax); /* 0x390035F0: push eax */
   9191     ecx = edi; /* 0x390035F1: mov ecx, edi */
   9192     RECOMP_ICALL(0x39002040u); /* 0x390035F3: call 0x39002040 */ /* not lifted */
   9193     RECOMP_FLAGS_IN();
   9194     esi = MEM32(esi + 0x4); /* 0x390035F8: mov esi, dword ptr [esi + 4] */
   9195     /* test esi, esi */ /* 0x390035FB: test esi, esi */
   9196     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   9197     _cf = 0;
   9198     _flag_k = FK_TEST;
   9199     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003605; /* 0x390035FD: jne 0x39003605 */
   9200 L_390035FF:
   9201     esi = MEM32(0x3900B02C); /* 0x390035FF: mov esi, dword ptr [0x3900b02c] */
   9202 L_39003605:
   9203     edx = MEM32(ebp + 0x10); /* 0x39003605: mov edx, dword ptr [ebp + 0x10] */
   9204     PUSH32(esp, eax); /* 0x39003608: push eax */
   9205     PUSH32(esp, esi); /* 0x39003609: push esi */
   9206     PUSH32(esp, 0x3900E0C8u); /* 0x3900360A: push 0x3900e0c8 */
   9207     PUSH32(esp, edx); /* 0x3900360F: push edx */
   9208     RECOMP_ICALL(0x39004320u); /* 0x39003610: call 0x39004320 */ /* not lifted */
   9209     RECOMP_FLAGS_IN();
   9210     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   9211     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9212     esp = esp + 0x10u; /* 0x39003615: add esp, 0x10 */
   9213     _flag_k = FK_ADD;
   9214     SET_LO8(eax, 1); /* 0x39003618: mov al, 1 */
   9215     edi = POP32_VAL(esp); /* 0x3900361A: pop edi */
   9216     esi = POP32_VAL(esp); /* 0x3900361B: pop esi */
   9217     ebx = POP32_VAL(esp); /* 0x3900361C: pop ebx */
   9218     esp = ebp; /* 0x3900361D: mov esp, ebp */
   9219     ebp = POP32_VAL(esp); /* 0x3900361F: pop ebp */
   9220     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x39003620: ret 0xc */
   9221 L_39003623:
   9222     ecx = MEM32(edi + 0x48); /* 0x39003623: mov ecx, dword ptr [edi + 0x48] */
   9223     eax = ebp + 0x8; /* 0x39003626: lea eax, [ebp + 8] */
   9224     PUSH32(esp, esi); /* 0x39003629: push esi */
   9225     PUSH32(esp, eax); /* 0x3900362A: push eax */
   9226     RECOMP_ICALL(0x390049E0u); /* 0x3900362B: call 0x390049e0 */ /* not lifted */
   9227     RECOMP_FLAGS_IN();
   9228     ecx = MEM32(edi + 0x48); /* 0x39003630: mov ecx, dword ptr [edi + 0x48] */
   9229     eax = MEM32(eax); /* 0x39003633: mov eax, dword ptr [eax] */
   9230     /* cmp MEM32(ecx + 0x4), eax */ /* 0x39003635: cmp dword ptr [ecx + 4], eax */
   9231     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   9232     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9233     _flag_k = FK_CMP;
   9234     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003681; /* 0x39003638: je 0x39003681 */
   9235 L_3900363A:
   9236     eax = MEM32(esi + 0x4); /* 0x3900363A: mov eax, dword ptr [esi + 4] */
   9237     /* test eax, eax */ /* 0x3900363D: test eax, eax */
   9238     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9239     _cf = 0;
   9240     _flag_k = FK_TEST;
   9241     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003646; /* 0x3900363F: jne 0x39003646 */
   9242 L_39003641:
   9243     eax = MEM32(0x3900B02C); /* 0x39003641: mov eax, dword ptr [0x3900b02c] */
   9244 L_39003646:
   9245     edx = MEM32(ebp + (-0x4)); /* 0x39003646: mov edx, dword ptr [ebp - 4] */
   9246     PUSH32(esp, 1); /* 0x39003649: push 1 */
   9247     PUSH32(esp, 2); /* 0x3900364B: push 2 */
   9248     PUSH32(esp, edx); /* 0x3900364D: push edx */
   9249     PUSH32(esp, eax); /* 0x3900364E: push eax */
   9250     ecx = edi; /* 0x3900364F: mov ecx, edi */
   9251     RECOMP_ICALL(0x39001D30u); /* 0x39003651: call 0x39001d30 */ /* not lifted */
   9252     RECOMP_FLAGS_IN();
   9253     esi = MEM32(esi + 0x4); /* 0x39003656: mov esi, dword ptr [esi + 4] */
   9254     /* test esi, esi */ /* 0x39003659: test esi, esi */
   9255     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   9256     _cf = 0;
   9257     _flag_k = FK_TEST;
   9258     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003663; /* 0x3900365B: jne 0x39003663 */
   9259 L_3900365D:
   9260     esi = MEM32(0x3900B02C); /* 0x3900365D: mov esi, dword ptr [0x3900b02c] */
   9261 L_39003663:
   9262     PUSH32(esp, eax); /* 0x39003663: push eax */
   9263     eax = MEM32(ebp + 0x10); /* 0x39003664: mov eax, dword ptr [ebp + 0x10] */
   9264     PUSH32(esp, esi); /* 0x39003667: push esi */
   9265     PUSH32(esp, 0x3900E0A8u); /* 0x39003668: push 0x3900e0a8 */
   9266     PUSH32(esp, eax); /* 0x3900366D: push eax */
   9267     RECOMP_ICALL(0x39004320u); /* 0x3900366E: call 0x39004320 */ /* not lifted */
   9268     RECOMP_FLAGS_IN();
   9269     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   9270     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9271     esp = esp + 0x10u; /* 0x39003673: add esp, 0x10 */
   9272     _flag_k = FK_ADD;
   9273     SET_LO8(eax, 1); /* 0x39003676: mov al, 1 */
   9274     edi = POP32_VAL(esp); /* 0x39003678: pop edi */
   9275     esi = POP32_VAL(esp); /* 0x39003679: pop esi */
   9276     ebx = POP32_VAL(esp); /* 0x3900367A: pop ebx */
   9277     esp = ebp; /* 0x3900367B: mov esp, ebp */
   9278     ebp = POP32_VAL(esp); /* 0x3900367D: pop ebp */
   9279     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3900367E: ret 0xc */
   9280 L_39003681:
   9281     ebx = MEM32(edi + 0x4C); /* 0x39003681: mov ebx, dword ptr [edi + 0x4c] */
   9282     ecx = ebp + (-0xC); /* 0x39003684: lea ecx, [ebp - 0xc] */
   9283     PUSH32(esp, esi); /* 0x39003687: push esi */
   9284     PUSH32(esp, ecx); /* 0x39003688: push ecx */
   9285     ecx = ebx; /* 0x39003689: mov ecx, ebx */
   9286     RECOMP_ICALL(0x390061B0u); /* 0x3900368B: call 0x390061b0 */ /* not lifted */
   9287     RECOMP_FLAGS_IN();
   9288     eax = MEM32(eax); /* 0x39003690: mov eax, dword ptr [eax] */
   9289     ecx = MEM32(ebx + 0x4); /* 0x39003692: mov ecx, dword ptr [ebx + 4] */
   9290     /* cmp eax, ecx */ /* 0x39003695: cmp eax, ecx */
   9291     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   9292     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9293     _flag_k = FK_CMP;
   9294     MEM32(ebp + 0x8) = eax; /* 0x39003697: mov dword ptr [ebp + 8], eax */
   9295     if (CMP_EQ(_flag_a, _flag_b)) goto L_390036B3; /* 0x3900369A: je 0x390036b3 */
   9296 L_3900369C:
   9297     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu);
   9298     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9299     eax = eax + 0xCu; /* 0x3900369C: add eax, 0xc */
   9300     _flag_k = FK_ADD;
   9301     PUSH32(esp, eax); /* 0x3900369F: push eax */
   9302     PUSH32(esp, esi); /* 0x390036A0: push esi */
   9303     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x390036A1: call dword ptr [0x3900b030] */
   9304     RECOMP_FLAGS_IN();
   9305     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   9306     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9307     esp = esp + 8; /* 0x390036A7: add esp, 8 */
   9308     _flag_k = FK_ADD;
   9309     /* test LO8(eax), LO8(eax) */ /* 0x390036AA: test al, al */
   9310     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   9311     _cf = 0;
   9312     _flag_k = FK_NARROW(FK_TEST, 24);
   9313     if (TEST_NZ(_flag_a, _flag_b)) goto L_390036B3; /* 0x390036AC: jne 0x390036b3 */
   9314 L_390036AE:
   9315     eax = ebp + 0x8; /* 0x390036AE: lea eax, [ebp + 8] */
   9316     goto L_390036BC; /* 0x390036B1: jmp 0x390036bc */
   9317 L_390036B3:
   9318     edx = MEM32(ebx + 0x4); /* 0x390036B3: mov edx, dword ptr [ebx + 4] */
   9319     eax = ebp + (-0x4); /* 0x390036B6: lea eax, [ebp - 4] */
   9320     MEM32(ebp + (-0x4)) = edx; /* 0x390036B9: mov dword ptr [ebp - 4], edx */
   9321 L_390036BC:
   9322     ecx = MEM32(edi + 0x4C); /* 0x390036BC: mov ecx, dword ptr [edi + 0x4c] */
   9323     eax = MEM32(eax); /* 0x390036BF: mov eax, dword ptr [eax] */
   9324     /* cmp MEM32(ecx + 0x4), eax */ /* 0x390036C1: cmp dword ptr [ecx + 4], eax */
   9325     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   9326     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9327     _flag_k = FK_CMP;
   9328     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003712; /* 0x390036C4: je 0x39003712 */
   9329 L_390036C6:
   9330     eax = MEM32(esi + 0x4); /* 0x390036C6: mov eax, dword ptr [esi + 4] */
   9331     /* test eax, eax */ /* 0x390036C9: test eax, eax */
   9332     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9333     _cf = 0;
   9334     _flag_k = FK_TEST;
   9335     if (TEST_NZ(_flag_a, _flag_b)) goto L_390036D2; /* 0x390036CB: jne 0x390036d2 */
   9336 L_390036CD:
   9337     eax = MEM32(0x3900B02C); /* 0x390036CD: mov eax, dword ptr [0x3900b02c] */
   9338 L_390036D2:
   9339     edx = MEM32(ebp + (-0x8)); /* 0x390036D2: mov edx, dword ptr [ebp - 8] */
   9340     PUSH32(esp, 1); /* 0x390036D5: push 1 */
   9341     PUSH32(esp, 2); /* 0x390036D7: push 2 */
   9342     PUSH32(esp, edx); /* 0x390036D9: push edx */
   9343     PUSH32(esp, eax); /* 0x390036DA: push eax */
   9344     ecx = edi; /* 0x390036DB: mov ecx, edi */
   9345     RECOMP_ICALL(0x39001EB0u); /* 0x390036DD: call 0x39001eb0 */ /* not lifted */
   9346     RECOMP_FLAGS_IN();
   9347     esi = MEM32(esi + 0x4); /* 0x390036E2: mov esi, dword ptr [esi + 4] */
   9348     /* test esi, esi */ /* 0x390036E5: test esi, esi */
   9349     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   9350     _cf = 0;
   9351     _flag_k = FK_TEST;
   9352     if (TEST_NZ(_flag_a, _flag_b)) goto L_390036EF; /* 0x390036E7: jne 0x390036ef */
   9353 L_390036E9:
   9354     esi = MEM32(0x3900B02C); /* 0x390036E9: mov esi, dword ptr [0x3900b02c] */
   9355 L_390036EF:
   9356     eax = MEM32(ebp + 0x10); /* 0x390036EF: mov eax, dword ptr [ebp + 0x10] */
   9357     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   9358     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9359     esp = esp - 8; /* 0x390036F2: sub esp, 8 */
   9360     _flag_k = FK_CMP;
   9361     { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x390036F5: fstp qword ptr [esp] */
   9362     PUSH32(esp, esi); /* 0x390036F8: push esi */
   9363     PUSH32(esp, 0x3900E088u); /* 0x390036F9: push 0x3900e088 */
   9364     PUSH32(esp, eax); /* 0x390036FE: push eax */
   9365     RECOMP_ICALL(0x39004320u); /* 0x390036FF: call 0x39004320 */ /* not lifted */
   9366     RECOMP_FLAGS_IN();
   9367     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   9368     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9369     esp = esp + 0x14u; /* 0x39003704: add esp, 0x14 */
   9370     _flag_k = FK_ADD;
   9371     SET_LO8(eax, 1); /* 0x39003707: mov al, 1 */
   9372     edi = POP32_VAL(esp); /* 0x39003709: pop edi */
   9373     esi = POP32_VAL(esp); /* 0x3900370A: pop esi */
   9374     ebx = POP32_VAL(esp); /* 0x3900370B: pop ebx */
   9375     esp = ebp; /* 0x3900370C: mov esp, ebp */
   9376     ebp = POP32_VAL(esp); /* 0x3900370E: pop ebp */
   9377     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3900370F: ret 0xc */
   9378 L_39003712:
   9379     ebx = MEM32(edi + 0x50); /* 0x39003712: mov ebx, dword ptr [edi + 0x50] */
   9380     PUSH32(esp, esi); /* 0x39003715: push esi */
   9381     ecx = ebx; /* 0x39003716: mov ecx, ebx */
   9382     RECOMP_ICALL(0x39007110u); /* 0x39003718: call 0x39007110 */ /* not lifted */
   9383     RECOMP_FLAGS_IN();
   9384     ecx = MEM32(ebx + 0x4); /* 0x3900371D: mov ecx, dword ptr [ebx + 4] */
   9385     MEM32(ebp + 0x8) = eax; /* 0x39003720: mov dword ptr [ebp + 8], eax */
   9386     /* cmp eax, ecx */ /* 0x39003723: cmp eax, ecx */
   9387     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   9388     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9389     _flag_k = FK_CMP;
   9390     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900373E; /* 0x39003725: je 0x3900373e */
   9391 L_39003727:
   9392     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu);
   9393     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9394     eax = eax + 0xCu; /* 0x39003727: add eax, 0xc */
   9395     _flag_k = FK_ADD;
   9396     PUSH32(esp, eax); /* 0x3900372A: push eax */
   9397     PUSH32(esp, esi); /* 0x3900372B: push esi */
   9398     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x3900372C: call dword ptr [0x3900b030] */
   9399     RECOMP_FLAGS_IN();
   9400     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   9401     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9402     esp = esp + 8; /* 0x39003732: add esp, 8 */
   9403     _flag_k = FK_ADD;
   9404     /* test LO8(eax), LO8(eax) */ /* 0x39003735: test al, al */
   9405     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   9406     _cf = 0;
   9407     _flag_k = FK_NARROW(FK_TEST, 24);
   9408     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900373E; /* 0x39003737: jne 0x3900373e */
   9409 L_39003739:
   9410     eax = ebp + 0x8; /* 0x39003739: lea eax, [ebp + 8] */
   9411     goto L_39003747; /* 0x3900373C: jmp 0x39003747 */
   9412 L_3900373E:
   9413     ecx = MEM32(ebx + 0x4); /* 0x3900373E: mov ecx, dword ptr [ebx + 4] */
   9414     eax = ebp + (-0x8); /* 0x39003741: lea eax, [ebp - 8] */
   9415     MEM32(ebp + (-0x8)) = ecx; /* 0x39003744: mov dword ptr [ebp - 8], ecx */
   9416 L_39003747:
   9417     edx = MEM32(edi + 0x50); /* 0x39003747: mov edx, dword ptr [edi + 0x50] */
   9418     eax = MEM32(eax); /* 0x3900374A: mov eax, dword ptr [eax] */
   9419     /* cmp MEM32(edx + 0x4), eax */ /* 0x3900374C: cmp dword ptr [edx + 4], eax */
   9420     _flag_a = (uint32_t)(MEM32(edx + 0x4)); _flag_b = (uint32_t)(eax);
   9421     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9422     _flag_k = FK_CMP;
   9423     if (CMP_EQ(_flag_a, _flag_b)) goto L_390037A4; /* 0x3900374F: je 0x390037a4 */
   9424 L_39003751:
   9425     eax = MEM32(ebp + 0xC); /* 0x39003751: mov eax, dword ptr [ebp + 0xc] */
   9426     edx = MEM32(0x3900B02C); /* 0x39003754: mov edx, dword ptr [0x3900b02c] */
   9427     ecx = MEM32(eax + 0x4); /* 0x3900375A: mov ecx, dword ptr [eax + 4] */
   9428     /* test ecx, ecx */ /* 0x3900375D: test ecx, ecx */
   9429     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   9430     _cf = 0;
   9431     _flag_k = FK_TEST;
   9432     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003763; /* 0x3900375F: jne 0x39003763 */
   9433 L_39003761:
   9434     ecx = edx; /* 0x39003761: mov ecx, edx */
   9435 L_39003763:
   9436     eax = MEM32(esi + 0x4); /* 0x39003763: mov eax, dword ptr [esi + 4] */
   9437     /* test eax, eax */ /* 0x39003766: test eax, eax */
   9438     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9439     _cf = 0;
   9440     _flag_k = FK_TEST;
   9441     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900376C; /* 0x39003768: jne 0x3900376c */
   9442 L_3900376A:
   9443     eax = edx; /* 0x3900376A: mov eax, edx */
   9444 L_3900376C:
   9445     PUSH32(esp, 1); /* 0x3900376C: push 1 */
   9446     PUSH32(esp, 2); /* 0x3900376E: push 2 */
   9447     PUSH32(esp, ecx); /* 0x39003770: push ecx */
   9448     PUSH32(esp, eax); /* 0x39003771: push eax */
   9449     ecx = edi; /* 0x39003772: mov ecx, edi */
   9450     RECOMP_ICALL(0x39002040u); /* 0x39003774: call 0x39002040 */ /* not lifted */
   9451     RECOMP_FLAGS_IN();
   9452     esi = MEM32(esi + 0x4); /* 0x39003779: mov esi, dword ptr [esi + 4] */
   9453     /* test esi, esi */ /* 0x3900377C: test esi, esi */
   9454     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   9455     _cf = 0;
   9456     _flag_k = FK_TEST;
   9457     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003786; /* 0x3900377E: jne 0x39003786 */
   9458 L_39003780:
   9459     esi = MEM32(0x3900B02C); /* 0x39003780: mov esi, dword ptr [0x3900b02c] */
   9460 L_39003786:
   9461     ecx = MEM32(ebp + 0x10); /* 0x39003786: mov ecx, dword ptr [ebp + 0x10] */
   9462     PUSH32(esp, eax); /* 0x39003789: push eax */
   9463     PUSH32(esp, esi); /* 0x3900378A: push esi */
   9464     PUSH32(esp, 0x3900E068u); /* 0x3900378B: push 0x3900e068 */
   9465     PUSH32(esp, ecx); /* 0x39003790: push ecx */
   9466     RECOMP_ICALL(0x39004320u); /* 0x39003791: call 0x39004320 */ /* not lifted */
   9467     RECOMP_FLAGS_IN();
   9468     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   9469     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9470     esp = esp + 0x10u; /* 0x39003796: add esp, 0x10 */
   9471     _flag_k = FK_ADD;
   9472     SET_LO8(eax, 1); /* 0x39003799: mov al, 1 */
   9473     edi = POP32_VAL(esp); /* 0x3900379B: pop edi */
   9474     esi = POP32_VAL(esp); /* 0x3900379C: pop esi */
   9475     ebx = POP32_VAL(esp); /* 0x3900379D: pop ebx */
   9476     esp = ebp; /* 0x3900379E: mov esp, ebp */
   9477     ebp = POP32_VAL(esp); /* 0x390037A0: pop ebp */
   9478     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x390037A1: ret 0xc */
   9479 L_390037A4:
   9480     edi = POP32_VAL(esp); /* 0x390037A4: pop edi */
   9481     esi = POP32_VAL(esp); /* 0x390037A5: pop esi */
   9482     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
   9483     SET_LO8(eax, 0); /* 0x390037A6: xor al, al */
   9484     _cf = 0;
   9485     _flag_k = FK_NARROW(FK_TEST, 24);
   9486     ebx = POP32_VAL(esp); /* 0x390037A8: pop ebx */
   9487     esp = ebp; /* 0x390037A9: mov esp, ebp */
   9488     ebp = POP32_VAL(esp); /* 0x390037AB: pop ebp */
   9489     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x390037AC: ret 0xc */
   9490     RECOMP_REGS_OUT();
   9491 }
   9492 
   9493 void sub_390037B0(void) {
   9494     int _fpu_cmp = 0;
   9495     uint32_t _cf = 0;
   9496     int _df = 1;
   9497     uint32_t _flag_k = FK_NONE;
   9498     uint32_t _flag_a = 0, _flag_b = 0;
   9499     uint32_t _itail_tgt = 0;
   9500     RECOMP_REGS_LOCALS
   9501     RECOMP_ENTER(0x390037B0u);
   9502 
   9503 L_390037B0:
   9504     PUSH32(esp, ebp); /* 0x390037B0: push ebp */
   9505     ebp = esp; /* 0x390037B1: mov ebp, esp */
   9506     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   9507     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9508     esp = esp - 8; /* 0x390037B3: sub esp, 8 */
   9509     _flag_k = FK_CMP;
   9510     PUSH32(esp, ebx); /* 0x390037B6: push ebx */
   9511     PUSH32(esp, esi); /* 0x390037B7: push esi */
   9512     PUSH32(esp, edi); /* 0x390037B8: push edi */
   9513     edi = MEM32(ebp + 0x8); /* 0x390037B9: mov edi, dword ptr [ebp + 8] */
   9514     esi = ecx; /* 0x390037BC: mov esi, ecx */
   9515     eax = ebp + 0x8; /* 0x390037BE: lea eax, [ebp + 8] */
   9516     PUSH32(esp, edi); /* 0x390037C1: push edi */
   9517     PUSH32(esp, eax); /* 0x390037C2: push eax */
   9518     ecx = MEM32(esi + 0x30); /* 0x390037C3: mov ecx, dword ptr [esi + 0x30] */
   9519     RECOMP_ICALL(0x390049E0u); /* 0x390037C6: call 0x390049e0 */ /* not lifted */
   9520     RECOMP_FLAGS_IN();
   9521     ecx = MEM32(esi + 0x30); /* 0x390037CB: mov ecx, dword ptr [esi + 0x30] */
   9522     eax = MEM32(eax); /* 0x390037CE: mov eax, dword ptr [eax] */
   9523     ecx = MEM32(ecx + 0x4); /* 0x390037D0: mov ecx, dword ptr [ecx + 4] */
   9524     /* cmp ecx, eax */ /* 0x390037D3: cmp ecx, eax */
   9525     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   9526     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9527     _flag_k = FK_CMP;
   9528     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003818; /* 0x390037D5: je 0x39003818 */
   9529 L_390037D7:
   9530     eax = MEM32(edi + 0x4); /* 0x390037D7: mov eax, dword ptr [edi + 4] */
   9531     /* test eax, eax */ /* 0x390037DA: test eax, eax */
   9532     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9533     _cf = 0;
   9534     _flag_k = FK_TEST;
   9535     if (TEST_NZ(_flag_a, _flag_b)) goto L_390037E3; /* 0x390037DC: jne 0x390037e3 */
   9536 L_390037DE:
   9537     eax = MEM32(0x3900B02C); /* 0x390037DE: mov eax, dword ptr [0x3900b02c] */
   9538 L_390037E3:
   9539     PUSH32(esp, 0); /* 0x390037E3: push 0 */
   9540     PUSH32(esp, eax); /* 0x390037E5: push eax */
   9541     ecx = esi; /* 0x390037E6: mov ecx, esi */
   9542     RECOMP_ICALL(0x390021C0u); /* 0x390037E8: call 0x390021c0 */ /* not lifted */
   9543     RECOMP_FLAGS_IN();
   9544     edi = MEM32(edi + 0x4); /* 0x390037ED: mov edi, dword ptr [edi + 4] */
   9545     /* test edi, edi */ /* 0x390037F0: test edi, edi */
   9546     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   9547     _cf = 0;
   9548     _flag_k = FK_TEST;
   9549     if (TEST_NZ(_flag_a, _flag_b)) goto L_390037FA; /* 0x390037F2: jne 0x390037fa */
   9550 L_390037F4:
   9551     edi = MEM32(0x3900B02C); /* 0x390037F4: mov edi, dword ptr [0x3900b02c] */
   9552 L_390037FA:
   9553     edx = MEM32(ebp + 0xC); /* 0x390037FA: mov edx, dword ptr [ebp + 0xc] */
   9554     PUSH32(esp, eax); /* 0x390037FD: push eax */
   9555     PUSH32(esp, edi); /* 0x390037FE: push edi */
   9556     PUSH32(esp, 0x3900E248u); /* 0x390037FF: push 0x3900e248 */
   9557     PUSH32(esp, edx); /* 0x39003804: push edx */
   9558     RECOMP_ICALL(0x39004320u); /* 0x39003805: call 0x39004320 */ /* not lifted */
   9559     RECOMP_FLAGS_IN();
   9560     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   9561     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9562     esp = esp + 0x10u; /* 0x3900380A: add esp, 0x10 */
   9563     _flag_k = FK_ADD;
   9564     SET_LO8(eax, 1); /* 0x3900380D: mov al, 1 */
   9565     edi = POP32_VAL(esp); /* 0x3900380F: pop edi */
   9566     esi = POP32_VAL(esp); /* 0x39003810: pop esi */
   9567     ebx = POP32_VAL(esp); /* 0x39003811: pop ebx */
   9568     esp = ebp; /* 0x39003812: mov esp, ebp */
   9569     ebp = POP32_VAL(esp); /* 0x39003814: pop ebp */
   9570     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39003815: ret 8 */
   9571 L_39003818:
   9572     ecx = MEM32(esi + 0x34); /* 0x39003818: mov ecx, dword ptr [esi + 0x34] */
   9573     eax = ebp + 0x8; /* 0x3900381B: lea eax, [ebp + 8] */
   9574     PUSH32(esp, edi); /* 0x3900381E: push edi */
   9575     PUSH32(esp, eax); /* 0x3900381F: push eax */
   9576     RECOMP_ICALL(0x390049E0u); /* 0x39003820: call 0x390049e0 */ /* not lifted */
   9577     RECOMP_FLAGS_IN();
   9578     ecx = MEM32(esi + 0x34); /* 0x39003825: mov ecx, dword ptr [esi + 0x34] */
   9579     eax = MEM32(eax); /* 0x39003828: mov eax, dword ptr [eax] */
   9580     /* cmp MEM32(ecx + 0x4), eax */ /* 0x3900382A: cmp dword ptr [ecx + 4], eax */
   9581     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   9582     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9583     _flag_k = FK_CMP;
   9584     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003875; /* 0x3900382D: je 0x39003875 */
   9585 L_3900382F:
   9586     eax = MEM32(edi + 0x4); /* 0x3900382F: mov eax, dword ptr [edi + 4] */
   9587     /* test eax, eax */ /* 0x39003832: test eax, eax */
   9588     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9589     _cf = 0;
   9590     _flag_k = FK_TEST;
   9591     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900383B; /* 0x39003834: jne 0x3900383b */
   9592 L_39003836:
   9593     eax = MEM32(0x3900B02C); /* 0x39003836: mov eax, dword ptr [0x3900b02c] */
   9594 L_3900383B:
   9595     PUSH32(esp, 0); /* 0x3900383B: push 0 */
   9596     PUSH32(esp, eax); /* 0x3900383D: push eax */
   9597     ecx = esi; /* 0x3900383E: mov ecx, esi */
   9598     RECOMP_ICALL(0x39002300u); /* 0x39003840: call 0x39002300 */ /* not lifted */
   9599     RECOMP_FLAGS_IN();
   9600     edi = MEM32(edi + 0x4); /* 0x39003845: mov edi, dword ptr [edi + 4] */
   9601     /* test edi, edi */ /* 0x39003848: test edi, edi */
   9602     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   9603     _cf = 0;
   9604     _flag_k = FK_TEST;
   9605     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003852; /* 0x3900384A: jne 0x39003852 */
   9606 L_3900384C:
   9607     edi = MEM32(0x3900B02C); /* 0x3900384C: mov edi, dword ptr [0x3900b02c] */
   9608 L_39003852:
   9609     edx = MEM32(ebp + 0xC); /* 0x39003852: mov edx, dword ptr [ebp + 0xc] */
   9610     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   9611     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9612     esp = esp - 8; /* 0x39003855: sub esp, 8 */
   9613     _flag_k = FK_CMP;
   9614     { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x39003858: fstp qword ptr [esp] */
   9615     PUSH32(esp, edi); /* 0x3900385B: push edi */
   9616     PUSH32(esp, 0x3900E230u); /* 0x3900385C: push 0x3900e230 */
   9617     PUSH32(esp, edx); /* 0x39003861: push edx */
   9618     RECOMP_ICALL(0x39004320u); /* 0x39003862: call 0x39004320 */ /* not lifted */
   9619     RECOMP_FLAGS_IN();
   9620     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   9621     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9622     esp = esp + 0x14u; /* 0x39003867: add esp, 0x14 */
   9623     _flag_k = FK_ADD;
   9624     SET_LO8(eax, 1); /* 0x3900386A: mov al, 1 */
   9625     edi = POP32_VAL(esp); /* 0x3900386C: pop edi */
   9626     esi = POP32_VAL(esp); /* 0x3900386D: pop esi */
   9627     ebx = POP32_VAL(esp); /* 0x3900386E: pop ebx */
   9628     esp = ebp; /* 0x3900386F: mov esp, ebp */
   9629     ebp = POP32_VAL(esp); /* 0x39003871: pop ebp */
   9630     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39003872: ret 8 */
   9631 L_39003875:
   9632     ecx = MEM32(esi + 0x38); /* 0x39003875: mov ecx, dword ptr [esi + 0x38] */
   9633     eax = ebp + 0x8; /* 0x39003878: lea eax, [ebp + 8] */
   9634     PUSH32(esp, edi); /* 0x3900387B: push edi */
   9635     PUSH32(esp, eax); /* 0x3900387C: push eax */
   9636     RECOMP_ICALL(0x390049E0u); /* 0x3900387D: call 0x390049e0 */ /* not lifted */
   9637     RECOMP_FLAGS_IN();
   9638     ecx = MEM32(esi + 0x38); /* 0x39003882: mov ecx, dword ptr [esi + 0x38] */
   9639     eax = MEM32(eax); /* 0x39003885: mov eax, dword ptr [eax] */
   9640     /* cmp MEM32(ecx + 0x4), eax */ /* 0x39003887: cmp dword ptr [ecx + 4], eax */
   9641     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   9642     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9643     _flag_k = FK_CMP;
   9644     if (CMP_EQ(_flag_a, _flag_b)) goto L_390038CD; /* 0x3900388A: je 0x390038cd */
   9645 L_3900388C:
   9646     eax = MEM32(edi + 0x4); /* 0x3900388C: mov eax, dword ptr [edi + 4] */
   9647     /* test eax, eax */ /* 0x3900388F: test eax, eax */
   9648     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9649     _cf = 0;
   9650     _flag_k = FK_TEST;
   9651     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003898; /* 0x39003891: jne 0x39003898 */
   9652 L_39003893:
   9653     eax = MEM32(0x3900B02C); /* 0x39003893: mov eax, dword ptr [0x3900b02c] */
   9654 L_39003898:
   9655     PUSH32(esp, 0); /* 0x39003898: push 0 */
   9656     PUSH32(esp, eax); /* 0x3900389A: push eax */
   9657     ecx = esi; /* 0x3900389B: mov ecx, esi */
   9658     RECOMP_ICALL(0x39002440u); /* 0x3900389D: call 0x39002440 */ /* not lifted */
   9659     RECOMP_FLAGS_IN();
   9660     edi = MEM32(edi + 0x4); /* 0x390038A2: mov edi, dword ptr [edi + 4] */
   9661     /* test edi, edi */ /* 0x390038A5: test edi, edi */
   9662     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   9663     _cf = 0;
   9664     _flag_k = FK_TEST;
   9665     if (TEST_NZ(_flag_a, _flag_b)) goto L_390038AF; /* 0x390038A7: jne 0x390038af */
   9666 L_390038A9:
   9667     edi = MEM32(0x3900B02C); /* 0x390038A9: mov edi, dword ptr [0x3900b02c] */
   9668 L_390038AF:
   9669     edx = MEM32(ebp + 0xC); /* 0x390038AF: mov edx, dword ptr [ebp + 0xc] */
   9670     PUSH32(esp, eax); /* 0x390038B2: push eax */
   9671     PUSH32(esp, edi); /* 0x390038B3: push edi */
   9672     PUSH32(esp, 0x3900E218u); /* 0x390038B4: push 0x3900e218 */
   9673     PUSH32(esp, edx); /* 0x390038B9: push edx */
   9674     RECOMP_ICALL(0x39004320u); /* 0x390038BA: call 0x39004320 */ /* not lifted */
   9675     RECOMP_FLAGS_IN();
   9676     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   9677     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9678     esp = esp + 0x10u; /* 0x390038BF: add esp, 0x10 */
   9679     _flag_k = FK_ADD;
   9680     SET_LO8(eax, 1); /* 0x390038C2: mov al, 1 */
   9681     edi = POP32_VAL(esp); /* 0x390038C4: pop edi */
   9682     esi = POP32_VAL(esp); /* 0x390038C5: pop esi */
   9683     ebx = POP32_VAL(esp); /* 0x390038C6: pop ebx */
   9684     esp = ebp; /* 0x390038C7: mov esp, ebp */
   9685     ebp = POP32_VAL(esp); /* 0x390038C9: pop ebp */
   9686     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x390038CA: ret 8 */
   9687 L_390038CD:
   9688     ecx = MEM32(esi + 0x3C); /* 0x390038CD: mov ecx, dword ptr [esi + 0x3c] */
   9689     eax = ebp + 0x8; /* 0x390038D0: lea eax, [ebp + 8] */
   9690     PUSH32(esp, edi); /* 0x390038D3: push edi */
   9691     PUSH32(esp, eax); /* 0x390038D4: push eax */
   9692     RECOMP_ICALL(0x390049E0u); /* 0x390038D5: call 0x390049e0 */ /* not lifted */
   9693     RECOMP_FLAGS_IN();
   9694     ecx = MEM32(esi + 0x3C); /* 0x390038DA: mov ecx, dword ptr [esi + 0x3c] */
   9695     eax = MEM32(eax); /* 0x390038DD: mov eax, dword ptr [eax] */
   9696     /* cmp MEM32(ecx + 0x4), eax */ /* 0x390038DF: cmp dword ptr [ecx + 4], eax */
   9697     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   9698     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9699     _flag_k = FK_CMP;
   9700     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003925; /* 0x390038E2: je 0x39003925 */
   9701 L_390038E4:
   9702     eax = MEM32(edi + 0x4); /* 0x390038E4: mov eax, dword ptr [edi + 4] */
   9703     /* test eax, eax */ /* 0x390038E7: test eax, eax */
   9704     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9705     _cf = 0;
   9706     _flag_k = FK_TEST;
   9707     if (TEST_NZ(_flag_a, _flag_b)) goto L_390038F0; /* 0x390038E9: jne 0x390038f0 */
   9708 L_390038EB:
   9709     eax = MEM32(0x3900B02C); /* 0x390038EB: mov eax, dword ptr [0x3900b02c] */
   9710 L_390038F0:
   9711     PUSH32(esp, 1); /* 0x390038F0: push 1 */
   9712     PUSH32(esp, eax); /* 0x390038F2: push eax */
   9713     ecx = esi; /* 0x390038F3: mov ecx, esi */
   9714     RECOMP_ICALL(0x390021C0u); /* 0x390038F5: call 0x390021c0 */ /* not lifted */
   9715     RECOMP_FLAGS_IN();
   9716     edi = MEM32(edi + 0x4); /* 0x390038FA: mov edi, dword ptr [edi + 4] */
   9717     /* test edi, edi */ /* 0x390038FD: test edi, edi */
   9718     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   9719     _cf = 0;
   9720     _flag_k = FK_TEST;
   9721     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003907; /* 0x390038FF: jne 0x39003907 */
   9722 L_39003901:
   9723     edi = MEM32(0x3900B02C); /* 0x39003901: mov edi, dword ptr [0x3900b02c] */
   9724 L_39003907:
   9725     edx = MEM32(ebp + 0xC); /* 0x39003907: mov edx, dword ptr [ebp + 0xc] */
   9726     PUSH32(esp, eax); /* 0x3900390A: push eax */
   9727     PUSH32(esp, edi); /* 0x3900390B: push edi */
   9728     PUSH32(esp, 0x3900E200u); /* 0x3900390C: push 0x3900e200 */
   9729     PUSH32(esp, edx); /* 0x39003911: push edx */
   9730     RECOMP_ICALL(0x39004320u); /* 0x39003912: call 0x39004320 */ /* not lifted */
   9731     RECOMP_FLAGS_IN();
   9732     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   9733     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9734     esp = esp + 0x10u; /* 0x39003917: add esp, 0x10 */
   9735     _flag_k = FK_ADD;
   9736     SET_LO8(eax, 1); /* 0x3900391A: mov al, 1 */
   9737     edi = POP32_VAL(esp); /* 0x3900391C: pop edi */
   9738     esi = POP32_VAL(esp); /* 0x3900391D: pop esi */
   9739     ebx = POP32_VAL(esp); /* 0x3900391E: pop ebx */
   9740     esp = ebp; /* 0x3900391F: mov esp, ebp */
   9741     ebp = POP32_VAL(esp); /* 0x39003921: pop ebp */
   9742     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39003922: ret 8 */
   9743 L_39003925:
   9744     ecx = MEM32(esi + 0x40); /* 0x39003925: mov ecx, dword ptr [esi + 0x40] */
   9745     eax = ebp + 0x8; /* 0x39003928: lea eax, [ebp + 8] */
   9746     PUSH32(esp, edi); /* 0x3900392B: push edi */
   9747     PUSH32(esp, eax); /* 0x3900392C: push eax */
   9748     RECOMP_ICALL(0x390049E0u); /* 0x3900392D: call 0x390049e0 */ /* not lifted */
   9749     RECOMP_FLAGS_IN();
   9750     ecx = MEM32(esi + 0x40); /* 0x39003932: mov ecx, dword ptr [esi + 0x40] */
   9751     eax = MEM32(eax); /* 0x39003935: mov eax, dword ptr [eax] */
   9752     /* cmp MEM32(ecx + 0x4), eax */ /* 0x39003937: cmp dword ptr [ecx + 4], eax */
   9753     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   9754     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9755     _flag_k = FK_CMP;
   9756     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003982; /* 0x3900393A: je 0x39003982 */
   9757 L_3900393C:
   9758     eax = MEM32(edi + 0x4); /* 0x3900393C: mov eax, dword ptr [edi + 4] */
   9759     /* test eax, eax */ /* 0x3900393F: test eax, eax */
   9760     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9761     _cf = 0;
   9762     _flag_k = FK_TEST;
   9763     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003948; /* 0x39003941: jne 0x39003948 */
   9764 L_39003943:
   9765     eax = MEM32(0x3900B02C); /* 0x39003943: mov eax, dword ptr [0x3900b02c] */
   9766 L_39003948:
   9767     PUSH32(esp, 1); /* 0x39003948: push 1 */
   9768     PUSH32(esp, eax); /* 0x3900394A: push eax */
   9769     ecx = esi; /* 0x3900394B: mov ecx, esi */
   9770     RECOMP_ICALL(0x39002300u); /* 0x3900394D: call 0x39002300 */ /* not lifted */
   9771     RECOMP_FLAGS_IN();
   9772     edi = MEM32(edi + 0x4); /* 0x39003952: mov edi, dword ptr [edi + 4] */
   9773     /* test edi, edi */ /* 0x39003955: test edi, edi */
   9774     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   9775     _cf = 0;
   9776     _flag_k = FK_TEST;
   9777     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900395F; /* 0x39003957: jne 0x3900395f */
   9778 L_39003959:
   9779     edi = MEM32(0x3900B02C); /* 0x39003959: mov edi, dword ptr [0x3900b02c] */
   9780 L_3900395F:
   9781     edx = MEM32(ebp + 0xC); /* 0x3900395F: mov edx, dword ptr [ebp + 0xc] */
   9782     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   9783     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9784     esp = esp - 8; /* 0x39003962: sub esp, 8 */
   9785     _flag_k = FK_CMP;
   9786     { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x39003965: fstp qword ptr [esp] */
   9787     PUSH32(esp, edi); /* 0x39003968: push edi */
   9788     PUSH32(esp, 0x3900E1E8u); /* 0x39003969: push 0x3900e1e8 */
   9789     PUSH32(esp, edx); /* 0x3900396E: push edx */
   9790     RECOMP_ICALL(0x39004320u); /* 0x3900396F: call 0x39004320 */ /* not lifted */
   9791     RECOMP_FLAGS_IN();
   9792     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
   9793     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9794     esp = esp + 0x14u; /* 0x39003974: add esp, 0x14 */
   9795     _flag_k = FK_ADD;
   9796     SET_LO8(eax, 1); /* 0x39003977: mov al, 1 */
   9797     edi = POP32_VAL(esp); /* 0x39003979: pop edi */
   9798     esi = POP32_VAL(esp); /* 0x3900397A: pop esi */
   9799     ebx = POP32_VAL(esp); /* 0x3900397B: pop ebx */
   9800     esp = ebp; /* 0x3900397C: mov esp, ebp */
   9801     ebp = POP32_VAL(esp); /* 0x3900397E: pop ebp */
   9802     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900397F: ret 8 */
   9803 L_39003982:
   9804     ecx = MEM32(esi + 0x44); /* 0x39003982: mov ecx, dword ptr [esi + 0x44] */
   9805     eax = ebp + 0x8; /* 0x39003985: lea eax, [ebp + 8] */
   9806     PUSH32(esp, edi); /* 0x39003988: push edi */
   9807     PUSH32(esp, eax); /* 0x39003989: push eax */
   9808     RECOMP_ICALL(0x390049E0u); /* 0x3900398A: call 0x390049e0 */ /* not lifted */
   9809     RECOMP_FLAGS_IN();
   9810     ecx = MEM32(esi + 0x44); /* 0x3900398F: mov ecx, dword ptr [esi + 0x44] */
   9811     eax = MEM32(eax); /* 0x39003992: mov eax, dword ptr [eax] */
   9812     /* cmp MEM32(ecx + 0x4), eax */ /* 0x39003994: cmp dword ptr [ecx + 4], eax */
   9813     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   9814     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9815     _flag_k = FK_CMP;
   9816     if (CMP_EQ(_flag_a, _flag_b)) goto L_390039DA; /* 0x39003997: je 0x390039da */
   9817 L_39003999:
   9818     eax = MEM32(edi + 0x4); /* 0x39003999: mov eax, dword ptr [edi + 4] */
   9819     /* test eax, eax */ /* 0x3900399C: test eax, eax */
   9820     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9821     _cf = 0;
   9822     _flag_k = FK_TEST;
   9823     if (TEST_NZ(_flag_a, _flag_b)) goto L_390039A5; /* 0x3900399E: jne 0x390039a5 */
   9824 L_390039A0:
   9825     eax = MEM32(0x3900B02C); /* 0x390039A0: mov eax, dword ptr [0x3900b02c] */
   9826 L_390039A5:
   9827     PUSH32(esp, 1); /* 0x390039A5: push 1 */
   9828     PUSH32(esp, eax); /* 0x390039A7: push eax */
   9829     ecx = esi; /* 0x390039A8: mov ecx, esi */
   9830     RECOMP_ICALL(0x39002440u); /* 0x390039AA: call 0x39002440 */ /* not lifted */
   9831     RECOMP_FLAGS_IN();
   9832     edi = MEM32(edi + 0x4); /* 0x390039AF: mov edi, dword ptr [edi + 4] */
   9833     /* test edi, edi */ /* 0x390039B2: test edi, edi */
   9834     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   9835     _cf = 0;
   9836     _flag_k = FK_TEST;
   9837     if (TEST_NZ(_flag_a, _flag_b)) goto L_390039BC; /* 0x390039B4: jne 0x390039bc */
   9838 L_390039B6:
   9839     edi = MEM32(0x3900B02C); /* 0x390039B6: mov edi, dword ptr [0x3900b02c] */
   9840 L_390039BC:
   9841     edx = MEM32(ebp + 0xC); /* 0x390039BC: mov edx, dword ptr [ebp + 0xc] */
   9842     PUSH32(esp, eax); /* 0x390039BF: push eax */
   9843     PUSH32(esp, edi); /* 0x390039C0: push edi */
   9844     PUSH32(esp, 0x3900E1D0u); /* 0x390039C1: push 0x3900e1d0 */
   9845     PUSH32(esp, edx); /* 0x390039C6: push edx */
   9846     RECOMP_ICALL(0x39004320u); /* 0x390039C7: call 0x39004320 */ /* not lifted */
   9847     RECOMP_FLAGS_IN();
   9848     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   9849     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9850     esp = esp + 0x10u; /* 0x390039CC: add esp, 0x10 */
   9851     _flag_k = FK_ADD;
   9852     SET_LO8(eax, 1); /* 0x390039CF: mov al, 1 */
   9853     edi = POP32_VAL(esp); /* 0x390039D1: pop edi */
   9854     esi = POP32_VAL(esp); /* 0x390039D2: pop esi */
   9855     ebx = POP32_VAL(esp); /* 0x390039D3: pop ebx */
   9856     esp = ebp; /* 0x390039D4: mov esp, ebp */
   9857     ebp = POP32_VAL(esp); /* 0x390039D6: pop ebp */
   9858     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x390039D7: ret 8 */
   9859 L_390039DA:
   9860     ecx = MEM32(esi + 0x48); /* 0x390039DA: mov ecx, dword ptr [esi + 0x48] */
   9861     eax = ebp + 0x8; /* 0x390039DD: lea eax, [ebp + 8] */
   9862     PUSH32(esp, edi); /* 0x390039E0: push edi */
   9863     PUSH32(esp, eax); /* 0x390039E1: push eax */
   9864     RECOMP_ICALL(0x390049E0u); /* 0x390039E2: call 0x390049e0 */ /* not lifted */
   9865     RECOMP_FLAGS_IN();
   9866     ecx = MEM32(esi + 0x48); /* 0x390039E7: mov ecx, dword ptr [esi + 0x48] */
   9867     eax = MEM32(eax); /* 0x390039EA: mov eax, dword ptr [eax] */
   9868     /* cmp MEM32(ecx + 0x4), eax */ /* 0x390039EC: cmp dword ptr [ecx + 4], eax */
   9869     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(eax);
   9870     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9871     _flag_k = FK_CMP;
   9872     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003A32; /* 0x390039EF: je 0x39003a32 */
   9873 L_390039F1:
   9874     eax = MEM32(edi + 0x4); /* 0x390039F1: mov eax, dword ptr [edi + 4] */
   9875     /* test eax, eax */ /* 0x390039F4: test eax, eax */
   9876     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9877     _cf = 0;
   9878     _flag_k = FK_TEST;
   9879     if (TEST_NZ(_flag_a, _flag_b)) goto L_390039FD; /* 0x390039F6: jne 0x390039fd */
   9880 L_390039F8:
   9881     eax = MEM32(0x3900B02C); /* 0x390039F8: mov eax, dword ptr [0x3900b02c] */
   9882 L_390039FD:
   9883     PUSH32(esp, 2); /* 0x390039FD: push 2 */
   9884     PUSH32(esp, eax); /* 0x390039FF: push eax */
   9885     ecx = esi; /* 0x39003A00: mov ecx, esi */
   9886     RECOMP_ICALL(0x390021C0u); /* 0x39003A02: call 0x390021c0 */ /* not lifted */
   9887     RECOMP_FLAGS_IN();
   9888     edi = MEM32(edi + 0x4); /* 0x39003A07: mov edi, dword ptr [edi + 4] */
   9889     /* test edi, edi */ /* 0x39003A0A: test edi, edi */
   9890     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   9891     _cf = 0;
   9892     _flag_k = FK_TEST;
   9893     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003A14; /* 0x39003A0C: jne 0x39003a14 */
   9894 L_39003A0E:
   9895     edi = MEM32(0x3900B02C); /* 0x39003A0E: mov edi, dword ptr [0x3900b02c] */
   9896 L_39003A14:
   9897     edx = MEM32(ebp + 0xC); /* 0x39003A14: mov edx, dword ptr [ebp + 0xc] */
   9898     PUSH32(esp, eax); /* 0x39003A17: push eax */
   9899     PUSH32(esp, edi); /* 0x39003A18: push edi */
   9900     PUSH32(esp, 0x3900E1B8u); /* 0x39003A19: push 0x3900e1b8 */
   9901     PUSH32(esp, edx); /* 0x39003A1E: push edx */
   9902     RECOMP_ICALL(0x39004320u); /* 0x39003A1F: call 0x39004320 */ /* not lifted */
   9903     RECOMP_FLAGS_IN();
   9904     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   9905     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9906     esp = esp + 0x10u; /* 0x39003A24: add esp, 0x10 */
   9907     _flag_k = FK_ADD;
   9908     SET_LO8(eax, 1); /* 0x39003A27: mov al, 1 */
   9909     edi = POP32_VAL(esp); /* 0x39003A29: pop edi */
   9910     esi = POP32_VAL(esp); /* 0x39003A2A: pop esi */
   9911     ebx = POP32_VAL(esp); /* 0x39003A2B: pop ebx */
   9912     esp = ebp; /* 0x39003A2C: mov esp, ebp */
   9913     ebp = POP32_VAL(esp); /* 0x39003A2E: pop ebp */
   9914     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39003A2F: ret 8 */
   9915 L_39003A32:
   9916     ebx = MEM32(esi + 0x4C); /* 0x39003A32: mov ebx, dword ptr [esi + 0x4c] */
   9917     eax = ebp + (-0x8); /* 0x39003A35: lea eax, [ebp - 8] */
   9918     PUSH32(esp, edi); /* 0x39003A38: push edi */
   9919     PUSH32(esp, eax); /* 0x39003A39: push eax */
   9920     ecx = ebx; /* 0x39003A3A: mov ecx, ebx */
   9921     RECOMP_ICALL(0x390061B0u); /* 0x39003A3C: call 0x390061b0 */ /* not lifted */
   9922     RECOMP_FLAGS_IN();
   9923     eax = MEM32(eax); /* 0x39003A41: mov eax, dword ptr [eax] */
   9924     ecx = MEM32(ebx + 0x4); /* 0x39003A43: mov ecx, dword ptr [ebx + 4] */
   9925     /* cmp eax, ecx */ /* 0x39003A46: cmp eax, ecx */
   9926     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   9927     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9928     _flag_k = FK_CMP;
   9929     MEM32(ebp + 0x8) = eax; /* 0x39003A48: mov dword ptr [ebp + 8], eax */
   9930     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003A64; /* 0x39003A4B: je 0x39003a64 */
   9931 L_39003A4D:
   9932     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu);
   9933     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9934     eax = eax + 0xCu; /* 0x39003A4D: add eax, 0xc */
   9935     _flag_k = FK_ADD;
   9936     PUSH32(esp, eax); /* 0x39003A50: push eax */
   9937     PUSH32(esp, edi); /* 0x39003A51: push edi */
   9938     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x39003A52: call dword ptr [0x3900b030] */
   9939     RECOMP_FLAGS_IN();
   9940     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   9941     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9942     esp = esp + 8; /* 0x39003A58: add esp, 8 */
   9943     _flag_k = FK_ADD;
   9944     /* test LO8(eax), LO8(eax) */ /* 0x39003A5B: test al, al */
   9945     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
   9946     _cf = 0;
   9947     _flag_k = FK_NARROW(FK_TEST, 24);
   9948     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003A64; /* 0x39003A5D: jne 0x39003a64 */
   9949 L_39003A5F:
   9950     eax = ebp + 0x8; /* 0x39003A5F: lea eax, [ebp + 8] */
   9951     goto L_39003A6D; /* 0x39003A62: jmp 0x39003a6d */
   9952 L_39003A64:
   9953     ecx = MEM32(ebx + 0x4); /* 0x39003A64: mov ecx, dword ptr [ebx + 4] */
   9954     eax = ebp + (-0x4); /* 0x39003A67: lea eax, [ebp - 4] */
   9955     MEM32(ebp + (-0x4)) = ecx; /* 0x39003A6A: mov dword ptr [ebp - 4], ecx */
   9956 L_39003A6D:
   9957     edx = MEM32(esi + 0x4C); /* 0x39003A6D: mov edx, dword ptr [esi + 0x4c] */
   9958     eax = MEM32(eax); /* 0x39003A70: mov eax, dword ptr [eax] */
   9959     /* cmp MEM32(edx + 0x4), eax */ /* 0x39003A72: cmp dword ptr [edx + 4], eax */
   9960     _flag_a = (uint32_t)(MEM32(edx + 0x4)); _flag_b = (uint32_t)(eax);
   9961     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9962     _flag_k = FK_CMP;
   9963     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003ABD; /* 0x39003A75: je 0x39003abd */
   9964 L_39003A77:
   9965     eax = MEM32(edi + 0x4); /* 0x39003A77: mov eax, dword ptr [edi + 4] */
   9966     /* test eax, eax */ /* 0x39003A7A: test eax, eax */
   9967     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   9968     _cf = 0;
   9969     _flag_k = FK_TEST;
   9970     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003A83; /* 0x39003A7C: jne 0x39003a83 */
   9971 L_39003A7E:
   9972     eax = MEM32(0x3900B02C); /* 0x39003A7E: mov eax, dword ptr [0x3900b02c] */
   9973 L_39003A83:
   9974     PUSH32(esp, 2); /* 0x39003A83: push 2 */
   9975     PUSH32(esp, eax); /* 0x39003A85: push eax */
   9976     ecx = esi; /* 0x39003A86: mov ecx, esi */
   9977     RECOMP_ICALL(0x39002300u); /* 0x39003A88: call 0x39002300 */ /* not lifted */
   9978     RECOMP_FLAGS_IN();
   9979     edi = MEM32(edi + 0x4); /* 0x39003A8D: mov edi, dword ptr [edi + 4] */
   9980     /* test edi, edi */ /* 0x39003A90: test edi, edi */
   9981     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   9982     _cf = 0;
   9983     _flag_k = FK_TEST;
   9984     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003A9A; /* 0x39003A92: jne 0x39003a9a */
   9985 L_39003A94:
   9986     edi = MEM32(0x3900B02C); /* 0x39003A94: mov edi, dword ptr [0x3900b02c] */
   9987 L_39003A9A:
   9988     eax = MEM32(ebp + 0xC); /* 0x39003A9A: mov eax, dword ptr [ebp + 0xc] */
   9989     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   9990     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9991     esp = esp - 8; /* 0x39003A9D: sub esp, 8 */
   9992     _flag_k = FK_CMP;
   9993     { double _v = fp_pop(); *(double*)ADDR(esp) = _v; } /* 0x39003AA0: fstp qword ptr [esp] */
   9994     PUSH32(esp, edi); /* 0x39003AA3: push edi */
   9995     PUSH32(esp, 0x3900E1A0u); /* 0x39003AA4: push 0x3900e1a0 */
   9996     PUSH32(esp, eax); /* 0x39003AA9: push eax */
   9997     RECOMP_ICALL(0x39004320u); /* 0x39003AAA: call 0x39004320 */ /* not lifted */
   9998     RECOMP_FLAGS_IN();
   9999     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x14u);
  10000     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10001     esp = esp + 0x14u; /* 0x39003AAF: add esp, 0x14 */
  10002     _flag_k = FK_ADD;
  10003     SET_LO8(eax, 1); /* 0x39003AB2: mov al, 1 */
  10004     edi = POP32_VAL(esp); /* 0x39003AB4: pop edi */
  10005     esi = POP32_VAL(esp); /* 0x39003AB5: pop esi */
  10006     ebx = POP32_VAL(esp); /* 0x39003AB6: pop ebx */
  10007     esp = ebp; /* 0x39003AB7: mov esp, ebp */
  10008     ebp = POP32_VAL(esp); /* 0x39003AB9: pop ebp */
  10009     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39003ABA: ret 8 */
  10010 L_39003ABD:
  10011     ebx = MEM32(esi + 0x50); /* 0x39003ABD: mov ebx, dword ptr [esi + 0x50] */
  10012     PUSH32(esp, edi); /* 0x39003AC0: push edi */
  10013     ecx = ebx; /* 0x39003AC1: mov ecx, ebx */
  10014     RECOMP_ICALL(0x39007110u); /* 0x39003AC3: call 0x39007110 */ /* not lifted */
  10015     RECOMP_FLAGS_IN();
  10016     ecx = MEM32(ebx + 0x4); /* 0x39003AC8: mov ecx, dword ptr [ebx + 4] */
  10017     MEM32(ebp + 0x8) = eax; /* 0x39003ACB: mov dword ptr [ebp + 8], eax */
  10018     /* cmp eax, ecx */ /* 0x39003ACE: cmp eax, ecx */
  10019     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  10020     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10021     _flag_k = FK_CMP;
  10022     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003AE9; /* 0x39003AD0: je 0x39003ae9 */
  10023 L_39003AD2:
  10024     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu);
  10025     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10026     eax = eax + 0xCu; /* 0x39003AD2: add eax, 0xc */
  10027     _flag_k = FK_ADD;
  10028     PUSH32(esp, eax); /* 0x39003AD5: push eax */
  10029     PUSH32(esp, edi); /* 0x39003AD6: push edi */
  10030     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x39003AD7: call dword ptr [0x3900b030] */
  10031     RECOMP_FLAGS_IN();
  10032     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  10033     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10034     esp = esp + 8; /* 0x39003ADD: add esp, 8 */
  10035     _flag_k = FK_ADD;
  10036     /* test LO8(eax), LO8(eax) */ /* 0x39003AE0: test al, al */
  10037     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  10038     _cf = 0;
  10039     _flag_k = FK_NARROW(FK_TEST, 24);
  10040     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003AE9; /* 0x39003AE2: jne 0x39003ae9 */
  10041 L_39003AE4:
  10042     eax = ebp + 0x8; /* 0x39003AE4: lea eax, [ebp + 8] */
  10043     goto L_39003AF2; /* 0x39003AE7: jmp 0x39003af2 */
  10044 L_39003AE9:
  10045     ecx = MEM32(ebx + 0x4); /* 0x39003AE9: mov ecx, dword ptr [ebx + 4] */
  10046     eax = ebp + (-0x4); /* 0x39003AEC: lea eax, [ebp - 4] */
  10047     MEM32(ebp + (-0x4)) = ecx; /* 0x39003AEF: mov dword ptr [ebp - 4], ecx */
  10048 L_39003AF2:
  10049     edx = MEM32(esi + 0x50); /* 0x39003AF2: mov edx, dword ptr [esi + 0x50] */
  10050     eax = MEM32(eax); /* 0x39003AF5: mov eax, dword ptr [eax] */
  10051     /* cmp MEM32(edx + 0x4), eax */ /* 0x39003AF7: cmp dword ptr [edx + 4], eax */
  10052     _flag_a = (uint32_t)(MEM32(edx + 0x4)); _flag_b = (uint32_t)(eax);
  10053     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10054     _flag_k = FK_CMP;
  10055     if (CMP_EQ(_flag_a, _flag_b)) goto L_39003B3D; /* 0x39003AFA: je 0x39003b3d */
  10056 L_39003AFC:
  10057     eax = MEM32(edi + 0x4); /* 0x39003AFC: mov eax, dword ptr [edi + 4] */
  10058     /* test eax, eax */ /* 0x39003AFF: test eax, eax */
  10059     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  10060     _cf = 0;
  10061     _flag_k = FK_TEST;
  10062     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003B08; /* 0x39003B01: jne 0x39003b08 */
  10063 L_39003B03:
  10064     eax = MEM32(0x3900B02C); /* 0x39003B03: mov eax, dword ptr [0x3900b02c] */
  10065 L_39003B08:
  10066     PUSH32(esp, 2); /* 0x39003B08: push 2 */
  10067     PUSH32(esp, eax); /* 0x39003B0A: push eax */
  10068     ecx = esi; /* 0x39003B0B: mov ecx, esi */
  10069     RECOMP_ICALL(0x39002440u); /* 0x39003B0D: call 0x39002440 */ /* not lifted */
  10070     RECOMP_FLAGS_IN();
  10071     edi = MEM32(edi + 0x4); /* 0x39003B12: mov edi, dword ptr [edi + 4] */
  10072     /* test edi, edi */ /* 0x39003B15: test edi, edi */
  10073     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
  10074     _cf = 0;
  10075     _flag_k = FK_TEST;
  10076     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003B1F; /* 0x39003B17: jne 0x39003b1f */
  10077 L_39003B19:
  10078     edi = MEM32(0x3900B02C); /* 0x39003B19: mov edi, dword ptr [0x3900b02c] */
  10079 L_39003B1F:
  10080     PUSH32(esp, eax); /* 0x39003B1F: push eax */
  10081     eax = MEM32(ebp + 0xC); /* 0x39003B20: mov eax, dword ptr [ebp + 0xc] */
  10082     PUSH32(esp, edi); /* 0x39003B23: push edi */
  10083     PUSH32(esp, 0x3900E188u); /* 0x39003B24: push 0x3900e188 */
  10084     PUSH32(esp, eax); /* 0x39003B29: push eax */
  10085     RECOMP_ICALL(0x39004320u); /* 0x39003B2A: call 0x39004320 */ /* not lifted */
  10086     RECOMP_FLAGS_IN();
  10087     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
  10088     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10089     esp = esp + 0x10u; /* 0x39003B2F: add esp, 0x10 */
  10090     _flag_k = FK_ADD;
  10091     SET_LO8(eax, 1); /* 0x39003B32: mov al, 1 */
  10092     edi = POP32_VAL(esp); /* 0x39003B34: pop edi */
  10093     esi = POP32_VAL(esp); /* 0x39003B35: pop esi */
  10094     ebx = POP32_VAL(esp); /* 0x39003B36: pop ebx */
  10095     esp = ebp; /* 0x39003B37: mov esp, ebp */
  10096     ebp = POP32_VAL(esp); /* 0x39003B39: pop ebp */
  10097     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39003B3A: ret 8 */
  10098 L_39003B3D:
  10099     edi = POP32_VAL(esp); /* 0x39003B3D: pop edi */
  10100     esi = POP32_VAL(esp); /* 0x39003B3E: pop esi */
  10101     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
  10102     SET_LO8(eax, 0); /* 0x39003B3F: xor al, al */
  10103     _cf = 0;
  10104     _flag_k = FK_NARROW(FK_TEST, 24);
  10105     ebx = POP32_VAL(esp); /* 0x39003B41: pop ebx */
  10106     esp = ebp; /* 0x39003B42: mov esp, ebp */
  10107     ebp = POP32_VAL(esp); /* 0x39003B44: pop ebp */
  10108     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39003B45: ret 8 */
  10109     RECOMP_REGS_OUT();
  10110 }
  10111 
  10112 void sub_39003B50(void) {
  10113     int _fpu_cmp = 0;
  10114     uint32_t _cf = 0;
  10115     int _df = 1;
  10116     uint32_t _flag_k = FK_NONE;
  10117     uint32_t _flag_a = 0, _flag_b = 0;
  10118     uint32_t _itail_tgt = 0;
  10119     RECOMP_REGS_LOCALS
  10120     RECOMP_ENTER(0x39003B50u);
  10121 
  10122 L_39003B50:
  10123     PUSH32(esp, ebp); /* 0x39003B50: push ebp */
  10124     ebp = esp; /* 0x39003B51: mov ebp, esp */
  10125     eax = MEM32(ebp + 0x8); /* 0x39003B53: mov eax, dword ptr [ebp + 8] */
  10126     PUSH32(esp, esi); /* 0x39003B56: push esi */
  10127     /* test eax, eax */ /* 0x39003B57: test eax, eax */
  10128     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  10129     _cf = 0;
  10130     _flag_k = FK_TEST;
  10131     esi = ecx; /* 0x39003B59: mov esi, ecx */
  10132     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003D16; /* 0x39003B5B: jne 0x39003d16 */
  10133 L_39003B61:
  10134     PUSH32(esp, 0); /* 0x39003B61: push 0 */
  10135     PUSH32(esp, 1); /* 0x39003B63: push 1 */
  10136     PUSH32(esp, 0); /* 0x39003B65: push 0 */
  10137     PUSH32(esp, 1); /* 0x39003B67: push 1 */
  10138     PUSH32(esp, 0x3900E414u); /* 0x39003B69: push 0x3900e414 */
  10139     RECOMP_ICALL(0x39002570u); /* 0x39003B6E: call 0x39002570 */ /* not lifted */
  10140     RECOMP_FLAGS_IN();
  10141     PUSH32(esp, 0); /* 0x39003B73: push 0 */
  10142     PUSH32(esp, 1); /* 0x39003B75: push 1 */
  10143     PUSH32(esp, 0); /* 0x39003B77: push 0 */
  10144     PUSH32(esp, 1); /* 0x39003B79: push 1 */
  10145     PUSH32(esp, 0x3900E40Cu); /* 0x39003B7B: push 0x3900e40c */
  10146     ecx = esi; /* 0x39003B80: mov ecx, esi */
  10147     RECOMP_ICALL(0x39002570u); /* 0x39003B82: call 0x39002570 */ /* not lifted */
  10148     RECOMP_FLAGS_IN();
  10149     PUSH32(esp, 0); /* 0x39003B87: push 0 */
  10150     PUSH32(esp, 0x00011170u); /* 0x39003B89: push 0x11170 */
  10151     PUSH32(esp, 0); /* 0x39003B8E: push 0 */
  10152     PUSH32(esp, 0x1D4Cu); /* 0x39003B90: push 0x1d4c */
  10153     PUSH32(esp, 0x3900E400u); /* 0x39003B95: push 0x3900e400 */
  10154     ecx = esi; /* 0x39003B9A: mov ecx, esi */
  10155     RECOMP_ICALL(0x39002570u); /* 0x39003B9C: call 0x39002570 */ /* not lifted */
  10156     RECOMP_FLAGS_IN();
  10157     PUSH32(esp, 0); /* 0x39003BA1: push 0 */
  10158     PUSH32(esp, 0x00011170u); /* 0x39003BA3: push 0x11170 */
  10159     PUSH32(esp, 0x280u); /* 0x39003BA8: push 0x280 */
  10160     PUSH32(esp, 0x280u); /* 0x39003BAD: push 0x280 */
  10161     PUSH32(esp, 0x3900E3F0u); /* 0x39003BB2: push 0x3900e3f0 */
  10162     ecx = esi; /* 0x39003BB7: mov ecx, esi */
  10163     RECOMP_ICALL(0x39002570u); /* 0x39003BB9: call 0x39002570 */ /* not lifted */
  10164     RECOMP_FLAGS_IN();
  10165     PUSH32(esp, 0); /* 0x39003BBE: push 0 */
  10166     PUSH32(esp, 0x00011170u); /* 0x39003BC0: push 0x11170 */
  10167     PUSH32(esp, 0x1E0u); /* 0x39003BC5: push 0x1e0 */
  10168     PUSH32(esp, 0x1E0u); /* 0x39003BCA: push 0x1e0 */
  10169     PUSH32(esp, 0x3900E3E0u); /* 0x39003BCF: push 0x3900e3e0 */
  10170     ecx = esi; /* 0x39003BD4: mov ecx, esi */
  10171     RECOMP_ICALL(0x39002570u); /* 0x39003BD6: call 0x39002570 */ /* not lifted */
  10172     RECOMP_FLAGS_IN();
  10173     PUSH32(esp, 0); /* 0x39003BDB: push 0 */
  10174     PUSH32(esp, 0x00011170u); /* 0x39003BDD: push 0x11170 */
  10175     PUSH32(esp, 0x10u); /* 0x39003BE2: push 0x10 */
  10176     PUSH32(esp, 0x10u); /* 0x39003BE4: push 0x10 */
  10177     PUSH32(esp, 0x3900E3CCu); /* 0x39003BE6: push 0x3900e3cc */
  10178     ecx = esi; /* 0x39003BEB: mov ecx, esi */
  10179     RECOMP_ICALL(0x39002570u); /* 0x39003BED: call 0x39002570 */ /* not lifted */
  10180     RECOMP_FLAGS_IN();
  10181     PUSH32(esp, 0); /* 0x39003BF2: push 0 */
  10182     PUSH32(esp, 1); /* 0x39003BF4: push 1 */
  10183     PUSH32(esp, 0); /* 0x39003BF6: push 0 */
  10184     PUSH32(esp, 1); /* 0x39003BF8: push 1 */
  10185     PUSH32(esp, 0x3900E3C0u); /* 0x39003BFA: push 0x3900e3c0 */
  10186     ecx = esi; /* 0x39003BFF: mov ecx, esi */
  10187     RECOMP_ICALL(0x39002570u); /* 0x39003C01: call 0x39002570 */ /* not lifted */
  10188     RECOMP_FLAGS_IN();
  10189     PUSH32(esp, 0); /* 0x39003C06: push 0 */
  10190     PUSH32(esp, 1); /* 0x39003C08: push 1 */
  10191     PUSH32(esp, 0); /* 0x39003C0A: push 0 */
  10192     PUSH32(esp, 0); /* 0x39003C0C: push 0 */
  10193     PUSH32(esp, 0x3900E3B4u); /* 0x39003C0E: push 0x3900e3b4 */
  10194     ecx = esi; /* 0x39003C13: mov ecx, esi */
  10195     RECOMP_ICALL(0x39002570u); /* 0x39003C15: call 0x39002570 */ /* not lifted */
  10196     RECOMP_FLAGS_IN();
  10197     PUSH32(esp, 0); /* 0x39003C1A: push 0 */
  10198     PUSH32(esp, 0x00011170u); /* 0x39003C1C: push 0x11170 */
  10199     PUSH32(esp, 0); /* 0x39003C21: push 0 */
  10200     PUSH32(esp, 0x380u); /* 0x39003C23: push 0x380 */
  10201     PUSH32(esp, 0x3900E3A4u); /* 0x39003C28: push 0x3900e3a4 */
  10202     ecx = esi; /* 0x39003C2D: mov ecx, esi */
  10203     RECOMP_ICALL(0x39002570u); /* 0x39003C2F: call 0x39002570 */ /* not lifted */
  10204     RECOMP_FLAGS_IN();
  10205     PUSH32(esp, 0); /* 0x39003C34: push 0 */
  10206     PUSH32(esp, 0x400u); /* 0x39003C36: push 0x400 */
  10207     PUSH32(esp, 0x3900E34Cu); /* 0x39003C3B: push 0x3900e34c */
  10208     PUSH32(esp, 0x3900E33Cu); /* 0x39003C40: push 0x3900e33c */
  10209     ecx = esi; /* 0x39003C45: mov ecx, esi */
  10210     RECOMP_ICALL(0x39002940u); /* 0x39003C47: call 0x39002940 */ /* not lifted */
  10211     RECOMP_FLAGS_IN();
  10212     PUSH32(esp, 0); /* 0x39003C4C: push 0 */
  10213     PUSH32(esp, 0x100u); /* 0x39003C4E: push 0x100 */
  10214     PUSH32(esp, 0x3900E32Cu); /* 0x39003C53: push 0x3900e32c */
  10215     PUSH32(esp, 0x3900E320u); /* 0x39003C58: push 0x3900e320 */
  10216     ecx = esi; /* 0x39003C5D: mov ecx, esi */
  10217     RECOMP_ICALL(0x39002940u); /* 0x39003C5F: call 0x39002940 */ /* not lifted */
  10218     RECOMP_FLAGS_IN();
  10219     PUSH32(esp, 0); /* 0x39003C64: push 0 */
  10220     PUSH32(esp, 3); /* 0x39003C66: push 3 */
  10221     PUSH32(esp, 1); /* 0x39003C68: push 1 */
  10222     PUSH32(esp, 3); /* 0x39003C6A: push 3 */
  10223     PUSH32(esp, 0x3900E30Cu); /* 0x39003C6C: push 0x3900e30c */
  10224     ecx = esi; /* 0x39003C71: mov ecx, esi */
  10225     RECOMP_ICALL(0x39002570u); /* 0x39003C73: call 0x39002570 */ /* not lifted */
  10226     RECOMP_FLAGS_IN();
  10227     PUSH32(esp, 0); /* 0x39003C78: push 0 */
  10228     PUSH32(esp, 2); /* 0x39003C7A: push 2 */
  10229     PUSH32(esp, 0); /* 0x39003C7C: push 0 */
  10230     PUSH32(esp, 1); /* 0x39003C7E: push 1 */
  10231     PUSH32(esp, 0x3900E2F8u); /* 0x39003C80: push 0x3900e2f8 */
  10232     ecx = esi; /* 0x39003C85: mov ecx, esi */
  10233     RECOMP_ICALL(0x39002570u); /* 0x39003C87: call 0x39002570 */ /* not lifted */
  10234     RECOMP_FLAGS_IN();
  10235     PUSH32(esp, 0); /* 0x39003C8C: push 0 */
  10236     PUSH32(esp, 1); /* 0x39003C8E: push 1 */
  10237     PUSH32(esp, 0); /* 0x39003C90: push 0 */
  10238     PUSH32(esp, 0); /* 0x39003C92: push 0 */
  10239     PUSH32(esp, 0x3900E2E4u); /* 0x39003C94: push 0x3900e2e4 */
  10240     ecx = esi; /* 0x39003C99: mov ecx, esi */
  10241     RECOMP_ICALL(0x39002570u); /* 0x39003C9B: call 0x39002570 */ /* not lifted */
  10242     RECOMP_FLAGS_IN();
  10243     PUSH32(esp, 0); /* 0x39003CA0: push 0 */
  10244     PUSH32(esp, 0x1E0u); /* 0x39003CA2: push 0x1e0 */
  10245     PUSH32(esp, 0x32u); /* 0x39003CA7: push 0x32 */
  10246     PUSH32(esp, 0x8Cu); /* 0x39003CA9: push 0x8c */
  10247     PUSH32(esp, 0x3900E2D4u); /* 0x39003CAE: push 0x3900e2d4 */
  10248     ecx = esi; /* 0x39003CB3: mov ecx, esi */
  10249     RECOMP_ICALL(0x39002570u); /* 0x39003CB5: call 0x39002570 */ /* not lifted */
  10250     RECOMP_FLAGS_IN();
  10251     PUSH32(esp, 0); /* 0x39003CBA: push 0 */
  10252     PUSH32(esp, 0xFFu); /* 0x39003CBC: push 0xff */
  10253     PUSH32(esp, 0x3900E2CCu); /* 0x39003CC1: push 0x3900e2cc */
  10254     PUSH32(esp, 0x3900E2BCu); /* 0x39003CC6: push 0x3900e2bc */
  10255     ecx = esi; /* 0x39003CCB: mov ecx, esi */
  10256     RECOMP_ICALL(0x39002940u); /* 0x39003CCD: call 0x39002940 */ /* not lifted */
  10257     RECOMP_FLAGS_IN();
  10258     PUSH32(esp, 0); /* 0x39003CD2: push 0 */
  10259     PUSH32(esp, 0xFFu); /* 0x39003CD4: push 0xff */
  10260     PUSH32(esp, 0x3900E2B4u); /* 0x39003CD9: push 0x3900e2b4 */
  10261     PUSH32(esp, 0x3900E2A4u); /* 0x39003CDE: push 0x3900e2a4 */
  10262     ecx = esi; /* 0x39003CE3: mov ecx, esi */
  10263     RECOMP_ICALL(0x39002940u); /* 0x39003CE5: call 0x39002940 */ /* not lifted */
  10264     RECOMP_FLAGS_IN();
  10265     PUSH32(esp, 0); /* 0x39003CEA: push 0 */
  10266     PUSH32(esp, 0x3E8u); /* 0x39003CEC: push 0x3e8 */
  10267     PUSH32(esp, 0x3900E27Cu); /* 0x39003CF1: push 0x3900e27c */
  10268     PUSH32(esp, 0x3900E274u); /* 0x39003CF6: push 0x3900e274 */
  10269     ecx = esi; /* 0x39003CFB: mov ecx, esi */
  10270     RECOMP_ICALL(0x39002940u); /* 0x39003CFD: call 0x39002940 */ /* not lifted */
  10271     RECOMP_FLAGS_IN();
  10272     PUSH32(esp, 0); /* 0x39003D02: push 0 */
  10273     PUSH32(esp, 0); /* 0x39003D04: push 0 */
  10274     PUSH32(esp, 0); /* 0x39003D06: push 0 */
  10275     PUSH32(esp, 0); /* 0x39003D08: push 0 */
  10276     PUSH32(esp, 0x3900E260u); /* 0x39003D0A: push 0x3900e260 */
  10277     ecx = esi; /* 0x39003D0F: mov ecx, esi */
  10278     RECOMP_ICALL(0x39002570u); /* 0x39003D11: call 0x39002570 */ /* not lifted */
  10279     RECOMP_FLAGS_IN();
  10280 L_39003D16:
  10281     esi = POP32_VAL(esp); /* 0x39003D16: pop esi */
  10282     ebp = POP32_VAL(esp); /* 0x39003D17: pop ebp */
  10283     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39003D18: ret 4 */
  10284     RECOMP_REGS_OUT();
  10285 }
  10286 
  10287 void sub_39003D20(void) {
  10288     int _fpu_cmp = 0;
  10289     uint32_t _cf = 0;
  10290     int _df = 1;
  10291     uint32_t _flag_k = FK_NONE;
  10292     uint32_t _flag_a = 0, _flag_b = 0;
  10293     uint32_t _itail_tgt = 0;
  10294     RECOMP_REGS_LOCALS
  10295     RECOMP_ENTER(0x39003D20u);
  10296 
  10297 L_39003D20:
  10298     PUSH32(esp, ebp); /* 0x39003D20: push ebp */
  10299     ebp = esp; /* 0x39003D21: mov ebp, esp */
  10300     eax = MEM32(ebp + 0x8); /* 0x39003D23: mov eax, dword ptr [ebp + 8] */
  10301     MEM32(0x3900E520) = eax; /* 0x39003D26: mov dword ptr [0x3900e520], eax */
  10302     ebp = POP32_VAL(esp); /* 0x39003D2B: pop ebp */
  10303     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39003D2C: ret  */
  10304     RECOMP_REGS_OUT();
  10305 }
  10306 
  10307 void sub_39003D30(void) {
  10308     int _fpu_cmp = 0;
  10309     uint32_t _cf = 0;
  10310     int _df = 1;
  10311     uint32_t _flag_k = FK_NONE;
  10312     uint32_t _flag_a = 0, _flag_b = 0;
  10313     uint32_t _itail_tgt = 0;
  10314     RECOMP_REGS_LOCALS
  10315     RECOMP_ENTER(0x39003D30u);
  10316 
  10317 L_39003D30:
  10318     eax = MEM32(0x3900E520); /* 0x39003D30: mov eax, dword ptr [0x3900e520] */
  10319     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39003D35: ret  */
  10320     RECOMP_REGS_OUT();
  10321 }
  10322 
  10323 void sub_39003D40(void) {
  10324     int _fpu_cmp = 0;
  10325     uint32_t _cf = 0;
  10326     int _df = 1;
  10327     uint32_t _flag_k = FK_NONE;
  10328     uint32_t _flag_a = 0, _flag_b = 0;
  10329     uint32_t _itail_tgt = 0;
  10330     RECOMP_REGS_LOCALS
  10331     RECOMP_ENTER(0x39003D40u);
  10332 
  10333 L_39003D40:
  10334     PUSH32(esp, esi); /* 0x39003D40: push esi */
  10335     esi = MEM32(ecx + 0xC); /* 0x39003D41: mov esi, dword ptr [ecx + 0xc] */
  10336     /* test esi, esi */ /* 0x39003D44: test esi, esi */
  10337     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
  10338     _cf = 0;
  10339     _flag_k = FK_TEST;
  10340     if (TEST_Z(_flag_a, _flag_b)) goto L_39003D58; /* 0x39003D46: je 0x39003d58 */
  10341 L_39003D48:
  10342     ecx = esi; /* 0x39003D48: mov ecx, esi */
  10343     RECOMP_ICALL(0x39004260u); /* 0x39003D4A: call 0x39004260 */ /* not lifted */
  10344     RECOMP_FLAGS_IN();
  10345     PUSH32(esp, esi); /* 0x39003D4F: push esi */
  10346     RECOMP_ICALL(0x3900A0A0u); /* 0x39003D50: call 0x3900a0a0 */ /* not lifted */
  10347     RECOMP_FLAGS_IN();
  10348     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  10349     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10350     esp = esp + 4; /* 0x39003D55: add esp, 4 */
  10351     _flag_k = FK_ADD;
  10352 L_39003D58:
  10353     esi = POP32_VAL(esp); /* 0x39003D58: pop esi */
  10354     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39003D59: ret  */
  10355     RECOMP_REGS_OUT();
  10356 }
  10357 
  10358 void sub_39003D60(void) {
  10359     int _fpu_cmp = 0;
  10360     uint32_t _cf = 0;
  10361     int _df = 1;
  10362     uint32_t _flag_k = FK_NONE;
  10363     uint32_t _flag_a = 0, _flag_b = 0;
  10364     uint32_t _itail_tgt = 0;
  10365     RECOMP_REGS_LOCALS
  10366     RECOMP_ENTER(0x39003D60u);
  10367 
  10368 L_39003D60:
  10369     PUSH32(esp, ebp); /* 0x39003D60: push ebp */
  10370     ebp = esp; /* 0x39003D61: mov ebp, esp */
  10371     eax = MEM32(ebp + 0xC); /* 0x39003D63: mov eax, dword ptr [ebp + 0xc] */
  10372     edx = MEM32(ebp + 0x8); /* 0x39003D66: mov edx, dword ptr [ebp + 8] */
  10373     PUSH32(esp, 0); /* 0x39003D69: push 0 */
  10374     PUSH32(esp, eax); /* 0x39003D6B: push eax */
  10375     PUSH32(esp, 0); /* 0x39003D6C: push 0 */
  10376     PUSH32(esp, 0); /* 0x39003D6E: push 0 */
  10377     PUSH32(esp, edx); /* 0x39003D70: push edx */
  10378     RECOMP_ICALL(0x39002F50u); /* 0x39003D71: call 0x39002f50 */ /* not lifted */
  10379     RECOMP_FLAGS_IN();
  10380     ebp = POP32_VAL(esp); /* 0x39003D76: pop ebp */
  10381     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39003D77: ret 8 */
  10382     RECOMP_REGS_OUT();
  10383 }
  10384 
  10385 void sub_39003D80(void) {
  10386     int _fpu_cmp = 0;
  10387     uint32_t _cf = 0;
  10388     int _df = 1;
  10389     uint32_t _flag_k = FK_NONE;
  10390     uint32_t _flag_a = 0, _flag_b = 0;
  10391     uint32_t _itail_tgt = 0;
  10392     RECOMP_REGS_LOCALS
  10393     RECOMP_ENTER(0x39003D80u);
  10394 
  10395 L_39003D80:
  10396     PUSH32(esp, ebp); /* 0x39003D80: push ebp */
  10397     ebp = esp; /* 0x39003D81: mov ebp, esp */
  10398     eax = MEM32(ebp + 0x8); /* 0x39003D83: mov eax, dword ptr [ebp + 8] */
  10399     /* test eax, eax */ /* 0x39003D86: test eax, eax */
  10400     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  10401     _cf = 0;
  10402     _flag_k = FK_TEST;
  10403     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003D91; /* 0x39003D88: jne 0x39003d91 */
  10404 L_39003D8A:
  10405     eax = MEM32(ecx + 0x30); /* 0x39003D8A: mov eax, dword ptr [ecx + 0x30] */
  10406     ebp = POP32_VAL(esp); /* 0x39003D8D: pop ebp */
  10407     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39003D8E: ret 4 */
  10408 L_39003D91:
  10409     /* cmp eax, 2 */ /* 0x39003D91: cmp eax, 2 */
  10410     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
  10411     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10412     _flag_k = FK_CMP;
  10413     if (CMP_NE(_flag_a, _flag_b)) goto L_39003D9D; /* 0x39003D94: jne 0x39003d9d */
  10414 L_39003D96:
  10415     eax = MEM32(ecx + 0x48); /* 0x39003D96: mov eax, dword ptr [ecx + 0x48] */
  10416     ebp = POP32_VAL(esp); /* 0x39003D99: pop ebp */
  10417     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39003D9A: ret 4 */
  10418 L_39003D9D:
  10419     eax = MEM32(ecx + 0x3C); /* 0x39003D9D: mov eax, dword ptr [ecx + 0x3c] */
  10420     ebp = POP32_VAL(esp); /* 0x39003DA0: pop ebp */
  10421     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39003DA1: ret 4 */
  10422     RECOMP_REGS_OUT();
  10423 }
  10424 
  10425 void sub_39003DB0(void) {
  10426     int _fpu_cmp = 0;
  10427     uint32_t _cf = 0;
  10428     int _df = 1;
  10429     uint32_t _flag_k = FK_NONE;
  10430     uint32_t _flag_a = 0, _flag_b = 0;
  10431     uint32_t _itail_tgt = 0;
  10432     RECOMP_REGS_LOCALS
  10433     RECOMP_ENTER(0x39003DB0u);
  10434 
  10435 L_39003DB0:
  10436     PUSH32(esp, ebp); /* 0x39003DB0: push ebp */
  10437     ebp = esp; /* 0x39003DB1: mov ebp, esp */
  10438     eax = MEM32(ebp + 0x8); /* 0x39003DB3: mov eax, dword ptr [ebp + 8] */
  10439     /* test eax, eax */ /* 0x39003DB6: test eax, eax */
  10440     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  10441     _cf = 0;
  10442     _flag_k = FK_TEST;
  10443     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003DC1; /* 0x39003DB8: jne 0x39003dc1 */
  10444 L_39003DBA:
  10445     eax = MEM32(ecx + 0x34); /* 0x39003DBA: mov eax, dword ptr [ecx + 0x34] */
  10446     ebp = POP32_VAL(esp); /* 0x39003DBD: pop ebp */
  10447     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39003DBE: ret 4 */
  10448 L_39003DC1:
  10449     /* cmp eax, 2 */ /* 0x39003DC1: cmp eax, 2 */
  10450     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
  10451     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10452     _flag_k = FK_CMP;
  10453     if (CMP_NE(_flag_a, _flag_b)) goto L_39003DCD; /* 0x39003DC4: jne 0x39003dcd */
  10454 L_39003DC6:
  10455     eax = MEM32(ecx + 0x4C); /* 0x39003DC6: mov eax, dword ptr [ecx + 0x4c] */
  10456     ebp = POP32_VAL(esp); /* 0x39003DC9: pop ebp */
  10457     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39003DCA: ret 4 */
  10458 L_39003DCD:
  10459     eax = MEM32(ecx + 0x40); /* 0x39003DCD: mov eax, dword ptr [ecx + 0x40] */
  10460     ebp = POP32_VAL(esp); /* 0x39003DD0: pop ebp */
  10461     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39003DD1: ret 4 */
  10462     RECOMP_REGS_OUT();
  10463 }
  10464 
  10465 void sub_39003DE0(void) {
  10466     int _fpu_cmp = 0;
  10467     uint32_t _cf = 0;
  10468     int _df = 1;
  10469     uint32_t _flag_k = FK_NONE;
  10470     uint32_t _flag_a = 0, _flag_b = 0;
  10471     uint32_t _itail_tgt = 0;
  10472     RECOMP_REGS_LOCALS
  10473     RECOMP_ENTER(0x39003DE0u);
  10474 
  10475 L_39003DE0:
  10476     PUSH32(esp, ebp); /* 0x39003DE0: push ebp */
  10477     ebp = esp; /* 0x39003DE1: mov ebp, esp */
  10478     eax = MEM32(ebp + 0x8); /* 0x39003DE3: mov eax, dword ptr [ebp + 8] */
  10479     /* test eax, eax */ /* 0x39003DE6: test eax, eax */
  10480     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  10481     _cf = 0;
  10482     _flag_k = FK_TEST;
  10483     if (TEST_NZ(_flag_a, _flag_b)) goto L_39003DF1; /* 0x39003DE8: jne 0x39003df1 */
  10484 L_39003DEA:
  10485     eax = MEM32(ecx + 0x38); /* 0x39003DEA: mov eax, dword ptr [ecx + 0x38] */
  10486     ebp = POP32_VAL(esp); /* 0x39003DED: pop ebp */
  10487     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39003DEE: ret 4 */
  10488 L_39003DF1:
  10489     /* cmp eax, 2 */ /* 0x39003DF1: cmp eax, 2 */
  10490     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
  10491     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10492     _flag_k = FK_CMP;
  10493     if (CMP_NE(_flag_a, _flag_b)) goto L_39003DFD; /* 0x39003DF4: jne 0x39003dfd */
  10494 L_39003DF6:
  10495     eax = MEM32(ecx + 0x50); /* 0x39003DF6: mov eax, dword ptr [ecx + 0x50] */
  10496     ebp = POP32_VAL(esp); /* 0x39003DF9: pop ebp */
  10497     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39003DFA: ret 4 */
  10498 L_39003DFD:
  10499     eax = MEM32(ecx + 0x44); /* 0x39003DFD: mov eax, dword ptr [ecx + 0x44] */
  10500     ebp = POP32_VAL(esp); /* 0x39003E00: pop ebp */
  10501     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39003E01: ret 4 */
  10502     RECOMP_REGS_OUT();
  10503 }
  10504 
  10505 void sub_39003E10(void) {
  10506     int _fpu_cmp = 0;
  10507     uint32_t _cf = 0;
  10508     int _df = 1;
  10509     uint32_t _flag_k = FK_NONE;
  10510     uint32_t _flag_a = 0, _flag_b = 0;
  10511     uint32_t _itail_tgt = 0;
  10512     RECOMP_REGS_LOCALS
  10513     RECOMP_ENTER(0x39003E10u);
  10514 
  10515 L_39003E10:
  10516     PUSH32(esp, ebp); /* 0x39003E10: push ebp */
  10517     ebp = esp; /* 0x39003E11: mov ebp, esp */
  10518     PUSH32(esp, 0xFFFFFFFFu); /* 0x39003E13: push -1 */
  10519     PUSH32(esp, 0x3900A725u); /* 0x39003E15: push 0x3900a725 */
  10520     eax = MEM32(FS_BASE + (0)); /* 0x39003E1A: mov eax, dword ptr fs:[0] */
  10521     PUSH32(esp, eax); /* 0x39003E20: push eax */
  10522     MEM32(FS_BASE + (0)) = esp; /* 0x39003E21: mov dword ptr fs:[0], esp */
  10523     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
  10524     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10525     esp = esp - 0xCu; /* 0x39003E28: sub esp, 0xc */
  10526     _flag_k = FK_CMP;
  10527     PUSH32(esp, ebx); /* 0x39003E2B: push ebx */
  10528     PUSH32(esp, esi); /* 0x39003E2C: push esi */
  10529     PUSH32(esp, edi); /* 0x39003E2D: push edi */
  10530     edi = MEM32(ebp + 0x8); /* 0x39003E2E: mov edi, dword ptr [ebp + 8] */
  10531     ebx = ecx; /* 0x39003E31: mov ebx, ecx */
  10532     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  10533     esi = 0; /* 0x39003E33: xor esi, esi */
  10534     _cf = 0;
  10535     _flag_k = FK_TEST;
  10536     SET_LO8(eax, MEM8(edi)); /* 0x39003E35: mov al, byte ptr [edi] */
  10537     MEM32(ebp + (-0x18)) = ebx; /* 0x39003E37: mov dword ptr [ebp - 0x18], ebx */
  10538     MEM8(ebx) = (uint8_t)(LO8(eax)); /* 0x39003E3A: mov byte ptr [ebx], al */
  10539     MEM32(ebx + 0x4) = esi; /* 0x39003E3C: mov dword ptr [ebx + 4], esi */
  10540     MEM32(ebx + 0x8) = esi; /* 0x39003E3F: mov dword ptr [ebx + 8], esi */
  10541     MEM32(ebx + 0xC) = esi; /* 0x39003E42: mov dword ptr [ebx + 0xc], esi */
  10542     ecx = MEM32(0x3900B008); /* 0x39003E45: mov ecx, dword ptr [0x3900b008] */
  10543     edx = MEM32(ecx); /* 0x39003E4B: mov edx, dword ptr [ecx] */
  10544     ecx = ebx; /* 0x39003E4D: mov ecx, ebx */
  10545     PUSH32(esp, edx); /* 0x39003E4F: push edx */
  10546     PUSH32(esp, esi); /* 0x39003E50: push esi */
  10547     PUSH32(esp, edi); /* 0x39003E51: push edi */
  10548     RECOMP_ICALL(MEM32(0x3900B024)); /* 0x39003E52: call dword ptr [0x3900b024] */
  10549     RECOMP_FLAGS_IN();
  10550     SET_LO8(edx, MEM8(edi + 0x10)); /* 0x39003E58: mov dl, byte ptr [edi + 0x10] */
  10551     eax = edi + 0x10; /* 0x39003E5B: lea eax, [edi + 0x10] */
  10552     ecx = ebx + 0x10; /* 0x39003E5E: lea ecx, [ebx + 0x10] */
  10553     MEM32(ebp + (-0x4)) = esi; /* 0x39003E61: mov dword ptr [ebp - 4], esi */
  10554     MEM8(ecx) = (uint8_t)(LO8(edx)); /* 0x39003E64: mov byte ptr [ecx], dl */
  10555     MEM32(ecx + 0x4) = esi; /* 0x39003E66: mov dword ptr [ecx + 4], esi */
  10556     MEM32(ecx + 0x8) = esi; /* 0x39003E69: mov dword ptr [ecx + 8], esi */
  10557     MEM32(ecx + 0xC) = esi; /* 0x39003E6C: mov dword ptr [ecx + 0xc], esi */
  10558     edx = MEM32(0x3900B008); /* 0x39003E6F: mov edx, dword ptr [0x3900b008] */
  10559     edx = MEM32(edx); /* 0x39003E75: mov edx, dword ptr [edx] */
  10560     PUSH32(esp, edx); /* 0x39003E77: push edx */
  10561     PUSH32(esp, esi); /* 0x39003E78: push esi */
  10562     PUSH32(esp, eax); /* 0x39003E79: push eax */
  10563     RECOMP_ICALL(MEM32(0x3900B024)); /* 0x39003E7A: call dword ptr [0x3900b024] */
  10564     RECOMP_FLAGS_IN();
  10565     SET_LO8(ecx, MEM8(edi + 0x20)); /* 0x39003E80: mov cl, byte ptr [edi + 0x20] */
  10566     eax = edi + 0x20; /* 0x39003E83: lea eax, [edi + 0x20] */
  10567     edi = ebx + 0x20; /* 0x39003E86: lea edi, [ebx + 0x20] */
  10568     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x39003E89: mov byte ptr [ebp - 4], 1 */
  10569     MEM32(ebp + (-0x14)) = eax; /* 0x39003E8D: mov dword ptr [ebp - 0x14], eax */
  10570     MEM8(edi) = (uint8_t)(LO8(ecx)); /* 0x39003E90: mov byte ptr [edi], cl */
  10571     MEM32(edi + 0x4) = esi; /* 0x39003E92: mov dword ptr [edi + 4], esi */
  10572     MEM32(edi + 0x8) = esi; /* 0x39003E95: mov dword ptr [edi + 8], esi */
  10573     MEM32(edi + 0xC) = esi; /* 0x39003E98: mov dword ptr [edi + 0xc], esi */
  10574     edx = MEM32(0x3900B008); /* 0x39003E9B: mov edx, dword ptr [0x3900b008] */
  10575     ecx = MEM32(eax + 0x8); /* 0x39003EA1: mov ecx, dword ptr [eax + 8] */
  10576     MEM32(ebp + (-0x10)) = ecx; /* 0x39003EA4: mov dword ptr [ebp - 0x10], ecx */
  10577     edx = MEM32(edx); /* 0x39003EA7: mov edx, dword ptr [edx] */
  10578     /* cmp edx, ecx */ /* 0x39003EA9: cmp edx, ecx */
  10579     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
  10580     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10581     _flag_k = FK_CMP;
  10582     if (CMP_AE(_flag_a, _flag_b)) goto L_39003EB2; /* 0x39003EAB: jae 0x39003eb2 */
  10583 L_39003EAD:
  10584     MEM32(ebp + (-0x10)) = edx; /* 0x39003EAD: mov dword ptr [ebp - 0x10], edx */
  10585     ecx = edx; /* 0x39003EB0: mov ecx, edx */
  10586 L_39003EB2:
  10587     /* cmp edi, eax */ /* 0x39003EB2: cmp edi, eax */
  10588     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10589     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10590     _flag_k = FK_CMP;
  10591     if (CMP_NE(_flag_a, _flag_b)) goto L_39003ECF; /* 0x39003EB4: jne 0x39003ecf */
  10592 L_39003EB6:
  10593     PUSH32(esp, edx); /* 0x39003EB6: push edx */
  10594     PUSH32(esp, ecx); /* 0x39003EB7: push ecx */
  10595     ecx = edi; /* 0x39003EB8: mov ecx, edi */
  10596     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x39003EBA: call dword ptr [0x3900b010] */
  10597     RECOMP_FLAGS_IN();
  10598     PUSH32(esp, esi); /* 0x39003EC0: push esi */
  10599     PUSH32(esp, esi); /* 0x39003EC1: push esi */
  10600     ecx = edi; /* 0x39003EC2: mov ecx, edi */
  10601     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x39003EC4: call dword ptr [0x3900b010] */
  10602     RECOMP_FLAGS_IN();
  10603     goto L_39003F5C; /* 0x39003ECA: jmp 0x39003f5c */
  10604 L_39003ECF:
  10605     /* cmp ecx, esi */ /* 0x39003ECF: cmp ecx, esi */
  10606     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi);
  10607     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10608     _flag_k = FK_CMP;
  10609     if (CMP_BE(_flag_a, _flag_b)) goto L_39003F1C; /* 0x39003ED1: jbe 0x39003f1c */
  10610 L_39003ED3:
  10611     /* cmp ecx, MEM32(eax + 0x8) */ /* 0x39003ED3: cmp ecx, dword ptr [eax + 8] */
  10612     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(eax + 0x8));
  10613     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10614     _flag_k = FK_CMP;
  10615     if (CMP_NE(_flag_a, _flag_b)) goto L_39003F1C; /* 0x39003ED6: jne 0x39003f1c */
  10616 L_39003ED8:
  10617     eax = MEM32(eax + 0x4); /* 0x39003ED8: mov eax, dword ptr [eax + 4] */
  10618     /* cmp eax, esi */ /* 0x39003EDB: cmp eax, esi */
  10619     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi);
  10620     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10621     _flag_k = FK_CMP;
  10622     if (CMP_NE(_flag_a, _flag_b)) goto L_39003EE4; /* 0x39003EDD: jne 0x39003ee4 */
  10623 L_39003EDF:
  10624     eax = MEM32(0x3900B02C); /* 0x39003EDF: mov eax, dword ptr [0x3900b02c] */
  10625 L_39003EE4:
  10626     /* cmp MEM8(eax + (-0x1)), 0xFEu */ /* 0x39003EE4: cmp byte ptr [eax - 1], 0xfe */
  10627     _flag_a = (uint32_t)(MEM8(eax + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24;
  10628     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10629     _flag_k = FK_NARROW(FK_CMP, 24);
  10630     if (CMP_AE(_flag_a, _flag_b)) goto L_39003F1C; /* 0x39003EE8: jae 0x39003f1c */
  10631 L_39003EEA:
  10632     PUSH32(esp, 1); /* 0x39003EEA: push 1 */
  10633     ecx = edi; /* 0x39003EEC: mov ecx, edi */
  10634     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39003EEE: call dword ptr [0x3900b040] */
  10635     RECOMP_FLAGS_IN();
  10636     ecx = MEM32(ebp + (-0x14)); /* 0x39003EF4: mov ecx, dword ptr [ebp - 0x14] */
  10637     eax = MEM32(ecx + 0x4); /* 0x39003EF7: mov eax, dword ptr [ecx + 4] */
  10638     /* cmp eax, esi */ /* 0x39003EFA: cmp eax, esi */
  10639     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi);
  10640     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10641     _flag_k = FK_CMP;
  10642     if (CMP_NE(_flag_a, _flag_b)) goto L_39003F03; /* 0x39003EFC: jne 0x39003f03 */
  10643 L_39003EFE:
  10644     eax = MEM32(0x3900B02C); /* 0x39003EFE: mov eax, dword ptr [0x3900b02c] */
  10645 L_39003F03:
  10646     MEM32(edi + 0x4) = eax; /* 0x39003F03: mov dword ptr [edi + 4], eax */
  10647     edx = MEM32(ecx + 0x8); /* 0x39003F06: mov edx, dword ptr [ecx + 8] */
  10648     MEM32(edi + 0x8) = edx; /* 0x39003F09: mov dword ptr [edi + 8], edx */
  10649     ecx = MEM32(ecx + 0xC); /* 0x39003F0C: mov ecx, dword ptr [ecx + 0xc] */
  10650     MEM32(edi + 0xC) = ecx; /* 0x39003F0F: mov dword ptr [edi + 0xc], ecx */
  10651     SET_LO8(ecx, MEM8(eax + (-0x1))); /* 0x39003F12: mov cl, byte ptr [eax - 1] */
  10652     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(1) << 24;
  10653     SET_LO8(ecx, LO8(ecx) + 1); /* 0x39003F15: inc cl */
  10654     _flag_k = FK_NARROW(FK_INC, 24);
  10655     MEM8(eax + (-0x1)) = (uint8_t)(LO8(ecx)); /* 0x39003F17: mov byte ptr [eax - 1], cl */
  10656     goto L_39003F5C; /* 0x39003F1A: jmp 0x39003f5c */
  10657 L_39003F1C:
  10658     PUSH32(esp, 1); /* 0x39003F1C: push 1 */
  10659     PUSH32(esp, ecx); /* 0x39003F1E: push ecx */
  10660     ecx = edi; /* 0x39003F1F: mov ecx, edi */
  10661     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39003F21: call dword ptr [0x3900b034] */
  10662     RECOMP_FLAGS_IN();
  10663     /* test LO8(eax), LO8(eax) */ /* 0x39003F27: test al, al */
  10664     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  10665     _cf = 0;
  10666     _flag_k = FK_NARROW(FK_TEST, 24);
  10667     if (TEST_Z(_flag_a, _flag_b)) goto L_39003F5C; /* 0x39003F29: je 0x39003f5c */
  10668 L_39003F2B:
  10669     edx = MEM32(ebp + (-0x14)); /* 0x39003F2B: mov edx, dword ptr [ebp - 0x14] */
  10670     eax = MEM32(edx + 0x4); /* 0x39003F2E: mov eax, dword ptr [edx + 4] */
  10671     /* cmp eax, esi */ /* 0x39003F31: cmp eax, esi */
  10672     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi);
  10673     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10674     _flag_k = FK_CMP;
  10675     if (CMP_NE(_flag_a, _flag_b)) goto L_39003F3A; /* 0x39003F33: jne 0x39003f3a */
  10676 L_39003F35:
  10677     eax = MEM32(0x3900B02C); /* 0x39003F35: mov eax, dword ptr [0x3900b02c] */
  10678 L_39003F3A:
  10679     ecx = MEM32(ebp + (-0x10)); /* 0x39003F3A: mov ecx, dword ptr [ebp - 0x10] */
  10680     edi = MEM32(edi + 0x4); /* 0x39003F3D: mov edi, dword ptr [edi + 4] */
  10681     esi = eax; /* 0x39003F40: mov esi, eax */
  10682     eax = ecx; /* 0x39003F42: mov eax, ecx */
  10683     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39003F44: shr ecx, 2 */
  10684     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10685     ecx = ecx >> 2u; /* 0x39003F44: shr ecx, 2 */
  10686     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39003F47: 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; }
  10687     ecx = eax; /* 0x39003F49: mov ecx, eax */
  10688     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
  10689     ecx = ecx & 3; /* 0x39003F4B: and ecx, 3 */
  10690     _cf = 0;
  10691     _flag_k = FK_TEST;
  10692     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39003F4E: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
  10693     ecx = eax; /* 0x39003F50: mov ecx, eax */
  10694     PUSH32(esp, ecx); /* 0x39003F52: push ecx */
  10695     ecx = ebx + 0x20; /* 0x39003F53: lea ecx, [ebx + 0x20] */
  10696     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39003F56: call dword ptr [0x3900b038] */
  10697     RECOMP_FLAGS_IN();
  10698 L_39003F5C:
  10699     eax = MEM32(ebp + 0x8); /* 0x39003F5C: mov eax, dword ptr [ebp + 8] */
  10700     edi = POP32_VAL(esp); /* 0x39003F5F: pop edi */
  10701     esi = POP32_VAL(esp); /* 0x39003F60: pop esi */
  10702     edx = MEM32(eax + 0x30); /* 0x39003F61: mov edx, dword ptr [eax + 0x30] */
  10703     MEM32(ebx + 0x30) = edx; /* 0x39003F64: mov dword ptr [ebx + 0x30], edx */
  10704     ecx = MEM32(eax + 0x34); /* 0x39003F67: mov ecx, dword ptr [eax + 0x34] */
  10705     MEM32(ebx + 0x34) = ecx; /* 0x39003F6A: mov dword ptr [ebx + 0x34], ecx */
  10706     edx = MEM32(eax + 0x38); /* 0x39003F6D: mov edx, dword ptr [eax + 0x38] */
  10707     MEM32(ebx + 0x38) = edx; /* 0x39003F70: mov dword ptr [ebx + 0x38], edx */
  10708     ecx = MEM32(eax + 0x3C); /* 0x39003F73: mov ecx, dword ptr [eax + 0x3c] */
  10709     MEM32(ebx + 0x3C) = ecx; /* 0x39003F76: mov dword ptr [ebx + 0x3c], ecx */
  10710     edx = MEM32(eax + 0x40); /* 0x39003F79: mov edx, dword ptr [eax + 0x40] */
  10711     MEM32(ebx + 0x40) = edx; /* 0x39003F7C: mov dword ptr [ebx + 0x40], edx */
  10712     ecx = MEM32(eax + 0x44); /* 0x39003F7F: mov ecx, dword ptr [eax + 0x44] */
  10713     MEM32(ebx + 0x44) = ecx; /* 0x39003F82: mov dword ptr [ebx + 0x44], ecx */
  10714     edx = MEM32(eax + 0x48); /* 0x39003F85: mov edx, dword ptr [eax + 0x48] */
  10715     MEM32(ebx + 0x48) = edx; /* 0x39003F88: mov dword ptr [ebx + 0x48], edx */
  10716     ecx = MEM32(eax + 0x4C); /* 0x39003F8B: mov ecx, dword ptr [eax + 0x4c] */
  10717     MEM32(ebx + 0x4C) = ecx; /* 0x39003F8E: mov dword ptr [ebx + 0x4c], ecx */
  10718     edx = MEM32(eax + 0x50); /* 0x39003F91: mov edx, dword ptr [eax + 0x50] */
  10719     ecx = MEM32(ebp + (-0xC)); /* 0x39003F94: mov ecx, dword ptr [ebp - 0xc] */
  10720     MEM32(ebx + 0x50) = edx; /* 0x39003F97: mov dword ptr [ebx + 0x50], edx */
  10721     eax = ebx; /* 0x39003F9A: mov eax, ebx */
  10722     ebx = POP32_VAL(esp); /* 0x39003F9C: pop ebx */
  10723     MEM32(FS_BASE + (0)) = ecx; /* 0x39003F9D: mov dword ptr fs:[0], ecx */
  10724     esp = ebp; /* 0x39003FA4: mov esp, ebp */
  10725     ebp = POP32_VAL(esp); /* 0x39003FA6: pop ebp */
  10726     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39003FA7: ret 4 */
  10727     RECOMP_REGS_OUT();
  10728 }
  10729 
  10730 void sub_39003F5C(void) {
  10731     int _fpu_cmp = 0;
  10732     uint32_t _cf = 0;
  10733     int _df = 1;
  10734     uint32_t _flag_k = FK_NONE;
  10735     uint32_t _flag_a = 0, _flag_b = 0;
  10736     uint32_t _itail_tgt = 0;
  10737     RECOMP_REGS_LOCALS
  10738     RECOMP_ENTER(0x39003F5Cu);
  10739 
  10740 L_39003F5C:
  10741     eax = MEM32(ebp + 0x8); /* 0x39003F5C: mov eax, dword ptr [ebp + 8] */
  10742     edi = POP32_VAL(esp); /* 0x39003F5F: pop edi */
  10743     esi = POP32_VAL(esp); /* 0x39003F60: pop esi */
  10744     edx = MEM32(eax + 0x30); /* 0x39003F61: mov edx, dword ptr [eax + 0x30] */
  10745     MEM32(ebx + 0x30) = edx; /* 0x39003F64: mov dword ptr [ebx + 0x30], edx */
  10746     ecx = MEM32(eax + 0x34); /* 0x39003F67: mov ecx, dword ptr [eax + 0x34] */
  10747     MEM32(ebx + 0x34) = ecx; /* 0x39003F6A: mov dword ptr [ebx + 0x34], ecx */
  10748     edx = MEM32(eax + 0x38); /* 0x39003F6D: mov edx, dword ptr [eax + 0x38] */
  10749     MEM32(ebx + 0x38) = edx; /* 0x39003F70: mov dword ptr [ebx + 0x38], edx */
  10750     ecx = MEM32(eax + 0x3C); /* 0x39003F73: mov ecx, dword ptr [eax + 0x3c] */
  10751     MEM32(ebx + 0x3C) = ecx; /* 0x39003F76: mov dword ptr [ebx + 0x3c], ecx */
  10752     edx = MEM32(eax + 0x40); /* 0x39003F79: mov edx, dword ptr [eax + 0x40] */
  10753     MEM32(ebx + 0x40) = edx; /* 0x39003F7C: mov dword ptr [ebx + 0x40], edx */
  10754     ecx = MEM32(eax + 0x44); /* 0x39003F7F: mov ecx, dword ptr [eax + 0x44] */
  10755     MEM32(ebx + 0x44) = ecx; /* 0x39003F82: mov dword ptr [ebx + 0x44], ecx */
  10756     edx = MEM32(eax + 0x48); /* 0x39003F85: mov edx, dword ptr [eax + 0x48] */
  10757     MEM32(ebx + 0x48) = edx; /* 0x39003F88: mov dword ptr [ebx + 0x48], edx */
  10758     ecx = MEM32(eax + 0x4C); /* 0x39003F8B: mov ecx, dword ptr [eax + 0x4c] */
  10759     MEM32(ebx + 0x4C) = ecx; /* 0x39003F8E: mov dword ptr [ebx + 0x4c], ecx */
  10760     edx = MEM32(eax + 0x50); /* 0x39003F91: mov edx, dword ptr [eax + 0x50] */
  10761     ecx = MEM32(ebp + (-0xC)); /* 0x39003F94: mov ecx, dword ptr [ebp - 0xc] */
  10762     MEM32(ebx + 0x50) = edx; /* 0x39003F97: mov dword ptr [ebx + 0x50], edx */
  10763     eax = ebx; /* 0x39003F9A: mov eax, ebx */
  10764     ebx = POP32_VAL(esp); /* 0x39003F9C: pop ebx */
  10765     MEM32(FS_BASE + (0)) = ecx; /* 0x39003F9D: mov dword ptr fs:[0], ecx */
  10766     esp = ebp; /* 0x39003FA4: mov esp, ebp */
  10767     ebp = POP32_VAL(esp); /* 0x39003FA6: pop ebp */
  10768     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39003FA7: ret 4 */
  10769     RECOMP_REGS_OUT();
  10770 }
  10771 
  10772 void sub_39003FB0(void) {
  10773     int _fpu_cmp = 0;
  10774     uint32_t _cf = 0;
  10775     int _df = 1;
  10776     uint32_t _flag_k = FK_NONE;
  10777     uint32_t _flag_a = 0, _flag_b = 0;
  10778     uint32_t _itail_tgt = 0;
  10779     RECOMP_REGS_LOCALS
  10780     RECOMP_ENTER(0x39003FB0u);
  10781 
  10782 L_39003FB0:
  10783     PUSH32(esp, ebp); /* 0x39003FB0: push ebp */
  10784     ebp = esp; /* 0x39003FB1: mov ebp, esp */
  10785     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
  10786     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10787     esp = esp - 0xCu; /* 0x39003FB3: sub esp, 0xc */
  10788     _flag_k = FK_CMP;
  10789     eax = MEM32(0x3900B008); /* 0x39003FB6: mov eax, dword ptr [0x3900b008] */
  10790     PUSH32(esp, ebx); /* 0x39003FBB: push ebx */
  10791     PUSH32(esp, esi); /* 0x39003FBC: push esi */
  10792     esi = MEM32(ebp + 0x8); /* 0x39003FBD: mov esi, dword ptr [ebp + 8] */
  10793     eax = MEM32(eax); /* 0x39003FC0: mov eax, dword ptr [eax] */
  10794     PUSH32(esp, edi); /* 0x39003FC2: push edi */
  10795     edi = ecx; /* 0x39003FC3: mov edi, ecx */
  10796     ecx = MEM32(esi + 0x8); /* 0x39003FC5: mov ecx, dword ptr [esi + 8] */
  10797     MEM32(ebp + (-0x8)) = edi; /* 0x39003FC8: mov dword ptr [ebp - 8], edi */
  10798     ebx = ecx; /* 0x39003FCB: mov ebx, ecx */
  10799     /* cmp eax, ebx */ /* 0x39003FCD: cmp eax, ebx */
  10800     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
  10801     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10802     _flag_k = FK_CMP;
  10803     if (CMP_AE(_flag_a, _flag_b)) goto L_39003FD3; /* 0x39003FCF: jae 0x39003fd3 */
  10804 L_39003FD1:
  10805     ebx = eax; /* 0x39003FD1: mov ebx, eax */
  10806 L_39003FD3:
  10807     /* cmp edi, esi */ /* 0x39003FD3: cmp edi, esi */
  10808     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi);
  10809     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10810     _flag_k = FK_CMP;
  10811     if (CMP_NE(_flag_a, _flag_b)) goto L_39003FF2; /* 0x39003FD5: jne 0x39003ff2 */
  10812 L_39003FD7:
  10813     PUSH32(esp, eax); /* 0x39003FD7: push eax */
  10814     PUSH32(esp, ebx); /* 0x39003FD8: push ebx */
  10815     ecx = edi; /* 0x39003FD9: mov ecx, edi */
  10816     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x39003FDB: call dword ptr [0x3900b010] */
  10817     RECOMP_FLAGS_IN();
  10818     PUSH32(esp, 0); /* 0x39003FE1: push 0 */
  10819     PUSH32(esp, 0); /* 0x39003FE3: push 0 */
  10820     ecx = edi; /* 0x39003FE5: mov ecx, edi */
  10821     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x39003FE7: call dword ptr [0x3900b010] */
  10822     RECOMP_FLAGS_IN();
  10823     goto L_3900407A; /* 0x39003FED: jmp 0x3900407a */
  10824 L_39003FF2:
  10825     /* test ebx, ebx */ /* 0x39003FF2: test ebx, ebx */
  10826     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
  10827     _cf = 0;
  10828     _flag_k = FK_TEST;
  10829     if (TEST_Z(_flag_a, _flag_b)) goto L_3900403B; /* 0x39003FF4: jbe 0x3900403b */
  10830 L_39003FF6:
  10831     /* cmp ebx, ecx */ /* 0x39003FF6: cmp ebx, ecx */
  10832     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ecx);
  10833     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10834     _flag_k = FK_CMP;
  10835     if (CMP_NE(_flag_a, _flag_b)) goto L_3900403B; /* 0x39003FF8: jne 0x3900403b */
  10836 L_39003FFA:
  10837     eax = MEM32(esi + 0x4); /* 0x39003FFA: mov eax, dword ptr [esi + 4] */
  10838     /* test eax, eax */ /* 0x39003FFD: test eax, eax */
  10839     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  10840     _cf = 0;
  10841     _flag_k = FK_TEST;
  10842     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004006; /* 0x39003FFF: jne 0x39004006 */
  10843 L_39004001:
  10844     eax = MEM32(0x3900B02C); /* 0x39004001: mov eax, dword ptr [0x3900b02c] */
  10845 L_39004006:
  10846     /* cmp MEM8(eax + (-0x1)), 0xFEu */ /* 0x39004006: cmp byte ptr [eax - 1], 0xfe */
  10847     _flag_a = (uint32_t)(MEM8(eax + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24;
  10848     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10849     _flag_k = FK_NARROW(FK_CMP, 24);
  10850     if (CMP_AE(_flag_a, _flag_b)) goto L_3900403B; /* 0x3900400A: jae 0x3900403b */
  10851 L_3900400C:
  10852     PUSH32(esp, 1); /* 0x3900400C: push 1 */
  10853     ecx = edi; /* 0x3900400E: mov ecx, edi */
  10854     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39004010: call dword ptr [0x3900b040] */
  10855     RECOMP_FLAGS_IN();
  10856     eax = MEM32(esi + 0x4); /* 0x39004016: mov eax, dword ptr [esi + 4] */
  10857     /* test eax, eax */ /* 0x39004019: test eax, eax */
  10858     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  10859     _cf = 0;
  10860     _flag_k = FK_TEST;
  10861     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004022; /* 0x3900401B: jne 0x39004022 */
  10862 L_3900401D:
  10863     eax = MEM32(0x3900B02C); /* 0x3900401D: mov eax, dword ptr [0x3900b02c] */
  10864 L_39004022:
  10865     MEM32(edi + 0x4) = eax; /* 0x39004022: mov dword ptr [edi + 4], eax */
  10866     ecx = MEM32(esi + 0x8); /* 0x39004025: mov ecx, dword ptr [esi + 8] */
  10867     MEM32(edi + 0x8) = ecx; /* 0x39004028: mov dword ptr [edi + 8], ecx */
  10868     edx = MEM32(esi + 0xC); /* 0x3900402B: mov edx, dword ptr [esi + 0xc] */
  10869     MEM32(edi + 0xC) = edx; /* 0x3900402E: mov dword ptr [edi + 0xc], edx */
  10870     SET_LO8(ecx, MEM8(eax + (-0x1))); /* 0x39004031: mov cl, byte ptr [eax - 1] */
  10871     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(1) << 24;
  10872     SET_LO8(ecx, LO8(ecx) + 1); /* 0x39004034: inc cl */
  10873     _flag_k = FK_NARROW(FK_INC, 24);
  10874     MEM8(eax + (-0x1)) = (uint8_t)(LO8(ecx)); /* 0x39004036: mov byte ptr [eax - 1], cl */
  10875     goto L_3900407A; /* 0x39004039: jmp 0x3900407a */
  10876 L_3900403B:
  10877     PUSH32(esp, 1); /* 0x3900403B: push 1 */
  10878     PUSH32(esp, ebx); /* 0x3900403D: push ebx */
  10879     ecx = edi; /* 0x3900403E: mov ecx, edi */
  10880     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39004040: call dword ptr [0x3900b034] */
  10881     RECOMP_FLAGS_IN();
  10882     /* test LO8(eax), LO8(eax) */ /* 0x39004046: test al, al */
  10883     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  10884     _cf = 0;
  10885     _flag_k = FK_NARROW(FK_TEST, 24);
  10886     if (TEST_Z(_flag_a, _flag_b)) goto L_3900407A; /* 0x39004048: je 0x3900407a */
  10887 L_3900404A:
  10888     esi = MEM32(esi + 0x4); /* 0x3900404A: mov esi, dword ptr [esi + 4] */
  10889     /* test esi, esi */ /* 0x3900404D: test esi, esi */
  10890     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
  10891     _cf = 0;
  10892     _flag_k = FK_TEST;
  10893     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004057; /* 0x3900404F: jne 0x39004057 */
  10894 L_39004051:
  10895     esi = MEM32(0x3900B02C); /* 0x39004051: mov esi, dword ptr [0x3900b02c] */
  10896 L_39004057:
  10897     edi = MEM32(edi + 0x4); /* 0x39004057: mov edi, dword ptr [edi + 4] */
  10898     ecx = ebx; /* 0x3900405A: mov ecx, ebx */
  10899     eax = ecx; /* 0x3900405C: mov eax, ecx */
  10900     PUSH32(esp, ebx); /* 0x3900405E: push ebx */
  10901     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x3900405F: shr ecx, 2 */
  10902     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10903     ecx = ecx >> 2u; /* 0x3900405F: shr ecx, 2 */
  10904     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39004062: 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; }
  10905     ecx = eax; /* 0x39004064: mov ecx, eax */
  10906     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
  10907     ecx = ecx & 3; /* 0x39004066: and ecx, 3 */
  10908     _cf = 0;
  10909     _flag_k = FK_TEST;
  10910     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39004069: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
  10911     ecx = MEM32(ebp + (-0x8)); /* 0x3900406B: mov ecx, dword ptr [ebp - 8] */
  10912     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x3900406E: call dword ptr [0x3900b038] */
  10913     RECOMP_FLAGS_IN();
  10914     edi = MEM32(ebp + (-0x8)); /* 0x39004074: mov edi, dword ptr [ebp - 8] */
  10915     esi = MEM32(ebp + 0x8); /* 0x39004077: mov esi, dword ptr [ebp + 8] */
  10916 L_3900407A:
  10917     edx = MEM32(0x3900B008); /* 0x3900407A: mov edx, dword ptr [0x3900b008] */
  10918     ecx = esi + 0x10; /* 0x39004080: lea ecx, [esi + 0x10] */
  10919     MEM32(ebp + (-0xC)) = ecx; /* 0x39004083: mov dword ptr [ebp - 0xc], ecx */
  10920     ebx = edi + 0x10; /* 0x39004086: lea ebx, [edi + 0x10] */
  10921     eax = MEM32(edx); /* 0x39004089: mov eax, dword ptr [edx] */
  10922     edx = MEM32(ecx + 0x8); /* 0x3900408B: mov edx, dword ptr [ecx + 8] */
  10923     esi = edx; /* 0x3900408E: mov esi, edx */
  10924     /* cmp eax, esi */ /* 0x39004090: cmp eax, esi */
  10925     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi);
  10926     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10927     _flag_k = FK_CMP;
  10928     MEM32(ebp + (-0x4)) = esi; /* 0x39004092: mov dword ptr [ebp - 4], esi */
  10929     if (CMP_AE(_flag_a, _flag_b)) goto L_3900409C; /* 0x39004095: jae 0x3900409c */
  10930 L_39004097:
  10931     MEM32(ebp + (-0x4)) = eax; /* 0x39004097: mov dword ptr [ebp - 4], eax */
  10932     esi = eax; /* 0x3900409A: mov esi, eax */
  10933 L_3900409C:
  10934     /* cmp ebx, ecx */ /* 0x3900409C: cmp ebx, ecx */
  10935     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ecx);
  10936     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10937     _flag_k = FK_CMP;
  10938     if (CMP_NE(_flag_a, _flag_b)) goto L_390040BB; /* 0x3900409E: jne 0x390040bb */
  10939 L_390040A0:
  10940     PUSH32(esp, eax); /* 0x390040A0: push eax */
  10941     PUSH32(esp, esi); /* 0x390040A1: push esi */
  10942     ecx = ebx; /* 0x390040A2: mov ecx, ebx */
  10943     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x390040A4: call dword ptr [0x3900b010] */
  10944     RECOMP_FLAGS_IN();
  10945     PUSH32(esp, 0); /* 0x390040AA: push 0 */
  10946     PUSH32(esp, 0); /* 0x390040AC: push 0 */
  10947     ecx = ebx; /* 0x390040AE: mov ecx, ebx */
  10948     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x390040B0: call dword ptr [0x3900b010] */
  10949     RECOMP_FLAGS_IN();
  10950     goto L_3900414A; /* 0x390040B6: jmp 0x3900414a */
  10951 L_390040BB:
  10952     /* test esi, esi */ /* 0x390040BB: test esi, esi */
  10953     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
  10954     _cf = 0;
  10955     _flag_k = FK_TEST;
  10956     if (TEST_Z(_flag_a, _flag_b)) goto L_39004108; /* 0x390040BD: jbe 0x39004108 */
  10957 L_390040BF:
  10958     /* cmp esi, edx */ /* 0x390040BF: cmp esi, edx */
  10959     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx);
  10960     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10961     _flag_k = FK_CMP;
  10962     if (CMP_NE(_flag_a, _flag_b)) goto L_39004108; /* 0x390040C1: jne 0x39004108 */
  10963 L_390040C3:
  10964     ecx = MEM32(ecx + 0x4); /* 0x390040C3: mov ecx, dword ptr [ecx + 4] */
  10965     /* test ecx, ecx */ /* 0x390040C6: test ecx, ecx */
  10966     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  10967     _cf = 0;
  10968     _flag_k = FK_TEST;
  10969     if (TEST_NZ(_flag_a, _flag_b)) goto L_390040D0; /* 0x390040C8: jne 0x390040d0 */
  10970 L_390040CA:
  10971     ecx = MEM32(0x3900B02C); /* 0x390040CA: mov ecx, dword ptr [0x3900b02c] */
  10972 L_390040D0:
  10973     /* cmp MEM8(ecx + (-0x1)), 0xFEu */ /* 0x390040D0: cmp byte ptr [ecx - 1], 0xfe */
  10974     _flag_a = (uint32_t)(MEM8(ecx + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24;
  10975     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10976     _flag_k = FK_NARROW(FK_CMP, 24);
  10977     if (CMP_AE(_flag_a, _flag_b)) goto L_39004108; /* 0x390040D4: jae 0x39004108 */
  10978 L_390040D6:
  10979     PUSH32(esp, 1); /* 0x390040D6: push 1 */
  10980     ecx = ebx; /* 0x390040D8: mov ecx, ebx */
  10981     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390040DA: call dword ptr [0x3900b040] */
  10982     RECOMP_FLAGS_IN();
  10983     ecx = MEM32(ebp + (-0xC)); /* 0x390040E0: mov ecx, dword ptr [ebp - 0xc] */
  10984     eax = MEM32(ecx + 0x4); /* 0x390040E3: mov eax, dword ptr [ecx + 4] */
  10985     /* test eax, eax */ /* 0x390040E6: test eax, eax */
  10986     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  10987     _cf = 0;
  10988     _flag_k = FK_TEST;
  10989     if (TEST_NZ(_flag_a, _flag_b)) goto L_390040EF; /* 0x390040E8: jne 0x390040ef */
  10990 L_390040EA:
  10991     eax = MEM32(0x3900B02C); /* 0x390040EA: mov eax, dword ptr [0x3900b02c] */
  10992 L_390040EF:
  10993     MEM32(ebx + 0x4) = eax; /* 0x390040EF: mov dword ptr [ebx + 4], eax */
  10994     edx = MEM32(ecx + 0x8); /* 0x390040F2: mov edx, dword ptr [ecx + 8] */
  10995     MEM32(ebx + 0x8) = edx; /* 0x390040F5: mov dword ptr [ebx + 8], edx */
  10996     ecx = MEM32(ecx + 0xC); /* 0x390040F8: mov ecx, dword ptr [ecx + 0xc] */
  10997     MEM32(ebx + 0xC) = ecx; /* 0x390040FB: mov dword ptr [ebx + 0xc], ecx */
  10998     SET_LO8(ecx, MEM8(eax + (-0x1))); /* 0x390040FE: mov cl, byte ptr [eax - 1] */
  10999     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(1) << 24;
  11000     SET_LO8(ecx, LO8(ecx) + 1); /* 0x39004101: inc cl */
  11001     _flag_k = FK_NARROW(FK_INC, 24);
  11002     MEM8(eax + (-0x1)) = (uint8_t)(LO8(ecx)); /* 0x39004103: mov byte ptr [eax - 1], cl */
  11003     goto L_3900414A; /* 0x39004106: jmp 0x3900414a */
  11004 L_39004108:
  11005     PUSH32(esp, 1); /* 0x39004108: push 1 */
  11006     PUSH32(esp, esi); /* 0x3900410A: push esi */
  11007     ecx = ebx; /* 0x3900410B: mov ecx, ebx */
  11008     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x3900410D: call dword ptr [0x3900b034] */
  11009     RECOMP_FLAGS_IN();
  11010     /* test LO8(eax), LO8(eax) */ /* 0x39004113: test al, al */
  11011     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  11012     _cf = 0;
  11013     _flag_k = FK_NARROW(FK_TEST, 24);
  11014     if (TEST_Z(_flag_a, _flag_b)) goto L_3900414A; /* 0x39004115: je 0x3900414a */
  11015 L_39004117:
  11016     edx = MEM32(ebp + (-0xC)); /* 0x39004117: mov edx, dword ptr [ebp - 0xc] */
  11017     eax = MEM32(edx + 0x4); /* 0x3900411A: mov eax, dword ptr [edx + 4] */
  11018     /* test eax, eax */ /* 0x3900411D: test eax, eax */
  11019     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11020     _cf = 0;
  11021     _flag_k = FK_TEST;
  11022     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004126; /* 0x3900411F: jne 0x39004126 */
  11023 L_39004121:
  11024     eax = MEM32(0x3900B02C); /* 0x39004121: mov eax, dword ptr [0x3900b02c] */
  11025 L_39004126:
  11026     edi = MEM32(ebx + 0x4); /* 0x39004126: mov edi, dword ptr [ebx + 4] */
  11027     ecx = esi; /* 0x39004129: mov ecx, esi */
  11028     esi = eax; /* 0x3900412B: mov esi, eax */
  11029     eax = ecx; /* 0x3900412D: mov eax, ecx */
  11030     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x3900412F: shr ecx, 2 */
  11031     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  11032     ecx = ecx >> 2u; /* 0x3900412F: shr ecx, 2 */
  11033     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39004132: 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; }
  11034     ecx = eax; /* 0x39004134: mov ecx, eax */
  11035     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
  11036     ecx = ecx & 3; /* 0x39004136: and ecx, 3 */
  11037     _cf = 0;
  11038     _flag_k = FK_TEST;
  11039     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39004139: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
  11040     ecx = MEM32(ebp + (-0x4)); /* 0x3900413B: mov ecx, dword ptr [ebp - 4] */
  11041     PUSH32(esp, ecx); /* 0x3900413E: push ecx */
  11042     ecx = ebx; /* 0x3900413F: mov ecx, ebx */
  11043     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39004141: call dword ptr [0x3900b038] */
  11044     RECOMP_FLAGS_IN();
  11045     edi = MEM32(ebp + (-0x8)); /* 0x39004147: mov edi, dword ptr [ebp - 8] */
  11046 L_3900414A:
  11047     edx = MEM32(ebp + 0x8); /* 0x3900414A: mov edx, dword ptr [ebp + 8] */
  11048     eax = MEM32(0x3900B008); /* 0x3900414D: mov eax, dword ptr [0x3900b008] */
  11049     ebx = edi + 0x20; /* 0x39004152: lea ebx, [edi + 0x20] */
  11050     ecx = MEM32(eax); /* 0x39004155: mov ecx, dword ptr [eax] */
  11051     esi = edx + 0x20; /* 0x39004157: lea esi, [edx + 0x20] */
  11052     edx = MEM32(edx + 0x28); /* 0x3900415A: mov edx, dword ptr [edx + 0x28] */
  11053     eax = edx; /* 0x3900415D: mov eax, edx */
  11054     /* cmp ecx, eax */ /* 0x3900415F: cmp ecx, eax */
  11055     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
  11056     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11057     _flag_k = FK_CMP;
  11058     MEM32(ebp + (-0x4)) = eax; /* 0x39004161: mov dword ptr [ebp - 4], eax */
  11059     if (CMP_AE(_flag_a, _flag_b)) goto L_3900416B; /* 0x39004164: jae 0x3900416b */
  11060 L_39004166:
  11061     MEM32(ebp + (-0x4)) = ecx; /* 0x39004166: mov dword ptr [ebp - 4], ecx */
  11062     eax = ecx; /* 0x39004169: mov eax, ecx */
  11063 L_3900416B:
  11064     /* cmp ebx, esi */ /* 0x3900416B: cmp ebx, esi */
  11065     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi);
  11066     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11067     _flag_k = FK_CMP;
  11068     if (CMP_NE(_flag_a, _flag_b)) goto L_3900418A; /* 0x3900416D: jne 0x3900418a */
  11069 L_3900416F:
  11070     PUSH32(esp, ecx); /* 0x3900416F: push ecx */
  11071     PUSH32(esp, eax); /* 0x39004170: push eax */
  11072     ecx = ebx; /* 0x39004171: mov ecx, ebx */
  11073     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x39004173: call dword ptr [0x3900b010] */
  11074     RECOMP_FLAGS_IN();
  11075     PUSH32(esp, 0); /* 0x39004179: push 0 */
  11076     PUSH32(esp, 0); /* 0x3900417B: push 0 */
  11077     ecx = ebx; /* 0x3900417D: mov ecx, ebx */
  11078     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x3900417F: call dword ptr [0x3900b010] */
  11079     RECOMP_FLAGS_IN();
  11080     goto L_39004211; /* 0x39004185: jmp 0x39004211 */
  11081 L_3900418A:
  11082     /* test eax, eax */ /* 0x3900418A: test eax, eax */
  11083     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11084     _cf = 0;
  11085     _flag_k = FK_TEST;
  11086     if (TEST_Z(_flag_a, _flag_b)) goto L_390041D4; /* 0x3900418C: jbe 0x390041d4 */
  11087 L_3900418E:
  11088     /* cmp eax, edx */ /* 0x3900418E: cmp eax, edx */
  11089     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
  11090     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11091     _flag_k = FK_CMP;
  11092     if (CMP_NE(_flag_a, _flag_b)) goto L_390041D4; /* 0x39004190: jne 0x390041d4 */
  11093 L_39004192:
  11094     ecx = MEM32(esi + 0x4); /* 0x39004192: mov ecx, dword ptr [esi + 4] */
  11095     /* test ecx, ecx */ /* 0x39004195: test ecx, ecx */
  11096     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  11097     _cf = 0;
  11098     _flag_k = FK_TEST;
  11099     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900419F; /* 0x39004197: jne 0x3900419f */
  11100 L_39004199:
  11101     ecx = MEM32(0x3900B02C); /* 0x39004199: mov ecx, dword ptr [0x3900b02c] */
  11102 L_3900419F:
  11103     /* cmp MEM8(ecx + (-0x1)), 0xFEu */ /* 0x3900419F: cmp byte ptr [ecx - 1], 0xfe */
  11104     _flag_a = (uint32_t)(MEM8(ecx + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24;
  11105     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11106     _flag_k = FK_NARROW(FK_CMP, 24);
  11107     if (CMP_AE(_flag_a, _flag_b)) goto L_390041D4; /* 0x390041A3: jae 0x390041d4 */
  11108 L_390041A5:
  11109     PUSH32(esp, 1); /* 0x390041A5: push 1 */
  11110     ecx = ebx; /* 0x390041A7: mov ecx, ebx */
  11111     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390041A9: call dword ptr [0x3900b040] */
  11112     RECOMP_FLAGS_IN();
  11113     eax = MEM32(esi + 0x4); /* 0x390041AF: mov eax, dword ptr [esi + 4] */
  11114     /* test eax, eax */ /* 0x390041B2: test eax, eax */
  11115     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11116     _cf = 0;
  11117     _flag_k = FK_TEST;
  11118     if (TEST_NZ(_flag_a, _flag_b)) goto L_390041BB; /* 0x390041B4: jne 0x390041bb */
  11119 L_390041B6:
  11120     eax = MEM32(0x3900B02C); /* 0x390041B6: mov eax, dword ptr [0x3900b02c] */
  11121 L_390041BB:
  11122     MEM32(ebx + 0x4) = eax; /* 0x390041BB: mov dword ptr [ebx + 4], eax */
  11123     ecx = MEM32(esi + 0x8); /* 0x390041BE: mov ecx, dword ptr [esi + 8] */
  11124     MEM32(ebx + 0x8) = ecx; /* 0x390041C1: mov dword ptr [ebx + 8], ecx */
  11125     edx = MEM32(esi + 0xC); /* 0x390041C4: mov edx, dword ptr [esi + 0xc] */
  11126     MEM32(ebx + 0xC) = edx; /* 0x390041C7: mov dword ptr [ebx + 0xc], edx */
  11127     SET_LO8(ecx, MEM8(eax + (-0x1))); /* 0x390041CA: mov cl, byte ptr [eax - 1] */
  11128     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(1) << 24;
  11129     SET_LO8(ecx, LO8(ecx) + 1); /* 0x390041CD: inc cl */
  11130     _flag_k = FK_NARROW(FK_INC, 24);
  11131     MEM8(eax + (-0x1)) = (uint8_t)(LO8(ecx)); /* 0x390041CF: mov byte ptr [eax - 1], cl */
  11132     goto L_39004211; /* 0x390041D2: jmp 0x39004211 */
  11133 L_390041D4:
  11134     PUSH32(esp, 1); /* 0x390041D4: push 1 */
  11135     PUSH32(esp, eax); /* 0x390041D6: push eax */
  11136     ecx = ebx; /* 0x390041D7: mov ecx, ebx */
  11137     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x390041D9: call dword ptr [0x3900b034] */
  11138     RECOMP_FLAGS_IN();
  11139     /* test LO8(eax), LO8(eax) */ /* 0x390041DF: test al, al */
  11140     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  11141     _cf = 0;
  11142     _flag_k = FK_NARROW(FK_TEST, 24);
  11143     if (TEST_Z(_flag_a, _flag_b)) goto L_39004211; /* 0x390041E1: je 0x39004211 */
  11144 L_390041E3:
  11145     esi = MEM32(esi + 0x4); /* 0x390041E3: mov esi, dword ptr [esi + 4] */
  11146     /* test esi, esi */ /* 0x390041E6: test esi, esi */
  11147     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
  11148     _cf = 0;
  11149     _flag_k = FK_TEST;
  11150     if (TEST_NZ(_flag_a, _flag_b)) goto L_390041F0; /* 0x390041E8: jne 0x390041f0 */
  11151 L_390041EA:
  11152     esi = MEM32(0x3900B02C); /* 0x390041EA: mov esi, dword ptr [0x3900b02c] */
  11153 L_390041F0:
  11154     ecx = MEM32(ebp + (-0x4)); /* 0x390041F0: mov ecx, dword ptr [ebp - 4] */
  11155     edi = MEM32(ebx + 0x4); /* 0x390041F3: mov edi, dword ptr [ebx + 4] */
  11156     eax = ecx; /* 0x390041F6: mov eax, ecx */
  11157     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x390041F8: shr ecx, 2 */
  11158     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  11159     ecx = ecx >> 2u; /* 0x390041F8: shr ecx, 2 */
  11160     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390041FB: 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; }
  11161     ecx = eax; /* 0x390041FD: mov ecx, eax */
  11162     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
  11163     ecx = ecx & 3; /* 0x390041FF: and ecx, 3 */
  11164     _cf = 0;
  11165     _flag_k = FK_TEST;
  11166     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39004202: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
  11167     ecx = MEM32(ebx + 0x4); /* 0x39004204: mov ecx, dword ptr [ebx + 4] */
  11168     edi = MEM32(ebp + (-0x8)); /* 0x39004207: mov edi, dword ptr [ebp - 8] */
  11169     MEM32(ebx + 0x8) = eax; /* 0x3900420A: mov dword ptr [ebx + 8], eax */
  11170     MEM8(eax + ecx) = (uint8_t)(0); /* 0x3900420D: mov byte ptr [eax + ecx], 0 */
  11171 L_39004211:
  11172     eax = MEM32(ebp + 0x8); /* 0x39004211: mov eax, dword ptr [ebp + 8] */
  11173     edx = MEM32(eax + 0x30); /* 0x39004214: mov edx, dword ptr [eax + 0x30] */
  11174     MEM32(edi + 0x30) = edx; /* 0x39004217: mov dword ptr [edi + 0x30], edx */
  11175     ecx = MEM32(eax + 0x34); /* 0x3900421A: mov ecx, dword ptr [eax + 0x34] */
  11176     MEM32(edi + 0x34) = ecx; /* 0x3900421D: mov dword ptr [edi + 0x34], ecx */
  11177     edx = MEM32(eax + 0x38); /* 0x39004220: mov edx, dword ptr [eax + 0x38] */
  11178     MEM32(edi + 0x38) = edx; /* 0x39004223: mov dword ptr [edi + 0x38], edx */
  11179     ecx = MEM32(eax + 0x3C); /* 0x39004226: mov ecx, dword ptr [eax + 0x3c] */
  11180     MEM32(edi + 0x3C) = ecx; /* 0x39004229: mov dword ptr [edi + 0x3c], ecx */
  11181     edx = MEM32(eax + 0x40); /* 0x3900422C: mov edx, dword ptr [eax + 0x40] */
  11182     MEM32(edi + 0x40) = edx; /* 0x3900422F: mov dword ptr [edi + 0x40], edx */
  11183     ecx = MEM32(eax + 0x44); /* 0x39004232: mov ecx, dword ptr [eax + 0x44] */
  11184     MEM32(edi + 0x44) = ecx; /* 0x39004235: mov dword ptr [edi + 0x44], ecx */
  11185     edx = MEM32(eax + 0x48); /* 0x39004238: mov edx, dword ptr [eax + 0x48] */
  11186     MEM32(edi + 0x48) = edx; /* 0x3900423B: mov dword ptr [edi + 0x48], edx */
  11187     ecx = MEM32(eax + 0x4C); /* 0x3900423E: mov ecx, dword ptr [eax + 0x4c] */
  11188     MEM32(edi + 0x4C) = ecx; /* 0x39004241: mov dword ptr [edi + 0x4c], ecx */
  11189     edx = MEM32(eax + 0x50); /* 0x39004244: mov edx, dword ptr [eax + 0x50] */
  11190     MEM32(edi + 0x50) = edx; /* 0x39004247: mov dword ptr [edi + 0x50], edx */
  11191     eax = edi; /* 0x3900424A: mov eax, edi */
  11192     edi = POP32_VAL(esp); /* 0x3900424C: pop edi */
  11193     esi = POP32_VAL(esp); /* 0x3900424D: pop esi */
  11194     ebx = POP32_VAL(esp); /* 0x3900424E: pop ebx */
  11195     esp = ebp; /* 0x3900424F: mov esp, ebp */
  11196     ebp = POP32_VAL(esp); /* 0x39004251: pop ebp */
  11197     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39004252: ret 4 */
  11198     RECOMP_REGS_OUT();
  11199 }
  11200 
  11201 void sub_3900407A(void) {
  11202     int _fpu_cmp = 0;
  11203     uint32_t _cf = 0;
  11204     int _df = 1;
  11205     uint32_t _flag_k = FK_NONE;
  11206     uint32_t _flag_a = 0, _flag_b = 0;
  11207     uint32_t _itail_tgt = 0;
  11208     RECOMP_REGS_LOCALS
  11209     RECOMP_ENTER(0x3900407Au);
  11210 
  11211 L_3900407A:
  11212     edx = MEM32(0x3900B008); /* 0x3900407A: mov edx, dword ptr [0x3900b008] */
  11213     ecx = esi + 0x10; /* 0x39004080: lea ecx, [esi + 0x10] */
  11214     MEM32(ebp + (-0xC)) = ecx; /* 0x39004083: mov dword ptr [ebp - 0xc], ecx */
  11215     ebx = edi + 0x10; /* 0x39004086: lea ebx, [edi + 0x10] */
  11216     eax = MEM32(edx); /* 0x39004089: mov eax, dword ptr [edx] */
  11217     edx = MEM32(ecx + 0x8); /* 0x3900408B: mov edx, dword ptr [ecx + 8] */
  11218     esi = edx; /* 0x3900408E: mov esi, edx */
  11219     /* cmp eax, esi */ /* 0x39004090: cmp eax, esi */
  11220     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi);
  11221     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11222     _flag_k = FK_CMP;
  11223     MEM32(ebp + (-0x4)) = esi; /* 0x39004092: mov dword ptr [ebp - 4], esi */
  11224     if (CMP_AE(_flag_a, _flag_b)) goto L_3900409C; /* 0x39004095: jae 0x3900409c */
  11225 L_39004097:
  11226     MEM32(ebp + (-0x4)) = eax; /* 0x39004097: mov dword ptr [ebp - 4], eax */
  11227     esi = eax; /* 0x3900409A: mov esi, eax */
  11228 L_3900409C:
  11229     /* cmp ebx, ecx */ /* 0x3900409C: cmp ebx, ecx */
  11230     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ecx);
  11231     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11232     _flag_k = FK_CMP;
  11233     if (CMP_NE(_flag_a, _flag_b)) goto L_390040BB; /* 0x3900409E: jne 0x390040bb */
  11234 L_390040A0:
  11235     PUSH32(esp, eax); /* 0x390040A0: push eax */
  11236     PUSH32(esp, esi); /* 0x390040A1: push esi */
  11237     ecx = ebx; /* 0x390040A2: mov ecx, ebx */
  11238     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x390040A4: call dword ptr [0x3900b010] */
  11239     RECOMP_FLAGS_IN();
  11240     PUSH32(esp, 0); /* 0x390040AA: push 0 */
  11241     PUSH32(esp, 0); /* 0x390040AC: push 0 */
  11242     ecx = ebx; /* 0x390040AE: mov ecx, ebx */
  11243     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x390040B0: call dword ptr [0x3900b010] */
  11244     RECOMP_FLAGS_IN();
  11245     goto L_3900414A; /* 0x390040B6: jmp 0x3900414a */
  11246 L_390040BB:
  11247     /* test esi, esi */ /* 0x390040BB: test esi, esi */
  11248     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
  11249     _cf = 0;
  11250     _flag_k = FK_TEST;
  11251     if (TEST_Z(_flag_a, _flag_b)) goto L_39004108; /* 0x390040BD: jbe 0x39004108 */
  11252 L_390040BF:
  11253     /* cmp esi, edx */ /* 0x390040BF: cmp esi, edx */
  11254     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx);
  11255     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11256     _flag_k = FK_CMP;
  11257     if (CMP_NE(_flag_a, _flag_b)) goto L_39004108; /* 0x390040C1: jne 0x39004108 */
  11258 L_390040C3:
  11259     ecx = MEM32(ecx + 0x4); /* 0x390040C3: mov ecx, dword ptr [ecx + 4] */
  11260     /* test ecx, ecx */ /* 0x390040C6: test ecx, ecx */
  11261     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  11262     _cf = 0;
  11263     _flag_k = FK_TEST;
  11264     if (TEST_NZ(_flag_a, _flag_b)) goto L_390040D0; /* 0x390040C8: jne 0x390040d0 */
  11265 L_390040CA:
  11266     ecx = MEM32(0x3900B02C); /* 0x390040CA: mov ecx, dword ptr [0x3900b02c] */
  11267 L_390040D0:
  11268     /* cmp MEM8(ecx + (-0x1)), 0xFEu */ /* 0x390040D0: cmp byte ptr [ecx - 1], 0xfe */
  11269     _flag_a = (uint32_t)(MEM8(ecx + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24;
  11270     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11271     _flag_k = FK_NARROW(FK_CMP, 24);
  11272     if (CMP_AE(_flag_a, _flag_b)) goto L_39004108; /* 0x390040D4: jae 0x39004108 */
  11273 L_390040D6:
  11274     PUSH32(esp, 1); /* 0x390040D6: push 1 */
  11275     ecx = ebx; /* 0x390040D8: mov ecx, ebx */
  11276     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390040DA: call dword ptr [0x3900b040] */
  11277     RECOMP_FLAGS_IN();
  11278     ecx = MEM32(ebp + (-0xC)); /* 0x390040E0: mov ecx, dword ptr [ebp - 0xc] */
  11279     eax = MEM32(ecx + 0x4); /* 0x390040E3: mov eax, dword ptr [ecx + 4] */
  11280     /* test eax, eax */ /* 0x390040E6: test eax, eax */
  11281     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11282     _cf = 0;
  11283     _flag_k = FK_TEST;
  11284     if (TEST_NZ(_flag_a, _flag_b)) goto L_390040EF; /* 0x390040E8: jne 0x390040ef */
  11285 L_390040EA:
  11286     eax = MEM32(0x3900B02C); /* 0x390040EA: mov eax, dword ptr [0x3900b02c] */
  11287 L_390040EF:
  11288     MEM32(ebx + 0x4) = eax; /* 0x390040EF: mov dword ptr [ebx + 4], eax */
  11289     edx = MEM32(ecx + 0x8); /* 0x390040F2: mov edx, dword ptr [ecx + 8] */
  11290     MEM32(ebx + 0x8) = edx; /* 0x390040F5: mov dword ptr [ebx + 8], edx */
  11291     ecx = MEM32(ecx + 0xC); /* 0x390040F8: mov ecx, dword ptr [ecx + 0xc] */
  11292     MEM32(ebx + 0xC) = ecx; /* 0x390040FB: mov dword ptr [ebx + 0xc], ecx */
  11293     SET_LO8(ecx, MEM8(eax + (-0x1))); /* 0x390040FE: mov cl, byte ptr [eax - 1] */
  11294     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(1) << 24;
  11295     SET_LO8(ecx, LO8(ecx) + 1); /* 0x39004101: inc cl */
  11296     _flag_k = FK_NARROW(FK_INC, 24);
  11297     MEM8(eax + (-0x1)) = (uint8_t)(LO8(ecx)); /* 0x39004103: mov byte ptr [eax - 1], cl */
  11298     goto L_3900414A; /* 0x39004106: jmp 0x3900414a */
  11299 L_39004108:
  11300     PUSH32(esp, 1); /* 0x39004108: push 1 */
  11301     PUSH32(esp, esi); /* 0x3900410A: push esi */
  11302     ecx = ebx; /* 0x3900410B: mov ecx, ebx */
  11303     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x3900410D: call dword ptr [0x3900b034] */
  11304     RECOMP_FLAGS_IN();
  11305     /* test LO8(eax), LO8(eax) */ /* 0x39004113: test al, al */
  11306     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  11307     _cf = 0;
  11308     _flag_k = FK_NARROW(FK_TEST, 24);
  11309     if (TEST_Z(_flag_a, _flag_b)) goto L_3900414A; /* 0x39004115: je 0x3900414a */
  11310 L_39004117:
  11311     edx = MEM32(ebp + (-0xC)); /* 0x39004117: mov edx, dword ptr [ebp - 0xc] */
  11312     eax = MEM32(edx + 0x4); /* 0x3900411A: mov eax, dword ptr [edx + 4] */
  11313     /* test eax, eax */ /* 0x3900411D: test eax, eax */
  11314     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11315     _cf = 0;
  11316     _flag_k = FK_TEST;
  11317     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004126; /* 0x3900411F: jne 0x39004126 */
  11318 L_39004121:
  11319     eax = MEM32(0x3900B02C); /* 0x39004121: mov eax, dword ptr [0x3900b02c] */
  11320 L_39004126:
  11321     edi = MEM32(ebx + 0x4); /* 0x39004126: mov edi, dword ptr [ebx + 4] */
  11322     ecx = esi; /* 0x39004129: mov ecx, esi */
  11323     esi = eax; /* 0x3900412B: mov esi, eax */
  11324     eax = ecx; /* 0x3900412D: mov eax, ecx */
  11325     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x3900412F: shr ecx, 2 */
  11326     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  11327     ecx = ecx >> 2u; /* 0x3900412F: shr ecx, 2 */
  11328     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39004132: 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; }
  11329     ecx = eax; /* 0x39004134: mov ecx, eax */
  11330     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
  11331     ecx = ecx & 3; /* 0x39004136: and ecx, 3 */
  11332     _cf = 0;
  11333     _flag_k = FK_TEST;
  11334     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39004139: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
  11335     ecx = MEM32(ebp + (-0x4)); /* 0x3900413B: mov ecx, dword ptr [ebp - 4] */
  11336     PUSH32(esp, ecx); /* 0x3900413E: push ecx */
  11337     ecx = ebx; /* 0x3900413F: mov ecx, ebx */
  11338     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39004141: call dword ptr [0x3900b038] */
  11339     RECOMP_FLAGS_IN();
  11340     edi = MEM32(ebp + (-0x8)); /* 0x39004147: mov edi, dword ptr [ebp - 8] */
  11341 L_3900414A:
  11342     edx = MEM32(ebp + 0x8); /* 0x3900414A: mov edx, dword ptr [ebp + 8] */
  11343     eax = MEM32(0x3900B008); /* 0x3900414D: mov eax, dword ptr [0x3900b008] */
  11344     ebx = edi + 0x20; /* 0x39004152: lea ebx, [edi + 0x20] */
  11345     ecx = MEM32(eax); /* 0x39004155: mov ecx, dword ptr [eax] */
  11346     esi = edx + 0x20; /* 0x39004157: lea esi, [edx + 0x20] */
  11347     edx = MEM32(edx + 0x28); /* 0x3900415A: mov edx, dword ptr [edx + 0x28] */
  11348     eax = edx; /* 0x3900415D: mov eax, edx */
  11349     /* cmp ecx, eax */ /* 0x3900415F: cmp ecx, eax */
  11350     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
  11351     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11352     _flag_k = FK_CMP;
  11353     MEM32(ebp + (-0x4)) = eax; /* 0x39004161: mov dword ptr [ebp - 4], eax */
  11354     if (CMP_AE(_flag_a, _flag_b)) goto L_3900416B; /* 0x39004164: jae 0x3900416b */
  11355 L_39004166:
  11356     MEM32(ebp + (-0x4)) = ecx; /* 0x39004166: mov dword ptr [ebp - 4], ecx */
  11357     eax = ecx; /* 0x39004169: mov eax, ecx */
  11358 L_3900416B:
  11359     /* cmp ebx, esi */ /* 0x3900416B: cmp ebx, esi */
  11360     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi);
  11361     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11362     _flag_k = FK_CMP;
  11363     if (CMP_NE(_flag_a, _flag_b)) goto L_3900418A; /* 0x3900416D: jne 0x3900418a */
  11364 L_3900416F:
  11365     PUSH32(esp, ecx); /* 0x3900416F: push ecx */
  11366     PUSH32(esp, eax); /* 0x39004170: push eax */
  11367     ecx = ebx; /* 0x39004171: mov ecx, ebx */
  11368     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x39004173: call dword ptr [0x3900b010] */
  11369     RECOMP_FLAGS_IN();
  11370     PUSH32(esp, 0); /* 0x39004179: push 0 */
  11371     PUSH32(esp, 0); /* 0x3900417B: push 0 */
  11372     ecx = ebx; /* 0x3900417D: mov ecx, ebx */
  11373     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x3900417F: call dword ptr [0x3900b010] */
  11374     RECOMP_FLAGS_IN();
  11375     goto L_39004211; /* 0x39004185: jmp 0x39004211 */
  11376 L_3900418A:
  11377     /* test eax, eax */ /* 0x3900418A: test eax, eax */
  11378     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11379     _cf = 0;
  11380     _flag_k = FK_TEST;
  11381     if (TEST_Z(_flag_a, _flag_b)) goto L_390041D4; /* 0x3900418C: jbe 0x390041d4 */
  11382 L_3900418E:
  11383     /* cmp eax, edx */ /* 0x3900418E: cmp eax, edx */
  11384     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
  11385     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11386     _flag_k = FK_CMP;
  11387     if (CMP_NE(_flag_a, _flag_b)) goto L_390041D4; /* 0x39004190: jne 0x390041d4 */
  11388 L_39004192:
  11389     ecx = MEM32(esi + 0x4); /* 0x39004192: mov ecx, dword ptr [esi + 4] */
  11390     /* test ecx, ecx */ /* 0x39004195: test ecx, ecx */
  11391     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  11392     _cf = 0;
  11393     _flag_k = FK_TEST;
  11394     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900419F; /* 0x39004197: jne 0x3900419f */
  11395 L_39004199:
  11396     ecx = MEM32(0x3900B02C); /* 0x39004199: mov ecx, dword ptr [0x3900b02c] */
  11397 L_3900419F:
  11398     /* cmp MEM8(ecx + (-0x1)), 0xFEu */ /* 0x3900419F: cmp byte ptr [ecx - 1], 0xfe */
  11399     _flag_a = (uint32_t)(MEM8(ecx + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24;
  11400     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11401     _flag_k = FK_NARROW(FK_CMP, 24);
  11402     if (CMP_AE(_flag_a, _flag_b)) goto L_390041D4; /* 0x390041A3: jae 0x390041d4 */
  11403 L_390041A5:
  11404     PUSH32(esp, 1); /* 0x390041A5: push 1 */
  11405     ecx = ebx; /* 0x390041A7: mov ecx, ebx */
  11406     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390041A9: call dword ptr [0x3900b040] */
  11407     RECOMP_FLAGS_IN();
  11408     eax = MEM32(esi + 0x4); /* 0x390041AF: mov eax, dword ptr [esi + 4] */
  11409     /* test eax, eax */ /* 0x390041B2: test eax, eax */
  11410     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11411     _cf = 0;
  11412     _flag_k = FK_TEST;
  11413     if (TEST_NZ(_flag_a, _flag_b)) goto L_390041BB; /* 0x390041B4: jne 0x390041bb */
  11414 L_390041B6:
  11415     eax = MEM32(0x3900B02C); /* 0x390041B6: mov eax, dword ptr [0x3900b02c] */
  11416 L_390041BB:
  11417     MEM32(ebx + 0x4) = eax; /* 0x390041BB: mov dword ptr [ebx + 4], eax */
  11418     ecx = MEM32(esi + 0x8); /* 0x390041BE: mov ecx, dword ptr [esi + 8] */
  11419     MEM32(ebx + 0x8) = ecx; /* 0x390041C1: mov dword ptr [ebx + 8], ecx */
  11420     edx = MEM32(esi + 0xC); /* 0x390041C4: mov edx, dword ptr [esi + 0xc] */
  11421     MEM32(ebx + 0xC) = edx; /* 0x390041C7: mov dword ptr [ebx + 0xc], edx */
  11422     SET_LO8(ecx, MEM8(eax + (-0x1))); /* 0x390041CA: mov cl, byte ptr [eax - 1] */
  11423     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(1) << 24;
  11424     SET_LO8(ecx, LO8(ecx) + 1); /* 0x390041CD: inc cl */
  11425     _flag_k = FK_NARROW(FK_INC, 24);
  11426     MEM8(eax + (-0x1)) = (uint8_t)(LO8(ecx)); /* 0x390041CF: mov byte ptr [eax - 1], cl */
  11427     goto L_39004211; /* 0x390041D2: jmp 0x39004211 */
  11428 L_390041D4:
  11429     PUSH32(esp, 1); /* 0x390041D4: push 1 */
  11430     PUSH32(esp, eax); /* 0x390041D6: push eax */
  11431     ecx = ebx; /* 0x390041D7: mov ecx, ebx */
  11432     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x390041D9: call dword ptr [0x3900b034] */
  11433     RECOMP_FLAGS_IN();
  11434     /* test LO8(eax), LO8(eax) */ /* 0x390041DF: test al, al */
  11435     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  11436     _cf = 0;
  11437     _flag_k = FK_NARROW(FK_TEST, 24);
  11438     if (TEST_Z(_flag_a, _flag_b)) goto L_39004211; /* 0x390041E1: je 0x39004211 */
  11439 L_390041E3:
  11440     esi = MEM32(esi + 0x4); /* 0x390041E3: mov esi, dword ptr [esi + 4] */
  11441     /* test esi, esi */ /* 0x390041E6: test esi, esi */
  11442     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
  11443     _cf = 0;
  11444     _flag_k = FK_TEST;
  11445     if (TEST_NZ(_flag_a, _flag_b)) goto L_390041F0; /* 0x390041E8: jne 0x390041f0 */
  11446 L_390041EA:
  11447     esi = MEM32(0x3900B02C); /* 0x390041EA: mov esi, dword ptr [0x3900b02c] */
  11448 L_390041F0:
  11449     ecx = MEM32(ebp + (-0x4)); /* 0x390041F0: mov ecx, dword ptr [ebp - 4] */
  11450     edi = MEM32(ebx + 0x4); /* 0x390041F3: mov edi, dword ptr [ebx + 4] */
  11451     eax = ecx; /* 0x390041F6: mov eax, ecx */
  11452     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x390041F8: shr ecx, 2 */
  11453     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  11454     ecx = ecx >> 2u; /* 0x390041F8: shr ecx, 2 */
  11455     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390041FB: 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; }
  11456     ecx = eax; /* 0x390041FD: mov ecx, eax */
  11457     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
  11458     ecx = ecx & 3; /* 0x390041FF: and ecx, 3 */
  11459     _cf = 0;
  11460     _flag_k = FK_TEST;
  11461     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39004202: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
  11462     ecx = MEM32(ebx + 0x4); /* 0x39004204: mov ecx, dword ptr [ebx + 4] */
  11463     edi = MEM32(ebp + (-0x8)); /* 0x39004207: mov edi, dword ptr [ebp - 8] */
  11464     MEM32(ebx + 0x8) = eax; /* 0x3900420A: mov dword ptr [ebx + 8], eax */
  11465     MEM8(eax + ecx) = (uint8_t)(0); /* 0x3900420D: mov byte ptr [eax + ecx], 0 */
  11466 L_39004211:
  11467     eax = MEM32(ebp + 0x8); /* 0x39004211: mov eax, dword ptr [ebp + 8] */
  11468     edx = MEM32(eax + 0x30); /* 0x39004214: mov edx, dword ptr [eax + 0x30] */
  11469     MEM32(edi + 0x30) = edx; /* 0x39004217: mov dword ptr [edi + 0x30], edx */
  11470     ecx = MEM32(eax + 0x34); /* 0x3900421A: mov ecx, dword ptr [eax + 0x34] */
  11471     MEM32(edi + 0x34) = ecx; /* 0x3900421D: mov dword ptr [edi + 0x34], ecx */
  11472     edx = MEM32(eax + 0x38); /* 0x39004220: mov edx, dword ptr [eax + 0x38] */
  11473     MEM32(edi + 0x38) = edx; /* 0x39004223: mov dword ptr [edi + 0x38], edx */
  11474     ecx = MEM32(eax + 0x3C); /* 0x39004226: mov ecx, dword ptr [eax + 0x3c] */
  11475     MEM32(edi + 0x3C) = ecx; /* 0x39004229: mov dword ptr [edi + 0x3c], ecx */
  11476     edx = MEM32(eax + 0x40); /* 0x3900422C: mov edx, dword ptr [eax + 0x40] */
  11477     MEM32(edi + 0x40) = edx; /* 0x3900422F: mov dword ptr [edi + 0x40], edx */
  11478     ecx = MEM32(eax + 0x44); /* 0x39004232: mov ecx, dword ptr [eax + 0x44] */
  11479     MEM32(edi + 0x44) = ecx; /* 0x39004235: mov dword ptr [edi + 0x44], ecx */
  11480     edx = MEM32(eax + 0x48); /* 0x39004238: mov edx, dword ptr [eax + 0x48] */
  11481     MEM32(edi + 0x48) = edx; /* 0x3900423B: mov dword ptr [edi + 0x48], edx */
  11482     ecx = MEM32(eax + 0x4C); /* 0x3900423E: mov ecx, dword ptr [eax + 0x4c] */
  11483     MEM32(edi + 0x4C) = ecx; /* 0x39004241: mov dword ptr [edi + 0x4c], ecx */
  11484     edx = MEM32(eax + 0x50); /* 0x39004244: mov edx, dword ptr [eax + 0x50] */
  11485     MEM32(edi + 0x50) = edx; /* 0x39004247: mov dword ptr [edi + 0x50], edx */
  11486     eax = edi; /* 0x3900424A: mov eax, edi */
  11487     edi = POP32_VAL(esp); /* 0x3900424C: pop edi */
  11488     esi = POP32_VAL(esp); /* 0x3900424D: pop esi */
  11489     ebx = POP32_VAL(esp); /* 0x3900424E: pop ebx */
  11490     esp = ebp; /* 0x3900424F: mov esp, ebp */
  11491     ebp = POP32_VAL(esp); /* 0x39004251: pop ebp */
  11492     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39004252: ret 4 */
  11493     RECOMP_REGS_OUT();
  11494 }
  11495 
  11496 void sub_3900414A(void) {
  11497     int _fpu_cmp = 0;
  11498     uint32_t _cf = 0;
  11499     int _df = 1;
  11500     uint32_t _flag_k = FK_NONE;
  11501     uint32_t _flag_a = 0, _flag_b = 0;
  11502     uint32_t _itail_tgt = 0;
  11503     RECOMP_REGS_LOCALS
  11504     RECOMP_ENTER(0x3900414Au);
  11505 
  11506 L_3900414A:
  11507     edx = MEM32(ebp + 0x8); /* 0x3900414A: mov edx, dword ptr [ebp + 8] */
  11508     eax = MEM32(0x3900B008); /* 0x3900414D: mov eax, dword ptr [0x3900b008] */
  11509     ebx = edi + 0x20; /* 0x39004152: lea ebx, [edi + 0x20] */
  11510     ecx = MEM32(eax); /* 0x39004155: mov ecx, dword ptr [eax] */
  11511     esi = edx + 0x20; /* 0x39004157: lea esi, [edx + 0x20] */
  11512     edx = MEM32(edx + 0x28); /* 0x3900415A: mov edx, dword ptr [edx + 0x28] */
  11513     eax = edx; /* 0x3900415D: mov eax, edx */
  11514     /* cmp ecx, eax */ /* 0x3900415F: cmp ecx, eax */
  11515     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
  11516     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11517     _flag_k = FK_CMP;
  11518     MEM32(ebp + (-0x4)) = eax; /* 0x39004161: mov dword ptr [ebp - 4], eax */
  11519     if (CMP_AE(_flag_a, _flag_b)) goto L_3900416B; /* 0x39004164: jae 0x3900416b */
  11520 L_39004166:
  11521     MEM32(ebp + (-0x4)) = ecx; /* 0x39004166: mov dword ptr [ebp - 4], ecx */
  11522     eax = ecx; /* 0x39004169: mov eax, ecx */
  11523 L_3900416B:
  11524     /* cmp ebx, esi */ /* 0x3900416B: cmp ebx, esi */
  11525     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi);
  11526     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11527     _flag_k = FK_CMP;
  11528     if (CMP_NE(_flag_a, _flag_b)) goto L_3900418A; /* 0x3900416D: jne 0x3900418a */
  11529 L_3900416F:
  11530     PUSH32(esp, ecx); /* 0x3900416F: push ecx */
  11531     PUSH32(esp, eax); /* 0x39004170: push eax */
  11532     ecx = ebx; /* 0x39004171: mov ecx, ebx */
  11533     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x39004173: call dword ptr [0x3900b010] */
  11534     RECOMP_FLAGS_IN();
  11535     PUSH32(esp, 0); /* 0x39004179: push 0 */
  11536     PUSH32(esp, 0); /* 0x3900417B: push 0 */
  11537     ecx = ebx; /* 0x3900417D: mov ecx, ebx */
  11538     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x3900417F: call dword ptr [0x3900b010] */
  11539     RECOMP_FLAGS_IN();
  11540     goto L_39004211; /* 0x39004185: jmp 0x39004211 */
  11541 L_3900418A:
  11542     /* test eax, eax */ /* 0x3900418A: test eax, eax */
  11543     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11544     _cf = 0;
  11545     _flag_k = FK_TEST;
  11546     if (TEST_Z(_flag_a, _flag_b)) goto L_390041D4; /* 0x3900418C: jbe 0x390041d4 */
  11547 L_3900418E:
  11548     /* cmp eax, edx */ /* 0x3900418E: cmp eax, edx */
  11549     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
  11550     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11551     _flag_k = FK_CMP;
  11552     if (CMP_NE(_flag_a, _flag_b)) goto L_390041D4; /* 0x39004190: jne 0x390041d4 */
  11553 L_39004192:
  11554     ecx = MEM32(esi + 0x4); /* 0x39004192: mov ecx, dword ptr [esi + 4] */
  11555     /* test ecx, ecx */ /* 0x39004195: test ecx, ecx */
  11556     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  11557     _cf = 0;
  11558     _flag_k = FK_TEST;
  11559     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900419F; /* 0x39004197: jne 0x3900419f */
  11560 L_39004199:
  11561     ecx = MEM32(0x3900B02C); /* 0x39004199: mov ecx, dword ptr [0x3900b02c] */
  11562 L_3900419F:
  11563     /* cmp MEM8(ecx + (-0x1)), 0xFEu */ /* 0x3900419F: cmp byte ptr [ecx - 1], 0xfe */
  11564     _flag_a = (uint32_t)(MEM8(ecx + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24;
  11565     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11566     _flag_k = FK_NARROW(FK_CMP, 24);
  11567     if (CMP_AE(_flag_a, _flag_b)) goto L_390041D4; /* 0x390041A3: jae 0x390041d4 */
  11568 L_390041A5:
  11569     PUSH32(esp, 1); /* 0x390041A5: push 1 */
  11570     ecx = ebx; /* 0x390041A7: mov ecx, ebx */
  11571     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390041A9: call dword ptr [0x3900b040] */
  11572     RECOMP_FLAGS_IN();
  11573     eax = MEM32(esi + 0x4); /* 0x390041AF: mov eax, dword ptr [esi + 4] */
  11574     /* test eax, eax */ /* 0x390041B2: test eax, eax */
  11575     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11576     _cf = 0;
  11577     _flag_k = FK_TEST;
  11578     if (TEST_NZ(_flag_a, _flag_b)) goto L_390041BB; /* 0x390041B4: jne 0x390041bb */
  11579 L_390041B6:
  11580     eax = MEM32(0x3900B02C); /* 0x390041B6: mov eax, dword ptr [0x3900b02c] */
  11581 L_390041BB:
  11582     MEM32(ebx + 0x4) = eax; /* 0x390041BB: mov dword ptr [ebx + 4], eax */
  11583     ecx = MEM32(esi + 0x8); /* 0x390041BE: mov ecx, dword ptr [esi + 8] */
  11584     MEM32(ebx + 0x8) = ecx; /* 0x390041C1: mov dword ptr [ebx + 8], ecx */
  11585     edx = MEM32(esi + 0xC); /* 0x390041C4: mov edx, dword ptr [esi + 0xc] */
  11586     MEM32(ebx + 0xC) = edx; /* 0x390041C7: mov dword ptr [ebx + 0xc], edx */
  11587     SET_LO8(ecx, MEM8(eax + (-0x1))); /* 0x390041CA: mov cl, byte ptr [eax - 1] */
  11588     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(1) << 24;
  11589     SET_LO8(ecx, LO8(ecx) + 1); /* 0x390041CD: inc cl */
  11590     _flag_k = FK_NARROW(FK_INC, 24);
  11591     MEM8(eax + (-0x1)) = (uint8_t)(LO8(ecx)); /* 0x390041CF: mov byte ptr [eax - 1], cl */
  11592     goto L_39004211; /* 0x390041D2: jmp 0x39004211 */
  11593 L_390041D4:
  11594     PUSH32(esp, 1); /* 0x390041D4: push 1 */
  11595     PUSH32(esp, eax); /* 0x390041D6: push eax */
  11596     ecx = ebx; /* 0x390041D7: mov ecx, ebx */
  11597     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x390041D9: call dword ptr [0x3900b034] */
  11598     RECOMP_FLAGS_IN();
  11599     /* test LO8(eax), LO8(eax) */ /* 0x390041DF: test al, al */
  11600     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  11601     _cf = 0;
  11602     _flag_k = FK_NARROW(FK_TEST, 24);
  11603     if (TEST_Z(_flag_a, _flag_b)) goto L_39004211; /* 0x390041E1: je 0x39004211 */
  11604 L_390041E3:
  11605     esi = MEM32(esi + 0x4); /* 0x390041E3: mov esi, dword ptr [esi + 4] */
  11606     /* test esi, esi */ /* 0x390041E6: test esi, esi */
  11607     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
  11608     _cf = 0;
  11609     _flag_k = FK_TEST;
  11610     if (TEST_NZ(_flag_a, _flag_b)) goto L_390041F0; /* 0x390041E8: jne 0x390041f0 */
  11611 L_390041EA:
  11612     esi = MEM32(0x3900B02C); /* 0x390041EA: mov esi, dword ptr [0x3900b02c] */
  11613 L_390041F0:
  11614     ecx = MEM32(ebp + (-0x4)); /* 0x390041F0: mov ecx, dword ptr [ebp - 4] */
  11615     edi = MEM32(ebx + 0x4); /* 0x390041F3: mov edi, dword ptr [ebx + 4] */
  11616     eax = ecx; /* 0x390041F6: mov eax, ecx */
  11617     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x390041F8: shr ecx, 2 */
  11618     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  11619     ecx = ecx >> 2u; /* 0x390041F8: shr ecx, 2 */
  11620     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x390041FB: 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; }
  11621     ecx = eax; /* 0x390041FD: mov ecx, eax */
  11622     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
  11623     ecx = ecx & 3; /* 0x390041FF: and ecx, 3 */
  11624     _cf = 0;
  11625     _flag_k = FK_TEST;
  11626     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39004202: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
  11627     ecx = MEM32(ebx + 0x4); /* 0x39004204: mov ecx, dword ptr [ebx + 4] */
  11628     edi = MEM32(ebp + (-0x8)); /* 0x39004207: mov edi, dword ptr [ebp - 8] */
  11629     MEM32(ebx + 0x8) = eax; /* 0x3900420A: mov dword ptr [ebx + 8], eax */
  11630     MEM8(eax + ecx) = (uint8_t)(0); /* 0x3900420D: mov byte ptr [eax + ecx], 0 */
  11631 L_39004211:
  11632     eax = MEM32(ebp + 0x8); /* 0x39004211: mov eax, dword ptr [ebp + 8] */
  11633     edx = MEM32(eax + 0x30); /* 0x39004214: mov edx, dword ptr [eax + 0x30] */
  11634     MEM32(edi + 0x30) = edx; /* 0x39004217: mov dword ptr [edi + 0x30], edx */
  11635     ecx = MEM32(eax + 0x34); /* 0x3900421A: mov ecx, dword ptr [eax + 0x34] */
  11636     MEM32(edi + 0x34) = ecx; /* 0x3900421D: mov dword ptr [edi + 0x34], ecx */
  11637     edx = MEM32(eax + 0x38); /* 0x39004220: mov edx, dword ptr [eax + 0x38] */
  11638     MEM32(edi + 0x38) = edx; /* 0x39004223: mov dword ptr [edi + 0x38], edx */
  11639     ecx = MEM32(eax + 0x3C); /* 0x39004226: mov ecx, dword ptr [eax + 0x3c] */
  11640     MEM32(edi + 0x3C) = ecx; /* 0x39004229: mov dword ptr [edi + 0x3c], ecx */
  11641     edx = MEM32(eax + 0x40); /* 0x3900422C: mov edx, dword ptr [eax + 0x40] */
  11642     MEM32(edi + 0x40) = edx; /* 0x3900422F: mov dword ptr [edi + 0x40], edx */
  11643     ecx = MEM32(eax + 0x44); /* 0x39004232: mov ecx, dword ptr [eax + 0x44] */
  11644     MEM32(edi + 0x44) = ecx; /* 0x39004235: mov dword ptr [edi + 0x44], ecx */
  11645     edx = MEM32(eax + 0x48); /* 0x39004238: mov edx, dword ptr [eax + 0x48] */
  11646     MEM32(edi + 0x48) = edx; /* 0x3900423B: mov dword ptr [edi + 0x48], edx */
  11647     ecx = MEM32(eax + 0x4C); /* 0x3900423E: mov ecx, dword ptr [eax + 0x4c] */
  11648     MEM32(edi + 0x4C) = ecx; /* 0x39004241: mov dword ptr [edi + 0x4c], ecx */
  11649     edx = MEM32(eax + 0x50); /* 0x39004244: mov edx, dword ptr [eax + 0x50] */
  11650     MEM32(edi + 0x50) = edx; /* 0x39004247: mov dword ptr [edi + 0x50], edx */
  11651     eax = edi; /* 0x3900424A: mov eax, edi */
  11652     edi = POP32_VAL(esp); /* 0x3900424C: pop edi */
  11653     esi = POP32_VAL(esp); /* 0x3900424D: pop esi */
  11654     ebx = POP32_VAL(esp); /* 0x3900424E: pop ebx */
  11655     esp = ebp; /* 0x3900424F: mov esp, ebp */
  11656     ebp = POP32_VAL(esp); /* 0x39004251: pop ebp */
  11657     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39004252: ret 4 */
  11658     RECOMP_REGS_OUT();
  11659 }
  11660 
  11661 void sub_39004211(void) {
  11662     int _fpu_cmp = 0;
  11663     uint32_t _cf = 0;
  11664     int _df = 1;
  11665     uint32_t _flag_k = FK_NONE;
  11666     uint32_t _flag_a = 0, _flag_b = 0;
  11667     uint32_t _itail_tgt = 0;
  11668     RECOMP_REGS_LOCALS
  11669     RECOMP_ENTER(0x39004211u);
  11670 
  11671 L_39004211:
  11672     eax = MEM32(ebp + 0x8); /* 0x39004211: mov eax, dword ptr [ebp + 8] */
  11673     edx = MEM32(eax + 0x30); /* 0x39004214: mov edx, dword ptr [eax + 0x30] */
  11674     MEM32(edi + 0x30) = edx; /* 0x39004217: mov dword ptr [edi + 0x30], edx */
  11675     ecx = MEM32(eax + 0x34); /* 0x3900421A: mov ecx, dword ptr [eax + 0x34] */
  11676     MEM32(edi + 0x34) = ecx; /* 0x3900421D: mov dword ptr [edi + 0x34], ecx */
  11677     edx = MEM32(eax + 0x38); /* 0x39004220: mov edx, dword ptr [eax + 0x38] */
  11678     MEM32(edi + 0x38) = edx; /* 0x39004223: mov dword ptr [edi + 0x38], edx */
  11679     ecx = MEM32(eax + 0x3C); /* 0x39004226: mov ecx, dword ptr [eax + 0x3c] */
  11680     MEM32(edi + 0x3C) = ecx; /* 0x39004229: mov dword ptr [edi + 0x3c], ecx */
  11681     edx = MEM32(eax + 0x40); /* 0x3900422C: mov edx, dword ptr [eax + 0x40] */
  11682     MEM32(edi + 0x40) = edx; /* 0x3900422F: mov dword ptr [edi + 0x40], edx */
  11683     ecx = MEM32(eax + 0x44); /* 0x39004232: mov ecx, dword ptr [eax + 0x44] */
  11684     MEM32(edi + 0x44) = ecx; /* 0x39004235: mov dword ptr [edi + 0x44], ecx */
  11685     edx = MEM32(eax + 0x48); /* 0x39004238: mov edx, dword ptr [eax + 0x48] */
  11686     MEM32(edi + 0x48) = edx; /* 0x3900423B: mov dword ptr [edi + 0x48], edx */
  11687     ecx = MEM32(eax + 0x4C); /* 0x3900423E: mov ecx, dword ptr [eax + 0x4c] */
  11688     MEM32(edi + 0x4C) = ecx; /* 0x39004241: mov dword ptr [edi + 0x4c], ecx */
  11689     edx = MEM32(eax + 0x50); /* 0x39004244: mov edx, dword ptr [eax + 0x50] */
  11690     MEM32(edi + 0x50) = edx; /* 0x39004247: mov dword ptr [edi + 0x50], edx */
  11691     eax = edi; /* 0x3900424A: mov eax, edi */
  11692     edi = POP32_VAL(esp); /* 0x3900424C: pop edi */
  11693     esi = POP32_VAL(esp); /* 0x3900424D: pop esi */
  11694     ebx = POP32_VAL(esp); /* 0x3900424E: pop ebx */
  11695     esp = ebp; /* 0x3900424F: mov esp, ebp */
  11696     ebp = POP32_VAL(esp); /* 0x39004251: pop ebp */
  11697     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39004252: ret 4 */
  11698     RECOMP_REGS_OUT();
  11699 }
  11700 
  11701 void sub_39004260(void) {
  11702     int _fpu_cmp = 0;
  11703     uint32_t _cf = 0;
  11704     int _df = 1;
  11705     uint32_t _flag_k = FK_NONE;
  11706     uint32_t _flag_a = 0, _flag_b = 0;
  11707     uint32_t _itail_tgt = 0;
  11708     RECOMP_REGS_LOCALS
  11709     RECOMP_ENTER(0x39004260u);
  11710 
  11711 L_39004260:
  11712     PUSH32(esp, ebp); /* 0x39004260: push ebp */
  11713     ebp = esp; /* 0x39004261: mov ebp, esp */
  11714     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  11715     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11716     esp = esp - 8; /* 0x39004263: sub esp, 8 */
  11717     _flag_k = FK_CMP;
  11718     PUSH32(esp, ebx); /* 0x39004266: push ebx */
  11719     PUSH32(esp, esi); /* 0x39004267: push esi */
  11720     esi = ecx; /* 0x39004268: mov esi, ecx */
  11721     PUSH32(esp, edi); /* 0x3900426A: push edi */
  11722     edi = MEM32(esi + 0x4); /* 0x3900426B: mov edi, dword ptr [esi + 4] */
  11723     ecx = MEM32(esi + 0x10); /* 0x3900426E: mov ecx, dword ptr [esi + 0x10] */
  11724     /* test ecx, ecx */ /* 0x39004271: test ecx, ecx */
  11725     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  11726     _cf = 0;
  11727     _flag_k = FK_TEST;
  11728     eax = MEM32(edi); /* 0x39004273: mov eax, dword ptr [edi] */
  11729     MEM32(ebp + (-0x4)) = eax; /* 0x39004275: mov dword ptr [ebp - 4], eax */
  11730     if (TEST_Z(_flag_a, _flag_b)) goto L_390042D7; /* 0x39004278: je 0x390042d7 */
  11731 L_3900427A:
  11732     ecx = eax; /* 0x3900427A: mov ecx, eax */
  11733     /* cmp eax, ecx */ /* 0x3900427C: cmp eax, ecx */
  11734     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  11735     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11736     _flag_k = FK_CMP;
  11737     if (CMP_NE(_flag_a, _flag_b)) goto L_390042D7; /* 0x3900427E: jne 0x390042d7 */
  11738 L_39004280:
  11739     /* cmp edi, edi */ /* 0x39004280: cmp edi, edi */
  11740     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
  11741     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11742     _flag_k = FK_CMP;
  11743     if (CMP_NE(_flag_a, _flag_b)) goto L_390042D7; /* 0x39004282: jne 0x390042d7 */
  11744 L_39004284:
  11745     ebx = MEM32(edi + 0x4); /* 0x39004284: mov ebx, dword ptr [edi + 4] */
  11746     eax = MEM32(esi + 0x8); /* 0x39004287: mov eax, dword ptr [esi + 8] */
  11747     /* cmp ebx, eax */ /* 0x3900428A: cmp ebx, eax */
  11748     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  11749     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11750     _flag_k = FK_CMP;
  11751     edi = ebx; /* 0x3900428C: mov edi, ebx */
  11752     if (CMP_EQ(_flag_a, _flag_b)) goto L_390042AF; /* 0x3900428E: je 0x390042af */
  11753 L_39004290:
  11754     eax = MEM32(edi + 0x8); /* 0x39004290: mov eax, dword ptr [edi + 8] */
  11755     ecx = esi; /* 0x39004293: mov ecx, esi */
  11756     PUSH32(esp, eax); /* 0x39004295: push eax */
  11757     RECOMP_ICALL(0x390053B0u); /* 0x39004296: call 0x390053b0 */ /* not lifted */
  11758     RECOMP_FLAGS_IN();
  11759     edi = MEM32(edi); /* 0x3900429B: mov edi, dword ptr [edi] */
  11760     PUSH32(esp, ebx); /* 0x3900429D: push ebx */
  11761     RECOMP_ICALL(0x3900A0A0u); /* 0x3900429E: call 0x3900a0a0 */ /* not lifted */
  11762     RECOMP_FLAGS_IN();
  11763     eax = MEM32(esi + 0x8); /* 0x390042A3: mov eax, dword ptr [esi + 8] */
  11764     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  11765     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11766     esp = esp + 4; /* 0x390042A6: add esp, 4 */
  11767     _flag_k = FK_ADD;
  11768     /* cmp edi, eax */ /* 0x390042A9: cmp edi, eax */
  11769     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  11770     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11771     _flag_k = FK_CMP;
  11772     ebx = edi; /* 0x390042AB: mov ebx, edi */
  11773     RECOMP_BACKEDGE();
  11774     if (CMP_NE(_flag_a, _flag_b)) goto L_39004290; /* 0x390042AD: jne 0x39004290 */
  11775 L_390042AF:
  11776     ecx = MEM32(esi + 0x4); /* 0x390042AF: mov ecx, dword ptr [esi + 4] */
  11777     edx = MEM32(esi + 0x8); /* 0x390042B2: mov edx, dword ptr [esi + 8] */
  11778     MEM32(ecx + 0x4) = edx; /* 0x390042B5: mov dword ptr [ecx + 4], edx */
  11779     eax = MEM32(esi + 0x4); /* 0x390042B8: mov eax, dword ptr [esi + 4] */
  11780     MEM32(esi + 0x10) = 0; /* 0x390042BB: mov dword ptr [esi + 0x10], 0 */
  11781     ecx = esi; /* 0x390042C2: mov ecx, esi */
  11782     MEM32(eax) = eax; /* 0x390042C4: mov dword ptr [eax], eax */
  11783     eax = MEM32(esi + 0x4); /* 0x390042C6: mov eax, dword ptr [esi + 4] */
  11784     MEM32(eax + 0x8) = eax; /* 0x390042C9: mov dword ptr [eax + 8], eax */
  11785     eax = ebp + (-0x8); /* 0x390042CC: lea eax, [ebp - 8] */
  11786     PUSH32(esp, eax); /* 0x390042CF: push eax */
  11787     RECOMP_ICALL(0x39009C30u); /* 0x390042D0: call 0x39009c30 */ /* not lifted */
  11788     RECOMP_FLAGS_IN();
  11789     goto L_390042F8; /* 0x390042D5: jmp 0x390042f8 */
  11790 L_390042D7:
  11791     /* cmp eax, edi */ /* 0x390042D7: cmp eax, edi */
  11792     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  11793     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11794     _flag_k = FK_CMP;
  11795     if (CMP_EQ(_flag_a, _flag_b)) goto L_390042F8; /* 0x390042D9: je 0x390042f8 */
  11796 L_390042DB:
  11797     ecx = ebp + (-0x4); /* 0x390042DB: lea ecx, [ebp - 4] */
  11798     ebx = eax; /* 0x390042DE: mov ebx, eax */
  11799     RECOMP_ICALL(0x39005360u); /* 0x390042E0: call 0x39005360 */ /* not lifted */
  11800     RECOMP_FLAGS_IN();
  11801     ecx = ebp + (-0x8); /* 0x390042E5: lea ecx, [ebp - 8] */
  11802     PUSH32(esp, ebx); /* 0x390042E8: push ebx */
  11803     PUSH32(esp, ecx); /* 0x390042E9: push ecx */
  11804     ecx = esi; /* 0x390042EA: mov ecx, esi */
  11805     RECOMP_ICALL(0x39004FA0u); /* 0x390042EC: call 0x39004fa0 */ /* not lifted */
  11806     RECOMP_FLAGS_IN();
  11807     eax = MEM32(ebp + (-0x4)); /* 0x390042F1: mov eax, dword ptr [ebp - 4] */
  11808     /* cmp eax, edi */ /* 0x390042F4: cmp eax, edi */
  11809     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  11810     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11811     _flag_k = FK_CMP;
  11812     RECOMP_BACKEDGE();
  11813     if (CMP_NE(_flag_a, _flag_b)) goto L_390042DB; /* 0x390042F6: jne 0x390042db */
  11814 L_390042F8:
  11815     edx = MEM32(esi + 0x4); /* 0x390042F8: mov edx, dword ptr [esi + 4] */
  11816     PUSH32(esp, edx); /* 0x390042FB: push edx */
  11817     RECOMP_ICALL(0x3900A0A0u); /* 0x390042FC: call 0x3900a0a0 */ /* not lifted */
  11818     RECOMP_FLAGS_IN();
  11819     eax = MEM32(esi + 0x8); /* 0x39004301: mov eax, dword ptr [esi + 8] */
  11820     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  11821     edi = 0; /* 0x39004304: xor edi, edi */
  11822     _cf = 0;
  11823     _flag_k = FK_TEST;
  11824     PUSH32(esp, eax); /* 0x39004306: push eax */
  11825     MEM32(esi + 0x4) = edi; /* 0x39004307: mov dword ptr [esi + 4], edi */
  11826     MEM32(esi + 0x10) = edi; /* 0x3900430A: mov dword ptr [esi + 0x10], edi */
  11827     RECOMP_ICALL(0x3900A0A0u); /* 0x3900430D: call 0x3900a0a0 */ /* not lifted */
  11828     RECOMP_FLAGS_IN();
  11829     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  11830     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11831     esp = esp + 8; /* 0x39004312: add esp, 8 */
  11832     _flag_k = FK_ADD;
  11833     MEM32(esi + 0x8) = edi; /* 0x39004315: mov dword ptr [esi + 8], edi */
  11834     edi = POP32_VAL(esp); /* 0x39004318: pop edi */
  11835     esi = POP32_VAL(esp); /* 0x39004319: pop esi */
  11836     ebx = POP32_VAL(esp); /* 0x3900431A: pop ebx */
  11837     esp = ebp; /* 0x3900431B: mov esp, ebp */
  11838     ebp = POP32_VAL(esp); /* 0x3900431D: pop ebp */
  11839     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3900431E: ret  */
  11840     RECOMP_REGS_OUT();
  11841 }
  11842 
  11843 void sub_39004320(void) {
  11844     int _fpu_cmp = 0;
  11845     uint32_t _cf = 0;
  11846     int _df = 1;
  11847     uint32_t _flag_k = FK_NONE;
  11848     uint32_t _flag_a = 0, _flag_b = 0;
  11849     uint32_t _itail_tgt = 0;
  11850     RECOMP_REGS_LOCALS
  11851     RECOMP_ENTER(0x39004320u);
  11852 
  11853 L_39004320:
  11854     PUSH32(esp, ebp); /* 0x39004320: push ebp */
  11855     ebp = esp; /* 0x39004321: mov ebp, esp */
  11856     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x3ECu);
  11857     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11858     esp = esp - 0x3ECu; /* 0x39004323: sub esp, 0x3ec */
  11859     _flag_k = FK_CMP;
  11860     ecx = MEM32(ebp + 0xC); /* 0x39004329: mov ecx, dword ptr [ebp + 0xc] */
  11861     PUSH32(esp, ebx); /* 0x3900432C: push ebx */
  11862     PUSH32(esp, esi); /* 0x3900432D: push esi */
  11863     eax = ebp + 0x10; /* 0x3900432E: lea eax, [ebp + 0x10] */
  11864     PUSH32(esp, edi); /* 0x39004331: push edi */
  11865     PUSH32(esp, eax); /* 0x39004332: push eax */
  11866     PUSH32(esp, ecx); /* 0x39004333: push ecx */
  11867     edx = ebp + (-0x3EC); /* 0x39004334: lea edx, [ebp - 0x3ec] */
  11868     PUSH32(esp, 0x3E8u); /* 0x3900433A: push 0x3e8 */
  11869     PUSH32(esp, edx); /* 0x3900433F: push edx */
  11870     RECOMP_ICALL(MEM32(0x3900B090)); /* 0x39004340: call dword ptr [0x3900b090] */
  11871     RECOMP_FLAGS_IN();
  11872     edx = eax; /* 0x39004346: mov edx, eax */
  11873     edi = ebp + (-0x3EC); /* 0x39004348: lea edi, [ebp - 0x3ec] */
  11874     _flag_a = (uint32_t)((ecx | 0xFFFFFFFFu)); _flag_b = (uint32_t)((ecx | 0xFFFFFFFFu));
  11875     ecx = ecx | 0xFFFFFFFFu; /* 0x3900434E: or ecx, 0xffffffff */
  11876     _cf = 0;
  11877     _flag_k = FK_TEST;
  11878     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  11879     eax = 0; /* 0x39004351: xor eax, eax */
  11880     _cf = 0;
  11881     _flag_k = FK_TEST;
  11882     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
  11883     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11884     esp = esp + 0x10u; /* 0x39004353: add esp, 0x10 */
  11885     _flag_k = FK_ADD;
  11886     MEM8(ebp + (-0x5)) = (uint8_t)(0); /* 0x39004356: mov byte ptr [ebp - 5], 0 */
  11887     if (ecx) { uint32_t _a = 0, _b = 0; while (ecx) { _a = LO8(eax); _b = MEM8(edi); edi += _df; ecx--; if (_a == _b) break; } _flag_a = _a; _flag_b = _b; _cf = (uint32_t)CMP_B(_a, _b); _flag_k = FK_CMP; } /* 0x3900435A: repne scasb al, byte ptr es:[edi] */
  11888     ebx = MEM32(ebp + 0x8); /* 0x3900435C: mov ebx, dword ptr [ebp + 8] */
  11889     eax = MEM32(0x3900B008); /* 0x3900435F: mov eax, dword ptr [0x3900b008] */
  11890     ecx = ~ecx; /* 0x39004364: not ecx */
  11891     edi = MEM32(ebx + 0x8); /* 0x39004366: mov edi, dword ptr [ebx + 8] */
  11892     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
  11893     ecx = ecx - 1; /* 0x39004369: dec ecx */
  11894     _flag_k = FK_DEC;
  11895     esi = ecx; /* 0x3900436A: mov esi, ecx */
  11896     ecx = MEM32(eax); /* 0x3900436C: mov ecx, dword ptr [eax] */
  11897     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
  11898     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11899     ecx = ecx - edi; /* 0x3900436E: sub ecx, edi */
  11900     _flag_k = FK_CMP;
  11901     MEM32(ebp + (-0x4)) = edx; /* 0x39004370: mov dword ptr [ebp - 4], edx */
  11902     /* cmp ecx, esi */ /* 0x39004373: cmp ecx, esi */
  11903     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi);
  11904     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11905     _flag_k = FK_CMP;
  11906     if (CMP_A(_flag_a, _flag_b)) goto L_39004380; /* 0x39004375: ja 0x39004380 */
  11907 L_39004377:
  11908     RECOMP_ICALL(MEM32(0x3900B048)); /* 0x39004377: call dword ptr [0x3900b048] */
  11909     RECOMP_FLAGS_IN();
  11910     edx = MEM32(ebp + (-0x4)); /* 0x3900437D: mov edx, dword ptr [ebp - 4] */
  11911 L_39004380:
  11912     /* test esi, esi */ /* 0x39004380: test esi, esi */
  11913     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
  11914     _cf = 0;
  11915     _flag_k = FK_TEST;
  11916     if (TEST_Z(_flag_a, _flag_b)) goto L_390043DD; /* 0x39004382: jbe 0x390043dd */
  11917 L_39004384:
  11918     ecx = MEM32(ebx + 0x8); /* 0x39004384: mov ecx, dword ptr [ebx + 8] */
  11919     edi = esi; /* 0x39004387: mov edi, esi */
  11920     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx);
  11921     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11922     edi = edi + ecx; /* 0x39004389: add edi, ecx */
  11923     _flag_k = FK_ADD;
  11924     /* cmp edi, 0xFFFFFFFDu */ /* 0x3900438B: cmp edi, -3 */
  11925     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFDu);
  11926     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11927     _flag_k = FK_CMP;
  11928     MEM32(ebp + 0x8) = edi; /* 0x3900438E: mov dword ptr [ebp + 8], edi */
  11929     if (CMP_BE(_flag_a, _flag_b)) goto L_3900439C; /* 0x39004391: jbe 0x3900439c */
  11930 L_39004393:
  11931     RECOMP_ICALL(MEM32(0x3900B048)); /* 0x39004393: call dword ptr [0x3900b048] */
  11932     RECOMP_FLAGS_IN();
  11933     edx = MEM32(ebp + (-0x4)); /* 0x39004399: mov edx, dword ptr [ebp - 4] */
  11934 L_3900439C:
  11935     /* cmp edi, MEM32(ebx + 0x8) */ /* 0x3900439C: cmp edi, dword ptr [ebx + 8] */
  11936     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebx + 0x8));
  11937     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11938     _flag_k = FK_CMP;
  11939     if (CMP_AE(_flag_a, _flag_b)) goto L_390043A4; /* 0x3900439F: jae 0x390043a4 */
  11940 L_390043A1:
  11941     MEM32(ebx + 0x8) = edi; /* 0x390043A1: mov dword ptr [ebx + 8], edi */
  11942 L_390043A4:
  11943     eax = MEM32(ebx + 0x4); /* 0x390043A4: mov eax, dword ptr [ebx + 4] */
  11944     /* test eax, eax */ /* 0x390043A7: test eax, eax */
  11945     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11946     _cf = 0;
  11947     _flag_k = FK_TEST;
  11948     if (TEST_Z(_flag_a, _flag_b)) goto L_390043CF; /* 0x390043A9: je 0x390043cf */
  11949 L_390043AB:
  11950     SET_LO8(ecx, MEM8(eax + (-0x1))); /* 0x390043AB: mov cl, byte ptr [eax - 1] */
  11951     /* test LO8(ecx), LO8(ecx) */ /* 0x390043AE: test cl, cl */
  11952     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
  11953     _cf = 0;
  11954     _flag_k = FK_NARROW(FK_TEST, 24);
  11955     if (TEST_Z(_flag_a, _flag_b)) goto L_390043CF; /* 0x390043B0: je 0x390043cf */
  11956 L_390043B2:
  11957     /* cmp LO8(ecx), 0xFFu */ /* 0x390043B2: cmp cl, 0xff */
  11958     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
  11959     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11960     _flag_k = FK_NARROW(FK_CMP, 24);
  11961     if (CMP_EQ(_flag_a, _flag_b)) goto L_390043CF; /* 0x390043B5: je 0x390043cf */
  11962 L_390043B7:
  11963     /* test edi, edi */ /* 0x390043B7: test edi, edi */
  11964     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
  11965     _cf = 0;
  11966     _flag_k = FK_TEST;
  11967     if (TEST_NZ(_flag_a, _flag_b)) goto L_390043EB; /* 0x390043B9: jne 0x390043eb */
  11968 L_390043BB:
  11969     PUSH32(esp, 1); /* 0x390043BB: push 1 */
  11970     ecx = ebx; /* 0x390043BD: mov ecx, ebx */
  11971     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x390043BF: call dword ptr [0x3900b040] */
  11972     RECOMP_FLAGS_IN();
  11973     eax = MEM32(ebp + (-0x4)); /* 0x390043C5: mov eax, dword ptr [ebp - 4] */
  11974     edi = POP32_VAL(esp); /* 0x390043C8: pop edi */
  11975     esi = POP32_VAL(esp); /* 0x390043C9: pop esi */
  11976     ebx = POP32_VAL(esp); /* 0x390043CA: pop ebx */
  11977     esp = ebp; /* 0x390043CB: mov esp, ebp */
  11978     ebp = POP32_VAL(esp); /* 0x390043CD: pop ebp */
  11979     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x390043CE: ret  */
  11980 L_390043CF:
  11981     /* test edi, edi */ /* 0x390043CF: test edi, edi */
  11982     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
  11983     _cf = 0;
  11984     _flag_k = FK_TEST;
  11985     if (TEST_NZ(_flag_a, _flag_b)) goto L_390043E6; /* 0x390043D1: jne 0x390043e6 */
  11986 L_390043D3:
  11987     /* test eax, eax */ /* 0x390043D3: test eax, eax */
  11988     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11989     _cf = 0;
  11990     _flag_k = FK_TEST;
  11991     if (TEST_Z(_flag_a, _flag_b)) goto L_390043DD; /* 0x390043D5: je 0x390043dd */
  11992 L_390043D7:
  11993     MEM32(ebx + 0x8) = edi; /* 0x390043D7: mov dword ptr [ebx + 8], edi */
  11994     MEM8(eax) = (uint8_t)(0); /* 0x390043DA: mov byte ptr [eax], 0 */
  11995 L_390043DD:
  11996     edi = POP32_VAL(esp); /* 0x390043DD: pop edi */
  11997     esi = POP32_VAL(esp); /* 0x390043DE: pop esi */
  11998     eax = edx; /* 0x390043DF: mov eax, edx */
  11999     ebx = POP32_VAL(esp); /* 0x390043E1: pop ebx */
  12000     esp = ebp; /* 0x390043E2: mov esp, ebp */
  12001     ebp = POP32_VAL(esp); /* 0x390043E4: pop ebp */
  12002     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x390043E5: ret  */
  12003 L_390043E6:
  12004     /* cmp MEM32(ebx + 0xC), edi */ /* 0x390043E6: cmp dword ptr [ebx + 0xc], edi */
  12005     _flag_a = (uint32_t)(MEM32(ebx + 0xC)); _flag_b = (uint32_t)(edi);
  12006     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12007     _flag_k = FK_CMP;
  12008     if (CMP_AE(_flag_a, _flag_b)) goto L_390043F4; /* 0x390043E9: jae 0x390043f4 */
  12009 L_390043EB:
  12010     PUSH32(esp, edi); /* 0x390043EB: push edi */
  12011     ecx = ebx; /* 0x390043EC: mov ecx, ebx */
  12012     RECOMP_ICALL(MEM32(0x3900B044)); /* 0x390043EE: call dword ptr [0x3900b044] */
  12013     RECOMP_FLAGS_IN();
  12014 L_390043F4:
  12015     edi = MEM32(ebx + 0x4); /* 0x390043F4: mov edi, dword ptr [ebx + 4] */
  12016     edx = MEM32(ebx + 0x8); /* 0x390043F7: mov edx, dword ptr [ebx + 8] */
  12017     ecx = esi; /* 0x390043FA: mov ecx, esi */
  12018     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx);
  12019     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12020     edi = edi + edx; /* 0x390043FC: add edi, edx */
  12021     _flag_k = FK_ADD;
  12022     edx = ecx; /* 0x390043FE: mov edx, ecx */
  12023     esi = ebp + (-0x3EC); /* 0x39004400: lea esi, [ebp - 0x3ec] */
  12024     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39004406: shr ecx, 2 */
  12025     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  12026     ecx = ecx >> 2u; /* 0x39004406: shr ecx, 2 */
  12027     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39004409: 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; }
  12028     eax = MEM32(ebp + 0x8); /* 0x3900440B: mov eax, dword ptr [ebp + 8] */
  12029     ecx = edx; /* 0x3900440E: mov ecx, edx */
  12030     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
  12031     ecx = ecx & 3; /* 0x39004410: and ecx, 3 */
  12032     _cf = 0;
  12033     _flag_k = FK_TEST;
  12034     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39004413: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
  12035     ecx = MEM32(ebx + 0x4); /* 0x39004415: mov ecx, dword ptr [ebx + 4] */
  12036     MEM32(ebx + 0x8) = eax; /* 0x39004418: mov dword ptr [ebx + 8], eax */
  12037     edi = POP32_VAL(esp); /* 0x3900441B: pop edi */
  12038     esi = POP32_VAL(esp); /* 0x3900441C: pop esi */
  12039     MEM8(ecx + eax) = (uint8_t)(0); /* 0x3900441D: mov byte ptr [ecx + eax], 0 */
  12040     eax = MEM32(ebp + (-0x4)); /* 0x39004421: mov eax, dword ptr [ebp - 4] */
  12041     ebx = POP32_VAL(esp); /* 0x39004424: pop ebx */
  12042     esp = ebp; /* 0x39004425: mov esp, ebp */
  12043     ebp = POP32_VAL(esp); /* 0x39004427: pop ebp */
  12044     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39004428: ret  */
  12045     RECOMP_REGS_OUT();
  12046 }
  12047 
  12048 void sub_39004430(void) {
  12049     int _fpu_cmp = 0;
  12050     uint32_t _cf = 0;
  12051     int _df = 1;
  12052     uint32_t _flag_k = FK_NONE;
  12053     uint32_t _flag_a = 0, _flag_b = 0;
  12054     uint32_t _itail_tgt = 0;
  12055     RECOMP_REGS_LOCALS
  12056     RECOMP_ENTER(0x39004430u);
  12057 
  12058 L_39004430:
  12059     PUSH32(esp, ebp); /* 0x39004430: push ebp */
  12060     ebp = esp; /* 0x39004431: mov ebp, esp */
  12061     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  12062     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12063     esp = esp - 8; /* 0x39004433: sub esp, 8 */
  12064     _flag_k = FK_CMP;
  12065     PUSH32(esp, ebx); /* 0x39004436: push ebx */
  12066     PUSH32(esp, esi); /* 0x39004437: push esi */
  12067     esi = ecx; /* 0x39004438: mov esi, ecx */
  12068     PUSH32(esp, edi); /* 0x3900443A: push edi */
  12069     edi = MEM32(esi + 0x4); /* 0x3900443B: mov edi, dword ptr [esi + 4] */
  12070     ecx = MEM32(esi + 0x10); /* 0x3900443E: mov ecx, dword ptr [esi + 0x10] */
  12071     /* test ecx, ecx */ /* 0x39004441: test ecx, ecx */
  12072     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  12073     _cf = 0;
  12074     _flag_k = FK_TEST;
  12075     eax = MEM32(edi); /* 0x39004443: mov eax, dword ptr [edi] */
  12076     MEM32(ebp + (-0x4)) = eax; /* 0x39004445: mov dword ptr [ebp - 4], eax */
  12077     if (TEST_Z(_flag_a, _flag_b)) goto L_390044A6; /* 0x39004448: je 0x390044a6 */
  12078 L_3900444A:
  12079     ecx = eax; /* 0x3900444A: mov ecx, eax */
  12080     /* cmp eax, ecx */ /* 0x3900444C: cmp eax, ecx */
  12081     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  12082     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12083     _flag_k = FK_CMP;
  12084     if (CMP_NE(_flag_a, _flag_b)) goto L_390044A6; /* 0x3900444E: jne 0x390044a6 */
  12085 L_39004450:
  12086     /* cmp edi, edi */ /* 0x39004450: cmp edi, edi */
  12087     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
  12088     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12089     _flag_k = FK_CMP;
  12090     if (CMP_NE(_flag_a, _flag_b)) goto L_390044A6; /* 0x39004452: jne 0x390044a6 */
  12091 L_39004454:
  12092     ebx = MEM32(edi + 0x4); /* 0x39004454: mov ebx, dword ptr [edi + 4] */
  12093     eax = MEM32(esi + 0x8); /* 0x39004457: mov eax, dword ptr [esi + 8] */
  12094     /* cmp ebx, eax */ /* 0x3900445A: cmp ebx, eax */
  12095     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  12096     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12097     _flag_k = FK_CMP;
  12098     edi = ebx; /* 0x3900445C: mov edi, ebx */
  12099     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004489; /* 0x3900445E: je 0x39004489 */
  12100 L_39004460:
  12101     eax = MEM32(edi + 0x8); /* 0x39004460: mov eax, dword ptr [edi + 8] */
  12102     ecx = esi; /* 0x39004463: mov ecx, esi */
  12103     PUSH32(esp, eax); /* 0x39004465: push eax */
  12104     RECOMP_ICALL(0x39005AC0u); /* 0x39004466: call 0x39005ac0 */ /* not lifted */
  12105     RECOMP_FLAGS_IN();
  12106     edi = MEM32(edi); /* 0x3900446B: mov edi, dword ptr [edi] */
  12107     PUSH32(esp, 0); /* 0x3900446D: push 0 */
  12108     ecx = ebx + 0xC; /* 0x3900446F: lea ecx, [ebx + 0xc] */
  12109     RECOMP_ICALL(0x390076F0u); /* 0x39004472: call 0x390076f0 */ /* not lifted */
  12110     RECOMP_FLAGS_IN();
  12111     PUSH32(esp, ebx); /* 0x39004477: push ebx */
  12112     RECOMP_ICALL(0x3900A0A0u); /* 0x39004478: call 0x3900a0a0 */ /* not lifted */
  12113     RECOMP_FLAGS_IN();
  12114     eax = MEM32(esi + 0x8); /* 0x3900447D: mov eax, dword ptr [esi + 8] */
  12115     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12116     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12117     esp = esp + 4; /* 0x39004480: add esp, 4 */
  12118     _flag_k = FK_ADD;
  12119     /* cmp edi, eax */ /* 0x39004483: cmp edi, eax */
  12120     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  12121     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12122     _flag_k = FK_CMP;
  12123     ebx = edi; /* 0x39004485: mov ebx, edi */
  12124     RECOMP_BACKEDGE();
  12125     if (CMP_NE(_flag_a, _flag_b)) goto L_39004460; /* 0x39004487: jne 0x39004460 */
  12126 L_39004489:
  12127     ecx = MEM32(esi + 0x4); /* 0x39004489: mov ecx, dword ptr [esi + 4] */
  12128     edx = MEM32(esi + 0x8); /* 0x3900448C: mov edx, dword ptr [esi + 8] */
  12129     MEM32(ecx + 0x4) = edx; /* 0x3900448F: mov dword ptr [ecx + 4], edx */
  12130     eax = MEM32(esi + 0x4); /* 0x39004492: mov eax, dword ptr [esi + 4] */
  12131     MEM32(esi + 0x10) = 0; /* 0x39004495: mov dword ptr [esi + 0x10], 0 */
  12132     MEM32(eax) = eax; /* 0x3900449C: mov dword ptr [eax], eax */
  12133     eax = MEM32(esi + 0x4); /* 0x3900449E: mov eax, dword ptr [esi + 4] */
  12134     MEM32(eax + 0x8) = eax; /* 0x390044A1: mov dword ptr [eax + 8], eax */
  12135     goto L_390044C7; /* 0x390044A4: jmp 0x390044c7 */
  12136 L_390044A6:
  12137     /* cmp eax, edi */ /* 0x390044A6: cmp eax, edi */
  12138     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  12139     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12140     _flag_k = FK_CMP;
  12141     if (CMP_EQ(_flag_a, _flag_b)) goto L_390044C7; /* 0x390044A8: je 0x390044c7 */
  12142 L_390044AA:
  12143     ecx = ebp + (-0x4); /* 0x390044AA: lea ecx, [ebp - 4] */
  12144     ebx = eax; /* 0x390044AD: mov ebx, eax */
  12145     RECOMP_ICALL(0x39004BA0u); /* 0x390044AF: call 0x39004ba0 */ /* not lifted */
  12146     RECOMP_FLAGS_IN();
  12147     eax = ebp + (-0x8); /* 0x390044B4: lea eax, [ebp - 8] */
  12148     PUSH32(esp, ebx); /* 0x390044B7: push ebx */
  12149     PUSH32(esp, eax); /* 0x390044B8: push eax */
  12150     ecx = esi; /* 0x390044B9: mov ecx, esi */
  12151     RECOMP_ICALL(0x390056F0u); /* 0x390044BB: call 0x390056f0 */ /* not lifted */
  12152     RECOMP_FLAGS_IN();
  12153     eax = MEM32(ebp + (-0x4)); /* 0x390044C0: mov eax, dword ptr [ebp - 4] */
  12154     /* cmp eax, edi */ /* 0x390044C3: cmp eax, edi */
  12155     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  12156     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12157     _flag_k = FK_CMP;
  12158     RECOMP_BACKEDGE();
  12159     if (CMP_NE(_flag_a, _flag_b)) goto L_390044AA; /* 0x390044C5: jne 0x390044aa */
  12160 L_390044C7:
  12161     ecx = MEM32(esi + 0x4); /* 0x390044C7: mov ecx, dword ptr [esi + 4] */
  12162     PUSH32(esp, ecx); /* 0x390044CA: push ecx */
  12163     RECOMP_ICALL(0x3900A0A0u); /* 0x390044CB: call 0x3900a0a0 */ /* not lifted */
  12164     RECOMP_FLAGS_IN();
  12165     edx = MEM32(esi + 0x8); /* 0x390044D0: mov edx, dword ptr [esi + 8] */
  12166     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  12167     edi = 0; /* 0x390044D3: xor edi, edi */
  12168     _cf = 0;
  12169     _flag_k = FK_TEST;
  12170     PUSH32(esp, edx); /* 0x390044D5: push edx */
  12171     MEM32(esi + 0x4) = edi; /* 0x390044D6: mov dword ptr [esi + 4], edi */
  12172     MEM32(esi + 0x10) = edi; /* 0x390044D9: mov dword ptr [esi + 0x10], edi */
  12173     RECOMP_ICALL(0x3900A0A0u); /* 0x390044DC: call 0x3900a0a0 */ /* not lifted */
  12174     RECOMP_FLAGS_IN();
  12175     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  12176     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12177     esp = esp + 8; /* 0x390044E1: add esp, 8 */
  12178     _flag_k = FK_ADD;
  12179     MEM32(esi + 0x8) = edi; /* 0x390044E4: mov dword ptr [esi + 8], edi */
  12180     edi = POP32_VAL(esp); /* 0x390044E7: pop edi */
  12181     esi = POP32_VAL(esp); /* 0x390044E8: pop esi */
  12182     ebx = POP32_VAL(esp); /* 0x390044E9: pop ebx */
  12183     esp = ebp; /* 0x390044EA: mov esp, ebp */
  12184     ebp = POP32_VAL(esp); /* 0x390044EC: pop ebp */
  12185     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x390044ED: ret  */
  12186     RECOMP_REGS_OUT();
  12187 }
  12188 
  12189 void sub_390044F0(void) {
  12190     int _fpu_cmp = 0;
  12191     uint32_t _cf = 0;
  12192     int _df = 1;
  12193     uint32_t _flag_k = FK_NONE;
  12194     uint32_t _flag_a = 0, _flag_b = 0;
  12195     uint32_t _itail_tgt = 0;
  12196     RECOMP_REGS_LOCALS
  12197     RECOMP_ENTER(0x390044F0u);
  12198 
  12199 L_390044F0:
  12200     PUSH32(esp, ebp); /* 0x390044F0: push ebp */
  12201     ebp = esp; /* 0x390044F1: mov ebp, esp */
  12202     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  12203     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12204     esp = esp - 8; /* 0x390044F3: sub esp, 8 */
  12205     _flag_k = FK_CMP;
  12206     PUSH32(esp, ebx); /* 0x390044F6: push ebx */
  12207     PUSH32(esp, esi); /* 0x390044F7: push esi */
  12208     esi = ecx; /* 0x390044F8: mov esi, ecx */
  12209     PUSH32(esp, edi); /* 0x390044FA: push edi */
  12210     edi = MEM32(esi + 0x4); /* 0x390044FB: mov edi, dword ptr [esi + 4] */
  12211     ecx = MEM32(esi + 0x10); /* 0x390044FE: mov ecx, dword ptr [esi + 0x10] */
  12212     /* test ecx, ecx */ /* 0x39004501: test ecx, ecx */
  12213     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  12214     _cf = 0;
  12215     _flag_k = FK_TEST;
  12216     eax = MEM32(edi); /* 0x39004503: mov eax, dword ptr [edi] */
  12217     MEM32(ebp + (-0x4)) = eax; /* 0x39004505: mov dword ptr [ebp - 4], eax */
  12218     if (TEST_Z(_flag_a, _flag_b)) goto L_39004566; /* 0x39004508: je 0x39004566 */
  12219 L_3900450A:
  12220     ecx = eax; /* 0x3900450A: mov ecx, eax */
  12221     /* cmp eax, ecx */ /* 0x3900450C: cmp eax, ecx */
  12222     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  12223     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12224     _flag_k = FK_CMP;
  12225     if (CMP_NE(_flag_a, _flag_b)) goto L_39004566; /* 0x3900450E: jne 0x39004566 */
  12226 L_39004510:
  12227     /* cmp edi, edi */ /* 0x39004510: cmp edi, edi */
  12228     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
  12229     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12230     _flag_k = FK_CMP;
  12231     if (CMP_NE(_flag_a, _flag_b)) goto L_39004566; /* 0x39004512: jne 0x39004566 */
  12232 L_39004514:
  12233     ebx = MEM32(edi + 0x4); /* 0x39004514: mov ebx, dword ptr [edi + 4] */
  12234     eax = MEM32(esi + 0x8); /* 0x39004517: mov eax, dword ptr [esi + 8] */
  12235     /* cmp ebx, eax */ /* 0x3900451A: cmp ebx, eax */
  12236     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  12237     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12238     _flag_k = FK_CMP;
  12239     edi = ebx; /* 0x3900451C: mov edi, ebx */
  12240     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004549; /* 0x3900451E: je 0x39004549 */
  12241 L_39004520:
  12242     eax = MEM32(edi + 0x8); /* 0x39004520: mov eax, dword ptr [edi + 8] */
  12243     ecx = esi; /* 0x39004523: mov ecx, esi */
  12244     PUSH32(esp, eax); /* 0x39004525: push eax */
  12245     RECOMP_ICALL(0x39006200u); /* 0x39004526: call 0x39006200 */ /* not lifted */
  12246     RECOMP_FLAGS_IN();
  12247     edi = MEM32(edi); /* 0x3900452B: mov edi, dword ptr [edi] */
  12248     PUSH32(esp, 0); /* 0x3900452D: push 0 */
  12249     ecx = ebx + 0xC; /* 0x3900452F: lea ecx, [ebx + 0xc] */
  12250     RECOMP_ICALL(0x3900A070u); /* 0x39004532: call 0x3900a070 */ /* not lifted */
  12251     RECOMP_FLAGS_IN();
  12252     PUSH32(esp, ebx); /* 0x39004537: push ebx */
  12253     RECOMP_ICALL(0x3900A0A0u); /* 0x39004538: call 0x3900a0a0 */ /* not lifted */
  12254     RECOMP_FLAGS_IN();
  12255     eax = MEM32(esi + 0x8); /* 0x3900453D: mov eax, dword ptr [esi + 8] */
  12256     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12257     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12258     esp = esp + 4; /* 0x39004540: add esp, 4 */
  12259     _flag_k = FK_ADD;
  12260     /* cmp edi, eax */ /* 0x39004543: cmp edi, eax */
  12261     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  12262     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12263     _flag_k = FK_CMP;
  12264     ebx = edi; /* 0x39004545: mov ebx, edi */
  12265     RECOMP_BACKEDGE();
  12266     if (CMP_NE(_flag_a, _flag_b)) goto L_39004520; /* 0x39004547: jne 0x39004520 */
  12267 L_39004549:
  12268     ecx = MEM32(esi + 0x4); /* 0x39004549: mov ecx, dword ptr [esi + 4] */
  12269     edx = MEM32(esi + 0x8); /* 0x3900454C: mov edx, dword ptr [esi + 8] */
  12270     MEM32(ecx + 0x4) = edx; /* 0x3900454F: mov dword ptr [ecx + 4], edx */
  12271     eax = MEM32(esi + 0x4); /* 0x39004552: mov eax, dword ptr [esi + 4] */
  12272     MEM32(esi + 0x10) = 0; /* 0x39004555: mov dword ptr [esi + 0x10], 0 */
  12273     MEM32(eax) = eax; /* 0x3900455C: mov dword ptr [eax], eax */
  12274     eax = MEM32(esi + 0x4); /* 0x3900455E: mov eax, dword ptr [esi + 4] */
  12275     MEM32(eax + 0x8) = eax; /* 0x39004561: mov dword ptr [eax + 8], eax */
  12276     goto L_39004587; /* 0x39004564: jmp 0x39004587 */
  12277 L_39004566:
  12278     /* cmp eax, edi */ /* 0x39004566: cmp eax, edi */
  12279     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  12280     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12281     _flag_k = FK_CMP;
  12282     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004587; /* 0x39004568: je 0x39004587 */
  12283 L_3900456A:
  12284     ecx = ebp + (-0x4); /* 0x3900456A: lea ecx, [ebp - 4] */
  12285     ebx = eax; /* 0x3900456D: mov ebx, eax */
  12286     RECOMP_ICALL(0x39004BA0u); /* 0x3900456F: call 0x39004ba0 */ /* not lifted */
  12287     RECOMP_FLAGS_IN();
  12288     eax = ebp + (-0x8); /* 0x39004574: lea eax, [ebp - 8] */
  12289     PUSH32(esp, ebx); /* 0x39004577: push ebx */
  12290     PUSH32(esp, eax); /* 0x39004578: push eax */
  12291     ecx = esi; /* 0x39004579: mov ecx, esi */
  12292     RECOMP_ICALL(0x39005DE0u); /* 0x3900457B: call 0x39005de0 */ /* not lifted */
  12293     RECOMP_FLAGS_IN();
  12294     eax = MEM32(ebp + (-0x4)); /* 0x39004580: mov eax, dword ptr [ebp - 4] */
  12295     /* cmp eax, edi */ /* 0x39004583: cmp eax, edi */
  12296     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  12297     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12298     _flag_k = FK_CMP;
  12299     RECOMP_BACKEDGE();
  12300     if (CMP_NE(_flag_a, _flag_b)) goto L_3900456A; /* 0x39004585: jne 0x3900456a */
  12301 L_39004587:
  12302     ecx = MEM32(esi + 0x4); /* 0x39004587: mov ecx, dword ptr [esi + 4] */
  12303     PUSH32(esp, ecx); /* 0x3900458A: push ecx */
  12304     RECOMP_ICALL(0x3900A0A0u); /* 0x3900458B: call 0x3900a0a0 */ /* not lifted */
  12305     RECOMP_FLAGS_IN();
  12306     edx = MEM32(esi + 0x8); /* 0x39004590: mov edx, dword ptr [esi + 8] */
  12307     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  12308     edi = 0; /* 0x39004593: xor edi, edi */
  12309     _cf = 0;
  12310     _flag_k = FK_TEST;
  12311     PUSH32(esp, edx); /* 0x39004595: push edx */
  12312     MEM32(esi + 0x4) = edi; /* 0x39004596: mov dword ptr [esi + 4], edi */
  12313     MEM32(esi + 0x10) = edi; /* 0x39004599: mov dword ptr [esi + 0x10], edi */
  12314     RECOMP_ICALL(0x3900A0A0u); /* 0x3900459C: call 0x3900a0a0 */ /* not lifted */
  12315     RECOMP_FLAGS_IN();
  12316     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  12317     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12318     esp = esp + 8; /* 0x390045A1: add esp, 8 */
  12319     _flag_k = FK_ADD;
  12320     MEM32(esi + 0x8) = edi; /* 0x390045A4: mov dword ptr [esi + 8], edi */
  12321     edi = POP32_VAL(esp); /* 0x390045A7: pop edi */
  12322     esi = POP32_VAL(esp); /* 0x390045A8: pop esi */
  12323     ebx = POP32_VAL(esp); /* 0x390045A9: pop ebx */
  12324     esp = ebp; /* 0x390045AA: mov esp, ebp */
  12325     ebp = POP32_VAL(esp); /* 0x390045AC: pop ebp */
  12326     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x390045AD: ret  */
  12327     RECOMP_REGS_OUT();
  12328 }
  12329 
  12330 void sub_390045B0(void) {
  12331     int _fpu_cmp = 0;
  12332     uint32_t _cf = 0;
  12333     int _df = 1;
  12334     uint32_t _flag_k = FK_NONE;
  12335     uint32_t _flag_a = 0, _flag_b = 0;
  12336     uint32_t _itail_tgt = 0;
  12337     RECOMP_REGS_LOCALS
  12338     RECOMP_ENTER(0x390045B0u);
  12339 
  12340 L_390045B0:
  12341     PUSH32(esp, ebp); /* 0x390045B0: push ebp */
  12342     ebp = esp; /* 0x390045B1: mov ebp, esp */
  12343     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  12344     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12345     esp = esp - 8; /* 0x390045B3: sub esp, 8 */
  12346     _flag_k = FK_CMP;
  12347     PUSH32(esp, ebx); /* 0x390045B6: push ebx */
  12348     PUSH32(esp, esi); /* 0x390045B7: push esi */
  12349     esi = ecx; /* 0x390045B8: mov esi, ecx */
  12350     PUSH32(esp, edi); /* 0x390045BA: push edi */
  12351     edi = MEM32(esi + 0x4); /* 0x390045BB: mov edi, dword ptr [esi + 4] */
  12352     ecx = MEM32(esi + 0x10); /* 0x390045BE: mov ecx, dword ptr [esi + 0x10] */
  12353     /* test ecx, ecx */ /* 0x390045C1: test ecx, ecx */
  12354     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  12355     _cf = 0;
  12356     _flag_k = FK_TEST;
  12357     eax = MEM32(edi); /* 0x390045C3: mov eax, dword ptr [edi] */
  12358     MEM32(ebp + (-0x4)) = eax; /* 0x390045C5: mov dword ptr [ebp - 4], eax */
  12359     if (TEST_Z(_flag_a, _flag_b)) goto L_39004626; /* 0x390045C8: je 0x39004626 */
  12360 L_390045CA:
  12361     ecx = eax; /* 0x390045CA: mov ecx, eax */
  12362     /* cmp eax, ecx */ /* 0x390045CC: cmp eax, ecx */
  12363     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  12364     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12365     _flag_k = FK_CMP;
  12366     if (CMP_NE(_flag_a, _flag_b)) goto L_39004626; /* 0x390045CE: jne 0x39004626 */
  12367 L_390045D0:
  12368     /* cmp edi, edi */ /* 0x390045D0: cmp edi, edi */
  12369     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
  12370     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12371     _flag_k = FK_CMP;
  12372     if (CMP_NE(_flag_a, _flag_b)) goto L_39004626; /* 0x390045D2: jne 0x39004626 */
  12373 L_390045D4:
  12374     ebx = MEM32(edi + 0x4); /* 0x390045D4: mov ebx, dword ptr [edi + 4] */
  12375     eax = MEM32(esi + 0x8); /* 0x390045D7: mov eax, dword ptr [esi + 8] */
  12376     /* cmp ebx, eax */ /* 0x390045DA: cmp ebx, eax */
  12377     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  12378     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12379     _flag_k = FK_CMP;
  12380     edi = ebx; /* 0x390045DC: mov edi, ebx */
  12381     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004609; /* 0x390045DE: je 0x39004609 */
  12382 L_390045E0:
  12383     eax = MEM32(edi + 0x8); /* 0x390045E0: mov eax, dword ptr [edi + 8] */
  12384     ecx = esi; /* 0x390045E3: mov ecx, esi */
  12385     PUSH32(esp, eax); /* 0x390045E5: push eax */
  12386     RECOMP_ICALL(0x39006620u); /* 0x390045E6: call 0x39006620 */ /* not lifted */
  12387     RECOMP_FLAGS_IN();
  12388     edi = MEM32(edi); /* 0x390045EB: mov edi, dword ptr [edi] */
  12389     PUSH32(esp, 0); /* 0x390045ED: push 0 */
  12390     ecx = ebx + 0xC; /* 0x390045EF: lea ecx, [ebx + 0xc] */
  12391     RECOMP_ICALL(0x39007720u); /* 0x390045F2: call 0x39007720 */ /* not lifted */
  12392     RECOMP_FLAGS_IN();
  12393     PUSH32(esp, ebx); /* 0x390045F7: push ebx */
  12394     RECOMP_ICALL(0x3900A0A0u); /* 0x390045F8: call 0x3900a0a0 */ /* not lifted */
  12395     RECOMP_FLAGS_IN();
  12396     eax = MEM32(esi + 0x8); /* 0x390045FD: mov eax, dword ptr [esi + 8] */
  12397     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12398     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12399     esp = esp + 4; /* 0x39004600: add esp, 4 */
  12400     _flag_k = FK_ADD;
  12401     /* cmp edi, eax */ /* 0x39004603: cmp edi, eax */
  12402     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  12403     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12404     _flag_k = FK_CMP;
  12405     ebx = edi; /* 0x39004605: mov ebx, edi */
  12406     RECOMP_BACKEDGE();
  12407     if (CMP_NE(_flag_a, _flag_b)) goto L_390045E0; /* 0x39004607: jne 0x390045e0 */
  12408 L_39004609:
  12409     ecx = MEM32(esi + 0x4); /* 0x39004609: mov ecx, dword ptr [esi + 4] */
  12410     edx = MEM32(esi + 0x8); /* 0x3900460C: mov edx, dword ptr [esi + 8] */
  12411     MEM32(ecx + 0x4) = edx; /* 0x3900460F: mov dword ptr [ecx + 4], edx */
  12412     eax = MEM32(esi + 0x4); /* 0x39004612: mov eax, dword ptr [esi + 4] */
  12413     MEM32(esi + 0x10) = 0; /* 0x39004615: mov dword ptr [esi + 0x10], 0 */
  12414     MEM32(eax) = eax; /* 0x3900461C: mov dword ptr [eax], eax */
  12415     eax = MEM32(esi + 0x4); /* 0x3900461E: mov eax, dword ptr [esi + 4] */
  12416     MEM32(eax + 0x8) = eax; /* 0x39004621: mov dword ptr [eax + 8], eax */
  12417     goto L_39004647; /* 0x39004624: jmp 0x39004647 */
  12418 L_39004626:
  12419     /* cmp eax, edi */ /* 0x39004626: cmp eax, edi */
  12420     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  12421     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12422     _flag_k = FK_CMP;
  12423     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004647; /* 0x39004628: je 0x39004647 */
  12424 L_3900462A:
  12425     ecx = ebp + (-0x4); /* 0x3900462A: lea ecx, [ebp - 4] */
  12426     ebx = eax; /* 0x3900462D: mov ebx, eax */
  12427     RECOMP_ICALL(0x39004F50u); /* 0x3900462F: call 0x39004f50 */ /* not lifted */
  12428     RECOMP_FLAGS_IN();
  12429     eax = ebp + (-0x8); /* 0x39004634: lea eax, [ebp - 8] */
  12430     PUSH32(esp, ebx); /* 0x39004637: push ebx */
  12431     PUSH32(esp, eax); /* 0x39004638: push eax */
  12432     ecx = esi; /* 0x39004639: mov ecx, esi */
  12433     RECOMP_ICALL(0x39006250u); /* 0x3900463B: call 0x39006250 */ /* not lifted */
  12434     RECOMP_FLAGS_IN();
  12435     eax = MEM32(ebp + (-0x4)); /* 0x39004640: mov eax, dword ptr [ebp - 4] */
  12436     /* cmp eax, edi */ /* 0x39004643: cmp eax, edi */
  12437     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  12438     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12439     _flag_k = FK_CMP;
  12440     RECOMP_BACKEDGE();
  12441     if (CMP_NE(_flag_a, _flag_b)) goto L_3900462A; /* 0x39004645: jne 0x3900462a */
  12442 L_39004647:
  12443     ecx = MEM32(esi + 0x4); /* 0x39004647: mov ecx, dword ptr [esi + 4] */
  12444     PUSH32(esp, ecx); /* 0x3900464A: push ecx */
  12445     RECOMP_ICALL(0x3900A0A0u); /* 0x3900464B: call 0x3900a0a0 */ /* not lifted */
  12446     RECOMP_FLAGS_IN();
  12447     edx = MEM32(esi + 0x8); /* 0x39004650: mov edx, dword ptr [esi + 8] */
  12448     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  12449     edi = 0; /* 0x39004653: xor edi, edi */
  12450     _cf = 0;
  12451     _flag_k = FK_TEST;
  12452     PUSH32(esp, edx); /* 0x39004655: push edx */
  12453     MEM32(esi + 0x4) = edi; /* 0x39004656: mov dword ptr [esi + 4], edi */
  12454     MEM32(esi + 0x10) = edi; /* 0x39004659: mov dword ptr [esi + 0x10], edi */
  12455     RECOMP_ICALL(0x3900A0A0u); /* 0x3900465C: call 0x3900a0a0 */ /* not lifted */
  12456     RECOMP_FLAGS_IN();
  12457     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  12458     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12459     esp = esp + 8; /* 0x39004661: add esp, 8 */
  12460     _flag_k = FK_ADD;
  12461     MEM32(esi + 0x8) = edi; /* 0x39004664: mov dword ptr [esi + 8], edi */
  12462     edi = POP32_VAL(esp); /* 0x39004667: pop edi */
  12463     esi = POP32_VAL(esp); /* 0x39004668: pop esi */
  12464     ebx = POP32_VAL(esp); /* 0x39004669: pop ebx */
  12465     esp = ebp; /* 0x3900466A: mov esp, ebp */
  12466     ebp = POP32_VAL(esp); /* 0x3900466C: pop ebp */
  12467     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3900466D: ret  */
  12468     RECOMP_REGS_OUT();
  12469 }
  12470 
  12471 void sub_39004670(void) {
  12472     int _fpu_cmp = 0;
  12473     uint32_t _cf = 0;
  12474     int _df = 1;
  12475     uint32_t _flag_k = FK_NONE;
  12476     uint32_t _flag_a = 0, _flag_b = 0;
  12477     uint32_t _itail_tgt = 0;
  12478     RECOMP_REGS_LOCALS
  12479     RECOMP_ENTER(0x39004670u);
  12480 
  12481 L_39004670:
  12482     PUSH32(esp, ebp); /* 0x39004670: push ebp */
  12483     ebp = esp; /* 0x39004671: mov ebp, esp */
  12484     PUSH32(esp, 0xFFFFFFFFu); /* 0x39004673: push -1 */
  12485     PUSH32(esp, 0x3900A739u); /* 0x39004675: push 0x3900a739 */
  12486     eax = MEM32(FS_BASE + (0)); /* 0x3900467A: mov eax, dword ptr fs:[0] */
  12487     PUSH32(esp, eax); /* 0x39004680: push eax */
  12488     MEM32(FS_BASE + (0)) = esp; /* 0x39004681: mov dword ptr fs:[0], esp */
  12489     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u);
  12490     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12491     esp = esp - 0x18u; /* 0x39004688: sub esp, 0x18 */
  12492     _flag_k = FK_CMP;
  12493     edx = ecx; /* 0x3900468B: mov edx, ecx */
  12494     PUSH32(esp, ebx); /* 0x3900468D: push ebx */
  12495     PUSH32(esp, esi); /* 0x3900468E: push esi */
  12496     MEM32(ebp + (-0x14)) = edx; /* 0x3900468F: mov dword ptr [ebp - 0x14], edx */
  12497     esi = MEM32(edx + 0x1C); /* 0x39004692: mov esi, dword ptr [edx + 0x1c] */
  12498     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  12499     ebx = 0; /* 0x39004695: xor ebx, ebx */
  12500     _cf = 0;
  12501     _flag_k = FK_TEST;
  12502     /* cmp esi, ebx */ /* 0x39004697: cmp esi, ebx */
  12503     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
  12504     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12505     _flag_k = FK_CMP;
  12506     MEM32(ebp + (-0x4)) = ebx; /* 0x39004699: mov dword ptr [ebp - 4], ebx */
  12507     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900474A; /* 0x3900469C: je 0x3900474a */
  12508 L_390046A2:
  12509     eax = MEM32(esi + 0x4); /* 0x390046A2: mov eax, dword ptr [esi + 4] */
  12510     ecx = MEM32(esi + 0x10); /* 0x390046A5: mov ecx, dword ptr [esi + 0x10] */
  12511     PUSH32(esp, edi); /* 0x390046A8: push edi */
  12512     edi = eax; /* 0x390046A9: mov edi, eax */
  12513     eax = MEM32(eax); /* 0x390046AB: mov eax, dword ptr [eax] */
  12514     /* cmp ecx, ebx */ /* 0x390046AD: cmp ecx, ebx */
  12515     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
  12516     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12517     _flag_k = FK_CMP;
  12518     MEM32(ebp + (-0x10)) = eax; /* 0x390046AF: mov dword ptr [ebp - 0x10], eax */
  12519     if (CMP_EQ(_flag_a, _flag_b)) goto L_390046FE; /* 0x390046B2: je 0x390046fe */
  12520 L_390046B4:
  12521     eax = ebp + (-0x18); /* 0x390046B4: lea eax, [ebp - 0x18] */
  12522     ecx = esi; /* 0x390046B7: mov ecx, esi */
  12523     PUSH32(esp, eax); /* 0x390046B9: push eax */
  12524     RECOMP_ICALL(0x39009C30u); /* 0x390046BA: call 0x39009c30 */ /* not lifted */
  12525     RECOMP_FLAGS_IN();
  12526     ecx = eax; /* 0x390046BF: mov ecx, eax */
  12527     eax = MEM32(ebp + (-0x10)); /* 0x390046C1: mov eax, dword ptr [ebp - 0x10] */
  12528     /* cmp eax, MEM32(ecx) */ /* 0x390046C4: cmp eax, dword ptr [ecx] */
  12529     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx));
  12530     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12531     _flag_k = FK_CMP;
  12532     if (CMP_NE(_flag_a, _flag_b)) goto L_390046FE; /* 0x390046C6: jne 0x390046fe */
  12533 L_390046C8:
  12534     ecx = MEM32(esi + 0x4); /* 0x390046C8: mov ecx, dword ptr [esi + 4] */
  12535     /* cmp edi, ecx */ /* 0x390046CB: cmp edi, ecx */
  12536     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx);
  12537     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12538     _flag_k = FK_CMP;
  12539     if (CMP_NE(_flag_a, _flag_b)) goto L_390046FE; /* 0x390046CD: jne 0x390046fe */
  12540 L_390046CF:
  12541     edx = MEM32(ecx + 0x4); /* 0x390046CF: mov edx, dword ptr [ecx + 4] */
  12542     ecx = esi; /* 0x390046D2: mov ecx, esi */
  12543     PUSH32(esp, edx); /* 0x390046D4: push edx */
  12544     RECOMP_ICALL(0x390053B0u); /* 0x390046D5: call 0x390053b0 */ /* not lifted */
  12545     RECOMP_FLAGS_IN();
  12546     eax = MEM32(esi + 0x4); /* 0x390046DA: mov eax, dword ptr [esi + 4] */
  12547     ecx = MEM32(esi + 0x8); /* 0x390046DD: mov ecx, dword ptr [esi + 8] */
  12548     edx = ebp + (-0x1C); /* 0x390046E0: lea edx, [ebp - 0x1c] */
  12549     MEM32(eax + 0x4) = ecx; /* 0x390046E3: mov dword ptr [eax + 4], ecx */
  12550     eax = MEM32(esi + 0x4); /* 0x390046E6: mov eax, dword ptr [esi + 4] */
  12551     MEM32(esi + 0x10) = ebx; /* 0x390046E9: mov dword ptr [esi + 0x10], ebx */
  12552     PUSH32(esp, edx); /* 0x390046EC: push edx */
  12553     MEM32(eax) = eax; /* 0x390046ED: mov dword ptr [eax], eax */
  12554     eax = MEM32(esi + 0x4); /* 0x390046EF: mov eax, dword ptr [esi + 4] */
  12555     ecx = esi; /* 0x390046F2: mov ecx, esi */
  12556     MEM32(eax + 0x8) = eax; /* 0x390046F4: mov dword ptr [eax + 8], eax */
  12557     RECOMP_ICALL(0x39009C30u); /* 0x390046F7: call 0x39009c30 */ /* not lifted */
  12558     RECOMP_FLAGS_IN();
  12559     goto L_39004722; /* 0x390046FC: jmp 0x39004722 */
  12560 L_390046FE:
  12561     /* cmp eax, edi */ /* 0x390046FE: cmp eax, edi */
  12562     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  12563     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12564     _flag_k = FK_CMP;
  12565     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004722; /* 0x39004700: je 0x39004722 */
  12566 L_39004702:
  12567     eax = ebp + (-0x20); /* 0x39004702: lea eax, [ebp - 0x20] */
  12568     PUSH32(esp, ebx); /* 0x39004705: push ebx */
  12569     PUSH32(esp, eax); /* 0x39004706: push eax */
  12570     ecx = ebp + (-0x10); /* 0x39004707: lea ecx, [ebp - 0x10] */
  12571     RECOMP_ICALL(0x39005690u); /* 0x3900470A: call 0x39005690 */ /* not lifted */
  12572     RECOMP_FLAGS_IN();
  12573     ecx = MEM32(eax); /* 0x3900470F: mov ecx, dword ptr [eax] */
  12574     edx = ebp + (-0x24); /* 0x39004711: lea edx, [ebp - 0x24] */
  12575     PUSH32(esp, ecx); /* 0x39004714: push ecx */
  12576     PUSH32(esp, edx); /* 0x39004715: push edx */
  12577     ecx = esi; /* 0x39004716: mov ecx, esi */
  12578     RECOMP_ICALL(0x39004FA0u); /* 0x39004718: call 0x39004fa0 */ /* not lifted */
  12579     RECOMP_FLAGS_IN();
  12580     /* cmp MEM32(ebp + (-0x10)), edi */ /* 0x3900471D: cmp dword ptr [ebp - 0x10], edi */
  12581     _flag_a = (uint32_t)(MEM32(ebp + (-0x10))); _flag_b = (uint32_t)(edi);
  12582     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12583     _flag_k = FK_CMP;
  12584     RECOMP_BACKEDGE();
  12585     if (CMP_NE(_flag_a, _flag_b)) goto L_39004702; /* 0x39004720: jne 0x39004702 */
  12586 L_39004722:
  12587     eax = MEM32(esi + 0x4); /* 0x39004722: mov eax, dword ptr [esi + 4] */
  12588     PUSH32(esp, eax); /* 0x39004725: push eax */
  12589     RECOMP_ICALL(0x3900A0A0u); /* 0x39004726: call 0x3900a0a0 */ /* not lifted */
  12590     RECOMP_FLAGS_IN();
  12591     ecx = MEM32(esi + 0x8); /* 0x3900472B: mov ecx, dword ptr [esi + 8] */
  12592     MEM32(esi + 0x4) = ebx; /* 0x3900472E: mov dword ptr [esi + 4], ebx */
  12593     PUSH32(esp, ecx); /* 0x39004731: push ecx */
  12594     MEM32(esi + 0x10) = ebx; /* 0x39004732: mov dword ptr [esi + 0x10], ebx */
  12595     RECOMP_ICALL(0x3900A0A0u); /* 0x39004735: call 0x3900a0a0 */ /* not lifted */
  12596     RECOMP_FLAGS_IN();
  12597     PUSH32(esp, esi); /* 0x3900473A: push esi */
  12598     MEM32(esi + 0x8) = ebx; /* 0x3900473B: mov dword ptr [esi + 8], ebx */
  12599     RECOMP_ICALL(0x3900A0A0u); /* 0x3900473E: call 0x3900a0a0 */ /* not lifted */
  12600     RECOMP_FLAGS_IN();
  12601     edx = MEM32(ebp + (-0x14)); /* 0x39004743: mov edx, dword ptr [ebp - 0x14] */
  12602     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
  12603     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12604     esp = esp + 0xCu; /* 0x39004746: add esp, 0xc */
  12605     _flag_k = FK_ADD;
  12606     edi = POP32_VAL(esp); /* 0x39004749: pop edi */
  12607 L_3900474A:
  12608     eax = MEM32(edx + 0x4); /* 0x3900474A: mov eax, dword ptr [edx + 4] */
  12609     /* cmp eax, ebx */ /* 0x3900474D: cmp eax, ebx */
  12610     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
  12611     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12612     _flag_k = FK_CMP;
  12613     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004771; /* 0x3900474F: je 0x39004771 */
  12614 L_39004751:
  12615     ecx = eax + (-0x1); /* 0x39004751: lea ecx, [eax - 1] */
  12616     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x39004754: mov al, byte ptr [eax - 1] */
  12617     /* cmp LO8(eax), LO8(ebx) */ /* 0x39004757: cmp al, bl */
  12618     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  12619     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12620     _flag_k = FK_NARROW(FK_CMP, 24);
  12621     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004765; /* 0x39004759: je 0x39004765 */
  12622 L_3900475B:
  12623     /* cmp LO8(eax), 0xFFu */ /* 0x3900475B: cmp al, 0xff */
  12624     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
  12625     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12626     _flag_k = FK_NARROW(FK_CMP, 24);
  12627     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004765; /* 0x3900475D: je 0x39004765 */
  12628 L_3900475F:
  12629     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
  12630     SET_LO8(eax, LO8(eax) - 1); /* 0x3900475F: dec al */
  12631     _flag_k = FK_NARROW(FK_DEC, 24);
  12632     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x39004761: mov byte ptr [ecx], al */
  12633     goto L_39004771; /* 0x39004763: jmp 0x39004771 */
  12634 L_39004765:
  12635     PUSH32(esp, ecx); /* 0x39004765: push ecx */
  12636     RECOMP_ICALL(0x3900A0A0u); /* 0x39004766: call 0x3900a0a0 */ /* not lifted */
  12637     RECOMP_FLAGS_IN();
  12638     edx = MEM32(ebp + (-0x14)); /* 0x3900476B: mov edx, dword ptr [ebp - 0x14] */
  12639     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12640     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12641     esp = esp + 4; /* 0x3900476E: add esp, 4 */
  12642     _flag_k = FK_ADD;
  12643 L_39004771:
  12644     ecx = MEM32(ebp + (-0xC)); /* 0x39004771: mov ecx, dword ptr [ebp - 0xc] */
  12645     MEM32(edx + 0x4) = ebx; /* 0x39004774: mov dword ptr [edx + 4], ebx */
  12646     MEM32(edx + 0x8) = ebx; /* 0x39004777: mov dword ptr [edx + 8], ebx */
  12647     MEM32(edx + 0xC) = ebx; /* 0x3900477A: mov dword ptr [edx + 0xc], ebx */
  12648     esi = POP32_VAL(esp); /* 0x3900477D: pop esi */
  12649     ebx = POP32_VAL(esp); /* 0x3900477E: pop ebx */
  12650     MEM32(FS_BASE + (0)) = ecx; /* 0x3900477F: mov dword ptr fs:[0], ecx */
  12651     esp = ebp; /* 0x39004786: mov esp, ebp */
  12652     ebp = POP32_VAL(esp); /* 0x39004788: pop ebp */
  12653     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39004789: ret  */
  12654     RECOMP_REGS_OUT();
  12655 }
  12656 
  12657 void sub_39004722(void) {
  12658     int _fpu_cmp = 0;
  12659     uint32_t _cf = 0;
  12660     int _df = 1;
  12661     uint32_t _flag_k = FK_NONE;
  12662     uint32_t _flag_a = 0, _flag_b = 0;
  12663     uint32_t _itail_tgt = 0;
  12664     RECOMP_REGS_LOCALS
  12665     RECOMP_ENTER(0x39004722u);
  12666 
  12667 L_39004722:
  12668     eax = MEM32(esi + 0x4); /* 0x39004722: mov eax, dword ptr [esi + 4] */
  12669     PUSH32(esp, eax); /* 0x39004725: push eax */
  12670     RECOMP_ICALL(0x3900A0A0u); /* 0x39004726: call 0x3900a0a0 */ /* not lifted */
  12671     RECOMP_FLAGS_IN();
  12672     ecx = MEM32(esi + 0x8); /* 0x3900472B: mov ecx, dword ptr [esi + 8] */
  12673     MEM32(esi + 0x4) = ebx; /* 0x3900472E: mov dword ptr [esi + 4], ebx */
  12674     PUSH32(esp, ecx); /* 0x39004731: push ecx */
  12675     MEM32(esi + 0x10) = ebx; /* 0x39004732: mov dword ptr [esi + 0x10], ebx */
  12676     RECOMP_ICALL(0x3900A0A0u); /* 0x39004735: call 0x3900a0a0 */ /* not lifted */
  12677     RECOMP_FLAGS_IN();
  12678     PUSH32(esp, esi); /* 0x3900473A: push esi */
  12679     MEM32(esi + 0x8) = ebx; /* 0x3900473B: mov dword ptr [esi + 8], ebx */
  12680     RECOMP_ICALL(0x3900A0A0u); /* 0x3900473E: call 0x3900a0a0 */ /* not lifted */
  12681     RECOMP_FLAGS_IN();
  12682     edx = MEM32(ebp + (-0x14)); /* 0x39004743: mov edx, dword ptr [ebp - 0x14] */
  12683     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
  12684     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12685     esp = esp + 0xCu; /* 0x39004746: add esp, 0xc */
  12686     _flag_k = FK_ADD;
  12687     edi = POP32_VAL(esp); /* 0x39004749: pop edi */
  12688     eax = MEM32(edx + 0x4); /* 0x3900474A: mov eax, dword ptr [edx + 4] */
  12689     /* cmp eax, ebx */ /* 0x3900474D: cmp eax, ebx */
  12690     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
  12691     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12692     _flag_k = FK_CMP;
  12693     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004771; /* 0x3900474F: je 0x39004771 */
  12694 L_39004751:
  12695     ecx = eax + (-0x1); /* 0x39004751: lea ecx, [eax - 1] */
  12696     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x39004754: mov al, byte ptr [eax - 1] */
  12697     /* cmp LO8(eax), LO8(ebx) */ /* 0x39004757: cmp al, bl */
  12698     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  12699     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12700     _flag_k = FK_NARROW(FK_CMP, 24);
  12701     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004765; /* 0x39004759: je 0x39004765 */
  12702 L_3900475B:
  12703     /* cmp LO8(eax), 0xFFu */ /* 0x3900475B: cmp al, 0xff */
  12704     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
  12705     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12706     _flag_k = FK_NARROW(FK_CMP, 24);
  12707     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004765; /* 0x3900475D: je 0x39004765 */
  12708 L_3900475F:
  12709     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
  12710     SET_LO8(eax, LO8(eax) - 1); /* 0x3900475F: dec al */
  12711     _flag_k = FK_NARROW(FK_DEC, 24);
  12712     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x39004761: mov byte ptr [ecx], al */
  12713     goto L_39004771; /* 0x39004763: jmp 0x39004771 */
  12714 L_39004765:
  12715     PUSH32(esp, ecx); /* 0x39004765: push ecx */
  12716     RECOMP_ICALL(0x3900A0A0u); /* 0x39004766: call 0x3900a0a0 */ /* not lifted */
  12717     RECOMP_FLAGS_IN();
  12718     edx = MEM32(ebp + (-0x14)); /* 0x3900476B: mov edx, dword ptr [ebp - 0x14] */
  12719     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12720     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12721     esp = esp + 4; /* 0x3900476E: add esp, 4 */
  12722     _flag_k = FK_ADD;
  12723 L_39004771:
  12724     ecx = MEM32(ebp + (-0xC)); /* 0x39004771: mov ecx, dword ptr [ebp - 0xc] */
  12725     MEM32(edx + 0x4) = ebx; /* 0x39004774: mov dword ptr [edx + 4], ebx */
  12726     MEM32(edx + 0x8) = ebx; /* 0x39004777: mov dword ptr [edx + 8], ebx */
  12727     MEM32(edx + 0xC) = ebx; /* 0x3900477A: mov dword ptr [edx + 0xc], ebx */
  12728     esi = POP32_VAL(esp); /* 0x3900477D: pop esi */
  12729     ebx = POP32_VAL(esp); /* 0x3900477E: pop ebx */
  12730     MEM32(FS_BASE + (0)) = ecx; /* 0x3900477F: mov dword ptr fs:[0], ecx */
  12731     esp = ebp; /* 0x39004786: mov esp, ebp */
  12732     ebp = POP32_VAL(esp); /* 0x39004788: pop ebp */
  12733     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39004789: ret  */
  12734     RECOMP_REGS_OUT();
  12735 }
  12736 
  12737 void sub_39004771(void) {
  12738     int _fpu_cmp = 0;
  12739     uint32_t _cf = 0;
  12740     int _df = 1;
  12741     uint32_t _flag_k = FK_NONE;
  12742     uint32_t _flag_a = 0, _flag_b = 0;
  12743     uint32_t _itail_tgt = 0;
  12744     RECOMP_REGS_LOCALS
  12745     RECOMP_ENTER(0x39004771u);
  12746 
  12747 L_39004771:
  12748     ecx = MEM32(ebp + (-0xC)); /* 0x39004771: mov ecx, dword ptr [ebp - 0xc] */
  12749     MEM32(edx + 0x4) = ebx; /* 0x39004774: mov dword ptr [edx + 4], ebx */
  12750     MEM32(edx + 0x8) = ebx; /* 0x39004777: mov dword ptr [edx + 8], ebx */
  12751     MEM32(edx + 0xC) = ebx; /* 0x3900477A: mov dword ptr [edx + 0xc], ebx */
  12752     esi = POP32_VAL(esp); /* 0x3900477D: pop esi */
  12753     ebx = POP32_VAL(esp); /* 0x3900477E: pop ebx */
  12754     MEM32(FS_BASE + (0)) = ecx; /* 0x3900477F: mov dword ptr fs:[0], ecx */
  12755     esp = ebp; /* 0x39004786: mov esp, ebp */
  12756     ebp = POP32_VAL(esp); /* 0x39004788: pop ebp */
  12757     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39004789: ret  */
  12758     RECOMP_REGS_OUT();
  12759 }
  12760 
  12761 void sub_39004790(void) {
  12762     int _fpu_cmp = 0;
  12763     uint32_t _cf = 0;
  12764     int _df = 1;
  12765     uint32_t _flag_k = FK_NONE;
  12766     uint32_t _flag_a = 0, _flag_b = 0;
  12767     uint32_t _itail_tgt = 0;
  12768     RECOMP_REGS_LOCALS
  12769     RECOMP_ENTER(0x39004790u);
  12770 
  12771 L_39004790:
  12772     PUSH32(esp, esi); /* 0x39004790: push esi */
  12773     esi = ecx; /* 0x39004791: mov esi, ecx */
  12774     eax = MEM32(esi + 0x4); /* 0x39004793: mov eax, dword ptr [esi + 4] */
  12775     /* test eax, eax */ /* 0x39004796: test eax, eax */
  12776     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  12777     _cf = 0;
  12778     _flag_k = FK_TEST;
  12779     if (TEST_Z(_flag_a, _flag_b)) goto L_390047B7; /* 0x39004798: je 0x390047b7 */
  12780 L_3900479A:
  12781     ecx = eax + (-0x1); /* 0x3900479A: lea ecx, [eax - 1] */
  12782     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x3900479D: mov al, byte ptr [eax - 1] */
  12783     /* test LO8(eax), LO8(eax) */ /* 0x390047A0: test al, al */
  12784     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  12785     _cf = 0;
  12786     _flag_k = FK_NARROW(FK_TEST, 24);
  12787     if (TEST_Z(_flag_a, _flag_b)) goto L_390047AE; /* 0x390047A2: je 0x390047ae */
  12788 L_390047A4:
  12789     /* cmp LO8(eax), 0xFFu */ /* 0x390047A4: cmp al, 0xff */
  12790     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
  12791     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12792     _flag_k = FK_NARROW(FK_CMP, 24);
  12793     if (CMP_EQ(_flag_a, _flag_b)) goto L_390047AE; /* 0x390047A6: je 0x390047ae */
  12794 L_390047A8:
  12795     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
  12796     SET_LO8(eax, LO8(eax) - 1); /* 0x390047A8: dec al */
  12797     _flag_k = FK_NARROW(FK_DEC, 24);
  12798     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x390047AA: mov byte ptr [ecx], al */
  12799     goto L_390047B7; /* 0x390047AC: jmp 0x390047b7 */
  12800 L_390047AE:
  12801     PUSH32(esp, ecx); /* 0x390047AE: push ecx */
  12802     RECOMP_ICALL(0x3900A0A0u); /* 0x390047AF: call 0x3900a0a0 */ /* not lifted */
  12803     RECOMP_FLAGS_IN();
  12804     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12805     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12806     esp = esp + 4; /* 0x390047B4: add esp, 4 */
  12807     _flag_k = FK_ADD;
  12808 L_390047B7:
  12809     MEM32(esi + 0x4) = 0; /* 0x390047B7: mov dword ptr [esi + 4], 0 */
  12810     MEM32(esi + 0x8) = 0; /* 0x390047BE: mov dword ptr [esi + 8], 0 */
  12811     MEM32(esi + 0xC) = 0; /* 0x390047C5: mov dword ptr [esi + 0xc], 0 */
  12812     esi = POP32_VAL(esp); /* 0x390047CC: pop esi */
  12813     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x390047CD: ret  */
  12814     RECOMP_REGS_OUT();
  12815 }
  12816 
  12817 void sub_390047B7(void) {
  12818     int _fpu_cmp = 0;
  12819     uint32_t _cf = 0;
  12820     int _df = 1;
  12821     uint32_t _flag_k = FK_NONE;
  12822     uint32_t _flag_a = 0, _flag_b = 0;
  12823     uint32_t _itail_tgt = 0;
  12824     RECOMP_REGS_LOCALS
  12825     RECOMP_ENTER(0x390047B7u);
  12826 
  12827 L_390047B7:
  12828     MEM32(esi + 0x4) = 0; /* 0x390047B7: mov dword ptr [esi + 4], 0 */
  12829     MEM32(esi + 0x8) = 0; /* 0x390047BE: mov dword ptr [esi + 8], 0 */
  12830     MEM32(esi + 0xC) = 0; /* 0x390047C5: mov dword ptr [esi + 0xc], 0 */
  12831     esi = POP32_VAL(esp); /* 0x390047CC: pop esi */
  12832     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x390047CD: ret  */
  12833     RECOMP_REGS_OUT();
  12834 }
  12835 
  12836 void sub_390047D0(void) {
  12837     int _fpu_cmp = 0;
  12838     uint32_t _cf = 0;
  12839     int _df = 1;
  12840     uint32_t _flag_k = FK_NONE;
  12841     uint32_t _flag_a = 0, _flag_b = 0;
  12842     uint32_t _itail_tgt = 0;
  12843     RECOMP_REGS_LOCALS
  12844     RECOMP_ENTER(0x390047D0u);
  12845 
  12846 L_390047D0:
  12847     PUSH32(esp, ebx); /* 0x390047D0: push ebx */
  12848     PUSH32(esp, esi); /* 0x390047D1: push esi */
  12849     esi = ecx; /* 0x390047D2: mov esi, ecx */
  12850     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  12851     ebx = 0; /* 0x390047D4: xor ebx, ebx */
  12852     _cf = 0;
  12853     _flag_k = FK_TEST;
  12854     eax = MEM32(esi + 0x14); /* 0x390047D6: mov eax, dword ptr [esi + 0x14] */
  12855     /* cmp eax, ebx */ /* 0x390047D9: cmp eax, ebx */
  12856     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
  12857     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12858     _flag_k = FK_CMP;
  12859     if (CMP_EQ(_flag_a, _flag_b)) goto L_390047FA; /* 0x390047DB: je 0x390047fa */
  12860 L_390047DD:
  12861     ecx = eax + (-0x1); /* 0x390047DD: lea ecx, [eax - 1] */
  12862     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x390047E0: mov al, byte ptr [eax - 1] */
  12863     /* cmp LO8(eax), LO8(ebx) */ /* 0x390047E3: cmp al, bl */
  12864     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  12865     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12866     _flag_k = FK_NARROW(FK_CMP, 24);
  12867     if (CMP_EQ(_flag_a, _flag_b)) goto L_390047F1; /* 0x390047E5: je 0x390047f1 */
  12868 L_390047E7:
  12869     /* cmp LO8(eax), 0xFFu */ /* 0x390047E7: cmp al, 0xff */
  12870     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
  12871     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12872     _flag_k = FK_NARROW(FK_CMP, 24);
  12873     if (CMP_EQ(_flag_a, _flag_b)) goto L_390047F1; /* 0x390047E9: je 0x390047f1 */
  12874 L_390047EB:
  12875     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
  12876     SET_LO8(eax, LO8(eax) - 1); /* 0x390047EB: dec al */
  12877     _flag_k = FK_NARROW(FK_DEC, 24);
  12878     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x390047ED: mov byte ptr [ecx], al */
  12879     goto L_390047FA; /* 0x390047EF: jmp 0x390047fa */
  12880 L_390047F1:
  12881     PUSH32(esp, ecx); /* 0x390047F1: push ecx */
  12882     RECOMP_ICALL(0x3900A0A0u); /* 0x390047F2: call 0x3900a0a0 */ /* not lifted */
  12883     RECOMP_FLAGS_IN();
  12884     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12885     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12886     esp = esp + 4; /* 0x390047F7: add esp, 4 */
  12887     _flag_k = FK_ADD;
  12888 L_390047FA:
  12889     MEM32(esi + 0x14) = ebx; /* 0x390047FA: mov dword ptr [esi + 0x14], ebx */
  12890     MEM32(esi + 0x18) = ebx; /* 0x390047FD: mov dword ptr [esi + 0x18], ebx */
  12891     MEM32(esi + 0x1C) = ebx; /* 0x39004800: mov dword ptr [esi + 0x1c], ebx */
  12892     eax = MEM32(esi + 0x4); /* 0x39004803: mov eax, dword ptr [esi + 4] */
  12893     /* cmp eax, ebx */ /* 0x39004806: cmp eax, ebx */
  12894     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
  12895     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12896     _flag_k = FK_CMP;
  12897     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004831; /* 0x39004808: je 0x39004831 */
  12898 L_3900480A:
  12899     ecx = eax + (-0x1); /* 0x3900480A: lea ecx, [eax - 1] */
  12900     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x3900480D: mov al, byte ptr [eax - 1] */
  12901     /* cmp LO8(eax), LO8(ebx) */ /* 0x39004810: cmp al, bl */
  12902     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  12903     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12904     _flag_k = FK_NARROW(FK_CMP, 24);
  12905     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004828; /* 0x39004812: je 0x39004828 */
  12906 L_39004814:
  12907     /* cmp LO8(eax), 0xFFu */ /* 0x39004814: cmp al, 0xff */
  12908     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
  12909     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12910     _flag_k = FK_NARROW(FK_CMP, 24);
  12911     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004828; /* 0x39004816: je 0x39004828 */
  12912 L_39004818:
  12913     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
  12914     SET_LO8(eax, LO8(eax) - 1); /* 0x39004818: dec al */
  12915     _flag_k = FK_NARROW(FK_DEC, 24);
  12916     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x3900481A: mov byte ptr [ecx], al */
  12917     MEM32(esi + 0x4) = ebx; /* 0x3900481C: mov dword ptr [esi + 4], ebx */
  12918     MEM32(esi + 0x8) = ebx; /* 0x3900481F: mov dword ptr [esi + 8], ebx */
  12919     MEM32(esi + 0xC) = ebx; /* 0x39004822: mov dword ptr [esi + 0xc], ebx */
  12920     esi = POP32_VAL(esp); /* 0x39004825: pop esi */
  12921     ebx = POP32_VAL(esp); /* 0x39004826: pop ebx */
  12922     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39004827: ret  */
  12923 L_39004828:
  12924     PUSH32(esp, ecx); /* 0x39004828: push ecx */
  12925     RECOMP_ICALL(0x3900A0A0u); /* 0x39004829: call 0x3900a0a0 */ /* not lifted */
  12926     RECOMP_FLAGS_IN();
  12927     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12928     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12929     esp = esp + 4; /* 0x3900482E: add esp, 4 */
  12930     _flag_k = FK_ADD;
  12931 L_39004831:
  12932     MEM32(esi + 0x4) = ebx; /* 0x39004831: mov dword ptr [esi + 4], ebx */
  12933     MEM32(esi + 0x8) = ebx; /* 0x39004834: mov dword ptr [esi + 8], ebx */
  12934     MEM32(esi + 0xC) = ebx; /* 0x39004837: mov dword ptr [esi + 0xc], ebx */
  12935     esi = POP32_VAL(esp); /* 0x3900483A: pop esi */
  12936     ebx = POP32_VAL(esp); /* 0x3900483B: pop ebx */
  12937     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3900483C: ret  */
  12938     RECOMP_REGS_OUT();
  12939 }
  12940 
  12941 void sub_390047FA(void) {
  12942     int _fpu_cmp = 0;
  12943     uint32_t _cf = 0;
  12944     int _df = 1;
  12945     uint32_t _flag_k = FK_NONE;
  12946     uint32_t _flag_a = 0, _flag_b = 0;
  12947     uint32_t _itail_tgt = 0;
  12948     RECOMP_REGS_LOCALS
  12949     RECOMP_ENTER(0x390047FAu);
  12950 
  12951 L_390047FA:
  12952     MEM32(esi + 0x14) = ebx; /* 0x390047FA: mov dword ptr [esi + 0x14], ebx */
  12953     MEM32(esi + 0x18) = ebx; /* 0x390047FD: mov dword ptr [esi + 0x18], ebx */
  12954     MEM32(esi + 0x1C) = ebx; /* 0x39004800: mov dword ptr [esi + 0x1c], ebx */
  12955     eax = MEM32(esi + 0x4); /* 0x39004803: mov eax, dword ptr [esi + 4] */
  12956     /* cmp eax, ebx */ /* 0x39004806: cmp eax, ebx */
  12957     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
  12958     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12959     _flag_k = FK_CMP;
  12960     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004831; /* 0x39004808: je 0x39004831 */
  12961 L_3900480A:
  12962     ecx = eax + (-0x1); /* 0x3900480A: lea ecx, [eax - 1] */
  12963     SET_LO8(eax, MEM8(eax + (-0x1))); /* 0x3900480D: mov al, byte ptr [eax - 1] */
  12964     /* cmp LO8(eax), LO8(ebx) */ /* 0x39004810: cmp al, bl */
  12965     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  12966     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12967     _flag_k = FK_NARROW(FK_CMP, 24);
  12968     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004828; /* 0x39004812: je 0x39004828 */
  12969 L_39004814:
  12970     /* cmp LO8(eax), 0xFFu */ /* 0x39004814: cmp al, 0xff */
  12971     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
  12972     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12973     _flag_k = FK_NARROW(FK_CMP, 24);
  12974     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004828; /* 0x39004816: je 0x39004828 */
  12975 L_39004818:
  12976     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
  12977     SET_LO8(eax, LO8(eax) - 1); /* 0x39004818: dec al */
  12978     _flag_k = FK_NARROW(FK_DEC, 24);
  12979     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x3900481A: mov byte ptr [ecx], al */
  12980     MEM32(esi + 0x4) = ebx; /* 0x3900481C: mov dword ptr [esi + 4], ebx */
  12981     MEM32(esi + 0x8) = ebx; /* 0x3900481F: mov dword ptr [esi + 8], ebx */
  12982     MEM32(esi + 0xC) = ebx; /* 0x39004822: mov dword ptr [esi + 0xc], ebx */
  12983     esi = POP32_VAL(esp); /* 0x39004825: pop esi */
  12984     ebx = POP32_VAL(esp); /* 0x39004826: pop ebx */
  12985     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39004827: ret  */
  12986 L_39004828:
  12987     PUSH32(esp, ecx); /* 0x39004828: push ecx */
  12988     RECOMP_ICALL(0x3900A0A0u); /* 0x39004829: call 0x3900a0a0 */ /* not lifted */
  12989     RECOMP_FLAGS_IN();
  12990     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12991     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12992     esp = esp + 4; /* 0x3900482E: add esp, 4 */
  12993     _flag_k = FK_ADD;
  12994 L_39004831:
  12995     MEM32(esi + 0x4) = ebx; /* 0x39004831: mov dword ptr [esi + 4], ebx */
  12996     MEM32(esi + 0x8) = ebx; /* 0x39004834: mov dword ptr [esi + 8], ebx */
  12997     MEM32(esi + 0xC) = ebx; /* 0x39004837: mov dword ptr [esi + 0xc], ebx */
  12998     esi = POP32_VAL(esp); /* 0x3900483A: pop esi */
  12999     ebx = POP32_VAL(esp); /* 0x3900483B: pop ebx */
  13000     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3900483C: ret  */
  13001     RECOMP_REGS_OUT();
  13002 }
  13003 
  13004 void sub_39004840(void) {
  13005     int _fpu_cmp = 0;
  13006     uint32_t _cf = 0;
  13007     int _df = 1;
  13008     uint32_t _flag_k = FK_NONE;
  13009     uint32_t _flag_a = 0, _flag_b = 0;
  13010     uint32_t _itail_tgt = 0;
  13011     RECOMP_REGS_LOCALS
  13012     RECOMP_ENTER(0x39004840u);
  13013 
  13014 L_39004840:
  13015     PUSH32(esp, ebp); /* 0x39004840: push ebp */
  13016     ebp = esp; /* 0x39004841: mov ebp, esp */
  13017     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
  13018     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13019     esp = esp - 0x10u; /* 0x39004843: sub esp, 0x10 */
  13020     _flag_k = FK_CMP;
  13021     PUSH32(esp, ebx); /* 0x39004846: push ebx */
  13022     PUSH32(esp, esi); /* 0x39004847: push esi */
  13023     PUSH32(esp, edi); /* 0x39004848: push edi */
  13024     edi = ecx; /* 0x39004849: mov edi, ecx */
  13025     SET_LO8(eax, 1); /* 0x3900484B: mov al, 1 */
  13026     ebx = MEM32(edi + 0x4); /* 0x3900484D: mov ebx, dword ptr [edi + 4] */
  13027     ecx = MEM32(edi + 0x8); /* 0x39004850: mov ecx, dword ptr [edi + 8] */
  13028     esi = MEM32(ebx + 0x4); /* 0x39004853: mov esi, dword ptr [ebx + 4] */
  13029     /* cmp esi, ecx */ /* 0x39004856: cmp esi, ecx */
  13030     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx);
  13031     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13032     _flag_k = FK_CMP;
  13033     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900487D; /* 0x39004858: je 0x3900487d */
  13034 L_3900485A:
  13035     ecx = MEM32(ebp + 0xC); /* 0x3900485A: mov ecx, dword ptr [ebp + 0xc] */
  13036     eax = esi + 0xC; /* 0x3900485D: lea eax, [esi + 0xc] */
  13037     PUSH32(esp, eax); /* 0x39004860: push eax */
  13038     PUSH32(esp, ecx); /* 0x39004861: push ecx */
  13039     ebx = esi; /* 0x39004862: mov ebx, esi */
  13040     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x39004864: call dword ptr [0x3900b030] */
  13041     RECOMP_FLAGS_IN();
  13042     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  13043     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13044     esp = esp + 8; /* 0x3900486A: add esp, 8 */
  13045     _flag_k = FK_ADD;
  13046     /* test LO8(eax), LO8(eax) */ /* 0x3900486D: test al, al */
  13047     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  13048     _cf = 0;
  13049     _flag_k = FK_NARROW(FK_TEST, 24);
  13050     if (TEST_Z(_flag_a, _flag_b)) goto L_39004875; /* 0x3900486F: je 0x39004875 */
  13051 L_39004871:
  13052     esi = MEM32(esi); /* 0x39004871: mov esi, dword ptr [esi] */
  13053     goto L_39004878; /* 0x39004873: jmp 0x39004878 */
  13054 L_39004875:
  13055     esi = MEM32(esi + 0x8); /* 0x39004875: mov esi, dword ptr [esi + 8] */
  13056 L_39004878:
  13057     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39004878: cmp esi, dword ptr [edi + 8] */
  13058     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  13059     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13060     _flag_k = FK_CMP;
  13061     RECOMP_BACKEDGE();
  13062     if (CMP_NE(_flag_a, _flag_b)) goto L_3900485A; /* 0x3900487B: jne 0x3900485a */
  13063 L_3900487D:
  13064     SET_LO8(ecx, MEM8(edi + 0xC)); /* 0x3900487D: mov cl, byte ptr [edi + 0xc] */
  13065     /* test LO8(ecx), LO8(ecx) */ /* 0x39004880: test cl, cl */
  13066     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
  13067     _cf = 0;
  13068     _flag_k = FK_NARROW(FK_TEST, 24);
  13069     if (TEST_Z(_flag_a, _flag_b)) goto L_390048A2; /* 0x39004882: je 0x390048a2 */
  13070 L_39004884:
  13071     edx = MEM32(ebp + 0xC); /* 0x39004884: mov edx, dword ptr [ebp + 0xc] */
  13072     eax = ebp + (-0x8); /* 0x39004887: lea eax, [ebp - 8] */
  13073     PUSH32(esp, edx); /* 0x3900488A: push edx */
  13074     PUSH32(esp, ebx); /* 0x3900488B: push ebx */
  13075     PUSH32(esp, esi); /* 0x3900488C: push esi */
  13076     PUSH32(esp, eax); /* 0x3900488D: push eax */
  13077     ecx = edi; /* 0x3900488E: mov ecx, edi */
  13078     RECOMP_ICALL(0x39006990u); /* 0x39004890: call 0x39006990 */ /* not lifted */
  13079     RECOMP_FLAGS_IN();
  13080     eax = MEM32(eax); /* 0x39004895: mov eax, dword ptr [eax] */
  13081     MEM8(ebp + (-0xC)) = (uint8_t)(1); /* 0x39004897: mov byte ptr [ebp - 0xc], 1 */
  13082     ecx = eax; /* 0x3900489B: mov ecx, eax */
  13083     eax = MEM32(ebp + (-0xC)); /* 0x3900489D: mov eax, dword ptr [ebp - 0xc] */
  13084     goto L_39004916; /* 0x390048A0: jmp 0x39004916 */
  13085 L_390048A2:
  13086     /* test LO8(eax), LO8(eax) */ /* 0x390048A2: test al, al */
  13087     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  13088     _cf = 0;
  13089     _flag_k = FK_NARROW(FK_TEST, 24);
  13090     MEM32(ebp + (-0x4)) = ebx; /* 0x390048A4: mov dword ptr [ebp - 4], ebx */
  13091     if (TEST_Z(_flag_a, _flag_b)) goto L_390048D6; /* 0x390048A7: je 0x390048d6 */
  13092 L_390048A9:
  13093     ecx = MEM32(edi + 0x4); /* 0x390048A9: mov ecx, dword ptr [edi + 4] */
  13094     /* cmp ebx, MEM32(ecx) */ /* 0x390048AC: cmp ebx, dword ptr [ecx] */
  13095     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(ecx));
  13096     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13097     _flag_k = FK_CMP;
  13098     if (CMP_NE(_flag_a, _flag_b)) goto L_390048CE; /* 0x390048AE: jne 0x390048ce */
  13099 L_390048B0:
  13100     edx = MEM32(ebp + 0xC); /* 0x390048B0: mov edx, dword ptr [ebp + 0xc] */
  13101     eax = ebp + (-0xC); /* 0x390048B3: lea eax, [ebp - 0xc] */
  13102     PUSH32(esp, edx); /* 0x390048B6: push edx */
  13103     PUSH32(esp, ebx); /* 0x390048B7: push ebx */
  13104     PUSH32(esp, esi); /* 0x390048B8: push esi */
  13105     PUSH32(esp, eax); /* 0x390048B9: push eax */
  13106     ecx = edi; /* 0x390048BA: mov ecx, edi */
  13107     RECOMP_ICALL(0x39006990u); /* 0x390048BC: call 0x39006990 */ /* not lifted */
  13108     RECOMP_FLAGS_IN();
  13109     eax = MEM32(eax); /* 0x390048C1: mov eax, dword ptr [eax] */
  13110     MEM8(ebp + (-0xC)) = (uint8_t)(1); /* 0x390048C3: mov byte ptr [ebp - 0xc], 1 */
  13111     ecx = eax; /* 0x390048C7: mov ecx, eax */
  13112     eax = MEM32(ebp + (-0xC)); /* 0x390048C9: mov eax, dword ptr [ebp - 0xc] */
  13113     goto L_39004916; /* 0x390048CC: jmp 0x39004916 */
  13114 L_390048CE:
  13115     ecx = ebp + (-0x4); /* 0x390048CE: lea ecx, [ebp - 4] */
  13116     RECOMP_ICALL(0x39007160u); /* 0x390048D1: call 0x39007160 */ /* not lifted */
  13117     RECOMP_FLAGS_IN();
  13118 L_390048D6:
  13119     ecx = MEM32(ebp + (-0x4)); /* 0x390048D6: mov ecx, dword ptr [ebp - 4] */
  13120     edx = MEM32(ebp + 0xC); /* 0x390048D9: mov edx, dword ptr [ebp + 0xc] */
  13121     PUSH32(esp, edx); /* 0x390048DC: push edx */
  13122     eax = ecx + 0xC; /* 0x390048DD: lea eax, [ecx + 0xc] */
  13123     PUSH32(esp, eax); /* 0x390048E0: push eax */
  13124     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x390048E1: call dword ptr [0x3900b030] */
  13125     RECOMP_FLAGS_IN();
  13126     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  13127     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13128     esp = esp + 8; /* 0x390048E7: add esp, 8 */
  13129     _flag_k = FK_ADD;
  13130     /* test LO8(eax), LO8(eax) */ /* 0x390048EA: test al, al */
  13131     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  13132     _cf = 0;
  13133     _flag_k = FK_NARROW(FK_TEST, 24);
  13134     if (TEST_Z(_flag_a, _flag_b)) goto L_3900490C; /* 0x390048EC: je 0x3900490c */
  13135 L_390048EE:
  13136     eax = MEM32(ebp + 0xC); /* 0x390048EE: mov eax, dword ptr [ebp + 0xc] */
  13137     ecx = ebp + 0xC; /* 0x390048F1: lea ecx, [ebp + 0xc] */
  13138     PUSH32(esp, eax); /* 0x390048F4: push eax */
  13139     PUSH32(esp, ebx); /* 0x390048F5: push ebx */
  13140     PUSH32(esp, esi); /* 0x390048F6: push esi */
  13141     PUSH32(esp, ecx); /* 0x390048F7: push ecx */
  13142     ecx = edi; /* 0x390048F8: mov ecx, edi */
  13143     RECOMP_ICALL(0x39006990u); /* 0x390048FA: call 0x39006990 */ /* not lifted */
  13144     RECOMP_FLAGS_IN();
  13145     eax = MEM32(eax); /* 0x390048FF: mov eax, dword ptr [eax] */
  13146     MEM8(ebp + (-0xC)) = (uint8_t)(1); /* 0x39004901: mov byte ptr [ebp - 0xc], 1 */
  13147     ecx = eax; /* 0x39004905: mov ecx, eax */
  13148     eax = MEM32(ebp + (-0xC)); /* 0x39004907: mov eax, dword ptr [ebp - 0xc] */
  13149     goto L_39004916; /* 0x3900490A: jmp 0x39004916 */
  13150 L_3900490C:
  13151     ecx = MEM32(ebp + (-0x4)); /* 0x3900490C: mov ecx, dword ptr [ebp - 4] */
  13152     MEM8(ebp + (-0xC)) = (uint8_t)(0); /* 0x3900490F: mov byte ptr [ebp - 0xc], 0 */
  13153     eax = MEM32(ebp + (-0xC)); /* 0x39004913: mov eax, dword ptr [ebp - 0xc] */
  13154 L_39004916:
  13155     MEM8(ebp + (-0xC)) = (uint8_t)(LO8(eax)); /* 0x39004916: mov byte ptr [ebp - 0xc], al */
  13156     eax = MEM32(ebp + 0x8); /* 0x39004919: mov eax, dword ptr [ebp + 8] */
  13157     edx = MEM32(ebp + (-0xC)); /* 0x3900491C: mov edx, dword ptr [ebp - 0xc] */
  13158     edi = POP32_VAL(esp); /* 0x3900491F: pop edi */
  13159     MEM32(eax) = ecx; /* 0x39004920: mov dword ptr [eax], ecx */
  13160     esi = POP32_VAL(esp); /* 0x39004922: pop esi */
  13161     MEM32(eax + 0x4) = edx; /* 0x39004923: mov dword ptr [eax + 4], edx */
  13162     ebx = POP32_VAL(esp); /* 0x39004926: pop ebx */
  13163     esp = ebp; /* 0x39004927: mov esp, ebp */
  13164     ebp = POP32_VAL(esp); /* 0x39004929: pop ebp */
  13165     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900492A: ret 8 */
  13166     RECOMP_REGS_OUT();
  13167 }
  13168 
  13169 void sub_39004930(void) {
  13170     int _fpu_cmp = 0;
  13171     uint32_t _cf = 0;
  13172     int _df = 1;
  13173     uint32_t _flag_k = FK_NONE;
  13174     uint32_t _flag_a = 0, _flag_b = 0;
  13175     uint32_t _itail_tgt = 0;
  13176     RECOMP_REGS_LOCALS
  13177     RECOMP_ENTER(0x39004930u);
  13178 
  13179 L_39004930:
  13180     PUSH32(esp, ebp); /* 0x39004930: push ebp */
  13181     ebp = esp; /* 0x39004931: mov ebp, esp */
  13182     PUSH32(esp, ebx); /* 0x39004933: push ebx */
  13183     ebx = MEM32(ebp + 0x10); /* 0x39004934: mov ebx, dword ptr [ebp + 0x10] */
  13184     PUSH32(esp, esi); /* 0x39004937: push esi */
  13185     esi = ecx; /* 0x39004938: mov esi, ecx */
  13186     ecx = MEM32(ebp + 0xC); /* 0x3900493A: mov ecx, dword ptr [ebp + 0xc] */
  13187     PUSH32(esp, edi); /* 0x3900493D: push edi */
  13188     eax = MEM32(esi + 0x10); /* 0x3900493E: mov eax, dword ptr [esi + 0x10] */
  13189     /* test eax, eax */ /* 0x39004941: test eax, eax */
  13190     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  13191     _cf = 0;
  13192     _flag_k = FK_TEST;
  13193     if (TEST_Z(_flag_a, _flag_b)) goto L_390049AF; /* 0x39004943: je 0x390049af */
  13194 L_39004945:
  13195     eax = MEM32(esi + 0x4); /* 0x39004945: mov eax, dword ptr [esi + 4] */
  13196     /* cmp ecx, MEM32(eax) */ /* 0x39004948: cmp ecx, dword ptr [eax] */
  13197     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(eax));
  13198     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13199     _flag_k = FK_CMP;
  13200     if (CMP_NE(_flag_a, _flag_b)) goto L_390049AF; /* 0x3900494A: jne 0x390049af */
  13201 L_3900494C:
  13202     /* cmp ebx, eax */ /* 0x3900494C: cmp ebx, eax */
  13203     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  13204     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13205     _flag_k = FK_CMP;
  13206     if (CMP_NE(_flag_a, _flag_b)) goto L_390049AF; /* 0x3900494E: jne 0x390049af */
  13207 L_39004950:
  13208     ebx = MEM32(eax + 0x4); /* 0x39004950: mov ebx, dword ptr [eax + 4] */
  13209     eax = MEM32(esi + 0x8); /* 0x39004953: mov eax, dword ptr [esi + 8] */
  13210     /* cmp ebx, eax */ /* 0x39004956: cmp ebx, eax */
  13211     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  13212     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13213     _flag_k = FK_CMP;
  13214     edi = ebx; /* 0x39004958: mov edi, ebx */
  13215     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004983; /* 0x3900495A: je 0x39004983 */
  13216 L_3900495C:
  13217     eax = MEM32(edi + 0x8); /* 0x3900495C: mov eax, dword ptr [edi + 8] */
  13218     ecx = esi; /* 0x3900495F: mov ecx, esi */
  13219     PUSH32(esp, eax); /* 0x39004961: push eax */
  13220     RECOMP_ICALL(0x39005AC0u); /* 0x39004962: call 0x39005ac0 */ /* not lifted */
  13221     RECOMP_FLAGS_IN();
  13222     edi = MEM32(edi); /* 0x39004967: mov edi, dword ptr [edi] */
  13223     ecx = ebx + 0xC; /* 0x39004969: lea ecx, [ebx + 0xc] */
  13224     RECOMP_ICALL(0x39004670u); /* 0x3900496C: call 0x39004670 */ /* not lifted */
  13225     RECOMP_FLAGS_IN();
  13226     PUSH32(esp, ebx); /* 0x39004971: push ebx */
  13227     RECOMP_ICALL(0x3900A0A0u); /* 0x39004972: call 0x3900a0a0 */ /* not lifted */
  13228     RECOMP_FLAGS_IN();
  13229     eax = MEM32(esi + 0x8); /* 0x39004977: mov eax, dword ptr [esi + 8] */
  13230     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  13231     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13232     esp = esp + 4; /* 0x3900497A: add esp, 4 */
  13233     _flag_k = FK_ADD;
  13234     /* cmp edi, eax */ /* 0x3900497D: cmp edi, eax */
  13235     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  13236     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13237     _flag_k = FK_CMP;
  13238     ebx = edi; /* 0x3900497F: mov ebx, edi */
  13239     RECOMP_BACKEDGE();
  13240     if (CMP_NE(_flag_a, _flag_b)) goto L_3900495C; /* 0x39004981: jne 0x3900495c */
  13241 L_39004983:
  13242     ecx = MEM32(esi + 0x4); /* 0x39004983: mov ecx, dword ptr [esi + 4] */
  13243     edx = MEM32(esi + 0x8); /* 0x39004986: mov edx, dword ptr [esi + 8] */
  13244     edi = POP32_VAL(esp); /* 0x39004989: pop edi */
  13245     MEM32(ecx + 0x4) = edx; /* 0x3900498A: mov dword ptr [ecx + 4], edx */
  13246     eax = MEM32(esi + 0x4); /* 0x3900498D: mov eax, dword ptr [esi + 4] */
  13247     MEM32(esi + 0x10) = 0; /* 0x39004990: mov dword ptr [esi + 0x10], 0 */
  13248     MEM32(eax) = eax; /* 0x39004997: mov dword ptr [eax], eax */
  13249     eax = MEM32(esi + 0x4); /* 0x39004999: mov eax, dword ptr [esi + 4] */
  13250     MEM32(eax + 0x8) = eax; /* 0x3900499C: mov dword ptr [eax + 8], eax */
  13251     eax = MEM32(esi + 0x4); /* 0x3900499F: mov eax, dword ptr [esi + 4] */
  13252     esi = POP32_VAL(esp); /* 0x390049A2: pop esi */
  13253     ebx = POP32_VAL(esp); /* 0x390049A3: pop ebx */
  13254     ecx = MEM32(eax); /* 0x390049A4: mov ecx, dword ptr [eax] */
  13255     eax = MEM32(ebp + 0x8); /* 0x390049A6: mov eax, dword ptr [ebp + 8] */
  13256     MEM32(eax) = ecx; /* 0x390049A9: mov dword ptr [eax], ecx */
  13257     ebp = POP32_VAL(esp); /* 0x390049AB: pop ebp */
  13258     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x390049AC: ret 0xc */
  13259 L_390049AF:
  13260     /* cmp ecx, ebx */ /* 0x390049AF: cmp ecx, ebx */
  13261     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
  13262     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13263     _flag_k = FK_CMP;
  13264     if (CMP_EQ(_flag_a, _flag_b)) goto L_390049D0; /* 0x390049B1: je 0x390049d0 */
  13265 L_390049B3:
  13266     edi = ecx; /* 0x390049B3: mov edi, ecx */
  13267     ecx = ebp + 0xC; /* 0x390049B5: lea ecx, [ebp + 0xc] */
  13268     RECOMP_ICALL(0x39004BA0u); /* 0x390049B8: call 0x39004ba0 */ /* not lifted */
  13269     RECOMP_FLAGS_IN();
  13270     ecx = ebp + 0x10; /* 0x390049BD: lea ecx, [ebp + 0x10] */
  13271     PUSH32(esp, edi); /* 0x390049C0: push edi */
  13272     PUSH32(esp, ecx); /* 0x390049C1: push ecx */
  13273     ecx = esi; /* 0x390049C2: mov ecx, esi */
  13274     RECOMP_ICALL(0x390056F0u); /* 0x390049C4: call 0x390056f0 */ /* not lifted */
  13275     RECOMP_FLAGS_IN();
  13276     ecx = MEM32(ebp + 0xC); /* 0x390049C9: mov ecx, dword ptr [ebp + 0xc] */
  13277     /* cmp ecx, ebx */ /* 0x390049CC: cmp ecx, ebx */
  13278     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
  13279     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13280     _flag_k = FK_CMP;
  13281     RECOMP_BACKEDGE();
  13282     if (CMP_NE(_flag_a, _flag_b)) goto L_390049B3; /* 0x390049CE: jne 0x390049b3 */
  13283 L_390049D0:
  13284     eax = MEM32(ebp + 0x8); /* 0x390049D0: mov eax, dword ptr [ebp + 8] */
  13285     edi = POP32_VAL(esp); /* 0x390049D3: pop edi */
  13286     esi = POP32_VAL(esp); /* 0x390049D4: pop esi */
  13287     ebx = POP32_VAL(esp); /* 0x390049D5: pop ebx */
  13288     MEM32(eax) = ecx; /* 0x390049D6: mov dword ptr [eax], ecx */
  13289     ebp = POP32_VAL(esp); /* 0x390049D8: pop ebp */
  13290     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x390049D9: ret 0xc */
  13291     RECOMP_REGS_OUT();
  13292 }
  13293 
  13294 void sub_390049E0(void) {
  13295     int _fpu_cmp = 0;
  13296     uint32_t _cf = 0;
  13297     int _df = 1;
  13298     uint32_t _flag_k = FK_NONE;
  13299     uint32_t _flag_a = 0, _flag_b = 0;
  13300     uint32_t _itail_tgt = 0;
  13301     RECOMP_REGS_LOCALS
  13302     RECOMP_ENTER(0x390049E0u);
  13303 
  13304 L_390049E0:
  13305     PUSH32(esp, ebp); /* 0x390049E0: push ebp */
  13306     ebp = esp; /* 0x390049E1: mov ebp, esp */
  13307     PUSH32(esp, ecx); /* 0x390049E3: push ecx */
  13308     PUSH32(esp, ebx); /* 0x390049E4: push ebx */
  13309     PUSH32(esp, esi); /* 0x390049E5: push esi */
  13310     PUSH32(esp, edi); /* 0x390049E6: push edi */
  13311     edi = ecx; /* 0x390049E7: mov edi, ecx */
  13312     eax = MEM32(edi + 0x4); /* 0x390049E9: mov eax, dword ptr [edi + 4] */
  13313     ebx = eax; /* 0x390049EC: mov ebx, eax */
  13314     esi = MEM32(eax + 0x4); /* 0x390049EE: mov esi, dword ptr [eax + 4] */
  13315     eax = MEM32(edi + 0x8); /* 0x390049F1: mov eax, dword ptr [edi + 8] */
  13316     /* cmp esi, eax */ /* 0x390049F4: cmp esi, eax */
  13317     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
  13318     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13319     _flag_k = FK_CMP;
  13320     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004A1B; /* 0x390049F6: je 0x39004a1b */
  13321 L_390049F8:
  13322     eax = MEM32(ebp + 0xC); /* 0x390049F8: mov eax, dword ptr [ebp + 0xc] */
  13323     ecx = esi + 0xC; /* 0x390049FB: lea ecx, [esi + 0xc] */
  13324     PUSH32(esp, eax); /* 0x390049FE: push eax */
  13325     PUSH32(esp, ecx); /* 0x390049FF: push ecx */
  13326     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x39004A00: call dword ptr [0x3900b030] */
  13327     RECOMP_FLAGS_IN();
  13328     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  13329     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13330     esp = esp + 8; /* 0x39004A06: add esp, 8 */
  13331     _flag_k = FK_ADD;
  13332     /* test LO8(eax), LO8(eax) */ /* 0x39004A09: test al, al */
  13333     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  13334     _cf = 0;
  13335     _flag_k = FK_NARROW(FK_TEST, 24);
  13336     if (TEST_Z(_flag_a, _flag_b)) goto L_39004A12; /* 0x39004A0B: je 0x39004a12 */
  13337 L_39004A0D:
  13338     esi = MEM32(esi + 0x8); /* 0x39004A0D: mov esi, dword ptr [esi + 8] */
  13339     goto L_39004A16; /* 0x39004A10: jmp 0x39004a16 */
  13340 L_39004A12:
  13341     ebx = esi; /* 0x39004A12: mov ebx, esi */
  13342     esi = MEM32(esi); /* 0x39004A14: mov esi, dword ptr [esi] */
  13343 L_39004A16:
  13344     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39004A16: cmp esi, dword ptr [edi + 8] */
  13345     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  13346     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13347     _flag_k = FK_CMP;
  13348     RECOMP_BACKEDGE();
  13349     if (CMP_NE(_flag_a, _flag_b)) goto L_390049F8; /* 0x39004A19: jne 0x390049f8 */
  13350 L_39004A1B:
  13351     eax = MEM32(edi + 0x4); /* 0x39004A1B: mov eax, dword ptr [edi + 4] */
  13352     MEM32(ebp + (-0x4)) = ebx; /* 0x39004A1E: mov dword ptr [ebp - 4], ebx */
  13353     /* cmp ebx, eax */ /* 0x39004A21: cmp ebx, eax */
  13354     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  13355     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13356     _flag_k = FK_CMP;
  13357     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004A4D; /* 0x39004A23: je 0x39004a4d */
  13358 L_39004A25:
  13359     edx = MEM32(ebp + 0xC); /* 0x39004A25: mov edx, dword ptr [ebp + 0xc] */
  13360     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0xCu);
  13361     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13362     ebx = ebx + 0xCu; /* 0x39004A28: add ebx, 0xc */
  13363     _flag_k = FK_ADD;
  13364     PUSH32(esp, ebx); /* 0x39004A2B: push ebx */
  13365     PUSH32(esp, edx); /* 0x39004A2C: push edx */
  13366     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x39004A2D: call dword ptr [0x3900b030] */
  13367     RECOMP_FLAGS_IN();
  13368     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  13369     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13370     esp = esp + 8; /* 0x39004A33: add esp, 8 */
  13371     _flag_k = FK_ADD;
  13372     /* test LO8(eax), LO8(eax) */ /* 0x39004A36: test al, al */
  13373     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  13374     _cf = 0;
  13375     _flag_k = FK_NARROW(FK_TEST, 24);
  13376     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004A4D; /* 0x39004A38: jne 0x39004a4d */
  13377 L_39004A3A:
  13378     eax = ebp + (-0x4); /* 0x39004A3A: lea eax, [ebp - 4] */
  13379     edi = POP32_VAL(esp); /* 0x39004A3D: pop edi */
  13380     esi = POP32_VAL(esp); /* 0x39004A3E: pop esi */
  13381     ebx = POP32_VAL(esp); /* 0x39004A3F: pop ebx */
  13382     ecx = MEM32(eax); /* 0x39004A40: mov ecx, dword ptr [eax] */
  13383     eax = MEM32(ebp + 0x8); /* 0x39004A42: mov eax, dword ptr [ebp + 8] */
  13384     MEM32(eax) = ecx; /* 0x39004A45: mov dword ptr [eax], ecx */
  13385     esp = ebp; /* 0x39004A47: mov esp, ebp */
  13386     ebp = POP32_VAL(esp); /* 0x39004A49: pop ebp */
  13387     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39004A4A: ret 8 */
  13388 L_39004A4D:
  13389     eax = MEM32(edi + 0x4); /* 0x39004A4D: mov eax, dword ptr [edi + 4] */
  13390     edi = POP32_VAL(esp); /* 0x39004A50: pop edi */
  13391     MEM32(ebp + 0xC) = eax; /* 0x39004A51: mov dword ptr [ebp + 0xc], eax */
  13392     eax = ebp + 0xC; /* 0x39004A54: lea eax, [ebp + 0xc] */
  13393     esi = POP32_VAL(esp); /* 0x39004A57: pop esi */
  13394     ebx = POP32_VAL(esp); /* 0x39004A58: pop ebx */
  13395     ecx = MEM32(eax); /* 0x39004A59: mov ecx, dword ptr [eax] */
  13396     eax = MEM32(ebp + 0x8); /* 0x39004A5B: mov eax, dword ptr [ebp + 8] */
  13397     MEM32(eax) = ecx; /* 0x39004A5E: mov dword ptr [eax], ecx */
  13398     esp = ebp; /* 0x39004A60: mov esp, ebp */
  13399     ebp = POP32_VAL(esp); /* 0x39004A62: pop ebp */
  13400     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39004A63: ret 8 */
  13401     RECOMP_REGS_OUT();
  13402 }
  13403 
  13404 void sub_39004A70(void) {
  13405     int _fpu_cmp = 0;
  13406     uint32_t _cf = 0;
  13407     int _df = 1;
  13408     uint32_t _flag_k = FK_NONE;
  13409     uint32_t _flag_a = 0, _flag_b = 0;
  13410     uint32_t _itail_tgt = 0;
  13411     RECOMP_REGS_LOCALS
  13412     RECOMP_ENTER(0x39004A70u);
  13413 
  13414 L_39004A70:
  13415     PUSH32(esp, ebp); /* 0x39004A70: push ebp */
  13416     ebp = esp; /* 0x39004A71: mov ebp, esp */
  13417     eax = MEM32(ebp + 0x10); /* 0x39004A73: mov eax, dword ptr [ebp + 0x10] */
  13418     edx = MEM32(ebp + 0x8); /* 0x39004A76: mov edx, dword ptr [ebp + 8] */
  13419     PUSH32(esp, ebx); /* 0x39004A79: push ebx */
  13420     PUSH32(esp, esi); /* 0x39004A7A: push esi */
  13421     esi = ecx; /* 0x39004A7B: mov esi, ecx */
  13422     PUSH32(esp, edi); /* 0x39004A7D: push edi */
  13423     SET_LO8(ecx, MEM8(eax)); /* 0x39004A7E: mov cl, byte ptr [eax] */
  13424     PUSH32(esp, 0x30u); /* 0x39004A80: push 0x30 */
  13425     MEM8(esi) = (uint8_t)(LO8(ecx)); /* 0x39004A82: mov byte ptr [esi], cl */
  13426     SET_LO8(eax, MEM8(edx)); /* 0x39004A84: mov al, byte ptr [edx] */
  13427     SET_LO8(ecx, MEM8(ebp + 0xC)); /* 0x39004A86: mov cl, byte ptr [ebp + 0xc] */
  13428     MEM8(esi + 0x1) = (uint8_t)(LO8(eax)); /* 0x39004A89: mov byte ptr [esi + 1], al */
  13429     MEM8(esi + 0xC) = (uint8_t)(LO8(ecx)); /* 0x39004A8C: mov byte ptr [esi + 0xc], cl */
  13430     RECOMP_ICALL(0x3900A0ACu); /* 0x39004A8F: call 0x3900a0ac */ /* not lifted */
  13431     RECOMP_FLAGS_IN();
  13432     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  13433     ebx = 0; /* 0x39004A94: xor ebx, ebx */
  13434     _cf = 0;
  13435     _flag_k = FK_TEST;
  13436     SET_LO8(ecx, 1); /* 0x39004A96: mov cl, 1 */
  13437     MEM32(eax + 0x4) = ebx; /* 0x39004A98: mov dword ptr [eax + 4], ebx */
  13438     MEM8(eax + 0x2C) = (uint8_t)(LO8(ecx)); /* 0x39004A9B: mov byte ptr [eax + 0x2c], cl */
  13439     MEM8(eax + 0x2D) = (uint8_t)(LO8(ebx)); /* 0x39004A9E: mov byte ptr [eax + 0x2d], bl */
  13440     MEM32(esi + 0x8) = eax; /* 0x39004AA1: mov dword ptr [esi + 8], eax */
  13441     MEM8(eax + 0x2D) = (uint8_t)(LO8(ecx)); /* 0x39004AA4: mov byte ptr [eax + 0x2d], cl */
  13442     edx = MEM32(esi + 0x8); /* 0x39004AA7: mov edx, dword ptr [esi + 8] */
  13443     PUSH32(esp, 0x30u); /* 0x39004AAA: push 0x30 */
  13444     MEM32(edx) = ebx; /* 0x39004AAC: mov dword ptr [edx], ebx */
  13445     eax = MEM32(esi + 0x8); /* 0x39004AAE: mov eax, dword ptr [esi + 8] */
  13446     MEM32(eax + 0x8) = ebx; /* 0x39004AB1: mov dword ptr [eax + 8], ebx */
  13447     edi = MEM32(esi + 0x8); /* 0x39004AB4: mov edi, dword ptr [esi + 8] */
  13448     RECOMP_ICALL(0x3900A0ACu); /* 0x39004AB7: call 0x3900a0ac */ /* not lifted */
  13449     RECOMP_FLAGS_IN();
  13450     MEM32(eax + 0x4) = edi; /* 0x39004ABC: mov dword ptr [eax + 4], edi */
  13451     MEM8(eax + 0x2C) = (uint8_t)(LO8(ebx)); /* 0x39004ABF: mov byte ptr [eax + 0x2c], bl */
  13452     MEM8(eax + 0x2D) = (uint8_t)(LO8(ebx)); /* 0x39004AC2: mov byte ptr [eax + 0x2d], bl */
  13453     MEM32(esi + 0x4) = eax; /* 0x39004AC5: mov dword ptr [esi + 4], eax */
  13454     MEM32(eax) = eax; /* 0x39004AC8: mov dword ptr [eax], eax */
  13455     eax = MEM32(esi + 0x4); /* 0x39004ACA: mov eax, dword ptr [esi + 4] */
  13456     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  13457     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13458     esp = esp + 8; /* 0x39004ACD: add esp, 8 */
  13459     _flag_k = FK_ADD;
  13460     MEM32(eax + 0x8) = eax; /* 0x39004AD0: mov dword ptr [eax + 8], eax */
  13461     MEM32(esi + 0x10) = ebx; /* 0x39004AD3: mov dword ptr [esi + 0x10], ebx */
  13462     eax = esi; /* 0x39004AD6: mov eax, esi */
  13463     edi = POP32_VAL(esp); /* 0x39004AD8: pop edi */
  13464     esi = POP32_VAL(esp); /* 0x39004AD9: pop esi */
  13465     ebx = POP32_VAL(esp); /* 0x39004ADA: pop ebx */
  13466     ebp = POP32_VAL(esp); /* 0x39004ADB: pop ebp */
  13467     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x39004ADC: ret 0xc */
  13468     RECOMP_REGS_OUT();
  13469 }
  13470 
  13471 void sub_39004AE0(void) {
  13472     int _fpu_cmp = 0;
  13473     uint32_t _cf = 0;
  13474     int _df = 1;
  13475     uint32_t _flag_k = FK_NONE;
  13476     uint32_t _flag_a = 0, _flag_b = 0;
  13477     uint32_t _itail_tgt = 0;
  13478     RECOMP_REGS_LOCALS
  13479     RECOMP_ENTER(0x39004AE0u);
  13480 
  13481 L_39004AE0:
  13482     PUSH32(esp, ebp); /* 0x39004AE0: push ebp */
  13483     ebp = esp; /* 0x39004AE1: mov ebp, esp */
  13484     eax = MEM32(ebp + 0x8); /* 0x39004AE3: mov eax, dword ptr [ebp + 8] */
  13485     ecx = MEM32(ecx + 0x4); /* 0x39004AE6: mov ecx, dword ptr [ecx + 4] */
  13486     MEM32(eax) = ecx; /* 0x39004AE9: mov dword ptr [eax], ecx */
  13487     ebp = POP32_VAL(esp); /* 0x39004AEB: pop ebp */
  13488     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x39004AEC: ret 4 */
  13489     RECOMP_REGS_OUT();
  13490 }
  13491 
  13492 void sub_39004AF0(void) {
  13493     int _fpu_cmp = 0;
  13494     uint32_t _cf = 0;
  13495     int _df = 1;
  13496     uint32_t _flag_k = FK_NONE;
  13497     uint32_t _flag_a = 0, _flag_b = 0;
  13498     uint32_t _itail_tgt = 0;
  13499     RECOMP_REGS_LOCALS
  13500     RECOMP_ENTER(0x39004AF0u);
  13501 
  13502 L_39004AF0:
  13503     PUSH32(esp, ebp); /* 0x39004AF0: push ebp */
  13504     ebp = esp; /* 0x39004AF1: mov ebp, esp */
  13505     PUSH32(esp, ebx); /* 0x39004AF3: push ebx */
  13506     ebx = MEM32(ebp + 0x10); /* 0x39004AF4: mov ebx, dword ptr [ebp + 0x10] */
  13507     PUSH32(esp, esi); /* 0x39004AF7: push esi */
  13508     esi = ecx; /* 0x39004AF8: mov esi, ecx */
  13509     ecx = MEM32(ebp + 0xC); /* 0x39004AFA: mov ecx, dword ptr [ebp + 0xc] */
  13510     PUSH32(esp, edi); /* 0x39004AFD: push edi */
  13511     eax = MEM32(esi + 0x10); /* 0x39004AFE: mov eax, dword ptr [esi + 0x10] */
  13512     /* test eax, eax */ /* 0x39004B01: test eax, eax */
  13513     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  13514     _cf = 0;
  13515     _flag_k = FK_TEST;
  13516     if (TEST_Z(_flag_a, _flag_b)) goto L_39004B6F; /* 0x39004B03: je 0x39004b6f */
  13517 L_39004B05:
  13518     eax = MEM32(esi + 0x4); /* 0x39004B05: mov eax, dword ptr [esi + 4] */
  13519     /* cmp ecx, MEM32(eax) */ /* 0x39004B08: cmp ecx, dword ptr [eax] */
  13520     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(eax));
  13521     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13522     _flag_k = FK_CMP;
  13523     if (CMP_NE(_flag_a, _flag_b)) goto L_39004B6F; /* 0x39004B0A: jne 0x39004b6f */
  13524 L_39004B0C:
  13525     /* cmp ebx, eax */ /* 0x39004B0C: cmp ebx, eax */
  13526     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  13527     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13528     _flag_k = FK_CMP;
  13529     if (CMP_NE(_flag_a, _flag_b)) goto L_39004B6F; /* 0x39004B0E: jne 0x39004b6f */
  13530 L_39004B10:
  13531     ebx = MEM32(eax + 0x4); /* 0x39004B10: mov ebx, dword ptr [eax + 4] */
  13532     eax = MEM32(esi + 0x8); /* 0x39004B13: mov eax, dword ptr [esi + 8] */
  13533     /* cmp ebx, eax */ /* 0x39004B16: cmp ebx, eax */
  13534     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  13535     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13536     _flag_k = FK_CMP;
  13537     edi = ebx; /* 0x39004B18: mov edi, ebx */
  13538     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004B43; /* 0x39004B1A: je 0x39004b43 */
  13539 L_39004B1C:
  13540     eax = MEM32(edi + 0x8); /* 0x39004B1C: mov eax, dword ptr [edi + 8] */
  13541     ecx = esi; /* 0x39004B1F: mov ecx, esi */
  13542     PUSH32(esp, eax); /* 0x39004B21: push eax */
  13543     RECOMP_ICALL(0x39006200u); /* 0x39004B22: call 0x39006200 */ /* not lifted */
  13544     RECOMP_FLAGS_IN();
  13545     edi = MEM32(edi); /* 0x39004B27: mov edi, dword ptr [edi] */
  13546     ecx = ebx + 0xC; /* 0x39004B29: lea ecx, [ebx + 0xc] */
  13547     RECOMP_ICALL(0x39004790u); /* 0x39004B2C: call 0x39004790 */ /* not lifted */
  13548     RECOMP_FLAGS_IN();
  13549     PUSH32(esp, ebx); /* 0x39004B31: push ebx */
  13550     RECOMP_ICALL(0x3900A0A0u); /* 0x39004B32: call 0x3900a0a0 */ /* not lifted */
  13551     RECOMP_FLAGS_IN();
  13552     eax = MEM32(esi + 0x8); /* 0x39004B37: mov eax, dword ptr [esi + 8] */
  13553     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  13554     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13555     esp = esp + 4; /* 0x39004B3A: add esp, 4 */
  13556     _flag_k = FK_ADD;
  13557     /* cmp edi, eax */ /* 0x39004B3D: cmp edi, eax */
  13558     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  13559     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13560     _flag_k = FK_CMP;
  13561     ebx = edi; /* 0x39004B3F: mov ebx, edi */
  13562     RECOMP_BACKEDGE();
  13563     if (CMP_NE(_flag_a, _flag_b)) goto L_39004B1C; /* 0x39004B41: jne 0x39004b1c */
  13564 L_39004B43:
  13565     ecx = MEM32(esi + 0x4); /* 0x39004B43: mov ecx, dword ptr [esi + 4] */
  13566     edx = MEM32(esi + 0x8); /* 0x39004B46: mov edx, dword ptr [esi + 8] */
  13567     edi = POP32_VAL(esp); /* 0x39004B49: pop edi */
  13568     MEM32(ecx + 0x4) = edx; /* 0x39004B4A: mov dword ptr [ecx + 4], edx */
  13569     eax = MEM32(esi + 0x4); /* 0x39004B4D: mov eax, dword ptr [esi + 4] */
  13570     MEM32(esi + 0x10) = 0; /* 0x39004B50: mov dword ptr [esi + 0x10], 0 */
  13571     MEM32(eax) = eax; /* 0x39004B57: mov dword ptr [eax], eax */
  13572     eax = MEM32(esi + 0x4); /* 0x39004B59: mov eax, dword ptr [esi + 4] */
  13573     MEM32(eax + 0x8) = eax; /* 0x39004B5C: mov dword ptr [eax + 8], eax */
  13574     eax = MEM32(esi + 0x4); /* 0x39004B5F: mov eax, dword ptr [esi + 4] */
  13575     esi = POP32_VAL(esp); /* 0x39004B62: pop esi */
  13576     ebx = POP32_VAL(esp); /* 0x39004B63: pop ebx */
  13577     ecx = MEM32(eax); /* 0x39004B64: mov ecx, dword ptr [eax] */
  13578     eax = MEM32(ebp + 0x8); /* 0x39004B66: mov eax, dword ptr [ebp + 8] */
  13579     MEM32(eax) = ecx; /* 0x39004B69: mov dword ptr [eax], ecx */
  13580     ebp = POP32_VAL(esp); /* 0x39004B6B: pop ebp */
  13581     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x39004B6C: ret 0xc */
  13582 L_39004B6F:
  13583     /* cmp ecx, ebx */ /* 0x39004B6F: cmp ecx, ebx */
  13584     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
  13585     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13586     _flag_k = FK_CMP;
  13587     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004B90; /* 0x39004B71: je 0x39004b90 */
  13588 L_39004B73:
  13589     edi = ecx; /* 0x39004B73: mov edi, ecx */
  13590     ecx = ebp + 0xC; /* 0x39004B75: lea ecx, [ebp + 0xc] */
  13591     RECOMP_ICALL(0x39004BA0u); /* 0x39004B78: call 0x39004ba0 */ /* not lifted */
  13592     RECOMP_FLAGS_IN();
  13593     ecx = ebp + 0x10; /* 0x39004B7D: lea ecx, [ebp + 0x10] */
  13594     PUSH32(esp, edi); /* 0x39004B80: push edi */
  13595     PUSH32(esp, ecx); /* 0x39004B81: push ecx */
  13596     ecx = esi; /* 0x39004B82: mov ecx, esi */
  13597     RECOMP_ICALL(0x39005DE0u); /* 0x39004B84: call 0x39005de0 */ /* not lifted */
  13598     RECOMP_FLAGS_IN();
  13599     ecx = MEM32(ebp + 0xC); /* 0x39004B89: mov ecx, dword ptr [ebp + 0xc] */
  13600     /* cmp ecx, ebx */ /* 0x39004B8C: cmp ecx, ebx */
  13601     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
  13602     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13603     _flag_k = FK_CMP;
  13604     RECOMP_BACKEDGE();
  13605     if (CMP_NE(_flag_a, _flag_b)) goto L_39004B73; /* 0x39004B8E: jne 0x39004b73 */
  13606 L_39004B90:
  13607     eax = MEM32(ebp + 0x8); /* 0x39004B90: mov eax, dword ptr [ebp + 8] */
  13608     edi = POP32_VAL(esp); /* 0x39004B93: pop edi */
  13609     esi = POP32_VAL(esp); /* 0x39004B94: pop esi */
  13610     ebx = POP32_VAL(esp); /* 0x39004B95: pop ebx */
  13611     MEM32(eax) = ecx; /* 0x39004B96: mov dword ptr [eax], ecx */
  13612     ebp = POP32_VAL(esp); /* 0x39004B98: pop ebp */
  13613     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x39004B99: ret 0xc */
  13614     RECOMP_REGS_OUT();
  13615 }
  13616 
  13617 void sub_39004BA0(void) {
  13618     int _fpu_cmp = 0;
  13619     uint32_t _cf = 0;
  13620     int _df = 1;
  13621     uint32_t _flag_k = FK_NONE;
  13622     uint32_t _flag_a = 0, _flag_b = 0;
  13623     uint32_t _itail_tgt = 0;
  13624     RECOMP_REGS_LOCALS
  13625     RECOMP_ENTER(0x39004BA0u);
  13626 
  13627 L_39004BA0:
  13628     eax = MEM32(ecx); /* 0x39004BA0: mov eax, dword ptr [ecx] */
  13629     PUSH32(esp, ebx); /* 0x39004BA2: push ebx */
  13630     edx = MEM32(eax + 0x8); /* 0x39004BA3: mov edx, dword ptr [eax + 8] */
  13631     SET_LO8(ebx, MEM8(edx + 0x2D)); /* 0x39004BA6: mov bl, byte ptr [edx + 0x2d] */
  13632     /* test LO8(ebx), LO8(ebx) */ /* 0x39004BA9: test bl, bl */
  13633     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  13634     _cf = 0;
  13635     _flag_k = FK_NARROW(FK_TEST, 24);
  13636     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004BC5; /* 0x39004BAB: jne 0x39004bc5 */
  13637 L_39004BAD:
  13638     eax = MEM32(edx); /* 0x39004BAD: mov eax, dword ptr [edx] */
  13639     SET_LO8(ebx, MEM8(eax + 0x2D)); /* 0x39004BAF: mov bl, byte ptr [eax + 0x2d] */
  13640     /* test LO8(ebx), LO8(ebx) */ /* 0x39004BB2: test bl, bl */
  13641     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  13642     _cf = 0;
  13643     _flag_k = FK_NARROW(FK_TEST, 24);
  13644     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004BC1; /* 0x39004BB4: jne 0x39004bc1 */
  13645 L_39004BB6:
  13646     edx = eax; /* 0x39004BB6: mov edx, eax */
  13647     eax = MEM32(edx); /* 0x39004BB8: mov eax, dword ptr [edx] */
  13648     SET_LO8(ebx, MEM8(eax + 0x2D)); /* 0x39004BBA: mov bl, byte ptr [eax + 0x2d] */
  13649     /* test LO8(ebx), LO8(ebx) */ /* 0x39004BBD: test bl, bl */
  13650     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  13651     _cf = 0;
  13652     _flag_k = FK_NARROW(FK_TEST, 24);
  13653     RECOMP_BACKEDGE();
  13654     if (TEST_Z(_flag_a, _flag_b)) goto L_39004BB6; /* 0x39004BBF: je 0x39004bb6 */
  13655 L_39004BC1:
  13656     MEM32(ecx) = edx; /* 0x39004BC1: mov dword ptr [ecx], edx */
  13657     ebx = POP32_VAL(esp); /* 0x39004BC3: pop ebx */
  13658     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39004BC4: ret  */
  13659 L_39004BC5:
  13660     eax = MEM32(eax + 0x4); /* 0x39004BC5: mov eax, dword ptr [eax + 4] */
  13661     edx = MEM32(ecx); /* 0x39004BC8: mov edx, dword ptr [ecx] */
  13662     /* cmp edx, MEM32(eax + 0x8) */ /* 0x39004BCA: cmp edx, dword ptr [eax + 8] */
  13663     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(eax + 0x8));
  13664     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13665     _flag_k = FK_CMP;
  13666     if (CMP_NE(_flag_a, _flag_b)) goto L_39004BDB; /* 0x39004BCD: jne 0x39004bdb */
  13667 L_39004BCF:
  13668     MEM32(ecx) = eax; /* 0x39004BCF: mov dword ptr [ecx], eax */
  13669     eax = MEM32(eax + 0x4); /* 0x39004BD1: mov eax, dword ptr [eax + 4] */
  13670     edx = MEM32(ecx); /* 0x39004BD4: mov edx, dword ptr [ecx] */
  13671     /* cmp edx, MEM32(eax + 0x8) */ /* 0x39004BD6: cmp edx, dword ptr [eax + 8] */
  13672     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(eax + 0x8));
  13673     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13674     _flag_k = FK_CMP;
  13675     RECOMP_BACKEDGE();
  13676     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004BCF; /* 0x39004BD9: je 0x39004bcf */
  13677 L_39004BDB:
  13678     edx = MEM32(ecx); /* 0x39004BDB: mov edx, dword ptr [ecx] */
  13679     /* cmp MEM32(edx + 0x8), eax */ /* 0x39004BDD: cmp dword ptr [edx + 8], eax */
  13680     _flag_a = (uint32_t)(MEM32(edx + 0x8)); _flag_b = (uint32_t)(eax);
  13681     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13682     _flag_k = FK_CMP;
  13683     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004BE4; /* 0x39004BE0: je 0x39004be4 */
  13684 L_39004BE2:
  13685     MEM32(ecx) = eax; /* 0x39004BE2: mov dword ptr [ecx], eax */
  13686 L_39004BE4:
  13687     ebx = POP32_VAL(esp); /* 0x39004BE4: pop ebx */
  13688     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39004BE5: ret  */
  13689     RECOMP_REGS_OUT();
  13690 }
  13691 
  13692 void sub_39004BF0(void) {
  13693     int _fpu_cmp = 0;
  13694     uint32_t _cf = 0;
  13695     int _df = 1;
  13696     uint32_t _flag_k = FK_NONE;
  13697     uint32_t _flag_a = 0, _flag_b = 0;
  13698     uint32_t _itail_tgt = 0;
  13699     RECOMP_REGS_LOCALS
  13700     RECOMP_ENTER(0x39004BF0u);
  13701 
  13702 L_39004BF0:
  13703     PUSH32(esp, ebp); /* 0x39004BF0: push ebp */
  13704     ebp = esp; /* 0x39004BF1: mov ebp, esp */
  13705     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
  13706     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13707     esp = esp - 0x10u; /* 0x39004BF3: sub esp, 0x10 */
  13708     _flag_k = FK_CMP;
  13709     PUSH32(esp, ebx); /* 0x39004BF6: push ebx */
  13710     PUSH32(esp, esi); /* 0x39004BF7: push esi */
  13711     PUSH32(esp, edi); /* 0x39004BF8: push edi */
  13712     edi = ecx; /* 0x39004BF9: mov edi, ecx */
  13713     SET_LO8(eax, 1); /* 0x39004BFB: mov al, 1 */
  13714     ebx = MEM32(edi + 0x4); /* 0x39004BFD: mov ebx, dword ptr [edi + 4] */
  13715     ecx = MEM32(edi + 0x8); /* 0x39004C00: mov ecx, dword ptr [edi + 8] */
  13716     esi = MEM32(ebx + 0x4); /* 0x39004C03: mov esi, dword ptr [ebx + 4] */
  13717     /* cmp esi, ecx */ /* 0x39004C06: cmp esi, ecx */
  13718     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx);
  13719     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13720     _flag_k = FK_CMP;
  13721     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004C2D; /* 0x39004C08: je 0x39004c2d */
  13722 L_39004C0A:
  13723     ecx = MEM32(ebp + 0xC); /* 0x39004C0A: mov ecx, dword ptr [ebp + 0xc] */
  13724     eax = esi + 0xC; /* 0x39004C0D: lea eax, [esi + 0xc] */
  13725     PUSH32(esp, eax); /* 0x39004C10: push eax */
  13726     PUSH32(esp, ecx); /* 0x39004C11: push ecx */
  13727     ebx = esi; /* 0x39004C12: mov ebx, esi */
  13728     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x39004C14: call dword ptr [0x3900b030] */
  13729     RECOMP_FLAGS_IN();
  13730     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  13731     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13732     esp = esp + 8; /* 0x39004C1A: add esp, 8 */
  13733     _flag_k = FK_ADD;
  13734     /* test LO8(eax), LO8(eax) */ /* 0x39004C1D: test al, al */
  13735     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  13736     _cf = 0;
  13737     _flag_k = FK_NARROW(FK_TEST, 24);
  13738     if (TEST_Z(_flag_a, _flag_b)) goto L_39004C25; /* 0x39004C1F: je 0x39004c25 */
  13739 L_39004C21:
  13740     esi = MEM32(esi); /* 0x39004C21: mov esi, dword ptr [esi] */
  13741     goto L_39004C28; /* 0x39004C23: jmp 0x39004c28 */
  13742 L_39004C25:
  13743     esi = MEM32(esi + 0x8); /* 0x39004C25: mov esi, dword ptr [esi + 8] */
  13744 L_39004C28:
  13745     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39004C28: cmp esi, dword ptr [edi + 8] */
  13746     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  13747     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13748     _flag_k = FK_CMP;
  13749     RECOMP_BACKEDGE();
  13750     if (CMP_NE(_flag_a, _flag_b)) goto L_39004C0A; /* 0x39004C2B: jne 0x39004c0a */
  13751 L_39004C2D:
  13752     SET_LO8(ecx, MEM8(edi + 0xC)); /* 0x39004C2D: mov cl, byte ptr [edi + 0xc] */
  13753     /* test LO8(ecx), LO8(ecx) */ /* 0x39004C30: test cl, cl */
  13754     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
  13755     _cf = 0;
  13756     _flag_k = FK_NARROW(FK_TEST, 24);
  13757     if (TEST_Z(_flag_a, _flag_b)) goto L_39004C52; /* 0x39004C32: je 0x39004c52 */
  13758 L_39004C34:
  13759     edx = MEM32(ebp + 0xC); /* 0x39004C34: mov edx, dword ptr [ebp + 0xc] */
  13760     eax = ebp + (-0x8); /* 0x39004C37: lea eax, [ebp - 8] */
  13761     PUSH32(esp, edx); /* 0x39004C3A: push edx */
  13762     PUSH32(esp, ebx); /* 0x39004C3B: push ebx */
  13763     PUSH32(esp, esi); /* 0x39004C3C: push esi */
  13764     PUSH32(esp, eax); /* 0x39004C3D: push eax */
  13765     ecx = edi; /* 0x39004C3E: mov ecx, edi */
  13766     RECOMP_ICALL(0x39006EC0u); /* 0x39004C40: call 0x39006ec0 */ /* not lifted */
  13767     RECOMP_FLAGS_IN();
  13768     eax = MEM32(eax); /* 0x39004C45: mov eax, dword ptr [eax] */
  13769     MEM8(ebp + (-0xC)) = (uint8_t)(1); /* 0x39004C47: mov byte ptr [ebp - 0xc], 1 */
  13770     ecx = eax; /* 0x39004C4B: mov ecx, eax */
  13771     eax = MEM32(ebp + (-0xC)); /* 0x39004C4D: mov eax, dword ptr [ebp - 0xc] */
  13772     goto L_39004CC6; /* 0x39004C50: jmp 0x39004cc6 */
  13773 L_39004C52:
  13774     /* test LO8(eax), LO8(eax) */ /* 0x39004C52: test al, al */
  13775     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  13776     _cf = 0;
  13777     _flag_k = FK_NARROW(FK_TEST, 24);
  13778     MEM32(ebp + (-0x4)) = ebx; /* 0x39004C54: mov dword ptr [ebp - 4], ebx */
  13779     if (TEST_Z(_flag_a, _flag_b)) goto L_39004C86; /* 0x39004C57: je 0x39004c86 */
  13780 L_39004C59:
  13781     ecx = MEM32(edi + 0x4); /* 0x39004C59: mov ecx, dword ptr [edi + 4] */
  13782     /* cmp ebx, MEM32(ecx) */ /* 0x39004C5C: cmp ebx, dword ptr [ecx] */
  13783     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(ecx));
  13784     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13785     _flag_k = FK_CMP;
  13786     if (CMP_NE(_flag_a, _flag_b)) goto L_39004C7E; /* 0x39004C5E: jne 0x39004c7e */
  13787 L_39004C60:
  13788     edx = MEM32(ebp + 0xC); /* 0x39004C60: mov edx, dword ptr [ebp + 0xc] */
  13789     eax = ebp + (-0xC); /* 0x39004C63: lea eax, [ebp - 0xc] */
  13790     PUSH32(esp, edx); /* 0x39004C66: push edx */
  13791     PUSH32(esp, ebx); /* 0x39004C67: push ebx */
  13792     PUSH32(esp, esi); /* 0x39004C68: push esi */
  13793     PUSH32(esp, eax); /* 0x39004C69: push eax */
  13794     ecx = edi; /* 0x39004C6A: mov ecx, edi */
  13795     RECOMP_ICALL(0x39006EC0u); /* 0x39004C6C: call 0x39006ec0 */ /* not lifted */
  13796     RECOMP_FLAGS_IN();
  13797     eax = MEM32(eax); /* 0x39004C71: mov eax, dword ptr [eax] */
  13798     MEM8(ebp + (-0xC)) = (uint8_t)(1); /* 0x39004C73: mov byte ptr [ebp - 0xc], 1 */
  13799     ecx = eax; /* 0x39004C77: mov ecx, eax */
  13800     eax = MEM32(ebp + (-0xC)); /* 0x39004C79: mov eax, dword ptr [ebp - 0xc] */
  13801     goto L_39004CC6; /* 0x39004C7C: jmp 0x39004cc6 */
  13802 L_39004C7E:
  13803     ecx = ebp + (-0x4); /* 0x39004C7E: lea ecx, [ebp - 4] */
  13804     RECOMP_ICALL(0x390071C0u); /* 0x39004C81: call 0x390071c0 */ /* not lifted */
  13805     RECOMP_FLAGS_IN();
  13806 L_39004C86:
  13807     ecx = MEM32(ebp + (-0x4)); /* 0x39004C86: mov ecx, dword ptr [ebp - 4] */
  13808     edx = MEM32(ebp + 0xC); /* 0x39004C89: mov edx, dword ptr [ebp + 0xc] */
  13809     PUSH32(esp, edx); /* 0x39004C8C: push edx */
  13810     eax = ecx + 0xC; /* 0x39004C8D: lea eax, [ecx + 0xc] */
  13811     PUSH32(esp, eax); /* 0x39004C90: push eax */
  13812     RECOMP_ICALL(MEM32(0x3900B030)); /* 0x39004C91: call dword ptr [0x3900b030] */
  13813     RECOMP_FLAGS_IN();
  13814     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  13815     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13816     esp = esp + 8; /* 0x39004C97: add esp, 8 */
  13817     _flag_k = FK_ADD;
  13818     /* test LO8(eax), LO8(eax) */ /* 0x39004C9A: test al, al */
  13819     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  13820     _cf = 0;
  13821     _flag_k = FK_NARROW(FK_TEST, 24);
  13822     if (TEST_Z(_flag_a, _flag_b)) goto L_39004CBC; /* 0x39004C9C: je 0x39004cbc */
  13823 L_39004C9E:
  13824     eax = MEM32(ebp + 0xC); /* 0x39004C9E: mov eax, dword ptr [ebp + 0xc] */
  13825     ecx = ebp + 0xC; /* 0x39004CA1: lea ecx, [ebp + 0xc] */
  13826     PUSH32(esp, eax); /* 0x39004CA4: push eax */
  13827     PUSH32(esp, ebx); /* 0x39004CA5: push ebx */
  13828     PUSH32(esp, esi); /* 0x39004CA6: push esi */
  13829     PUSH32(esp, ecx); /* 0x39004CA7: push ecx */
  13830     ecx = edi; /* 0x39004CA8: mov ecx, edi */
  13831     RECOMP_ICALL(0x39006EC0u); /* 0x39004CAA: call 0x39006ec0 */ /* not lifted */
  13832     RECOMP_FLAGS_IN();
  13833     eax = MEM32(eax); /* 0x39004CAF: mov eax, dword ptr [eax] */
  13834     MEM8(ebp + (-0xC)) = (uint8_t)(1); /* 0x39004CB1: mov byte ptr [ebp - 0xc], 1 */
  13835     ecx = eax; /* 0x39004CB5: mov ecx, eax */
  13836     eax = MEM32(ebp + (-0xC)); /* 0x39004CB7: mov eax, dword ptr [ebp - 0xc] */
  13837     goto L_39004CC6; /* 0x39004CBA: jmp 0x39004cc6 */
  13838 L_39004CBC:
  13839     ecx = MEM32(ebp + (-0x4)); /* 0x39004CBC: mov ecx, dword ptr [ebp - 4] */
  13840     MEM8(ebp + (-0xC)) = (uint8_t)(0); /* 0x39004CBF: mov byte ptr [ebp - 0xc], 0 */
  13841     eax = MEM32(ebp + (-0xC)); /* 0x39004CC3: mov eax, dword ptr [ebp - 0xc] */
  13842 L_39004CC6:
  13843     MEM8(ebp + (-0xC)) = (uint8_t)(LO8(eax)); /* 0x39004CC6: mov byte ptr [ebp - 0xc], al */
  13844     eax = MEM32(ebp + 0x8); /* 0x39004CC9: mov eax, dword ptr [ebp + 8] */
  13845     edx = MEM32(ebp + (-0xC)); /* 0x39004CCC: mov edx, dword ptr [ebp - 0xc] */
  13846     edi = POP32_VAL(esp); /* 0x39004CCF: pop edi */
  13847     MEM32(eax) = ecx; /* 0x39004CD0: mov dword ptr [eax], ecx */
  13848     esi = POP32_VAL(esp); /* 0x39004CD2: pop esi */
  13849     MEM32(eax + 0x4) = edx; /* 0x39004CD3: mov dword ptr [eax + 4], edx */
  13850     ebx = POP32_VAL(esp); /* 0x39004CD6: pop ebx */
  13851     esp = ebp; /* 0x39004CD7: mov esp, ebp */
  13852     ebp = POP32_VAL(esp); /* 0x39004CD9: pop ebp */
  13853     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39004CDA: ret 8 */
  13854     RECOMP_REGS_OUT();
  13855 }
  13856 
  13857 void sub_39004CE0(void) {
  13858     int _fpu_cmp = 0;
  13859     uint32_t _cf = 0;
  13860     int _df = 1;
  13861     uint32_t _flag_k = FK_NONE;
  13862     uint32_t _flag_a = 0, _flag_b = 0;
  13863     uint32_t _itail_tgt = 0;
  13864     RECOMP_REGS_LOCALS
  13865     RECOMP_ENTER(0x39004CE0u);
  13866 
  13867 L_39004CE0:
  13868     PUSH32(esp, ebp); /* 0x39004CE0: push ebp */
  13869     ebp = esp; /* 0x39004CE1: mov ebp, esp */
  13870     eax = MEM32(ebp + 0x10); /* 0x39004CE3: mov eax, dword ptr [ebp + 0x10] */
  13871     edx = MEM32(ebp + 0x8); /* 0x39004CE6: mov edx, dword ptr [ebp + 8] */
  13872     PUSH32(esp, ebx); /* 0x39004CE9: push ebx */
  13873     PUSH32(esp, esi); /* 0x39004CEA: push esi */
  13874     esi = ecx; /* 0x39004CEB: mov esi, ecx */
  13875     PUSH32(esp, edi); /* 0x39004CED: push edi */
  13876     SET_LO8(ecx, MEM8(eax)); /* 0x39004CEE: mov cl, byte ptr [eax] */
  13877     PUSH32(esp, 0x3Cu); /* 0x39004CF0: push 0x3c */
  13878     MEM8(esi) = (uint8_t)(LO8(ecx)); /* 0x39004CF2: mov byte ptr [esi], cl */
  13879     SET_LO8(eax, MEM8(edx)); /* 0x39004CF4: mov al, byte ptr [edx] */
  13880     SET_LO8(ecx, MEM8(ebp + 0xC)); /* 0x39004CF6: mov cl, byte ptr [ebp + 0xc] */
  13881     MEM8(esi + 0x1) = (uint8_t)(LO8(eax)); /* 0x39004CF9: mov byte ptr [esi + 1], al */
  13882     MEM8(esi + 0xC) = (uint8_t)(LO8(ecx)); /* 0x39004CFC: mov byte ptr [esi + 0xc], cl */
  13883     RECOMP_ICALL(0x3900A0ACu); /* 0x39004CFF: call 0x3900a0ac */ /* not lifted */
  13884     RECOMP_FLAGS_IN();
  13885     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  13886     ebx = 0; /* 0x39004D04: xor ebx, ebx */
  13887     _cf = 0;
  13888     _flag_k = FK_TEST;
  13889     SET_LO8(ecx, 1); /* 0x39004D06: mov cl, 1 */
  13890     MEM32(eax + 0x4) = ebx; /* 0x39004D08: mov dword ptr [eax + 4], ebx */
  13891     MEM8(eax + 0x38) = (uint8_t)(LO8(ecx)); /* 0x39004D0B: mov byte ptr [eax + 0x38], cl */
  13892     MEM8(eax + 0x39) = (uint8_t)(LO8(ebx)); /* 0x39004D0E: mov byte ptr [eax + 0x39], bl */
  13893     MEM32(esi + 0x8) = eax; /* 0x39004D11: mov dword ptr [esi + 8], eax */
  13894     MEM8(eax + 0x39) = (uint8_t)(LO8(ecx)); /* 0x39004D14: mov byte ptr [eax + 0x39], cl */
  13895     edx = MEM32(esi + 0x8); /* 0x39004D17: mov edx, dword ptr [esi + 8] */
  13896     PUSH32(esp, 0x3Cu); /* 0x39004D1A: push 0x3c */
  13897     MEM32(edx) = ebx; /* 0x39004D1C: mov dword ptr [edx], ebx */
  13898     eax = MEM32(esi + 0x8); /* 0x39004D1E: mov eax, dword ptr [esi + 8] */
  13899     MEM32(eax + 0x8) = ebx; /* 0x39004D21: mov dword ptr [eax + 8], ebx */
  13900     edi = MEM32(esi + 0x8); /* 0x39004D24: mov edi, dword ptr [esi + 8] */
  13901     RECOMP_ICALL(0x3900A0ACu); /* 0x39004D27: call 0x3900a0ac */ /* not lifted */
  13902     RECOMP_FLAGS_IN();
  13903     MEM32(eax + 0x4) = edi; /* 0x39004D2C: mov dword ptr [eax + 4], edi */
  13904     MEM8(eax + 0x38) = (uint8_t)(LO8(ebx)); /* 0x39004D2F: mov byte ptr [eax + 0x38], bl */
  13905     MEM8(eax + 0x39) = (uint8_t)(LO8(ebx)); /* 0x39004D32: mov byte ptr [eax + 0x39], bl */
  13906     MEM32(esi + 0x4) = eax; /* 0x39004D35: mov dword ptr [esi + 4], eax */
  13907     MEM32(eax) = eax; /* 0x39004D38: mov dword ptr [eax], eax */
  13908     eax = MEM32(esi + 0x4); /* 0x39004D3A: mov eax, dword ptr [esi + 4] */
  13909     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  13910     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13911     esp = esp + 8; /* 0x39004D3D: add esp, 8 */
  13912     _flag_k = FK_ADD;
  13913     MEM32(eax + 0x8) = eax; /* 0x39004D40: mov dword ptr [eax + 8], eax */
  13914     MEM32(esi + 0x10) = ebx; /* 0x39004D43: mov dword ptr [esi + 0x10], ebx */
  13915     eax = esi; /* 0x39004D46: mov eax, esi */
  13916     edi = POP32_VAL(esp); /* 0x39004D48: pop edi */
  13917     esi = POP32_VAL(esp); /* 0x39004D49: pop esi */
  13918     ebx = POP32_VAL(esp); /* 0x39004D4A: pop ebx */
  13919     ebp = POP32_VAL(esp); /* 0x39004D4B: pop ebp */
  13920     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x39004D4C: ret 0xc */
  13921     RECOMP_REGS_OUT();
  13922 }
  13923 
  13924 void sub_39004D50(void) {
  13925     int _fpu_cmp = 0;
  13926     uint32_t _cf = 0;
  13927     int _df = 1;
  13928     uint32_t _flag_k = FK_NONE;
  13929     uint32_t _flag_a = 0, _flag_b = 0;
  13930     uint32_t _itail_tgt = 0;
  13931     RECOMP_REGS_LOCALS
  13932     RECOMP_ENTER(0x39004D50u);
  13933 
  13934 L_39004D50:
  13935     PUSH32(esp, ebp); /* 0x39004D50: push ebp */
  13936     ebp = esp; /* 0x39004D51: mov ebp, esp */
  13937     PUSH32(esp, ebx); /* 0x39004D53: push ebx */
  13938     ebx = MEM32(ebp + 0x10); /* 0x39004D54: mov ebx, dword ptr [ebp + 0x10] */
  13939     PUSH32(esp, esi); /* 0x39004D57: push esi */
  13940     esi = ecx; /* 0x39004D58: mov esi, ecx */
  13941     ecx = MEM32(ebp + 0xC); /* 0x39004D5A: mov ecx, dword ptr [ebp + 0xc] */
  13942     PUSH32(esp, edi); /* 0x39004D5D: push edi */
  13943     eax = MEM32(esi + 0x10); /* 0x39004D5E: mov eax, dword ptr [esi + 0x10] */
  13944     /* test eax, eax */ /* 0x39004D61: test eax, eax */
  13945     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  13946     _cf = 0;
  13947     _flag_k = FK_TEST;
  13948     if (TEST_Z(_flag_a, _flag_b)) goto L_39004DCF; /* 0x39004D63: je 0x39004dcf */
  13949 L_39004D65:
  13950     eax = MEM32(esi + 0x4); /* 0x39004D65: mov eax, dword ptr [esi + 4] */
  13951     /* cmp ecx, MEM32(eax) */ /* 0x39004D68: cmp ecx, dword ptr [eax] */
  13952     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(eax));
  13953     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13954     _flag_k = FK_CMP;
  13955     if (CMP_NE(_flag_a, _flag_b)) goto L_39004DCF; /* 0x39004D6A: jne 0x39004dcf */
  13956 L_39004D6C:
  13957     /* cmp ebx, eax */ /* 0x39004D6C: cmp ebx, eax */
  13958     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  13959     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13960     _flag_k = FK_CMP;
  13961     if (CMP_NE(_flag_a, _flag_b)) goto L_39004DCF; /* 0x39004D6E: jne 0x39004dcf */
  13962 L_39004D70:
  13963     ebx = MEM32(eax + 0x4); /* 0x39004D70: mov ebx, dword ptr [eax + 4] */
  13964     eax = MEM32(esi + 0x8); /* 0x39004D73: mov eax, dword ptr [esi + 8] */
  13965     /* cmp ebx, eax */ /* 0x39004D76: cmp ebx, eax */
  13966     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  13967     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13968     _flag_k = FK_CMP;
  13969     edi = ebx; /* 0x39004D78: mov edi, ebx */
  13970     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004DA3; /* 0x39004D7A: je 0x39004da3 */
  13971 L_39004D7C:
  13972     eax = MEM32(edi + 0x8); /* 0x39004D7C: mov eax, dword ptr [edi + 8] */
  13973     ecx = esi; /* 0x39004D7F: mov ecx, esi */
  13974     PUSH32(esp, eax); /* 0x39004D81: push eax */
  13975     RECOMP_ICALL(0x39006620u); /* 0x39004D82: call 0x39006620 */ /* not lifted */
  13976     RECOMP_FLAGS_IN();
  13977     edi = MEM32(edi); /* 0x39004D87: mov edi, dword ptr [edi] */
  13978     ecx = ebx + 0xC; /* 0x39004D89: lea ecx, [ebx + 0xc] */
  13979     RECOMP_ICALL(0x390047D0u); /* 0x39004D8C: call 0x390047d0 */ /* not lifted */
  13980     RECOMP_FLAGS_IN();
  13981     PUSH32(esp, ebx); /* 0x39004D91: push ebx */
  13982     RECOMP_ICALL(0x3900A0A0u); /* 0x39004D92: call 0x3900a0a0 */ /* not lifted */
  13983     RECOMP_FLAGS_IN();
  13984     eax = MEM32(esi + 0x8); /* 0x39004D97: mov eax, dword ptr [esi + 8] */
  13985     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  13986     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13987     esp = esp + 4; /* 0x39004D9A: add esp, 4 */
  13988     _flag_k = FK_ADD;
  13989     /* cmp edi, eax */ /* 0x39004D9D: cmp edi, eax */
  13990     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  13991     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13992     _flag_k = FK_CMP;
  13993     ebx = edi; /* 0x39004D9F: mov ebx, edi */
  13994     RECOMP_BACKEDGE();
  13995     if (CMP_NE(_flag_a, _flag_b)) goto L_39004D7C; /* 0x39004DA1: jne 0x39004d7c */
  13996 L_39004DA3:
  13997     ecx = MEM32(esi + 0x4); /* 0x39004DA3: mov ecx, dword ptr [esi + 4] */
  13998     edx = MEM32(esi + 0x8); /* 0x39004DA6: mov edx, dword ptr [esi + 8] */
  13999     edi = POP32_VAL(esp); /* 0x39004DA9: pop edi */
  14000     MEM32(ecx + 0x4) = edx; /* 0x39004DAA: mov dword ptr [ecx + 4], edx */
  14001     eax = MEM32(esi + 0x4); /* 0x39004DAD: mov eax, dword ptr [esi + 4] */
  14002     MEM32(esi + 0x10) = 0; /* 0x39004DB0: mov dword ptr [esi + 0x10], 0 */
  14003     MEM32(eax) = eax; /* 0x39004DB7: mov dword ptr [eax], eax */
  14004     eax = MEM32(esi + 0x4); /* 0x39004DB9: mov eax, dword ptr [esi + 4] */
  14005     MEM32(eax + 0x8) = eax; /* 0x39004DBC: mov dword ptr [eax + 8], eax */
  14006     eax = MEM32(esi + 0x4); /* 0x39004DBF: mov eax, dword ptr [esi + 4] */
  14007     esi = POP32_VAL(esp); /* 0x39004DC2: pop esi */
  14008     ebx = POP32_VAL(esp); /* 0x39004DC3: pop ebx */
  14009     ecx = MEM32(eax); /* 0x39004DC4: mov ecx, dword ptr [eax] */
  14010     eax = MEM32(ebp + 0x8); /* 0x39004DC6: mov eax, dword ptr [ebp + 8] */
  14011     MEM32(eax) = ecx; /* 0x39004DC9: mov dword ptr [eax], ecx */
  14012     ebp = POP32_VAL(esp); /* 0x39004DCB: pop ebp */
  14013     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x39004DCC: ret 0xc */
  14014 L_39004DCF:
  14015     /* cmp ecx, ebx */ /* 0x39004DCF: cmp ecx, ebx */
  14016     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
  14017     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14018     _flag_k = FK_CMP;
  14019     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004DF0; /* 0x39004DD1: je 0x39004df0 */
  14020 L_39004DD3:
  14021     edi = ecx; /* 0x39004DD3: mov edi, ecx */
  14022     ecx = ebp + 0xC; /* 0x39004DD5: lea ecx, [ebp + 0xc] */
  14023     RECOMP_ICALL(0x39004F50u); /* 0x39004DD8: call 0x39004f50 */ /* not lifted */
  14024     RECOMP_FLAGS_IN();
  14025     ecx = ebp + 0x10; /* 0x39004DDD: lea ecx, [ebp + 0x10] */
  14026     PUSH32(esp, edi); /* 0x39004DE0: push edi */
  14027     PUSH32(esp, ecx); /* 0x39004DE1: push ecx */
  14028     ecx = esi; /* 0x39004DE2: mov ecx, esi */
  14029     RECOMP_ICALL(0x39006250u); /* 0x39004DE4: call 0x39006250 */ /* not lifted */
  14030     RECOMP_FLAGS_IN();
  14031     ecx = MEM32(ebp + 0xC); /* 0x39004DE9: mov ecx, dword ptr [ebp + 0xc] */
  14032     /* cmp ecx, ebx */ /* 0x39004DEC: cmp ecx, ebx */
  14033     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
  14034     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14035     _flag_k = FK_CMP;
  14036     RECOMP_BACKEDGE();
  14037     if (CMP_NE(_flag_a, _flag_b)) goto L_39004DD3; /* 0x39004DEE: jne 0x39004dd3 */
  14038 L_39004DF0:
  14039     eax = MEM32(ebp + 0x8); /* 0x39004DF0: mov eax, dword ptr [ebp + 8] */
  14040     edi = POP32_VAL(esp); /* 0x39004DF3: pop edi */
  14041     esi = POP32_VAL(esp); /* 0x39004DF4: pop esi */
  14042     ebx = POP32_VAL(esp); /* 0x39004DF5: pop ebx */
  14043     MEM32(eax) = ecx; /* 0x39004DF6: mov dword ptr [eax], ecx */
  14044     ebp = POP32_VAL(esp); /* 0x39004DF8: pop ebp */
  14045     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x39004DF9: ret 0xc */
  14046     RECOMP_REGS_OUT();
  14047 }
  14048 
  14049 void sub_39004E00(void) {
  14050     int _fpu_cmp = 0;
  14051     uint32_t _cf = 0;
  14052     int _df = 1;
  14053     uint32_t _flag_k = FK_NONE;
  14054     uint32_t _flag_a = 0, _flag_b = 0;
  14055     uint32_t _itail_tgt = 0;
  14056     RECOMP_REGS_LOCALS
  14057     RECOMP_ENTER(0x39004E00u);
  14058 
  14059 L_39004E00:
  14060     PUSH32(esp, ebp); /* 0x39004E00: push ebp */
  14061     ebp = esp; /* 0x39004E01: mov ebp, esp */
  14062     PUSH32(esp, 0xFFFFFFFFu); /* 0x39004E03: push -1 */
  14063     PUSH32(esp, 0x3900A759u); /* 0x39004E05: push 0x3900a759 */
  14064     eax = MEM32(FS_BASE + (0)); /* 0x39004E0A: mov eax, dword ptr fs:[0] */
  14065     PUSH32(esp, eax); /* 0x39004E10: push eax */
  14066     MEM32(FS_BASE + (0)) = esp; /* 0x39004E11: mov dword ptr fs:[0], esp */
  14067     PUSH32(esp, ecx); /* 0x39004E18: push ecx */
  14068     PUSH32(esp, ebx); /* 0x39004E19: push ebx */
  14069     PUSH32(esp, esi); /* 0x39004E1A: push esi */
  14070     esi = MEM32(ebp + 0x8); /* 0x39004E1B: mov esi, dword ptr [ebp + 8] */
  14071     ebx = ecx; /* 0x39004E1E: mov ebx, ecx */
  14072     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  14073     edx = 0; /* 0x39004E20: xor edx, edx */
  14074     _cf = 0;
  14075     _flag_k = FK_TEST;
  14076     PUSH32(esp, edi); /* 0x39004E22: push edi */
  14077     SET_LO8(eax, MEM8(esi)); /* 0x39004E23: mov al, byte ptr [esi] */
  14078     MEM32(ebx + 0x4) = edx; /* 0x39004E25: mov dword ptr [ebx + 4], edx */
  14079     MEM8(ebx) = (uint8_t)(LO8(eax)); /* 0x39004E28: mov byte ptr [ebx], al */
  14080     MEM32(ebx + 0x8) = edx; /* 0x39004E2A: mov dword ptr [ebx + 8], edx */
  14081     MEM32(ebx + 0xC) = edx; /* 0x39004E2D: mov dword ptr [ebx + 0xc], edx */
  14082     ecx = MEM32(0x3900B008); /* 0x39004E30: mov ecx, dword ptr [0x3900b008] */
  14083     MEM32(ebp + (-0x10)) = ebx; /* 0x39004E36: mov dword ptr [ebp - 0x10], ebx */
  14084     eax = MEM32(ecx); /* 0x39004E39: mov eax, dword ptr [ecx] */
  14085     ecx = MEM32(esi + 0x8); /* 0x39004E3B: mov ecx, dword ptr [esi + 8] */
  14086     edi = ecx; /* 0x39004E3E: mov edi, ecx */
  14087     /* cmp eax, edi */ /* 0x39004E40: cmp eax, edi */
  14088     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  14089     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14090     _flag_k = FK_CMP;
  14091     MEM32(ebp + 0x8) = edi; /* 0x39004E42: mov dword ptr [ebp + 8], edi */
  14092     if (CMP_AE(_flag_a, _flag_b)) goto L_39004E4C; /* 0x39004E45: jae 0x39004e4c */
  14093 L_39004E47:
  14094     MEM32(ebp + 0x8) = eax; /* 0x39004E47: mov dword ptr [ebp + 8], eax */
  14095     edi = eax; /* 0x39004E4A: mov edi, eax */
  14096 L_39004E4C:
  14097     /* cmp ebx, esi */ /* 0x39004E4C: cmp ebx, esi */
  14098     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi);
  14099     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14100     _flag_k = FK_CMP;
  14101     if (CMP_NE(_flag_a, _flag_b)) goto L_39004E6B; /* 0x39004E4E: jne 0x39004e6b */
  14102 L_39004E50:
  14103     PUSH32(esp, eax); /* 0x39004E50: push eax */
  14104     PUSH32(esp, edi); /* 0x39004E51: push edi */
  14105     ecx = ebx; /* 0x39004E52: mov ecx, ebx */
  14106     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x39004E54: call dword ptr [0x3900b010] */
  14107     RECOMP_FLAGS_IN();
  14108     PUSH32(esp, 0); /* 0x39004E5A: push 0 */
  14109     PUSH32(esp, 0); /* 0x39004E5C: push 0 */
  14110     ecx = ebx; /* 0x39004E5E: mov ecx, ebx */
  14111     RECOMP_ICALL(MEM32(0x3900B010)); /* 0x39004E60: call dword ptr [0x3900b010] */
  14112     RECOMP_FLAGS_IN();
  14113     goto L_39004EF1; /* 0x39004E66: jmp 0x39004ef1 */
  14114 L_39004E6B:
  14115     /* cmp edi, edx */ /* 0x39004E6B: cmp edi, edx */
  14116     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx);
  14117     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14118     _flag_k = FK_CMP;
  14119     if (CMP_BE(_flag_a, _flag_b)) goto L_39004EB4; /* 0x39004E6D: jbe 0x39004eb4 */
  14120 L_39004E6F:
  14121     /* cmp edi, ecx */ /* 0x39004E6F: cmp edi, ecx */
  14122     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx);
  14123     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14124     _flag_k = FK_CMP;
  14125     if (CMP_NE(_flag_a, _flag_b)) goto L_39004EB4; /* 0x39004E71: jne 0x39004eb4 */
  14126 L_39004E73:
  14127     eax = MEM32(esi + 0x4); /* 0x39004E73: mov eax, dword ptr [esi + 4] */
  14128     /* cmp eax, edx */ /* 0x39004E76: cmp eax, edx */
  14129     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
  14130     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14131     _flag_k = FK_CMP;
  14132     if (CMP_NE(_flag_a, _flag_b)) goto L_39004E7F; /* 0x39004E78: jne 0x39004e7f */
  14133 L_39004E7A:
  14134     eax = MEM32(0x3900B02C); /* 0x39004E7A: mov eax, dword ptr [0x3900b02c] */
  14135 L_39004E7F:
  14136     /* cmp MEM8(eax + (-0x1)), 0xFEu */ /* 0x39004E7F: cmp byte ptr [eax - 1], 0xfe */
  14137     _flag_a = (uint32_t)(MEM8(eax + (-0x1))) << 24; _flag_b = (uint32_t)(0xFEu) << 24;
  14138     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14139     _flag_k = FK_NARROW(FK_CMP, 24);
  14140     if (CMP_AE(_flag_a, _flag_b)) goto L_39004EB4; /* 0x39004E83: jae 0x39004eb4 */
  14141 L_39004E85:
  14142     PUSH32(esp, 1); /* 0x39004E85: push 1 */
  14143     ecx = ebx; /* 0x39004E87: mov ecx, ebx */
  14144     RECOMP_ICALL(MEM32(0x3900B040)); /* 0x39004E89: call dword ptr [0x3900b040] */
  14145     RECOMP_FLAGS_IN();
  14146     eax = MEM32(esi + 0x4); /* 0x39004E8F: mov eax, dword ptr [esi + 4] */
  14147     /* test eax, eax */ /* 0x39004E92: test eax, eax */
  14148     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  14149     _cf = 0;
  14150     _flag_k = FK_TEST;
  14151     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004E9B; /* 0x39004E94: jne 0x39004e9b */
  14152 L_39004E96:
  14153     eax = MEM32(0x3900B02C); /* 0x39004E96: mov eax, dword ptr [0x3900b02c] */
  14154 L_39004E9B:
  14155     MEM32(ebx + 0x4) = eax; /* 0x39004E9B: mov dword ptr [ebx + 4], eax */
  14156     ecx = MEM32(esi + 0x8); /* 0x39004E9E: mov ecx, dword ptr [esi + 8] */
  14157     MEM32(ebx + 0x8) = ecx; /* 0x39004EA1: mov dword ptr [ebx + 8], ecx */
  14158     esi = MEM32(esi + 0xC); /* 0x39004EA4: mov esi, dword ptr [esi + 0xc] */
  14159     MEM32(ebx + 0xC) = esi; /* 0x39004EA7: mov dword ptr [ebx + 0xc], esi */
  14160     SET_LO8(ecx, MEM8(eax + (-0x1))); /* 0x39004EAA: mov cl, byte ptr [eax - 1] */
  14161     _flag_a = (uint32_t)(LO8(ecx)) << 24; _flag_b = (uint32_t)(1) << 24;
  14162     SET_LO8(ecx, LO8(ecx) + 1); /* 0x39004EAD: inc cl */
  14163     _flag_k = FK_NARROW(FK_INC, 24);
  14164     MEM8(eax + (-0x1)) = (uint8_t)(LO8(ecx)); /* 0x39004EAF: mov byte ptr [eax - 1], cl */
  14165     goto L_39004EF1; /* 0x39004EB2: jmp 0x39004ef1 */
  14166 L_39004EB4:
  14167     PUSH32(esp, 1); /* 0x39004EB4: push 1 */
  14168     PUSH32(esp, edi); /* 0x39004EB6: push edi */
  14169     ecx = ebx; /* 0x39004EB7: mov ecx, ebx */
  14170     RECOMP_ICALL(MEM32(0x3900B034)); /* 0x39004EB9: call dword ptr [0x3900b034] */
  14171     RECOMP_FLAGS_IN();
  14172     /* test LO8(eax), LO8(eax) */ /* 0x39004EBF: test al, al */
  14173     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  14174     _cf = 0;
  14175     _flag_k = FK_NARROW(FK_TEST, 24);
  14176     if (TEST_Z(_flag_a, _flag_b)) goto L_39004EF1; /* 0x39004EC1: je 0x39004ef1 */
  14177 L_39004EC3:
  14178     esi = MEM32(esi + 0x4); /* 0x39004EC3: mov esi, dword ptr [esi + 4] */
  14179     /* test esi, esi */ /* 0x39004EC6: test esi, esi */
  14180     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
  14181     _cf = 0;
  14182     _flag_k = FK_TEST;
  14183     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004ED0; /* 0x39004EC8: jne 0x39004ed0 */
  14184 L_39004ECA:
  14185     esi = MEM32(0x3900B02C); /* 0x39004ECA: mov esi, dword ptr [0x3900b02c] */
  14186 L_39004ED0:
  14187     eax = MEM32(ebx + 0x4); /* 0x39004ED0: mov eax, dword ptr [ebx + 4] */
  14188     ecx = edi; /* 0x39004ED3: mov ecx, edi */
  14189     edx = ecx; /* 0x39004ED5: mov edx, ecx */
  14190     edi = eax; /* 0x39004ED7: mov edi, eax */
  14191     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x39004ED9: shr ecx, 2 */
  14192     if (2u) { _flag_a = recomp_flags_pack((ecx >> 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  14193     ecx = ecx >> 2u; /* 0x39004ED9: shr ecx, 2 */
  14194     if (ecx) { uint32_t _n = ecx, _b = _n * 4u; /* 0x39004EDC: 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; }
  14195     eax = MEM32(ebp + 0x8); /* 0x39004EDE: mov eax, dword ptr [ebp + 8] */
  14196     ecx = edx; /* 0x39004EE1: mov ecx, edx */
  14197     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(3);
  14198     ecx = ecx & 3; /* 0x39004EE3: and ecx, 3 */
  14199     _cf = 0;
  14200     _flag_k = FK_TEST;
  14201     PUSH32(esp, eax); /* 0x39004EE6: push eax */
  14202     if (ecx) { uint32_t _n = ecx, _b = _n * 1u; /* 0x39004EE7: rep movsb byte ptr es:[edi], byte ptr [esi] */ if (_df > 0) { memmove((void*)ADDR(edi), (void*)ADDR(esi), _b); esi += _b; edi += _b; } else { memmove((void*)ADDR(edi - _b + 1u), (void*)ADDR(esi - _b + 1u), _b); esi -= _b; edi -= _b; } ecx = 0; }
  14203     ecx = ebx; /* 0x39004EE9: mov ecx, ebx */
  14204     RECOMP_ICALL(MEM32(0x3900B038)); /* 0x39004EEB: call dword ptr [0x3900b038] */
  14205     RECOMP_FLAGS_IN();
  14206 L_39004EF1:
  14207     edi = MEM32(ebp + 0xC); /* 0x39004EF1: mov edi, dword ptr [ebp + 0xc] */
  14208     esi = ebx + 0x10; /* 0x39004EF4: lea esi, [ebx + 0x10] */
  14209     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  14210     eax = 0; /* 0x39004EF7: xor eax, eax */
  14211     _cf = 0;
  14212     _flag_k = FK_TEST;
  14213     MEM32(ebp + (-0x4)) = 0; /* 0x39004EF9: mov dword ptr [ebp - 4], 0 */
  14214     SET_LO8(ecx, MEM8(edi)); /* 0x39004F00: mov cl, byte ptr [edi] */
  14215     MEM32(esi + 0x4) = eax; /* 0x39004F02: mov dword ptr [esi + 4], eax */
  14216     MEM8(esi) = (uint8_t)(LO8(ecx)); /* 0x39004F05: mov byte ptr [esi], cl */
  14217     MEM32(esi + 0x8) = eax; /* 0x39004F07: mov dword ptr [esi + 8], eax */
  14218     MEM32(esi + 0xC) = eax; /* 0x39004F0A: mov dword ptr [esi + 0xc], eax */
  14219     edx = MEM32(0x3900B008); /* 0x39004F0D: mov edx, dword ptr [0x3900b008] */
  14220     ecx = MEM32(edx); /* 0x39004F13: mov ecx, dword ptr [edx] */
  14221     PUSH32(esp, ecx); /* 0x39004F15: push ecx */
  14222     PUSH32(esp, eax); /* 0x39004F16: push eax */
  14223     PUSH32(esp, edi); /* 0x39004F17: push edi */
  14224     ecx = esi; /* 0x39004F18: mov ecx, esi */
  14225     RECOMP_ICALL(MEM32(0x3900B024)); /* 0x39004F1A: call dword ptr [0x3900b024] */
  14226     RECOMP_FLAGS_IN();
  14227     edx = MEM32(edi + 0x10); /* 0x39004F20: mov edx, dword ptr [edi + 0x10] */
  14228     MEM32(esi + 0x10) = edx; /* 0x39004F23: mov dword ptr [esi + 0x10], edx */
  14229     eax = MEM32(edi + 0x14); /* 0x39004F26: mov eax, dword ptr [edi + 0x14] */
  14230     MEM32(esi + 0x14) = eax; /* 0x39004F29: mov dword ptr [esi + 0x14], eax */
  14231     ecx = MEM32(edi + 0x18); /* 0x39004F2C: mov ecx, dword ptr [edi + 0x18] */
  14232     MEM32(esi + 0x18) = ecx; /* 0x39004F2F: mov dword ptr [esi + 0x18], ecx */
  14233     ecx = MEM32(ebp + (-0xC)); /* 0x39004F32: mov ecx, dword ptr [ebp - 0xc] */
  14234     edi = POP32_VAL(esp); /* 0x39004F35: pop edi */
  14235     eax = ebx; /* 0x39004F36: mov eax, ebx */
  14236     esi = POP32_VAL(esp); /* 0x39004F38: pop esi */
  14237     ebx = POP32_VAL(esp); /* 0x39004F39: pop ebx */
  14238     MEM32(FS_BASE + (0)) = ecx; /* 0x39004F3A: mov dword ptr fs:[0], ecx */
  14239     esp = ebp; /* 0x39004F41: mov esp, ebp */
  14240     ebp = POP32_VAL(esp); /* 0x39004F43: pop ebp */
  14241     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39004F44: ret 8 */
  14242     RECOMP_REGS_OUT();
  14243 }
  14244 
  14245 void sub_39004EF1(void) {
  14246     int _fpu_cmp = 0;
  14247     uint32_t _cf = 0;
  14248     int _df = 1;
  14249     uint32_t _flag_k = FK_NONE;
  14250     uint32_t _flag_a = 0, _flag_b = 0;
  14251     uint32_t _itail_tgt = 0;
  14252     RECOMP_REGS_LOCALS
  14253     RECOMP_ENTER(0x39004EF1u);
  14254 
  14255 L_39004EF1:
  14256     edi = MEM32(ebp + 0xC); /* 0x39004EF1: mov edi, dword ptr [ebp + 0xc] */
  14257     esi = ebx + 0x10; /* 0x39004EF4: lea esi, [ebx + 0x10] */
  14258     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  14259     eax = 0; /* 0x39004EF7: xor eax, eax */
  14260     _cf = 0;
  14261     _flag_k = FK_TEST;
  14262     MEM32(ebp + (-0x4)) = 0; /* 0x39004EF9: mov dword ptr [ebp - 4], 0 */
  14263     SET_LO8(ecx, MEM8(edi)); /* 0x39004F00: mov cl, byte ptr [edi] */
  14264     MEM32(esi + 0x4) = eax; /* 0x39004F02: mov dword ptr [esi + 4], eax */
  14265     MEM8(esi) = (uint8_t)(LO8(ecx)); /* 0x39004F05: mov byte ptr [esi], cl */
  14266     MEM32(esi + 0x8) = eax; /* 0x39004F07: mov dword ptr [esi + 8], eax */
  14267     MEM32(esi + 0xC) = eax; /* 0x39004F0A: mov dword ptr [esi + 0xc], eax */
  14268     edx = MEM32(0x3900B008); /* 0x39004F0D: mov edx, dword ptr [0x3900b008] */
  14269     ecx = MEM32(edx); /* 0x39004F13: mov ecx, dword ptr [edx] */
  14270     PUSH32(esp, ecx); /* 0x39004F15: push ecx */
  14271     PUSH32(esp, eax); /* 0x39004F16: push eax */
  14272     PUSH32(esp, edi); /* 0x39004F17: push edi */
  14273     ecx = esi; /* 0x39004F18: mov ecx, esi */
  14274     RECOMP_ICALL(MEM32(0x3900B024)); /* 0x39004F1A: call dword ptr [0x3900b024] */
  14275     RECOMP_FLAGS_IN();
  14276     edx = MEM32(edi + 0x10); /* 0x39004F20: mov edx, dword ptr [edi + 0x10] */
  14277     MEM32(esi + 0x10) = edx; /* 0x39004F23: mov dword ptr [esi + 0x10], edx */
  14278     eax = MEM32(edi + 0x14); /* 0x39004F26: mov eax, dword ptr [edi + 0x14] */
  14279     MEM32(esi + 0x14) = eax; /* 0x39004F29: mov dword ptr [esi + 0x14], eax */
  14280     ecx = MEM32(edi + 0x18); /* 0x39004F2C: mov ecx, dword ptr [edi + 0x18] */
  14281     MEM32(esi + 0x18) = ecx; /* 0x39004F2F: mov dword ptr [esi + 0x18], ecx */
  14282     ecx = MEM32(ebp + (-0xC)); /* 0x39004F32: mov ecx, dword ptr [ebp - 0xc] */
  14283     edi = POP32_VAL(esp); /* 0x39004F35: pop edi */
  14284     eax = ebx; /* 0x39004F36: mov eax, ebx */
  14285     esi = POP32_VAL(esp); /* 0x39004F38: pop esi */
  14286     ebx = POP32_VAL(esp); /* 0x39004F39: pop ebx */
  14287     MEM32(FS_BASE + (0)) = ecx; /* 0x39004F3A: mov dword ptr fs:[0], ecx */
  14288     esp = ebp; /* 0x39004F41: mov esp, ebp */
  14289     ebp = POP32_VAL(esp); /* 0x39004F43: pop ebp */
  14290     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x39004F44: ret 8 */
  14291     RECOMP_REGS_OUT();
  14292 }
  14293 
  14294 void sub_39004F50(void) {
  14295     int _fpu_cmp = 0;
  14296     uint32_t _cf = 0;
  14297     int _df = 1;
  14298     uint32_t _flag_k = FK_NONE;
  14299     uint32_t _flag_a = 0, _flag_b = 0;
  14300     uint32_t _itail_tgt = 0;
  14301     RECOMP_REGS_LOCALS
  14302     RECOMP_ENTER(0x39004F50u);
  14303 
  14304 L_39004F50:
  14305     eax = MEM32(ecx); /* 0x39004F50: mov eax, dword ptr [ecx] */
  14306     PUSH32(esp, ebx); /* 0x39004F52: push ebx */
  14307     edx = MEM32(eax + 0x8); /* 0x39004F53: mov edx, dword ptr [eax + 8] */
  14308     SET_LO8(ebx, MEM8(edx + 0x39)); /* 0x39004F56: mov bl, byte ptr [edx + 0x39] */
  14309     /* test LO8(ebx), LO8(ebx) */ /* 0x39004F59: test bl, bl */
  14310     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14311     _cf = 0;
  14312     _flag_k = FK_NARROW(FK_TEST, 24);
  14313     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004F75; /* 0x39004F5B: jne 0x39004f75 */
  14314 L_39004F5D:
  14315     eax = MEM32(edx); /* 0x39004F5D: mov eax, dword ptr [edx] */
  14316     SET_LO8(ebx, MEM8(eax + 0x39)); /* 0x39004F5F: mov bl, byte ptr [eax + 0x39] */
  14317     /* test LO8(ebx), LO8(ebx) */ /* 0x39004F62: test bl, bl */
  14318     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14319     _cf = 0;
  14320     _flag_k = FK_NARROW(FK_TEST, 24);
  14321     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004F71; /* 0x39004F64: jne 0x39004f71 */
  14322 L_39004F66:
  14323     edx = eax; /* 0x39004F66: mov edx, eax */
  14324     eax = MEM32(edx); /* 0x39004F68: mov eax, dword ptr [edx] */
  14325     SET_LO8(ebx, MEM8(eax + 0x39)); /* 0x39004F6A: mov bl, byte ptr [eax + 0x39] */
  14326     /* test LO8(ebx), LO8(ebx) */ /* 0x39004F6D: test bl, bl */
  14327     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14328     _cf = 0;
  14329     _flag_k = FK_NARROW(FK_TEST, 24);
  14330     RECOMP_BACKEDGE();
  14331     if (TEST_Z(_flag_a, _flag_b)) goto L_39004F66; /* 0x39004F6F: je 0x39004f66 */
  14332 L_39004F71:
  14333     MEM32(ecx) = edx; /* 0x39004F71: mov dword ptr [ecx], edx */
  14334     ebx = POP32_VAL(esp); /* 0x39004F73: pop ebx */
  14335     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39004F74: ret  */
  14336 L_39004F75:
  14337     eax = MEM32(eax + 0x4); /* 0x39004F75: mov eax, dword ptr [eax + 4] */
  14338     edx = MEM32(ecx); /* 0x39004F78: mov edx, dword ptr [ecx] */
  14339     /* cmp edx, MEM32(eax + 0x8) */ /* 0x39004F7A: cmp edx, dword ptr [eax + 8] */
  14340     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(eax + 0x8));
  14341     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14342     _flag_k = FK_CMP;
  14343     if (CMP_NE(_flag_a, _flag_b)) goto L_39004F8B; /* 0x39004F7D: jne 0x39004f8b */
  14344 L_39004F7F:
  14345     MEM32(ecx) = eax; /* 0x39004F7F: mov dword ptr [ecx], eax */
  14346     eax = MEM32(eax + 0x4); /* 0x39004F81: mov eax, dword ptr [eax + 4] */
  14347     edx = MEM32(ecx); /* 0x39004F84: mov edx, dword ptr [ecx] */
  14348     /* cmp edx, MEM32(eax + 0x8) */ /* 0x39004F86: cmp edx, dword ptr [eax + 8] */
  14349     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(eax + 0x8));
  14350     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14351     _flag_k = FK_CMP;
  14352     RECOMP_BACKEDGE();
  14353     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004F7F; /* 0x39004F89: je 0x39004f7f */
  14354 L_39004F8B:
  14355     edx = MEM32(ecx); /* 0x39004F8B: mov edx, dword ptr [ecx] */
  14356     /* cmp MEM32(edx + 0x8), eax */ /* 0x39004F8D: cmp dword ptr [edx + 8], eax */
  14357     _flag_a = (uint32_t)(MEM32(edx + 0x8)); _flag_b = (uint32_t)(eax);
  14358     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14359     _flag_k = FK_CMP;
  14360     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004F94; /* 0x39004F90: je 0x39004f94 */
  14361 L_39004F92:
  14362     MEM32(ecx) = eax; /* 0x39004F92: mov dword ptr [ecx], eax */
  14363 L_39004F94:
  14364     ebx = POP32_VAL(esp); /* 0x39004F94: pop ebx */
  14365     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39004F95: ret  */
  14366     RECOMP_REGS_OUT();
  14367 }
  14368 
  14369 void sub_39004FA0(void) {
  14370     int _fpu_cmp = 0;
  14371     uint32_t _cf = 0;
  14372     int _df = 1;
  14373     uint32_t _flag_k = FK_NONE;
  14374     uint32_t _flag_a = 0, _flag_b = 0;
  14375     uint32_t _itail_tgt = 0;
  14376     RECOMP_REGS_LOCALS
  14377     RECOMP_ENTER(0x39004FA0u);
  14378 
  14379 L_39004FA0:
  14380     PUSH32(esp, ebp); /* 0x39004FA0: push ebp */
  14381     ebp = esp; /* 0x39004FA1: mov ebp, esp */
  14382     PUSH32(esp, ecx); /* 0x39004FA3: push ecx */
  14383     PUSH32(esp, ebx); /* 0x39004FA4: push ebx */
  14384     PUSH32(esp, esi); /* 0x39004FA5: push esi */
  14385     esi = MEM32(ebp + 0xC); /* 0x39004FA6: mov esi, dword ptr [ebp + 0xc] */
  14386     PUSH32(esp, edi); /* 0x39004FA9: push edi */
  14387     edi = ecx; /* 0x39004FAA: mov edi, ecx */
  14388     ecx = ebp + 0xC; /* 0x39004FAC: lea ecx, [ebp + 0xc] */
  14389     RECOMP_ICALL(0x39005360u); /* 0x39004FAF: call 0x39005360 */ /* not lifted */
  14390     RECOMP_FLAGS_IN();
  14391     edx = MEM32(esi); /* 0x39004FB4: mov edx, dword ptr [esi] */
  14392     eax = MEM32(edi + 0x8); /* 0x39004FB6: mov eax, dword ptr [edi + 8] */
  14393     /* cmp edx, eax */ /* 0x39004FB9: cmp edx, eax */
  14394     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
  14395     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14396     _flag_k = FK_CMP;
  14397     MEM32(ebp + (-0x4)) = esi; /* 0x39004FBB: mov dword ptr [ebp - 4], esi */
  14398     if (CMP_NE(_flag_a, _flag_b)) goto L_39004FE0; /* 0x39004FBE: jne 0x39004fe0 */
  14399 L_39004FC0:
  14400     eax = MEM32(esi + 0x8); /* 0x39004FC0: mov eax, dword ptr [esi + 8] */
  14401 L_39004FC3:
  14402     ecx = MEM32(ebp + (-0x4)); /* 0x39004FC3: mov ecx, dword ptr [ebp - 4] */
  14403     edx = MEM32(ecx + 0x4); /* 0x39004FC6: mov edx, dword ptr [ecx + 4] */
  14404     MEM32(eax + 0x4) = edx; /* 0x39004FC9: mov dword ptr [eax + 4], edx */
  14405     ecx = MEM32(edi + 0x4); /* 0x39004FCC: mov ecx, dword ptr [edi + 4] */
  14406     /* cmp MEM32(ecx + 0x4), esi */ /* 0x39004FCF: cmp dword ptr [ecx + 4], esi */
  14407     _flag_a = (uint32_t)(MEM32(ecx + 0x4)); _flag_b = (uint32_t)(esi);
  14408     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14409     _flag_k = FK_CMP;
  14410     if (CMP_NE(_flag_a, _flag_b)) goto L_39005065; /* 0x39004FD2: jne 0x39005065 */
  14411 L_39004FD8:
  14412     MEM32(ecx + 0x4) = eax; /* 0x39004FD8: mov dword ptr [ecx + 4], eax */
  14413     goto L_39005073; /* 0x39004FDB: jmp 0x39005073 */
  14414 L_39004FE0:
  14415     ecx = MEM32(esi + 0x8); /* 0x39004FE0: mov ecx, dword ptr [esi + 8] */
  14416     /* cmp ecx, eax */ /* 0x39004FE3: cmp ecx, eax */
  14417     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
  14418     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14419     _flag_k = FK_CMP;
  14420     if (CMP_NE(_flag_a, _flag_b)) goto L_39004FEB; /* 0x39004FE5: jne 0x39004feb */
  14421 L_39004FE7:
  14422     eax = edx; /* 0x39004FE7: mov eax, edx */
  14423     RECOMP_BACKEDGE();
  14424     goto L_39004FC3; /* 0x39004FE9: jmp 0x39004fc3 */
  14425 L_39004FEB:
  14426     eax = MEM32(ecx); /* 0x39004FEB: mov eax, dword ptr [ecx] */
  14427     SET_LO8(ebx, MEM8(eax + 0x15)); /* 0x39004FED: mov bl, byte ptr [eax + 0x15] */
  14428     /* test LO8(ebx), LO8(ebx) */ /* 0x39004FF0: test bl, bl */
  14429     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14430     _cf = 0;
  14431     _flag_k = FK_NARROW(FK_TEST, 24);
  14432     if (TEST_NZ(_flag_a, _flag_b)) goto L_39004FFF; /* 0x39004FF2: jne 0x39004fff */
  14433 L_39004FF4:
  14434     ecx = eax; /* 0x39004FF4: mov ecx, eax */
  14435     eax = MEM32(ecx); /* 0x39004FF6: mov eax, dword ptr [ecx] */
  14436     SET_LO8(ebx, MEM8(eax + 0x15)); /* 0x39004FF8: mov bl, byte ptr [eax + 0x15] */
  14437     /* test LO8(ebx), LO8(ebx) */ /* 0x39004FFB: test bl, bl */
  14438     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14439     _cf = 0;
  14440     _flag_k = FK_NARROW(FK_TEST, 24);
  14441     RECOMP_BACKEDGE();
  14442     if (TEST_Z(_flag_a, _flag_b)) goto L_39004FF4; /* 0x39004FFD: je 0x39004ff4 */
  14443 L_39004FFF:
  14444     eax = MEM32(ecx + 0x8); /* 0x39004FFF: mov eax, dword ptr [ecx + 8] */
  14445     /* cmp ecx, esi */ /* 0x39005002: cmp ecx, esi */
  14446     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(esi);
  14447     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14448     _flag_k = FK_CMP;
  14449     MEM32(ebp + (-0x4)) = ecx; /* 0x39005004: mov dword ptr [ebp - 4], ecx */
  14450     RECOMP_BACKEDGE();
  14451     if (CMP_EQ(_flag_a, _flag_b)) goto L_39004FC3; /* 0x39005007: je 0x39004fc3 */
  14452 L_39005009:
  14453     MEM32(edx + 0x4) = ecx; /* 0x39005009: mov dword ptr [edx + 4], ecx */
  14454     edx = MEM32(esi); /* 0x3900500C: mov edx, dword ptr [esi] */
  14455     MEM32(ecx) = edx; /* 0x3900500E: mov dword ptr [ecx], edx */
  14456     edx = MEM32(esi + 0x8); /* 0x39005010: mov edx, dword ptr [esi + 8] */
  14457     /* cmp ecx, edx */ /* 0x39005013: cmp ecx, edx */
  14458     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
  14459     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14460     _flag_k = FK_CMP;
  14461     if (CMP_NE(_flag_a, _flag_b)) goto L_3900501C; /* 0x39005015: jne 0x3900501c */
  14462 L_39005017:
  14463     MEM32(eax + 0x4) = ecx; /* 0x39005017: mov dword ptr [eax + 4], ecx */
  14464     goto L_39005033; /* 0x3900501A: jmp 0x39005033 */
  14465 L_3900501C:
  14466     edx = MEM32(ecx + 0x4); /* 0x3900501C: mov edx, dword ptr [ecx + 4] */
  14467     MEM32(eax + 0x4) = edx; /* 0x3900501F: mov dword ptr [eax + 4], edx */
  14468     edx = MEM32(ecx + 0x4); /* 0x39005022: mov edx, dword ptr [ecx + 4] */
  14469     MEM32(edx) = eax; /* 0x39005025: mov dword ptr [edx], eax */
  14470     edx = MEM32(esi + 0x8); /* 0x39005027: mov edx, dword ptr [esi + 8] */
  14471     MEM32(ecx + 0x8) = edx; /* 0x3900502A: mov dword ptr [ecx + 8], edx */
  14472     edx = MEM32(esi + 0x8); /* 0x3900502D: mov edx, dword ptr [esi + 8] */
  14473     MEM32(edx + 0x4) = ecx; /* 0x39005030: mov dword ptr [edx + 4], ecx */
  14474 L_39005033:
  14475     edx = MEM32(edi + 0x4); /* 0x39005033: mov edx, dword ptr [edi + 4] */
  14476     /* cmp MEM32(edx + 0x4), esi */ /* 0x39005036: cmp dword ptr [edx + 4], esi */
  14477     _flag_a = (uint32_t)(MEM32(edx + 0x4)); _flag_b = (uint32_t)(esi);
  14478     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14479     _flag_k = FK_CMP;
  14480     if (CMP_NE(_flag_a, _flag_b)) goto L_39005040; /* 0x39005039: jne 0x39005040 */
  14481 L_3900503B:
  14482     MEM32(edx + 0x4) = ecx; /* 0x3900503B: mov dword ptr [edx + 4], ecx */
  14483     goto L_3900504E; /* 0x3900503E: jmp 0x3900504e */
  14484 L_39005040:
  14485     edx = MEM32(esi + 0x4); /* 0x39005040: mov edx, dword ptr [esi + 4] */
  14486     /* cmp MEM32(edx), esi */ /* 0x39005043: cmp dword ptr [edx], esi */
  14487     _flag_a = (uint32_t)(MEM32(edx)); _flag_b = (uint32_t)(esi);
  14488     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14489     _flag_k = FK_CMP;
  14490     if (CMP_NE(_flag_a, _flag_b)) goto L_3900504B; /* 0x39005045: jne 0x3900504b */
  14491 L_39005047:
  14492     MEM32(edx) = ecx; /* 0x39005047: mov dword ptr [edx], ecx */
  14493     goto L_3900504E; /* 0x39005049: jmp 0x3900504e */
  14494 L_3900504B:
  14495     MEM32(edx + 0x8) = ecx; /* 0x3900504B: mov dword ptr [edx + 8], ecx */
  14496 L_3900504E:
  14497     edx = MEM32(esi + 0x4); /* 0x3900504E: mov edx, dword ptr [esi + 4] */
  14498     MEM32(ebp + (-0x4)) = esi; /* 0x39005051: mov dword ptr [ebp - 4], esi */
  14499     MEM32(ecx + 0x4) = edx; /* 0x39005054: mov dword ptr [ecx + 4], edx */
  14500     SET_LO8(ebx, MEM8(esi + 0x14)); /* 0x39005057: mov bl, byte ptr [esi + 0x14] */
  14501     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x3900505A: mov dl, byte ptr [ecx + 0x14] */
  14502     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900505D: mov byte ptr [ecx + 0x14], bl */
  14503     MEM8(esi + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005060: mov byte ptr [esi + 0x14], dl */
  14504     goto L_390050CE; /* 0x39005063: jmp 0x390050ce */
  14505 L_39005065:
  14506     ecx = MEM32(esi + 0x4); /* 0x39005065: mov ecx, dword ptr [esi + 4] */
  14507     /* cmp MEM32(ecx), esi */ /* 0x39005068: cmp dword ptr [ecx], esi */
  14508     _flag_a = (uint32_t)(MEM32(ecx)); _flag_b = (uint32_t)(esi);
  14509     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14510     _flag_k = FK_CMP;
  14511     if (CMP_NE(_flag_a, _flag_b)) goto L_39005070; /* 0x3900506A: jne 0x39005070 */
  14512 L_3900506C:
  14513     MEM32(ecx) = eax; /* 0x3900506C: mov dword ptr [ecx], eax */
  14514     goto L_39005073; /* 0x3900506E: jmp 0x39005073 */
  14515 L_39005070:
  14516     MEM32(ecx + 0x8) = eax; /* 0x39005070: mov dword ptr [ecx + 8], eax */
  14517 L_39005073:
  14518     ebx = MEM32(edi + 0x4); /* 0x39005073: mov ebx, dword ptr [edi + 4] */
  14519     /* cmp MEM32(ebx), esi */ /* 0x39005076: cmp dword ptr [ebx], esi */
  14520     _flag_a = (uint32_t)(MEM32(ebx)); _flag_b = (uint32_t)(esi);
  14521     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14522     _flag_k = FK_CMP;
  14523     if (CMP_NE(_flag_a, _flag_b)) goto L_3900509F; /* 0x39005078: jne 0x3900509f */
  14524 L_3900507A:
  14525     ecx = MEM32(esi + 0x8); /* 0x3900507A: mov ecx, dword ptr [esi + 8] */
  14526     edx = MEM32(edi + 0x8); /* 0x3900507D: mov edx, dword ptr [edi + 8] */
  14527     /* cmp ecx, edx */ /* 0x39005080: cmp ecx, edx */
  14528     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
  14529     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14530     _flag_k = FK_CMP;
  14531     if (CMP_NE(_flag_a, _flag_b)) goto L_39005089; /* 0x39005082: jne 0x39005089 */
  14532 L_39005084:
  14533     edx = MEM32(esi + 0x4); /* 0x39005084: mov edx, dword ptr [esi + 4] */
  14534     goto L_3900509D; /* 0x39005087: jmp 0x3900509d */
  14535 L_39005089:
  14536     ecx = MEM32(eax); /* 0x39005089: mov ecx, dword ptr [eax] */
  14537     edx = eax; /* 0x3900508B: mov edx, eax */
  14538     /* cmp MEM8(ecx + 0x15), 0 */ /* 0x3900508D: cmp byte ptr [ecx + 0x15], 0 */
  14539     _flag_a = (uint32_t)(MEM8(ecx + 0x15)) << 24; _flag_b = (uint32_t)(0) << 24;
  14540     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14541     _flag_k = FK_NARROW(FK_CMP, 24);
  14542     if (CMP_NE(_flag_a, _flag_b)) goto L_3900509D; /* 0x39005091: jne 0x3900509d */
  14543 L_39005093:
  14544     edx = ecx; /* 0x39005093: mov edx, ecx */
  14545     ecx = MEM32(edx); /* 0x39005095: mov ecx, dword ptr [edx] */
  14546     /* cmp MEM8(ecx + 0x15), 0 */ /* 0x39005097: cmp byte ptr [ecx + 0x15], 0 */
  14547     _flag_a = (uint32_t)(MEM8(ecx + 0x15)) << 24; _flag_b = (uint32_t)(0) << 24;
  14548     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14549     _flag_k = FK_NARROW(FK_CMP, 24);
  14550     RECOMP_BACKEDGE();
  14551     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005093; /* 0x3900509B: je 0x39005093 */
  14552 L_3900509D:
  14553     MEM32(ebx) = edx; /* 0x3900509D: mov dword ptr [ebx], edx */
  14554 L_3900509F:
  14555     ebx = MEM32(edi + 0x4); /* 0x3900509F: mov ebx, dword ptr [edi + 4] */
  14556     /* cmp MEM32(ebx + 0x8), esi */ /* 0x390050A2: cmp dword ptr [ebx + 8], esi */
  14557     _flag_a = (uint32_t)(MEM32(ebx + 0x8)); _flag_b = (uint32_t)(esi);
  14558     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14559     _flag_k = FK_CMP;
  14560     if (CMP_NE(_flag_a, _flag_b)) goto L_390050CE; /* 0x390050A5: jne 0x390050ce */
  14561 L_390050A7:
  14562     ecx = MEM32(esi); /* 0x390050A7: mov ecx, dword ptr [esi] */
  14563     edx = MEM32(edi + 0x8); /* 0x390050A9: mov edx, dword ptr [edi + 8] */
  14564     /* cmp ecx, edx */ /* 0x390050AC: cmp ecx, edx */
  14565     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
  14566     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14567     _flag_k = FK_CMP;
  14568     if (CMP_NE(_flag_a, _flag_b)) goto L_390050B5; /* 0x390050AE: jne 0x390050b5 */
  14569 L_390050B0:
  14570     edx = MEM32(esi + 0x4); /* 0x390050B0: mov edx, dword ptr [esi + 4] */
  14571     goto L_390050CB; /* 0x390050B3: jmp 0x390050cb */
  14572 L_390050B5:
  14573     ecx = MEM32(eax + 0x8); /* 0x390050B5: mov ecx, dword ptr [eax + 8] */
  14574     edx = eax; /* 0x390050B8: mov edx, eax */
  14575     /* cmp MEM8(ecx + 0x15), 0 */ /* 0x390050BA: cmp byte ptr [ecx + 0x15], 0 */
  14576     _flag_a = (uint32_t)(MEM8(ecx + 0x15)) << 24; _flag_b = (uint32_t)(0) << 24;
  14577     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14578     _flag_k = FK_NARROW(FK_CMP, 24);
  14579     if (CMP_NE(_flag_a, _flag_b)) goto L_390050CB; /* 0x390050BE: jne 0x390050cb */
  14580 L_390050C0:
  14581     edx = ecx; /* 0x390050C0: mov edx, ecx */
  14582     ecx = MEM32(edx + 0x8); /* 0x390050C2: mov ecx, dword ptr [edx + 8] */
  14583     /* cmp MEM8(ecx + 0x15), 0 */ /* 0x390050C5: cmp byte ptr [ecx + 0x15], 0 */
  14584     _flag_a = (uint32_t)(MEM8(ecx + 0x15)) << 24; _flag_b = (uint32_t)(0) << 24;
  14585     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14586     _flag_k = FK_NARROW(FK_CMP, 24);
  14587     RECOMP_BACKEDGE();
  14588     if (CMP_EQ(_flag_a, _flag_b)) goto L_390050C0; /* 0x390050C9: je 0x390050c0 */
  14589 L_390050CB:
  14590     MEM32(ebx + 0x8) = edx; /* 0x390050CB: mov dword ptr [ebx + 8], edx */
  14591 L_390050CE:
  14592     ecx = MEM32(ebp + (-0x4)); /* 0x390050CE: mov ecx, dword ptr [ebp - 4] */
  14593     SET_LO8(ebx, 1); /* 0x390050D1: mov bl, 1 */
  14594     /* cmp MEM8(ecx + 0x14), LO8(ebx) */ /* 0x390050D3: cmp byte ptr [ecx + 0x14], bl */
  14595     _flag_a = (uint32_t)(MEM8(ecx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14596     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14597     _flag_k = FK_NARROW(FK_CMP, 24);
  14598     if (CMP_NE(_flag_a, _flag_b)) goto L_39005339; /* 0x390050D6: jne 0x39005339 */
  14599 L_390050DC:
  14600     edx = MEM32(edi + 0x4); /* 0x390050DC: mov edx, dword ptr [edi + 4] */
  14601     /* cmp eax, MEM32(edx + 0x4) */ /* 0x390050DF: cmp eax, dword ptr [edx + 4] */
  14602     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4));
  14603     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14604     _flag_k = FK_CMP;
  14605     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005336; /* 0x390050E2: je 0x39005336 */
  14606 L_390050E8:
  14607     /* cmp MEM8(eax + 0x14), LO8(ebx) */ /* 0x390050E8: cmp byte ptr [eax + 0x14], bl */
  14608     _flag_a = (uint32_t)(MEM8(eax + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14609     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14610     _flag_k = FK_NARROW(FK_CMP, 24);
  14611     if (CMP_NE(_flag_a, _flag_b)) goto L_39005336; /* 0x390050EB: jne 0x39005336 */
  14612 L_390050F1:
  14613     edx = MEM32(eax + 0x4); /* 0x390050F1: mov edx, dword ptr [eax + 4] */
  14614     ecx = MEM32(edx); /* 0x390050F4: mov ecx, dword ptr [edx] */
  14615     /* cmp eax, ecx */ /* 0x390050F6: cmp eax, ecx */
  14616     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  14617     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14618     _flag_k = FK_CMP;
  14619     if (CMP_NE(_flag_a, _flag_b)) goto L_39005168; /* 0x390050F8: jne 0x39005168 */
  14620 L_390050FA:
  14621     ecx = MEM32(edx + 0x8); /* 0x390050FA: mov ecx, dword ptr [edx + 8] */
  14622     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390050FD: mov dl, byte ptr [ecx + 0x14] */
  14623     /* test LO8(edx), LO8(edx) */ /* 0x39005100: test dl, dl */
  14624     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  14625     _cf = 0;
  14626     _flag_k = FK_NARROW(FK_TEST, 24);
  14627     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900514F; /* 0x39005102: jne 0x3900514f */
  14628 L_39005104:
  14629     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005104: mov byte ptr [ecx + 0x14], bl */
  14630     ecx = MEM32(eax + 0x4); /* 0x39005107: mov ecx, dword ptr [eax + 4] */
  14631     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900510A: mov byte ptr [ecx + 0x14], 0 */
  14632     ecx = MEM32(eax + 0x4); /* 0x3900510E: mov ecx, dword ptr [eax + 4] */
  14633     edx = MEM32(ecx + 0x8); /* 0x39005111: mov edx, dword ptr [ecx + 8] */
  14634     esi = MEM32(edx); /* 0x39005114: mov esi, dword ptr [edx] */
  14635     MEM32(ecx + 0x8) = esi; /* 0x39005116: mov dword ptr [ecx + 8], esi */
  14636     esi = MEM32(edx); /* 0x39005119: mov esi, dword ptr [edx] */
  14637     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900511B: cmp esi, dword ptr [edi + 8] */
  14638     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  14639     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14640     _flag_k = FK_CMP;
  14641     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005123; /* 0x3900511E: je 0x39005123 */
  14642 L_39005120:
  14643     MEM32(esi + 0x4) = ecx; /* 0x39005120: mov dword ptr [esi + 4], ecx */
  14644 L_39005123:
  14645     esi = MEM32(ecx + 0x4); /* 0x39005123: mov esi, dword ptr [ecx + 4] */
  14646     MEM32(edx + 0x4) = esi; /* 0x39005126: mov dword ptr [edx + 4], esi */
  14647     esi = MEM32(edi + 0x4); /* 0x39005129: mov esi, dword ptr [edi + 4] */
  14648     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900512C: cmp ecx, dword ptr [esi + 4] */
  14649     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  14650     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14651     _flag_k = FK_CMP;
  14652     if (CMP_NE(_flag_a, _flag_b)) goto L_39005136; /* 0x3900512F: jne 0x39005136 */
  14653 L_39005131:
  14654     MEM32(esi + 0x4) = edx; /* 0x39005131: mov dword ptr [esi + 4], edx */
  14655     goto L_39005144; /* 0x39005134: jmp 0x39005144 */
  14656 L_39005136:
  14657     esi = MEM32(ecx + 0x4); /* 0x39005136: mov esi, dword ptr [ecx + 4] */
  14658     /* cmp ecx, MEM32(esi) */ /* 0x39005139: cmp ecx, dword ptr [esi] */
  14659     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  14660     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14661     _flag_k = FK_CMP;
  14662     if (CMP_NE(_flag_a, _flag_b)) goto L_39005141; /* 0x3900513B: jne 0x39005141 */
  14663 L_3900513D:
  14664     MEM32(esi) = edx; /* 0x3900513D: mov dword ptr [esi], edx */
  14665     goto L_39005144; /* 0x3900513F: jmp 0x39005144 */
  14666 L_39005141:
  14667     MEM32(esi + 0x8) = edx; /* 0x39005141: mov dword ptr [esi + 8], edx */
  14668 L_39005144:
  14669     MEM32(edx) = ecx; /* 0x39005144: mov dword ptr [edx], ecx */
  14670     MEM32(ecx + 0x4) = edx; /* 0x39005146: mov dword ptr [ecx + 4], edx */
  14671     edx = MEM32(eax + 0x4); /* 0x39005149: mov edx, dword ptr [eax + 4] */
  14672     ecx = MEM32(edx + 0x8); /* 0x3900514C: mov ecx, dword ptr [edx + 8] */
  14673 L_3900514F:
  14674     edx = MEM32(ecx); /* 0x3900514F: mov edx, dword ptr [ecx] */
  14675     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005151: cmp byte ptr [edx + 0x14], bl */
  14676     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14677     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14678     _flag_k = FK_NARROW(FK_CMP, 24);
  14679     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005154: jne 0x390051ea */
  14680 L_3900515A:
  14681     edx = MEM32(ecx + 0x8); /* 0x3900515A: mov edx, dword ptr [ecx + 8] */
  14682     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x3900515D: cmp byte ptr [edx + 0x14], bl */
  14683     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14684     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14685     _flag_k = FK_NARROW(FK_CMP, 24);
  14686     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005160: jne 0x390051ea */
  14687 L_39005166:
  14688     goto L_390051D2; /* 0x39005166: jmp 0x390051d2 */
  14689 L_39005168:
  14690     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x39005168: mov dl, byte ptr [ecx + 0x14] */
  14691     /* test LO8(edx), LO8(edx) */ /* 0x3900516B: test dl, dl */
  14692     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  14693     _cf = 0;
  14694     _flag_k = FK_NARROW(FK_TEST, 24);
  14695     if (TEST_NZ(_flag_a, _flag_b)) goto L_390051BB; /* 0x3900516D: jne 0x390051bb */
  14696 L_3900516F:
  14697     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900516F: mov byte ptr [ecx + 0x14], bl */
  14698     ecx = MEM32(eax + 0x4); /* 0x39005172: mov ecx, dword ptr [eax + 4] */
  14699     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005175: mov byte ptr [ecx + 0x14], 0 */
  14700     ecx = MEM32(eax + 0x4); /* 0x39005179: mov ecx, dword ptr [eax + 4] */
  14701     edx = MEM32(ecx); /* 0x3900517C: mov edx, dword ptr [ecx] */
  14702     esi = MEM32(edx + 0x8); /* 0x3900517E: mov esi, dword ptr [edx + 8] */
  14703     MEM32(ecx) = esi; /* 0x39005181: mov dword ptr [ecx], esi */
  14704     esi = MEM32(edx + 0x8); /* 0x39005183: mov esi, dword ptr [edx + 8] */
  14705     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005186: cmp esi, dword ptr [edi + 8] */
  14706     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  14707     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14708     _flag_k = FK_CMP;
  14709     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900518E; /* 0x39005189: je 0x3900518e */
  14710 L_3900518B:
  14711     MEM32(esi + 0x4) = ecx; /* 0x3900518B: mov dword ptr [esi + 4], ecx */
  14712 L_3900518E:
  14713     esi = MEM32(ecx + 0x4); /* 0x3900518E: mov esi, dword ptr [ecx + 4] */
  14714     MEM32(edx + 0x4) = esi; /* 0x39005191: mov dword ptr [edx + 4], esi */
  14715     esi = MEM32(edi + 0x4); /* 0x39005194: mov esi, dword ptr [edi + 4] */
  14716     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005197: cmp ecx, dword ptr [esi + 4] */
  14717     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  14718     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14719     _flag_k = FK_CMP;
  14720     if (CMP_NE(_flag_a, _flag_b)) goto L_390051A1; /* 0x3900519A: jne 0x390051a1 */
  14721 L_3900519C:
  14722     MEM32(esi + 0x4) = edx; /* 0x3900519C: mov dword ptr [esi + 4], edx */
  14723     goto L_390051B0; /* 0x3900519F: jmp 0x390051b0 */
  14724 L_390051A1:
  14725     esi = MEM32(ecx + 0x4); /* 0x390051A1: mov esi, dword ptr [ecx + 4] */
  14726     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x390051A4: cmp ecx, dword ptr [esi + 8] */
  14727     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  14728     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14729     _flag_k = FK_CMP;
  14730     if (CMP_NE(_flag_a, _flag_b)) goto L_390051AE; /* 0x390051A7: jne 0x390051ae */
  14731 L_390051A9:
  14732     MEM32(esi + 0x8) = edx; /* 0x390051A9: mov dword ptr [esi + 8], edx */
  14733     goto L_390051B0; /* 0x390051AC: jmp 0x390051b0 */
  14734 L_390051AE:
  14735     MEM32(esi) = edx; /* 0x390051AE: mov dword ptr [esi], edx */
  14736 L_390051B0:
  14737     MEM32(edx + 0x8) = ecx; /* 0x390051B0: mov dword ptr [edx + 8], ecx */
  14738     MEM32(ecx + 0x4) = edx; /* 0x390051B3: mov dword ptr [ecx + 4], edx */
  14739     edx = MEM32(eax + 0x4); /* 0x390051B6: mov edx, dword ptr [eax + 4] */
  14740     ecx = MEM32(edx); /* 0x390051B9: mov ecx, dword ptr [edx] */
  14741 L_390051BB:
  14742     edx = MEM32(ecx + 0x8); /* 0x390051BB: mov edx, dword ptr [ecx + 8] */
  14743     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051BE: cmp byte ptr [edx + 0x14], bl */
  14744     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14745     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14746     _flag_k = FK_NARROW(FK_CMP, 24);
  14747     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051C1: jne 0x39005297 */
  14748 L_390051C7:
  14749     edx = MEM32(ecx); /* 0x390051C7: mov edx, dword ptr [ecx] */
  14750     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051C9: cmp byte ptr [edx + 0x14], bl */
  14751     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14752     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14753     _flag_k = FK_NARROW(FK_CMP, 24);
  14754     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051CC: jne 0x39005297 */
  14755 L_390051D2:
  14756     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051D2: mov byte ptr [ecx + 0x14], 0 */
  14757     ecx = MEM32(edi + 0x4); /* 0x390051D6: mov ecx, dword ptr [edi + 4] */
  14758     eax = MEM32(eax + 0x4); /* 0x390051D9: mov eax, dword ptr [eax + 4] */
  14759     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x390051DC: cmp eax, dword ptr [ecx + 4] */
  14760     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  14761     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14762     _flag_k = FK_CMP;
  14763     RECOMP_BACKEDGE();
  14764     if (CMP_NE(_flag_a, _flag_b)) goto L_390050E8; /* 0x390051DF: jne 0x390050e8 */
  14765 L_390051E5:
  14766     goto L_39005336; /* 0x390051E5: jmp 0x39005336 */
  14767 L_390051EA:
  14768     edx = MEM32(ecx + 0x8); /* 0x390051EA: mov edx, dword ptr [ecx + 8] */
  14769     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051ED: cmp byte ptr [edx + 0x14], bl */
  14770     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14771     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14772     _flag_k = FK_NARROW(FK_CMP, 24);
  14773     if (CMP_NE(_flag_a, _flag_b)) goto L_3900523B; /* 0x390051F0: jne 0x3900523b */
  14774 L_390051F2:
  14775     edx = MEM32(ecx); /* 0x390051F2: mov edx, dword ptr [ecx] */
  14776     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390051F4: mov byte ptr [edx + 0x14], bl */
  14777     edx = MEM32(ecx); /* 0x390051F7: mov edx, dword ptr [ecx] */
  14778     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051F9: mov byte ptr [ecx + 0x14], 0 */
  14779     esi = MEM32(edx + 0x8); /* 0x390051FD: mov esi, dword ptr [edx + 8] */
  14780     MEM32(ecx) = esi; /* 0x39005200: mov dword ptr [ecx], esi */
  14781     esi = MEM32(edx + 0x8); /* 0x39005202: mov esi, dword ptr [edx + 8] */
  14782     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005205: cmp esi, dword ptr [edi + 8] */
  14783     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  14784     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14785     _flag_k = FK_CMP;
  14786     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900520D; /* 0x39005208: je 0x3900520d */
  14787 L_3900520A:
  14788     MEM32(esi + 0x4) = ecx; /* 0x3900520A: mov dword ptr [esi + 4], ecx */
  14789 L_3900520D:
  14790     esi = MEM32(ecx + 0x4); /* 0x3900520D: mov esi, dword ptr [ecx + 4] */
  14791     MEM32(edx + 0x4) = esi; /* 0x39005210: mov dword ptr [edx + 4], esi */
  14792     esi = MEM32(edi + 0x4); /* 0x39005213: mov esi, dword ptr [edi + 4] */
  14793     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005216: cmp ecx, dword ptr [esi + 4] */
  14794     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  14795     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14796     _flag_k = FK_CMP;
  14797     if (CMP_NE(_flag_a, _flag_b)) goto L_39005220; /* 0x39005219: jne 0x39005220 */
  14798 L_3900521B:
  14799     MEM32(esi + 0x4) = edx; /* 0x3900521B: mov dword ptr [esi + 4], edx */
  14800     goto L_3900522F; /* 0x3900521E: jmp 0x3900522f */
  14801 L_39005220:
  14802     esi = MEM32(ecx + 0x4); /* 0x39005220: mov esi, dword ptr [ecx + 4] */
  14803     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005223: cmp ecx, dword ptr [esi + 8] */
  14804     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  14805     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14806     _flag_k = FK_CMP;
  14807     if (CMP_NE(_flag_a, _flag_b)) goto L_3900522D; /* 0x39005226: jne 0x3900522d */
  14808 L_39005228:
  14809     MEM32(esi + 0x8) = edx; /* 0x39005228: mov dword ptr [esi + 8], edx */
  14810     goto L_3900522F; /* 0x3900522B: jmp 0x3900522f */
  14811 L_3900522D:
  14812     MEM32(esi) = edx; /* 0x3900522D: mov dword ptr [esi], edx */
  14813 L_3900522F:
  14814     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  14815     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  14816     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  14817     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  14818 L_3900523B:
  14819     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  14820     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  14821     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  14822     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  14823     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  14824     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  14825     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  14826     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  14827     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  14828     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  14829     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  14830     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  14831     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  14832     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  14833     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14834     _flag_k = FK_CMP;
  14835     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  14836 L_39005262:
  14837     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  14838 L_39005265:
  14839     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  14840     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  14841     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  14842     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  14843     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  14844     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14845     _flag_k = FK_CMP;
  14846     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  14847 L_39005273:
  14848     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  14849     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  14850     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  14851 L_3900527D:
  14852     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  14853     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  14854     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  14855     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14856     _flag_k = FK_CMP;
  14857     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  14858 L_39005284:
  14859     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  14860     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  14861     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  14862 L_3900528D:
  14863     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  14864     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  14865     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  14866 L_39005297:
  14867     edx = MEM32(ecx); /* 0x39005297: mov edx, dword ptr [ecx] */
  14868     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005299: cmp byte ptr [edx + 0x14], bl */
  14869     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  14870     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14871     _flag_k = FK_NARROW(FK_CMP, 24);
  14872     if (CMP_NE(_flag_a, _flag_b)) goto L_390052E5; /* 0x3900529C: jne 0x390052e5 */
  14873 L_3900529E:
  14874     edx = MEM32(ecx + 0x8); /* 0x3900529E: mov edx, dword ptr [ecx + 8] */
  14875     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052A1: mov byte ptr [edx + 0x14], bl */
  14876     edx = MEM32(ecx + 0x8); /* 0x390052A4: mov edx, dword ptr [ecx + 8] */
  14877     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390052A7: mov byte ptr [ecx + 0x14], 0 */
  14878     esi = MEM32(edx); /* 0x390052AB: mov esi, dword ptr [edx] */
  14879     MEM32(ecx + 0x8) = esi; /* 0x390052AD: mov dword ptr [ecx + 8], esi */
  14880     esi = MEM32(edx); /* 0x390052B0: mov esi, dword ptr [edx] */
  14881     /* cmp esi, MEM32(edi + 0x8) */ /* 0x390052B2: cmp esi, dword ptr [edi + 8] */
  14882     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  14883     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14884     _flag_k = FK_CMP;
  14885     if (CMP_EQ(_flag_a, _flag_b)) goto L_390052BA; /* 0x390052B5: je 0x390052ba */
  14886 L_390052B7:
  14887     MEM32(esi + 0x4) = ecx; /* 0x390052B7: mov dword ptr [esi + 4], ecx */
  14888 L_390052BA:
  14889     esi = MEM32(ecx + 0x4); /* 0x390052BA: mov esi, dword ptr [ecx + 4] */
  14890     MEM32(edx + 0x4) = esi; /* 0x390052BD: mov dword ptr [edx + 4], esi */
  14891     esi = MEM32(edi + 0x4); /* 0x390052C0: mov esi, dword ptr [edi + 4] */
  14892     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x390052C3: cmp ecx, dword ptr [esi + 4] */
  14893     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  14894     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14895     _flag_k = FK_CMP;
  14896     if (CMP_NE(_flag_a, _flag_b)) goto L_390052CD; /* 0x390052C6: jne 0x390052cd */
  14897 L_390052C8:
  14898     MEM32(esi + 0x4) = edx; /* 0x390052C8: mov dword ptr [esi + 4], edx */
  14899     goto L_390052DB; /* 0x390052CB: jmp 0x390052db */
  14900 L_390052CD:
  14901     esi = MEM32(ecx + 0x4); /* 0x390052CD: mov esi, dword ptr [ecx + 4] */
  14902     /* cmp ecx, MEM32(esi) */ /* 0x390052D0: cmp ecx, dword ptr [esi] */
  14903     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  14904     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14905     _flag_k = FK_CMP;
  14906     if (CMP_NE(_flag_a, _flag_b)) goto L_390052D8; /* 0x390052D2: jne 0x390052d8 */
  14907 L_390052D4:
  14908     MEM32(esi) = edx; /* 0x390052D4: mov dword ptr [esi], edx */
  14909     goto L_390052DB; /* 0x390052D6: jmp 0x390052db */
  14910 L_390052D8:
  14911     MEM32(esi + 0x8) = edx; /* 0x390052D8: mov dword ptr [esi + 8], edx */
  14912 L_390052DB:
  14913     MEM32(edx) = ecx; /* 0x390052DB: mov dword ptr [edx], ecx */
  14914     MEM32(ecx + 0x4) = edx; /* 0x390052DD: mov dword ptr [ecx + 4], edx */
  14915     ecx = MEM32(eax + 0x4); /* 0x390052E0: mov ecx, dword ptr [eax + 4] */
  14916     ecx = MEM32(ecx); /* 0x390052E3: mov ecx, dword ptr [ecx] */
  14917 L_390052E5:
  14918     edx = MEM32(eax + 0x4); /* 0x390052E5: mov edx, dword ptr [eax + 4] */
  14919     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x390052E8: mov dl, byte ptr [edx + 0x14] */
  14920     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x390052EB: mov byte ptr [ecx + 0x14], dl */
  14921     edx = MEM32(eax + 0x4); /* 0x390052EE: mov edx, dword ptr [eax + 4] */
  14922     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F1: mov byte ptr [edx + 0x14], bl */
  14923     ecx = MEM32(ecx); /* 0x390052F4: mov ecx, dword ptr [ecx] */
  14924     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F6: mov byte ptr [ecx + 0x14], bl */
  14925     ecx = MEM32(eax + 0x4); /* 0x390052F9: mov ecx, dword ptr [eax + 4] */
  14926     edx = MEM32(ecx); /* 0x390052FC: mov edx, dword ptr [ecx] */
  14927     esi = MEM32(edx + 0x8); /* 0x390052FE: mov esi, dword ptr [edx + 8] */
  14928     MEM32(ecx) = esi; /* 0x39005301: mov dword ptr [ecx], esi */
  14929     esi = MEM32(edx + 0x8); /* 0x39005303: mov esi, dword ptr [edx + 8] */
  14930     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005306: cmp esi, dword ptr [edi + 8] */
  14931     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  14932     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14933     _flag_k = FK_CMP;
  14934     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900530E; /* 0x39005309: je 0x3900530e */
  14935 L_3900530B:
  14936     MEM32(esi + 0x4) = ecx; /* 0x3900530B: mov dword ptr [esi + 4], ecx */
  14937 L_3900530E:
  14938     esi = MEM32(ecx + 0x4); /* 0x3900530E: mov esi, dword ptr [ecx + 4] */
  14939     MEM32(edx + 0x4) = esi; /* 0x39005311: mov dword ptr [edx + 4], esi */
  14940     esi = MEM32(edi + 0x4); /* 0x39005314: mov esi, dword ptr [edi + 4] */
  14941     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005317: cmp ecx, dword ptr [esi + 4] */
  14942     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  14943     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14944     _flag_k = FK_CMP;
  14945     if (CMP_NE(_flag_a, _flag_b)) goto L_39005321; /* 0x3900531A: jne 0x39005321 */
  14946 L_3900531C:
  14947     MEM32(esi + 0x4) = edx; /* 0x3900531C: mov dword ptr [esi + 4], edx */
  14948     goto L_39005330; /* 0x3900531F: jmp 0x39005330 */
  14949 L_39005321:
  14950     esi = MEM32(ecx + 0x4); /* 0x39005321: mov esi, dword ptr [ecx + 4] */
  14951     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005324: cmp ecx, dword ptr [esi + 8] */
  14952     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  14953     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  14954     _flag_k = FK_CMP;
  14955     if (CMP_NE(_flag_a, _flag_b)) goto L_3900532E; /* 0x39005327: jne 0x3900532e */
  14956 L_39005329:
  14957     MEM32(esi + 0x8) = edx; /* 0x39005329: mov dword ptr [esi + 8], edx */
  14958     goto L_39005330; /* 0x3900532C: jmp 0x39005330 */
  14959 L_3900532E:
  14960     MEM32(esi) = edx; /* 0x3900532E: mov dword ptr [esi], edx */
  14961 L_39005330:
  14962     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  14963 L_39005333:
  14964     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  14965 L_39005336:
  14966     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  14967 L_39005339:
  14968     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  14969     PUSH32(esp, edx); /* 0x3900533C: push edx */
  14970     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  14971     RECOMP_FLAGS_IN();
  14972     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  14973     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  14974     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  14975     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  14976     esp = esp + 4; /* 0x39005348: add esp, 4 */
  14977     _flag_k = FK_ADD;
  14978     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  14979     eax = eax - 1; /* 0x3900534B: dec eax */
  14980     _flag_k = FK_DEC;
  14981     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  14982     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  14983     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  14984     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  14985     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  14986     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  14987     esp = ebp; /* 0x39005357: mov esp, ebp */
  14988     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  14989     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  14990     RECOMP_REGS_OUT();
  14991 }
  14992 
  14993 void sub_39005073(void) {
  14994     int _fpu_cmp = 0;
  14995     uint32_t _cf = 0;
  14996     int _df = 1;
  14997     uint32_t _flag_k = FK_NONE;
  14998     uint32_t _flag_a = 0, _flag_b = 0;
  14999     uint32_t _itail_tgt = 0;
  15000     RECOMP_REGS_LOCALS
  15001     RECOMP_ENTER(0x39005073u);
  15002 
  15003 L_39005073:
  15004     ebx = MEM32(edi + 0x4); /* 0x39005073: mov ebx, dword ptr [edi + 4] */
  15005     /* cmp MEM32(ebx), esi */ /* 0x39005076: cmp dword ptr [ebx], esi */
  15006     _flag_a = (uint32_t)(MEM32(ebx)); _flag_b = (uint32_t)(esi);
  15007     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15008     _flag_k = FK_CMP;
  15009     if (CMP_NE(_flag_a, _flag_b)) goto L_3900509F; /* 0x39005078: jne 0x3900509f */
  15010 L_3900507A:
  15011     ecx = MEM32(esi + 0x8); /* 0x3900507A: mov ecx, dword ptr [esi + 8] */
  15012     edx = MEM32(edi + 0x8); /* 0x3900507D: mov edx, dword ptr [edi + 8] */
  15013     /* cmp ecx, edx */ /* 0x39005080: cmp ecx, edx */
  15014     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
  15015     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15016     _flag_k = FK_CMP;
  15017     if (CMP_NE(_flag_a, _flag_b)) goto L_39005089; /* 0x39005082: jne 0x39005089 */
  15018 L_39005084:
  15019     edx = MEM32(esi + 0x4); /* 0x39005084: mov edx, dword ptr [esi + 4] */
  15020     goto L_3900509D; /* 0x39005087: jmp 0x3900509d */
  15021 L_39005089:
  15022     ecx = MEM32(eax); /* 0x39005089: mov ecx, dword ptr [eax] */
  15023     edx = eax; /* 0x3900508B: mov edx, eax */
  15024     /* cmp MEM8(ecx + 0x15), 0 */ /* 0x3900508D: cmp byte ptr [ecx + 0x15], 0 */
  15025     _flag_a = (uint32_t)(MEM8(ecx + 0x15)) << 24; _flag_b = (uint32_t)(0) << 24;
  15026     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15027     _flag_k = FK_NARROW(FK_CMP, 24);
  15028     if (CMP_NE(_flag_a, _flag_b)) goto L_3900509D; /* 0x39005091: jne 0x3900509d */
  15029 L_39005093:
  15030     edx = ecx; /* 0x39005093: mov edx, ecx */
  15031     ecx = MEM32(edx); /* 0x39005095: mov ecx, dword ptr [edx] */
  15032     /* cmp MEM8(ecx + 0x15), 0 */ /* 0x39005097: cmp byte ptr [ecx + 0x15], 0 */
  15033     _flag_a = (uint32_t)(MEM8(ecx + 0x15)) << 24; _flag_b = (uint32_t)(0) << 24;
  15034     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15035     _flag_k = FK_NARROW(FK_CMP, 24);
  15036     RECOMP_BACKEDGE();
  15037     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005093; /* 0x3900509B: je 0x39005093 */
  15038 L_3900509D:
  15039     MEM32(ebx) = edx; /* 0x3900509D: mov dword ptr [ebx], edx */
  15040 L_3900509F:
  15041     ebx = MEM32(edi + 0x4); /* 0x3900509F: mov ebx, dword ptr [edi + 4] */
  15042     /* cmp MEM32(ebx + 0x8), esi */ /* 0x390050A2: cmp dword ptr [ebx + 8], esi */
  15043     _flag_a = (uint32_t)(MEM32(ebx + 0x8)); _flag_b = (uint32_t)(esi);
  15044     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15045     _flag_k = FK_CMP;
  15046     if (CMP_NE(_flag_a, _flag_b)) goto L_390050CE; /* 0x390050A5: jne 0x390050ce */
  15047 L_390050A7:
  15048     ecx = MEM32(esi); /* 0x390050A7: mov ecx, dword ptr [esi] */
  15049     edx = MEM32(edi + 0x8); /* 0x390050A9: mov edx, dword ptr [edi + 8] */
  15050     /* cmp ecx, edx */ /* 0x390050AC: cmp ecx, edx */
  15051     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
  15052     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15053     _flag_k = FK_CMP;
  15054     if (CMP_NE(_flag_a, _flag_b)) goto L_390050B5; /* 0x390050AE: jne 0x390050b5 */
  15055 L_390050B0:
  15056     edx = MEM32(esi + 0x4); /* 0x390050B0: mov edx, dword ptr [esi + 4] */
  15057     goto L_390050CB; /* 0x390050B3: jmp 0x390050cb */
  15058 L_390050B5:
  15059     ecx = MEM32(eax + 0x8); /* 0x390050B5: mov ecx, dword ptr [eax + 8] */
  15060     edx = eax; /* 0x390050B8: mov edx, eax */
  15061     /* cmp MEM8(ecx + 0x15), 0 */ /* 0x390050BA: cmp byte ptr [ecx + 0x15], 0 */
  15062     _flag_a = (uint32_t)(MEM8(ecx + 0x15)) << 24; _flag_b = (uint32_t)(0) << 24;
  15063     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15064     _flag_k = FK_NARROW(FK_CMP, 24);
  15065     if (CMP_NE(_flag_a, _flag_b)) goto L_390050CB; /* 0x390050BE: jne 0x390050cb */
  15066 L_390050C0:
  15067     edx = ecx; /* 0x390050C0: mov edx, ecx */
  15068     ecx = MEM32(edx + 0x8); /* 0x390050C2: mov ecx, dword ptr [edx + 8] */
  15069     /* cmp MEM8(ecx + 0x15), 0 */ /* 0x390050C5: cmp byte ptr [ecx + 0x15], 0 */
  15070     _flag_a = (uint32_t)(MEM8(ecx + 0x15)) << 24; _flag_b = (uint32_t)(0) << 24;
  15071     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15072     _flag_k = FK_NARROW(FK_CMP, 24);
  15073     RECOMP_BACKEDGE();
  15074     if (CMP_EQ(_flag_a, _flag_b)) goto L_390050C0; /* 0x390050C9: je 0x390050c0 */
  15075 L_390050CB:
  15076     MEM32(ebx + 0x8) = edx; /* 0x390050CB: mov dword ptr [ebx + 8], edx */
  15077 L_390050CE:
  15078     ecx = MEM32(ebp + (-0x4)); /* 0x390050CE: mov ecx, dword ptr [ebp - 4] */
  15079     SET_LO8(ebx, 1); /* 0x390050D1: mov bl, 1 */
  15080     /* cmp MEM8(ecx + 0x14), LO8(ebx) */ /* 0x390050D3: cmp byte ptr [ecx + 0x14], bl */
  15081     _flag_a = (uint32_t)(MEM8(ecx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15082     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15083     _flag_k = FK_NARROW(FK_CMP, 24);
  15084     if (CMP_NE(_flag_a, _flag_b)) goto L_39005339; /* 0x390050D6: jne 0x39005339 */
  15085 L_390050DC:
  15086     edx = MEM32(edi + 0x4); /* 0x390050DC: mov edx, dword ptr [edi + 4] */
  15087     /* cmp eax, MEM32(edx + 0x4) */ /* 0x390050DF: cmp eax, dword ptr [edx + 4] */
  15088     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4));
  15089     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15090     _flag_k = FK_CMP;
  15091     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005336; /* 0x390050E2: je 0x39005336 */
  15092 L_390050E8:
  15093     /* cmp MEM8(eax + 0x14), LO8(ebx) */ /* 0x390050E8: cmp byte ptr [eax + 0x14], bl */
  15094     _flag_a = (uint32_t)(MEM8(eax + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15095     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15096     _flag_k = FK_NARROW(FK_CMP, 24);
  15097     if (CMP_NE(_flag_a, _flag_b)) goto L_39005336; /* 0x390050EB: jne 0x39005336 */
  15098 L_390050F1:
  15099     edx = MEM32(eax + 0x4); /* 0x390050F1: mov edx, dword ptr [eax + 4] */
  15100     ecx = MEM32(edx); /* 0x390050F4: mov ecx, dword ptr [edx] */
  15101     /* cmp eax, ecx */ /* 0x390050F6: cmp eax, ecx */
  15102     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  15103     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15104     _flag_k = FK_CMP;
  15105     if (CMP_NE(_flag_a, _flag_b)) goto L_39005168; /* 0x390050F8: jne 0x39005168 */
  15106 L_390050FA:
  15107     ecx = MEM32(edx + 0x8); /* 0x390050FA: mov ecx, dword ptr [edx + 8] */
  15108     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390050FD: mov dl, byte ptr [ecx + 0x14] */
  15109     /* test LO8(edx), LO8(edx) */ /* 0x39005100: test dl, dl */
  15110     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  15111     _cf = 0;
  15112     _flag_k = FK_NARROW(FK_TEST, 24);
  15113     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900514F; /* 0x39005102: jne 0x3900514f */
  15114 L_39005104:
  15115     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005104: mov byte ptr [ecx + 0x14], bl */
  15116     ecx = MEM32(eax + 0x4); /* 0x39005107: mov ecx, dword ptr [eax + 4] */
  15117     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900510A: mov byte ptr [ecx + 0x14], 0 */
  15118     ecx = MEM32(eax + 0x4); /* 0x3900510E: mov ecx, dword ptr [eax + 4] */
  15119     edx = MEM32(ecx + 0x8); /* 0x39005111: mov edx, dword ptr [ecx + 8] */
  15120     esi = MEM32(edx); /* 0x39005114: mov esi, dword ptr [edx] */
  15121     MEM32(ecx + 0x8) = esi; /* 0x39005116: mov dword ptr [ecx + 8], esi */
  15122     esi = MEM32(edx); /* 0x39005119: mov esi, dword ptr [edx] */
  15123     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900511B: cmp esi, dword ptr [edi + 8] */
  15124     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15125     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15126     _flag_k = FK_CMP;
  15127     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005123; /* 0x3900511E: je 0x39005123 */
  15128 L_39005120:
  15129     MEM32(esi + 0x4) = ecx; /* 0x39005120: mov dword ptr [esi + 4], ecx */
  15130 L_39005123:
  15131     esi = MEM32(ecx + 0x4); /* 0x39005123: mov esi, dword ptr [ecx + 4] */
  15132     MEM32(edx + 0x4) = esi; /* 0x39005126: mov dword ptr [edx + 4], esi */
  15133     esi = MEM32(edi + 0x4); /* 0x39005129: mov esi, dword ptr [edi + 4] */
  15134     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900512C: cmp ecx, dword ptr [esi + 4] */
  15135     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15136     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15137     _flag_k = FK_CMP;
  15138     if (CMP_NE(_flag_a, _flag_b)) goto L_39005136; /* 0x3900512F: jne 0x39005136 */
  15139 L_39005131:
  15140     MEM32(esi + 0x4) = edx; /* 0x39005131: mov dword ptr [esi + 4], edx */
  15141     goto L_39005144; /* 0x39005134: jmp 0x39005144 */
  15142 L_39005136:
  15143     esi = MEM32(ecx + 0x4); /* 0x39005136: mov esi, dword ptr [ecx + 4] */
  15144     /* cmp ecx, MEM32(esi) */ /* 0x39005139: cmp ecx, dword ptr [esi] */
  15145     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  15146     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15147     _flag_k = FK_CMP;
  15148     if (CMP_NE(_flag_a, _flag_b)) goto L_39005141; /* 0x3900513B: jne 0x39005141 */
  15149 L_3900513D:
  15150     MEM32(esi) = edx; /* 0x3900513D: mov dword ptr [esi], edx */
  15151     goto L_39005144; /* 0x3900513F: jmp 0x39005144 */
  15152 L_39005141:
  15153     MEM32(esi + 0x8) = edx; /* 0x39005141: mov dword ptr [esi + 8], edx */
  15154 L_39005144:
  15155     MEM32(edx) = ecx; /* 0x39005144: mov dword ptr [edx], ecx */
  15156     MEM32(ecx + 0x4) = edx; /* 0x39005146: mov dword ptr [ecx + 4], edx */
  15157     edx = MEM32(eax + 0x4); /* 0x39005149: mov edx, dword ptr [eax + 4] */
  15158     ecx = MEM32(edx + 0x8); /* 0x3900514C: mov ecx, dword ptr [edx + 8] */
  15159 L_3900514F:
  15160     edx = MEM32(ecx); /* 0x3900514F: mov edx, dword ptr [ecx] */
  15161     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005151: cmp byte ptr [edx + 0x14], bl */
  15162     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15163     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15164     _flag_k = FK_NARROW(FK_CMP, 24);
  15165     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005154: jne 0x390051ea */
  15166 L_3900515A:
  15167     edx = MEM32(ecx + 0x8); /* 0x3900515A: mov edx, dword ptr [ecx + 8] */
  15168     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x3900515D: cmp byte ptr [edx + 0x14], bl */
  15169     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15170     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15171     _flag_k = FK_NARROW(FK_CMP, 24);
  15172     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005160: jne 0x390051ea */
  15173 L_39005166:
  15174     goto L_390051D2; /* 0x39005166: jmp 0x390051d2 */
  15175 L_39005168:
  15176     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x39005168: mov dl, byte ptr [ecx + 0x14] */
  15177     /* test LO8(edx), LO8(edx) */ /* 0x3900516B: test dl, dl */
  15178     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  15179     _cf = 0;
  15180     _flag_k = FK_NARROW(FK_TEST, 24);
  15181     if (TEST_NZ(_flag_a, _flag_b)) goto L_390051BB; /* 0x3900516D: jne 0x390051bb */
  15182 L_3900516F:
  15183     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900516F: mov byte ptr [ecx + 0x14], bl */
  15184     ecx = MEM32(eax + 0x4); /* 0x39005172: mov ecx, dword ptr [eax + 4] */
  15185     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005175: mov byte ptr [ecx + 0x14], 0 */
  15186     ecx = MEM32(eax + 0x4); /* 0x39005179: mov ecx, dword ptr [eax + 4] */
  15187     edx = MEM32(ecx); /* 0x3900517C: mov edx, dword ptr [ecx] */
  15188     esi = MEM32(edx + 0x8); /* 0x3900517E: mov esi, dword ptr [edx + 8] */
  15189     MEM32(ecx) = esi; /* 0x39005181: mov dword ptr [ecx], esi */
  15190     esi = MEM32(edx + 0x8); /* 0x39005183: mov esi, dword ptr [edx + 8] */
  15191     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005186: cmp esi, dword ptr [edi + 8] */
  15192     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15193     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15194     _flag_k = FK_CMP;
  15195     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900518E; /* 0x39005189: je 0x3900518e */
  15196 L_3900518B:
  15197     MEM32(esi + 0x4) = ecx; /* 0x3900518B: mov dword ptr [esi + 4], ecx */
  15198 L_3900518E:
  15199     esi = MEM32(ecx + 0x4); /* 0x3900518E: mov esi, dword ptr [ecx + 4] */
  15200     MEM32(edx + 0x4) = esi; /* 0x39005191: mov dword ptr [edx + 4], esi */
  15201     esi = MEM32(edi + 0x4); /* 0x39005194: mov esi, dword ptr [edi + 4] */
  15202     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005197: cmp ecx, dword ptr [esi + 4] */
  15203     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15204     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15205     _flag_k = FK_CMP;
  15206     if (CMP_NE(_flag_a, _flag_b)) goto L_390051A1; /* 0x3900519A: jne 0x390051a1 */
  15207 L_3900519C:
  15208     MEM32(esi + 0x4) = edx; /* 0x3900519C: mov dword ptr [esi + 4], edx */
  15209     goto L_390051B0; /* 0x3900519F: jmp 0x390051b0 */
  15210 L_390051A1:
  15211     esi = MEM32(ecx + 0x4); /* 0x390051A1: mov esi, dword ptr [ecx + 4] */
  15212     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x390051A4: cmp ecx, dword ptr [esi + 8] */
  15213     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  15214     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15215     _flag_k = FK_CMP;
  15216     if (CMP_NE(_flag_a, _flag_b)) goto L_390051AE; /* 0x390051A7: jne 0x390051ae */
  15217 L_390051A9:
  15218     MEM32(esi + 0x8) = edx; /* 0x390051A9: mov dword ptr [esi + 8], edx */
  15219     goto L_390051B0; /* 0x390051AC: jmp 0x390051b0 */
  15220 L_390051AE:
  15221     MEM32(esi) = edx; /* 0x390051AE: mov dword ptr [esi], edx */
  15222 L_390051B0:
  15223     MEM32(edx + 0x8) = ecx; /* 0x390051B0: mov dword ptr [edx + 8], ecx */
  15224     MEM32(ecx + 0x4) = edx; /* 0x390051B3: mov dword ptr [ecx + 4], edx */
  15225     edx = MEM32(eax + 0x4); /* 0x390051B6: mov edx, dword ptr [eax + 4] */
  15226     ecx = MEM32(edx); /* 0x390051B9: mov ecx, dword ptr [edx] */
  15227 L_390051BB:
  15228     edx = MEM32(ecx + 0x8); /* 0x390051BB: mov edx, dword ptr [ecx + 8] */
  15229     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051BE: cmp byte ptr [edx + 0x14], bl */
  15230     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15231     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15232     _flag_k = FK_NARROW(FK_CMP, 24);
  15233     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051C1: jne 0x39005297 */
  15234 L_390051C7:
  15235     edx = MEM32(ecx); /* 0x390051C7: mov edx, dword ptr [ecx] */
  15236     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051C9: cmp byte ptr [edx + 0x14], bl */
  15237     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15238     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15239     _flag_k = FK_NARROW(FK_CMP, 24);
  15240     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051CC: jne 0x39005297 */
  15241 L_390051D2:
  15242     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051D2: mov byte ptr [ecx + 0x14], 0 */
  15243     ecx = MEM32(edi + 0x4); /* 0x390051D6: mov ecx, dword ptr [edi + 4] */
  15244     eax = MEM32(eax + 0x4); /* 0x390051D9: mov eax, dword ptr [eax + 4] */
  15245     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x390051DC: cmp eax, dword ptr [ecx + 4] */
  15246     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  15247     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15248     _flag_k = FK_CMP;
  15249     RECOMP_BACKEDGE();
  15250     if (CMP_NE(_flag_a, _flag_b)) goto L_390050E8; /* 0x390051DF: jne 0x390050e8 */
  15251 L_390051E5:
  15252     goto L_39005336; /* 0x390051E5: jmp 0x39005336 */
  15253 L_390051EA:
  15254     edx = MEM32(ecx + 0x8); /* 0x390051EA: mov edx, dword ptr [ecx + 8] */
  15255     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051ED: cmp byte ptr [edx + 0x14], bl */
  15256     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15257     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15258     _flag_k = FK_NARROW(FK_CMP, 24);
  15259     if (CMP_NE(_flag_a, _flag_b)) goto L_3900523B; /* 0x390051F0: jne 0x3900523b */
  15260 L_390051F2:
  15261     edx = MEM32(ecx); /* 0x390051F2: mov edx, dword ptr [ecx] */
  15262     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390051F4: mov byte ptr [edx + 0x14], bl */
  15263     edx = MEM32(ecx); /* 0x390051F7: mov edx, dword ptr [ecx] */
  15264     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051F9: mov byte ptr [ecx + 0x14], 0 */
  15265     esi = MEM32(edx + 0x8); /* 0x390051FD: mov esi, dword ptr [edx + 8] */
  15266     MEM32(ecx) = esi; /* 0x39005200: mov dword ptr [ecx], esi */
  15267     esi = MEM32(edx + 0x8); /* 0x39005202: mov esi, dword ptr [edx + 8] */
  15268     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005205: cmp esi, dword ptr [edi + 8] */
  15269     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15270     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15271     _flag_k = FK_CMP;
  15272     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900520D; /* 0x39005208: je 0x3900520d */
  15273 L_3900520A:
  15274     MEM32(esi + 0x4) = ecx; /* 0x3900520A: mov dword ptr [esi + 4], ecx */
  15275 L_3900520D:
  15276     esi = MEM32(ecx + 0x4); /* 0x3900520D: mov esi, dword ptr [ecx + 4] */
  15277     MEM32(edx + 0x4) = esi; /* 0x39005210: mov dword ptr [edx + 4], esi */
  15278     esi = MEM32(edi + 0x4); /* 0x39005213: mov esi, dword ptr [edi + 4] */
  15279     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005216: cmp ecx, dword ptr [esi + 4] */
  15280     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15281     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15282     _flag_k = FK_CMP;
  15283     if (CMP_NE(_flag_a, _flag_b)) goto L_39005220; /* 0x39005219: jne 0x39005220 */
  15284 L_3900521B:
  15285     MEM32(esi + 0x4) = edx; /* 0x3900521B: mov dword ptr [esi + 4], edx */
  15286     goto L_3900522F; /* 0x3900521E: jmp 0x3900522f */
  15287 L_39005220:
  15288     esi = MEM32(ecx + 0x4); /* 0x39005220: mov esi, dword ptr [ecx + 4] */
  15289     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005223: cmp ecx, dword ptr [esi + 8] */
  15290     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  15291     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15292     _flag_k = FK_CMP;
  15293     if (CMP_NE(_flag_a, _flag_b)) goto L_3900522D; /* 0x39005226: jne 0x3900522d */
  15294 L_39005228:
  15295     MEM32(esi + 0x8) = edx; /* 0x39005228: mov dword ptr [esi + 8], edx */
  15296     goto L_3900522F; /* 0x3900522B: jmp 0x3900522f */
  15297 L_3900522D:
  15298     MEM32(esi) = edx; /* 0x3900522D: mov dword ptr [esi], edx */
  15299 L_3900522F:
  15300     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  15301     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  15302     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  15303     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  15304 L_3900523B:
  15305     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  15306     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  15307     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  15308     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  15309     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  15310     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  15311     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  15312     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  15313     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  15314     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  15315     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  15316     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  15317     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  15318     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15319     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15320     _flag_k = FK_CMP;
  15321     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  15322 L_39005262:
  15323     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  15324 L_39005265:
  15325     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  15326     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  15327     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  15328     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  15329     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15330     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15331     _flag_k = FK_CMP;
  15332     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  15333 L_39005273:
  15334     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  15335     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  15336     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  15337 L_3900527D:
  15338     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  15339     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  15340     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  15341     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15342     _flag_k = FK_CMP;
  15343     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  15344 L_39005284:
  15345     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  15346     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  15347     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  15348 L_3900528D:
  15349     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  15350     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  15351     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  15352 L_39005297:
  15353     edx = MEM32(ecx); /* 0x39005297: mov edx, dword ptr [ecx] */
  15354     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005299: cmp byte ptr [edx + 0x14], bl */
  15355     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15356     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15357     _flag_k = FK_NARROW(FK_CMP, 24);
  15358     if (CMP_NE(_flag_a, _flag_b)) goto L_390052E5; /* 0x3900529C: jne 0x390052e5 */
  15359 L_3900529E:
  15360     edx = MEM32(ecx + 0x8); /* 0x3900529E: mov edx, dword ptr [ecx + 8] */
  15361     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052A1: mov byte ptr [edx + 0x14], bl */
  15362     edx = MEM32(ecx + 0x8); /* 0x390052A4: mov edx, dword ptr [ecx + 8] */
  15363     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390052A7: mov byte ptr [ecx + 0x14], 0 */
  15364     esi = MEM32(edx); /* 0x390052AB: mov esi, dword ptr [edx] */
  15365     MEM32(ecx + 0x8) = esi; /* 0x390052AD: mov dword ptr [ecx + 8], esi */
  15366     esi = MEM32(edx); /* 0x390052B0: mov esi, dword ptr [edx] */
  15367     /* cmp esi, MEM32(edi + 0x8) */ /* 0x390052B2: cmp esi, dword ptr [edi + 8] */
  15368     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15369     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15370     _flag_k = FK_CMP;
  15371     if (CMP_EQ(_flag_a, _flag_b)) goto L_390052BA; /* 0x390052B5: je 0x390052ba */
  15372 L_390052B7:
  15373     MEM32(esi + 0x4) = ecx; /* 0x390052B7: mov dword ptr [esi + 4], ecx */
  15374 L_390052BA:
  15375     esi = MEM32(ecx + 0x4); /* 0x390052BA: mov esi, dword ptr [ecx + 4] */
  15376     MEM32(edx + 0x4) = esi; /* 0x390052BD: mov dword ptr [edx + 4], esi */
  15377     esi = MEM32(edi + 0x4); /* 0x390052C0: mov esi, dword ptr [edi + 4] */
  15378     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x390052C3: cmp ecx, dword ptr [esi + 4] */
  15379     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15380     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15381     _flag_k = FK_CMP;
  15382     if (CMP_NE(_flag_a, _flag_b)) goto L_390052CD; /* 0x390052C6: jne 0x390052cd */
  15383 L_390052C8:
  15384     MEM32(esi + 0x4) = edx; /* 0x390052C8: mov dword ptr [esi + 4], edx */
  15385     goto L_390052DB; /* 0x390052CB: jmp 0x390052db */
  15386 L_390052CD:
  15387     esi = MEM32(ecx + 0x4); /* 0x390052CD: mov esi, dword ptr [ecx + 4] */
  15388     /* cmp ecx, MEM32(esi) */ /* 0x390052D0: cmp ecx, dword ptr [esi] */
  15389     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  15390     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15391     _flag_k = FK_CMP;
  15392     if (CMP_NE(_flag_a, _flag_b)) goto L_390052D8; /* 0x390052D2: jne 0x390052d8 */
  15393 L_390052D4:
  15394     MEM32(esi) = edx; /* 0x390052D4: mov dword ptr [esi], edx */
  15395     goto L_390052DB; /* 0x390052D6: jmp 0x390052db */
  15396 L_390052D8:
  15397     MEM32(esi + 0x8) = edx; /* 0x390052D8: mov dword ptr [esi + 8], edx */
  15398 L_390052DB:
  15399     MEM32(edx) = ecx; /* 0x390052DB: mov dword ptr [edx], ecx */
  15400     MEM32(ecx + 0x4) = edx; /* 0x390052DD: mov dword ptr [ecx + 4], edx */
  15401     ecx = MEM32(eax + 0x4); /* 0x390052E0: mov ecx, dword ptr [eax + 4] */
  15402     ecx = MEM32(ecx); /* 0x390052E3: mov ecx, dword ptr [ecx] */
  15403 L_390052E5:
  15404     edx = MEM32(eax + 0x4); /* 0x390052E5: mov edx, dword ptr [eax + 4] */
  15405     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x390052E8: mov dl, byte ptr [edx + 0x14] */
  15406     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x390052EB: mov byte ptr [ecx + 0x14], dl */
  15407     edx = MEM32(eax + 0x4); /* 0x390052EE: mov edx, dword ptr [eax + 4] */
  15408     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F1: mov byte ptr [edx + 0x14], bl */
  15409     ecx = MEM32(ecx); /* 0x390052F4: mov ecx, dword ptr [ecx] */
  15410     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F6: mov byte ptr [ecx + 0x14], bl */
  15411     ecx = MEM32(eax + 0x4); /* 0x390052F9: mov ecx, dword ptr [eax + 4] */
  15412     edx = MEM32(ecx); /* 0x390052FC: mov edx, dword ptr [ecx] */
  15413     esi = MEM32(edx + 0x8); /* 0x390052FE: mov esi, dword ptr [edx + 8] */
  15414     MEM32(ecx) = esi; /* 0x39005301: mov dword ptr [ecx], esi */
  15415     esi = MEM32(edx + 0x8); /* 0x39005303: mov esi, dword ptr [edx + 8] */
  15416     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005306: cmp esi, dword ptr [edi + 8] */
  15417     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15418     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15419     _flag_k = FK_CMP;
  15420     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900530E; /* 0x39005309: je 0x3900530e */
  15421 L_3900530B:
  15422     MEM32(esi + 0x4) = ecx; /* 0x3900530B: mov dword ptr [esi + 4], ecx */
  15423 L_3900530E:
  15424     esi = MEM32(ecx + 0x4); /* 0x3900530E: mov esi, dword ptr [ecx + 4] */
  15425     MEM32(edx + 0x4) = esi; /* 0x39005311: mov dword ptr [edx + 4], esi */
  15426     esi = MEM32(edi + 0x4); /* 0x39005314: mov esi, dword ptr [edi + 4] */
  15427     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005317: cmp ecx, dword ptr [esi + 4] */
  15428     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15429     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15430     _flag_k = FK_CMP;
  15431     if (CMP_NE(_flag_a, _flag_b)) goto L_39005321; /* 0x3900531A: jne 0x39005321 */
  15432 L_3900531C:
  15433     MEM32(esi + 0x4) = edx; /* 0x3900531C: mov dword ptr [esi + 4], edx */
  15434     goto L_39005330; /* 0x3900531F: jmp 0x39005330 */
  15435 L_39005321:
  15436     esi = MEM32(ecx + 0x4); /* 0x39005321: mov esi, dword ptr [ecx + 4] */
  15437     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005324: cmp ecx, dword ptr [esi + 8] */
  15438     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  15439     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15440     _flag_k = FK_CMP;
  15441     if (CMP_NE(_flag_a, _flag_b)) goto L_3900532E; /* 0x39005327: jne 0x3900532e */
  15442 L_39005329:
  15443     MEM32(esi + 0x8) = edx; /* 0x39005329: mov dword ptr [esi + 8], edx */
  15444     goto L_39005330; /* 0x3900532C: jmp 0x39005330 */
  15445 L_3900532E:
  15446     MEM32(esi) = edx; /* 0x3900532E: mov dword ptr [esi], edx */
  15447 L_39005330:
  15448     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  15449 L_39005333:
  15450     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  15451 L_39005336:
  15452     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  15453 L_39005339:
  15454     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  15455     PUSH32(esp, edx); /* 0x3900533C: push edx */
  15456     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  15457     RECOMP_FLAGS_IN();
  15458     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  15459     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  15460     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  15461     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  15462     esp = esp + 4; /* 0x39005348: add esp, 4 */
  15463     _flag_k = FK_ADD;
  15464     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  15465     eax = eax - 1; /* 0x3900534B: dec eax */
  15466     _flag_k = FK_DEC;
  15467     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  15468     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  15469     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  15470     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  15471     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  15472     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  15473     esp = ebp; /* 0x39005357: mov esp, ebp */
  15474     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  15475     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  15476     RECOMP_REGS_OUT();
  15477 }
  15478 
  15479 void sub_3900509D(void) {
  15480     int _fpu_cmp = 0;
  15481     uint32_t _cf = 0;
  15482     int _df = 1;
  15483     uint32_t _flag_k = FK_NONE;
  15484     uint32_t _flag_a = 0, _flag_b = 0;
  15485     uint32_t _itail_tgt = 0;
  15486     RECOMP_REGS_LOCALS
  15487     RECOMP_ENTER(0x3900509Du);
  15488 
  15489 L_3900509D:
  15490     MEM32(ebx) = edx; /* 0x3900509D: mov dword ptr [ebx], edx */
  15491     ebx = MEM32(edi + 0x4); /* 0x3900509F: mov ebx, dword ptr [edi + 4] */
  15492     /* cmp MEM32(ebx + 0x8), esi */ /* 0x390050A2: cmp dword ptr [ebx + 8], esi */
  15493     _flag_a = (uint32_t)(MEM32(ebx + 0x8)); _flag_b = (uint32_t)(esi);
  15494     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15495     _flag_k = FK_CMP;
  15496     if (CMP_NE(_flag_a, _flag_b)) goto L_390050CE; /* 0x390050A5: jne 0x390050ce */
  15497 L_390050A7:
  15498     ecx = MEM32(esi); /* 0x390050A7: mov ecx, dword ptr [esi] */
  15499     edx = MEM32(edi + 0x8); /* 0x390050A9: mov edx, dword ptr [edi + 8] */
  15500     /* cmp ecx, edx */ /* 0x390050AC: cmp ecx, edx */
  15501     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
  15502     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15503     _flag_k = FK_CMP;
  15504     if (CMP_NE(_flag_a, _flag_b)) goto L_390050B5; /* 0x390050AE: jne 0x390050b5 */
  15505 L_390050B0:
  15506     edx = MEM32(esi + 0x4); /* 0x390050B0: mov edx, dword ptr [esi + 4] */
  15507     goto L_390050CB; /* 0x390050B3: jmp 0x390050cb */
  15508 L_390050B5:
  15509     ecx = MEM32(eax + 0x8); /* 0x390050B5: mov ecx, dword ptr [eax + 8] */
  15510     edx = eax; /* 0x390050B8: mov edx, eax */
  15511     /* cmp MEM8(ecx + 0x15), 0 */ /* 0x390050BA: cmp byte ptr [ecx + 0x15], 0 */
  15512     _flag_a = (uint32_t)(MEM8(ecx + 0x15)) << 24; _flag_b = (uint32_t)(0) << 24;
  15513     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15514     _flag_k = FK_NARROW(FK_CMP, 24);
  15515     if (CMP_NE(_flag_a, _flag_b)) goto L_390050CB; /* 0x390050BE: jne 0x390050cb */
  15516 L_390050C0:
  15517     edx = ecx; /* 0x390050C0: mov edx, ecx */
  15518     ecx = MEM32(edx + 0x8); /* 0x390050C2: mov ecx, dword ptr [edx + 8] */
  15519     /* cmp MEM8(ecx + 0x15), 0 */ /* 0x390050C5: cmp byte ptr [ecx + 0x15], 0 */
  15520     _flag_a = (uint32_t)(MEM8(ecx + 0x15)) << 24; _flag_b = (uint32_t)(0) << 24;
  15521     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15522     _flag_k = FK_NARROW(FK_CMP, 24);
  15523     RECOMP_BACKEDGE();
  15524     if (CMP_EQ(_flag_a, _flag_b)) goto L_390050C0; /* 0x390050C9: je 0x390050c0 */
  15525 L_390050CB:
  15526     MEM32(ebx + 0x8) = edx; /* 0x390050CB: mov dword ptr [ebx + 8], edx */
  15527 L_390050CE:
  15528     ecx = MEM32(ebp + (-0x4)); /* 0x390050CE: mov ecx, dword ptr [ebp - 4] */
  15529     SET_LO8(ebx, 1); /* 0x390050D1: mov bl, 1 */
  15530     /* cmp MEM8(ecx + 0x14), LO8(ebx) */ /* 0x390050D3: cmp byte ptr [ecx + 0x14], bl */
  15531     _flag_a = (uint32_t)(MEM8(ecx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15532     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15533     _flag_k = FK_NARROW(FK_CMP, 24);
  15534     if (CMP_NE(_flag_a, _flag_b)) goto L_39005339; /* 0x390050D6: jne 0x39005339 */
  15535 L_390050DC:
  15536     edx = MEM32(edi + 0x4); /* 0x390050DC: mov edx, dword ptr [edi + 4] */
  15537     /* cmp eax, MEM32(edx + 0x4) */ /* 0x390050DF: cmp eax, dword ptr [edx + 4] */
  15538     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4));
  15539     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15540     _flag_k = FK_CMP;
  15541     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005336; /* 0x390050E2: je 0x39005336 */
  15542 L_390050E8:
  15543     /* cmp MEM8(eax + 0x14), LO8(ebx) */ /* 0x390050E8: cmp byte ptr [eax + 0x14], bl */
  15544     _flag_a = (uint32_t)(MEM8(eax + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15545     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15546     _flag_k = FK_NARROW(FK_CMP, 24);
  15547     if (CMP_NE(_flag_a, _flag_b)) goto L_39005336; /* 0x390050EB: jne 0x39005336 */
  15548 L_390050F1:
  15549     edx = MEM32(eax + 0x4); /* 0x390050F1: mov edx, dword ptr [eax + 4] */
  15550     ecx = MEM32(edx); /* 0x390050F4: mov ecx, dword ptr [edx] */
  15551     /* cmp eax, ecx */ /* 0x390050F6: cmp eax, ecx */
  15552     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  15553     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15554     _flag_k = FK_CMP;
  15555     if (CMP_NE(_flag_a, _flag_b)) goto L_39005168; /* 0x390050F8: jne 0x39005168 */
  15556 L_390050FA:
  15557     ecx = MEM32(edx + 0x8); /* 0x390050FA: mov ecx, dword ptr [edx + 8] */
  15558     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390050FD: mov dl, byte ptr [ecx + 0x14] */
  15559     /* test LO8(edx), LO8(edx) */ /* 0x39005100: test dl, dl */
  15560     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  15561     _cf = 0;
  15562     _flag_k = FK_NARROW(FK_TEST, 24);
  15563     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900514F; /* 0x39005102: jne 0x3900514f */
  15564 L_39005104:
  15565     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005104: mov byte ptr [ecx + 0x14], bl */
  15566     ecx = MEM32(eax + 0x4); /* 0x39005107: mov ecx, dword ptr [eax + 4] */
  15567     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900510A: mov byte ptr [ecx + 0x14], 0 */
  15568     ecx = MEM32(eax + 0x4); /* 0x3900510E: mov ecx, dword ptr [eax + 4] */
  15569     edx = MEM32(ecx + 0x8); /* 0x39005111: mov edx, dword ptr [ecx + 8] */
  15570     esi = MEM32(edx); /* 0x39005114: mov esi, dword ptr [edx] */
  15571     MEM32(ecx + 0x8) = esi; /* 0x39005116: mov dword ptr [ecx + 8], esi */
  15572     esi = MEM32(edx); /* 0x39005119: mov esi, dword ptr [edx] */
  15573     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900511B: cmp esi, dword ptr [edi + 8] */
  15574     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15575     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15576     _flag_k = FK_CMP;
  15577     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005123; /* 0x3900511E: je 0x39005123 */
  15578 L_39005120:
  15579     MEM32(esi + 0x4) = ecx; /* 0x39005120: mov dword ptr [esi + 4], ecx */
  15580 L_39005123:
  15581     esi = MEM32(ecx + 0x4); /* 0x39005123: mov esi, dword ptr [ecx + 4] */
  15582     MEM32(edx + 0x4) = esi; /* 0x39005126: mov dword ptr [edx + 4], esi */
  15583     esi = MEM32(edi + 0x4); /* 0x39005129: mov esi, dword ptr [edi + 4] */
  15584     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900512C: cmp ecx, dword ptr [esi + 4] */
  15585     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15586     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15587     _flag_k = FK_CMP;
  15588     if (CMP_NE(_flag_a, _flag_b)) goto L_39005136; /* 0x3900512F: jne 0x39005136 */
  15589 L_39005131:
  15590     MEM32(esi + 0x4) = edx; /* 0x39005131: mov dword ptr [esi + 4], edx */
  15591     goto L_39005144; /* 0x39005134: jmp 0x39005144 */
  15592 L_39005136:
  15593     esi = MEM32(ecx + 0x4); /* 0x39005136: mov esi, dword ptr [ecx + 4] */
  15594     /* cmp ecx, MEM32(esi) */ /* 0x39005139: cmp ecx, dword ptr [esi] */
  15595     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  15596     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15597     _flag_k = FK_CMP;
  15598     if (CMP_NE(_flag_a, _flag_b)) goto L_39005141; /* 0x3900513B: jne 0x39005141 */
  15599 L_3900513D:
  15600     MEM32(esi) = edx; /* 0x3900513D: mov dword ptr [esi], edx */
  15601     goto L_39005144; /* 0x3900513F: jmp 0x39005144 */
  15602 L_39005141:
  15603     MEM32(esi + 0x8) = edx; /* 0x39005141: mov dword ptr [esi + 8], edx */
  15604 L_39005144:
  15605     MEM32(edx) = ecx; /* 0x39005144: mov dword ptr [edx], ecx */
  15606     MEM32(ecx + 0x4) = edx; /* 0x39005146: mov dword ptr [ecx + 4], edx */
  15607     edx = MEM32(eax + 0x4); /* 0x39005149: mov edx, dword ptr [eax + 4] */
  15608     ecx = MEM32(edx + 0x8); /* 0x3900514C: mov ecx, dword ptr [edx + 8] */
  15609 L_3900514F:
  15610     edx = MEM32(ecx); /* 0x3900514F: mov edx, dword ptr [ecx] */
  15611     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005151: cmp byte ptr [edx + 0x14], bl */
  15612     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15613     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15614     _flag_k = FK_NARROW(FK_CMP, 24);
  15615     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005154: jne 0x390051ea */
  15616 L_3900515A:
  15617     edx = MEM32(ecx + 0x8); /* 0x3900515A: mov edx, dword ptr [ecx + 8] */
  15618     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x3900515D: cmp byte ptr [edx + 0x14], bl */
  15619     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15620     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15621     _flag_k = FK_NARROW(FK_CMP, 24);
  15622     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005160: jne 0x390051ea */
  15623 L_39005166:
  15624     goto L_390051D2; /* 0x39005166: jmp 0x390051d2 */
  15625 L_39005168:
  15626     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x39005168: mov dl, byte ptr [ecx + 0x14] */
  15627     /* test LO8(edx), LO8(edx) */ /* 0x3900516B: test dl, dl */
  15628     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  15629     _cf = 0;
  15630     _flag_k = FK_NARROW(FK_TEST, 24);
  15631     if (TEST_NZ(_flag_a, _flag_b)) goto L_390051BB; /* 0x3900516D: jne 0x390051bb */
  15632 L_3900516F:
  15633     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900516F: mov byte ptr [ecx + 0x14], bl */
  15634     ecx = MEM32(eax + 0x4); /* 0x39005172: mov ecx, dword ptr [eax + 4] */
  15635     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005175: mov byte ptr [ecx + 0x14], 0 */
  15636     ecx = MEM32(eax + 0x4); /* 0x39005179: mov ecx, dword ptr [eax + 4] */
  15637     edx = MEM32(ecx); /* 0x3900517C: mov edx, dword ptr [ecx] */
  15638     esi = MEM32(edx + 0x8); /* 0x3900517E: mov esi, dword ptr [edx + 8] */
  15639     MEM32(ecx) = esi; /* 0x39005181: mov dword ptr [ecx], esi */
  15640     esi = MEM32(edx + 0x8); /* 0x39005183: mov esi, dword ptr [edx + 8] */
  15641     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005186: cmp esi, dword ptr [edi + 8] */
  15642     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15643     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15644     _flag_k = FK_CMP;
  15645     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900518E; /* 0x39005189: je 0x3900518e */
  15646 L_3900518B:
  15647     MEM32(esi + 0x4) = ecx; /* 0x3900518B: mov dword ptr [esi + 4], ecx */
  15648 L_3900518E:
  15649     esi = MEM32(ecx + 0x4); /* 0x3900518E: mov esi, dword ptr [ecx + 4] */
  15650     MEM32(edx + 0x4) = esi; /* 0x39005191: mov dword ptr [edx + 4], esi */
  15651     esi = MEM32(edi + 0x4); /* 0x39005194: mov esi, dword ptr [edi + 4] */
  15652     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005197: cmp ecx, dword ptr [esi + 4] */
  15653     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15654     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15655     _flag_k = FK_CMP;
  15656     if (CMP_NE(_flag_a, _flag_b)) goto L_390051A1; /* 0x3900519A: jne 0x390051a1 */
  15657 L_3900519C:
  15658     MEM32(esi + 0x4) = edx; /* 0x3900519C: mov dword ptr [esi + 4], edx */
  15659     goto L_390051B0; /* 0x3900519F: jmp 0x390051b0 */
  15660 L_390051A1:
  15661     esi = MEM32(ecx + 0x4); /* 0x390051A1: mov esi, dword ptr [ecx + 4] */
  15662     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x390051A4: cmp ecx, dword ptr [esi + 8] */
  15663     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  15664     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15665     _flag_k = FK_CMP;
  15666     if (CMP_NE(_flag_a, _flag_b)) goto L_390051AE; /* 0x390051A7: jne 0x390051ae */
  15667 L_390051A9:
  15668     MEM32(esi + 0x8) = edx; /* 0x390051A9: mov dword ptr [esi + 8], edx */
  15669     goto L_390051B0; /* 0x390051AC: jmp 0x390051b0 */
  15670 L_390051AE:
  15671     MEM32(esi) = edx; /* 0x390051AE: mov dword ptr [esi], edx */
  15672 L_390051B0:
  15673     MEM32(edx + 0x8) = ecx; /* 0x390051B0: mov dword ptr [edx + 8], ecx */
  15674     MEM32(ecx + 0x4) = edx; /* 0x390051B3: mov dword ptr [ecx + 4], edx */
  15675     edx = MEM32(eax + 0x4); /* 0x390051B6: mov edx, dword ptr [eax + 4] */
  15676     ecx = MEM32(edx); /* 0x390051B9: mov ecx, dword ptr [edx] */
  15677 L_390051BB:
  15678     edx = MEM32(ecx + 0x8); /* 0x390051BB: mov edx, dword ptr [ecx + 8] */
  15679     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051BE: cmp byte ptr [edx + 0x14], bl */
  15680     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15681     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15682     _flag_k = FK_NARROW(FK_CMP, 24);
  15683     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051C1: jne 0x39005297 */
  15684 L_390051C7:
  15685     edx = MEM32(ecx); /* 0x390051C7: mov edx, dword ptr [ecx] */
  15686     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051C9: cmp byte ptr [edx + 0x14], bl */
  15687     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15688     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15689     _flag_k = FK_NARROW(FK_CMP, 24);
  15690     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051CC: jne 0x39005297 */
  15691 L_390051D2:
  15692     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051D2: mov byte ptr [ecx + 0x14], 0 */
  15693     ecx = MEM32(edi + 0x4); /* 0x390051D6: mov ecx, dword ptr [edi + 4] */
  15694     eax = MEM32(eax + 0x4); /* 0x390051D9: mov eax, dword ptr [eax + 4] */
  15695     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x390051DC: cmp eax, dword ptr [ecx + 4] */
  15696     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  15697     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15698     _flag_k = FK_CMP;
  15699     RECOMP_BACKEDGE();
  15700     if (CMP_NE(_flag_a, _flag_b)) goto L_390050E8; /* 0x390051DF: jne 0x390050e8 */
  15701 L_390051E5:
  15702     goto L_39005336; /* 0x390051E5: jmp 0x39005336 */
  15703 L_390051EA:
  15704     edx = MEM32(ecx + 0x8); /* 0x390051EA: mov edx, dword ptr [ecx + 8] */
  15705     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051ED: cmp byte ptr [edx + 0x14], bl */
  15706     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15707     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15708     _flag_k = FK_NARROW(FK_CMP, 24);
  15709     if (CMP_NE(_flag_a, _flag_b)) goto L_3900523B; /* 0x390051F0: jne 0x3900523b */
  15710 L_390051F2:
  15711     edx = MEM32(ecx); /* 0x390051F2: mov edx, dword ptr [ecx] */
  15712     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390051F4: mov byte ptr [edx + 0x14], bl */
  15713     edx = MEM32(ecx); /* 0x390051F7: mov edx, dword ptr [ecx] */
  15714     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051F9: mov byte ptr [ecx + 0x14], 0 */
  15715     esi = MEM32(edx + 0x8); /* 0x390051FD: mov esi, dword ptr [edx + 8] */
  15716     MEM32(ecx) = esi; /* 0x39005200: mov dword ptr [ecx], esi */
  15717     esi = MEM32(edx + 0x8); /* 0x39005202: mov esi, dword ptr [edx + 8] */
  15718     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005205: cmp esi, dword ptr [edi + 8] */
  15719     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15720     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15721     _flag_k = FK_CMP;
  15722     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900520D; /* 0x39005208: je 0x3900520d */
  15723 L_3900520A:
  15724     MEM32(esi + 0x4) = ecx; /* 0x3900520A: mov dword ptr [esi + 4], ecx */
  15725 L_3900520D:
  15726     esi = MEM32(ecx + 0x4); /* 0x3900520D: mov esi, dword ptr [ecx + 4] */
  15727     MEM32(edx + 0x4) = esi; /* 0x39005210: mov dword ptr [edx + 4], esi */
  15728     esi = MEM32(edi + 0x4); /* 0x39005213: mov esi, dword ptr [edi + 4] */
  15729     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005216: cmp ecx, dword ptr [esi + 4] */
  15730     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15731     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15732     _flag_k = FK_CMP;
  15733     if (CMP_NE(_flag_a, _flag_b)) goto L_39005220; /* 0x39005219: jne 0x39005220 */
  15734 L_3900521B:
  15735     MEM32(esi + 0x4) = edx; /* 0x3900521B: mov dword ptr [esi + 4], edx */
  15736     goto L_3900522F; /* 0x3900521E: jmp 0x3900522f */
  15737 L_39005220:
  15738     esi = MEM32(ecx + 0x4); /* 0x39005220: mov esi, dword ptr [ecx + 4] */
  15739     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005223: cmp ecx, dword ptr [esi + 8] */
  15740     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  15741     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15742     _flag_k = FK_CMP;
  15743     if (CMP_NE(_flag_a, _flag_b)) goto L_3900522D; /* 0x39005226: jne 0x3900522d */
  15744 L_39005228:
  15745     MEM32(esi + 0x8) = edx; /* 0x39005228: mov dword ptr [esi + 8], edx */
  15746     goto L_3900522F; /* 0x3900522B: jmp 0x3900522f */
  15747 L_3900522D:
  15748     MEM32(esi) = edx; /* 0x3900522D: mov dword ptr [esi], edx */
  15749 L_3900522F:
  15750     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  15751     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  15752     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  15753     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  15754 L_3900523B:
  15755     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  15756     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  15757     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  15758     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  15759     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  15760     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  15761     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  15762     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  15763     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  15764     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  15765     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  15766     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  15767     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  15768     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15769     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15770     _flag_k = FK_CMP;
  15771     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  15772 L_39005262:
  15773     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  15774 L_39005265:
  15775     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  15776     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  15777     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  15778     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  15779     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15780     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15781     _flag_k = FK_CMP;
  15782     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  15783 L_39005273:
  15784     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  15785     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  15786     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  15787 L_3900527D:
  15788     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  15789     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  15790     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  15791     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15792     _flag_k = FK_CMP;
  15793     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  15794 L_39005284:
  15795     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  15796     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  15797     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  15798 L_3900528D:
  15799     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  15800     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  15801     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  15802 L_39005297:
  15803     edx = MEM32(ecx); /* 0x39005297: mov edx, dword ptr [ecx] */
  15804     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005299: cmp byte ptr [edx + 0x14], bl */
  15805     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15806     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15807     _flag_k = FK_NARROW(FK_CMP, 24);
  15808     if (CMP_NE(_flag_a, _flag_b)) goto L_390052E5; /* 0x3900529C: jne 0x390052e5 */
  15809 L_3900529E:
  15810     edx = MEM32(ecx + 0x8); /* 0x3900529E: mov edx, dword ptr [ecx + 8] */
  15811     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052A1: mov byte ptr [edx + 0x14], bl */
  15812     edx = MEM32(ecx + 0x8); /* 0x390052A4: mov edx, dword ptr [ecx + 8] */
  15813     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390052A7: mov byte ptr [ecx + 0x14], 0 */
  15814     esi = MEM32(edx); /* 0x390052AB: mov esi, dword ptr [edx] */
  15815     MEM32(ecx + 0x8) = esi; /* 0x390052AD: mov dword ptr [ecx + 8], esi */
  15816     esi = MEM32(edx); /* 0x390052B0: mov esi, dword ptr [edx] */
  15817     /* cmp esi, MEM32(edi + 0x8) */ /* 0x390052B2: cmp esi, dword ptr [edi + 8] */
  15818     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15819     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15820     _flag_k = FK_CMP;
  15821     if (CMP_EQ(_flag_a, _flag_b)) goto L_390052BA; /* 0x390052B5: je 0x390052ba */
  15822 L_390052B7:
  15823     MEM32(esi + 0x4) = ecx; /* 0x390052B7: mov dword ptr [esi + 4], ecx */
  15824 L_390052BA:
  15825     esi = MEM32(ecx + 0x4); /* 0x390052BA: mov esi, dword ptr [ecx + 4] */
  15826     MEM32(edx + 0x4) = esi; /* 0x390052BD: mov dword ptr [edx + 4], esi */
  15827     esi = MEM32(edi + 0x4); /* 0x390052C0: mov esi, dword ptr [edi + 4] */
  15828     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x390052C3: cmp ecx, dword ptr [esi + 4] */
  15829     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15830     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15831     _flag_k = FK_CMP;
  15832     if (CMP_NE(_flag_a, _flag_b)) goto L_390052CD; /* 0x390052C6: jne 0x390052cd */
  15833 L_390052C8:
  15834     MEM32(esi + 0x4) = edx; /* 0x390052C8: mov dword ptr [esi + 4], edx */
  15835     goto L_390052DB; /* 0x390052CB: jmp 0x390052db */
  15836 L_390052CD:
  15837     esi = MEM32(ecx + 0x4); /* 0x390052CD: mov esi, dword ptr [ecx + 4] */
  15838     /* cmp ecx, MEM32(esi) */ /* 0x390052D0: cmp ecx, dword ptr [esi] */
  15839     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  15840     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15841     _flag_k = FK_CMP;
  15842     if (CMP_NE(_flag_a, _flag_b)) goto L_390052D8; /* 0x390052D2: jne 0x390052d8 */
  15843 L_390052D4:
  15844     MEM32(esi) = edx; /* 0x390052D4: mov dword ptr [esi], edx */
  15845     goto L_390052DB; /* 0x390052D6: jmp 0x390052db */
  15846 L_390052D8:
  15847     MEM32(esi + 0x8) = edx; /* 0x390052D8: mov dword ptr [esi + 8], edx */
  15848 L_390052DB:
  15849     MEM32(edx) = ecx; /* 0x390052DB: mov dword ptr [edx], ecx */
  15850     MEM32(ecx + 0x4) = edx; /* 0x390052DD: mov dword ptr [ecx + 4], edx */
  15851     ecx = MEM32(eax + 0x4); /* 0x390052E0: mov ecx, dword ptr [eax + 4] */
  15852     ecx = MEM32(ecx); /* 0x390052E3: mov ecx, dword ptr [ecx] */
  15853 L_390052E5:
  15854     edx = MEM32(eax + 0x4); /* 0x390052E5: mov edx, dword ptr [eax + 4] */
  15855     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x390052E8: mov dl, byte ptr [edx + 0x14] */
  15856     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x390052EB: mov byte ptr [ecx + 0x14], dl */
  15857     edx = MEM32(eax + 0x4); /* 0x390052EE: mov edx, dword ptr [eax + 4] */
  15858     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F1: mov byte ptr [edx + 0x14], bl */
  15859     ecx = MEM32(ecx); /* 0x390052F4: mov ecx, dword ptr [ecx] */
  15860     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F6: mov byte ptr [ecx + 0x14], bl */
  15861     ecx = MEM32(eax + 0x4); /* 0x390052F9: mov ecx, dword ptr [eax + 4] */
  15862     edx = MEM32(ecx); /* 0x390052FC: mov edx, dword ptr [ecx] */
  15863     esi = MEM32(edx + 0x8); /* 0x390052FE: mov esi, dword ptr [edx + 8] */
  15864     MEM32(ecx) = esi; /* 0x39005301: mov dword ptr [ecx], esi */
  15865     esi = MEM32(edx + 0x8); /* 0x39005303: mov esi, dword ptr [edx + 8] */
  15866     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005306: cmp esi, dword ptr [edi + 8] */
  15867     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15868     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15869     _flag_k = FK_CMP;
  15870     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900530E; /* 0x39005309: je 0x3900530e */
  15871 L_3900530B:
  15872     MEM32(esi + 0x4) = ecx; /* 0x3900530B: mov dword ptr [esi + 4], ecx */
  15873 L_3900530E:
  15874     esi = MEM32(ecx + 0x4); /* 0x3900530E: mov esi, dword ptr [ecx + 4] */
  15875     MEM32(edx + 0x4) = esi; /* 0x39005311: mov dword ptr [edx + 4], esi */
  15876     esi = MEM32(edi + 0x4); /* 0x39005314: mov esi, dword ptr [edi + 4] */
  15877     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005317: cmp ecx, dword ptr [esi + 4] */
  15878     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15879     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15880     _flag_k = FK_CMP;
  15881     if (CMP_NE(_flag_a, _flag_b)) goto L_39005321; /* 0x3900531A: jne 0x39005321 */
  15882 L_3900531C:
  15883     MEM32(esi + 0x4) = edx; /* 0x3900531C: mov dword ptr [esi + 4], edx */
  15884     goto L_39005330; /* 0x3900531F: jmp 0x39005330 */
  15885 L_39005321:
  15886     esi = MEM32(ecx + 0x4); /* 0x39005321: mov esi, dword ptr [ecx + 4] */
  15887     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005324: cmp ecx, dword ptr [esi + 8] */
  15888     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  15889     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15890     _flag_k = FK_CMP;
  15891     if (CMP_NE(_flag_a, _flag_b)) goto L_3900532E; /* 0x39005327: jne 0x3900532e */
  15892 L_39005329:
  15893     MEM32(esi + 0x8) = edx; /* 0x39005329: mov dword ptr [esi + 8], edx */
  15894     goto L_39005330; /* 0x3900532C: jmp 0x39005330 */
  15895 L_3900532E:
  15896     MEM32(esi) = edx; /* 0x3900532E: mov dword ptr [esi], edx */
  15897 L_39005330:
  15898     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  15899 L_39005333:
  15900     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  15901 L_39005336:
  15902     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  15903 L_39005339:
  15904     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  15905     PUSH32(esp, edx); /* 0x3900533C: push edx */
  15906     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  15907     RECOMP_FLAGS_IN();
  15908     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  15909     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  15910     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  15911     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  15912     esp = esp + 4; /* 0x39005348: add esp, 4 */
  15913     _flag_k = FK_ADD;
  15914     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  15915     eax = eax - 1; /* 0x3900534B: dec eax */
  15916     _flag_k = FK_DEC;
  15917     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  15918     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  15919     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  15920     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  15921     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  15922     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  15923     esp = ebp; /* 0x39005357: mov esp, ebp */
  15924     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  15925     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  15926     RECOMP_REGS_OUT();
  15927 }
  15928 
  15929 void sub_390050CB(void) {
  15930     int _fpu_cmp = 0;
  15931     uint32_t _cf = 0;
  15932     int _df = 1;
  15933     uint32_t _flag_k = FK_NONE;
  15934     uint32_t _flag_a = 0, _flag_b = 0;
  15935     uint32_t _itail_tgt = 0;
  15936     RECOMP_REGS_LOCALS
  15937     RECOMP_ENTER(0x390050CBu);
  15938 
  15939 L_390050CB:
  15940     MEM32(ebx + 0x8) = edx; /* 0x390050CB: mov dword ptr [ebx + 8], edx */
  15941     ecx = MEM32(ebp + (-0x4)); /* 0x390050CE: mov ecx, dword ptr [ebp - 4] */
  15942     SET_LO8(ebx, 1); /* 0x390050D1: mov bl, 1 */
  15943     /* cmp MEM8(ecx + 0x14), LO8(ebx) */ /* 0x390050D3: cmp byte ptr [ecx + 0x14], bl */
  15944     _flag_a = (uint32_t)(MEM8(ecx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15945     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15946     _flag_k = FK_NARROW(FK_CMP, 24);
  15947     if (CMP_NE(_flag_a, _flag_b)) goto L_39005339; /* 0x390050D6: jne 0x39005339 */
  15948 L_390050DC:
  15949     edx = MEM32(edi + 0x4); /* 0x390050DC: mov edx, dword ptr [edi + 4] */
  15950     /* cmp eax, MEM32(edx + 0x4) */ /* 0x390050DF: cmp eax, dword ptr [edx + 4] */
  15951     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4));
  15952     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15953     _flag_k = FK_CMP;
  15954     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005336; /* 0x390050E2: je 0x39005336 */
  15955 L_390050E8:
  15956     /* cmp MEM8(eax + 0x14), LO8(ebx) */ /* 0x390050E8: cmp byte ptr [eax + 0x14], bl */
  15957     _flag_a = (uint32_t)(MEM8(eax + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  15958     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15959     _flag_k = FK_NARROW(FK_CMP, 24);
  15960     if (CMP_NE(_flag_a, _flag_b)) goto L_39005336; /* 0x390050EB: jne 0x39005336 */
  15961 L_390050F1:
  15962     edx = MEM32(eax + 0x4); /* 0x390050F1: mov edx, dword ptr [eax + 4] */
  15963     ecx = MEM32(edx); /* 0x390050F4: mov ecx, dword ptr [edx] */
  15964     /* cmp eax, ecx */ /* 0x390050F6: cmp eax, ecx */
  15965     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  15966     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15967     _flag_k = FK_CMP;
  15968     if (CMP_NE(_flag_a, _flag_b)) goto L_39005168; /* 0x390050F8: jne 0x39005168 */
  15969 L_390050FA:
  15970     ecx = MEM32(edx + 0x8); /* 0x390050FA: mov ecx, dword ptr [edx + 8] */
  15971     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390050FD: mov dl, byte ptr [ecx + 0x14] */
  15972     /* test LO8(edx), LO8(edx) */ /* 0x39005100: test dl, dl */
  15973     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  15974     _cf = 0;
  15975     _flag_k = FK_NARROW(FK_TEST, 24);
  15976     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900514F; /* 0x39005102: jne 0x3900514f */
  15977 L_39005104:
  15978     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005104: mov byte ptr [ecx + 0x14], bl */
  15979     ecx = MEM32(eax + 0x4); /* 0x39005107: mov ecx, dword ptr [eax + 4] */
  15980     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900510A: mov byte ptr [ecx + 0x14], 0 */
  15981     ecx = MEM32(eax + 0x4); /* 0x3900510E: mov ecx, dword ptr [eax + 4] */
  15982     edx = MEM32(ecx + 0x8); /* 0x39005111: mov edx, dword ptr [ecx + 8] */
  15983     esi = MEM32(edx); /* 0x39005114: mov esi, dword ptr [edx] */
  15984     MEM32(ecx + 0x8) = esi; /* 0x39005116: mov dword ptr [ecx + 8], esi */
  15985     esi = MEM32(edx); /* 0x39005119: mov esi, dword ptr [edx] */
  15986     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900511B: cmp esi, dword ptr [edi + 8] */
  15987     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  15988     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  15989     _flag_k = FK_CMP;
  15990     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005123; /* 0x3900511E: je 0x39005123 */
  15991 L_39005120:
  15992     MEM32(esi + 0x4) = ecx; /* 0x39005120: mov dword ptr [esi + 4], ecx */
  15993 L_39005123:
  15994     esi = MEM32(ecx + 0x4); /* 0x39005123: mov esi, dword ptr [ecx + 4] */
  15995     MEM32(edx + 0x4) = esi; /* 0x39005126: mov dword ptr [edx + 4], esi */
  15996     esi = MEM32(edi + 0x4); /* 0x39005129: mov esi, dword ptr [edi + 4] */
  15997     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900512C: cmp ecx, dword ptr [esi + 4] */
  15998     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  15999     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16000     _flag_k = FK_CMP;
  16001     if (CMP_NE(_flag_a, _flag_b)) goto L_39005136; /* 0x3900512F: jne 0x39005136 */
  16002 L_39005131:
  16003     MEM32(esi + 0x4) = edx; /* 0x39005131: mov dword ptr [esi + 4], edx */
  16004     goto L_39005144; /* 0x39005134: jmp 0x39005144 */
  16005 L_39005136:
  16006     esi = MEM32(ecx + 0x4); /* 0x39005136: mov esi, dword ptr [ecx + 4] */
  16007     /* cmp ecx, MEM32(esi) */ /* 0x39005139: cmp ecx, dword ptr [esi] */
  16008     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  16009     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16010     _flag_k = FK_CMP;
  16011     if (CMP_NE(_flag_a, _flag_b)) goto L_39005141; /* 0x3900513B: jne 0x39005141 */
  16012 L_3900513D:
  16013     MEM32(esi) = edx; /* 0x3900513D: mov dword ptr [esi], edx */
  16014     goto L_39005144; /* 0x3900513F: jmp 0x39005144 */
  16015 L_39005141:
  16016     MEM32(esi + 0x8) = edx; /* 0x39005141: mov dword ptr [esi + 8], edx */
  16017 L_39005144:
  16018     MEM32(edx) = ecx; /* 0x39005144: mov dword ptr [edx], ecx */
  16019     MEM32(ecx + 0x4) = edx; /* 0x39005146: mov dword ptr [ecx + 4], edx */
  16020     edx = MEM32(eax + 0x4); /* 0x39005149: mov edx, dword ptr [eax + 4] */
  16021     ecx = MEM32(edx + 0x8); /* 0x3900514C: mov ecx, dword ptr [edx + 8] */
  16022 L_3900514F:
  16023     edx = MEM32(ecx); /* 0x3900514F: mov edx, dword ptr [ecx] */
  16024     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005151: cmp byte ptr [edx + 0x14], bl */
  16025     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16026     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16027     _flag_k = FK_NARROW(FK_CMP, 24);
  16028     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005154: jne 0x390051ea */
  16029 L_3900515A:
  16030     edx = MEM32(ecx + 0x8); /* 0x3900515A: mov edx, dword ptr [ecx + 8] */
  16031     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x3900515D: cmp byte ptr [edx + 0x14], bl */
  16032     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16033     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16034     _flag_k = FK_NARROW(FK_CMP, 24);
  16035     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005160: jne 0x390051ea */
  16036 L_39005166:
  16037     goto L_390051D2; /* 0x39005166: jmp 0x390051d2 */
  16038 L_39005168:
  16039     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x39005168: mov dl, byte ptr [ecx + 0x14] */
  16040     /* test LO8(edx), LO8(edx) */ /* 0x3900516B: test dl, dl */
  16041     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  16042     _cf = 0;
  16043     _flag_k = FK_NARROW(FK_TEST, 24);
  16044     if (TEST_NZ(_flag_a, _flag_b)) goto L_390051BB; /* 0x3900516D: jne 0x390051bb */
  16045 L_3900516F:
  16046     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900516F: mov byte ptr [ecx + 0x14], bl */
  16047     ecx = MEM32(eax + 0x4); /* 0x39005172: mov ecx, dword ptr [eax + 4] */
  16048     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005175: mov byte ptr [ecx + 0x14], 0 */
  16049     ecx = MEM32(eax + 0x4); /* 0x39005179: mov ecx, dword ptr [eax + 4] */
  16050     edx = MEM32(ecx); /* 0x3900517C: mov edx, dword ptr [ecx] */
  16051     esi = MEM32(edx + 0x8); /* 0x3900517E: mov esi, dword ptr [edx + 8] */
  16052     MEM32(ecx) = esi; /* 0x39005181: mov dword ptr [ecx], esi */
  16053     esi = MEM32(edx + 0x8); /* 0x39005183: mov esi, dword ptr [edx + 8] */
  16054     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005186: cmp esi, dword ptr [edi + 8] */
  16055     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16056     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16057     _flag_k = FK_CMP;
  16058     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900518E; /* 0x39005189: je 0x3900518e */
  16059 L_3900518B:
  16060     MEM32(esi + 0x4) = ecx; /* 0x3900518B: mov dword ptr [esi + 4], ecx */
  16061 L_3900518E:
  16062     esi = MEM32(ecx + 0x4); /* 0x3900518E: mov esi, dword ptr [ecx + 4] */
  16063     MEM32(edx + 0x4) = esi; /* 0x39005191: mov dword ptr [edx + 4], esi */
  16064     esi = MEM32(edi + 0x4); /* 0x39005194: mov esi, dword ptr [edi + 4] */
  16065     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005197: cmp ecx, dword ptr [esi + 4] */
  16066     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16067     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16068     _flag_k = FK_CMP;
  16069     if (CMP_NE(_flag_a, _flag_b)) goto L_390051A1; /* 0x3900519A: jne 0x390051a1 */
  16070 L_3900519C:
  16071     MEM32(esi + 0x4) = edx; /* 0x3900519C: mov dword ptr [esi + 4], edx */
  16072     goto L_390051B0; /* 0x3900519F: jmp 0x390051b0 */
  16073 L_390051A1:
  16074     esi = MEM32(ecx + 0x4); /* 0x390051A1: mov esi, dword ptr [ecx + 4] */
  16075     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x390051A4: cmp ecx, dword ptr [esi + 8] */
  16076     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  16077     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16078     _flag_k = FK_CMP;
  16079     if (CMP_NE(_flag_a, _flag_b)) goto L_390051AE; /* 0x390051A7: jne 0x390051ae */
  16080 L_390051A9:
  16081     MEM32(esi + 0x8) = edx; /* 0x390051A9: mov dword ptr [esi + 8], edx */
  16082     goto L_390051B0; /* 0x390051AC: jmp 0x390051b0 */
  16083 L_390051AE:
  16084     MEM32(esi) = edx; /* 0x390051AE: mov dword ptr [esi], edx */
  16085 L_390051B0:
  16086     MEM32(edx + 0x8) = ecx; /* 0x390051B0: mov dword ptr [edx + 8], ecx */
  16087     MEM32(ecx + 0x4) = edx; /* 0x390051B3: mov dword ptr [ecx + 4], edx */
  16088     edx = MEM32(eax + 0x4); /* 0x390051B6: mov edx, dword ptr [eax + 4] */
  16089     ecx = MEM32(edx); /* 0x390051B9: mov ecx, dword ptr [edx] */
  16090 L_390051BB:
  16091     edx = MEM32(ecx + 0x8); /* 0x390051BB: mov edx, dword ptr [ecx + 8] */
  16092     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051BE: cmp byte ptr [edx + 0x14], bl */
  16093     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16094     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16095     _flag_k = FK_NARROW(FK_CMP, 24);
  16096     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051C1: jne 0x39005297 */
  16097 L_390051C7:
  16098     edx = MEM32(ecx); /* 0x390051C7: mov edx, dword ptr [ecx] */
  16099     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051C9: cmp byte ptr [edx + 0x14], bl */
  16100     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16101     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16102     _flag_k = FK_NARROW(FK_CMP, 24);
  16103     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051CC: jne 0x39005297 */
  16104 L_390051D2:
  16105     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051D2: mov byte ptr [ecx + 0x14], 0 */
  16106     ecx = MEM32(edi + 0x4); /* 0x390051D6: mov ecx, dword ptr [edi + 4] */
  16107     eax = MEM32(eax + 0x4); /* 0x390051D9: mov eax, dword ptr [eax + 4] */
  16108     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x390051DC: cmp eax, dword ptr [ecx + 4] */
  16109     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  16110     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16111     _flag_k = FK_CMP;
  16112     RECOMP_BACKEDGE();
  16113     if (CMP_NE(_flag_a, _flag_b)) goto L_390050E8; /* 0x390051DF: jne 0x390050e8 */
  16114 L_390051E5:
  16115     goto L_39005336; /* 0x390051E5: jmp 0x39005336 */
  16116 L_390051EA:
  16117     edx = MEM32(ecx + 0x8); /* 0x390051EA: mov edx, dword ptr [ecx + 8] */
  16118     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051ED: cmp byte ptr [edx + 0x14], bl */
  16119     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16120     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16121     _flag_k = FK_NARROW(FK_CMP, 24);
  16122     if (CMP_NE(_flag_a, _flag_b)) goto L_3900523B; /* 0x390051F0: jne 0x3900523b */
  16123 L_390051F2:
  16124     edx = MEM32(ecx); /* 0x390051F2: mov edx, dword ptr [ecx] */
  16125     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390051F4: mov byte ptr [edx + 0x14], bl */
  16126     edx = MEM32(ecx); /* 0x390051F7: mov edx, dword ptr [ecx] */
  16127     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051F9: mov byte ptr [ecx + 0x14], 0 */
  16128     esi = MEM32(edx + 0x8); /* 0x390051FD: mov esi, dword ptr [edx + 8] */
  16129     MEM32(ecx) = esi; /* 0x39005200: mov dword ptr [ecx], esi */
  16130     esi = MEM32(edx + 0x8); /* 0x39005202: mov esi, dword ptr [edx + 8] */
  16131     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005205: cmp esi, dword ptr [edi + 8] */
  16132     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16133     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16134     _flag_k = FK_CMP;
  16135     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900520D; /* 0x39005208: je 0x3900520d */
  16136 L_3900520A:
  16137     MEM32(esi + 0x4) = ecx; /* 0x3900520A: mov dword ptr [esi + 4], ecx */
  16138 L_3900520D:
  16139     esi = MEM32(ecx + 0x4); /* 0x3900520D: mov esi, dword ptr [ecx + 4] */
  16140     MEM32(edx + 0x4) = esi; /* 0x39005210: mov dword ptr [edx + 4], esi */
  16141     esi = MEM32(edi + 0x4); /* 0x39005213: mov esi, dword ptr [edi + 4] */
  16142     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005216: cmp ecx, dword ptr [esi + 4] */
  16143     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16144     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16145     _flag_k = FK_CMP;
  16146     if (CMP_NE(_flag_a, _flag_b)) goto L_39005220; /* 0x39005219: jne 0x39005220 */
  16147 L_3900521B:
  16148     MEM32(esi + 0x4) = edx; /* 0x3900521B: mov dword ptr [esi + 4], edx */
  16149     goto L_3900522F; /* 0x3900521E: jmp 0x3900522f */
  16150 L_39005220:
  16151     esi = MEM32(ecx + 0x4); /* 0x39005220: mov esi, dword ptr [ecx + 4] */
  16152     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005223: cmp ecx, dword ptr [esi + 8] */
  16153     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  16154     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16155     _flag_k = FK_CMP;
  16156     if (CMP_NE(_flag_a, _flag_b)) goto L_3900522D; /* 0x39005226: jne 0x3900522d */
  16157 L_39005228:
  16158     MEM32(esi + 0x8) = edx; /* 0x39005228: mov dword ptr [esi + 8], edx */
  16159     goto L_3900522F; /* 0x3900522B: jmp 0x3900522f */
  16160 L_3900522D:
  16161     MEM32(esi) = edx; /* 0x3900522D: mov dword ptr [esi], edx */
  16162 L_3900522F:
  16163     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  16164     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  16165     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  16166     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  16167 L_3900523B:
  16168     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  16169     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  16170     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  16171     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  16172     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  16173     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  16174     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  16175     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  16176     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  16177     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  16178     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  16179     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  16180     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  16181     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16182     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16183     _flag_k = FK_CMP;
  16184     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  16185 L_39005262:
  16186     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  16187 L_39005265:
  16188     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  16189     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  16190     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  16191     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  16192     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16193     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16194     _flag_k = FK_CMP;
  16195     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  16196 L_39005273:
  16197     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  16198     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  16199     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  16200 L_3900527D:
  16201     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  16202     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  16203     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  16204     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16205     _flag_k = FK_CMP;
  16206     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  16207 L_39005284:
  16208     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  16209     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  16210     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  16211 L_3900528D:
  16212     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  16213     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  16214     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  16215 L_39005297:
  16216     edx = MEM32(ecx); /* 0x39005297: mov edx, dword ptr [ecx] */
  16217     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005299: cmp byte ptr [edx + 0x14], bl */
  16218     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16219     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16220     _flag_k = FK_NARROW(FK_CMP, 24);
  16221     if (CMP_NE(_flag_a, _flag_b)) goto L_390052E5; /* 0x3900529C: jne 0x390052e5 */
  16222 L_3900529E:
  16223     edx = MEM32(ecx + 0x8); /* 0x3900529E: mov edx, dword ptr [ecx + 8] */
  16224     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052A1: mov byte ptr [edx + 0x14], bl */
  16225     edx = MEM32(ecx + 0x8); /* 0x390052A4: mov edx, dword ptr [ecx + 8] */
  16226     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390052A7: mov byte ptr [ecx + 0x14], 0 */
  16227     esi = MEM32(edx); /* 0x390052AB: mov esi, dword ptr [edx] */
  16228     MEM32(ecx + 0x8) = esi; /* 0x390052AD: mov dword ptr [ecx + 8], esi */
  16229     esi = MEM32(edx); /* 0x390052B0: mov esi, dword ptr [edx] */
  16230     /* cmp esi, MEM32(edi + 0x8) */ /* 0x390052B2: cmp esi, dword ptr [edi + 8] */
  16231     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16232     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16233     _flag_k = FK_CMP;
  16234     if (CMP_EQ(_flag_a, _flag_b)) goto L_390052BA; /* 0x390052B5: je 0x390052ba */
  16235 L_390052B7:
  16236     MEM32(esi + 0x4) = ecx; /* 0x390052B7: mov dword ptr [esi + 4], ecx */
  16237 L_390052BA:
  16238     esi = MEM32(ecx + 0x4); /* 0x390052BA: mov esi, dword ptr [ecx + 4] */
  16239     MEM32(edx + 0x4) = esi; /* 0x390052BD: mov dword ptr [edx + 4], esi */
  16240     esi = MEM32(edi + 0x4); /* 0x390052C0: mov esi, dword ptr [edi + 4] */
  16241     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x390052C3: cmp ecx, dword ptr [esi + 4] */
  16242     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16243     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16244     _flag_k = FK_CMP;
  16245     if (CMP_NE(_flag_a, _flag_b)) goto L_390052CD; /* 0x390052C6: jne 0x390052cd */
  16246 L_390052C8:
  16247     MEM32(esi + 0x4) = edx; /* 0x390052C8: mov dword ptr [esi + 4], edx */
  16248     goto L_390052DB; /* 0x390052CB: jmp 0x390052db */
  16249 L_390052CD:
  16250     esi = MEM32(ecx + 0x4); /* 0x390052CD: mov esi, dword ptr [ecx + 4] */
  16251     /* cmp ecx, MEM32(esi) */ /* 0x390052D0: cmp ecx, dword ptr [esi] */
  16252     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  16253     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16254     _flag_k = FK_CMP;
  16255     if (CMP_NE(_flag_a, _flag_b)) goto L_390052D8; /* 0x390052D2: jne 0x390052d8 */
  16256 L_390052D4:
  16257     MEM32(esi) = edx; /* 0x390052D4: mov dword ptr [esi], edx */
  16258     goto L_390052DB; /* 0x390052D6: jmp 0x390052db */
  16259 L_390052D8:
  16260     MEM32(esi + 0x8) = edx; /* 0x390052D8: mov dword ptr [esi + 8], edx */
  16261 L_390052DB:
  16262     MEM32(edx) = ecx; /* 0x390052DB: mov dword ptr [edx], ecx */
  16263     MEM32(ecx + 0x4) = edx; /* 0x390052DD: mov dword ptr [ecx + 4], edx */
  16264     ecx = MEM32(eax + 0x4); /* 0x390052E0: mov ecx, dword ptr [eax + 4] */
  16265     ecx = MEM32(ecx); /* 0x390052E3: mov ecx, dword ptr [ecx] */
  16266 L_390052E5:
  16267     edx = MEM32(eax + 0x4); /* 0x390052E5: mov edx, dword ptr [eax + 4] */
  16268     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x390052E8: mov dl, byte ptr [edx + 0x14] */
  16269     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x390052EB: mov byte ptr [ecx + 0x14], dl */
  16270     edx = MEM32(eax + 0x4); /* 0x390052EE: mov edx, dword ptr [eax + 4] */
  16271     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F1: mov byte ptr [edx + 0x14], bl */
  16272     ecx = MEM32(ecx); /* 0x390052F4: mov ecx, dword ptr [ecx] */
  16273     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F6: mov byte ptr [ecx + 0x14], bl */
  16274     ecx = MEM32(eax + 0x4); /* 0x390052F9: mov ecx, dword ptr [eax + 4] */
  16275     edx = MEM32(ecx); /* 0x390052FC: mov edx, dword ptr [ecx] */
  16276     esi = MEM32(edx + 0x8); /* 0x390052FE: mov esi, dword ptr [edx + 8] */
  16277     MEM32(ecx) = esi; /* 0x39005301: mov dword ptr [ecx], esi */
  16278     esi = MEM32(edx + 0x8); /* 0x39005303: mov esi, dword ptr [edx + 8] */
  16279     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005306: cmp esi, dword ptr [edi + 8] */
  16280     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16281     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16282     _flag_k = FK_CMP;
  16283     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900530E; /* 0x39005309: je 0x3900530e */
  16284 L_3900530B:
  16285     MEM32(esi + 0x4) = ecx; /* 0x3900530B: mov dword ptr [esi + 4], ecx */
  16286 L_3900530E:
  16287     esi = MEM32(ecx + 0x4); /* 0x3900530E: mov esi, dword ptr [ecx + 4] */
  16288     MEM32(edx + 0x4) = esi; /* 0x39005311: mov dword ptr [edx + 4], esi */
  16289     esi = MEM32(edi + 0x4); /* 0x39005314: mov esi, dword ptr [edi + 4] */
  16290     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005317: cmp ecx, dword ptr [esi + 4] */
  16291     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16292     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16293     _flag_k = FK_CMP;
  16294     if (CMP_NE(_flag_a, _flag_b)) goto L_39005321; /* 0x3900531A: jne 0x39005321 */
  16295 L_3900531C:
  16296     MEM32(esi + 0x4) = edx; /* 0x3900531C: mov dword ptr [esi + 4], edx */
  16297     goto L_39005330; /* 0x3900531F: jmp 0x39005330 */
  16298 L_39005321:
  16299     esi = MEM32(ecx + 0x4); /* 0x39005321: mov esi, dword ptr [ecx + 4] */
  16300     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005324: cmp ecx, dword ptr [esi + 8] */
  16301     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  16302     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16303     _flag_k = FK_CMP;
  16304     if (CMP_NE(_flag_a, _flag_b)) goto L_3900532E; /* 0x39005327: jne 0x3900532e */
  16305 L_39005329:
  16306     MEM32(esi + 0x8) = edx; /* 0x39005329: mov dword ptr [esi + 8], edx */
  16307     goto L_39005330; /* 0x3900532C: jmp 0x39005330 */
  16308 L_3900532E:
  16309     MEM32(esi) = edx; /* 0x3900532E: mov dword ptr [esi], edx */
  16310 L_39005330:
  16311     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  16312 L_39005333:
  16313     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  16314 L_39005336:
  16315     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  16316 L_39005339:
  16317     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  16318     PUSH32(esp, edx); /* 0x3900533C: push edx */
  16319     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  16320     RECOMP_FLAGS_IN();
  16321     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  16322     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  16323     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  16324     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  16325     esp = esp + 4; /* 0x39005348: add esp, 4 */
  16326     _flag_k = FK_ADD;
  16327     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  16328     eax = eax - 1; /* 0x3900534B: dec eax */
  16329     _flag_k = FK_DEC;
  16330     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  16331     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  16332     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  16333     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  16334     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  16335     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  16336     esp = ebp; /* 0x39005357: mov esp, ebp */
  16337     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  16338     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  16339     RECOMP_REGS_OUT();
  16340 }
  16341 
  16342 void sub_390050E8(void) {
  16343     int _fpu_cmp = 0;
  16344     uint32_t _cf = 0;
  16345     int _df = 1;
  16346     uint32_t _flag_k = FK_NONE;
  16347     uint32_t _flag_a = 0, _flag_b = 0;
  16348     uint32_t _itail_tgt = 0;
  16349     RECOMP_REGS_LOCALS
  16350     RECOMP_ENTER(0x390050E8u);
  16351 
  16352 L_390050E8:
  16353     /* cmp MEM8(eax + 0x14), LO8(ebx) */ /* 0x390050E8: cmp byte ptr [eax + 0x14], bl */
  16354     _flag_a = (uint32_t)(MEM8(eax + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16355     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16356     _flag_k = FK_NARROW(FK_CMP, 24);
  16357     if (CMP_NE(_flag_a, _flag_b)) goto L_39005336; /* 0x390050EB: jne 0x39005336 */
  16358 L_390050F1:
  16359     edx = MEM32(eax + 0x4); /* 0x390050F1: mov edx, dword ptr [eax + 4] */
  16360     ecx = MEM32(edx); /* 0x390050F4: mov ecx, dword ptr [edx] */
  16361     /* cmp eax, ecx */ /* 0x390050F6: cmp eax, ecx */
  16362     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  16363     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16364     _flag_k = FK_CMP;
  16365     if (CMP_NE(_flag_a, _flag_b)) goto L_39005168; /* 0x390050F8: jne 0x39005168 */
  16366 L_390050FA:
  16367     ecx = MEM32(edx + 0x8); /* 0x390050FA: mov ecx, dword ptr [edx + 8] */
  16368     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390050FD: mov dl, byte ptr [ecx + 0x14] */
  16369     /* test LO8(edx), LO8(edx) */ /* 0x39005100: test dl, dl */
  16370     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  16371     _cf = 0;
  16372     _flag_k = FK_NARROW(FK_TEST, 24);
  16373     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900514F; /* 0x39005102: jne 0x3900514f */
  16374 L_39005104:
  16375     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005104: mov byte ptr [ecx + 0x14], bl */
  16376     ecx = MEM32(eax + 0x4); /* 0x39005107: mov ecx, dword ptr [eax + 4] */
  16377     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900510A: mov byte ptr [ecx + 0x14], 0 */
  16378     ecx = MEM32(eax + 0x4); /* 0x3900510E: mov ecx, dword ptr [eax + 4] */
  16379     edx = MEM32(ecx + 0x8); /* 0x39005111: mov edx, dword ptr [ecx + 8] */
  16380     esi = MEM32(edx); /* 0x39005114: mov esi, dword ptr [edx] */
  16381     MEM32(ecx + 0x8) = esi; /* 0x39005116: mov dword ptr [ecx + 8], esi */
  16382     esi = MEM32(edx); /* 0x39005119: mov esi, dword ptr [edx] */
  16383     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900511B: cmp esi, dword ptr [edi + 8] */
  16384     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16385     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16386     _flag_k = FK_CMP;
  16387     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005123; /* 0x3900511E: je 0x39005123 */
  16388 L_39005120:
  16389     MEM32(esi + 0x4) = ecx; /* 0x39005120: mov dword ptr [esi + 4], ecx */
  16390 L_39005123:
  16391     esi = MEM32(ecx + 0x4); /* 0x39005123: mov esi, dword ptr [ecx + 4] */
  16392     MEM32(edx + 0x4) = esi; /* 0x39005126: mov dword ptr [edx + 4], esi */
  16393     esi = MEM32(edi + 0x4); /* 0x39005129: mov esi, dword ptr [edi + 4] */
  16394     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900512C: cmp ecx, dword ptr [esi + 4] */
  16395     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16396     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16397     _flag_k = FK_CMP;
  16398     if (CMP_NE(_flag_a, _flag_b)) goto L_39005136; /* 0x3900512F: jne 0x39005136 */
  16399 L_39005131:
  16400     MEM32(esi + 0x4) = edx; /* 0x39005131: mov dword ptr [esi + 4], edx */
  16401     goto L_39005144; /* 0x39005134: jmp 0x39005144 */
  16402 L_39005136:
  16403     esi = MEM32(ecx + 0x4); /* 0x39005136: mov esi, dword ptr [ecx + 4] */
  16404     /* cmp ecx, MEM32(esi) */ /* 0x39005139: cmp ecx, dword ptr [esi] */
  16405     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  16406     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16407     _flag_k = FK_CMP;
  16408     if (CMP_NE(_flag_a, _flag_b)) goto L_39005141; /* 0x3900513B: jne 0x39005141 */
  16409 L_3900513D:
  16410     MEM32(esi) = edx; /* 0x3900513D: mov dword ptr [esi], edx */
  16411     goto L_39005144; /* 0x3900513F: jmp 0x39005144 */
  16412 L_39005141:
  16413     MEM32(esi + 0x8) = edx; /* 0x39005141: mov dword ptr [esi + 8], edx */
  16414 L_39005144:
  16415     MEM32(edx) = ecx; /* 0x39005144: mov dword ptr [edx], ecx */
  16416     MEM32(ecx + 0x4) = edx; /* 0x39005146: mov dword ptr [ecx + 4], edx */
  16417     edx = MEM32(eax + 0x4); /* 0x39005149: mov edx, dword ptr [eax + 4] */
  16418     ecx = MEM32(edx + 0x8); /* 0x3900514C: mov ecx, dword ptr [edx + 8] */
  16419 L_3900514F:
  16420     edx = MEM32(ecx); /* 0x3900514F: mov edx, dword ptr [ecx] */
  16421     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005151: cmp byte ptr [edx + 0x14], bl */
  16422     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16423     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16424     _flag_k = FK_NARROW(FK_CMP, 24);
  16425     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005154: jne 0x390051ea */
  16426 L_3900515A:
  16427     edx = MEM32(ecx + 0x8); /* 0x3900515A: mov edx, dword ptr [ecx + 8] */
  16428     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x3900515D: cmp byte ptr [edx + 0x14], bl */
  16429     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16430     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16431     _flag_k = FK_NARROW(FK_CMP, 24);
  16432     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005160: jne 0x390051ea */
  16433 L_39005166:
  16434     goto L_390051D2; /* 0x39005166: jmp 0x390051d2 */
  16435 L_39005168:
  16436     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x39005168: mov dl, byte ptr [ecx + 0x14] */
  16437     /* test LO8(edx), LO8(edx) */ /* 0x3900516B: test dl, dl */
  16438     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  16439     _cf = 0;
  16440     _flag_k = FK_NARROW(FK_TEST, 24);
  16441     if (TEST_NZ(_flag_a, _flag_b)) goto L_390051BB; /* 0x3900516D: jne 0x390051bb */
  16442 L_3900516F:
  16443     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900516F: mov byte ptr [ecx + 0x14], bl */
  16444     ecx = MEM32(eax + 0x4); /* 0x39005172: mov ecx, dword ptr [eax + 4] */
  16445     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005175: mov byte ptr [ecx + 0x14], 0 */
  16446     ecx = MEM32(eax + 0x4); /* 0x39005179: mov ecx, dword ptr [eax + 4] */
  16447     edx = MEM32(ecx); /* 0x3900517C: mov edx, dword ptr [ecx] */
  16448     esi = MEM32(edx + 0x8); /* 0x3900517E: mov esi, dword ptr [edx + 8] */
  16449     MEM32(ecx) = esi; /* 0x39005181: mov dword ptr [ecx], esi */
  16450     esi = MEM32(edx + 0x8); /* 0x39005183: mov esi, dword ptr [edx + 8] */
  16451     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005186: cmp esi, dword ptr [edi + 8] */
  16452     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16453     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16454     _flag_k = FK_CMP;
  16455     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900518E; /* 0x39005189: je 0x3900518e */
  16456 L_3900518B:
  16457     MEM32(esi + 0x4) = ecx; /* 0x3900518B: mov dword ptr [esi + 4], ecx */
  16458 L_3900518E:
  16459     esi = MEM32(ecx + 0x4); /* 0x3900518E: mov esi, dword ptr [ecx + 4] */
  16460     MEM32(edx + 0x4) = esi; /* 0x39005191: mov dword ptr [edx + 4], esi */
  16461     esi = MEM32(edi + 0x4); /* 0x39005194: mov esi, dword ptr [edi + 4] */
  16462     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005197: cmp ecx, dword ptr [esi + 4] */
  16463     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16464     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16465     _flag_k = FK_CMP;
  16466     if (CMP_NE(_flag_a, _flag_b)) goto L_390051A1; /* 0x3900519A: jne 0x390051a1 */
  16467 L_3900519C:
  16468     MEM32(esi + 0x4) = edx; /* 0x3900519C: mov dword ptr [esi + 4], edx */
  16469     goto L_390051B0; /* 0x3900519F: jmp 0x390051b0 */
  16470 L_390051A1:
  16471     esi = MEM32(ecx + 0x4); /* 0x390051A1: mov esi, dword ptr [ecx + 4] */
  16472     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x390051A4: cmp ecx, dword ptr [esi + 8] */
  16473     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  16474     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16475     _flag_k = FK_CMP;
  16476     if (CMP_NE(_flag_a, _flag_b)) goto L_390051AE; /* 0x390051A7: jne 0x390051ae */
  16477 L_390051A9:
  16478     MEM32(esi + 0x8) = edx; /* 0x390051A9: mov dword ptr [esi + 8], edx */
  16479     goto L_390051B0; /* 0x390051AC: jmp 0x390051b0 */
  16480 L_390051AE:
  16481     MEM32(esi) = edx; /* 0x390051AE: mov dword ptr [esi], edx */
  16482 L_390051B0:
  16483     MEM32(edx + 0x8) = ecx; /* 0x390051B0: mov dword ptr [edx + 8], ecx */
  16484     MEM32(ecx + 0x4) = edx; /* 0x390051B3: mov dword ptr [ecx + 4], edx */
  16485     edx = MEM32(eax + 0x4); /* 0x390051B6: mov edx, dword ptr [eax + 4] */
  16486     ecx = MEM32(edx); /* 0x390051B9: mov ecx, dword ptr [edx] */
  16487 L_390051BB:
  16488     edx = MEM32(ecx + 0x8); /* 0x390051BB: mov edx, dword ptr [ecx + 8] */
  16489     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051BE: cmp byte ptr [edx + 0x14], bl */
  16490     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16491     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16492     _flag_k = FK_NARROW(FK_CMP, 24);
  16493     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051C1: jne 0x39005297 */
  16494 L_390051C7:
  16495     edx = MEM32(ecx); /* 0x390051C7: mov edx, dword ptr [ecx] */
  16496     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051C9: cmp byte ptr [edx + 0x14], bl */
  16497     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16498     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16499     _flag_k = FK_NARROW(FK_CMP, 24);
  16500     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051CC: jne 0x39005297 */
  16501 L_390051D2:
  16502     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051D2: mov byte ptr [ecx + 0x14], 0 */
  16503     ecx = MEM32(edi + 0x4); /* 0x390051D6: mov ecx, dword ptr [edi + 4] */
  16504     eax = MEM32(eax + 0x4); /* 0x390051D9: mov eax, dword ptr [eax + 4] */
  16505     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x390051DC: cmp eax, dword ptr [ecx + 4] */
  16506     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  16507     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16508     _flag_k = FK_CMP;
  16509     RECOMP_BACKEDGE();
  16510     if (CMP_NE(_flag_a, _flag_b)) goto L_390050E8; /* 0x390051DF: jne 0x390050e8 */
  16511 L_390051E5:
  16512     goto L_39005336; /* 0x390051E5: jmp 0x39005336 */
  16513 L_390051EA:
  16514     edx = MEM32(ecx + 0x8); /* 0x390051EA: mov edx, dword ptr [ecx + 8] */
  16515     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051ED: cmp byte ptr [edx + 0x14], bl */
  16516     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16517     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16518     _flag_k = FK_NARROW(FK_CMP, 24);
  16519     if (CMP_NE(_flag_a, _flag_b)) goto L_3900523B; /* 0x390051F0: jne 0x3900523b */
  16520 L_390051F2:
  16521     edx = MEM32(ecx); /* 0x390051F2: mov edx, dword ptr [ecx] */
  16522     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390051F4: mov byte ptr [edx + 0x14], bl */
  16523     edx = MEM32(ecx); /* 0x390051F7: mov edx, dword ptr [ecx] */
  16524     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051F9: mov byte ptr [ecx + 0x14], 0 */
  16525     esi = MEM32(edx + 0x8); /* 0x390051FD: mov esi, dword ptr [edx + 8] */
  16526     MEM32(ecx) = esi; /* 0x39005200: mov dword ptr [ecx], esi */
  16527     esi = MEM32(edx + 0x8); /* 0x39005202: mov esi, dword ptr [edx + 8] */
  16528     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005205: cmp esi, dword ptr [edi + 8] */
  16529     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16530     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16531     _flag_k = FK_CMP;
  16532     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900520D; /* 0x39005208: je 0x3900520d */
  16533 L_3900520A:
  16534     MEM32(esi + 0x4) = ecx; /* 0x3900520A: mov dword ptr [esi + 4], ecx */
  16535 L_3900520D:
  16536     esi = MEM32(ecx + 0x4); /* 0x3900520D: mov esi, dword ptr [ecx + 4] */
  16537     MEM32(edx + 0x4) = esi; /* 0x39005210: mov dword ptr [edx + 4], esi */
  16538     esi = MEM32(edi + 0x4); /* 0x39005213: mov esi, dword ptr [edi + 4] */
  16539     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005216: cmp ecx, dword ptr [esi + 4] */
  16540     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16541     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16542     _flag_k = FK_CMP;
  16543     if (CMP_NE(_flag_a, _flag_b)) goto L_39005220; /* 0x39005219: jne 0x39005220 */
  16544 L_3900521B:
  16545     MEM32(esi + 0x4) = edx; /* 0x3900521B: mov dword ptr [esi + 4], edx */
  16546     goto L_3900522F; /* 0x3900521E: jmp 0x3900522f */
  16547 L_39005220:
  16548     esi = MEM32(ecx + 0x4); /* 0x39005220: mov esi, dword ptr [ecx + 4] */
  16549     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005223: cmp ecx, dword ptr [esi + 8] */
  16550     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  16551     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16552     _flag_k = FK_CMP;
  16553     if (CMP_NE(_flag_a, _flag_b)) goto L_3900522D; /* 0x39005226: jne 0x3900522d */
  16554 L_39005228:
  16555     MEM32(esi + 0x8) = edx; /* 0x39005228: mov dword ptr [esi + 8], edx */
  16556     goto L_3900522F; /* 0x3900522B: jmp 0x3900522f */
  16557 L_3900522D:
  16558     MEM32(esi) = edx; /* 0x3900522D: mov dword ptr [esi], edx */
  16559 L_3900522F:
  16560     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  16561     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  16562     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  16563     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  16564 L_3900523B:
  16565     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  16566     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  16567     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  16568     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  16569     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  16570     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  16571     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  16572     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  16573     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  16574     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  16575     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  16576     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  16577     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  16578     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16579     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16580     _flag_k = FK_CMP;
  16581     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  16582 L_39005262:
  16583     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  16584 L_39005265:
  16585     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  16586     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  16587     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  16588     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  16589     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16590     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16591     _flag_k = FK_CMP;
  16592     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  16593 L_39005273:
  16594     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  16595     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  16596     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  16597 L_3900527D:
  16598     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  16599     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  16600     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  16601     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16602     _flag_k = FK_CMP;
  16603     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  16604 L_39005284:
  16605     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  16606     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  16607     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  16608 L_3900528D:
  16609     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  16610     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  16611     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  16612 L_39005297:
  16613     edx = MEM32(ecx); /* 0x39005297: mov edx, dword ptr [ecx] */
  16614     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005299: cmp byte ptr [edx + 0x14], bl */
  16615     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16616     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16617     _flag_k = FK_NARROW(FK_CMP, 24);
  16618     if (CMP_NE(_flag_a, _flag_b)) goto L_390052E5; /* 0x3900529C: jne 0x390052e5 */
  16619 L_3900529E:
  16620     edx = MEM32(ecx + 0x8); /* 0x3900529E: mov edx, dword ptr [ecx + 8] */
  16621     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052A1: mov byte ptr [edx + 0x14], bl */
  16622     edx = MEM32(ecx + 0x8); /* 0x390052A4: mov edx, dword ptr [ecx + 8] */
  16623     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390052A7: mov byte ptr [ecx + 0x14], 0 */
  16624     esi = MEM32(edx); /* 0x390052AB: mov esi, dword ptr [edx] */
  16625     MEM32(ecx + 0x8) = esi; /* 0x390052AD: mov dword ptr [ecx + 8], esi */
  16626     esi = MEM32(edx); /* 0x390052B0: mov esi, dword ptr [edx] */
  16627     /* cmp esi, MEM32(edi + 0x8) */ /* 0x390052B2: cmp esi, dword ptr [edi + 8] */
  16628     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16629     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16630     _flag_k = FK_CMP;
  16631     if (CMP_EQ(_flag_a, _flag_b)) goto L_390052BA; /* 0x390052B5: je 0x390052ba */
  16632 L_390052B7:
  16633     MEM32(esi + 0x4) = ecx; /* 0x390052B7: mov dword ptr [esi + 4], ecx */
  16634 L_390052BA:
  16635     esi = MEM32(ecx + 0x4); /* 0x390052BA: mov esi, dword ptr [ecx + 4] */
  16636     MEM32(edx + 0x4) = esi; /* 0x390052BD: mov dword ptr [edx + 4], esi */
  16637     esi = MEM32(edi + 0x4); /* 0x390052C0: mov esi, dword ptr [edi + 4] */
  16638     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x390052C3: cmp ecx, dword ptr [esi + 4] */
  16639     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16640     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16641     _flag_k = FK_CMP;
  16642     if (CMP_NE(_flag_a, _flag_b)) goto L_390052CD; /* 0x390052C6: jne 0x390052cd */
  16643 L_390052C8:
  16644     MEM32(esi + 0x4) = edx; /* 0x390052C8: mov dword ptr [esi + 4], edx */
  16645     goto L_390052DB; /* 0x390052CB: jmp 0x390052db */
  16646 L_390052CD:
  16647     esi = MEM32(ecx + 0x4); /* 0x390052CD: mov esi, dword ptr [ecx + 4] */
  16648     /* cmp ecx, MEM32(esi) */ /* 0x390052D0: cmp ecx, dword ptr [esi] */
  16649     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  16650     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16651     _flag_k = FK_CMP;
  16652     if (CMP_NE(_flag_a, _flag_b)) goto L_390052D8; /* 0x390052D2: jne 0x390052d8 */
  16653 L_390052D4:
  16654     MEM32(esi) = edx; /* 0x390052D4: mov dword ptr [esi], edx */
  16655     goto L_390052DB; /* 0x390052D6: jmp 0x390052db */
  16656 L_390052D8:
  16657     MEM32(esi + 0x8) = edx; /* 0x390052D8: mov dword ptr [esi + 8], edx */
  16658 L_390052DB:
  16659     MEM32(edx) = ecx; /* 0x390052DB: mov dword ptr [edx], ecx */
  16660     MEM32(ecx + 0x4) = edx; /* 0x390052DD: mov dword ptr [ecx + 4], edx */
  16661     ecx = MEM32(eax + 0x4); /* 0x390052E0: mov ecx, dword ptr [eax + 4] */
  16662     ecx = MEM32(ecx); /* 0x390052E3: mov ecx, dword ptr [ecx] */
  16663 L_390052E5:
  16664     edx = MEM32(eax + 0x4); /* 0x390052E5: mov edx, dword ptr [eax + 4] */
  16665     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x390052E8: mov dl, byte ptr [edx + 0x14] */
  16666     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x390052EB: mov byte ptr [ecx + 0x14], dl */
  16667     edx = MEM32(eax + 0x4); /* 0x390052EE: mov edx, dword ptr [eax + 4] */
  16668     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F1: mov byte ptr [edx + 0x14], bl */
  16669     ecx = MEM32(ecx); /* 0x390052F4: mov ecx, dword ptr [ecx] */
  16670     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F6: mov byte ptr [ecx + 0x14], bl */
  16671     ecx = MEM32(eax + 0x4); /* 0x390052F9: mov ecx, dword ptr [eax + 4] */
  16672     edx = MEM32(ecx); /* 0x390052FC: mov edx, dword ptr [ecx] */
  16673     esi = MEM32(edx + 0x8); /* 0x390052FE: mov esi, dword ptr [edx + 8] */
  16674     MEM32(ecx) = esi; /* 0x39005301: mov dword ptr [ecx], esi */
  16675     esi = MEM32(edx + 0x8); /* 0x39005303: mov esi, dword ptr [edx + 8] */
  16676     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005306: cmp esi, dword ptr [edi + 8] */
  16677     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16678     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16679     _flag_k = FK_CMP;
  16680     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900530E; /* 0x39005309: je 0x3900530e */
  16681 L_3900530B:
  16682     MEM32(esi + 0x4) = ecx; /* 0x3900530B: mov dword ptr [esi + 4], ecx */
  16683 L_3900530E:
  16684     esi = MEM32(ecx + 0x4); /* 0x3900530E: mov esi, dword ptr [ecx + 4] */
  16685     MEM32(edx + 0x4) = esi; /* 0x39005311: mov dword ptr [edx + 4], esi */
  16686     esi = MEM32(edi + 0x4); /* 0x39005314: mov esi, dword ptr [edi + 4] */
  16687     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005317: cmp ecx, dword ptr [esi + 4] */
  16688     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16689     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16690     _flag_k = FK_CMP;
  16691     if (CMP_NE(_flag_a, _flag_b)) goto L_39005321; /* 0x3900531A: jne 0x39005321 */
  16692 L_3900531C:
  16693     MEM32(esi + 0x4) = edx; /* 0x3900531C: mov dword ptr [esi + 4], edx */
  16694     goto L_39005330; /* 0x3900531F: jmp 0x39005330 */
  16695 L_39005321:
  16696     esi = MEM32(ecx + 0x4); /* 0x39005321: mov esi, dword ptr [ecx + 4] */
  16697     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005324: cmp ecx, dword ptr [esi + 8] */
  16698     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  16699     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16700     _flag_k = FK_CMP;
  16701     if (CMP_NE(_flag_a, _flag_b)) goto L_3900532E; /* 0x39005327: jne 0x3900532e */
  16702 L_39005329:
  16703     MEM32(esi + 0x8) = edx; /* 0x39005329: mov dword ptr [esi + 8], edx */
  16704     goto L_39005330; /* 0x3900532C: jmp 0x39005330 */
  16705 L_3900532E:
  16706     MEM32(esi) = edx; /* 0x3900532E: mov dword ptr [esi], edx */
  16707 L_39005330:
  16708     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  16709 L_39005333:
  16710     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  16711 L_39005336:
  16712     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  16713     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  16714     PUSH32(esp, edx); /* 0x3900533C: push edx */
  16715     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  16716     RECOMP_FLAGS_IN();
  16717     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  16718     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  16719     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  16720     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  16721     esp = esp + 4; /* 0x39005348: add esp, 4 */
  16722     _flag_k = FK_ADD;
  16723     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  16724     eax = eax - 1; /* 0x3900534B: dec eax */
  16725     _flag_k = FK_DEC;
  16726     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  16727     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  16728     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  16729     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  16730     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  16731     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  16732     esp = ebp; /* 0x39005357: mov esp, ebp */
  16733     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  16734     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  16735     RECOMP_REGS_OUT();
  16736 }
  16737 
  16738 void sub_39005144(void) {
  16739     int _fpu_cmp = 0;
  16740     uint32_t _cf = 0;
  16741     int _df = 1;
  16742     uint32_t _flag_k = FK_NONE;
  16743     uint32_t _flag_a = 0, _flag_b = 0;
  16744     uint32_t _itail_tgt = 0;
  16745     RECOMP_REGS_LOCALS
  16746     RECOMP_ENTER(0x39005144u);
  16747 
  16748     goto L_39005144;
  16749 L_390050E8:
  16750     /* cmp MEM8(eax + 0x14), LO8(ebx) */ /* 0x390050E8: cmp byte ptr [eax + 0x14], bl */
  16751     _flag_a = (uint32_t)(MEM8(eax + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16752     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16753     _flag_k = FK_NARROW(FK_CMP, 24);
  16754     if (CMP_NE(_flag_a, _flag_b)) goto L_39005336; /* 0x390050EB: jne 0x39005336 */
  16755 L_390050F1:
  16756     edx = MEM32(eax + 0x4); /* 0x390050F1: mov edx, dword ptr [eax + 4] */
  16757     ecx = MEM32(edx); /* 0x390050F4: mov ecx, dword ptr [edx] */
  16758     /* cmp eax, ecx */ /* 0x390050F6: cmp eax, ecx */
  16759     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  16760     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16761     _flag_k = FK_CMP;
  16762     if (CMP_NE(_flag_a, _flag_b)) goto L_39005168; /* 0x390050F8: jne 0x39005168 */
  16763 L_390050FA:
  16764     ecx = MEM32(edx + 0x8); /* 0x390050FA: mov ecx, dword ptr [edx + 8] */
  16765     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390050FD: mov dl, byte ptr [ecx + 0x14] */
  16766     /* test LO8(edx), LO8(edx) */ /* 0x39005100: test dl, dl */
  16767     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  16768     _cf = 0;
  16769     _flag_k = FK_NARROW(FK_TEST, 24);
  16770     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900514F; /* 0x39005102: jne 0x3900514f */
  16771 L_39005104:
  16772     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005104: mov byte ptr [ecx + 0x14], bl */
  16773     ecx = MEM32(eax + 0x4); /* 0x39005107: mov ecx, dword ptr [eax + 4] */
  16774     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900510A: mov byte ptr [ecx + 0x14], 0 */
  16775     ecx = MEM32(eax + 0x4); /* 0x3900510E: mov ecx, dword ptr [eax + 4] */
  16776     edx = MEM32(ecx + 0x8); /* 0x39005111: mov edx, dword ptr [ecx + 8] */
  16777     esi = MEM32(edx); /* 0x39005114: mov esi, dword ptr [edx] */
  16778     MEM32(ecx + 0x8) = esi; /* 0x39005116: mov dword ptr [ecx + 8], esi */
  16779     esi = MEM32(edx); /* 0x39005119: mov esi, dword ptr [edx] */
  16780     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900511B: cmp esi, dword ptr [edi + 8] */
  16781     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16782     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16783     _flag_k = FK_CMP;
  16784     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005123; /* 0x3900511E: je 0x39005123 */
  16785 L_39005120:
  16786     MEM32(esi + 0x4) = ecx; /* 0x39005120: mov dword ptr [esi + 4], ecx */
  16787 L_39005123:
  16788     esi = MEM32(ecx + 0x4); /* 0x39005123: mov esi, dword ptr [ecx + 4] */
  16789     MEM32(edx + 0x4) = esi; /* 0x39005126: mov dword ptr [edx + 4], esi */
  16790     esi = MEM32(edi + 0x4); /* 0x39005129: mov esi, dword ptr [edi + 4] */
  16791     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900512C: cmp ecx, dword ptr [esi + 4] */
  16792     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16793     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16794     _flag_k = FK_CMP;
  16795     if (CMP_NE(_flag_a, _flag_b)) goto L_39005136; /* 0x3900512F: jne 0x39005136 */
  16796 L_39005131:
  16797     MEM32(esi + 0x4) = edx; /* 0x39005131: mov dword ptr [esi + 4], edx */
  16798     goto L_39005144; /* 0x39005134: jmp 0x39005144 */
  16799 L_39005136:
  16800     esi = MEM32(ecx + 0x4); /* 0x39005136: mov esi, dword ptr [ecx + 4] */
  16801     /* cmp ecx, MEM32(esi) */ /* 0x39005139: cmp ecx, dword ptr [esi] */
  16802     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  16803     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16804     _flag_k = FK_CMP;
  16805     if (CMP_NE(_flag_a, _flag_b)) goto L_39005141; /* 0x3900513B: jne 0x39005141 */
  16806 L_3900513D:
  16807     MEM32(esi) = edx; /* 0x3900513D: mov dword ptr [esi], edx */
  16808     goto L_39005144; /* 0x3900513F: jmp 0x39005144 */
  16809 L_39005141:
  16810     MEM32(esi + 0x8) = edx; /* 0x39005141: mov dword ptr [esi + 8], edx */
  16811 L_39005144:
  16812     MEM32(edx) = ecx; /* 0x39005144: mov dword ptr [edx], ecx */
  16813     MEM32(ecx + 0x4) = edx; /* 0x39005146: mov dword ptr [ecx + 4], edx */
  16814     edx = MEM32(eax + 0x4); /* 0x39005149: mov edx, dword ptr [eax + 4] */
  16815     ecx = MEM32(edx + 0x8); /* 0x3900514C: mov ecx, dword ptr [edx + 8] */
  16816 L_3900514F:
  16817     edx = MEM32(ecx); /* 0x3900514F: mov edx, dword ptr [ecx] */
  16818     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005151: cmp byte ptr [edx + 0x14], bl */
  16819     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16820     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16821     _flag_k = FK_NARROW(FK_CMP, 24);
  16822     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005154: jne 0x390051ea */
  16823 L_3900515A:
  16824     edx = MEM32(ecx + 0x8); /* 0x3900515A: mov edx, dword ptr [ecx + 8] */
  16825     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x3900515D: cmp byte ptr [edx + 0x14], bl */
  16826     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16827     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16828     _flag_k = FK_NARROW(FK_CMP, 24);
  16829     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005160: jne 0x390051ea */
  16830 L_39005166:
  16831     goto L_390051D2; /* 0x39005166: jmp 0x390051d2 */
  16832 L_39005168:
  16833     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x39005168: mov dl, byte ptr [ecx + 0x14] */
  16834     /* test LO8(edx), LO8(edx) */ /* 0x3900516B: test dl, dl */
  16835     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  16836     _cf = 0;
  16837     _flag_k = FK_NARROW(FK_TEST, 24);
  16838     if (TEST_NZ(_flag_a, _flag_b)) goto L_390051BB; /* 0x3900516D: jne 0x390051bb */
  16839 L_3900516F:
  16840     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900516F: mov byte ptr [ecx + 0x14], bl */
  16841     ecx = MEM32(eax + 0x4); /* 0x39005172: mov ecx, dword ptr [eax + 4] */
  16842     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005175: mov byte ptr [ecx + 0x14], 0 */
  16843     ecx = MEM32(eax + 0x4); /* 0x39005179: mov ecx, dword ptr [eax + 4] */
  16844     edx = MEM32(ecx); /* 0x3900517C: mov edx, dword ptr [ecx] */
  16845     esi = MEM32(edx + 0x8); /* 0x3900517E: mov esi, dword ptr [edx + 8] */
  16846     MEM32(ecx) = esi; /* 0x39005181: mov dword ptr [ecx], esi */
  16847     esi = MEM32(edx + 0x8); /* 0x39005183: mov esi, dword ptr [edx + 8] */
  16848     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005186: cmp esi, dword ptr [edi + 8] */
  16849     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16850     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16851     _flag_k = FK_CMP;
  16852     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900518E; /* 0x39005189: je 0x3900518e */
  16853 L_3900518B:
  16854     MEM32(esi + 0x4) = ecx; /* 0x3900518B: mov dword ptr [esi + 4], ecx */
  16855 L_3900518E:
  16856     esi = MEM32(ecx + 0x4); /* 0x3900518E: mov esi, dword ptr [ecx + 4] */
  16857     MEM32(edx + 0x4) = esi; /* 0x39005191: mov dword ptr [edx + 4], esi */
  16858     esi = MEM32(edi + 0x4); /* 0x39005194: mov esi, dword ptr [edi + 4] */
  16859     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005197: cmp ecx, dword ptr [esi + 4] */
  16860     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16861     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16862     _flag_k = FK_CMP;
  16863     if (CMP_NE(_flag_a, _flag_b)) goto L_390051A1; /* 0x3900519A: jne 0x390051a1 */
  16864 L_3900519C:
  16865     MEM32(esi + 0x4) = edx; /* 0x3900519C: mov dword ptr [esi + 4], edx */
  16866     goto L_390051B0; /* 0x3900519F: jmp 0x390051b0 */
  16867 L_390051A1:
  16868     esi = MEM32(ecx + 0x4); /* 0x390051A1: mov esi, dword ptr [ecx + 4] */
  16869     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x390051A4: cmp ecx, dword ptr [esi + 8] */
  16870     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  16871     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16872     _flag_k = FK_CMP;
  16873     if (CMP_NE(_flag_a, _flag_b)) goto L_390051AE; /* 0x390051A7: jne 0x390051ae */
  16874 L_390051A9:
  16875     MEM32(esi + 0x8) = edx; /* 0x390051A9: mov dword ptr [esi + 8], edx */
  16876     goto L_390051B0; /* 0x390051AC: jmp 0x390051b0 */
  16877 L_390051AE:
  16878     MEM32(esi) = edx; /* 0x390051AE: mov dword ptr [esi], edx */
  16879 L_390051B0:
  16880     MEM32(edx + 0x8) = ecx; /* 0x390051B0: mov dword ptr [edx + 8], ecx */
  16881     MEM32(ecx + 0x4) = edx; /* 0x390051B3: mov dword ptr [ecx + 4], edx */
  16882     edx = MEM32(eax + 0x4); /* 0x390051B6: mov edx, dword ptr [eax + 4] */
  16883     ecx = MEM32(edx); /* 0x390051B9: mov ecx, dword ptr [edx] */
  16884 L_390051BB:
  16885     edx = MEM32(ecx + 0x8); /* 0x390051BB: mov edx, dword ptr [ecx + 8] */
  16886     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051BE: cmp byte ptr [edx + 0x14], bl */
  16887     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16888     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16889     _flag_k = FK_NARROW(FK_CMP, 24);
  16890     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051C1: jne 0x39005297 */
  16891 L_390051C7:
  16892     edx = MEM32(ecx); /* 0x390051C7: mov edx, dword ptr [ecx] */
  16893     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051C9: cmp byte ptr [edx + 0x14], bl */
  16894     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16895     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16896     _flag_k = FK_NARROW(FK_CMP, 24);
  16897     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051CC: jne 0x39005297 */
  16898 L_390051D2:
  16899     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051D2: mov byte ptr [ecx + 0x14], 0 */
  16900     ecx = MEM32(edi + 0x4); /* 0x390051D6: mov ecx, dword ptr [edi + 4] */
  16901     eax = MEM32(eax + 0x4); /* 0x390051D9: mov eax, dword ptr [eax + 4] */
  16902     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x390051DC: cmp eax, dword ptr [ecx + 4] */
  16903     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  16904     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16905     _flag_k = FK_CMP;
  16906     RECOMP_BACKEDGE();
  16907     if (CMP_NE(_flag_a, _flag_b)) goto L_390050E8; /* 0x390051DF: jne 0x390050e8 */
  16908 L_390051E5:
  16909     goto L_39005336; /* 0x390051E5: jmp 0x39005336 */
  16910 L_390051EA:
  16911     edx = MEM32(ecx + 0x8); /* 0x390051EA: mov edx, dword ptr [ecx + 8] */
  16912     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051ED: cmp byte ptr [edx + 0x14], bl */
  16913     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  16914     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16915     _flag_k = FK_NARROW(FK_CMP, 24);
  16916     if (CMP_NE(_flag_a, _flag_b)) goto L_3900523B; /* 0x390051F0: jne 0x3900523b */
  16917 L_390051F2:
  16918     edx = MEM32(ecx); /* 0x390051F2: mov edx, dword ptr [ecx] */
  16919     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390051F4: mov byte ptr [edx + 0x14], bl */
  16920     edx = MEM32(ecx); /* 0x390051F7: mov edx, dword ptr [ecx] */
  16921     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051F9: mov byte ptr [ecx + 0x14], 0 */
  16922     esi = MEM32(edx + 0x8); /* 0x390051FD: mov esi, dword ptr [edx + 8] */
  16923     MEM32(ecx) = esi; /* 0x39005200: mov dword ptr [ecx], esi */
  16924     esi = MEM32(edx + 0x8); /* 0x39005202: mov esi, dword ptr [edx + 8] */
  16925     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005205: cmp esi, dword ptr [edi + 8] */
  16926     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16927     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16928     _flag_k = FK_CMP;
  16929     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900520D; /* 0x39005208: je 0x3900520d */
  16930 L_3900520A:
  16931     MEM32(esi + 0x4) = ecx; /* 0x3900520A: mov dword ptr [esi + 4], ecx */
  16932 L_3900520D:
  16933     esi = MEM32(ecx + 0x4); /* 0x3900520D: mov esi, dword ptr [ecx + 4] */
  16934     MEM32(edx + 0x4) = esi; /* 0x39005210: mov dword ptr [edx + 4], esi */
  16935     esi = MEM32(edi + 0x4); /* 0x39005213: mov esi, dword ptr [edi + 4] */
  16936     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005216: cmp ecx, dword ptr [esi + 4] */
  16937     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16938     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16939     _flag_k = FK_CMP;
  16940     if (CMP_NE(_flag_a, _flag_b)) goto L_39005220; /* 0x39005219: jne 0x39005220 */
  16941 L_3900521B:
  16942     MEM32(esi + 0x4) = edx; /* 0x3900521B: mov dword ptr [esi + 4], edx */
  16943     goto L_3900522F; /* 0x3900521E: jmp 0x3900522f */
  16944 L_39005220:
  16945     esi = MEM32(ecx + 0x4); /* 0x39005220: mov esi, dword ptr [ecx + 4] */
  16946     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005223: cmp ecx, dword ptr [esi + 8] */
  16947     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  16948     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16949     _flag_k = FK_CMP;
  16950     if (CMP_NE(_flag_a, _flag_b)) goto L_3900522D; /* 0x39005226: jne 0x3900522d */
  16951 L_39005228:
  16952     MEM32(esi + 0x8) = edx; /* 0x39005228: mov dword ptr [esi + 8], edx */
  16953     goto L_3900522F; /* 0x3900522B: jmp 0x3900522f */
  16954 L_3900522D:
  16955     MEM32(esi) = edx; /* 0x3900522D: mov dword ptr [esi], edx */
  16956 L_3900522F:
  16957     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  16958     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  16959     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  16960     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  16961 L_3900523B:
  16962     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  16963     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  16964     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  16965     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  16966     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  16967     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  16968     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  16969     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  16970     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  16971     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  16972     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  16973     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  16974     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  16975     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  16976     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16977     _flag_k = FK_CMP;
  16978     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  16979 L_39005262:
  16980     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  16981 L_39005265:
  16982     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  16983     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  16984     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  16985     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  16986     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  16987     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16988     _flag_k = FK_CMP;
  16989     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  16990 L_39005273:
  16991     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  16992     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  16993     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  16994 L_3900527D:
  16995     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  16996     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  16997     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  16998     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  16999     _flag_k = FK_CMP;
  17000     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  17001 L_39005284:
  17002     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  17003     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  17004     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  17005 L_3900528D:
  17006     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  17007     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  17008     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  17009 L_39005297:
  17010     edx = MEM32(ecx); /* 0x39005297: mov edx, dword ptr [ecx] */
  17011     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005299: cmp byte ptr [edx + 0x14], bl */
  17012     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17013     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17014     _flag_k = FK_NARROW(FK_CMP, 24);
  17015     if (CMP_NE(_flag_a, _flag_b)) goto L_390052E5; /* 0x3900529C: jne 0x390052e5 */
  17016 L_3900529E:
  17017     edx = MEM32(ecx + 0x8); /* 0x3900529E: mov edx, dword ptr [ecx + 8] */
  17018     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052A1: mov byte ptr [edx + 0x14], bl */
  17019     edx = MEM32(ecx + 0x8); /* 0x390052A4: mov edx, dword ptr [ecx + 8] */
  17020     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390052A7: mov byte ptr [ecx + 0x14], 0 */
  17021     esi = MEM32(edx); /* 0x390052AB: mov esi, dword ptr [edx] */
  17022     MEM32(ecx + 0x8) = esi; /* 0x390052AD: mov dword ptr [ecx + 8], esi */
  17023     esi = MEM32(edx); /* 0x390052B0: mov esi, dword ptr [edx] */
  17024     /* cmp esi, MEM32(edi + 0x8) */ /* 0x390052B2: cmp esi, dword ptr [edi + 8] */
  17025     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17026     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17027     _flag_k = FK_CMP;
  17028     if (CMP_EQ(_flag_a, _flag_b)) goto L_390052BA; /* 0x390052B5: je 0x390052ba */
  17029 L_390052B7:
  17030     MEM32(esi + 0x4) = ecx; /* 0x390052B7: mov dword ptr [esi + 4], ecx */
  17031 L_390052BA:
  17032     esi = MEM32(ecx + 0x4); /* 0x390052BA: mov esi, dword ptr [ecx + 4] */
  17033     MEM32(edx + 0x4) = esi; /* 0x390052BD: mov dword ptr [edx + 4], esi */
  17034     esi = MEM32(edi + 0x4); /* 0x390052C0: mov esi, dword ptr [edi + 4] */
  17035     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x390052C3: cmp ecx, dword ptr [esi + 4] */
  17036     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17037     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17038     _flag_k = FK_CMP;
  17039     if (CMP_NE(_flag_a, _flag_b)) goto L_390052CD; /* 0x390052C6: jne 0x390052cd */
  17040 L_390052C8:
  17041     MEM32(esi + 0x4) = edx; /* 0x390052C8: mov dword ptr [esi + 4], edx */
  17042     goto L_390052DB; /* 0x390052CB: jmp 0x390052db */
  17043 L_390052CD:
  17044     esi = MEM32(ecx + 0x4); /* 0x390052CD: mov esi, dword ptr [ecx + 4] */
  17045     /* cmp ecx, MEM32(esi) */ /* 0x390052D0: cmp ecx, dword ptr [esi] */
  17046     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  17047     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17048     _flag_k = FK_CMP;
  17049     if (CMP_NE(_flag_a, _flag_b)) goto L_390052D8; /* 0x390052D2: jne 0x390052d8 */
  17050 L_390052D4:
  17051     MEM32(esi) = edx; /* 0x390052D4: mov dword ptr [esi], edx */
  17052     goto L_390052DB; /* 0x390052D6: jmp 0x390052db */
  17053 L_390052D8:
  17054     MEM32(esi + 0x8) = edx; /* 0x390052D8: mov dword ptr [esi + 8], edx */
  17055 L_390052DB:
  17056     MEM32(edx) = ecx; /* 0x390052DB: mov dword ptr [edx], ecx */
  17057     MEM32(ecx + 0x4) = edx; /* 0x390052DD: mov dword ptr [ecx + 4], edx */
  17058     ecx = MEM32(eax + 0x4); /* 0x390052E0: mov ecx, dword ptr [eax + 4] */
  17059     ecx = MEM32(ecx); /* 0x390052E3: mov ecx, dword ptr [ecx] */
  17060 L_390052E5:
  17061     edx = MEM32(eax + 0x4); /* 0x390052E5: mov edx, dword ptr [eax + 4] */
  17062     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x390052E8: mov dl, byte ptr [edx + 0x14] */
  17063     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x390052EB: mov byte ptr [ecx + 0x14], dl */
  17064     edx = MEM32(eax + 0x4); /* 0x390052EE: mov edx, dword ptr [eax + 4] */
  17065     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F1: mov byte ptr [edx + 0x14], bl */
  17066     ecx = MEM32(ecx); /* 0x390052F4: mov ecx, dword ptr [ecx] */
  17067     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F6: mov byte ptr [ecx + 0x14], bl */
  17068     ecx = MEM32(eax + 0x4); /* 0x390052F9: mov ecx, dword ptr [eax + 4] */
  17069     edx = MEM32(ecx); /* 0x390052FC: mov edx, dword ptr [ecx] */
  17070     esi = MEM32(edx + 0x8); /* 0x390052FE: mov esi, dword ptr [edx + 8] */
  17071     MEM32(ecx) = esi; /* 0x39005301: mov dword ptr [ecx], esi */
  17072     esi = MEM32(edx + 0x8); /* 0x39005303: mov esi, dword ptr [edx + 8] */
  17073     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005306: cmp esi, dword ptr [edi + 8] */
  17074     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17075     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17076     _flag_k = FK_CMP;
  17077     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900530E; /* 0x39005309: je 0x3900530e */
  17078 L_3900530B:
  17079     MEM32(esi + 0x4) = ecx; /* 0x3900530B: mov dword ptr [esi + 4], ecx */
  17080 L_3900530E:
  17081     esi = MEM32(ecx + 0x4); /* 0x3900530E: mov esi, dword ptr [ecx + 4] */
  17082     MEM32(edx + 0x4) = esi; /* 0x39005311: mov dword ptr [edx + 4], esi */
  17083     esi = MEM32(edi + 0x4); /* 0x39005314: mov esi, dword ptr [edi + 4] */
  17084     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005317: cmp ecx, dword ptr [esi + 4] */
  17085     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17086     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17087     _flag_k = FK_CMP;
  17088     if (CMP_NE(_flag_a, _flag_b)) goto L_39005321; /* 0x3900531A: jne 0x39005321 */
  17089 L_3900531C:
  17090     MEM32(esi + 0x4) = edx; /* 0x3900531C: mov dword ptr [esi + 4], edx */
  17091     goto L_39005330; /* 0x3900531F: jmp 0x39005330 */
  17092 L_39005321:
  17093     esi = MEM32(ecx + 0x4); /* 0x39005321: mov esi, dword ptr [ecx + 4] */
  17094     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005324: cmp ecx, dword ptr [esi + 8] */
  17095     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  17096     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17097     _flag_k = FK_CMP;
  17098     if (CMP_NE(_flag_a, _flag_b)) goto L_3900532E; /* 0x39005327: jne 0x3900532e */
  17099 L_39005329:
  17100     MEM32(esi + 0x8) = edx; /* 0x39005329: mov dword ptr [esi + 8], edx */
  17101     goto L_39005330; /* 0x3900532C: jmp 0x39005330 */
  17102 L_3900532E:
  17103     MEM32(esi) = edx; /* 0x3900532E: mov dword ptr [esi], edx */
  17104 L_39005330:
  17105     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  17106 L_39005333:
  17107     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  17108 L_39005336:
  17109     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  17110     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  17111     PUSH32(esp, edx); /* 0x3900533C: push edx */
  17112     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  17113     RECOMP_FLAGS_IN();
  17114     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  17115     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  17116     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  17117     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  17118     esp = esp + 4; /* 0x39005348: add esp, 4 */
  17119     _flag_k = FK_ADD;
  17120     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  17121     eax = eax - 1; /* 0x3900534B: dec eax */
  17122     _flag_k = FK_DEC;
  17123     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  17124     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  17125     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  17126     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  17127     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  17128     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  17129     esp = ebp; /* 0x39005357: mov esp, ebp */
  17130     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  17131     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  17132     RECOMP_REGS_OUT();
  17133 }
  17134 
  17135 void sub_3900514F(void) {
  17136     int _fpu_cmp = 0;
  17137     uint32_t _cf = 0;
  17138     int _df = 1;
  17139     uint32_t _flag_k = FK_NONE;
  17140     uint32_t _flag_a = 0, _flag_b = 0;
  17141     uint32_t _itail_tgt = 0;
  17142     RECOMP_REGS_LOCALS
  17143     RECOMP_ENTER(0x3900514Fu);
  17144 
  17145     goto L_3900514F;
  17146 L_390050E8:
  17147     /* cmp MEM8(eax + 0x14), LO8(ebx) */ /* 0x390050E8: cmp byte ptr [eax + 0x14], bl */
  17148     _flag_a = (uint32_t)(MEM8(eax + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17149     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17150     _flag_k = FK_NARROW(FK_CMP, 24);
  17151     if (CMP_NE(_flag_a, _flag_b)) goto L_39005336; /* 0x390050EB: jne 0x39005336 */
  17152 L_390050F1:
  17153     edx = MEM32(eax + 0x4); /* 0x390050F1: mov edx, dword ptr [eax + 4] */
  17154     ecx = MEM32(edx); /* 0x390050F4: mov ecx, dword ptr [edx] */
  17155     /* cmp eax, ecx */ /* 0x390050F6: cmp eax, ecx */
  17156     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  17157     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17158     _flag_k = FK_CMP;
  17159     if (CMP_NE(_flag_a, _flag_b)) goto L_39005168; /* 0x390050F8: jne 0x39005168 */
  17160 L_390050FA:
  17161     ecx = MEM32(edx + 0x8); /* 0x390050FA: mov ecx, dword ptr [edx + 8] */
  17162     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390050FD: mov dl, byte ptr [ecx + 0x14] */
  17163     /* test LO8(edx), LO8(edx) */ /* 0x39005100: test dl, dl */
  17164     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  17165     _cf = 0;
  17166     _flag_k = FK_NARROW(FK_TEST, 24);
  17167     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900514F; /* 0x39005102: jne 0x3900514f */
  17168 L_39005104:
  17169     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005104: mov byte ptr [ecx + 0x14], bl */
  17170     ecx = MEM32(eax + 0x4); /* 0x39005107: mov ecx, dword ptr [eax + 4] */
  17171     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900510A: mov byte ptr [ecx + 0x14], 0 */
  17172     ecx = MEM32(eax + 0x4); /* 0x3900510E: mov ecx, dword ptr [eax + 4] */
  17173     edx = MEM32(ecx + 0x8); /* 0x39005111: mov edx, dword ptr [ecx + 8] */
  17174     esi = MEM32(edx); /* 0x39005114: mov esi, dword ptr [edx] */
  17175     MEM32(ecx + 0x8) = esi; /* 0x39005116: mov dword ptr [ecx + 8], esi */
  17176     esi = MEM32(edx); /* 0x39005119: mov esi, dword ptr [edx] */
  17177     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900511B: cmp esi, dword ptr [edi + 8] */
  17178     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17179     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17180     _flag_k = FK_CMP;
  17181     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005123; /* 0x3900511E: je 0x39005123 */
  17182 L_39005120:
  17183     MEM32(esi + 0x4) = ecx; /* 0x39005120: mov dword ptr [esi + 4], ecx */
  17184 L_39005123:
  17185     esi = MEM32(ecx + 0x4); /* 0x39005123: mov esi, dword ptr [ecx + 4] */
  17186     MEM32(edx + 0x4) = esi; /* 0x39005126: mov dword ptr [edx + 4], esi */
  17187     esi = MEM32(edi + 0x4); /* 0x39005129: mov esi, dword ptr [edi + 4] */
  17188     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900512C: cmp ecx, dword ptr [esi + 4] */
  17189     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17190     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17191     _flag_k = FK_CMP;
  17192     if (CMP_NE(_flag_a, _flag_b)) goto L_39005136; /* 0x3900512F: jne 0x39005136 */
  17193 L_39005131:
  17194     MEM32(esi + 0x4) = edx; /* 0x39005131: mov dword ptr [esi + 4], edx */
  17195     goto L_39005144; /* 0x39005134: jmp 0x39005144 */
  17196 L_39005136:
  17197     esi = MEM32(ecx + 0x4); /* 0x39005136: mov esi, dword ptr [ecx + 4] */
  17198     /* cmp ecx, MEM32(esi) */ /* 0x39005139: cmp ecx, dword ptr [esi] */
  17199     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  17200     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17201     _flag_k = FK_CMP;
  17202     if (CMP_NE(_flag_a, _flag_b)) goto L_39005141; /* 0x3900513B: jne 0x39005141 */
  17203 L_3900513D:
  17204     MEM32(esi) = edx; /* 0x3900513D: mov dword ptr [esi], edx */
  17205     goto L_39005144; /* 0x3900513F: jmp 0x39005144 */
  17206 L_39005141:
  17207     MEM32(esi + 0x8) = edx; /* 0x39005141: mov dword ptr [esi + 8], edx */
  17208 L_39005144:
  17209     MEM32(edx) = ecx; /* 0x39005144: mov dword ptr [edx], ecx */
  17210     MEM32(ecx + 0x4) = edx; /* 0x39005146: mov dword ptr [ecx + 4], edx */
  17211     edx = MEM32(eax + 0x4); /* 0x39005149: mov edx, dword ptr [eax + 4] */
  17212     ecx = MEM32(edx + 0x8); /* 0x3900514C: mov ecx, dword ptr [edx + 8] */
  17213 L_3900514F:
  17214     edx = MEM32(ecx); /* 0x3900514F: mov edx, dword ptr [ecx] */
  17215     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005151: cmp byte ptr [edx + 0x14], bl */
  17216     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17217     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17218     _flag_k = FK_NARROW(FK_CMP, 24);
  17219     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005154: jne 0x390051ea */
  17220 L_3900515A:
  17221     edx = MEM32(ecx + 0x8); /* 0x3900515A: mov edx, dword ptr [ecx + 8] */
  17222     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x3900515D: cmp byte ptr [edx + 0x14], bl */
  17223     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17224     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17225     _flag_k = FK_NARROW(FK_CMP, 24);
  17226     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005160: jne 0x390051ea */
  17227 L_39005166:
  17228     goto L_390051D2; /* 0x39005166: jmp 0x390051d2 */
  17229 L_39005168:
  17230     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x39005168: mov dl, byte ptr [ecx + 0x14] */
  17231     /* test LO8(edx), LO8(edx) */ /* 0x3900516B: test dl, dl */
  17232     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  17233     _cf = 0;
  17234     _flag_k = FK_NARROW(FK_TEST, 24);
  17235     if (TEST_NZ(_flag_a, _flag_b)) goto L_390051BB; /* 0x3900516D: jne 0x390051bb */
  17236 L_3900516F:
  17237     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900516F: mov byte ptr [ecx + 0x14], bl */
  17238     ecx = MEM32(eax + 0x4); /* 0x39005172: mov ecx, dword ptr [eax + 4] */
  17239     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005175: mov byte ptr [ecx + 0x14], 0 */
  17240     ecx = MEM32(eax + 0x4); /* 0x39005179: mov ecx, dword ptr [eax + 4] */
  17241     edx = MEM32(ecx); /* 0x3900517C: mov edx, dword ptr [ecx] */
  17242     esi = MEM32(edx + 0x8); /* 0x3900517E: mov esi, dword ptr [edx + 8] */
  17243     MEM32(ecx) = esi; /* 0x39005181: mov dword ptr [ecx], esi */
  17244     esi = MEM32(edx + 0x8); /* 0x39005183: mov esi, dword ptr [edx + 8] */
  17245     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005186: cmp esi, dword ptr [edi + 8] */
  17246     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17247     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17248     _flag_k = FK_CMP;
  17249     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900518E; /* 0x39005189: je 0x3900518e */
  17250 L_3900518B:
  17251     MEM32(esi + 0x4) = ecx; /* 0x3900518B: mov dword ptr [esi + 4], ecx */
  17252 L_3900518E:
  17253     esi = MEM32(ecx + 0x4); /* 0x3900518E: mov esi, dword ptr [ecx + 4] */
  17254     MEM32(edx + 0x4) = esi; /* 0x39005191: mov dword ptr [edx + 4], esi */
  17255     esi = MEM32(edi + 0x4); /* 0x39005194: mov esi, dword ptr [edi + 4] */
  17256     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005197: cmp ecx, dword ptr [esi + 4] */
  17257     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17258     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17259     _flag_k = FK_CMP;
  17260     if (CMP_NE(_flag_a, _flag_b)) goto L_390051A1; /* 0x3900519A: jne 0x390051a1 */
  17261 L_3900519C:
  17262     MEM32(esi + 0x4) = edx; /* 0x3900519C: mov dword ptr [esi + 4], edx */
  17263     goto L_390051B0; /* 0x3900519F: jmp 0x390051b0 */
  17264 L_390051A1:
  17265     esi = MEM32(ecx + 0x4); /* 0x390051A1: mov esi, dword ptr [ecx + 4] */
  17266     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x390051A4: cmp ecx, dword ptr [esi + 8] */
  17267     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  17268     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17269     _flag_k = FK_CMP;
  17270     if (CMP_NE(_flag_a, _flag_b)) goto L_390051AE; /* 0x390051A7: jne 0x390051ae */
  17271 L_390051A9:
  17272     MEM32(esi + 0x8) = edx; /* 0x390051A9: mov dword ptr [esi + 8], edx */
  17273     goto L_390051B0; /* 0x390051AC: jmp 0x390051b0 */
  17274 L_390051AE:
  17275     MEM32(esi) = edx; /* 0x390051AE: mov dword ptr [esi], edx */
  17276 L_390051B0:
  17277     MEM32(edx + 0x8) = ecx; /* 0x390051B0: mov dword ptr [edx + 8], ecx */
  17278     MEM32(ecx + 0x4) = edx; /* 0x390051B3: mov dword ptr [ecx + 4], edx */
  17279     edx = MEM32(eax + 0x4); /* 0x390051B6: mov edx, dword ptr [eax + 4] */
  17280     ecx = MEM32(edx); /* 0x390051B9: mov ecx, dword ptr [edx] */
  17281 L_390051BB:
  17282     edx = MEM32(ecx + 0x8); /* 0x390051BB: mov edx, dword ptr [ecx + 8] */
  17283     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051BE: cmp byte ptr [edx + 0x14], bl */
  17284     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17285     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17286     _flag_k = FK_NARROW(FK_CMP, 24);
  17287     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051C1: jne 0x39005297 */
  17288 L_390051C7:
  17289     edx = MEM32(ecx); /* 0x390051C7: mov edx, dword ptr [ecx] */
  17290     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051C9: cmp byte ptr [edx + 0x14], bl */
  17291     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17292     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17293     _flag_k = FK_NARROW(FK_CMP, 24);
  17294     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051CC: jne 0x39005297 */
  17295 L_390051D2:
  17296     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051D2: mov byte ptr [ecx + 0x14], 0 */
  17297     ecx = MEM32(edi + 0x4); /* 0x390051D6: mov ecx, dword ptr [edi + 4] */
  17298     eax = MEM32(eax + 0x4); /* 0x390051D9: mov eax, dword ptr [eax + 4] */
  17299     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x390051DC: cmp eax, dword ptr [ecx + 4] */
  17300     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  17301     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17302     _flag_k = FK_CMP;
  17303     RECOMP_BACKEDGE();
  17304     if (CMP_NE(_flag_a, _flag_b)) goto L_390050E8; /* 0x390051DF: jne 0x390050e8 */
  17305 L_390051E5:
  17306     goto L_39005336; /* 0x390051E5: jmp 0x39005336 */
  17307 L_390051EA:
  17308     edx = MEM32(ecx + 0x8); /* 0x390051EA: mov edx, dword ptr [ecx + 8] */
  17309     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051ED: cmp byte ptr [edx + 0x14], bl */
  17310     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17311     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17312     _flag_k = FK_NARROW(FK_CMP, 24);
  17313     if (CMP_NE(_flag_a, _flag_b)) goto L_3900523B; /* 0x390051F0: jne 0x3900523b */
  17314 L_390051F2:
  17315     edx = MEM32(ecx); /* 0x390051F2: mov edx, dword ptr [ecx] */
  17316     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390051F4: mov byte ptr [edx + 0x14], bl */
  17317     edx = MEM32(ecx); /* 0x390051F7: mov edx, dword ptr [ecx] */
  17318     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051F9: mov byte ptr [ecx + 0x14], 0 */
  17319     esi = MEM32(edx + 0x8); /* 0x390051FD: mov esi, dword ptr [edx + 8] */
  17320     MEM32(ecx) = esi; /* 0x39005200: mov dword ptr [ecx], esi */
  17321     esi = MEM32(edx + 0x8); /* 0x39005202: mov esi, dword ptr [edx + 8] */
  17322     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005205: cmp esi, dword ptr [edi + 8] */
  17323     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17324     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17325     _flag_k = FK_CMP;
  17326     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900520D; /* 0x39005208: je 0x3900520d */
  17327 L_3900520A:
  17328     MEM32(esi + 0x4) = ecx; /* 0x3900520A: mov dword ptr [esi + 4], ecx */
  17329 L_3900520D:
  17330     esi = MEM32(ecx + 0x4); /* 0x3900520D: mov esi, dword ptr [ecx + 4] */
  17331     MEM32(edx + 0x4) = esi; /* 0x39005210: mov dword ptr [edx + 4], esi */
  17332     esi = MEM32(edi + 0x4); /* 0x39005213: mov esi, dword ptr [edi + 4] */
  17333     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005216: cmp ecx, dword ptr [esi + 4] */
  17334     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17335     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17336     _flag_k = FK_CMP;
  17337     if (CMP_NE(_flag_a, _flag_b)) goto L_39005220; /* 0x39005219: jne 0x39005220 */
  17338 L_3900521B:
  17339     MEM32(esi + 0x4) = edx; /* 0x3900521B: mov dword ptr [esi + 4], edx */
  17340     goto L_3900522F; /* 0x3900521E: jmp 0x3900522f */
  17341 L_39005220:
  17342     esi = MEM32(ecx + 0x4); /* 0x39005220: mov esi, dword ptr [ecx + 4] */
  17343     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005223: cmp ecx, dword ptr [esi + 8] */
  17344     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  17345     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17346     _flag_k = FK_CMP;
  17347     if (CMP_NE(_flag_a, _flag_b)) goto L_3900522D; /* 0x39005226: jne 0x3900522d */
  17348 L_39005228:
  17349     MEM32(esi + 0x8) = edx; /* 0x39005228: mov dword ptr [esi + 8], edx */
  17350     goto L_3900522F; /* 0x3900522B: jmp 0x3900522f */
  17351 L_3900522D:
  17352     MEM32(esi) = edx; /* 0x3900522D: mov dword ptr [esi], edx */
  17353 L_3900522F:
  17354     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  17355     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  17356     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  17357     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  17358 L_3900523B:
  17359     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  17360     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  17361     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  17362     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  17363     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  17364     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  17365     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  17366     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  17367     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  17368     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  17369     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  17370     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  17371     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  17372     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17373     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17374     _flag_k = FK_CMP;
  17375     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  17376 L_39005262:
  17377     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  17378 L_39005265:
  17379     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  17380     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  17381     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  17382     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  17383     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17384     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17385     _flag_k = FK_CMP;
  17386     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  17387 L_39005273:
  17388     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  17389     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  17390     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  17391 L_3900527D:
  17392     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  17393     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  17394     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  17395     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17396     _flag_k = FK_CMP;
  17397     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  17398 L_39005284:
  17399     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  17400     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  17401     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  17402 L_3900528D:
  17403     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  17404     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  17405     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  17406 L_39005297:
  17407     edx = MEM32(ecx); /* 0x39005297: mov edx, dword ptr [ecx] */
  17408     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005299: cmp byte ptr [edx + 0x14], bl */
  17409     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17410     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17411     _flag_k = FK_NARROW(FK_CMP, 24);
  17412     if (CMP_NE(_flag_a, _flag_b)) goto L_390052E5; /* 0x3900529C: jne 0x390052e5 */
  17413 L_3900529E:
  17414     edx = MEM32(ecx + 0x8); /* 0x3900529E: mov edx, dword ptr [ecx + 8] */
  17415     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052A1: mov byte ptr [edx + 0x14], bl */
  17416     edx = MEM32(ecx + 0x8); /* 0x390052A4: mov edx, dword ptr [ecx + 8] */
  17417     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390052A7: mov byte ptr [ecx + 0x14], 0 */
  17418     esi = MEM32(edx); /* 0x390052AB: mov esi, dword ptr [edx] */
  17419     MEM32(ecx + 0x8) = esi; /* 0x390052AD: mov dword ptr [ecx + 8], esi */
  17420     esi = MEM32(edx); /* 0x390052B0: mov esi, dword ptr [edx] */
  17421     /* cmp esi, MEM32(edi + 0x8) */ /* 0x390052B2: cmp esi, dword ptr [edi + 8] */
  17422     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17423     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17424     _flag_k = FK_CMP;
  17425     if (CMP_EQ(_flag_a, _flag_b)) goto L_390052BA; /* 0x390052B5: je 0x390052ba */
  17426 L_390052B7:
  17427     MEM32(esi + 0x4) = ecx; /* 0x390052B7: mov dword ptr [esi + 4], ecx */
  17428 L_390052BA:
  17429     esi = MEM32(ecx + 0x4); /* 0x390052BA: mov esi, dword ptr [ecx + 4] */
  17430     MEM32(edx + 0x4) = esi; /* 0x390052BD: mov dword ptr [edx + 4], esi */
  17431     esi = MEM32(edi + 0x4); /* 0x390052C0: mov esi, dword ptr [edi + 4] */
  17432     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x390052C3: cmp ecx, dword ptr [esi + 4] */
  17433     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17434     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17435     _flag_k = FK_CMP;
  17436     if (CMP_NE(_flag_a, _flag_b)) goto L_390052CD; /* 0x390052C6: jne 0x390052cd */
  17437 L_390052C8:
  17438     MEM32(esi + 0x4) = edx; /* 0x390052C8: mov dword ptr [esi + 4], edx */
  17439     goto L_390052DB; /* 0x390052CB: jmp 0x390052db */
  17440 L_390052CD:
  17441     esi = MEM32(ecx + 0x4); /* 0x390052CD: mov esi, dword ptr [ecx + 4] */
  17442     /* cmp ecx, MEM32(esi) */ /* 0x390052D0: cmp ecx, dword ptr [esi] */
  17443     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  17444     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17445     _flag_k = FK_CMP;
  17446     if (CMP_NE(_flag_a, _flag_b)) goto L_390052D8; /* 0x390052D2: jne 0x390052d8 */
  17447 L_390052D4:
  17448     MEM32(esi) = edx; /* 0x390052D4: mov dword ptr [esi], edx */
  17449     goto L_390052DB; /* 0x390052D6: jmp 0x390052db */
  17450 L_390052D8:
  17451     MEM32(esi + 0x8) = edx; /* 0x390052D8: mov dword ptr [esi + 8], edx */
  17452 L_390052DB:
  17453     MEM32(edx) = ecx; /* 0x390052DB: mov dword ptr [edx], ecx */
  17454     MEM32(ecx + 0x4) = edx; /* 0x390052DD: mov dword ptr [ecx + 4], edx */
  17455     ecx = MEM32(eax + 0x4); /* 0x390052E0: mov ecx, dword ptr [eax + 4] */
  17456     ecx = MEM32(ecx); /* 0x390052E3: mov ecx, dword ptr [ecx] */
  17457 L_390052E5:
  17458     edx = MEM32(eax + 0x4); /* 0x390052E5: mov edx, dword ptr [eax + 4] */
  17459     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x390052E8: mov dl, byte ptr [edx + 0x14] */
  17460     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x390052EB: mov byte ptr [ecx + 0x14], dl */
  17461     edx = MEM32(eax + 0x4); /* 0x390052EE: mov edx, dword ptr [eax + 4] */
  17462     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F1: mov byte ptr [edx + 0x14], bl */
  17463     ecx = MEM32(ecx); /* 0x390052F4: mov ecx, dword ptr [ecx] */
  17464     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F6: mov byte ptr [ecx + 0x14], bl */
  17465     ecx = MEM32(eax + 0x4); /* 0x390052F9: mov ecx, dword ptr [eax + 4] */
  17466     edx = MEM32(ecx); /* 0x390052FC: mov edx, dword ptr [ecx] */
  17467     esi = MEM32(edx + 0x8); /* 0x390052FE: mov esi, dword ptr [edx + 8] */
  17468     MEM32(ecx) = esi; /* 0x39005301: mov dword ptr [ecx], esi */
  17469     esi = MEM32(edx + 0x8); /* 0x39005303: mov esi, dword ptr [edx + 8] */
  17470     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005306: cmp esi, dword ptr [edi + 8] */
  17471     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17472     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17473     _flag_k = FK_CMP;
  17474     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900530E; /* 0x39005309: je 0x3900530e */
  17475 L_3900530B:
  17476     MEM32(esi + 0x4) = ecx; /* 0x3900530B: mov dword ptr [esi + 4], ecx */
  17477 L_3900530E:
  17478     esi = MEM32(ecx + 0x4); /* 0x3900530E: mov esi, dword ptr [ecx + 4] */
  17479     MEM32(edx + 0x4) = esi; /* 0x39005311: mov dword ptr [edx + 4], esi */
  17480     esi = MEM32(edi + 0x4); /* 0x39005314: mov esi, dword ptr [edi + 4] */
  17481     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005317: cmp ecx, dword ptr [esi + 4] */
  17482     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17483     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17484     _flag_k = FK_CMP;
  17485     if (CMP_NE(_flag_a, _flag_b)) goto L_39005321; /* 0x3900531A: jne 0x39005321 */
  17486 L_3900531C:
  17487     MEM32(esi + 0x4) = edx; /* 0x3900531C: mov dword ptr [esi + 4], edx */
  17488     goto L_39005330; /* 0x3900531F: jmp 0x39005330 */
  17489 L_39005321:
  17490     esi = MEM32(ecx + 0x4); /* 0x39005321: mov esi, dword ptr [ecx + 4] */
  17491     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005324: cmp ecx, dword ptr [esi + 8] */
  17492     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  17493     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17494     _flag_k = FK_CMP;
  17495     if (CMP_NE(_flag_a, _flag_b)) goto L_3900532E; /* 0x39005327: jne 0x3900532e */
  17496 L_39005329:
  17497     MEM32(esi + 0x8) = edx; /* 0x39005329: mov dword ptr [esi + 8], edx */
  17498     goto L_39005330; /* 0x3900532C: jmp 0x39005330 */
  17499 L_3900532E:
  17500     MEM32(esi) = edx; /* 0x3900532E: mov dword ptr [esi], edx */
  17501 L_39005330:
  17502     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  17503 L_39005333:
  17504     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  17505 L_39005336:
  17506     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  17507     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  17508     PUSH32(esp, edx); /* 0x3900533C: push edx */
  17509     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  17510     RECOMP_FLAGS_IN();
  17511     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  17512     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  17513     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  17514     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  17515     esp = esp + 4; /* 0x39005348: add esp, 4 */
  17516     _flag_k = FK_ADD;
  17517     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  17518     eax = eax - 1; /* 0x3900534B: dec eax */
  17519     _flag_k = FK_DEC;
  17520     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  17521     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  17522     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  17523     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  17524     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  17525     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  17526     esp = ebp; /* 0x39005357: mov esp, ebp */
  17527     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  17528     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  17529     RECOMP_REGS_OUT();
  17530 }
  17531 
  17532 void sub_39005168(void) {
  17533     int _fpu_cmp = 0;
  17534     uint32_t _cf = 0;
  17535     int _df = 1;
  17536     uint32_t _flag_k = FK_NONE;
  17537     uint32_t _flag_a = 0, _flag_b = 0;
  17538     uint32_t _itail_tgt = 0;
  17539     RECOMP_REGS_LOCALS
  17540     RECOMP_ENTER(0x39005168u);
  17541 
  17542     goto L_39005168;
  17543 L_390050E8:
  17544     /* cmp MEM8(eax + 0x14), LO8(ebx) */ /* 0x390050E8: cmp byte ptr [eax + 0x14], bl */
  17545     _flag_a = (uint32_t)(MEM8(eax + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17546     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17547     _flag_k = FK_NARROW(FK_CMP, 24);
  17548     if (CMP_NE(_flag_a, _flag_b)) goto L_39005336; /* 0x390050EB: jne 0x39005336 */
  17549 L_390050F1:
  17550     edx = MEM32(eax + 0x4); /* 0x390050F1: mov edx, dword ptr [eax + 4] */
  17551     ecx = MEM32(edx); /* 0x390050F4: mov ecx, dword ptr [edx] */
  17552     /* cmp eax, ecx */ /* 0x390050F6: cmp eax, ecx */
  17553     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  17554     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17555     _flag_k = FK_CMP;
  17556     if (CMP_NE(_flag_a, _flag_b)) goto L_39005168; /* 0x390050F8: jne 0x39005168 */
  17557 L_390050FA:
  17558     ecx = MEM32(edx + 0x8); /* 0x390050FA: mov ecx, dword ptr [edx + 8] */
  17559     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390050FD: mov dl, byte ptr [ecx + 0x14] */
  17560     /* test LO8(edx), LO8(edx) */ /* 0x39005100: test dl, dl */
  17561     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  17562     _cf = 0;
  17563     _flag_k = FK_NARROW(FK_TEST, 24);
  17564     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900514F; /* 0x39005102: jne 0x3900514f */
  17565 L_39005104:
  17566     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005104: mov byte ptr [ecx + 0x14], bl */
  17567     ecx = MEM32(eax + 0x4); /* 0x39005107: mov ecx, dword ptr [eax + 4] */
  17568     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900510A: mov byte ptr [ecx + 0x14], 0 */
  17569     ecx = MEM32(eax + 0x4); /* 0x3900510E: mov ecx, dword ptr [eax + 4] */
  17570     edx = MEM32(ecx + 0x8); /* 0x39005111: mov edx, dword ptr [ecx + 8] */
  17571     esi = MEM32(edx); /* 0x39005114: mov esi, dword ptr [edx] */
  17572     MEM32(ecx + 0x8) = esi; /* 0x39005116: mov dword ptr [ecx + 8], esi */
  17573     esi = MEM32(edx); /* 0x39005119: mov esi, dword ptr [edx] */
  17574     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900511B: cmp esi, dword ptr [edi + 8] */
  17575     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17576     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17577     _flag_k = FK_CMP;
  17578     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005123; /* 0x3900511E: je 0x39005123 */
  17579 L_39005120:
  17580     MEM32(esi + 0x4) = ecx; /* 0x39005120: mov dword ptr [esi + 4], ecx */
  17581 L_39005123:
  17582     esi = MEM32(ecx + 0x4); /* 0x39005123: mov esi, dword ptr [ecx + 4] */
  17583     MEM32(edx + 0x4) = esi; /* 0x39005126: mov dword ptr [edx + 4], esi */
  17584     esi = MEM32(edi + 0x4); /* 0x39005129: mov esi, dword ptr [edi + 4] */
  17585     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900512C: cmp ecx, dword ptr [esi + 4] */
  17586     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17587     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17588     _flag_k = FK_CMP;
  17589     if (CMP_NE(_flag_a, _flag_b)) goto L_39005136; /* 0x3900512F: jne 0x39005136 */
  17590 L_39005131:
  17591     MEM32(esi + 0x4) = edx; /* 0x39005131: mov dword ptr [esi + 4], edx */
  17592     goto L_39005144; /* 0x39005134: jmp 0x39005144 */
  17593 L_39005136:
  17594     esi = MEM32(ecx + 0x4); /* 0x39005136: mov esi, dword ptr [ecx + 4] */
  17595     /* cmp ecx, MEM32(esi) */ /* 0x39005139: cmp ecx, dword ptr [esi] */
  17596     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  17597     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17598     _flag_k = FK_CMP;
  17599     if (CMP_NE(_flag_a, _flag_b)) goto L_39005141; /* 0x3900513B: jne 0x39005141 */
  17600 L_3900513D:
  17601     MEM32(esi) = edx; /* 0x3900513D: mov dword ptr [esi], edx */
  17602     goto L_39005144; /* 0x3900513F: jmp 0x39005144 */
  17603 L_39005141:
  17604     MEM32(esi + 0x8) = edx; /* 0x39005141: mov dword ptr [esi + 8], edx */
  17605 L_39005144:
  17606     MEM32(edx) = ecx; /* 0x39005144: mov dword ptr [edx], ecx */
  17607     MEM32(ecx + 0x4) = edx; /* 0x39005146: mov dword ptr [ecx + 4], edx */
  17608     edx = MEM32(eax + 0x4); /* 0x39005149: mov edx, dword ptr [eax + 4] */
  17609     ecx = MEM32(edx + 0x8); /* 0x3900514C: mov ecx, dword ptr [edx + 8] */
  17610 L_3900514F:
  17611     edx = MEM32(ecx); /* 0x3900514F: mov edx, dword ptr [ecx] */
  17612     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005151: cmp byte ptr [edx + 0x14], bl */
  17613     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17614     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17615     _flag_k = FK_NARROW(FK_CMP, 24);
  17616     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005154: jne 0x390051ea */
  17617 L_3900515A:
  17618     edx = MEM32(ecx + 0x8); /* 0x3900515A: mov edx, dword ptr [ecx + 8] */
  17619     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x3900515D: cmp byte ptr [edx + 0x14], bl */
  17620     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17621     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17622     _flag_k = FK_NARROW(FK_CMP, 24);
  17623     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005160: jne 0x390051ea */
  17624 L_39005166:
  17625     goto L_390051D2; /* 0x39005166: jmp 0x390051d2 */
  17626 L_39005168:
  17627     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x39005168: mov dl, byte ptr [ecx + 0x14] */
  17628     /* test LO8(edx), LO8(edx) */ /* 0x3900516B: test dl, dl */
  17629     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  17630     _cf = 0;
  17631     _flag_k = FK_NARROW(FK_TEST, 24);
  17632     if (TEST_NZ(_flag_a, _flag_b)) goto L_390051BB; /* 0x3900516D: jne 0x390051bb */
  17633 L_3900516F:
  17634     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900516F: mov byte ptr [ecx + 0x14], bl */
  17635     ecx = MEM32(eax + 0x4); /* 0x39005172: mov ecx, dword ptr [eax + 4] */
  17636     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005175: mov byte ptr [ecx + 0x14], 0 */
  17637     ecx = MEM32(eax + 0x4); /* 0x39005179: mov ecx, dword ptr [eax + 4] */
  17638     edx = MEM32(ecx); /* 0x3900517C: mov edx, dword ptr [ecx] */
  17639     esi = MEM32(edx + 0x8); /* 0x3900517E: mov esi, dword ptr [edx + 8] */
  17640     MEM32(ecx) = esi; /* 0x39005181: mov dword ptr [ecx], esi */
  17641     esi = MEM32(edx + 0x8); /* 0x39005183: mov esi, dword ptr [edx + 8] */
  17642     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005186: cmp esi, dword ptr [edi + 8] */
  17643     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17644     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17645     _flag_k = FK_CMP;
  17646     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900518E; /* 0x39005189: je 0x3900518e */
  17647 L_3900518B:
  17648     MEM32(esi + 0x4) = ecx; /* 0x3900518B: mov dword ptr [esi + 4], ecx */
  17649 L_3900518E:
  17650     esi = MEM32(ecx + 0x4); /* 0x3900518E: mov esi, dword ptr [ecx + 4] */
  17651     MEM32(edx + 0x4) = esi; /* 0x39005191: mov dword ptr [edx + 4], esi */
  17652     esi = MEM32(edi + 0x4); /* 0x39005194: mov esi, dword ptr [edi + 4] */
  17653     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005197: cmp ecx, dword ptr [esi + 4] */
  17654     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17655     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17656     _flag_k = FK_CMP;
  17657     if (CMP_NE(_flag_a, _flag_b)) goto L_390051A1; /* 0x3900519A: jne 0x390051a1 */
  17658 L_3900519C:
  17659     MEM32(esi + 0x4) = edx; /* 0x3900519C: mov dword ptr [esi + 4], edx */
  17660     goto L_390051B0; /* 0x3900519F: jmp 0x390051b0 */
  17661 L_390051A1:
  17662     esi = MEM32(ecx + 0x4); /* 0x390051A1: mov esi, dword ptr [ecx + 4] */
  17663     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x390051A4: cmp ecx, dword ptr [esi + 8] */
  17664     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  17665     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17666     _flag_k = FK_CMP;
  17667     if (CMP_NE(_flag_a, _flag_b)) goto L_390051AE; /* 0x390051A7: jne 0x390051ae */
  17668 L_390051A9:
  17669     MEM32(esi + 0x8) = edx; /* 0x390051A9: mov dword ptr [esi + 8], edx */
  17670     goto L_390051B0; /* 0x390051AC: jmp 0x390051b0 */
  17671 L_390051AE:
  17672     MEM32(esi) = edx; /* 0x390051AE: mov dword ptr [esi], edx */
  17673 L_390051B0:
  17674     MEM32(edx + 0x8) = ecx; /* 0x390051B0: mov dword ptr [edx + 8], ecx */
  17675     MEM32(ecx + 0x4) = edx; /* 0x390051B3: mov dword ptr [ecx + 4], edx */
  17676     edx = MEM32(eax + 0x4); /* 0x390051B6: mov edx, dword ptr [eax + 4] */
  17677     ecx = MEM32(edx); /* 0x390051B9: mov ecx, dword ptr [edx] */
  17678 L_390051BB:
  17679     edx = MEM32(ecx + 0x8); /* 0x390051BB: mov edx, dword ptr [ecx + 8] */
  17680     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051BE: cmp byte ptr [edx + 0x14], bl */
  17681     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17682     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17683     _flag_k = FK_NARROW(FK_CMP, 24);
  17684     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051C1: jne 0x39005297 */
  17685 L_390051C7:
  17686     edx = MEM32(ecx); /* 0x390051C7: mov edx, dword ptr [ecx] */
  17687     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051C9: cmp byte ptr [edx + 0x14], bl */
  17688     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17689     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17690     _flag_k = FK_NARROW(FK_CMP, 24);
  17691     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051CC: jne 0x39005297 */
  17692 L_390051D2:
  17693     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051D2: mov byte ptr [ecx + 0x14], 0 */
  17694     ecx = MEM32(edi + 0x4); /* 0x390051D6: mov ecx, dword ptr [edi + 4] */
  17695     eax = MEM32(eax + 0x4); /* 0x390051D9: mov eax, dword ptr [eax + 4] */
  17696     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x390051DC: cmp eax, dword ptr [ecx + 4] */
  17697     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  17698     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17699     _flag_k = FK_CMP;
  17700     RECOMP_BACKEDGE();
  17701     if (CMP_NE(_flag_a, _flag_b)) goto L_390050E8; /* 0x390051DF: jne 0x390050e8 */
  17702 L_390051E5:
  17703     goto L_39005336; /* 0x390051E5: jmp 0x39005336 */
  17704 L_390051EA:
  17705     edx = MEM32(ecx + 0x8); /* 0x390051EA: mov edx, dword ptr [ecx + 8] */
  17706     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051ED: cmp byte ptr [edx + 0x14], bl */
  17707     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17708     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17709     _flag_k = FK_NARROW(FK_CMP, 24);
  17710     if (CMP_NE(_flag_a, _flag_b)) goto L_3900523B; /* 0x390051F0: jne 0x3900523b */
  17711 L_390051F2:
  17712     edx = MEM32(ecx); /* 0x390051F2: mov edx, dword ptr [ecx] */
  17713     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390051F4: mov byte ptr [edx + 0x14], bl */
  17714     edx = MEM32(ecx); /* 0x390051F7: mov edx, dword ptr [ecx] */
  17715     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051F9: mov byte ptr [ecx + 0x14], 0 */
  17716     esi = MEM32(edx + 0x8); /* 0x390051FD: mov esi, dword ptr [edx + 8] */
  17717     MEM32(ecx) = esi; /* 0x39005200: mov dword ptr [ecx], esi */
  17718     esi = MEM32(edx + 0x8); /* 0x39005202: mov esi, dword ptr [edx + 8] */
  17719     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005205: cmp esi, dword ptr [edi + 8] */
  17720     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17721     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17722     _flag_k = FK_CMP;
  17723     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900520D; /* 0x39005208: je 0x3900520d */
  17724 L_3900520A:
  17725     MEM32(esi + 0x4) = ecx; /* 0x3900520A: mov dword ptr [esi + 4], ecx */
  17726 L_3900520D:
  17727     esi = MEM32(ecx + 0x4); /* 0x3900520D: mov esi, dword ptr [ecx + 4] */
  17728     MEM32(edx + 0x4) = esi; /* 0x39005210: mov dword ptr [edx + 4], esi */
  17729     esi = MEM32(edi + 0x4); /* 0x39005213: mov esi, dword ptr [edi + 4] */
  17730     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005216: cmp ecx, dword ptr [esi + 4] */
  17731     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17732     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17733     _flag_k = FK_CMP;
  17734     if (CMP_NE(_flag_a, _flag_b)) goto L_39005220; /* 0x39005219: jne 0x39005220 */
  17735 L_3900521B:
  17736     MEM32(esi + 0x4) = edx; /* 0x3900521B: mov dword ptr [esi + 4], edx */
  17737     goto L_3900522F; /* 0x3900521E: jmp 0x3900522f */
  17738 L_39005220:
  17739     esi = MEM32(ecx + 0x4); /* 0x39005220: mov esi, dword ptr [ecx + 4] */
  17740     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005223: cmp ecx, dword ptr [esi + 8] */
  17741     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  17742     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17743     _flag_k = FK_CMP;
  17744     if (CMP_NE(_flag_a, _flag_b)) goto L_3900522D; /* 0x39005226: jne 0x3900522d */
  17745 L_39005228:
  17746     MEM32(esi + 0x8) = edx; /* 0x39005228: mov dword ptr [esi + 8], edx */
  17747     goto L_3900522F; /* 0x3900522B: jmp 0x3900522f */
  17748 L_3900522D:
  17749     MEM32(esi) = edx; /* 0x3900522D: mov dword ptr [esi], edx */
  17750 L_3900522F:
  17751     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  17752     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  17753     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  17754     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  17755 L_3900523B:
  17756     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  17757     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  17758     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  17759     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  17760     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  17761     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  17762     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  17763     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  17764     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  17765     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  17766     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  17767     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  17768     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  17769     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17770     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17771     _flag_k = FK_CMP;
  17772     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  17773 L_39005262:
  17774     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  17775 L_39005265:
  17776     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  17777     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  17778     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  17779     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  17780     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17781     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17782     _flag_k = FK_CMP;
  17783     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  17784 L_39005273:
  17785     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  17786     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  17787     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  17788 L_3900527D:
  17789     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  17790     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  17791     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  17792     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17793     _flag_k = FK_CMP;
  17794     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  17795 L_39005284:
  17796     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  17797     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  17798     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  17799 L_3900528D:
  17800     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  17801     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  17802     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  17803 L_39005297:
  17804     edx = MEM32(ecx); /* 0x39005297: mov edx, dword ptr [ecx] */
  17805     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005299: cmp byte ptr [edx + 0x14], bl */
  17806     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17807     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17808     _flag_k = FK_NARROW(FK_CMP, 24);
  17809     if (CMP_NE(_flag_a, _flag_b)) goto L_390052E5; /* 0x3900529C: jne 0x390052e5 */
  17810 L_3900529E:
  17811     edx = MEM32(ecx + 0x8); /* 0x3900529E: mov edx, dword ptr [ecx + 8] */
  17812     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052A1: mov byte ptr [edx + 0x14], bl */
  17813     edx = MEM32(ecx + 0x8); /* 0x390052A4: mov edx, dword ptr [ecx + 8] */
  17814     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390052A7: mov byte ptr [ecx + 0x14], 0 */
  17815     esi = MEM32(edx); /* 0x390052AB: mov esi, dword ptr [edx] */
  17816     MEM32(ecx + 0x8) = esi; /* 0x390052AD: mov dword ptr [ecx + 8], esi */
  17817     esi = MEM32(edx); /* 0x390052B0: mov esi, dword ptr [edx] */
  17818     /* cmp esi, MEM32(edi + 0x8) */ /* 0x390052B2: cmp esi, dword ptr [edi + 8] */
  17819     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17820     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17821     _flag_k = FK_CMP;
  17822     if (CMP_EQ(_flag_a, _flag_b)) goto L_390052BA; /* 0x390052B5: je 0x390052ba */
  17823 L_390052B7:
  17824     MEM32(esi + 0x4) = ecx; /* 0x390052B7: mov dword ptr [esi + 4], ecx */
  17825 L_390052BA:
  17826     esi = MEM32(ecx + 0x4); /* 0x390052BA: mov esi, dword ptr [ecx + 4] */
  17827     MEM32(edx + 0x4) = esi; /* 0x390052BD: mov dword ptr [edx + 4], esi */
  17828     esi = MEM32(edi + 0x4); /* 0x390052C0: mov esi, dword ptr [edi + 4] */
  17829     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x390052C3: cmp ecx, dword ptr [esi + 4] */
  17830     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17831     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17832     _flag_k = FK_CMP;
  17833     if (CMP_NE(_flag_a, _flag_b)) goto L_390052CD; /* 0x390052C6: jne 0x390052cd */
  17834 L_390052C8:
  17835     MEM32(esi + 0x4) = edx; /* 0x390052C8: mov dword ptr [esi + 4], edx */
  17836     goto L_390052DB; /* 0x390052CB: jmp 0x390052db */
  17837 L_390052CD:
  17838     esi = MEM32(ecx + 0x4); /* 0x390052CD: mov esi, dword ptr [ecx + 4] */
  17839     /* cmp ecx, MEM32(esi) */ /* 0x390052D0: cmp ecx, dword ptr [esi] */
  17840     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  17841     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17842     _flag_k = FK_CMP;
  17843     if (CMP_NE(_flag_a, _flag_b)) goto L_390052D8; /* 0x390052D2: jne 0x390052d8 */
  17844 L_390052D4:
  17845     MEM32(esi) = edx; /* 0x390052D4: mov dword ptr [esi], edx */
  17846     goto L_390052DB; /* 0x390052D6: jmp 0x390052db */
  17847 L_390052D8:
  17848     MEM32(esi + 0x8) = edx; /* 0x390052D8: mov dword ptr [esi + 8], edx */
  17849 L_390052DB:
  17850     MEM32(edx) = ecx; /* 0x390052DB: mov dword ptr [edx], ecx */
  17851     MEM32(ecx + 0x4) = edx; /* 0x390052DD: mov dword ptr [ecx + 4], edx */
  17852     ecx = MEM32(eax + 0x4); /* 0x390052E0: mov ecx, dword ptr [eax + 4] */
  17853     ecx = MEM32(ecx); /* 0x390052E3: mov ecx, dword ptr [ecx] */
  17854 L_390052E5:
  17855     edx = MEM32(eax + 0x4); /* 0x390052E5: mov edx, dword ptr [eax + 4] */
  17856     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x390052E8: mov dl, byte ptr [edx + 0x14] */
  17857     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x390052EB: mov byte ptr [ecx + 0x14], dl */
  17858     edx = MEM32(eax + 0x4); /* 0x390052EE: mov edx, dword ptr [eax + 4] */
  17859     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F1: mov byte ptr [edx + 0x14], bl */
  17860     ecx = MEM32(ecx); /* 0x390052F4: mov ecx, dword ptr [ecx] */
  17861     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F6: mov byte ptr [ecx + 0x14], bl */
  17862     ecx = MEM32(eax + 0x4); /* 0x390052F9: mov ecx, dword ptr [eax + 4] */
  17863     edx = MEM32(ecx); /* 0x390052FC: mov edx, dword ptr [ecx] */
  17864     esi = MEM32(edx + 0x8); /* 0x390052FE: mov esi, dword ptr [edx + 8] */
  17865     MEM32(ecx) = esi; /* 0x39005301: mov dword ptr [ecx], esi */
  17866     esi = MEM32(edx + 0x8); /* 0x39005303: mov esi, dword ptr [edx + 8] */
  17867     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005306: cmp esi, dword ptr [edi + 8] */
  17868     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17869     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17870     _flag_k = FK_CMP;
  17871     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900530E; /* 0x39005309: je 0x3900530e */
  17872 L_3900530B:
  17873     MEM32(esi + 0x4) = ecx; /* 0x3900530B: mov dword ptr [esi + 4], ecx */
  17874 L_3900530E:
  17875     esi = MEM32(ecx + 0x4); /* 0x3900530E: mov esi, dword ptr [ecx + 4] */
  17876     MEM32(edx + 0x4) = esi; /* 0x39005311: mov dword ptr [edx + 4], esi */
  17877     esi = MEM32(edi + 0x4); /* 0x39005314: mov esi, dword ptr [edi + 4] */
  17878     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005317: cmp ecx, dword ptr [esi + 4] */
  17879     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17880     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17881     _flag_k = FK_CMP;
  17882     if (CMP_NE(_flag_a, _flag_b)) goto L_39005321; /* 0x3900531A: jne 0x39005321 */
  17883 L_3900531C:
  17884     MEM32(esi + 0x4) = edx; /* 0x3900531C: mov dword ptr [esi + 4], edx */
  17885     goto L_39005330; /* 0x3900531F: jmp 0x39005330 */
  17886 L_39005321:
  17887     esi = MEM32(ecx + 0x4); /* 0x39005321: mov esi, dword ptr [ecx + 4] */
  17888     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005324: cmp ecx, dword ptr [esi + 8] */
  17889     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  17890     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17891     _flag_k = FK_CMP;
  17892     if (CMP_NE(_flag_a, _flag_b)) goto L_3900532E; /* 0x39005327: jne 0x3900532e */
  17893 L_39005329:
  17894     MEM32(esi + 0x8) = edx; /* 0x39005329: mov dword ptr [esi + 8], edx */
  17895     goto L_39005330; /* 0x3900532C: jmp 0x39005330 */
  17896 L_3900532E:
  17897     MEM32(esi) = edx; /* 0x3900532E: mov dword ptr [esi], edx */
  17898 L_39005330:
  17899     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  17900 L_39005333:
  17901     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  17902 L_39005336:
  17903     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  17904     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  17905     PUSH32(esp, edx); /* 0x3900533C: push edx */
  17906     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  17907     RECOMP_FLAGS_IN();
  17908     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  17909     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  17910     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  17911     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  17912     esp = esp + 4; /* 0x39005348: add esp, 4 */
  17913     _flag_k = FK_ADD;
  17914     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  17915     eax = eax - 1; /* 0x3900534B: dec eax */
  17916     _flag_k = FK_DEC;
  17917     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  17918     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  17919     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  17920     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  17921     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  17922     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  17923     esp = ebp; /* 0x39005357: mov esp, ebp */
  17924     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  17925     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  17926     RECOMP_REGS_OUT();
  17927 }
  17928 
  17929 void sub_390051B0(void) {
  17930     int _fpu_cmp = 0;
  17931     uint32_t _cf = 0;
  17932     int _df = 1;
  17933     uint32_t _flag_k = FK_NONE;
  17934     uint32_t _flag_a = 0, _flag_b = 0;
  17935     uint32_t _itail_tgt = 0;
  17936     RECOMP_REGS_LOCALS
  17937     RECOMP_ENTER(0x390051B0u);
  17938 
  17939     goto L_390051B0;
  17940 L_390050E8:
  17941     /* cmp MEM8(eax + 0x14), LO8(ebx) */ /* 0x390050E8: cmp byte ptr [eax + 0x14], bl */
  17942     _flag_a = (uint32_t)(MEM8(eax + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  17943     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17944     _flag_k = FK_NARROW(FK_CMP, 24);
  17945     if (CMP_NE(_flag_a, _flag_b)) goto L_39005336; /* 0x390050EB: jne 0x39005336 */
  17946 L_390050F1:
  17947     edx = MEM32(eax + 0x4); /* 0x390050F1: mov edx, dword ptr [eax + 4] */
  17948     ecx = MEM32(edx); /* 0x390050F4: mov ecx, dword ptr [edx] */
  17949     /* cmp eax, ecx */ /* 0x390050F6: cmp eax, ecx */
  17950     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  17951     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17952     _flag_k = FK_CMP;
  17953     if (CMP_NE(_flag_a, _flag_b)) goto L_39005168; /* 0x390050F8: jne 0x39005168 */
  17954 L_390050FA:
  17955     ecx = MEM32(edx + 0x8); /* 0x390050FA: mov ecx, dword ptr [edx + 8] */
  17956     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390050FD: mov dl, byte ptr [ecx + 0x14] */
  17957     /* test LO8(edx), LO8(edx) */ /* 0x39005100: test dl, dl */
  17958     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  17959     _cf = 0;
  17960     _flag_k = FK_NARROW(FK_TEST, 24);
  17961     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900514F; /* 0x39005102: jne 0x3900514f */
  17962 L_39005104:
  17963     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005104: mov byte ptr [ecx + 0x14], bl */
  17964     ecx = MEM32(eax + 0x4); /* 0x39005107: mov ecx, dword ptr [eax + 4] */
  17965     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900510A: mov byte ptr [ecx + 0x14], 0 */
  17966     ecx = MEM32(eax + 0x4); /* 0x3900510E: mov ecx, dword ptr [eax + 4] */
  17967     edx = MEM32(ecx + 0x8); /* 0x39005111: mov edx, dword ptr [ecx + 8] */
  17968     esi = MEM32(edx); /* 0x39005114: mov esi, dword ptr [edx] */
  17969     MEM32(ecx + 0x8) = esi; /* 0x39005116: mov dword ptr [ecx + 8], esi */
  17970     esi = MEM32(edx); /* 0x39005119: mov esi, dword ptr [edx] */
  17971     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900511B: cmp esi, dword ptr [edi + 8] */
  17972     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  17973     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17974     _flag_k = FK_CMP;
  17975     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005123; /* 0x3900511E: je 0x39005123 */
  17976 L_39005120:
  17977     MEM32(esi + 0x4) = ecx; /* 0x39005120: mov dword ptr [esi + 4], ecx */
  17978 L_39005123:
  17979     esi = MEM32(ecx + 0x4); /* 0x39005123: mov esi, dword ptr [ecx + 4] */
  17980     MEM32(edx + 0x4) = esi; /* 0x39005126: mov dword ptr [edx + 4], esi */
  17981     esi = MEM32(edi + 0x4); /* 0x39005129: mov esi, dword ptr [edi + 4] */
  17982     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900512C: cmp ecx, dword ptr [esi + 4] */
  17983     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  17984     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17985     _flag_k = FK_CMP;
  17986     if (CMP_NE(_flag_a, _flag_b)) goto L_39005136; /* 0x3900512F: jne 0x39005136 */
  17987 L_39005131:
  17988     MEM32(esi + 0x4) = edx; /* 0x39005131: mov dword ptr [esi + 4], edx */
  17989     goto L_39005144; /* 0x39005134: jmp 0x39005144 */
  17990 L_39005136:
  17991     esi = MEM32(ecx + 0x4); /* 0x39005136: mov esi, dword ptr [ecx + 4] */
  17992     /* cmp ecx, MEM32(esi) */ /* 0x39005139: cmp ecx, dword ptr [esi] */
  17993     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  17994     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  17995     _flag_k = FK_CMP;
  17996     if (CMP_NE(_flag_a, _flag_b)) goto L_39005141; /* 0x3900513B: jne 0x39005141 */
  17997 L_3900513D:
  17998     MEM32(esi) = edx; /* 0x3900513D: mov dword ptr [esi], edx */
  17999     goto L_39005144; /* 0x3900513F: jmp 0x39005144 */
  18000 L_39005141:
  18001     MEM32(esi + 0x8) = edx; /* 0x39005141: mov dword ptr [esi + 8], edx */
  18002 L_39005144:
  18003     MEM32(edx) = ecx; /* 0x39005144: mov dword ptr [edx], ecx */
  18004     MEM32(ecx + 0x4) = edx; /* 0x39005146: mov dword ptr [ecx + 4], edx */
  18005     edx = MEM32(eax + 0x4); /* 0x39005149: mov edx, dword ptr [eax + 4] */
  18006     ecx = MEM32(edx + 0x8); /* 0x3900514C: mov ecx, dword ptr [edx + 8] */
  18007 L_3900514F:
  18008     edx = MEM32(ecx); /* 0x3900514F: mov edx, dword ptr [ecx] */
  18009     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005151: cmp byte ptr [edx + 0x14], bl */
  18010     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18011     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18012     _flag_k = FK_NARROW(FK_CMP, 24);
  18013     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005154: jne 0x390051ea */
  18014 L_3900515A:
  18015     edx = MEM32(ecx + 0x8); /* 0x3900515A: mov edx, dword ptr [ecx + 8] */
  18016     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x3900515D: cmp byte ptr [edx + 0x14], bl */
  18017     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18018     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18019     _flag_k = FK_NARROW(FK_CMP, 24);
  18020     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005160: jne 0x390051ea */
  18021 L_39005166:
  18022     goto L_390051D2; /* 0x39005166: jmp 0x390051d2 */
  18023 L_39005168:
  18024     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x39005168: mov dl, byte ptr [ecx + 0x14] */
  18025     /* test LO8(edx), LO8(edx) */ /* 0x3900516B: test dl, dl */
  18026     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  18027     _cf = 0;
  18028     _flag_k = FK_NARROW(FK_TEST, 24);
  18029     if (TEST_NZ(_flag_a, _flag_b)) goto L_390051BB; /* 0x3900516D: jne 0x390051bb */
  18030 L_3900516F:
  18031     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900516F: mov byte ptr [ecx + 0x14], bl */
  18032     ecx = MEM32(eax + 0x4); /* 0x39005172: mov ecx, dword ptr [eax + 4] */
  18033     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005175: mov byte ptr [ecx + 0x14], 0 */
  18034     ecx = MEM32(eax + 0x4); /* 0x39005179: mov ecx, dword ptr [eax + 4] */
  18035     edx = MEM32(ecx); /* 0x3900517C: mov edx, dword ptr [ecx] */
  18036     esi = MEM32(edx + 0x8); /* 0x3900517E: mov esi, dword ptr [edx + 8] */
  18037     MEM32(ecx) = esi; /* 0x39005181: mov dword ptr [ecx], esi */
  18038     esi = MEM32(edx + 0x8); /* 0x39005183: mov esi, dword ptr [edx + 8] */
  18039     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005186: cmp esi, dword ptr [edi + 8] */
  18040     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18041     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18042     _flag_k = FK_CMP;
  18043     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900518E; /* 0x39005189: je 0x3900518e */
  18044 L_3900518B:
  18045     MEM32(esi + 0x4) = ecx; /* 0x3900518B: mov dword ptr [esi + 4], ecx */
  18046 L_3900518E:
  18047     esi = MEM32(ecx + 0x4); /* 0x3900518E: mov esi, dword ptr [ecx + 4] */
  18048     MEM32(edx + 0x4) = esi; /* 0x39005191: mov dword ptr [edx + 4], esi */
  18049     esi = MEM32(edi + 0x4); /* 0x39005194: mov esi, dword ptr [edi + 4] */
  18050     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005197: cmp ecx, dword ptr [esi + 4] */
  18051     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18052     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18053     _flag_k = FK_CMP;
  18054     if (CMP_NE(_flag_a, _flag_b)) goto L_390051A1; /* 0x3900519A: jne 0x390051a1 */
  18055 L_3900519C:
  18056     MEM32(esi + 0x4) = edx; /* 0x3900519C: mov dword ptr [esi + 4], edx */
  18057     goto L_390051B0; /* 0x3900519F: jmp 0x390051b0 */
  18058 L_390051A1:
  18059     esi = MEM32(ecx + 0x4); /* 0x390051A1: mov esi, dword ptr [ecx + 4] */
  18060     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x390051A4: cmp ecx, dword ptr [esi + 8] */
  18061     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  18062     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18063     _flag_k = FK_CMP;
  18064     if (CMP_NE(_flag_a, _flag_b)) goto L_390051AE; /* 0x390051A7: jne 0x390051ae */
  18065 L_390051A9:
  18066     MEM32(esi + 0x8) = edx; /* 0x390051A9: mov dword ptr [esi + 8], edx */
  18067     goto L_390051B0; /* 0x390051AC: jmp 0x390051b0 */
  18068 L_390051AE:
  18069     MEM32(esi) = edx; /* 0x390051AE: mov dword ptr [esi], edx */
  18070 L_390051B0:
  18071     MEM32(edx + 0x8) = ecx; /* 0x390051B0: mov dword ptr [edx + 8], ecx */
  18072     MEM32(ecx + 0x4) = edx; /* 0x390051B3: mov dword ptr [ecx + 4], edx */
  18073     edx = MEM32(eax + 0x4); /* 0x390051B6: mov edx, dword ptr [eax + 4] */
  18074     ecx = MEM32(edx); /* 0x390051B9: mov ecx, dword ptr [edx] */
  18075 L_390051BB:
  18076     edx = MEM32(ecx + 0x8); /* 0x390051BB: mov edx, dword ptr [ecx + 8] */
  18077     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051BE: cmp byte ptr [edx + 0x14], bl */
  18078     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18079     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18080     _flag_k = FK_NARROW(FK_CMP, 24);
  18081     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051C1: jne 0x39005297 */
  18082 L_390051C7:
  18083     edx = MEM32(ecx); /* 0x390051C7: mov edx, dword ptr [ecx] */
  18084     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051C9: cmp byte ptr [edx + 0x14], bl */
  18085     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18086     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18087     _flag_k = FK_NARROW(FK_CMP, 24);
  18088     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051CC: jne 0x39005297 */
  18089 L_390051D2:
  18090     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051D2: mov byte ptr [ecx + 0x14], 0 */
  18091     ecx = MEM32(edi + 0x4); /* 0x390051D6: mov ecx, dword ptr [edi + 4] */
  18092     eax = MEM32(eax + 0x4); /* 0x390051D9: mov eax, dword ptr [eax + 4] */
  18093     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x390051DC: cmp eax, dword ptr [ecx + 4] */
  18094     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  18095     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18096     _flag_k = FK_CMP;
  18097     RECOMP_BACKEDGE();
  18098     if (CMP_NE(_flag_a, _flag_b)) goto L_390050E8; /* 0x390051DF: jne 0x390050e8 */
  18099 L_390051E5:
  18100     goto L_39005336; /* 0x390051E5: jmp 0x39005336 */
  18101 L_390051EA:
  18102     edx = MEM32(ecx + 0x8); /* 0x390051EA: mov edx, dword ptr [ecx + 8] */
  18103     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051ED: cmp byte ptr [edx + 0x14], bl */
  18104     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18105     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18106     _flag_k = FK_NARROW(FK_CMP, 24);
  18107     if (CMP_NE(_flag_a, _flag_b)) goto L_3900523B; /* 0x390051F0: jne 0x3900523b */
  18108 L_390051F2:
  18109     edx = MEM32(ecx); /* 0x390051F2: mov edx, dword ptr [ecx] */
  18110     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390051F4: mov byte ptr [edx + 0x14], bl */
  18111     edx = MEM32(ecx); /* 0x390051F7: mov edx, dword ptr [ecx] */
  18112     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051F9: mov byte ptr [ecx + 0x14], 0 */
  18113     esi = MEM32(edx + 0x8); /* 0x390051FD: mov esi, dword ptr [edx + 8] */
  18114     MEM32(ecx) = esi; /* 0x39005200: mov dword ptr [ecx], esi */
  18115     esi = MEM32(edx + 0x8); /* 0x39005202: mov esi, dword ptr [edx + 8] */
  18116     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005205: cmp esi, dword ptr [edi + 8] */
  18117     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18118     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18119     _flag_k = FK_CMP;
  18120     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900520D; /* 0x39005208: je 0x3900520d */
  18121 L_3900520A:
  18122     MEM32(esi + 0x4) = ecx; /* 0x3900520A: mov dword ptr [esi + 4], ecx */
  18123 L_3900520D:
  18124     esi = MEM32(ecx + 0x4); /* 0x3900520D: mov esi, dword ptr [ecx + 4] */
  18125     MEM32(edx + 0x4) = esi; /* 0x39005210: mov dword ptr [edx + 4], esi */
  18126     esi = MEM32(edi + 0x4); /* 0x39005213: mov esi, dword ptr [edi + 4] */
  18127     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005216: cmp ecx, dword ptr [esi + 4] */
  18128     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18129     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18130     _flag_k = FK_CMP;
  18131     if (CMP_NE(_flag_a, _flag_b)) goto L_39005220; /* 0x39005219: jne 0x39005220 */
  18132 L_3900521B:
  18133     MEM32(esi + 0x4) = edx; /* 0x3900521B: mov dword ptr [esi + 4], edx */
  18134     goto L_3900522F; /* 0x3900521E: jmp 0x3900522f */
  18135 L_39005220:
  18136     esi = MEM32(ecx + 0x4); /* 0x39005220: mov esi, dword ptr [ecx + 4] */
  18137     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005223: cmp ecx, dword ptr [esi + 8] */
  18138     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  18139     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18140     _flag_k = FK_CMP;
  18141     if (CMP_NE(_flag_a, _flag_b)) goto L_3900522D; /* 0x39005226: jne 0x3900522d */
  18142 L_39005228:
  18143     MEM32(esi + 0x8) = edx; /* 0x39005228: mov dword ptr [esi + 8], edx */
  18144     goto L_3900522F; /* 0x3900522B: jmp 0x3900522f */
  18145 L_3900522D:
  18146     MEM32(esi) = edx; /* 0x3900522D: mov dword ptr [esi], edx */
  18147 L_3900522F:
  18148     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  18149     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  18150     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  18151     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  18152 L_3900523B:
  18153     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  18154     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  18155     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  18156     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  18157     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  18158     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  18159     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  18160     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  18161     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  18162     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  18163     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  18164     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  18165     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  18166     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18167     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18168     _flag_k = FK_CMP;
  18169     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  18170 L_39005262:
  18171     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  18172 L_39005265:
  18173     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  18174     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  18175     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  18176     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  18177     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18178     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18179     _flag_k = FK_CMP;
  18180     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  18181 L_39005273:
  18182     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  18183     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  18184     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  18185 L_3900527D:
  18186     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  18187     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  18188     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  18189     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18190     _flag_k = FK_CMP;
  18191     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  18192 L_39005284:
  18193     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  18194     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  18195     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  18196 L_3900528D:
  18197     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  18198     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  18199     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  18200 L_39005297:
  18201     edx = MEM32(ecx); /* 0x39005297: mov edx, dword ptr [ecx] */
  18202     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005299: cmp byte ptr [edx + 0x14], bl */
  18203     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18204     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18205     _flag_k = FK_NARROW(FK_CMP, 24);
  18206     if (CMP_NE(_flag_a, _flag_b)) goto L_390052E5; /* 0x3900529C: jne 0x390052e5 */
  18207 L_3900529E:
  18208     edx = MEM32(ecx + 0x8); /* 0x3900529E: mov edx, dword ptr [ecx + 8] */
  18209     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052A1: mov byte ptr [edx + 0x14], bl */
  18210     edx = MEM32(ecx + 0x8); /* 0x390052A4: mov edx, dword ptr [ecx + 8] */
  18211     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390052A7: mov byte ptr [ecx + 0x14], 0 */
  18212     esi = MEM32(edx); /* 0x390052AB: mov esi, dword ptr [edx] */
  18213     MEM32(ecx + 0x8) = esi; /* 0x390052AD: mov dword ptr [ecx + 8], esi */
  18214     esi = MEM32(edx); /* 0x390052B0: mov esi, dword ptr [edx] */
  18215     /* cmp esi, MEM32(edi + 0x8) */ /* 0x390052B2: cmp esi, dword ptr [edi + 8] */
  18216     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18217     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18218     _flag_k = FK_CMP;
  18219     if (CMP_EQ(_flag_a, _flag_b)) goto L_390052BA; /* 0x390052B5: je 0x390052ba */
  18220 L_390052B7:
  18221     MEM32(esi + 0x4) = ecx; /* 0x390052B7: mov dword ptr [esi + 4], ecx */
  18222 L_390052BA:
  18223     esi = MEM32(ecx + 0x4); /* 0x390052BA: mov esi, dword ptr [ecx + 4] */
  18224     MEM32(edx + 0x4) = esi; /* 0x390052BD: mov dword ptr [edx + 4], esi */
  18225     esi = MEM32(edi + 0x4); /* 0x390052C0: mov esi, dword ptr [edi + 4] */
  18226     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x390052C3: cmp ecx, dword ptr [esi + 4] */
  18227     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18228     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18229     _flag_k = FK_CMP;
  18230     if (CMP_NE(_flag_a, _flag_b)) goto L_390052CD; /* 0x390052C6: jne 0x390052cd */
  18231 L_390052C8:
  18232     MEM32(esi + 0x4) = edx; /* 0x390052C8: mov dword ptr [esi + 4], edx */
  18233     goto L_390052DB; /* 0x390052CB: jmp 0x390052db */
  18234 L_390052CD:
  18235     esi = MEM32(ecx + 0x4); /* 0x390052CD: mov esi, dword ptr [ecx + 4] */
  18236     /* cmp ecx, MEM32(esi) */ /* 0x390052D0: cmp ecx, dword ptr [esi] */
  18237     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  18238     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18239     _flag_k = FK_CMP;
  18240     if (CMP_NE(_flag_a, _flag_b)) goto L_390052D8; /* 0x390052D2: jne 0x390052d8 */
  18241 L_390052D4:
  18242     MEM32(esi) = edx; /* 0x390052D4: mov dword ptr [esi], edx */
  18243     goto L_390052DB; /* 0x390052D6: jmp 0x390052db */
  18244 L_390052D8:
  18245     MEM32(esi + 0x8) = edx; /* 0x390052D8: mov dword ptr [esi + 8], edx */
  18246 L_390052DB:
  18247     MEM32(edx) = ecx; /* 0x390052DB: mov dword ptr [edx], ecx */
  18248     MEM32(ecx + 0x4) = edx; /* 0x390052DD: mov dword ptr [ecx + 4], edx */
  18249     ecx = MEM32(eax + 0x4); /* 0x390052E0: mov ecx, dword ptr [eax + 4] */
  18250     ecx = MEM32(ecx); /* 0x390052E3: mov ecx, dword ptr [ecx] */
  18251 L_390052E5:
  18252     edx = MEM32(eax + 0x4); /* 0x390052E5: mov edx, dword ptr [eax + 4] */
  18253     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x390052E8: mov dl, byte ptr [edx + 0x14] */
  18254     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x390052EB: mov byte ptr [ecx + 0x14], dl */
  18255     edx = MEM32(eax + 0x4); /* 0x390052EE: mov edx, dword ptr [eax + 4] */
  18256     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F1: mov byte ptr [edx + 0x14], bl */
  18257     ecx = MEM32(ecx); /* 0x390052F4: mov ecx, dword ptr [ecx] */
  18258     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F6: mov byte ptr [ecx + 0x14], bl */
  18259     ecx = MEM32(eax + 0x4); /* 0x390052F9: mov ecx, dword ptr [eax + 4] */
  18260     edx = MEM32(ecx); /* 0x390052FC: mov edx, dword ptr [ecx] */
  18261     esi = MEM32(edx + 0x8); /* 0x390052FE: mov esi, dword ptr [edx + 8] */
  18262     MEM32(ecx) = esi; /* 0x39005301: mov dword ptr [ecx], esi */
  18263     esi = MEM32(edx + 0x8); /* 0x39005303: mov esi, dword ptr [edx + 8] */
  18264     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005306: cmp esi, dword ptr [edi + 8] */
  18265     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18266     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18267     _flag_k = FK_CMP;
  18268     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900530E; /* 0x39005309: je 0x3900530e */
  18269 L_3900530B:
  18270     MEM32(esi + 0x4) = ecx; /* 0x3900530B: mov dword ptr [esi + 4], ecx */
  18271 L_3900530E:
  18272     esi = MEM32(ecx + 0x4); /* 0x3900530E: mov esi, dword ptr [ecx + 4] */
  18273     MEM32(edx + 0x4) = esi; /* 0x39005311: mov dword ptr [edx + 4], esi */
  18274     esi = MEM32(edi + 0x4); /* 0x39005314: mov esi, dword ptr [edi + 4] */
  18275     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005317: cmp ecx, dword ptr [esi + 4] */
  18276     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18277     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18278     _flag_k = FK_CMP;
  18279     if (CMP_NE(_flag_a, _flag_b)) goto L_39005321; /* 0x3900531A: jne 0x39005321 */
  18280 L_3900531C:
  18281     MEM32(esi + 0x4) = edx; /* 0x3900531C: mov dword ptr [esi + 4], edx */
  18282     goto L_39005330; /* 0x3900531F: jmp 0x39005330 */
  18283 L_39005321:
  18284     esi = MEM32(ecx + 0x4); /* 0x39005321: mov esi, dword ptr [ecx + 4] */
  18285     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005324: cmp ecx, dword ptr [esi + 8] */
  18286     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  18287     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18288     _flag_k = FK_CMP;
  18289     if (CMP_NE(_flag_a, _flag_b)) goto L_3900532E; /* 0x39005327: jne 0x3900532e */
  18290 L_39005329:
  18291     MEM32(esi + 0x8) = edx; /* 0x39005329: mov dword ptr [esi + 8], edx */
  18292     goto L_39005330; /* 0x3900532C: jmp 0x39005330 */
  18293 L_3900532E:
  18294     MEM32(esi) = edx; /* 0x3900532E: mov dword ptr [esi], edx */
  18295 L_39005330:
  18296     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  18297 L_39005333:
  18298     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  18299 L_39005336:
  18300     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  18301     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  18302     PUSH32(esp, edx); /* 0x3900533C: push edx */
  18303     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  18304     RECOMP_FLAGS_IN();
  18305     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  18306     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  18307     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  18308     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  18309     esp = esp + 4; /* 0x39005348: add esp, 4 */
  18310     _flag_k = FK_ADD;
  18311     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  18312     eax = eax - 1; /* 0x3900534B: dec eax */
  18313     _flag_k = FK_DEC;
  18314     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  18315     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  18316     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  18317     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  18318     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  18319     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  18320     esp = ebp; /* 0x39005357: mov esp, ebp */
  18321     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  18322     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  18323     RECOMP_REGS_OUT();
  18324 }
  18325 
  18326 void sub_390051BB(void) {
  18327     int _fpu_cmp = 0;
  18328     uint32_t _cf = 0;
  18329     int _df = 1;
  18330     uint32_t _flag_k = FK_NONE;
  18331     uint32_t _flag_a = 0, _flag_b = 0;
  18332     uint32_t _itail_tgt = 0;
  18333     RECOMP_REGS_LOCALS
  18334     RECOMP_ENTER(0x390051BBu);
  18335 
  18336     goto L_390051BB;
  18337 L_390050E8:
  18338     /* cmp MEM8(eax + 0x14), LO8(ebx) */ /* 0x390050E8: cmp byte ptr [eax + 0x14], bl */
  18339     _flag_a = (uint32_t)(MEM8(eax + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18340     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18341     _flag_k = FK_NARROW(FK_CMP, 24);
  18342     if (CMP_NE(_flag_a, _flag_b)) goto L_39005336; /* 0x390050EB: jne 0x39005336 */
  18343 L_390050F1:
  18344     edx = MEM32(eax + 0x4); /* 0x390050F1: mov edx, dword ptr [eax + 4] */
  18345     ecx = MEM32(edx); /* 0x390050F4: mov ecx, dword ptr [edx] */
  18346     /* cmp eax, ecx */ /* 0x390050F6: cmp eax, ecx */
  18347     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  18348     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18349     _flag_k = FK_CMP;
  18350     if (CMP_NE(_flag_a, _flag_b)) goto L_39005168; /* 0x390050F8: jne 0x39005168 */
  18351 L_390050FA:
  18352     ecx = MEM32(edx + 0x8); /* 0x390050FA: mov ecx, dword ptr [edx + 8] */
  18353     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390050FD: mov dl, byte ptr [ecx + 0x14] */
  18354     /* test LO8(edx), LO8(edx) */ /* 0x39005100: test dl, dl */
  18355     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  18356     _cf = 0;
  18357     _flag_k = FK_NARROW(FK_TEST, 24);
  18358     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900514F; /* 0x39005102: jne 0x3900514f */
  18359 L_39005104:
  18360     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005104: mov byte ptr [ecx + 0x14], bl */
  18361     ecx = MEM32(eax + 0x4); /* 0x39005107: mov ecx, dword ptr [eax + 4] */
  18362     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900510A: mov byte ptr [ecx + 0x14], 0 */
  18363     ecx = MEM32(eax + 0x4); /* 0x3900510E: mov ecx, dword ptr [eax + 4] */
  18364     edx = MEM32(ecx + 0x8); /* 0x39005111: mov edx, dword ptr [ecx + 8] */
  18365     esi = MEM32(edx); /* 0x39005114: mov esi, dword ptr [edx] */
  18366     MEM32(ecx + 0x8) = esi; /* 0x39005116: mov dword ptr [ecx + 8], esi */
  18367     esi = MEM32(edx); /* 0x39005119: mov esi, dword ptr [edx] */
  18368     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900511B: cmp esi, dword ptr [edi + 8] */
  18369     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18370     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18371     _flag_k = FK_CMP;
  18372     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005123; /* 0x3900511E: je 0x39005123 */
  18373 L_39005120:
  18374     MEM32(esi + 0x4) = ecx; /* 0x39005120: mov dword ptr [esi + 4], ecx */
  18375 L_39005123:
  18376     esi = MEM32(ecx + 0x4); /* 0x39005123: mov esi, dword ptr [ecx + 4] */
  18377     MEM32(edx + 0x4) = esi; /* 0x39005126: mov dword ptr [edx + 4], esi */
  18378     esi = MEM32(edi + 0x4); /* 0x39005129: mov esi, dword ptr [edi + 4] */
  18379     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900512C: cmp ecx, dword ptr [esi + 4] */
  18380     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18381     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18382     _flag_k = FK_CMP;
  18383     if (CMP_NE(_flag_a, _flag_b)) goto L_39005136; /* 0x3900512F: jne 0x39005136 */
  18384 L_39005131:
  18385     MEM32(esi + 0x4) = edx; /* 0x39005131: mov dword ptr [esi + 4], edx */
  18386     goto L_39005144; /* 0x39005134: jmp 0x39005144 */
  18387 L_39005136:
  18388     esi = MEM32(ecx + 0x4); /* 0x39005136: mov esi, dword ptr [ecx + 4] */
  18389     /* cmp ecx, MEM32(esi) */ /* 0x39005139: cmp ecx, dword ptr [esi] */
  18390     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  18391     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18392     _flag_k = FK_CMP;
  18393     if (CMP_NE(_flag_a, _flag_b)) goto L_39005141; /* 0x3900513B: jne 0x39005141 */
  18394 L_3900513D:
  18395     MEM32(esi) = edx; /* 0x3900513D: mov dword ptr [esi], edx */
  18396     goto L_39005144; /* 0x3900513F: jmp 0x39005144 */
  18397 L_39005141:
  18398     MEM32(esi + 0x8) = edx; /* 0x39005141: mov dword ptr [esi + 8], edx */
  18399 L_39005144:
  18400     MEM32(edx) = ecx; /* 0x39005144: mov dword ptr [edx], ecx */
  18401     MEM32(ecx + 0x4) = edx; /* 0x39005146: mov dword ptr [ecx + 4], edx */
  18402     edx = MEM32(eax + 0x4); /* 0x39005149: mov edx, dword ptr [eax + 4] */
  18403     ecx = MEM32(edx + 0x8); /* 0x3900514C: mov ecx, dword ptr [edx + 8] */
  18404 L_3900514F:
  18405     edx = MEM32(ecx); /* 0x3900514F: mov edx, dword ptr [ecx] */
  18406     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005151: cmp byte ptr [edx + 0x14], bl */
  18407     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18408     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18409     _flag_k = FK_NARROW(FK_CMP, 24);
  18410     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005154: jne 0x390051ea */
  18411 L_3900515A:
  18412     edx = MEM32(ecx + 0x8); /* 0x3900515A: mov edx, dword ptr [ecx + 8] */
  18413     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x3900515D: cmp byte ptr [edx + 0x14], bl */
  18414     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18415     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18416     _flag_k = FK_NARROW(FK_CMP, 24);
  18417     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005160: jne 0x390051ea */
  18418 L_39005166:
  18419     goto L_390051D2; /* 0x39005166: jmp 0x390051d2 */
  18420 L_39005168:
  18421     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x39005168: mov dl, byte ptr [ecx + 0x14] */
  18422     /* test LO8(edx), LO8(edx) */ /* 0x3900516B: test dl, dl */
  18423     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  18424     _cf = 0;
  18425     _flag_k = FK_NARROW(FK_TEST, 24);
  18426     if (TEST_NZ(_flag_a, _flag_b)) goto L_390051BB; /* 0x3900516D: jne 0x390051bb */
  18427 L_3900516F:
  18428     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900516F: mov byte ptr [ecx + 0x14], bl */
  18429     ecx = MEM32(eax + 0x4); /* 0x39005172: mov ecx, dword ptr [eax + 4] */
  18430     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005175: mov byte ptr [ecx + 0x14], 0 */
  18431     ecx = MEM32(eax + 0x4); /* 0x39005179: mov ecx, dword ptr [eax + 4] */
  18432     edx = MEM32(ecx); /* 0x3900517C: mov edx, dword ptr [ecx] */
  18433     esi = MEM32(edx + 0x8); /* 0x3900517E: mov esi, dword ptr [edx + 8] */
  18434     MEM32(ecx) = esi; /* 0x39005181: mov dword ptr [ecx], esi */
  18435     esi = MEM32(edx + 0x8); /* 0x39005183: mov esi, dword ptr [edx + 8] */
  18436     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005186: cmp esi, dword ptr [edi + 8] */
  18437     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18438     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18439     _flag_k = FK_CMP;
  18440     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900518E; /* 0x39005189: je 0x3900518e */
  18441 L_3900518B:
  18442     MEM32(esi + 0x4) = ecx; /* 0x3900518B: mov dword ptr [esi + 4], ecx */
  18443 L_3900518E:
  18444     esi = MEM32(ecx + 0x4); /* 0x3900518E: mov esi, dword ptr [ecx + 4] */
  18445     MEM32(edx + 0x4) = esi; /* 0x39005191: mov dword ptr [edx + 4], esi */
  18446     esi = MEM32(edi + 0x4); /* 0x39005194: mov esi, dword ptr [edi + 4] */
  18447     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005197: cmp ecx, dword ptr [esi + 4] */
  18448     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18449     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18450     _flag_k = FK_CMP;
  18451     if (CMP_NE(_flag_a, _flag_b)) goto L_390051A1; /* 0x3900519A: jne 0x390051a1 */
  18452 L_3900519C:
  18453     MEM32(esi + 0x4) = edx; /* 0x3900519C: mov dword ptr [esi + 4], edx */
  18454     goto L_390051B0; /* 0x3900519F: jmp 0x390051b0 */
  18455 L_390051A1:
  18456     esi = MEM32(ecx + 0x4); /* 0x390051A1: mov esi, dword ptr [ecx + 4] */
  18457     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x390051A4: cmp ecx, dword ptr [esi + 8] */
  18458     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  18459     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18460     _flag_k = FK_CMP;
  18461     if (CMP_NE(_flag_a, _flag_b)) goto L_390051AE; /* 0x390051A7: jne 0x390051ae */
  18462 L_390051A9:
  18463     MEM32(esi + 0x8) = edx; /* 0x390051A9: mov dword ptr [esi + 8], edx */
  18464     goto L_390051B0; /* 0x390051AC: jmp 0x390051b0 */
  18465 L_390051AE:
  18466     MEM32(esi) = edx; /* 0x390051AE: mov dword ptr [esi], edx */
  18467 L_390051B0:
  18468     MEM32(edx + 0x8) = ecx; /* 0x390051B0: mov dword ptr [edx + 8], ecx */
  18469     MEM32(ecx + 0x4) = edx; /* 0x390051B3: mov dword ptr [ecx + 4], edx */
  18470     edx = MEM32(eax + 0x4); /* 0x390051B6: mov edx, dword ptr [eax + 4] */
  18471     ecx = MEM32(edx); /* 0x390051B9: mov ecx, dword ptr [edx] */
  18472 L_390051BB:
  18473     edx = MEM32(ecx + 0x8); /* 0x390051BB: mov edx, dword ptr [ecx + 8] */
  18474     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051BE: cmp byte ptr [edx + 0x14], bl */
  18475     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18476     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18477     _flag_k = FK_NARROW(FK_CMP, 24);
  18478     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051C1: jne 0x39005297 */
  18479 L_390051C7:
  18480     edx = MEM32(ecx); /* 0x390051C7: mov edx, dword ptr [ecx] */
  18481     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051C9: cmp byte ptr [edx + 0x14], bl */
  18482     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18483     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18484     _flag_k = FK_NARROW(FK_CMP, 24);
  18485     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051CC: jne 0x39005297 */
  18486 L_390051D2:
  18487     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051D2: mov byte ptr [ecx + 0x14], 0 */
  18488     ecx = MEM32(edi + 0x4); /* 0x390051D6: mov ecx, dword ptr [edi + 4] */
  18489     eax = MEM32(eax + 0x4); /* 0x390051D9: mov eax, dword ptr [eax + 4] */
  18490     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x390051DC: cmp eax, dword ptr [ecx + 4] */
  18491     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  18492     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18493     _flag_k = FK_CMP;
  18494     RECOMP_BACKEDGE();
  18495     if (CMP_NE(_flag_a, _flag_b)) goto L_390050E8; /* 0x390051DF: jne 0x390050e8 */
  18496 L_390051E5:
  18497     goto L_39005336; /* 0x390051E5: jmp 0x39005336 */
  18498 L_390051EA:
  18499     edx = MEM32(ecx + 0x8); /* 0x390051EA: mov edx, dword ptr [ecx + 8] */
  18500     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051ED: cmp byte ptr [edx + 0x14], bl */
  18501     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18502     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18503     _flag_k = FK_NARROW(FK_CMP, 24);
  18504     if (CMP_NE(_flag_a, _flag_b)) goto L_3900523B; /* 0x390051F0: jne 0x3900523b */
  18505 L_390051F2:
  18506     edx = MEM32(ecx); /* 0x390051F2: mov edx, dword ptr [ecx] */
  18507     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390051F4: mov byte ptr [edx + 0x14], bl */
  18508     edx = MEM32(ecx); /* 0x390051F7: mov edx, dword ptr [ecx] */
  18509     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051F9: mov byte ptr [ecx + 0x14], 0 */
  18510     esi = MEM32(edx + 0x8); /* 0x390051FD: mov esi, dword ptr [edx + 8] */
  18511     MEM32(ecx) = esi; /* 0x39005200: mov dword ptr [ecx], esi */
  18512     esi = MEM32(edx + 0x8); /* 0x39005202: mov esi, dword ptr [edx + 8] */
  18513     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005205: cmp esi, dword ptr [edi + 8] */
  18514     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18515     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18516     _flag_k = FK_CMP;
  18517     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900520D; /* 0x39005208: je 0x3900520d */
  18518 L_3900520A:
  18519     MEM32(esi + 0x4) = ecx; /* 0x3900520A: mov dword ptr [esi + 4], ecx */
  18520 L_3900520D:
  18521     esi = MEM32(ecx + 0x4); /* 0x3900520D: mov esi, dword ptr [ecx + 4] */
  18522     MEM32(edx + 0x4) = esi; /* 0x39005210: mov dword ptr [edx + 4], esi */
  18523     esi = MEM32(edi + 0x4); /* 0x39005213: mov esi, dword ptr [edi + 4] */
  18524     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005216: cmp ecx, dword ptr [esi + 4] */
  18525     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18526     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18527     _flag_k = FK_CMP;
  18528     if (CMP_NE(_flag_a, _flag_b)) goto L_39005220; /* 0x39005219: jne 0x39005220 */
  18529 L_3900521B:
  18530     MEM32(esi + 0x4) = edx; /* 0x3900521B: mov dword ptr [esi + 4], edx */
  18531     goto L_3900522F; /* 0x3900521E: jmp 0x3900522f */
  18532 L_39005220:
  18533     esi = MEM32(ecx + 0x4); /* 0x39005220: mov esi, dword ptr [ecx + 4] */
  18534     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005223: cmp ecx, dword ptr [esi + 8] */
  18535     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  18536     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18537     _flag_k = FK_CMP;
  18538     if (CMP_NE(_flag_a, _flag_b)) goto L_3900522D; /* 0x39005226: jne 0x3900522d */
  18539 L_39005228:
  18540     MEM32(esi + 0x8) = edx; /* 0x39005228: mov dword ptr [esi + 8], edx */
  18541     goto L_3900522F; /* 0x3900522B: jmp 0x3900522f */
  18542 L_3900522D:
  18543     MEM32(esi) = edx; /* 0x3900522D: mov dword ptr [esi], edx */
  18544 L_3900522F:
  18545     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  18546     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  18547     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  18548     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  18549 L_3900523B:
  18550     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  18551     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  18552     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  18553     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  18554     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  18555     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  18556     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  18557     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  18558     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  18559     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  18560     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  18561     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  18562     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  18563     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18564     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18565     _flag_k = FK_CMP;
  18566     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  18567 L_39005262:
  18568     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  18569 L_39005265:
  18570     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  18571     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  18572     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  18573     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  18574     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18575     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18576     _flag_k = FK_CMP;
  18577     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  18578 L_39005273:
  18579     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  18580     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  18581     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  18582 L_3900527D:
  18583     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  18584     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  18585     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  18586     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18587     _flag_k = FK_CMP;
  18588     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  18589 L_39005284:
  18590     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  18591     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  18592     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  18593 L_3900528D:
  18594     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  18595     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  18596     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  18597 L_39005297:
  18598     edx = MEM32(ecx); /* 0x39005297: mov edx, dword ptr [ecx] */
  18599     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005299: cmp byte ptr [edx + 0x14], bl */
  18600     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18601     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18602     _flag_k = FK_NARROW(FK_CMP, 24);
  18603     if (CMP_NE(_flag_a, _flag_b)) goto L_390052E5; /* 0x3900529C: jne 0x390052e5 */
  18604 L_3900529E:
  18605     edx = MEM32(ecx + 0x8); /* 0x3900529E: mov edx, dword ptr [ecx + 8] */
  18606     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052A1: mov byte ptr [edx + 0x14], bl */
  18607     edx = MEM32(ecx + 0x8); /* 0x390052A4: mov edx, dword ptr [ecx + 8] */
  18608     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390052A7: mov byte ptr [ecx + 0x14], 0 */
  18609     esi = MEM32(edx); /* 0x390052AB: mov esi, dword ptr [edx] */
  18610     MEM32(ecx + 0x8) = esi; /* 0x390052AD: mov dword ptr [ecx + 8], esi */
  18611     esi = MEM32(edx); /* 0x390052B0: mov esi, dword ptr [edx] */
  18612     /* cmp esi, MEM32(edi + 0x8) */ /* 0x390052B2: cmp esi, dword ptr [edi + 8] */
  18613     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18614     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18615     _flag_k = FK_CMP;
  18616     if (CMP_EQ(_flag_a, _flag_b)) goto L_390052BA; /* 0x390052B5: je 0x390052ba */
  18617 L_390052B7:
  18618     MEM32(esi + 0x4) = ecx; /* 0x390052B7: mov dword ptr [esi + 4], ecx */
  18619 L_390052BA:
  18620     esi = MEM32(ecx + 0x4); /* 0x390052BA: mov esi, dword ptr [ecx + 4] */
  18621     MEM32(edx + 0x4) = esi; /* 0x390052BD: mov dword ptr [edx + 4], esi */
  18622     esi = MEM32(edi + 0x4); /* 0x390052C0: mov esi, dword ptr [edi + 4] */
  18623     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x390052C3: cmp ecx, dword ptr [esi + 4] */
  18624     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18625     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18626     _flag_k = FK_CMP;
  18627     if (CMP_NE(_flag_a, _flag_b)) goto L_390052CD; /* 0x390052C6: jne 0x390052cd */
  18628 L_390052C8:
  18629     MEM32(esi + 0x4) = edx; /* 0x390052C8: mov dword ptr [esi + 4], edx */
  18630     goto L_390052DB; /* 0x390052CB: jmp 0x390052db */
  18631 L_390052CD:
  18632     esi = MEM32(ecx + 0x4); /* 0x390052CD: mov esi, dword ptr [ecx + 4] */
  18633     /* cmp ecx, MEM32(esi) */ /* 0x390052D0: cmp ecx, dword ptr [esi] */
  18634     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  18635     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18636     _flag_k = FK_CMP;
  18637     if (CMP_NE(_flag_a, _flag_b)) goto L_390052D8; /* 0x390052D2: jne 0x390052d8 */
  18638 L_390052D4:
  18639     MEM32(esi) = edx; /* 0x390052D4: mov dword ptr [esi], edx */
  18640     goto L_390052DB; /* 0x390052D6: jmp 0x390052db */
  18641 L_390052D8:
  18642     MEM32(esi + 0x8) = edx; /* 0x390052D8: mov dword ptr [esi + 8], edx */
  18643 L_390052DB:
  18644     MEM32(edx) = ecx; /* 0x390052DB: mov dword ptr [edx], ecx */
  18645     MEM32(ecx + 0x4) = edx; /* 0x390052DD: mov dword ptr [ecx + 4], edx */
  18646     ecx = MEM32(eax + 0x4); /* 0x390052E0: mov ecx, dword ptr [eax + 4] */
  18647     ecx = MEM32(ecx); /* 0x390052E3: mov ecx, dword ptr [ecx] */
  18648 L_390052E5:
  18649     edx = MEM32(eax + 0x4); /* 0x390052E5: mov edx, dword ptr [eax + 4] */
  18650     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x390052E8: mov dl, byte ptr [edx + 0x14] */
  18651     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x390052EB: mov byte ptr [ecx + 0x14], dl */
  18652     edx = MEM32(eax + 0x4); /* 0x390052EE: mov edx, dword ptr [eax + 4] */
  18653     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F1: mov byte ptr [edx + 0x14], bl */
  18654     ecx = MEM32(ecx); /* 0x390052F4: mov ecx, dword ptr [ecx] */
  18655     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F6: mov byte ptr [ecx + 0x14], bl */
  18656     ecx = MEM32(eax + 0x4); /* 0x390052F9: mov ecx, dword ptr [eax + 4] */
  18657     edx = MEM32(ecx); /* 0x390052FC: mov edx, dword ptr [ecx] */
  18658     esi = MEM32(edx + 0x8); /* 0x390052FE: mov esi, dword ptr [edx + 8] */
  18659     MEM32(ecx) = esi; /* 0x39005301: mov dword ptr [ecx], esi */
  18660     esi = MEM32(edx + 0x8); /* 0x39005303: mov esi, dword ptr [edx + 8] */
  18661     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005306: cmp esi, dword ptr [edi + 8] */
  18662     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18663     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18664     _flag_k = FK_CMP;
  18665     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900530E; /* 0x39005309: je 0x3900530e */
  18666 L_3900530B:
  18667     MEM32(esi + 0x4) = ecx; /* 0x3900530B: mov dword ptr [esi + 4], ecx */
  18668 L_3900530E:
  18669     esi = MEM32(ecx + 0x4); /* 0x3900530E: mov esi, dword ptr [ecx + 4] */
  18670     MEM32(edx + 0x4) = esi; /* 0x39005311: mov dword ptr [edx + 4], esi */
  18671     esi = MEM32(edi + 0x4); /* 0x39005314: mov esi, dword ptr [edi + 4] */
  18672     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005317: cmp ecx, dword ptr [esi + 4] */
  18673     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18674     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18675     _flag_k = FK_CMP;
  18676     if (CMP_NE(_flag_a, _flag_b)) goto L_39005321; /* 0x3900531A: jne 0x39005321 */
  18677 L_3900531C:
  18678     MEM32(esi + 0x4) = edx; /* 0x3900531C: mov dword ptr [esi + 4], edx */
  18679     goto L_39005330; /* 0x3900531F: jmp 0x39005330 */
  18680 L_39005321:
  18681     esi = MEM32(ecx + 0x4); /* 0x39005321: mov esi, dword ptr [ecx + 4] */
  18682     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005324: cmp ecx, dword ptr [esi + 8] */
  18683     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  18684     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18685     _flag_k = FK_CMP;
  18686     if (CMP_NE(_flag_a, _flag_b)) goto L_3900532E; /* 0x39005327: jne 0x3900532e */
  18687 L_39005329:
  18688     MEM32(esi + 0x8) = edx; /* 0x39005329: mov dword ptr [esi + 8], edx */
  18689     goto L_39005330; /* 0x3900532C: jmp 0x39005330 */
  18690 L_3900532E:
  18691     MEM32(esi) = edx; /* 0x3900532E: mov dword ptr [esi], edx */
  18692 L_39005330:
  18693     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  18694 L_39005333:
  18695     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  18696 L_39005336:
  18697     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  18698     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  18699     PUSH32(esp, edx); /* 0x3900533C: push edx */
  18700     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  18701     RECOMP_FLAGS_IN();
  18702     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  18703     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  18704     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  18705     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  18706     esp = esp + 4; /* 0x39005348: add esp, 4 */
  18707     _flag_k = FK_ADD;
  18708     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  18709     eax = eax - 1; /* 0x3900534B: dec eax */
  18710     _flag_k = FK_DEC;
  18711     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  18712     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  18713     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  18714     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  18715     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  18716     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  18717     esp = ebp; /* 0x39005357: mov esp, ebp */
  18718     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  18719     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  18720     RECOMP_REGS_OUT();
  18721 }
  18722 
  18723 void sub_390051D2(void) {
  18724     int _fpu_cmp = 0;
  18725     uint32_t _cf = 0;
  18726     int _df = 1;
  18727     uint32_t _flag_k = FK_NONE;
  18728     uint32_t _flag_a = 0, _flag_b = 0;
  18729     uint32_t _itail_tgt = 0;
  18730     RECOMP_REGS_LOCALS
  18731     RECOMP_ENTER(0x390051D2u);
  18732 
  18733     goto L_390051D2;
  18734 L_390050E8:
  18735     /* cmp MEM8(eax + 0x14), LO8(ebx) */ /* 0x390050E8: cmp byte ptr [eax + 0x14], bl */
  18736     _flag_a = (uint32_t)(MEM8(eax + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18737     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18738     _flag_k = FK_NARROW(FK_CMP, 24);
  18739     if (CMP_NE(_flag_a, _flag_b)) goto L_39005336; /* 0x390050EB: jne 0x39005336 */
  18740 L_390050F1:
  18741     edx = MEM32(eax + 0x4); /* 0x390050F1: mov edx, dword ptr [eax + 4] */
  18742     ecx = MEM32(edx); /* 0x390050F4: mov ecx, dword ptr [edx] */
  18743     /* cmp eax, ecx */ /* 0x390050F6: cmp eax, ecx */
  18744     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  18745     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18746     _flag_k = FK_CMP;
  18747     if (CMP_NE(_flag_a, _flag_b)) goto L_39005168; /* 0x390050F8: jne 0x39005168 */
  18748 L_390050FA:
  18749     ecx = MEM32(edx + 0x8); /* 0x390050FA: mov ecx, dword ptr [edx + 8] */
  18750     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390050FD: mov dl, byte ptr [ecx + 0x14] */
  18751     /* test LO8(edx), LO8(edx) */ /* 0x39005100: test dl, dl */
  18752     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  18753     _cf = 0;
  18754     _flag_k = FK_NARROW(FK_TEST, 24);
  18755     if (TEST_NZ(_flag_a, _flag_b)) goto L_3900514F; /* 0x39005102: jne 0x3900514f */
  18756 L_39005104:
  18757     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005104: mov byte ptr [ecx + 0x14], bl */
  18758     ecx = MEM32(eax + 0x4); /* 0x39005107: mov ecx, dword ptr [eax + 4] */
  18759     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900510A: mov byte ptr [ecx + 0x14], 0 */
  18760     ecx = MEM32(eax + 0x4); /* 0x3900510E: mov ecx, dword ptr [eax + 4] */
  18761     edx = MEM32(ecx + 0x8); /* 0x39005111: mov edx, dword ptr [ecx + 8] */
  18762     esi = MEM32(edx); /* 0x39005114: mov esi, dword ptr [edx] */
  18763     MEM32(ecx + 0x8) = esi; /* 0x39005116: mov dword ptr [ecx + 8], esi */
  18764     esi = MEM32(edx); /* 0x39005119: mov esi, dword ptr [edx] */
  18765     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900511B: cmp esi, dword ptr [edi + 8] */
  18766     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18767     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18768     _flag_k = FK_CMP;
  18769     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005123; /* 0x3900511E: je 0x39005123 */
  18770 L_39005120:
  18771     MEM32(esi + 0x4) = ecx; /* 0x39005120: mov dword ptr [esi + 4], ecx */
  18772 L_39005123:
  18773     esi = MEM32(ecx + 0x4); /* 0x39005123: mov esi, dword ptr [ecx + 4] */
  18774     MEM32(edx + 0x4) = esi; /* 0x39005126: mov dword ptr [edx + 4], esi */
  18775     esi = MEM32(edi + 0x4); /* 0x39005129: mov esi, dword ptr [edi + 4] */
  18776     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900512C: cmp ecx, dword ptr [esi + 4] */
  18777     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18778     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18779     _flag_k = FK_CMP;
  18780     if (CMP_NE(_flag_a, _flag_b)) goto L_39005136; /* 0x3900512F: jne 0x39005136 */
  18781 L_39005131:
  18782     MEM32(esi + 0x4) = edx; /* 0x39005131: mov dword ptr [esi + 4], edx */
  18783     goto L_39005144; /* 0x39005134: jmp 0x39005144 */
  18784 L_39005136:
  18785     esi = MEM32(ecx + 0x4); /* 0x39005136: mov esi, dword ptr [ecx + 4] */
  18786     /* cmp ecx, MEM32(esi) */ /* 0x39005139: cmp ecx, dword ptr [esi] */
  18787     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  18788     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18789     _flag_k = FK_CMP;
  18790     if (CMP_NE(_flag_a, _flag_b)) goto L_39005141; /* 0x3900513B: jne 0x39005141 */
  18791 L_3900513D:
  18792     MEM32(esi) = edx; /* 0x3900513D: mov dword ptr [esi], edx */
  18793     goto L_39005144; /* 0x3900513F: jmp 0x39005144 */
  18794 L_39005141:
  18795     MEM32(esi + 0x8) = edx; /* 0x39005141: mov dword ptr [esi + 8], edx */
  18796 L_39005144:
  18797     MEM32(edx) = ecx; /* 0x39005144: mov dword ptr [edx], ecx */
  18798     MEM32(ecx + 0x4) = edx; /* 0x39005146: mov dword ptr [ecx + 4], edx */
  18799     edx = MEM32(eax + 0x4); /* 0x39005149: mov edx, dword ptr [eax + 4] */
  18800     ecx = MEM32(edx + 0x8); /* 0x3900514C: mov ecx, dword ptr [edx + 8] */
  18801 L_3900514F:
  18802     edx = MEM32(ecx); /* 0x3900514F: mov edx, dword ptr [ecx] */
  18803     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005151: cmp byte ptr [edx + 0x14], bl */
  18804     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18805     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18806     _flag_k = FK_NARROW(FK_CMP, 24);
  18807     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005154: jne 0x390051ea */
  18808 L_3900515A:
  18809     edx = MEM32(ecx + 0x8); /* 0x3900515A: mov edx, dword ptr [ecx + 8] */
  18810     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x3900515D: cmp byte ptr [edx + 0x14], bl */
  18811     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18812     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18813     _flag_k = FK_NARROW(FK_CMP, 24);
  18814     if (CMP_NE(_flag_a, _flag_b)) goto L_390051EA; /* 0x39005160: jne 0x390051ea */
  18815 L_39005166:
  18816     goto L_390051D2; /* 0x39005166: jmp 0x390051d2 */
  18817 L_39005168:
  18818     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x39005168: mov dl, byte ptr [ecx + 0x14] */
  18819     /* test LO8(edx), LO8(edx) */ /* 0x3900516B: test dl, dl */
  18820     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  18821     _cf = 0;
  18822     _flag_k = FK_NARROW(FK_TEST, 24);
  18823     if (TEST_NZ(_flag_a, _flag_b)) goto L_390051BB; /* 0x3900516D: jne 0x390051bb */
  18824 L_3900516F:
  18825     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900516F: mov byte ptr [ecx + 0x14], bl */
  18826     ecx = MEM32(eax + 0x4); /* 0x39005172: mov ecx, dword ptr [eax + 4] */
  18827     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005175: mov byte ptr [ecx + 0x14], 0 */
  18828     ecx = MEM32(eax + 0x4); /* 0x39005179: mov ecx, dword ptr [eax + 4] */
  18829     edx = MEM32(ecx); /* 0x3900517C: mov edx, dword ptr [ecx] */
  18830     esi = MEM32(edx + 0x8); /* 0x3900517E: mov esi, dword ptr [edx + 8] */
  18831     MEM32(ecx) = esi; /* 0x39005181: mov dword ptr [ecx], esi */
  18832     esi = MEM32(edx + 0x8); /* 0x39005183: mov esi, dword ptr [edx + 8] */
  18833     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005186: cmp esi, dword ptr [edi + 8] */
  18834     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18835     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18836     _flag_k = FK_CMP;
  18837     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900518E; /* 0x39005189: je 0x3900518e */
  18838 L_3900518B:
  18839     MEM32(esi + 0x4) = ecx; /* 0x3900518B: mov dword ptr [esi + 4], ecx */
  18840 L_3900518E:
  18841     esi = MEM32(ecx + 0x4); /* 0x3900518E: mov esi, dword ptr [ecx + 4] */
  18842     MEM32(edx + 0x4) = esi; /* 0x39005191: mov dword ptr [edx + 4], esi */
  18843     esi = MEM32(edi + 0x4); /* 0x39005194: mov esi, dword ptr [edi + 4] */
  18844     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005197: cmp ecx, dword ptr [esi + 4] */
  18845     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18846     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18847     _flag_k = FK_CMP;
  18848     if (CMP_NE(_flag_a, _flag_b)) goto L_390051A1; /* 0x3900519A: jne 0x390051a1 */
  18849 L_3900519C:
  18850     MEM32(esi + 0x4) = edx; /* 0x3900519C: mov dword ptr [esi + 4], edx */
  18851     goto L_390051B0; /* 0x3900519F: jmp 0x390051b0 */
  18852 L_390051A1:
  18853     esi = MEM32(ecx + 0x4); /* 0x390051A1: mov esi, dword ptr [ecx + 4] */
  18854     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x390051A4: cmp ecx, dword ptr [esi + 8] */
  18855     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  18856     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18857     _flag_k = FK_CMP;
  18858     if (CMP_NE(_flag_a, _flag_b)) goto L_390051AE; /* 0x390051A7: jne 0x390051ae */
  18859 L_390051A9:
  18860     MEM32(esi + 0x8) = edx; /* 0x390051A9: mov dword ptr [esi + 8], edx */
  18861     goto L_390051B0; /* 0x390051AC: jmp 0x390051b0 */
  18862 L_390051AE:
  18863     MEM32(esi) = edx; /* 0x390051AE: mov dword ptr [esi], edx */
  18864 L_390051B0:
  18865     MEM32(edx + 0x8) = ecx; /* 0x390051B0: mov dword ptr [edx + 8], ecx */
  18866     MEM32(ecx + 0x4) = edx; /* 0x390051B3: mov dword ptr [ecx + 4], edx */
  18867     edx = MEM32(eax + 0x4); /* 0x390051B6: mov edx, dword ptr [eax + 4] */
  18868     ecx = MEM32(edx); /* 0x390051B9: mov ecx, dword ptr [edx] */
  18869 L_390051BB:
  18870     edx = MEM32(ecx + 0x8); /* 0x390051BB: mov edx, dword ptr [ecx + 8] */
  18871     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051BE: cmp byte ptr [edx + 0x14], bl */
  18872     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18873     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18874     _flag_k = FK_NARROW(FK_CMP, 24);
  18875     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051C1: jne 0x39005297 */
  18876 L_390051C7:
  18877     edx = MEM32(ecx); /* 0x390051C7: mov edx, dword ptr [ecx] */
  18878     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051C9: cmp byte ptr [edx + 0x14], bl */
  18879     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18880     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18881     _flag_k = FK_NARROW(FK_CMP, 24);
  18882     if (CMP_NE(_flag_a, _flag_b)) goto L_39005297; /* 0x390051CC: jne 0x39005297 */
  18883 L_390051D2:
  18884     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051D2: mov byte ptr [ecx + 0x14], 0 */
  18885     ecx = MEM32(edi + 0x4); /* 0x390051D6: mov ecx, dword ptr [edi + 4] */
  18886     eax = MEM32(eax + 0x4); /* 0x390051D9: mov eax, dword ptr [eax + 4] */
  18887     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x390051DC: cmp eax, dword ptr [ecx + 4] */
  18888     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  18889     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18890     _flag_k = FK_CMP;
  18891     RECOMP_BACKEDGE();
  18892     if (CMP_NE(_flag_a, _flag_b)) goto L_390050E8; /* 0x390051DF: jne 0x390050e8 */
  18893 L_390051E5:
  18894     goto L_39005336; /* 0x390051E5: jmp 0x39005336 */
  18895 L_390051EA:
  18896     edx = MEM32(ecx + 0x8); /* 0x390051EA: mov edx, dword ptr [ecx + 8] */
  18897     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051ED: cmp byte ptr [edx + 0x14], bl */
  18898     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18899     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18900     _flag_k = FK_NARROW(FK_CMP, 24);
  18901     if (CMP_NE(_flag_a, _flag_b)) goto L_3900523B; /* 0x390051F0: jne 0x3900523b */
  18902 L_390051F2:
  18903     edx = MEM32(ecx); /* 0x390051F2: mov edx, dword ptr [ecx] */
  18904     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390051F4: mov byte ptr [edx + 0x14], bl */
  18905     edx = MEM32(ecx); /* 0x390051F7: mov edx, dword ptr [ecx] */
  18906     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051F9: mov byte ptr [ecx + 0x14], 0 */
  18907     esi = MEM32(edx + 0x8); /* 0x390051FD: mov esi, dword ptr [edx + 8] */
  18908     MEM32(ecx) = esi; /* 0x39005200: mov dword ptr [ecx], esi */
  18909     esi = MEM32(edx + 0x8); /* 0x39005202: mov esi, dword ptr [edx + 8] */
  18910     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005205: cmp esi, dword ptr [edi + 8] */
  18911     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18912     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18913     _flag_k = FK_CMP;
  18914     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900520D; /* 0x39005208: je 0x3900520d */
  18915 L_3900520A:
  18916     MEM32(esi + 0x4) = ecx; /* 0x3900520A: mov dword ptr [esi + 4], ecx */
  18917 L_3900520D:
  18918     esi = MEM32(ecx + 0x4); /* 0x3900520D: mov esi, dword ptr [ecx + 4] */
  18919     MEM32(edx + 0x4) = esi; /* 0x39005210: mov dword ptr [edx + 4], esi */
  18920     esi = MEM32(edi + 0x4); /* 0x39005213: mov esi, dword ptr [edi + 4] */
  18921     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005216: cmp ecx, dword ptr [esi + 4] */
  18922     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18923     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18924     _flag_k = FK_CMP;
  18925     if (CMP_NE(_flag_a, _flag_b)) goto L_39005220; /* 0x39005219: jne 0x39005220 */
  18926 L_3900521B:
  18927     MEM32(esi + 0x4) = edx; /* 0x3900521B: mov dword ptr [esi + 4], edx */
  18928     goto L_3900522F; /* 0x3900521E: jmp 0x3900522f */
  18929 L_39005220:
  18930     esi = MEM32(ecx + 0x4); /* 0x39005220: mov esi, dword ptr [ecx + 4] */
  18931     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005223: cmp ecx, dword ptr [esi + 8] */
  18932     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  18933     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18934     _flag_k = FK_CMP;
  18935     if (CMP_NE(_flag_a, _flag_b)) goto L_3900522D; /* 0x39005226: jne 0x3900522d */
  18936 L_39005228:
  18937     MEM32(esi + 0x8) = edx; /* 0x39005228: mov dword ptr [esi + 8], edx */
  18938     goto L_3900522F; /* 0x3900522B: jmp 0x3900522f */
  18939 L_3900522D:
  18940     MEM32(esi) = edx; /* 0x3900522D: mov dword ptr [esi], edx */
  18941 L_3900522F:
  18942     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  18943     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  18944     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  18945     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  18946 L_3900523B:
  18947     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  18948     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  18949     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  18950     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  18951     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  18952     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  18953     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  18954     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  18955     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  18956     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  18957     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  18958     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  18959     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  18960     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  18961     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18962     _flag_k = FK_CMP;
  18963     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  18964 L_39005262:
  18965     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  18966 L_39005265:
  18967     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  18968     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  18969     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  18970     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  18971     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  18972     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18973     _flag_k = FK_CMP;
  18974     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  18975 L_39005273:
  18976     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  18977     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  18978     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  18979 L_3900527D:
  18980     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  18981     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  18982     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  18983     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18984     _flag_k = FK_CMP;
  18985     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  18986 L_39005284:
  18987     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  18988     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  18989     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  18990 L_3900528D:
  18991     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  18992     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  18993     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  18994 L_39005297:
  18995     edx = MEM32(ecx); /* 0x39005297: mov edx, dword ptr [ecx] */
  18996     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x39005299: cmp byte ptr [edx + 0x14], bl */
  18997     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  18998     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  18999     _flag_k = FK_NARROW(FK_CMP, 24);
  19000     if (CMP_NE(_flag_a, _flag_b)) goto L_390052E5; /* 0x3900529C: jne 0x390052e5 */
  19001 L_3900529E:
  19002     edx = MEM32(ecx + 0x8); /* 0x3900529E: mov edx, dword ptr [ecx + 8] */
  19003     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052A1: mov byte ptr [edx + 0x14], bl */
  19004     edx = MEM32(ecx + 0x8); /* 0x390052A4: mov edx, dword ptr [ecx + 8] */
  19005     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390052A7: mov byte ptr [ecx + 0x14], 0 */
  19006     esi = MEM32(edx); /* 0x390052AB: mov esi, dword ptr [edx] */
  19007     MEM32(ecx + 0x8) = esi; /* 0x390052AD: mov dword ptr [ecx + 8], esi */
  19008     esi = MEM32(edx); /* 0x390052B0: mov esi, dword ptr [edx] */
  19009     /* cmp esi, MEM32(edi + 0x8) */ /* 0x390052B2: cmp esi, dword ptr [edi + 8] */
  19010     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  19011     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19012     _flag_k = FK_CMP;
  19013     if (CMP_EQ(_flag_a, _flag_b)) goto L_390052BA; /* 0x390052B5: je 0x390052ba */
  19014 L_390052B7:
  19015     MEM32(esi + 0x4) = ecx; /* 0x390052B7: mov dword ptr [esi + 4], ecx */
  19016 L_390052BA:
  19017     esi = MEM32(ecx + 0x4); /* 0x390052BA: mov esi, dword ptr [ecx + 4] */
  19018     MEM32(edx + 0x4) = esi; /* 0x390052BD: mov dword ptr [edx + 4], esi */
  19019     esi = MEM32(edi + 0x4); /* 0x390052C0: mov esi, dword ptr [edi + 4] */
  19020     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x390052C3: cmp ecx, dword ptr [esi + 4] */
  19021     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  19022     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19023     _flag_k = FK_CMP;
  19024     if (CMP_NE(_flag_a, _flag_b)) goto L_390052CD; /* 0x390052C6: jne 0x390052cd */
  19025 L_390052C8:
  19026     MEM32(esi + 0x4) = edx; /* 0x390052C8: mov dword ptr [esi + 4], edx */
  19027     goto L_390052DB; /* 0x390052CB: jmp 0x390052db */
  19028 L_390052CD:
  19029     esi = MEM32(ecx + 0x4); /* 0x390052CD: mov esi, dword ptr [ecx + 4] */
  19030     /* cmp ecx, MEM32(esi) */ /* 0x390052D0: cmp ecx, dword ptr [esi] */
  19031     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  19032     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19033     _flag_k = FK_CMP;
  19034     if (CMP_NE(_flag_a, _flag_b)) goto L_390052D8; /* 0x390052D2: jne 0x390052d8 */
  19035 L_390052D4:
  19036     MEM32(esi) = edx; /* 0x390052D4: mov dword ptr [esi], edx */
  19037     goto L_390052DB; /* 0x390052D6: jmp 0x390052db */
  19038 L_390052D8:
  19039     MEM32(esi + 0x8) = edx; /* 0x390052D8: mov dword ptr [esi + 8], edx */
  19040 L_390052DB:
  19041     MEM32(edx) = ecx; /* 0x390052DB: mov dword ptr [edx], ecx */
  19042     MEM32(ecx + 0x4) = edx; /* 0x390052DD: mov dword ptr [ecx + 4], edx */
  19043     ecx = MEM32(eax + 0x4); /* 0x390052E0: mov ecx, dword ptr [eax + 4] */
  19044     ecx = MEM32(ecx); /* 0x390052E3: mov ecx, dword ptr [ecx] */
  19045 L_390052E5:
  19046     edx = MEM32(eax + 0x4); /* 0x390052E5: mov edx, dword ptr [eax + 4] */
  19047     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x390052E8: mov dl, byte ptr [edx + 0x14] */
  19048     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x390052EB: mov byte ptr [ecx + 0x14], dl */
  19049     edx = MEM32(eax + 0x4); /* 0x390052EE: mov edx, dword ptr [eax + 4] */
  19050     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F1: mov byte ptr [edx + 0x14], bl */
  19051     ecx = MEM32(ecx); /* 0x390052F4: mov ecx, dword ptr [ecx] */
  19052     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F6: mov byte ptr [ecx + 0x14], bl */
  19053     ecx = MEM32(eax + 0x4); /* 0x390052F9: mov ecx, dword ptr [eax + 4] */
  19054     edx = MEM32(ecx); /* 0x390052FC: mov edx, dword ptr [ecx] */
  19055     esi = MEM32(edx + 0x8); /* 0x390052FE: mov esi, dword ptr [edx + 8] */
  19056     MEM32(ecx) = esi; /* 0x39005301: mov dword ptr [ecx], esi */
  19057     esi = MEM32(edx + 0x8); /* 0x39005303: mov esi, dword ptr [edx + 8] */
  19058     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005306: cmp esi, dword ptr [edi + 8] */
  19059     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  19060     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19061     _flag_k = FK_CMP;
  19062     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900530E; /* 0x39005309: je 0x3900530e */
  19063 L_3900530B:
  19064     MEM32(esi + 0x4) = ecx; /* 0x3900530B: mov dword ptr [esi + 4], ecx */
  19065 L_3900530E:
  19066     esi = MEM32(ecx + 0x4); /* 0x3900530E: mov esi, dword ptr [ecx + 4] */
  19067     MEM32(edx + 0x4) = esi; /* 0x39005311: mov dword ptr [edx + 4], esi */
  19068     esi = MEM32(edi + 0x4); /* 0x39005314: mov esi, dword ptr [edi + 4] */
  19069     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005317: cmp ecx, dword ptr [esi + 4] */
  19070     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  19071     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19072     _flag_k = FK_CMP;
  19073     if (CMP_NE(_flag_a, _flag_b)) goto L_39005321; /* 0x3900531A: jne 0x39005321 */
  19074 L_3900531C:
  19075     MEM32(esi + 0x4) = edx; /* 0x3900531C: mov dword ptr [esi + 4], edx */
  19076     goto L_39005330; /* 0x3900531F: jmp 0x39005330 */
  19077 L_39005321:
  19078     esi = MEM32(ecx + 0x4); /* 0x39005321: mov esi, dword ptr [ecx + 4] */
  19079     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005324: cmp ecx, dword ptr [esi + 8] */
  19080     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  19081     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19082     _flag_k = FK_CMP;
  19083     if (CMP_NE(_flag_a, _flag_b)) goto L_3900532E; /* 0x39005327: jne 0x3900532e */
  19084 L_39005329:
  19085     MEM32(esi + 0x8) = edx; /* 0x39005329: mov dword ptr [esi + 8], edx */
  19086     goto L_39005330; /* 0x3900532C: jmp 0x39005330 */
  19087 L_3900532E:
  19088     MEM32(esi) = edx; /* 0x3900532E: mov dword ptr [esi], edx */
  19089 L_39005330:
  19090     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  19091 L_39005333:
  19092     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  19093 L_39005336:
  19094     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  19095     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  19096     PUSH32(esp, edx); /* 0x3900533C: push edx */
  19097     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  19098     RECOMP_FLAGS_IN();
  19099     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  19100     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  19101     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  19102     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  19103     esp = esp + 4; /* 0x39005348: add esp, 4 */
  19104     _flag_k = FK_ADD;
  19105     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  19106     eax = eax - 1; /* 0x3900534B: dec eax */
  19107     _flag_k = FK_DEC;
  19108     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  19109     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  19110     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  19111     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  19112     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  19113     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  19114     esp = ebp; /* 0x39005357: mov esp, ebp */
  19115     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  19116     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  19117     RECOMP_REGS_OUT();
  19118 }
  19119 
  19120 void sub_390051EA(void) {
  19121     int _fpu_cmp = 0;
  19122     uint32_t _cf = 0;
  19123     int _df = 1;
  19124     uint32_t _flag_k = FK_NONE;
  19125     uint32_t _flag_a = 0, _flag_b = 0;
  19126     uint32_t _itail_tgt = 0;
  19127     RECOMP_REGS_LOCALS
  19128     RECOMP_ENTER(0x390051EAu);
  19129 
  19130 L_390051EA:
  19131     edx = MEM32(ecx + 0x8); /* 0x390051EA: mov edx, dword ptr [ecx + 8] */
  19132     /* cmp MEM8(edx + 0x14), LO8(ebx) */ /* 0x390051ED: cmp byte ptr [edx + 0x14], bl */
  19133     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  19134     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19135     _flag_k = FK_NARROW(FK_CMP, 24);
  19136     if (CMP_NE(_flag_a, _flag_b)) goto L_3900523B; /* 0x390051F0: jne 0x3900523b */
  19137 L_390051F2:
  19138     edx = MEM32(ecx); /* 0x390051F2: mov edx, dword ptr [ecx] */
  19139     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390051F4: mov byte ptr [edx + 0x14], bl */
  19140     edx = MEM32(ecx); /* 0x390051F7: mov edx, dword ptr [ecx] */
  19141     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x390051F9: mov byte ptr [ecx + 0x14], 0 */
  19142     esi = MEM32(edx + 0x8); /* 0x390051FD: mov esi, dword ptr [edx + 8] */
  19143     MEM32(ecx) = esi; /* 0x39005200: mov dword ptr [ecx], esi */
  19144     esi = MEM32(edx + 0x8); /* 0x39005202: mov esi, dword ptr [edx + 8] */
  19145     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005205: cmp esi, dword ptr [edi + 8] */
  19146     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  19147     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19148     _flag_k = FK_CMP;
  19149     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900520D; /* 0x39005208: je 0x3900520d */
  19150 L_3900520A:
  19151     MEM32(esi + 0x4) = ecx; /* 0x3900520A: mov dword ptr [esi + 4], ecx */
  19152 L_3900520D:
  19153     esi = MEM32(ecx + 0x4); /* 0x3900520D: mov esi, dword ptr [ecx + 4] */
  19154     MEM32(edx + 0x4) = esi; /* 0x39005210: mov dword ptr [edx + 4], esi */
  19155     esi = MEM32(edi + 0x4); /* 0x39005213: mov esi, dword ptr [edi + 4] */
  19156     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005216: cmp ecx, dword ptr [esi + 4] */
  19157     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  19158     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19159     _flag_k = FK_CMP;
  19160     if (CMP_NE(_flag_a, _flag_b)) goto L_39005220; /* 0x39005219: jne 0x39005220 */
  19161 L_3900521B:
  19162     MEM32(esi + 0x4) = edx; /* 0x3900521B: mov dword ptr [esi + 4], edx */
  19163     goto L_3900522F; /* 0x3900521E: jmp 0x3900522f */
  19164 L_39005220:
  19165     esi = MEM32(ecx + 0x4); /* 0x39005220: mov esi, dword ptr [ecx + 4] */
  19166     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005223: cmp ecx, dword ptr [esi + 8] */
  19167     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  19168     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19169     _flag_k = FK_CMP;
  19170     if (CMP_NE(_flag_a, _flag_b)) goto L_3900522D; /* 0x39005226: jne 0x3900522d */
  19171 L_39005228:
  19172     MEM32(esi + 0x8) = edx; /* 0x39005228: mov dword ptr [esi + 8], edx */
  19173     goto L_3900522F; /* 0x3900522B: jmp 0x3900522f */
  19174 L_3900522D:
  19175     MEM32(esi) = edx; /* 0x3900522D: mov dword ptr [esi], edx */
  19176 L_3900522F:
  19177     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  19178     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  19179     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  19180     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  19181 L_3900523B:
  19182     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  19183     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  19184     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  19185     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  19186     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  19187     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  19188     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  19189     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  19190     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  19191     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  19192     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  19193     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  19194     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  19195     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  19196     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19197     _flag_k = FK_CMP;
  19198     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  19199 L_39005262:
  19200     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  19201 L_39005265:
  19202     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  19203     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  19204     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  19205     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  19206     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  19207     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19208     _flag_k = FK_CMP;
  19209     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  19210 L_39005273:
  19211     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  19212     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  19213     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  19214 L_3900527D:
  19215     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  19216     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  19217     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  19218     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19219     _flag_k = FK_CMP;
  19220     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  19221 L_39005284:
  19222     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  19223     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  19224     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  19225 L_3900528D:
  19226     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  19227     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  19228     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  19229 L_39005333:
  19230     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  19231     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  19232     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  19233     PUSH32(esp, edx); /* 0x3900533C: push edx */
  19234     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  19235     RECOMP_FLAGS_IN();
  19236     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  19237     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  19238     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  19239     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  19240     esp = esp + 4; /* 0x39005348: add esp, 4 */
  19241     _flag_k = FK_ADD;
  19242     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  19243     eax = eax - 1; /* 0x3900534B: dec eax */
  19244     _flag_k = FK_DEC;
  19245     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  19246     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  19247     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  19248     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  19249     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  19250     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  19251     esp = ebp; /* 0x39005357: mov esp, ebp */
  19252     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  19253     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  19254     RECOMP_REGS_OUT();
  19255 }
  19256 
  19257 void sub_3900522F(void) {
  19258     int _fpu_cmp = 0;
  19259     uint32_t _cf = 0;
  19260     int _df = 1;
  19261     uint32_t _flag_k = FK_NONE;
  19262     uint32_t _flag_a = 0, _flag_b = 0;
  19263     uint32_t _itail_tgt = 0;
  19264     RECOMP_REGS_LOCALS
  19265     RECOMP_ENTER(0x3900522Fu);
  19266 
  19267 L_3900522F:
  19268     MEM32(edx + 0x8) = ecx; /* 0x3900522F: mov dword ptr [edx + 8], ecx */
  19269     MEM32(ecx + 0x4) = edx; /* 0x39005232: mov dword ptr [ecx + 4], edx */
  19270     ecx = MEM32(eax + 0x4); /* 0x39005235: mov ecx, dword ptr [eax + 4] */
  19271     ecx = MEM32(ecx + 0x8); /* 0x39005238: mov ecx, dword ptr [ecx + 8] */
  19272     edx = MEM32(eax + 0x4); /* 0x3900523B: mov edx, dword ptr [eax + 4] */
  19273     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x3900523E: mov dl, byte ptr [edx + 0x14] */
  19274     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x39005241: mov byte ptr [ecx + 0x14], dl */
  19275     edx = MEM32(eax + 0x4); /* 0x39005244: mov edx, dword ptr [eax + 4] */
  19276     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005247: mov byte ptr [edx + 0x14], bl */
  19277     ecx = MEM32(ecx + 0x8); /* 0x3900524A: mov ecx, dword ptr [ecx + 8] */
  19278     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900524D: mov byte ptr [ecx + 0x14], bl */
  19279     ecx = MEM32(eax + 0x4); /* 0x39005250: mov ecx, dword ptr [eax + 4] */
  19280     edx = MEM32(ecx + 0x8); /* 0x39005253: mov edx, dword ptr [ecx + 8] */
  19281     esi = MEM32(edx); /* 0x39005256: mov esi, dword ptr [edx] */
  19282     MEM32(ecx + 0x8) = esi; /* 0x39005258: mov dword ptr [ecx + 8], esi */
  19283     esi = MEM32(edx); /* 0x3900525B: mov esi, dword ptr [edx] */
  19284     /* cmp esi, MEM32(edi + 0x8) */ /* 0x3900525D: cmp esi, dword ptr [edi + 8] */
  19285     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  19286     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19287     _flag_k = FK_CMP;
  19288     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005265; /* 0x39005260: je 0x39005265 */
  19289 L_39005262:
  19290     MEM32(esi + 0x4) = ecx; /* 0x39005262: mov dword ptr [esi + 4], ecx */
  19291 L_39005265:
  19292     esi = MEM32(ecx + 0x4); /* 0x39005265: mov esi, dword ptr [ecx + 4] */
  19293     MEM32(edx + 0x4) = esi; /* 0x39005268: mov dword ptr [edx + 4], esi */
  19294     esi = MEM32(edi + 0x4); /* 0x3900526B: mov esi, dword ptr [edi + 4] */
  19295     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x3900526E: cmp ecx, dword ptr [esi + 4] */
  19296     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  19297     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19298     _flag_k = FK_CMP;
  19299     if (CMP_NE(_flag_a, _flag_b)) goto L_3900527D; /* 0x39005271: jne 0x3900527d */
  19300 L_39005273:
  19301     MEM32(esi + 0x4) = edx; /* 0x39005273: mov dword ptr [esi + 4], edx */
  19302     MEM32(edx) = ecx; /* 0x39005276: mov dword ptr [edx], ecx */
  19303     goto L_39005333; /* 0x39005278: jmp 0x39005333 */
  19304 L_3900527D:
  19305     esi = MEM32(ecx + 0x4); /* 0x3900527D: mov esi, dword ptr [ecx + 4] */
  19306     /* cmp ecx, MEM32(esi) */ /* 0x39005280: cmp ecx, dword ptr [esi] */
  19307     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi));
  19308     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19309     _flag_k = FK_CMP;
  19310     if (CMP_NE(_flag_a, _flag_b)) goto L_3900528D; /* 0x39005282: jne 0x3900528d */
  19311 L_39005284:
  19312     MEM32(esi) = edx; /* 0x39005284: mov dword ptr [esi], edx */
  19313     MEM32(edx) = ecx; /* 0x39005286: mov dword ptr [edx], ecx */
  19314     goto L_39005333; /* 0x39005288: jmp 0x39005333 */
  19315 L_3900528D:
  19316     MEM32(esi + 0x8) = edx; /* 0x3900528D: mov dword ptr [esi + 8], edx */
  19317     MEM32(edx) = ecx; /* 0x39005290: mov dword ptr [edx], ecx */
  19318     goto L_39005333; /* 0x39005292: jmp 0x39005333 */
  19319 L_39005333:
  19320     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  19321     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  19322     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  19323     PUSH32(esp, edx); /* 0x3900533C: push edx */
  19324     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  19325     RECOMP_FLAGS_IN();
  19326     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  19327     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  19328     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  19329     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  19330     esp = esp + 4; /* 0x39005348: add esp, 4 */
  19331     _flag_k = FK_ADD;
  19332     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  19333     eax = eax - 1; /* 0x3900534B: dec eax */
  19334     _flag_k = FK_DEC;
  19335     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  19336     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  19337     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  19338     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  19339     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  19340     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  19341     esp = ebp; /* 0x39005357: mov esp, ebp */
  19342     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  19343     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  19344     RECOMP_REGS_OUT();
  19345 }
  19346 
  19347 void sub_390052DB(void) {
  19348     int _fpu_cmp = 0;
  19349     uint32_t _cf = 0;
  19350     int _df = 1;
  19351     uint32_t _flag_k = FK_NONE;
  19352     uint32_t _flag_a = 0, _flag_b = 0;
  19353     uint32_t _itail_tgt = 0;
  19354     RECOMP_REGS_LOCALS
  19355     RECOMP_ENTER(0x390052DBu);
  19356 
  19357 L_390052DB:
  19358     MEM32(edx) = ecx; /* 0x390052DB: mov dword ptr [edx], ecx */
  19359     MEM32(ecx + 0x4) = edx; /* 0x390052DD: mov dword ptr [ecx + 4], edx */
  19360     ecx = MEM32(eax + 0x4); /* 0x390052E0: mov ecx, dword ptr [eax + 4] */
  19361     ecx = MEM32(ecx); /* 0x390052E3: mov ecx, dword ptr [ecx] */
  19362     edx = MEM32(eax + 0x4); /* 0x390052E5: mov edx, dword ptr [eax + 4] */
  19363     SET_LO8(edx, MEM8(edx + 0x14)); /* 0x390052E8: mov dl, byte ptr [edx + 0x14] */
  19364     MEM8(ecx + 0x14) = (uint8_t)(LO8(edx)); /* 0x390052EB: mov byte ptr [ecx + 0x14], dl */
  19365     edx = MEM32(eax + 0x4); /* 0x390052EE: mov edx, dword ptr [eax + 4] */
  19366     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F1: mov byte ptr [edx + 0x14], bl */
  19367     ecx = MEM32(ecx); /* 0x390052F4: mov ecx, dword ptr [ecx] */
  19368     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x390052F6: mov byte ptr [ecx + 0x14], bl */
  19369     ecx = MEM32(eax + 0x4); /* 0x390052F9: mov ecx, dword ptr [eax + 4] */
  19370     edx = MEM32(ecx); /* 0x390052FC: mov edx, dword ptr [ecx] */
  19371     esi = MEM32(edx + 0x8); /* 0x390052FE: mov esi, dword ptr [edx + 8] */
  19372     MEM32(ecx) = esi; /* 0x39005301: mov dword ptr [ecx], esi */
  19373     esi = MEM32(edx + 0x8); /* 0x39005303: mov esi, dword ptr [edx + 8] */
  19374     /* cmp esi, MEM32(edi + 0x8) */ /* 0x39005306: cmp esi, dword ptr [edi + 8] */
  19375     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  19376     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19377     _flag_k = FK_CMP;
  19378     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900530E; /* 0x39005309: je 0x3900530e */
  19379 L_3900530B:
  19380     MEM32(esi + 0x4) = ecx; /* 0x3900530B: mov dword ptr [esi + 4], ecx */
  19381 L_3900530E:
  19382     esi = MEM32(ecx + 0x4); /* 0x3900530E: mov esi, dword ptr [ecx + 4] */
  19383     MEM32(edx + 0x4) = esi; /* 0x39005311: mov dword ptr [edx + 4], esi */
  19384     esi = MEM32(edi + 0x4); /* 0x39005314: mov esi, dword ptr [edi + 4] */
  19385     /* cmp ecx, MEM32(esi + 0x4) */ /* 0x39005317: cmp ecx, dword ptr [esi + 4] */
  19386     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x4));
  19387     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19388     _flag_k = FK_CMP;
  19389     if (CMP_NE(_flag_a, _flag_b)) goto L_39005321; /* 0x3900531A: jne 0x39005321 */
  19390 L_3900531C:
  19391     MEM32(esi + 0x4) = edx; /* 0x3900531C: mov dword ptr [esi + 4], edx */
  19392     goto L_39005330; /* 0x3900531F: jmp 0x39005330 */
  19393 L_39005321:
  19394     esi = MEM32(ecx + 0x4); /* 0x39005321: mov esi, dword ptr [ecx + 4] */
  19395     /* cmp ecx, MEM32(esi + 0x8) */ /* 0x39005324: cmp ecx, dword ptr [esi + 8] */
  19396     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  19397     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19398     _flag_k = FK_CMP;
  19399     if (CMP_NE(_flag_a, _flag_b)) goto L_3900532E; /* 0x39005327: jne 0x3900532e */
  19400 L_39005329:
  19401     MEM32(esi + 0x8) = edx; /* 0x39005329: mov dword ptr [esi + 8], edx */
  19402     goto L_39005330; /* 0x3900532C: jmp 0x39005330 */
  19403 L_3900532E:
  19404     MEM32(esi) = edx; /* 0x3900532E: mov dword ptr [esi], edx */
  19405 L_39005330:
  19406     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  19407     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  19408     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  19409     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  19410     PUSH32(esp, edx); /* 0x3900533C: push edx */
  19411     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  19412     RECOMP_FLAGS_IN();
  19413     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  19414     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  19415     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  19416     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  19417     esp = esp + 4; /* 0x39005348: add esp, 4 */
  19418     _flag_k = FK_ADD;
  19419     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  19420     eax = eax - 1; /* 0x3900534B: dec eax */
  19421     _flag_k = FK_DEC;
  19422     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  19423     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  19424     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  19425     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  19426     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  19427     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  19428     esp = ebp; /* 0x39005357: mov esp, ebp */
  19429     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  19430     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  19431     RECOMP_REGS_OUT();
  19432 }
  19433 
  19434 void sub_39005330(void) {
  19435     int _fpu_cmp = 0;
  19436     uint32_t _cf = 0;
  19437     int _df = 1;
  19438     uint32_t _flag_k = FK_NONE;
  19439     uint32_t _flag_a = 0, _flag_b = 0;
  19440     uint32_t _itail_tgt = 0;
  19441     RECOMP_REGS_LOCALS
  19442     RECOMP_ENTER(0x39005330u);
  19443 
  19444 L_39005330:
  19445     MEM32(edx + 0x8) = ecx; /* 0x39005330: mov dword ptr [edx + 8], ecx */
  19446     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  19447     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  19448     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  19449     PUSH32(esp, edx); /* 0x3900533C: push edx */
  19450     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  19451     RECOMP_FLAGS_IN();
  19452     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  19453     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  19454     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  19455     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  19456     esp = esp + 4; /* 0x39005348: add esp, 4 */
  19457     _flag_k = FK_ADD;
  19458     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  19459     eax = eax - 1; /* 0x3900534B: dec eax */
  19460     _flag_k = FK_DEC;
  19461     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  19462     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  19463     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  19464     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  19465     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  19466     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  19467     esp = ebp; /* 0x39005357: mov esp, ebp */
  19468     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  19469     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  19470     RECOMP_REGS_OUT();
  19471 }
  19472 
  19473 void sub_39005333(void) {
  19474     int _fpu_cmp = 0;
  19475     uint32_t _cf = 0;
  19476     int _df = 1;
  19477     uint32_t _flag_k = FK_NONE;
  19478     uint32_t _flag_a = 0, _flag_b = 0;
  19479     uint32_t _itail_tgt = 0;
  19480     RECOMP_REGS_LOCALS
  19481     RECOMP_ENTER(0x39005333u);
  19482 
  19483 L_39005333:
  19484     MEM32(ecx + 0x4) = edx; /* 0x39005333: mov dword ptr [ecx + 4], edx */
  19485     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  19486     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  19487     PUSH32(esp, edx); /* 0x3900533C: push edx */
  19488     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  19489     RECOMP_FLAGS_IN();
  19490     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  19491     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  19492     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  19493     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  19494     esp = esp + 4; /* 0x39005348: add esp, 4 */
  19495     _flag_k = FK_ADD;
  19496     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  19497     eax = eax - 1; /* 0x3900534B: dec eax */
  19498     _flag_k = FK_DEC;
  19499     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  19500     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  19501     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  19502     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  19503     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  19504     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  19505     esp = ebp; /* 0x39005357: mov esp, ebp */
  19506     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  19507     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  19508     RECOMP_REGS_OUT();
  19509 }
  19510 
  19511 void sub_39005336(void) {
  19512     int _fpu_cmp = 0;
  19513     uint32_t _cf = 0;
  19514     int _df = 1;
  19515     uint32_t _flag_k = FK_NONE;
  19516     uint32_t _flag_a = 0, _flag_b = 0;
  19517     uint32_t _itail_tgt = 0;
  19518     RECOMP_REGS_LOCALS
  19519     RECOMP_ENTER(0x39005336u);
  19520 
  19521 L_39005336:
  19522     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005336: mov byte ptr [eax + 0x14], bl */
  19523     edx = MEM32(ebp + (-0x4)); /* 0x39005339: mov edx, dword ptr [ebp - 4] */
  19524     PUSH32(esp, edx); /* 0x3900533C: push edx */
  19525     RECOMP_ICALL(0x3900A0A0u); /* 0x3900533D: call 0x3900a0a0 */ /* not lifted */
  19526     RECOMP_FLAGS_IN();
  19527     eax = MEM32(edi + 0x10); /* 0x39005342: mov eax, dword ptr [edi + 0x10] */
  19528     ecx = MEM32(ebp + 0xC); /* 0x39005345: mov ecx, dword ptr [ebp + 0xc] */
  19529     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  19530     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  19531     esp = esp + 4; /* 0x39005348: add esp, 4 */
  19532     _flag_k = FK_ADD;
  19533     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  19534     eax = eax - 1; /* 0x3900534B: dec eax */
  19535     _flag_k = FK_DEC;
  19536     MEM32(edi + 0x10) = eax; /* 0x3900534C: mov dword ptr [edi + 0x10], eax */
  19537     eax = MEM32(ebp + 0x8); /* 0x3900534F: mov eax, dword ptr [ebp + 8] */
  19538     edi = POP32_VAL(esp); /* 0x39005352: pop edi */
  19539     esi = POP32_VAL(esp); /* 0x39005353: pop esi */
  19540     MEM32(eax) = ecx; /* 0x39005354: mov dword ptr [eax], ecx */
  19541     ebx = POP32_VAL(esp); /* 0x39005356: pop ebx */
  19542     esp = ebp; /* 0x39005357: mov esp, ebp */
  19543     ebp = POP32_VAL(esp); /* 0x39005359: pop ebp */
  19544     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x3900535A: ret 8 */
  19545     RECOMP_REGS_OUT();
  19546 }
  19547 
  19548 void sub_39005360(void) {
  19549     int _fpu_cmp = 0;
  19550     uint32_t _cf = 0;
  19551     int _df = 1;
  19552     uint32_t _flag_k = FK_NONE;
  19553     uint32_t _flag_a = 0, _flag_b = 0;
  19554     uint32_t _itail_tgt = 0;
  19555     RECOMP_REGS_LOCALS
  19556     RECOMP_ENTER(0x39005360u);
  19557 
  19558 L_39005360:
  19559     eax = MEM32(ecx); /* 0x39005360: mov eax, dword ptr [ecx] */
  19560     PUSH32(esp, ebx); /* 0x39005362: push ebx */
  19561     edx = MEM32(eax + 0x8); /* 0x39005363: mov edx, dword ptr [eax + 8] */
  19562     SET_LO8(ebx, MEM8(edx + 0x15)); /* 0x39005366: mov bl, byte ptr [edx + 0x15] */
  19563     /* test LO8(ebx), LO8(ebx) */ /* 0x39005369: test bl, bl */
  19564     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  19565     _cf = 0;
  19566     _flag_k = FK_NARROW(FK_TEST, 24);
  19567     if (TEST_NZ(_flag_a, _flag_b)) goto L_39005385; /* 0x3900536B: jne 0x39005385 */
  19568 L_3900536D:
  19569     eax = MEM32(edx); /* 0x3900536D: mov eax, dword ptr [edx] */
  19570     SET_LO8(ebx, MEM8(eax + 0x15)); /* 0x3900536F: mov bl, byte ptr [eax + 0x15] */
  19571     /* test LO8(ebx), LO8(ebx) */ /* 0x39005372: test bl, bl */
  19572     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  19573     _cf = 0;
  19574     _flag_k = FK_NARROW(FK_TEST, 24);
  19575     if (TEST_NZ(_flag_a, _flag_b)) goto L_39005381; /* 0x39005374: jne 0x39005381 */
  19576 L_39005376:
  19577     edx = eax; /* 0x39005376: mov edx, eax */
  19578     eax = MEM32(edx); /* 0x39005378: mov eax, dword ptr [edx] */
  19579     SET_LO8(ebx, MEM8(eax + 0x15)); /* 0x3900537A: mov bl, byte ptr [eax + 0x15] */
  19580     /* test LO8(ebx), LO8(ebx) */ /* 0x3900537D: test bl, bl */
  19581     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
  19582     _cf = 0;
  19583     _flag_k = FK_NARROW(FK_TEST, 24);
  19584     RECOMP_BACKEDGE();
  19585     if (TEST_Z(_flag_a, _flag_b)) goto L_39005376; /* 0x3900537F: je 0x39005376 */
  19586 L_39005381:
  19587     MEM32(ecx) = edx; /* 0x39005381: mov dword ptr [ecx], edx */
  19588     ebx = POP32_VAL(esp); /* 0x39005383: pop ebx */
  19589     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39005384: ret  */
  19590 L_39005385:
  19591     eax = MEM32(eax + 0x4); /* 0x39005385: mov eax, dword ptr [eax + 4] */
  19592     edx = MEM32(ecx); /* 0x39005388: mov edx, dword ptr [ecx] */
  19593     /* cmp edx, MEM32(eax + 0x8) */ /* 0x3900538A: cmp edx, dword ptr [eax + 8] */
  19594     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(eax + 0x8));
  19595     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19596     _flag_k = FK_CMP;
  19597     if (CMP_NE(_flag_a, _flag_b)) goto L_3900539B; /* 0x3900538D: jne 0x3900539b */
  19598 L_3900538F:
  19599     MEM32(ecx) = eax; /* 0x3900538F: mov dword ptr [ecx], eax */
  19600     eax = MEM32(eax + 0x4); /* 0x39005391: mov eax, dword ptr [eax + 4] */
  19601     edx = MEM32(ecx); /* 0x39005394: mov edx, dword ptr [ecx] */
  19602     /* cmp edx, MEM32(eax + 0x8) */ /* 0x39005396: cmp edx, dword ptr [eax + 8] */
  19603     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(eax + 0x8));
  19604     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19605     _flag_k = FK_CMP;
  19606     RECOMP_BACKEDGE();
  19607     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900538F; /* 0x39005399: je 0x3900538f */
  19608 L_3900539B:
  19609     edx = MEM32(ecx); /* 0x3900539B: mov edx, dword ptr [ecx] */
  19610     /* cmp MEM32(edx + 0x8), eax */ /* 0x3900539D: cmp dword ptr [edx + 8], eax */
  19611     _flag_a = (uint32_t)(MEM32(edx + 0x8)); _flag_b = (uint32_t)(eax);
  19612     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19613     _flag_k = FK_CMP;
  19614     if (CMP_EQ(_flag_a, _flag_b)) goto L_390053A4; /* 0x390053A0: je 0x390053a4 */
  19615 L_390053A2:
  19616     MEM32(ecx) = eax; /* 0x390053A2: mov dword ptr [ecx], eax */
  19617 L_390053A4:
  19618     ebx = POP32_VAL(esp); /* 0x390053A4: pop ebx */
  19619     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x390053A5: ret  */
  19620     RECOMP_REGS_OUT();
  19621 }
  19622 
  19623 void sub_390053B0(void) {
  19624     int _fpu_cmp = 0;
  19625     uint32_t _cf = 0;
  19626     int _df = 1;
  19627     uint32_t _flag_k = FK_NONE;
  19628     uint32_t _flag_a = 0, _flag_b = 0;
  19629     uint32_t _itail_tgt = 0;
  19630     RECOMP_REGS_LOCALS
  19631     RECOMP_ENTER(0x390053B0u);
  19632 
  19633 L_390053B0:
  19634     PUSH32(esp, ebp); /* 0x390053B0: push ebp */
  19635     ebp = esp; /* 0x390053B1: mov ebp, esp */
  19636     PUSH32(esp, ebx); /* 0x390053B3: push ebx */
  19637     ebx = ecx; /* 0x390053B4: mov ebx, ecx */
  19638     PUSH32(esp, esi); /* 0x390053B6: push esi */
  19639     PUSH32(esp, edi); /* 0x390053B7: push edi */
  19640     edi = MEM32(ebp + 0x8); /* 0x390053B8: mov edi, dword ptr [ebp + 8] */
  19641     eax = MEM32(ebx + 0x8); /* 0x390053BB: mov eax, dword ptr [ebx + 8] */
  19642     /* cmp edi, eax */ /* 0x390053BE: cmp edi, eax */
  19643     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  19644     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19645     _flag_k = FK_CMP;
  19646     esi = edi; /* 0x390053C0: mov esi, edi */
  19647     if (CMP_EQ(_flag_a, _flag_b)) goto L_390053E3; /* 0x390053C2: je 0x390053e3 */
  19648 L_390053C4:
  19649     eax = MEM32(esi + 0x8); /* 0x390053C4: mov eax, dword ptr [esi + 8] */
  19650     ecx = ebx; /* 0x390053C7: mov ecx, ebx */
  19651     PUSH32(esp, eax); /* 0x390053C9: push eax */
  19652     RECOMP_ICALL(0x390053B0u); /* 0x390053CA: call 0x390053b0 */ /* not lifted */
  19653     RECOMP_FLAGS_IN();
  19654     esi = MEM32(esi); /* 0x390053CF: mov esi, dword ptr [esi] */
  19655     PUSH32(esp, edi); /* 0x390053D1: push edi */
  19656     RECOMP_ICALL(0x3900A0A0u); /* 0x390053D2: call 0x3900a0a0 */ /* not lifted */
  19657     RECOMP_FLAGS_IN();
  19658     eax = MEM32(ebx + 0x8); /* 0x390053D7: mov eax, dword ptr [ebx + 8] */
  19659     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  19660     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  19661     esp = esp + 4; /* 0x390053DA: add esp, 4 */
  19662     _flag_k = FK_ADD;
  19663     /* cmp esi, eax */ /* 0x390053DD: cmp esi, eax */
  19664     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
  19665     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19666     _flag_k = FK_CMP;
  19667     edi = esi; /* 0x390053DF: mov edi, esi */
  19668     RECOMP_BACKEDGE();
  19669     if (CMP_NE(_flag_a, _flag_b)) goto L_390053C4; /* 0x390053E1: jne 0x390053c4 */
  19670 L_390053E3:
  19671     edi = POP32_VAL(esp); /* 0x390053E3: pop edi */
  19672     esi = POP32_VAL(esp); /* 0x390053E4: pop esi */
  19673     ebx = POP32_VAL(esp); /* 0x390053E5: pop ebx */
  19674     ebp = POP32_VAL(esp); /* 0x390053E6: pop ebp */
  19675     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x390053E7: ret 4 */
  19676     RECOMP_REGS_OUT();
  19677 }
  19678 
  19679 void sub_390053F0(void) {
  19680     int _fpu_cmp = 0;
  19681     uint32_t _cf = 0;
  19682     int _df = 1;
  19683     uint32_t _flag_k = FK_NONE;
  19684     uint32_t _flag_a = 0, _flag_b = 0;
  19685     uint32_t _itail_tgt = 0;
  19686     RECOMP_REGS_LOCALS
  19687     RECOMP_ENTER(0x390053F0u);
  19688 
  19689 L_390053F0:
  19690     PUSH32(esp, ebx); /* 0x390053F0: push ebx */
  19691     PUSH32(esp, esi); /* 0x390053F1: push esi */
  19692     PUSH32(esp, edi); /* 0x390053F2: push edi */
  19693     esi = ecx; /* 0x390053F3: mov esi, ecx */
  19694     PUSH32(esp, 0x18u); /* 0x390053F5: push 0x18 */
  19695     RECOMP_ICALL(0x3900A0ACu); /* 0x390053F7: call 0x3900a0ac */ /* not lifted */
  19696     RECOMP_FLAGS_IN();
  19697     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  19698     ebx = 0; /* 0x390053FC: xor ebx, ebx */
  19699     _cf = 0;
  19700     _flag_k = FK_TEST;
  19701     SET_LO8(ecx, 1); /* 0x390053FE: mov cl, 1 */
  19702     MEM32(eax + 0x4) = ebx; /* 0x39005400: mov dword ptr [eax + 4], ebx */
  19703     MEM8(eax + 0x14) = (uint8_t)(LO8(ecx)); /* 0x39005403: mov byte ptr [eax + 0x14], cl */
  19704     MEM8(eax + 0x15) = (uint8_t)(LO8(ebx)); /* 0x39005406: mov byte ptr [eax + 0x15], bl */
  19705     MEM32(esi + 0x8) = eax; /* 0x39005409: mov dword ptr [esi + 8], eax */
  19706     MEM8(eax + 0x15) = (uint8_t)(LO8(ecx)); /* 0x3900540C: mov byte ptr [eax + 0x15], cl */
  19707     eax = MEM32(esi + 0x8); /* 0x3900540F: mov eax, dword ptr [esi + 8] */
  19708     PUSH32(esp, 0x18u); /* 0x39005412: push 0x18 */
  19709     MEM32(eax) = ebx; /* 0x39005414: mov dword ptr [eax], ebx */
  19710     ecx = MEM32(esi + 0x8); /* 0x39005416: mov ecx, dword ptr [esi + 8] */
  19711     MEM32(ecx + 0x8) = ebx; /* 0x39005419: mov dword ptr [ecx + 8], ebx */
  19712     edi = MEM32(esi + 0x8); /* 0x3900541C: mov edi, dword ptr [esi + 8] */
  19713     RECOMP_ICALL(0x3900A0ACu); /* 0x3900541F: call 0x3900a0ac */ /* not lifted */
  19714     RECOMP_FLAGS_IN();
  19715     MEM32(eax + 0x4) = edi; /* 0x39005424: mov dword ptr [eax + 4], edi */
  19716     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005427: mov byte ptr [eax + 0x14], bl */
  19717     MEM8(eax + 0x15) = (uint8_t)(LO8(ebx)); /* 0x3900542A: mov byte ptr [eax + 0x15], bl */
  19718     MEM32(esi + 0x4) = eax; /* 0x3900542D: mov dword ptr [esi + 4], eax */
  19719     MEM32(eax) = eax; /* 0x39005430: mov dword ptr [eax], eax */
  19720     eax = MEM32(esi + 0x4); /* 0x39005432: mov eax, dword ptr [esi + 4] */
  19721     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  19722     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  19723     esp = esp + 8; /* 0x39005435: add esp, 8 */
  19724     _flag_k = FK_ADD;
  19725     MEM32(eax + 0x8) = eax; /* 0x39005438: mov dword ptr [eax + 8], eax */
  19726     MEM32(esi + 0x10) = ebx; /* 0x3900543B: mov dword ptr [esi + 0x10], ebx */
  19727     edi = POP32_VAL(esp); /* 0x3900543E: pop edi */
  19728     esi = POP32_VAL(esp); /* 0x3900543F: pop esi */
  19729     ebx = POP32_VAL(esp); /* 0x39005440: pop ebx */
  19730     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x39005441: ret  */
  19731     RECOMP_REGS_OUT();
  19732 }
  19733 
  19734 void sub_39005450(void) {
  19735     int _fpu_cmp = 0;
  19736     uint32_t _cf = 0;
  19737     int _df = 1;
  19738     uint32_t _flag_k = FK_NONE;
  19739     uint32_t _flag_a = 0, _flag_b = 0;
  19740     uint32_t _itail_tgt = 0;
  19741     RECOMP_REGS_LOCALS
  19742     RECOMP_ENTER(0x39005450u);
  19743 
  19744 L_39005450:
  19745     PUSH32(esp, ebp); /* 0x39005450: push ebp */
  19746     ebp = esp; /* 0x39005451: mov ebp, esp */
  19747     PUSH32(esp, ecx); /* 0x39005453: push ecx */
  19748     PUSH32(esp, ebx); /* 0x39005454: push ebx */
  19749     PUSH32(esp, esi); /* 0x39005455: push esi */
  19750     PUSH32(esp, edi); /* 0x39005456: push edi */
  19751     esi = ecx; /* 0x39005457: mov esi, ecx */
  19752     PUSH32(esp, 0x18u); /* 0x39005459: push 0x18 */
  19753     RECOMP_ICALL(0x3900A0ACu); /* 0x3900545B: call 0x3900a0ac */ /* not lifted */
  19754     RECOMP_FLAGS_IN();
  19755     edi = MEM32(ebp + 0x10); /* 0x39005460: mov edi, dword ptr [ebp + 0x10] */
  19756     ebx = MEM32(ebp + 0x14); /* 0x39005463: mov ebx, dword ptr [ebp + 0x14] */
  19757     MEM32(eax + 0x4) = edi; /* 0x39005466: mov dword ptr [eax + 4], edi */
  19758     MEM8(eax + 0x14) = (uint8_t)(0); /* 0x39005469: mov byte ptr [eax + 0x14], 0 */
  19759     MEM8(eax + 0x15) = (uint8_t)(0); /* 0x3900546D: mov byte ptr [eax + 0x15], 0 */
  19760     ecx = MEM32(esi + 0x8); /* 0x39005471: mov ecx, dword ptr [esi + 8] */
  19761     MEM32(eax) = ecx; /* 0x39005474: mov dword ptr [eax], ecx */
  19762     edx = MEM32(esi + 0x8); /* 0x39005476: mov edx, dword ptr [esi + 8] */
  19763     MEM32(ebp + (-0x4)) = eax; /* 0x39005479: mov dword ptr [ebp - 4], eax */
  19764     MEM32(eax + 0x8) = edx; /* 0x3900547C: mov dword ptr [eax + 8], edx */
  19765     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xCu);
  19766     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  19767     eax = eax + 0xCu; /* 0x3900547F: add eax, 0xc */
  19768     _flag_k = FK_ADD;
  19769     PUSH32(esp, ebx); /* 0x39005482: push ebx */
  19770     PUSH32(esp, eax); /* 0x39005483: push eax */
  19771     RECOMP_ICALL(0x39007220u); /* 0x39005484: call 0x39007220 */ /* not lifted */
  19772     RECOMP_FLAGS_IN();
  19773     ecx = MEM32(esi + 0x10); /* 0x39005489: mov ecx, dword ptr [esi + 0x10] */
  19774     eax = MEM32(esi + 0x4); /* 0x3900548C: mov eax, dword ptr [esi + 4] */
  19775     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
  19776     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  19777     esp = esp + 0xCu; /* 0x3900548F: add esp, 0xc */
  19778     _flag_k = FK_ADD;
  19779     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
  19780     ecx = ecx + 1; /* 0x39005492: inc ecx */
  19781     _flag_k = FK_INC;
  19782     /* cmp edi, eax */ /* 0x39005493: cmp edi, eax */
  19783     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  19784     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19785     _flag_k = FK_CMP;
  19786     MEM32(esi + 0x10) = ecx; /* 0x39005495: mov dword ptr [esi + 0x10], ecx */
  19787     if (CMP_EQ(_flag_a, _flag_b)) goto L_390054C0; /* 0x39005498: je 0x390054c0 */
  19788 L_3900549A:
  19789     eax = MEM32(ebp + 0xC); /* 0x3900549A: mov eax, dword ptr [ebp + 0xc] */
  19790     ecx = MEM32(esi + 0x8); /* 0x3900549D: mov ecx, dword ptr [esi + 8] */
  19791     /* cmp eax, ecx */ /* 0x390054A0: cmp eax, ecx */
  19792     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  19793     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19794     _flag_k = FK_CMP;
  19795     if (CMP_NE(_flag_a, _flag_b)) goto L_390054C0; /* 0x390054A2: jne 0x390054c0 */
  19796 L_390054A4:
  19797     ecx = MEM32(ebx); /* 0x390054A4: mov ecx, dword ptr [ebx] */
  19798     eax = MEM32(edi + 0xC); /* 0x390054A6: mov eax, dword ptr [edi + 0xc] */
  19799     /* cmp ecx, eax */ /* 0x390054A9: cmp ecx, eax */
  19800     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
  19801     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19802     _flag_k = FK_CMP;
  19803     if (CMP_B(_flag_a, _flag_b)) goto L_390054C0; /* 0x390054AB: jb 0x390054c0 */
  19804 L_390054AD:
  19805     ecx = MEM32(ebp + (-0x4)); /* 0x390054AD: mov ecx, dword ptr [ebp - 4] */
  19806     MEM32(edi + 0x8) = ecx; /* 0x390054B0: mov dword ptr [edi + 8], ecx */
  19807     eax = MEM32(esi + 0x4); /* 0x390054B3: mov eax, dword ptr [esi + 4] */
  19808     /* cmp edi, MEM32(eax + 0x8) */ /* 0x390054B6: cmp edi, dword ptr [eax + 8] */
  19809     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(eax + 0x8));
  19810     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19811     _flag_k = FK_CMP;
  19812     if (CMP_NE(_flag_a, _flag_b)) goto L_390054E0; /* 0x390054B9: jne 0x390054e0 */
  19813 L_390054BB:
  19814     MEM32(eax + 0x8) = ecx; /* 0x390054BB: mov dword ptr [eax + 8], ecx */
  19815     goto L_390054E0; /* 0x390054BE: jmp 0x390054e0 */
  19816 L_390054C0:
  19817     ecx = MEM32(ebp + (-0x4)); /* 0x390054C0: mov ecx, dword ptr [ebp - 4] */
  19818     MEM32(edi) = ecx; /* 0x390054C3: mov dword ptr [edi], ecx */
  19819     eax = MEM32(esi + 0x4); /* 0x390054C5: mov eax, dword ptr [esi + 4] */
  19820     /* cmp edi, eax */ /* 0x390054C8: cmp edi, eax */
  19821     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  19822     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19823     _flag_k = FK_CMP;
  19824     if (CMP_NE(_flag_a, _flag_b)) goto L_390054D7; /* 0x390054CA: jne 0x390054d7 */
  19825 L_390054CC:
  19826     MEM32(eax + 0x4) = ecx; /* 0x390054CC: mov dword ptr [eax + 4], ecx */
  19827     edx = MEM32(esi + 0x4); /* 0x390054CF: mov edx, dword ptr [esi + 4] */
  19828     MEM32(edx + 0x8) = ecx; /* 0x390054D2: mov dword ptr [edx + 8], ecx */
  19829     goto L_390054E0; /* 0x390054D5: jmp 0x390054e0 */
  19830 L_390054D7:
  19831     /* cmp edi, MEM32(eax) */ /* 0x390054D7: cmp edi, dword ptr [eax] */
  19832     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(eax));
  19833     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19834     _flag_k = FK_CMP;
  19835     if (CMP_NE(_flag_a, _flag_b)) goto L_390054E0; /* 0x390054D9: jne 0x390054e0 */
  19836 L_390054DB:
  19837     ecx = MEM32(ebp + (-0x4)); /* 0x390054DB: mov ecx, dword ptr [ebp - 4] */
  19838     MEM32(eax) = ecx; /* 0x390054DE: mov dword ptr [eax], ecx */
  19839 L_390054E0:
  19840     edx = MEM32(esi + 0x4); /* 0x390054E0: mov edx, dword ptr [esi + 4] */
  19841     eax = MEM32(ebp + (-0x4)); /* 0x390054E3: mov eax, dword ptr [ebp - 4] */
  19842     SET_LO8(ebx, 1); /* 0x390054E6: mov bl, 1 */
  19843     /* cmp eax, MEM32(edx + 0x4) */ /* 0x390054E8: cmp eax, dword ptr [edx + 4] */
  19844     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4));
  19845     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19846     _flag_k = FK_CMP;
  19847     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005671; /* 0x390054EB: je 0x39005671 */
  19848 L_390054F1:
  19849     ecx = MEM32(eax + 0x4); /* 0x390054F1: mov ecx, dword ptr [eax + 4] */
  19850     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390054F4: mov dl, byte ptr [ecx + 0x14] */
  19851     /* test LO8(edx), LO8(edx) */ /* 0x390054F7: test dl, dl */
  19852     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  19853     _cf = 0;
  19854     _flag_k = FK_NARROW(FK_TEST, 24);
  19855     if (TEST_NZ(_flag_a, _flag_b)) goto L_39005671; /* 0x390054F9: jne 0x39005671 */
  19856 L_390054FF:
  19857     edi = MEM32(ecx + 0x4); /* 0x390054FF: mov edi, dword ptr [ecx + 4] */
  19858     edx = MEM32(edi); /* 0x39005502: mov edx, dword ptr [edi] */
  19859     /* cmp ecx, edx */ /* 0x39005504: cmp ecx, edx */
  19860     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
  19861     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19862     _flag_k = FK_CMP;
  19863     if (CMP_NE(_flag_a, _flag_b)) goto L_390055CD; /* 0x39005506: jne 0x390055cd */
  19864 L_3900550C:
  19865     edx = MEM32(edi + 0x8); /* 0x3900550C: mov edx, dword ptr [edi + 8] */
  19866     /* cmp MEM8(edx + 0x14), 0 */ /* 0x3900550F: cmp byte ptr [edx + 0x14], 0 */
  19867     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(0) << 24;
  19868     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19869     _flag_k = FK_NARROW(FK_CMP, 24);
  19870     if (CMP_NE(_flag_a, _flag_b)) goto L_39005530; /* 0x39005513: jne 0x39005530 */
  19871 L_39005515:
  19872     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005515: mov byte ptr [ecx + 0x14], bl */
  19873     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005518: mov byte ptr [edx + 0x14], bl */
  19874     ecx = MEM32(eax + 0x4); /* 0x3900551B: mov ecx, dword ptr [eax + 4] */
  19875     edx = MEM32(ecx + 0x4); /* 0x3900551E: mov edx, dword ptr [ecx + 4] */
  19876     MEM8(edx + 0x14) = (uint8_t)(0); /* 0x39005521: mov byte ptr [edx + 0x14], 0 */
  19877     eax = MEM32(eax + 0x4); /* 0x39005525: mov eax, dword ptr [eax + 4] */
  19878     eax = MEM32(eax + 0x4); /* 0x39005528: mov eax, dword ptr [eax + 4] */
  19879     goto L_39005665; /* 0x3900552B: jmp 0x39005665 */
  19880 L_39005530:
  19881     /* cmp eax, MEM32(ecx + 0x8) */ /* 0x39005530: cmp eax, dword ptr [ecx + 8] */
  19882     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8));
  19883     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19884     _flag_k = FK_CMP;
  19885     if (CMP_NE(_flag_a, _flag_b)) goto L_3900556F; /* 0x39005533: jne 0x3900556f */
  19886 L_39005535:
  19887     eax = ecx; /* 0x39005535: mov eax, ecx */
  19888     ecx = MEM32(eax + 0x8); /* 0x39005537: mov ecx, dword ptr [eax + 8] */
  19889     edx = MEM32(ecx); /* 0x3900553A: mov edx, dword ptr [ecx] */
  19890     MEM32(eax + 0x8) = edx; /* 0x3900553C: mov dword ptr [eax + 8], edx */
  19891     edx = MEM32(ecx); /* 0x3900553F: mov edx, dword ptr [ecx] */
  19892     /* cmp edx, MEM32(esi + 0x8) */ /* 0x39005541: cmp edx, dword ptr [esi + 8] */
  19893     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  19894     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19895     _flag_k = FK_CMP;
  19896     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005549; /* 0x39005544: je 0x39005549 */
  19897 L_39005546:
  19898     MEM32(edx + 0x4) = eax; /* 0x39005546: mov dword ptr [edx + 4], eax */
  19899 L_39005549:
  19900     edx = MEM32(eax + 0x4); /* 0x39005549: mov edx, dword ptr [eax + 4] */
  19901     MEM32(ecx + 0x4) = edx; /* 0x3900554C: mov dword ptr [ecx + 4], edx */
  19902     edx = MEM32(esi + 0x4); /* 0x3900554F: mov edx, dword ptr [esi + 4] */
  19903     /* cmp eax, MEM32(edx + 0x4) */ /* 0x39005552: cmp eax, dword ptr [edx + 4] */
  19904     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4));
  19905     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19906     _flag_k = FK_CMP;
  19907     if (CMP_NE(_flag_a, _flag_b)) goto L_3900555C; /* 0x39005555: jne 0x3900555c */
  19908 L_39005557:
  19909     MEM32(edx + 0x4) = ecx; /* 0x39005557: mov dword ptr [edx + 4], ecx */
  19910     goto L_3900556A; /* 0x3900555A: jmp 0x3900556a */
  19911 L_3900555C:
  19912     edx = MEM32(eax + 0x4); /* 0x3900555C: mov edx, dword ptr [eax + 4] */
  19913     /* cmp eax, MEM32(edx) */ /* 0x3900555F: cmp eax, dword ptr [edx] */
  19914     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx));
  19915     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19916     _flag_k = FK_CMP;
  19917     if (CMP_NE(_flag_a, _flag_b)) goto L_39005567; /* 0x39005561: jne 0x39005567 */
  19918 L_39005563:
  19919     MEM32(edx) = ecx; /* 0x39005563: mov dword ptr [edx], ecx */
  19920     goto L_3900556A; /* 0x39005565: jmp 0x3900556a */
  19921 L_39005567:
  19922     MEM32(edx + 0x8) = ecx; /* 0x39005567: mov dword ptr [edx + 8], ecx */
  19923 L_3900556A:
  19924     MEM32(ecx) = eax; /* 0x3900556A: mov dword ptr [ecx], eax */
  19925     MEM32(eax + 0x4) = ecx; /* 0x3900556C: mov dword ptr [eax + 4], ecx */
  19926 L_3900556F:
  19927     ecx = MEM32(eax + 0x4); /* 0x3900556F: mov ecx, dword ptr [eax + 4] */
  19928     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005572: mov byte ptr [ecx + 0x14], bl */
  19929     edx = MEM32(eax + 0x4); /* 0x39005575: mov edx, dword ptr [eax + 4] */
  19930     ecx = MEM32(edx + 0x4); /* 0x39005578: mov ecx, dword ptr [edx + 4] */
  19931     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900557B: mov byte ptr [ecx + 0x14], 0 */
  19932     edx = MEM32(eax + 0x4); /* 0x3900557F: mov edx, dword ptr [eax + 4] */
  19933     ecx = MEM32(edx + 0x4); /* 0x39005582: mov ecx, dword ptr [edx + 4] */
  19934     edx = MEM32(ecx); /* 0x39005585: mov edx, dword ptr [ecx] */
  19935     edi = MEM32(edx + 0x8); /* 0x39005587: mov edi, dword ptr [edx + 8] */
  19936     MEM32(ecx) = edi; /* 0x3900558A: mov dword ptr [ecx], edi */
  19937     edi = MEM32(edx + 0x8); /* 0x3900558C: mov edi, dword ptr [edx + 8] */
  19938     /* cmp edi, MEM32(esi + 0x8) */ /* 0x3900558F: cmp edi, dword ptr [esi + 8] */
  19939     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  19940     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19941     _flag_k = FK_CMP;
  19942     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005597; /* 0x39005592: je 0x39005597 */
  19943 L_39005594:
  19944     MEM32(edi + 0x4) = ecx; /* 0x39005594: mov dword ptr [edi + 4], ecx */
  19945 L_39005597:
  19946     edi = MEM32(ecx + 0x4); /* 0x39005597: mov edi, dword ptr [ecx + 4] */
  19947     MEM32(edx + 0x4) = edi; /* 0x3900559A: mov dword ptr [edx + 4], edi */
  19948     edi = MEM32(esi + 0x4); /* 0x3900559D: mov edi, dword ptr [esi + 4] */
  19949     /* cmp ecx, MEM32(edi + 0x4) */ /* 0x390055A0: cmp ecx, dword ptr [edi + 4] */
  19950     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4));
  19951     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19952     _flag_k = FK_CMP;
  19953     if (CMP_NE(_flag_a, _flag_b)) goto L_390055B0; /* 0x390055A3: jne 0x390055b0 */
  19954 L_390055A5:
  19955     MEM32(edi + 0x4) = edx; /* 0x390055A5: mov dword ptr [edi + 4], edx */
  19956     MEM32(edx + 0x8) = ecx; /* 0x390055A8: mov dword ptr [edx + 8], ecx */
  19957     goto L_39005662; /* 0x390055AB: jmp 0x39005662 */
  19958 L_390055B0:
  19959     edi = MEM32(ecx + 0x4); /* 0x390055B0: mov edi, dword ptr [ecx + 4] */
  19960     /* cmp ecx, MEM32(edi + 0x8) */ /* 0x390055B3: cmp ecx, dword ptr [edi + 8] */
  19961     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  19962     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19963     _flag_k = FK_CMP;
  19964     if (CMP_NE(_flag_a, _flag_b)) goto L_390055C3; /* 0x390055B6: jne 0x390055c3 */
  19965 L_390055B8:
  19966     MEM32(edi + 0x8) = edx; /* 0x390055B8: mov dword ptr [edi + 8], edx */
  19967     MEM32(edx + 0x8) = ecx; /* 0x390055BB: mov dword ptr [edx + 8], ecx */
  19968     goto L_39005662; /* 0x390055BE: jmp 0x39005662 */
  19969 L_390055C3:
  19970     MEM32(edi) = edx; /* 0x390055C3: mov dword ptr [edi], edx */
  19971     MEM32(edx + 0x8) = ecx; /* 0x390055C5: mov dword ptr [edx + 8], ecx */
  19972     goto L_39005662; /* 0x390055C8: jmp 0x39005662 */
  19973 L_390055CD:
  19974     /* cmp MEM8(edx + 0x14), 0 */ /* 0x390055CD: cmp byte ptr [edx + 0x14], 0 */
  19975     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(0) << 24;
  19976     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19977     _flag_k = FK_NARROW(FK_CMP, 24);
  19978     RECOMP_BACKEDGE();
  19979     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005515; /* 0x390055D1: je 0x39005515 */
  19980 L_390055D7:
  19981     /* cmp eax, MEM32(ecx) */ /* 0x390055D7: cmp eax, dword ptr [ecx] */
  19982     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx));
  19983     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19984     _flag_k = FK_CMP;
  19985     if (CMP_NE(_flag_a, _flag_b)) goto L_39005617; /* 0x390055D9: jne 0x39005617 */
  19986 L_390055DB:
  19987     eax = ecx; /* 0x390055DB: mov eax, ecx */
  19988     ecx = MEM32(eax); /* 0x390055DD: mov ecx, dword ptr [eax] */
  19989     edx = MEM32(ecx + 0x8); /* 0x390055DF: mov edx, dword ptr [ecx + 8] */
  19990     MEM32(eax) = edx; /* 0x390055E2: mov dword ptr [eax], edx */
  19991     edx = MEM32(ecx + 0x8); /* 0x390055E4: mov edx, dword ptr [ecx + 8] */
  19992     /* cmp edx, MEM32(esi + 0x8) */ /* 0x390055E7: cmp edx, dword ptr [esi + 8] */
  19993     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  19994     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  19995     _flag_k = FK_CMP;
  19996     if (CMP_EQ(_flag_a, _flag_b)) goto L_390055EF; /* 0x390055EA: je 0x390055ef */
  19997 L_390055EC:
  19998     MEM32(edx + 0x4) = eax; /* 0x390055EC: mov dword ptr [edx + 4], eax */
  19999 L_390055EF:
  20000     edx = MEM32(eax + 0x4); /* 0x390055EF: mov edx, dword ptr [eax + 4] */
  20001     MEM32(ecx + 0x4) = edx; /* 0x390055F2: mov dword ptr [ecx + 4], edx */
  20002     edx = MEM32(esi + 0x4); /* 0x390055F5: mov edx, dword ptr [esi + 4] */
  20003     /* cmp eax, MEM32(edx + 0x4) */ /* 0x390055F8: cmp eax, dword ptr [edx + 4] */
  20004     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4));
  20005     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20006     _flag_k = FK_CMP;
  20007     if (CMP_NE(_flag_a, _flag_b)) goto L_39005602; /* 0x390055FB: jne 0x39005602 */
  20008 L_390055FD:
  20009     MEM32(edx + 0x4) = ecx; /* 0x390055FD: mov dword ptr [edx + 4], ecx */
  20010     goto L_39005611; /* 0x39005600: jmp 0x39005611 */
  20011 L_39005602:
  20012     edx = MEM32(eax + 0x4); /* 0x39005602: mov edx, dword ptr [eax + 4] */
  20013     /* cmp eax, MEM32(edx + 0x8) */ /* 0x39005605: cmp eax, dword ptr [edx + 8] */
  20014     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x8));
  20015     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20016     _flag_k = FK_CMP;
  20017     if (CMP_NE(_flag_a, _flag_b)) goto L_3900560F; /* 0x39005608: jne 0x3900560f */
  20018 L_3900560A:
  20019     MEM32(edx + 0x8) = ecx; /* 0x3900560A: mov dword ptr [edx + 8], ecx */
  20020     goto L_39005611; /* 0x3900560D: jmp 0x39005611 */
  20021 L_3900560F:
  20022     MEM32(edx) = ecx; /* 0x3900560F: mov dword ptr [edx], ecx */
  20023 L_39005611:
  20024     MEM32(ecx + 0x8) = eax; /* 0x39005611: mov dword ptr [ecx + 8], eax */
  20025     MEM32(eax + 0x4) = ecx; /* 0x39005614: mov dword ptr [eax + 4], ecx */
  20026 L_39005617:
  20027     ecx = MEM32(eax + 0x4); /* 0x39005617: mov ecx, dword ptr [eax + 4] */
  20028     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900561A: mov byte ptr [ecx + 0x14], bl */
  20029     edx = MEM32(eax + 0x4); /* 0x3900561D: mov edx, dword ptr [eax + 4] */
  20030     ecx = MEM32(edx + 0x4); /* 0x39005620: mov ecx, dword ptr [edx + 4] */
  20031     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005623: mov byte ptr [ecx + 0x14], 0 */
  20032     edx = MEM32(eax + 0x4); /* 0x39005627: mov edx, dword ptr [eax + 4] */
  20033     ecx = MEM32(edx + 0x4); /* 0x3900562A: mov ecx, dword ptr [edx + 4] */
  20034     edx = MEM32(ecx + 0x8); /* 0x3900562D: mov edx, dword ptr [ecx + 8] */
  20035     edi = MEM32(edx); /* 0x39005630: mov edi, dword ptr [edx] */
  20036     MEM32(ecx + 0x8) = edi; /* 0x39005632: mov dword ptr [ecx + 8], edi */
  20037     edi = MEM32(edx); /* 0x39005635: mov edi, dword ptr [edx] */
  20038     /* cmp edi, MEM32(esi + 0x8) */ /* 0x39005637: cmp edi, dword ptr [esi + 8] */
  20039     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  20040     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20041     _flag_k = FK_CMP;
  20042     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900563F; /* 0x3900563A: je 0x3900563f */
  20043 L_3900563C:
  20044     MEM32(edi + 0x4) = ecx; /* 0x3900563C: mov dword ptr [edi + 4], ecx */
  20045 L_3900563F:
  20046     edi = MEM32(ecx + 0x4); /* 0x3900563F: mov edi, dword ptr [ecx + 4] */
  20047     MEM32(edx + 0x4) = edi; /* 0x39005642: mov dword ptr [edx + 4], edi */
  20048     edi = MEM32(esi + 0x4); /* 0x39005645: mov edi, dword ptr [esi + 4] */
  20049     /* cmp ecx, MEM32(edi + 0x4) */ /* 0x39005648: cmp ecx, dword ptr [edi + 4] */
  20050     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4));
  20051     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20052     _flag_k = FK_CMP;
  20053     if (CMP_NE(_flag_a, _flag_b)) goto L_39005652; /* 0x3900564B: jne 0x39005652 */
  20054 L_3900564D:
  20055     MEM32(edi + 0x4) = edx; /* 0x3900564D: mov dword ptr [edi + 4], edx */
  20056     goto L_39005660; /* 0x39005650: jmp 0x39005660 */
  20057 L_39005652:
  20058     edi = MEM32(ecx + 0x4); /* 0x39005652: mov edi, dword ptr [ecx + 4] */
  20059     /* cmp ecx, MEM32(edi) */ /* 0x39005655: cmp ecx, dword ptr [edi] */
  20060     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi));
  20061     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20062     _flag_k = FK_CMP;
  20063     if (CMP_NE(_flag_a, _flag_b)) goto L_3900565D; /* 0x39005657: jne 0x3900565d */
  20064 L_39005659:
  20065     MEM32(edi) = edx; /* 0x39005659: mov dword ptr [edi], edx */
  20066     goto L_39005660; /* 0x3900565B: jmp 0x39005660 */
  20067 L_3900565D:
  20068     MEM32(edi + 0x8) = edx; /* 0x3900565D: mov dword ptr [edi + 8], edx */
  20069 L_39005660:
  20070     MEM32(edx) = ecx; /* 0x39005660: mov dword ptr [edx], ecx */
  20071 L_39005662:
  20072     MEM32(ecx + 0x4) = edx; /* 0x39005662: mov dword ptr [ecx + 4], edx */
  20073 L_39005665:
  20074     ecx = MEM32(esi + 0x4); /* 0x39005665: mov ecx, dword ptr [esi + 4] */
  20075     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x39005668: cmp eax, dword ptr [ecx + 4] */
  20076     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  20077     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20078     _flag_k = FK_CMP;
  20079     RECOMP_BACKEDGE();
  20080     if (CMP_NE(_flag_a, _flag_b)) goto L_390054F1; /* 0x3900566B: jne 0x390054f1 */
  20081 L_39005671:
  20082     edx = MEM32(esi + 0x4); /* 0x39005671: mov edx, dword ptr [esi + 4] */
  20083     ecx = MEM32(ebp + (-0x4)); /* 0x39005674: mov ecx, dword ptr [ebp - 4] */
  20084     edi = POP32_VAL(esp); /* 0x39005677: pop edi */
  20085     esi = POP32_VAL(esp); /* 0x39005678: pop esi */
  20086     eax = MEM32(edx + 0x4); /* 0x39005679: mov eax, dword ptr [edx + 4] */
  20087     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900567C: mov byte ptr [eax + 0x14], bl */
  20088     eax = MEM32(ebp + 0x8); /* 0x3900567F: mov eax, dword ptr [ebp + 8] */
  20089     ebx = POP32_VAL(esp); /* 0x39005682: pop ebx */
  20090     MEM32(eax) = ecx; /* 0x39005683: mov dword ptr [eax], ecx */
  20091     esp = ebp; /* 0x39005685: mov esp, ebp */
  20092     ebp = POP32_VAL(esp); /* 0x39005687: pop ebp */
  20093     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39005688: ret 0x10 */
  20094     RECOMP_REGS_OUT();
  20095 }
  20096 
  20097 void sub_390054F1(void) {
  20098     int _fpu_cmp = 0;
  20099     uint32_t _cf = 0;
  20100     int _df = 1;
  20101     uint32_t _flag_k = FK_NONE;
  20102     uint32_t _flag_a = 0, _flag_b = 0;
  20103     uint32_t _itail_tgt = 0;
  20104     RECOMP_REGS_LOCALS
  20105     RECOMP_ENTER(0x390054F1u);
  20106 
  20107 L_390054F1:
  20108     ecx = MEM32(eax + 0x4); /* 0x390054F1: mov ecx, dword ptr [eax + 4] */
  20109     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390054F4: mov dl, byte ptr [ecx + 0x14] */
  20110     /* test LO8(edx), LO8(edx) */ /* 0x390054F7: test dl, dl */
  20111     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  20112     _cf = 0;
  20113     _flag_k = FK_NARROW(FK_TEST, 24);
  20114     if (TEST_NZ(_flag_a, _flag_b)) goto L_39005671; /* 0x390054F9: jne 0x39005671 */
  20115 L_390054FF:
  20116     edi = MEM32(ecx + 0x4); /* 0x390054FF: mov edi, dword ptr [ecx + 4] */
  20117     edx = MEM32(edi); /* 0x39005502: mov edx, dword ptr [edi] */
  20118     /* cmp ecx, edx */ /* 0x39005504: cmp ecx, edx */
  20119     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
  20120     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20121     _flag_k = FK_CMP;
  20122     if (CMP_NE(_flag_a, _flag_b)) goto L_390055CD; /* 0x39005506: jne 0x390055cd */
  20123 L_3900550C:
  20124     edx = MEM32(edi + 0x8); /* 0x3900550C: mov edx, dword ptr [edi + 8] */
  20125     /* cmp MEM8(edx + 0x14), 0 */ /* 0x3900550F: cmp byte ptr [edx + 0x14], 0 */
  20126     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(0) << 24;
  20127     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20128     _flag_k = FK_NARROW(FK_CMP, 24);
  20129     if (CMP_NE(_flag_a, _flag_b)) goto L_39005530; /* 0x39005513: jne 0x39005530 */
  20130 L_39005515:
  20131     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005515: mov byte ptr [ecx + 0x14], bl */
  20132     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005518: mov byte ptr [edx + 0x14], bl */
  20133     ecx = MEM32(eax + 0x4); /* 0x3900551B: mov ecx, dword ptr [eax + 4] */
  20134     edx = MEM32(ecx + 0x4); /* 0x3900551E: mov edx, dword ptr [ecx + 4] */
  20135     MEM8(edx + 0x14) = (uint8_t)(0); /* 0x39005521: mov byte ptr [edx + 0x14], 0 */
  20136     eax = MEM32(eax + 0x4); /* 0x39005525: mov eax, dword ptr [eax + 4] */
  20137     eax = MEM32(eax + 0x4); /* 0x39005528: mov eax, dword ptr [eax + 4] */
  20138     goto L_39005665; /* 0x3900552B: jmp 0x39005665 */
  20139 L_39005530:
  20140     /* cmp eax, MEM32(ecx + 0x8) */ /* 0x39005530: cmp eax, dword ptr [ecx + 8] */
  20141     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8));
  20142     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20143     _flag_k = FK_CMP;
  20144     if (CMP_NE(_flag_a, _flag_b)) goto L_3900556F; /* 0x39005533: jne 0x3900556f */
  20145 L_39005535:
  20146     eax = ecx; /* 0x39005535: mov eax, ecx */
  20147     ecx = MEM32(eax + 0x8); /* 0x39005537: mov ecx, dword ptr [eax + 8] */
  20148     edx = MEM32(ecx); /* 0x3900553A: mov edx, dword ptr [ecx] */
  20149     MEM32(eax + 0x8) = edx; /* 0x3900553C: mov dword ptr [eax + 8], edx */
  20150     edx = MEM32(ecx); /* 0x3900553F: mov edx, dword ptr [ecx] */
  20151     /* cmp edx, MEM32(esi + 0x8) */ /* 0x39005541: cmp edx, dword ptr [esi + 8] */
  20152     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  20153     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20154     _flag_k = FK_CMP;
  20155     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005549; /* 0x39005544: je 0x39005549 */
  20156 L_39005546:
  20157     MEM32(edx + 0x4) = eax; /* 0x39005546: mov dword ptr [edx + 4], eax */
  20158 L_39005549:
  20159     edx = MEM32(eax + 0x4); /* 0x39005549: mov edx, dword ptr [eax + 4] */
  20160     MEM32(ecx + 0x4) = edx; /* 0x3900554C: mov dword ptr [ecx + 4], edx */
  20161     edx = MEM32(esi + 0x4); /* 0x3900554F: mov edx, dword ptr [esi + 4] */
  20162     /* cmp eax, MEM32(edx + 0x4) */ /* 0x39005552: cmp eax, dword ptr [edx + 4] */
  20163     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4));
  20164     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20165     _flag_k = FK_CMP;
  20166     if (CMP_NE(_flag_a, _flag_b)) goto L_3900555C; /* 0x39005555: jne 0x3900555c */
  20167 L_39005557:
  20168     MEM32(edx + 0x4) = ecx; /* 0x39005557: mov dword ptr [edx + 4], ecx */
  20169     goto L_3900556A; /* 0x3900555A: jmp 0x3900556a */
  20170 L_3900555C:
  20171     edx = MEM32(eax + 0x4); /* 0x3900555C: mov edx, dword ptr [eax + 4] */
  20172     /* cmp eax, MEM32(edx) */ /* 0x3900555F: cmp eax, dword ptr [edx] */
  20173     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx));
  20174     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20175     _flag_k = FK_CMP;
  20176     if (CMP_NE(_flag_a, _flag_b)) goto L_39005567; /* 0x39005561: jne 0x39005567 */
  20177 L_39005563:
  20178     MEM32(edx) = ecx; /* 0x39005563: mov dword ptr [edx], ecx */
  20179     goto L_3900556A; /* 0x39005565: jmp 0x3900556a */
  20180 L_39005567:
  20181     MEM32(edx + 0x8) = ecx; /* 0x39005567: mov dword ptr [edx + 8], ecx */
  20182 L_3900556A:
  20183     MEM32(ecx) = eax; /* 0x3900556A: mov dword ptr [ecx], eax */
  20184     MEM32(eax + 0x4) = ecx; /* 0x3900556C: mov dword ptr [eax + 4], ecx */
  20185 L_3900556F:
  20186     ecx = MEM32(eax + 0x4); /* 0x3900556F: mov ecx, dword ptr [eax + 4] */
  20187     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005572: mov byte ptr [ecx + 0x14], bl */
  20188     edx = MEM32(eax + 0x4); /* 0x39005575: mov edx, dword ptr [eax + 4] */
  20189     ecx = MEM32(edx + 0x4); /* 0x39005578: mov ecx, dword ptr [edx + 4] */
  20190     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900557B: mov byte ptr [ecx + 0x14], 0 */
  20191     edx = MEM32(eax + 0x4); /* 0x3900557F: mov edx, dword ptr [eax + 4] */
  20192     ecx = MEM32(edx + 0x4); /* 0x39005582: mov ecx, dword ptr [edx + 4] */
  20193     edx = MEM32(ecx); /* 0x39005585: mov edx, dword ptr [ecx] */
  20194     edi = MEM32(edx + 0x8); /* 0x39005587: mov edi, dword ptr [edx + 8] */
  20195     MEM32(ecx) = edi; /* 0x3900558A: mov dword ptr [ecx], edi */
  20196     edi = MEM32(edx + 0x8); /* 0x3900558C: mov edi, dword ptr [edx + 8] */
  20197     /* cmp edi, MEM32(esi + 0x8) */ /* 0x3900558F: cmp edi, dword ptr [esi + 8] */
  20198     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  20199     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20200     _flag_k = FK_CMP;
  20201     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005597; /* 0x39005592: je 0x39005597 */
  20202 L_39005594:
  20203     MEM32(edi + 0x4) = ecx; /* 0x39005594: mov dword ptr [edi + 4], ecx */
  20204 L_39005597:
  20205     edi = MEM32(ecx + 0x4); /* 0x39005597: mov edi, dword ptr [ecx + 4] */
  20206     MEM32(edx + 0x4) = edi; /* 0x3900559A: mov dword ptr [edx + 4], edi */
  20207     edi = MEM32(esi + 0x4); /* 0x3900559D: mov edi, dword ptr [esi + 4] */
  20208     /* cmp ecx, MEM32(edi + 0x4) */ /* 0x390055A0: cmp ecx, dword ptr [edi + 4] */
  20209     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4));
  20210     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20211     _flag_k = FK_CMP;
  20212     if (CMP_NE(_flag_a, _flag_b)) goto L_390055B0; /* 0x390055A3: jne 0x390055b0 */
  20213 L_390055A5:
  20214     MEM32(edi + 0x4) = edx; /* 0x390055A5: mov dword ptr [edi + 4], edx */
  20215     MEM32(edx + 0x8) = ecx; /* 0x390055A8: mov dword ptr [edx + 8], ecx */
  20216     goto L_39005662; /* 0x390055AB: jmp 0x39005662 */
  20217 L_390055B0:
  20218     edi = MEM32(ecx + 0x4); /* 0x390055B0: mov edi, dword ptr [ecx + 4] */
  20219     /* cmp ecx, MEM32(edi + 0x8) */ /* 0x390055B3: cmp ecx, dword ptr [edi + 8] */
  20220     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  20221     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20222     _flag_k = FK_CMP;
  20223     if (CMP_NE(_flag_a, _flag_b)) goto L_390055C3; /* 0x390055B6: jne 0x390055c3 */
  20224 L_390055B8:
  20225     MEM32(edi + 0x8) = edx; /* 0x390055B8: mov dword ptr [edi + 8], edx */
  20226     MEM32(edx + 0x8) = ecx; /* 0x390055BB: mov dword ptr [edx + 8], ecx */
  20227     goto L_39005662; /* 0x390055BE: jmp 0x39005662 */
  20228 L_390055C3:
  20229     MEM32(edi) = edx; /* 0x390055C3: mov dword ptr [edi], edx */
  20230     MEM32(edx + 0x8) = ecx; /* 0x390055C5: mov dword ptr [edx + 8], ecx */
  20231     goto L_39005662; /* 0x390055C8: jmp 0x39005662 */
  20232 L_390055CD:
  20233     /* cmp MEM8(edx + 0x14), 0 */ /* 0x390055CD: cmp byte ptr [edx + 0x14], 0 */
  20234     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(0) << 24;
  20235     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20236     _flag_k = FK_NARROW(FK_CMP, 24);
  20237     RECOMP_BACKEDGE();
  20238     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005515; /* 0x390055D1: je 0x39005515 */
  20239 L_390055D7:
  20240     /* cmp eax, MEM32(ecx) */ /* 0x390055D7: cmp eax, dword ptr [ecx] */
  20241     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx));
  20242     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20243     _flag_k = FK_CMP;
  20244     if (CMP_NE(_flag_a, _flag_b)) goto L_39005617; /* 0x390055D9: jne 0x39005617 */
  20245 L_390055DB:
  20246     eax = ecx; /* 0x390055DB: mov eax, ecx */
  20247     ecx = MEM32(eax); /* 0x390055DD: mov ecx, dword ptr [eax] */
  20248     edx = MEM32(ecx + 0x8); /* 0x390055DF: mov edx, dword ptr [ecx + 8] */
  20249     MEM32(eax) = edx; /* 0x390055E2: mov dword ptr [eax], edx */
  20250     edx = MEM32(ecx + 0x8); /* 0x390055E4: mov edx, dword ptr [ecx + 8] */
  20251     /* cmp edx, MEM32(esi + 0x8) */ /* 0x390055E7: cmp edx, dword ptr [esi + 8] */
  20252     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  20253     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20254     _flag_k = FK_CMP;
  20255     if (CMP_EQ(_flag_a, _flag_b)) goto L_390055EF; /* 0x390055EA: je 0x390055ef */
  20256 L_390055EC:
  20257     MEM32(edx + 0x4) = eax; /* 0x390055EC: mov dword ptr [edx + 4], eax */
  20258 L_390055EF:
  20259     edx = MEM32(eax + 0x4); /* 0x390055EF: mov edx, dword ptr [eax + 4] */
  20260     MEM32(ecx + 0x4) = edx; /* 0x390055F2: mov dword ptr [ecx + 4], edx */
  20261     edx = MEM32(esi + 0x4); /* 0x390055F5: mov edx, dword ptr [esi + 4] */
  20262     /* cmp eax, MEM32(edx + 0x4) */ /* 0x390055F8: cmp eax, dword ptr [edx + 4] */
  20263     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4));
  20264     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20265     _flag_k = FK_CMP;
  20266     if (CMP_NE(_flag_a, _flag_b)) goto L_39005602; /* 0x390055FB: jne 0x39005602 */
  20267 L_390055FD:
  20268     MEM32(edx + 0x4) = ecx; /* 0x390055FD: mov dword ptr [edx + 4], ecx */
  20269     goto L_39005611; /* 0x39005600: jmp 0x39005611 */
  20270 L_39005602:
  20271     edx = MEM32(eax + 0x4); /* 0x39005602: mov edx, dword ptr [eax + 4] */
  20272     /* cmp eax, MEM32(edx + 0x8) */ /* 0x39005605: cmp eax, dword ptr [edx + 8] */
  20273     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x8));
  20274     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20275     _flag_k = FK_CMP;
  20276     if (CMP_NE(_flag_a, _flag_b)) goto L_3900560F; /* 0x39005608: jne 0x3900560f */
  20277 L_3900560A:
  20278     MEM32(edx + 0x8) = ecx; /* 0x3900560A: mov dword ptr [edx + 8], ecx */
  20279     goto L_39005611; /* 0x3900560D: jmp 0x39005611 */
  20280 L_3900560F:
  20281     MEM32(edx) = ecx; /* 0x3900560F: mov dword ptr [edx], ecx */
  20282 L_39005611:
  20283     MEM32(ecx + 0x8) = eax; /* 0x39005611: mov dword ptr [ecx + 8], eax */
  20284     MEM32(eax + 0x4) = ecx; /* 0x39005614: mov dword ptr [eax + 4], ecx */
  20285 L_39005617:
  20286     ecx = MEM32(eax + 0x4); /* 0x39005617: mov ecx, dword ptr [eax + 4] */
  20287     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900561A: mov byte ptr [ecx + 0x14], bl */
  20288     edx = MEM32(eax + 0x4); /* 0x3900561D: mov edx, dword ptr [eax + 4] */
  20289     ecx = MEM32(edx + 0x4); /* 0x39005620: mov ecx, dword ptr [edx + 4] */
  20290     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005623: mov byte ptr [ecx + 0x14], 0 */
  20291     edx = MEM32(eax + 0x4); /* 0x39005627: mov edx, dword ptr [eax + 4] */
  20292     ecx = MEM32(edx + 0x4); /* 0x3900562A: mov ecx, dword ptr [edx + 4] */
  20293     edx = MEM32(ecx + 0x8); /* 0x3900562D: mov edx, dword ptr [ecx + 8] */
  20294     edi = MEM32(edx); /* 0x39005630: mov edi, dword ptr [edx] */
  20295     MEM32(ecx + 0x8) = edi; /* 0x39005632: mov dword ptr [ecx + 8], edi */
  20296     edi = MEM32(edx); /* 0x39005635: mov edi, dword ptr [edx] */
  20297     /* cmp edi, MEM32(esi + 0x8) */ /* 0x39005637: cmp edi, dword ptr [esi + 8] */
  20298     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  20299     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20300     _flag_k = FK_CMP;
  20301     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900563F; /* 0x3900563A: je 0x3900563f */
  20302 L_3900563C:
  20303     MEM32(edi + 0x4) = ecx; /* 0x3900563C: mov dword ptr [edi + 4], ecx */
  20304 L_3900563F:
  20305     edi = MEM32(ecx + 0x4); /* 0x3900563F: mov edi, dword ptr [ecx + 4] */
  20306     MEM32(edx + 0x4) = edi; /* 0x39005642: mov dword ptr [edx + 4], edi */
  20307     edi = MEM32(esi + 0x4); /* 0x39005645: mov edi, dword ptr [esi + 4] */
  20308     /* cmp ecx, MEM32(edi + 0x4) */ /* 0x39005648: cmp ecx, dword ptr [edi + 4] */
  20309     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4));
  20310     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20311     _flag_k = FK_CMP;
  20312     if (CMP_NE(_flag_a, _flag_b)) goto L_39005652; /* 0x3900564B: jne 0x39005652 */
  20313 L_3900564D:
  20314     MEM32(edi + 0x4) = edx; /* 0x3900564D: mov dword ptr [edi + 4], edx */
  20315     goto L_39005660; /* 0x39005650: jmp 0x39005660 */
  20316 L_39005652:
  20317     edi = MEM32(ecx + 0x4); /* 0x39005652: mov edi, dword ptr [ecx + 4] */
  20318     /* cmp ecx, MEM32(edi) */ /* 0x39005655: cmp ecx, dword ptr [edi] */
  20319     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi));
  20320     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20321     _flag_k = FK_CMP;
  20322     if (CMP_NE(_flag_a, _flag_b)) goto L_3900565D; /* 0x39005657: jne 0x3900565d */
  20323 L_39005659:
  20324     MEM32(edi) = edx; /* 0x39005659: mov dword ptr [edi], edx */
  20325     goto L_39005660; /* 0x3900565B: jmp 0x39005660 */
  20326 L_3900565D:
  20327     MEM32(edi + 0x8) = edx; /* 0x3900565D: mov dword ptr [edi + 8], edx */
  20328 L_39005660:
  20329     MEM32(edx) = ecx; /* 0x39005660: mov dword ptr [edx], ecx */
  20330 L_39005662:
  20331     MEM32(ecx + 0x4) = edx; /* 0x39005662: mov dword ptr [ecx + 4], edx */
  20332 L_39005665:
  20333     ecx = MEM32(esi + 0x4); /* 0x39005665: mov ecx, dword ptr [esi + 4] */
  20334     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x39005668: cmp eax, dword ptr [ecx + 4] */
  20335     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  20336     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20337     _flag_k = FK_CMP;
  20338     RECOMP_BACKEDGE();
  20339     if (CMP_NE(_flag_a, _flag_b)) goto L_390054F1; /* 0x3900566B: jne 0x390054f1 */
  20340 L_39005671:
  20341     edx = MEM32(esi + 0x4); /* 0x39005671: mov edx, dword ptr [esi + 4] */
  20342     ecx = MEM32(ebp + (-0x4)); /* 0x39005674: mov ecx, dword ptr [ebp - 4] */
  20343     edi = POP32_VAL(esp); /* 0x39005677: pop edi */
  20344     esi = POP32_VAL(esp); /* 0x39005678: pop esi */
  20345     eax = MEM32(edx + 0x4); /* 0x39005679: mov eax, dword ptr [edx + 4] */
  20346     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900567C: mov byte ptr [eax + 0x14], bl */
  20347     eax = MEM32(ebp + 0x8); /* 0x3900567F: mov eax, dword ptr [ebp + 8] */
  20348     ebx = POP32_VAL(esp); /* 0x39005682: pop ebx */
  20349     MEM32(eax) = ecx; /* 0x39005683: mov dword ptr [eax], ecx */
  20350     esp = ebp; /* 0x39005685: mov esp, ebp */
  20351     ebp = POP32_VAL(esp); /* 0x39005687: pop ebp */
  20352     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39005688: ret 0x10 */
  20353     RECOMP_REGS_OUT();
  20354 }
  20355 
  20356 void sub_39005515(void) {
  20357     int _fpu_cmp = 0;
  20358     uint32_t _cf = 0;
  20359     int _df = 1;
  20360     uint32_t _flag_k = FK_NONE;
  20361     uint32_t _flag_a = 0, _flag_b = 0;
  20362     uint32_t _itail_tgt = 0;
  20363     RECOMP_REGS_LOCALS
  20364     RECOMP_ENTER(0x39005515u);
  20365 
  20366     goto L_39005515;
  20367 L_390054F1:
  20368     ecx = MEM32(eax + 0x4); /* 0x390054F1: mov ecx, dword ptr [eax + 4] */
  20369     SET_LO8(edx, MEM8(ecx + 0x14)); /* 0x390054F4: mov dl, byte ptr [ecx + 0x14] */
  20370     /* test LO8(edx), LO8(edx) */ /* 0x390054F7: test dl, dl */
  20371     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  20372     _cf = 0;
  20373     _flag_k = FK_NARROW(FK_TEST, 24);
  20374     if (TEST_NZ(_flag_a, _flag_b)) goto L_39005671; /* 0x390054F9: jne 0x39005671 */
  20375 L_390054FF:
  20376     edi = MEM32(ecx + 0x4); /* 0x390054FF: mov edi, dword ptr [ecx + 4] */
  20377     edx = MEM32(edi); /* 0x39005502: mov edx, dword ptr [edi] */
  20378     /* cmp ecx, edx */ /* 0x39005504: cmp ecx, edx */
  20379     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
  20380     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20381     _flag_k = FK_CMP;
  20382     if (CMP_NE(_flag_a, _flag_b)) goto L_390055CD; /* 0x39005506: jne 0x390055cd */
  20383 L_3900550C:
  20384     edx = MEM32(edi + 0x8); /* 0x3900550C: mov edx, dword ptr [edi + 8] */
  20385     /* cmp MEM8(edx + 0x14), 0 */ /* 0x3900550F: cmp byte ptr [edx + 0x14], 0 */
  20386     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(0) << 24;
  20387     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20388     _flag_k = FK_NARROW(FK_CMP, 24);
  20389     if (CMP_NE(_flag_a, _flag_b)) goto L_39005530; /* 0x39005513: jne 0x39005530 */
  20390 L_39005515:
  20391     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005515: mov byte ptr [ecx + 0x14], bl */
  20392     MEM8(edx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005518: mov byte ptr [edx + 0x14], bl */
  20393     ecx = MEM32(eax + 0x4); /* 0x3900551B: mov ecx, dword ptr [eax + 4] */
  20394     edx = MEM32(ecx + 0x4); /* 0x3900551E: mov edx, dword ptr [ecx + 4] */
  20395     MEM8(edx + 0x14) = (uint8_t)(0); /* 0x39005521: mov byte ptr [edx + 0x14], 0 */
  20396     eax = MEM32(eax + 0x4); /* 0x39005525: mov eax, dword ptr [eax + 4] */
  20397     eax = MEM32(eax + 0x4); /* 0x39005528: mov eax, dword ptr [eax + 4] */
  20398     goto L_39005665; /* 0x3900552B: jmp 0x39005665 */
  20399 L_39005530:
  20400     /* cmp eax, MEM32(ecx + 0x8) */ /* 0x39005530: cmp eax, dword ptr [ecx + 8] */
  20401     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x8));
  20402     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20403     _flag_k = FK_CMP;
  20404     if (CMP_NE(_flag_a, _flag_b)) goto L_3900556F; /* 0x39005533: jne 0x3900556f */
  20405 L_39005535:
  20406     eax = ecx; /* 0x39005535: mov eax, ecx */
  20407     ecx = MEM32(eax + 0x8); /* 0x39005537: mov ecx, dword ptr [eax + 8] */
  20408     edx = MEM32(ecx); /* 0x3900553A: mov edx, dword ptr [ecx] */
  20409     MEM32(eax + 0x8) = edx; /* 0x3900553C: mov dword ptr [eax + 8], edx */
  20410     edx = MEM32(ecx); /* 0x3900553F: mov edx, dword ptr [ecx] */
  20411     /* cmp edx, MEM32(esi + 0x8) */ /* 0x39005541: cmp edx, dword ptr [esi + 8] */
  20412     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  20413     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20414     _flag_k = FK_CMP;
  20415     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005549; /* 0x39005544: je 0x39005549 */
  20416 L_39005546:
  20417     MEM32(edx + 0x4) = eax; /* 0x39005546: mov dword ptr [edx + 4], eax */
  20418 L_39005549:
  20419     edx = MEM32(eax + 0x4); /* 0x39005549: mov edx, dword ptr [eax + 4] */
  20420     MEM32(ecx + 0x4) = edx; /* 0x3900554C: mov dword ptr [ecx + 4], edx */
  20421     edx = MEM32(esi + 0x4); /* 0x3900554F: mov edx, dword ptr [esi + 4] */
  20422     /* cmp eax, MEM32(edx + 0x4) */ /* 0x39005552: cmp eax, dword ptr [edx + 4] */
  20423     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4));
  20424     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20425     _flag_k = FK_CMP;
  20426     if (CMP_NE(_flag_a, _flag_b)) goto L_3900555C; /* 0x39005555: jne 0x3900555c */
  20427 L_39005557:
  20428     MEM32(edx + 0x4) = ecx; /* 0x39005557: mov dword ptr [edx + 4], ecx */
  20429     goto L_3900556A; /* 0x3900555A: jmp 0x3900556a */
  20430 L_3900555C:
  20431     edx = MEM32(eax + 0x4); /* 0x3900555C: mov edx, dword ptr [eax + 4] */
  20432     /* cmp eax, MEM32(edx) */ /* 0x3900555F: cmp eax, dword ptr [edx] */
  20433     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx));
  20434     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20435     _flag_k = FK_CMP;
  20436     if (CMP_NE(_flag_a, _flag_b)) goto L_39005567; /* 0x39005561: jne 0x39005567 */
  20437 L_39005563:
  20438     MEM32(edx) = ecx; /* 0x39005563: mov dword ptr [edx], ecx */
  20439     goto L_3900556A; /* 0x39005565: jmp 0x3900556a */
  20440 L_39005567:
  20441     MEM32(edx + 0x8) = ecx; /* 0x39005567: mov dword ptr [edx + 8], ecx */
  20442 L_3900556A:
  20443     MEM32(ecx) = eax; /* 0x3900556A: mov dword ptr [ecx], eax */
  20444     MEM32(eax + 0x4) = ecx; /* 0x3900556C: mov dword ptr [eax + 4], ecx */
  20445 L_3900556F:
  20446     ecx = MEM32(eax + 0x4); /* 0x3900556F: mov ecx, dword ptr [eax + 4] */
  20447     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x39005572: mov byte ptr [ecx + 0x14], bl */
  20448     edx = MEM32(eax + 0x4); /* 0x39005575: mov edx, dword ptr [eax + 4] */
  20449     ecx = MEM32(edx + 0x4); /* 0x39005578: mov ecx, dword ptr [edx + 4] */
  20450     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x3900557B: mov byte ptr [ecx + 0x14], 0 */
  20451     edx = MEM32(eax + 0x4); /* 0x3900557F: mov edx, dword ptr [eax + 4] */
  20452     ecx = MEM32(edx + 0x4); /* 0x39005582: mov ecx, dword ptr [edx + 4] */
  20453     edx = MEM32(ecx); /* 0x39005585: mov edx, dword ptr [ecx] */
  20454     edi = MEM32(edx + 0x8); /* 0x39005587: mov edi, dword ptr [edx + 8] */
  20455     MEM32(ecx) = edi; /* 0x3900558A: mov dword ptr [ecx], edi */
  20456     edi = MEM32(edx + 0x8); /* 0x3900558C: mov edi, dword ptr [edx + 8] */
  20457     /* cmp edi, MEM32(esi + 0x8) */ /* 0x3900558F: cmp edi, dword ptr [esi + 8] */
  20458     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  20459     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20460     _flag_k = FK_CMP;
  20461     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005597; /* 0x39005592: je 0x39005597 */
  20462 L_39005594:
  20463     MEM32(edi + 0x4) = ecx; /* 0x39005594: mov dword ptr [edi + 4], ecx */
  20464 L_39005597:
  20465     edi = MEM32(ecx + 0x4); /* 0x39005597: mov edi, dword ptr [ecx + 4] */
  20466     MEM32(edx + 0x4) = edi; /* 0x3900559A: mov dword ptr [edx + 4], edi */
  20467     edi = MEM32(esi + 0x4); /* 0x3900559D: mov edi, dword ptr [esi + 4] */
  20468     /* cmp ecx, MEM32(edi + 0x4) */ /* 0x390055A0: cmp ecx, dword ptr [edi + 4] */
  20469     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4));
  20470     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20471     _flag_k = FK_CMP;
  20472     if (CMP_NE(_flag_a, _flag_b)) goto L_390055B0; /* 0x390055A3: jne 0x390055b0 */
  20473 L_390055A5:
  20474     MEM32(edi + 0x4) = edx; /* 0x390055A5: mov dword ptr [edi + 4], edx */
  20475     MEM32(edx + 0x8) = ecx; /* 0x390055A8: mov dword ptr [edx + 8], ecx */
  20476     goto L_39005662; /* 0x390055AB: jmp 0x39005662 */
  20477 L_390055B0:
  20478     edi = MEM32(ecx + 0x4); /* 0x390055B0: mov edi, dword ptr [ecx + 4] */
  20479     /* cmp ecx, MEM32(edi + 0x8) */ /* 0x390055B3: cmp ecx, dword ptr [edi + 8] */
  20480     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x8));
  20481     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20482     _flag_k = FK_CMP;
  20483     if (CMP_NE(_flag_a, _flag_b)) goto L_390055C3; /* 0x390055B6: jne 0x390055c3 */
  20484 L_390055B8:
  20485     MEM32(edi + 0x8) = edx; /* 0x390055B8: mov dword ptr [edi + 8], edx */
  20486     MEM32(edx + 0x8) = ecx; /* 0x390055BB: mov dword ptr [edx + 8], ecx */
  20487     goto L_39005662; /* 0x390055BE: jmp 0x39005662 */
  20488 L_390055C3:
  20489     MEM32(edi) = edx; /* 0x390055C3: mov dword ptr [edi], edx */
  20490     MEM32(edx + 0x8) = ecx; /* 0x390055C5: mov dword ptr [edx + 8], ecx */
  20491     goto L_39005662; /* 0x390055C8: jmp 0x39005662 */
  20492 L_390055CD:
  20493     /* cmp MEM8(edx + 0x14), 0 */ /* 0x390055CD: cmp byte ptr [edx + 0x14], 0 */
  20494     _flag_a = (uint32_t)(MEM8(edx + 0x14)) << 24; _flag_b = (uint32_t)(0) << 24;
  20495     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20496     _flag_k = FK_NARROW(FK_CMP, 24);
  20497     RECOMP_BACKEDGE();
  20498     if (CMP_EQ(_flag_a, _flag_b)) goto L_39005515; /* 0x390055D1: je 0x39005515 */
  20499 L_390055D7:
  20500     /* cmp eax, MEM32(ecx) */ /* 0x390055D7: cmp eax, dword ptr [ecx] */
  20501     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx));
  20502     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20503     _flag_k = FK_CMP;
  20504     if (CMP_NE(_flag_a, _flag_b)) goto L_39005617; /* 0x390055D9: jne 0x39005617 */
  20505 L_390055DB:
  20506     eax = ecx; /* 0x390055DB: mov eax, ecx */
  20507     ecx = MEM32(eax); /* 0x390055DD: mov ecx, dword ptr [eax] */
  20508     edx = MEM32(ecx + 0x8); /* 0x390055DF: mov edx, dword ptr [ecx + 8] */
  20509     MEM32(eax) = edx; /* 0x390055E2: mov dword ptr [eax], edx */
  20510     edx = MEM32(ecx + 0x8); /* 0x390055E4: mov edx, dword ptr [ecx + 8] */
  20511     /* cmp edx, MEM32(esi + 0x8) */ /* 0x390055E7: cmp edx, dword ptr [esi + 8] */
  20512     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  20513     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20514     _flag_k = FK_CMP;
  20515     if (CMP_EQ(_flag_a, _flag_b)) goto L_390055EF; /* 0x390055EA: je 0x390055ef */
  20516 L_390055EC:
  20517     MEM32(edx + 0x4) = eax; /* 0x390055EC: mov dword ptr [edx + 4], eax */
  20518 L_390055EF:
  20519     edx = MEM32(eax + 0x4); /* 0x390055EF: mov edx, dword ptr [eax + 4] */
  20520     MEM32(ecx + 0x4) = edx; /* 0x390055F2: mov dword ptr [ecx + 4], edx */
  20521     edx = MEM32(esi + 0x4); /* 0x390055F5: mov edx, dword ptr [esi + 4] */
  20522     /* cmp eax, MEM32(edx + 0x4) */ /* 0x390055F8: cmp eax, dword ptr [edx + 4] */
  20523     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x4));
  20524     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20525     _flag_k = FK_CMP;
  20526     if (CMP_NE(_flag_a, _flag_b)) goto L_39005602; /* 0x390055FB: jne 0x39005602 */
  20527 L_390055FD:
  20528     MEM32(edx + 0x4) = ecx; /* 0x390055FD: mov dword ptr [edx + 4], ecx */
  20529     goto L_39005611; /* 0x39005600: jmp 0x39005611 */
  20530 L_39005602:
  20531     edx = MEM32(eax + 0x4); /* 0x39005602: mov edx, dword ptr [eax + 4] */
  20532     /* cmp eax, MEM32(edx + 0x8) */ /* 0x39005605: cmp eax, dword ptr [edx + 8] */
  20533     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(edx + 0x8));
  20534     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20535     _flag_k = FK_CMP;
  20536     if (CMP_NE(_flag_a, _flag_b)) goto L_3900560F; /* 0x39005608: jne 0x3900560f */
  20537 L_3900560A:
  20538     MEM32(edx + 0x8) = ecx; /* 0x3900560A: mov dword ptr [edx + 8], ecx */
  20539     goto L_39005611; /* 0x3900560D: jmp 0x39005611 */
  20540 L_3900560F:
  20541     MEM32(edx) = ecx; /* 0x3900560F: mov dword ptr [edx], ecx */
  20542 L_39005611:
  20543     MEM32(ecx + 0x8) = eax; /* 0x39005611: mov dword ptr [ecx + 8], eax */
  20544     MEM32(eax + 0x4) = ecx; /* 0x39005614: mov dword ptr [eax + 4], ecx */
  20545 L_39005617:
  20546     ecx = MEM32(eax + 0x4); /* 0x39005617: mov ecx, dword ptr [eax + 4] */
  20547     MEM8(ecx + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900561A: mov byte ptr [ecx + 0x14], bl */
  20548     edx = MEM32(eax + 0x4); /* 0x3900561D: mov edx, dword ptr [eax + 4] */
  20549     ecx = MEM32(edx + 0x4); /* 0x39005620: mov ecx, dword ptr [edx + 4] */
  20550     MEM8(ecx + 0x14) = (uint8_t)(0); /* 0x39005623: mov byte ptr [ecx + 0x14], 0 */
  20551     edx = MEM32(eax + 0x4); /* 0x39005627: mov edx, dword ptr [eax + 4] */
  20552     ecx = MEM32(edx + 0x4); /* 0x3900562A: mov ecx, dword ptr [edx + 4] */
  20553     edx = MEM32(ecx + 0x8); /* 0x3900562D: mov edx, dword ptr [ecx + 8] */
  20554     edi = MEM32(edx); /* 0x39005630: mov edi, dword ptr [edx] */
  20555     MEM32(ecx + 0x8) = edi; /* 0x39005632: mov dword ptr [ecx + 8], edi */
  20556     edi = MEM32(edx); /* 0x39005635: mov edi, dword ptr [edx] */
  20557     /* cmp edi, MEM32(esi + 0x8) */ /* 0x39005637: cmp edi, dword ptr [esi + 8] */
  20558     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  20559     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20560     _flag_k = FK_CMP;
  20561     if (CMP_EQ(_flag_a, _flag_b)) goto L_3900563F; /* 0x3900563A: je 0x3900563f */
  20562 L_3900563C:
  20563     MEM32(edi + 0x4) = ecx; /* 0x3900563C: mov dword ptr [edi + 4], ecx */
  20564 L_3900563F:
  20565     edi = MEM32(ecx + 0x4); /* 0x3900563F: mov edi, dword ptr [ecx + 4] */
  20566     MEM32(edx + 0x4) = edi; /* 0x39005642: mov dword ptr [edx + 4], edi */
  20567     edi = MEM32(esi + 0x4); /* 0x39005645: mov edi, dword ptr [esi + 4] */
  20568     /* cmp ecx, MEM32(edi + 0x4) */ /* 0x39005648: cmp ecx, dword ptr [edi + 4] */
  20569     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi + 0x4));
  20570     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20571     _flag_k = FK_CMP;
  20572     if (CMP_NE(_flag_a, _flag_b)) goto L_39005652; /* 0x3900564B: jne 0x39005652 */
  20573 L_3900564D:
  20574     MEM32(edi + 0x4) = edx; /* 0x3900564D: mov dword ptr [edi + 4], edx */
  20575     goto L_39005660; /* 0x39005650: jmp 0x39005660 */
  20576 L_39005652:
  20577     edi = MEM32(ecx + 0x4); /* 0x39005652: mov edi, dword ptr [ecx + 4] */
  20578     /* cmp ecx, MEM32(edi) */ /* 0x39005655: cmp ecx, dword ptr [edi] */
  20579     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(edi));
  20580     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20581     _flag_k = FK_CMP;
  20582     if (CMP_NE(_flag_a, _flag_b)) goto L_3900565D; /* 0x39005657: jne 0x3900565d */
  20583 L_39005659:
  20584     MEM32(edi) = edx; /* 0x39005659: mov dword ptr [edi], edx */
  20585     goto L_39005660; /* 0x3900565B: jmp 0x39005660 */
  20586 L_3900565D:
  20587     MEM32(edi + 0x8) = edx; /* 0x3900565D: mov dword ptr [edi + 8], edx */
  20588 L_39005660:
  20589     MEM32(edx) = ecx; /* 0x39005660: mov dword ptr [edx], ecx */
  20590 L_39005662:
  20591     MEM32(ecx + 0x4) = edx; /* 0x39005662: mov dword ptr [ecx + 4], edx */
  20592 L_39005665:
  20593     ecx = MEM32(esi + 0x4); /* 0x39005665: mov ecx, dword ptr [esi + 4] */
  20594     /* cmp eax, MEM32(ecx + 0x4) */ /* 0x39005668: cmp eax, dword ptr [ecx + 4] */
  20595     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ecx + 0x4));
  20596     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  20597     _flag_k = FK_CMP;
  20598     RECOMP_BACKEDGE();
  20599     if (CMP_NE(_flag_a, _flag_b)) goto L_390054F1; /* 0x3900566B: jne 0x390054f1 */
  20600 L_39005671:
  20601     edx = MEM32(esi + 0x4); /* 0x39005671: mov edx, dword ptr [esi + 4] */
  20602     ecx = MEM32(ebp + (-0x4)); /* 0x39005674: mov ecx, dword ptr [ebp - 4] */
  20603     edi = POP32_VAL(esp); /* 0x39005677: pop edi */
  20604     esi = POP32_VAL(esp); /* 0x39005678: pop esi */
  20605     eax = MEM32(edx + 0x4); /* 0x39005679: mov eax, dword ptr [edx + 4] */
  20606     MEM8(eax + 0x14) = (uint8_t)(LO8(ebx)); /* 0x3900567C: mov byte ptr [eax + 0x14], bl */
  20607     eax = MEM32(ebp + 0x8); /* 0x3900567F: mov eax, dword ptr [ebp + 8] */
  20608     ebx = POP32_VAL(esp); /* 0x39005682: pop ebx */
  20609     MEM32(eax) = ecx; /* 0x39005683: mov dword ptr [eax], ecx */
  20610     esp = ebp; /* 0x39005685: mov esp, ebp */
  20611     ebp = POP32_VAL(esp); /* 0x39005687: pop ebp */
  20612     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x39005688: ret 0x10 */
  20613     RECOMP_REGS_OUT();
  20614 }