aorecomp

Anarchy Online classic in the browser

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


client/game/ggr.dll/lifted-0000.c (672794B)


      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_30001000(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(0x30001000u);
     17 
     18 L_30001000:
     19     eax = ecx; /* 0x30001000: mov eax, ecx */
     20     MEM32(eax + 0x4) = 0; /* 0x30001002: mov dword ptr [eax + 4], 0 */
     21     MEM32(eax) = 0x3001910Cu; /* 0x30001009: mov dword ptr [eax], 0x3001910c */
     22     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000100F: ret  */
     23     RECOMP_REGS_OUT();
     24 }
     25 
     26 void sub_30001010(void) {
     27     int _fpu_cmp = 0;
     28     uint32_t _cf = 0;
     29     int _df = 1;
     30     uint32_t _flag_k = FK_NONE;
     31     uint32_t _flag_a = 0, _flag_b = 0;
     32     uint32_t _itail_tgt = 0;
     33     RECOMP_REGS_LOCALS
     34     RECOMP_ENTER(0x30001010u);
     35 
     36 L_30001010:
     37     eax = ecx; /* 0x30001010: mov eax, ecx */
     38     MEM32(eax) = 0x3001910Cu; /* 0x30001012: mov dword ptr [eax], 0x3001910c */
     39     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x30001018: ret 8 */
     40     RECOMP_REGS_OUT();
     41 }
     42 
     43 void sub_30001020(void) {
     44     int _fpu_cmp = 0;
     45     uint32_t _cf = 0;
     46     int _df = 1;
     47     uint32_t _flag_k = FK_NONE;
     48     uint32_t _flag_a = 0, _flag_b = 0;
     49     uint32_t _itail_tgt = 0;
     50     RECOMP_REGS_LOCALS
     51     RECOMP_ENTER(0x30001020u);
     52 
     53 L_30001020:
     54     PUSH32(esp, esi); /* 0x30001020: push esi */
     55     esi = ecx; /* 0x30001021: mov esi, ecx */
     56     ecx = MEM32(esi + 0x4); /* 0x30001023: mov ecx, dword ptr [esi + 4] */
     57     /* test ecx, ecx */ /* 0x30001026: test ecx, ecx */
     58     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
     59     _cf = 0;
     60     _flag_k = FK_TEST;
     61     MEM32(esi) = 0x3001910Cu; /* 0x30001028: mov dword ptr [esi], 0x3001910c */
     62     if (TEST_Z(_flag_a, _flag_b)) goto L_30001036; /* 0x3000102E: je 0x30001036 */
     63 L_30001030:
     64     eax = MEM32(ecx); /* 0x30001030: mov eax, dword ptr [ecx] */
     65     PUSH32(esp, 1); /* 0x30001032: push 1 */
     66     RECOMP_ICALL(MEM32(eax)); /* 0x30001034: call dword ptr [eax] */
     67     RECOMP_FLAGS_IN();
     68 L_30001036:
     69     MEM32(esi + 0x4) = 0; /* 0x30001036: mov dword ptr [esi + 4], 0 */
     70     esi = POP32_VAL(esp); /* 0x3000103D: pop esi */
     71     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000103E: ret  */
     72     RECOMP_REGS_OUT();
     73 }
     74 
     75 void sub_30001040(void) {
     76     int _fpu_cmp = 0;
     77     uint32_t _cf = 0;
     78     int _df = 1;
     79     uint32_t _flag_k = FK_NONE;
     80     uint32_t _flag_a = 0, _flag_b = 0;
     81     uint32_t _itail_tgt = 0;
     82     RECOMP_REGS_LOCALS
     83     RECOMP_ENTER(0x30001040u);
     84 
     85 L_30001040:
     86     PUSH32(esp, ebp); /* 0x30001040: push ebp */
     87     ebp = esp; /* 0x30001041: mov ebp, esp */
     88     PUSH32(esp, 0xFFFFFFFFu); /* 0x30001043: push -1 */
     89     PUSH32(esp, 0x3001842Bu); /* 0x30001045: push 0x3001842b */
     90     eax = MEM32(FS_BASE + (0)); /* 0x3000104A: mov eax, dword ptr fs:[0] */
     91     PUSH32(esp, eax); /* 0x30001050: push eax */
     92     MEM32(FS_BASE + (0)) = esp; /* 0x30001051: mov dword ptr fs:[0], esp */
     93     PUSH32(esp, ecx); /* 0x30001058: push ecx */
     94     PUSH32(esp, esi); /* 0x30001059: push esi */
     95     PUSH32(esp, edi); /* 0x3000105A: push edi */
     96     edi = MEM32(ebp + 0x8); /* 0x3000105B: mov edi, dword ptr [ebp + 8] */
     97     eax = MEM32(edi + 0x4); /* 0x3000105E: mov eax, dword ptr [edi + 4] */
     98     /* test eax, eax */ /* 0x30001061: test eax, eax */
     99     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
    100     _cf = 0;
    101     _flag_k = FK_TEST;
    102     esi = ecx; /* 0x30001063: mov esi, ecx */
    103     MEM32(ebp + (-0x10)) = esi; /* 0x30001065: mov dword ptr [ebp - 0x10], esi */
    104     if (TEST_Z(_flag_a, _flag_b)) goto L_30001159; /* 0x30001068: je 0x30001159 */
    105 L_3000106E:
    106     ecx = MEM32(edi + 0x8); /* 0x3000106E: mov ecx, dword ptr [edi + 8] */
    107     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
    108     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    109     ecx = ecx - eax; /* 0x30001071: sub ecx, eax */
    110     _flag_k = FK_CMP;
    111     eax = 0x66666667u; /* 0x30001073: mov eax, 0x66666667 */
    112     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30001078: imul ecx */
    113       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    114       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    115     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000107A: sar edx, 3 */
    116     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    117     edx = (uint32_t)((int32_t)edx >> 3u);
    118     eax = edx; /* 0x3000107D: mov eax, edx */
    119     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x3000107F: shr eax, 0x1f */
    120     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    121     eax = eax >> 31u; /* 0x3000107F: shr eax, 0x1f */
    122     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
    123     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    124     edx = edx + eax; /* 0x30001082: add edx, eax */
    125     _flag_k = FK_ADD;
    126     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_30001159; /* 0x30001084: je 0x30001159 */
    127 L_3000108A:
    128     ecx = MEM32(esi + 0x4); /* 0x3000108A: mov ecx, dword ptr [esi + 4] */
    129     /* test ecx, ecx */ /* 0x3000108D: test ecx, ecx */
    130     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
    131     _cf = 0;
    132     _flag_k = FK_TEST;
    133     if (TEST_Z(_flag_a, _flag_b)) goto L_3000109B; /* 0x3000108F: je 0x3000109b */
    134 L_30001091:
    135     edx = MEM32(ebp + 0xC); /* 0x30001091: mov edx, dword ptr [ebp + 0xc] */
    136     PUSH32(esp, edx); /* 0x30001094: push edx */
    137     PUSH32(esp, edi); /* 0x30001095: push edi */
    138     goto L_30001154; /* 0x30001096: jmp 0x30001154 */
    139 L_3000109B:
    140     eax = MEM32(ebp + 0xC); /* 0x3000109B: mov eax, dword ptr [ebp + 0xc] */
    141     /* cmp MEM32(ebp + 0x10), eax */ /* 0x3000109E: cmp dword ptr [ebp + 0x10], eax */
    142     _flag_a = (uint32_t)(MEM32(ebp + 0x10)); _flag_b = (uint32_t)(eax);
    143     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    144     _flag_k = FK_CMP;
    145     if (CMP_EQ(_flag_a, _flag_b)) goto L_300010AC; /* 0x300010A1: je 0x300010ac */
    146 L_300010A3:
    147     /* cmp eax, 2 */ /* 0x300010A3: cmp eax, 2 */
    148     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(2);
    149     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    150     _flag_k = FK_CMP;
    151     if (CMP_NE(_flag_a, _flag_b)) goto L_30001159; /* 0x300010A6: jne 0x30001159 */
    152 L_300010AC:
    153     PUSH32(esp, 0x34u); /* 0x300010AC: push 0x34 */
    154     RECOMP_ICALL(0x300180A8u); /* 0x300010AE: call 0x300180a8 */ /* not lifted */
    155     RECOMP_FLAGS_IN();
    156     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    157     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    158     esp = esp + 4; /* 0x300010B3: add esp, 4 */
    159     _flag_k = FK_ADD;
    160     MEM32(ebp + 0xC) = eax; /* 0x300010B6: mov dword ptr [ebp + 0xc], eax */
    161     /* test eax, eax */ /* 0x300010B9: test eax, eax */
    162     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
    163     _cf = 0;
    164     _flag_k = FK_TEST;
    165     MEM32(ebp + (-0x4)) = 0; /* 0x300010BB: mov dword ptr [ebp - 4], 0 */
    166     if (TEST_Z(_flag_a, _flag_b)) goto L_300010D4; /* 0x300010C2: je 0x300010d4 */
    167 L_300010C4:
    168     edx = MEM32(edi + 0x8); /* 0x300010C4: mov edx, dword ptr [edi + 8] */
    169     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0xFFFFFFECu);
    170     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    171     edx = edx + 0xFFFFFFECu; /* 0x300010C7: add edx, -0x14 */
    172     _flag_k = FK_ADD;
    173     PUSH32(esp, edx); /* 0x300010CA: push edx */
    174     ecx = eax; /* 0x300010CB: mov ecx, eax */
    175     RECOMP_ICALL(0x30001EE0u); /* 0x300010CD: call 0x30001ee0 */ /* not lifted */
    176     RECOMP_FLAGS_IN();
    177     goto L_300010D6; /* 0x300010D2: jmp 0x300010d6 */
    178 L_300010D4:
    179     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    180     eax = 0; /* 0x300010D4: xor eax, eax */
    181     _cf = 0;
    182     _flag_k = FK_TEST;
    183 L_300010D6:
    184     MEM32(esi + 0x4) = eax; /* 0x300010D6: mov dword ptr [esi + 4], eax */
    185     PUSH32(esp, ebx); /* 0x300010D9: push ebx */
    186     ebx = MEM32(edi + 0x8); /* 0x300010DA: mov ebx, dword ptr [edi + 8] */
    187     esi = ebx; /* 0x300010DD: lea esi, [ebx] */
    188     /* cmp esi, ebx */ /* 0x300010DF: cmp esi, ebx */
    189     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    190     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    191     _flag_k = FK_CMP;
    192     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x300010E1: mov dword ptr [ebp - 4], 0xffffffff */
    193     if (CMP_EQ(_flag_a, _flag_b)) goto L_30001109; /* 0x300010E8: je 0x30001109 */
    194 L_300010EA:
    195     eax = esi + (-0x14); /* 0x300010EA: lea eax, [esi - 0x14] */
    196     MEM32(ebp + 0xC) = eax; /* 0x300010ED: mov dword ptr [ebp + 0xc], eax */
    197 L_300010F0:
    198     ecx = MEM32(ebp + 0xC); /* 0x300010F0: mov ecx, dword ptr [ebp + 0xc] */
    199     PUSH32(esp, esi); /* 0x300010F3: push esi */
    200     RECOMP_ICALL(0x300080D0u); /* 0x300010F4: call 0x300080d0 */ /* not lifted */
    201     RECOMP_FLAGS_IN();
    202     ecx = MEM32(ebp + 0xC); /* 0x300010F9: mov ecx, dword ptr [ebp + 0xc] */
    203     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
    204     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    205     esi = esi + 0x14u; /* 0x300010FC: add esi, 0x14 */
    206     _flag_k = FK_ADD;
    207     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x14u);
    208     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    209     ecx = ecx + 0x14u; /* 0x300010FF: add ecx, 0x14 */
    210     _flag_k = FK_ADD;
    211     /* cmp esi, ebx */ /* 0x30001102: cmp esi, ebx */
    212     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    213     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    214     _flag_k = FK_CMP;
    215     MEM32(ebp + 0xC) = ecx; /* 0x30001104: mov dword ptr [ebp + 0xc], ecx */
    216     RECOMP_BACKEDGE();
    217     if (CMP_NE(_flag_a, _flag_b)) goto L_300010F0; /* 0x30001107: jne 0x300010f0 */
    218 L_30001109:
    219     ebx = MEM32(edi + 0x8); /* 0x30001109: mov ebx, dword ptr [edi + 8] */
    220     esi = ebx + (-0x14); /* 0x3000110C: lea esi, [ebx - 0x14] */
    221     /* cmp esi, ebx */ /* 0x3000110F: cmp esi, ebx */
    222     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    223     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    224     _flag_k = FK_CMP;
    225     if (CMP_EQ(_flag_a, _flag_b)) goto L_30001121; /* 0x30001111: je 0x30001121 */
    226 L_30001113:
    227     ecx = esi; /* 0x30001113: mov ecx, esi */
    228     RECOMP_ICALL(0x30007AB0u); /* 0x30001115: call 0x30007ab0 */ /* not lifted */
    229     RECOMP_FLAGS_IN();
    230     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
    231     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    232     esi = esi + 0x14u; /* 0x3000111A: add esi, 0x14 */
    233     _flag_k = FK_ADD;
    234     /* cmp esi, ebx */ /* 0x3000111D: cmp esi, ebx */
    235     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
    236     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    237     _flag_k = FK_CMP;
    238     RECOMP_BACKEDGE();
    239     if (CMP_NE(_flag_a, _flag_b)) goto L_30001113; /* 0x3000111F: jne 0x30001113 */
    240 L_30001121:
    241     esi = MEM32(edi + 0x8); /* 0x30001121: mov esi, dword ptr [edi + 8] */
    242     ecx = MEM32(edi + 0x4); /* 0x30001124: mov ecx, dword ptr [edi + 4] */
    243     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xFFFFFFECu);
    244     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    245     esi = esi + 0xFFFFFFECu; /* 0x30001127: add esi, -0x14 */
    246     _flag_k = FK_ADD;
    247     /* test ecx, ecx */ /* 0x3000112A: test ecx, ecx */
    248     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
    249     _cf = 0;
    250     _flag_k = FK_TEST;
    251     MEM32(edi + 0x8) = esi; /* 0x3000112C: mov dword ptr [edi + 8], esi */
    252     eax = esi; /* 0x3000112F: mov eax, esi */
    253     ebx = POP32_VAL(esp); /* 0x30001131: pop ebx */
    254     if (TEST_Z(_flag_a, _flag_b)) goto L_30001159; /* 0x30001132: je 0x30001159 */
    255 L_30001134:
    256     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
    257     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    258     eax = eax - ecx; /* 0x30001134: sub eax, ecx */
    259     _flag_k = FK_CMP;
    260     ecx = eax; /* 0x30001136: mov ecx, eax */
    261     eax = 0x66666667u; /* 0x30001138: mov eax, 0x66666667 */
    262     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x3000113D: imul ecx */
    263       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    264       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    265     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000113F: sar edx, 3 */
    266     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    267     edx = (uint32_t)((int32_t)edx >> 3u);
    268     ecx = edx; /* 0x30001142: mov ecx, edx */
    269     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30001144: shr ecx, 0x1f */
    270     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    271     ecx = ecx >> 31u; /* 0x30001144: shr ecx, 0x1f */
    272     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
    273     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    274     edx = edx + ecx; /* 0x30001147: add edx, ecx */
    275     _flag_k = FK_ADD;
    276     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_30001159; /* 0x30001149: je 0x30001159 */
    277 L_3000114B:
    278     edx = MEM32(ebp + (-0x10)); /* 0x3000114B: mov edx, dword ptr [ebp - 0x10] */
    279     ecx = MEM32(edx + 0x4); /* 0x3000114E: mov ecx, dword ptr [edx + 4] */
    280     PUSH32(esp, 2); /* 0x30001151: push 2 */
    281     PUSH32(esp, edi); /* 0x30001153: push edi */
    282 L_30001154:
    283     RECOMP_ICALL(0x300021D0u); /* 0x30001154: call 0x300021d0 */ /* not lifted */
    284     RECOMP_FLAGS_IN();
    285 L_30001159:
    286     ecx = MEM32(ebp + (-0xC)); /* 0x30001159: mov ecx, dword ptr [ebp - 0xc] */
    287     edi = POP32_VAL(esp); /* 0x3000115C: pop edi */
    288     esi = POP32_VAL(esp); /* 0x3000115D: pop esi */
    289     MEM32(FS_BASE + (0)) = ecx; /* 0x3000115E: mov dword ptr fs:[0], ecx */
    290     esp = ebp; /* 0x30001165: mov esp, ebp */
    291     ebp = POP32_VAL(esp); /* 0x30001167: pop ebp */
    292     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30001168: ret 0xc */
    293     RECOMP_REGS_OUT();
    294 }
    295 
    296 void sub_30001154(void) {
    297     int _fpu_cmp = 0;
    298     uint32_t _cf = 0;
    299     int _df = 1;
    300     uint32_t _flag_k = FK_NONE;
    301     uint32_t _flag_a = 0, _flag_b = 0;
    302     uint32_t _itail_tgt = 0;
    303     RECOMP_REGS_LOCALS
    304     RECOMP_ENTER(0x30001154u);
    305 
    306 L_30001154:
    307     RECOMP_ICALL(0x300021D0u); /* 0x30001154: call 0x300021d0 */ /* not lifted */
    308     RECOMP_FLAGS_IN();
    309     ecx = MEM32(ebp + (-0xC)); /* 0x30001159: mov ecx, dword ptr [ebp - 0xc] */
    310     edi = POP32_VAL(esp); /* 0x3000115C: pop edi */
    311     esi = POP32_VAL(esp); /* 0x3000115D: pop esi */
    312     MEM32(FS_BASE + (0)) = ecx; /* 0x3000115E: mov dword ptr fs:[0], ecx */
    313     esp = ebp; /* 0x30001165: mov esp, ebp */
    314     ebp = POP32_VAL(esp); /* 0x30001167: pop ebp */
    315     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30001168: ret 0xc */
    316     RECOMP_REGS_OUT();
    317 }
    318 
    319 void sub_30001170(void) {
    320     int _fpu_cmp = 0;
    321     uint32_t _cf = 0;
    322     int _df = 1;
    323     uint32_t _flag_k = FK_NONE;
    324     uint32_t _flag_a = 0, _flag_b = 0;
    325     uint32_t _itail_tgt = 0;
    326     RECOMP_REGS_LOCALS
    327     RECOMP_ENTER(0x30001170u);
    328 
    329 L_30001170:
    330     PUSH32(esp, ebp); /* 0x30001170: push ebp */
    331     ebp = esp; /* 0x30001171: mov ebp, esp */
    332     ecx = MEM32(ecx + 0x4); /* 0x30001173: mov ecx, dword ptr [ecx + 4] */
    333     /* test ecx, ecx */ /* 0x30001176: test ecx, ecx */
    334     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
    335     _cf = 0;
    336     _flag_k = FK_TEST;
    337     PUSH32(esp, ebx); /* 0x30001178: push ebx */
    338     PUSH32(esp, esi); /* 0x30001179: push esi */
    339     PUSH32(esp, edi); /* 0x3000117A: push edi */
    340     if (TEST_Z(_flag_a, _flag_b)) goto L_30001195; /* 0x3000117B: je 0x30001195 */
    341 L_3000117D:
    342     eax = MEM32(ebp + 0x10); /* 0x3000117D: mov eax, dword ptr [ebp + 0x10] */
    343     edx = MEM32(ebp + 0xC); /* 0x30001180: mov edx, dword ptr [ebp + 0xc] */
    344     PUSH32(esp, eax); /* 0x30001183: push eax */
    345     eax = MEM32(ebp + 0x8); /* 0x30001184: mov eax, dword ptr [ebp + 8] */
    346     PUSH32(esp, edx); /* 0x30001187: push edx */
    347     PUSH32(esp, eax); /* 0x30001188: push eax */
    348     RECOMP_ICALL(0x300024F0u); /* 0x30001189: call 0x300024f0 */ /* not lifted */
    349     RECOMP_FLAGS_IN();
    350     edi = POP32_VAL(esp); /* 0x3000118E: pop edi */
    351     esi = POP32_VAL(esp); /* 0x3000118F: pop esi */
    352     ebx = POP32_VAL(esp); /* 0x30001190: pop ebx */
    353     ebp = POP32_VAL(esp); /* 0x30001191: pop ebp */
    354     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x30001192: ret 0x10 */
    355 L_30001195:
    356     ecx = MEM32(ebp + 0x10); /* 0x30001195: mov ecx, dword ptr [ebp + 0x10] */
    357     /* cmp ecx, MEM32(ebp + 0x14) */ /* 0x30001198: cmp ecx, dword ptr [ebp + 0x14] */
    358     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(MEM32(ebp + 0x14));
    359     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    360     _flag_k = FK_CMP;
    361     if (CMP_NE(_flag_a, _flag_b)) goto L_30001391; /* 0x3000119B: jne 0x30001391 */
    362 L_300011A1:
    363     esi = MEM32(ebp + 0xC); /* 0x300011A1: mov esi, dword ptr [ebp + 0xc] */
    364     ecx = MEM32(esi + 0x8); /* 0x300011A4: mov ecx, dword ptr [esi + 8] */
    365     edx = MEM32(esi + 0xC); /* 0x300011A7: mov edx, dword ptr [esi + 0xc] */
    366     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
    367     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    368     edx = edx - ecx; /* 0x300011AA: sub edx, ecx */
    369     _flag_k = FK_CMP;
    370     eax = 0x66666667u; /* 0x300011AC: mov eax, 0x66666667 */
    371     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x300011B1: imul edx */
    372       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    373       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    374     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300011B3: sar edx, 3 */
    375     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    376     edx = (uint32_t)((int32_t)edx >> 3u);
    377     eax = edx; /* 0x300011B6: mov eax, edx */
    378     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x300011B8: shr eax, 0x1f */
    379     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    380     eax = eax >> 31u; /* 0x300011B8: shr eax, 0x1f */
    381     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
    382     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    383     edx = edx + eax; /* 0x300011BB: add edx, eax */
    384     _flag_k = FK_ADD;
    385     /* cmp edx, 1 */ /* 0x300011BD: cmp edx, 1 */
    386     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1);
    387     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    388     _flag_k = FK_CMP;
    389     edi = ecx; /* 0x300011C0: mov edi, ecx */
    390     if (CMP_AE(_flag_a, _flag_b)) goto L_300012E8; /* 0x300011C2: jae 0x300012e8 */
    391 L_300011C8:
    392     ebx = MEM32(esi + 0x4); /* 0x300011C8: mov ebx, dword ptr [esi + 4] */
    393     /* test ebx, ebx */ /* 0x300011CB: test ebx, ebx */
    394     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
    395     _cf = 0;
    396     _flag_k = FK_TEST;
    397     if (TEST_Z(_flag_a, _flag_b)) goto L_300011EC; /* 0x300011CD: je 0x300011ec */
    398 L_300011CF:
    399     edx = ecx; /* 0x300011CF: mov edx, ecx */
    400     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx);
    401     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    402     edx = edx - ebx; /* 0x300011D1: sub edx, ebx */
    403     _flag_k = FK_CMP;
    404     eax = 0x66666667u; /* 0x300011D3: mov eax, 0x66666667 */
    405     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x300011D8: imul edx */
    406       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    407       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    408     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300011DA: sar edx, 3 */
    409     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    410     edx = (uint32_t)((int32_t)edx >> 3u);
    411     eax = edx; /* 0x300011DD: mov eax, edx */
    412     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x300011DF: shr eax, 0x1f */
    413     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    414     eax = eax >> 31u; /* 0x300011DF: shr eax, 0x1f */
    415     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
    416     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    417     edx = edx + eax; /* 0x300011E2: add edx, eax */
    418     _flag_k = FK_ADD;
    419     /* cmp edx, 1 */ /* 0x300011E4: cmp edx, 1 */
    420     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1);
    421     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    422     _flag_k = FK_CMP;
    423     MEM32(ebp + 0x10) = edx; /* 0x300011E7: mov dword ptr [ebp + 0x10], edx */
    424     if (CMP_A(_flag_a, _flag_b)) goto L_300011F3; /* 0x300011EA: ja 0x300011f3 */
    425 L_300011EC:
    426     MEM32(ebp + 0x10) = 1; /* 0x300011EC: mov dword ptr [ebp + 0x10], 1 */
    427 L_300011F3:
    428     /* test ebx, ebx */ /* 0x300011F3: test ebx, ebx */
    429     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
    430     _cf = 0;
    431     _flag_k = FK_TEST;
    432     if (TEST_NZ(_flag_a, _flag_b)) goto L_300011FB; /* 0x300011F5: jne 0x300011fb */
    433 L_300011F7:
    434     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    435     edx = 0; /* 0x300011F7: xor edx, edx */
    436     _cf = 0;
    437     _flag_k = FK_TEST;
    438     goto L_3000120E; /* 0x300011F9: jmp 0x3000120e */
    439 L_300011FB:
    440     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
    441     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    442     ecx = ecx - ebx; /* 0x300011FB: sub ecx, ebx */
    443     _flag_k = FK_CMP;
    444     eax = 0x66666667u; /* 0x300011FD: mov eax, 0x66666667 */
    445     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30001202: imul ecx */
    446       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    447       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    448     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001204: sar edx, 3 */
    449     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    450     edx = (uint32_t)((int32_t)edx >> 3u);
    451     ecx = edx; /* 0x30001207: mov ecx, edx */
    452     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30001209: shr ecx, 0x1f */
    453     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    454     ecx = ecx >> 31u; /* 0x30001209: shr ecx, 0x1f */
    455     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
    456     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    457     edx = edx + ecx; /* 0x3000120C: add edx, ecx */
    458     _flag_k = FK_ADD;
    459 L_3000120E:
    460     eax = MEM32(ebp + 0x10); /* 0x3000120E: mov eax, dword ptr [ebp + 0x10] */
    461     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
    462     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    463     eax = eax + edx; /* 0x30001211: add eax, edx */
    464     _flag_k = FK_ADD;
    465     /* test eax, eax */ /* 0x30001213: test eax, eax */
    466     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
    467     _cf = 0;
    468     _flag_k = FK_TEST;
    469     MEM32(ebp + 0xC) = eax; /* 0x30001215: mov dword ptr [ebp + 0xc], eax */
    470     if (TEST_NS(_flag_a, _flag_b)) goto L_3000121C; /* 0x30001218: jge 0x3000121c */
    471 L_3000121A:
    472     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    473     eax = 0; /* 0x3000121A: xor eax, eax */
    474     _cf = 0;
    475     _flag_k = FK_TEST;
    476 L_3000121C:
    477     ecx = eax + eax * 4; /* 0x3000121C: lea ecx, [eax + eax*4] */
    478     if (2u) _cf = (((ecx) >> 30) & 1u); /* 0x3000121F: shl ecx, 2 */
    479     if (2u) { _flag_a = recomp_flags_pack((ecx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    480     ecx = ecx << 2u; /* 0x3000121F: shl ecx, 2 */
    481     PUSH32(esp, ecx); /* 0x30001222: push ecx */
    482     RECOMP_ICALL(0x300180A8u); /* 0x30001223: call 0x300180a8 */ /* not lifted */
    483     RECOMP_FLAGS_IN();
    484     MEM32(ebp + 0x14) = eax; /* 0x30001228: mov dword ptr [ebp + 0x14], eax */
    485     ebx = eax; /* 0x3000122B: mov ebx, eax */
    486     eax = MEM32(esi + 0x4); /* 0x3000122D: mov eax, dword ptr [esi + 4] */
    487     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    488     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    489     esp = esp + 4; /* 0x30001230: add esp, 4 */
    490     _flag_k = FK_ADD;
    491     /* cmp eax, edi */ /* 0x30001233: cmp eax, edi */
    492     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
    493     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    494     _flag_k = FK_CMP;
    495     MEM32(ebp + 0x10) = eax; /* 0x30001235: mov dword ptr [ebp + 0x10], eax */
    496     if (CMP_EQ(_flag_a, _flag_b)) goto L_30001259; /* 0x30001238: je 0x30001259 */
    497 L_3000123A:
    498     goto L_3000123F; /* 0x3000123A: jmp 0x3000123f */
    499 L_3000123C:
    500     eax = MEM32(ebp + 0x10); /* 0x3000123C: mov eax, dword ptr [ebp + 0x10] */
    501 L_3000123F:
    502     PUSH32(esp, eax); /* 0x3000123F: push eax */
    503     PUSH32(esp, ebx); /* 0x30001240: push ebx */
    504     RECOMP_ICALL(0x30001DF0u); /* 0x30001241: call 0x30001df0 */ /* not lifted */
    505     RECOMP_FLAGS_IN();
    506     eax = MEM32(ebp + 0x10); /* 0x30001246: mov eax, dword ptr [ebp + 0x10] */
    507     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x14u);
    508     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    509     eax = eax + 0x14u; /* 0x30001249: add eax, 0x14 */
    510     _flag_k = FK_ADD;
    511     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
    512     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    513     esp = esp + 8; /* 0x3000124C: add esp, 8 */
    514     _flag_k = FK_ADD;
    515     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x14u);
    516     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    517     ebx = ebx + 0x14u; /* 0x3000124F: add ebx, 0x14 */
    518     _flag_k = FK_ADD;
    519     /* cmp eax, edi */ /* 0x30001252: cmp eax, edi */
    520     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
    521     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    522     _flag_k = FK_CMP;
    523     MEM32(ebp + 0x10) = eax; /* 0x30001254: mov dword ptr [ebp + 0x10], eax */
    524     RECOMP_BACKEDGE();
    525     if (CMP_NE(_flag_a, _flag_b)) goto L_3000123C; /* 0x30001257: jne 0x3000123c */
    526 L_30001259:
    527     edx = MEM32(ebp + 0x8); /* 0x30001259: mov edx, dword ptr [ebp + 8] */
    528     PUSH32(esp, edx); /* 0x3000125C: push edx */
    529     PUSH32(esp, 1); /* 0x3000125D: push 1 */
    530     PUSH32(esp, ebx); /* 0x3000125F: push ebx */
    531     ecx = esi; /* 0x30001260: mov ecx, esi */
    532     RECOMP_ICALL(0x30001860u); /* 0x30001262: call 0x30001860 */ /* not lifted */
    533     RECOMP_FLAGS_IN();
    534     eax = MEM32(esi + 0x8); /* 0x30001267: mov eax, dword ptr [esi + 8] */
    535     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x14u);
    536     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    537     ebx = ebx + 0x14u; /* 0x3000126A: add ebx, 0x14 */
    538     _flag_k = FK_ADD;
    539     PUSH32(esp, ebx); /* 0x3000126D: push ebx */
    540     PUSH32(esp, eax); /* 0x3000126E: push eax */
    541     PUSH32(esp, edi); /* 0x3000126F: push edi */
    542     ecx = esi; /* 0x30001270: mov ecx, esi */
    543     RECOMP_ICALL(0x300017D0u); /* 0x30001272: call 0x300017d0 */ /* not lifted */
    544     RECOMP_FLAGS_IN();
    545     ecx = MEM32(esi + 0x8); /* 0x30001277: mov ecx, dword ptr [esi + 8] */
    546     edx = MEM32(esi + 0x4); /* 0x3000127A: mov edx, dword ptr [esi + 4] */
    547     PUSH32(esp, ecx); /* 0x3000127D: push ecx */
    548     PUSH32(esp, edx); /* 0x3000127E: push edx */
    549     ecx = esi; /* 0x3000127F: mov ecx, esi */
    550     RECOMP_ICALL(0x300017A0u); /* 0x30001281: call 0x300017a0 */ /* not lifted */
    551     RECOMP_FLAGS_IN();
    552     eax = MEM32(esi + 0x4); /* 0x30001286: mov eax, dword ptr [esi + 4] */
    553     PUSH32(esp, eax); /* 0x30001289: push eax */
    554     RECOMP_ICALL(0x30018080u); /* 0x3000128A: call 0x30018080 */ /* not lifted */
    555     RECOMP_FLAGS_IN();
    556     eax = MEM32(ebp + 0xC); /* 0x3000128F: mov eax, dword ptr [ebp + 0xc] */
    557     edi = MEM32(ebp + 0x14); /* 0x30001292: mov edi, dword ptr [ebp + 0x14] */
    558     ecx = eax + eax * 4; /* 0x30001295: lea ecx, [eax + eax*4] */
    559     eax = MEM32(esi + 0x4); /* 0x30001298: mov eax, dword ptr [esi + 4] */
    560     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    561     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    562     esp = esp + 4; /* 0x3000129B: add esp, 4 */
    563     _flag_k = FK_ADD;
    564     /* test eax, eax */ /* 0x3000129E: test eax, eax */
    565     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
    566     _cf = 0;
    567     _flag_k = FK_TEST;
    568     edx = edi + ecx * 4; /* 0x300012A0: lea edx, [edi + ecx*4] */
    569     MEM32(esi + 0xC) = edx; /* 0x300012A3: mov dword ptr [esi + 0xc], edx */
    570     if (TEST_NZ(_flag_a, _flag_b)) goto L_300012BE; /* 0x300012A6: jne 0x300012be */
    571 L_300012A8:
    572     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    573     edx = 0; /* 0x300012A8: xor edx, edx */
    574     _cf = 0;
    575     _flag_k = FK_TEST;
    576     ecx = edx + edx * 4 + 0x5; /* 0x300012AA: lea ecx, [edx + edx*4 + 5] */
    577     edx = edi + ecx * 4; /* 0x300012AE: lea edx, [edi + ecx*4] */
    578     MEM32(esi + 0x4) = edi; /* 0x300012B1: mov dword ptr [esi + 4], edi */
    579     edi = POP32_VAL(esp); /* 0x300012B4: pop edi */
    580     MEM32(esi + 0x8) = edx; /* 0x300012B5: mov dword ptr [esi + 8], edx */
    581     esi = POP32_VAL(esp); /* 0x300012B8: pop esi */
    582     ebx = POP32_VAL(esp); /* 0x300012B9: pop ebx */
    583     ebp = POP32_VAL(esp); /* 0x300012BA: pop ebp */
    584     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x300012BB: ret 0x10 */
    585 L_300012BE:
    586     ecx = MEM32(esi + 0x8); /* 0x300012BE: mov ecx, dword ptr [esi + 8] */
    587     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
    588     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    589     ecx = ecx - eax; /* 0x300012C1: sub ecx, eax */
    590     _flag_k = FK_CMP;
    591     eax = 0x66666667u; /* 0x300012C3: mov eax, 0x66666667 */
    592     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x300012C8: imul ecx */
    593       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    594       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    595     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300012CA: sar edx, 3 */
    596     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    597     edx = (uint32_t)((int32_t)edx >> 3u);
    598     eax = edx; /* 0x300012CD: mov eax, edx */
    599     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x300012CF: shr eax, 0x1f */
    600     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    601     eax = eax >> 31u; /* 0x300012CF: shr eax, 0x1f */
    602     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
    603     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    604     edx = edx + eax; /* 0x300012D2: add edx, eax */
    605     _flag_k = FK_ADD;
    606     ecx = edx + edx * 4 + 0x5; /* 0x300012D4: lea ecx, [edx + edx*4 + 5] */
    607     edx = edi + ecx * 4; /* 0x300012D8: lea edx, [edi + ecx*4] */
    608     MEM32(esi + 0x4) = edi; /* 0x300012DB: mov dword ptr [esi + 4], edi */
    609     edi = POP32_VAL(esp); /* 0x300012DE: pop edi */
    610     MEM32(esi + 0x8) = edx; /* 0x300012DF: mov dword ptr [esi + 8], edx */
    611     esi = POP32_VAL(esp); /* 0x300012E2: pop esi */
    612     ebx = POP32_VAL(esp); /* 0x300012E3: pop ebx */
    613     ebp = POP32_VAL(esp); /* 0x300012E4: pop ebp */
    614     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x300012E5: ret 0x10 */
    615 L_300012E8:
    616     edx = ecx; /* 0x300012E8: mov edx, ecx */
    617     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi);
    618     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    619     edx = edx - edi; /* 0x300012EA: sub edx, edi */
    620     _flag_k = FK_CMP;
    621     eax = 0x66666667u; /* 0x300012EC: mov eax, 0x66666667 */
    622     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x300012F1: imul edx */
    623       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    624       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    625     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300012F3: sar edx, 3 */
    626     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    627     edx = (uint32_t)((int32_t)edx >> 3u);
    628     eax = edx; /* 0x300012F6: mov eax, edx */
    629     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x300012F8: shr eax, 0x1f */
    630     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    631     eax = eax >> 31u; /* 0x300012F8: shr eax, 0x1f */
    632     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
    633     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    634     edx = edx + eax; /* 0x300012FB: add edx, eax */
    635     _flag_k = FK_ADD;
    636     /* cmp edx, 1 */ /* 0x300012FD: cmp edx, 1 */
    637     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1);
    638     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    639     _flag_k = FK_CMP;
    640     if (CMP_AE(_flag_a, _flag_b)) goto L_3000135C; /* 0x30001300: jae 0x3000135c */
    641 L_30001302:
    642     edx = edi + 0x14; /* 0x30001302: lea edx, [edi + 0x14] */
    643     PUSH32(esp, edx); /* 0x30001305: push edx */
    644     PUSH32(esp, ecx); /* 0x30001306: push ecx */
    645     PUSH32(esp, edi); /* 0x30001307: push edi */
    646     ecx = esi; /* 0x30001308: mov ecx, esi */
    647     RECOMP_ICALL(0x300017D0u); /* 0x3000130A: call 0x300017d0 */ /* not lifted */
    648     RECOMP_FLAGS_IN();
    649     ebx = MEM32(esi + 0x8); /* 0x3000130F: mov ebx, dword ptr [esi + 8] */
    650     eax = MEM32(ebp + 0x8); /* 0x30001312: mov eax, dword ptr [ebp + 8] */
    651     PUSH32(esp, eax); /* 0x30001315: push eax */
    652     ecx = ebx; /* 0x30001316: mov ecx, ebx */
    653     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
    654     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    655     ecx = ecx - edi; /* 0x30001318: sub ecx, edi */
    656     _flag_k = FK_CMP;
    657     eax = 0x66666667u; /* 0x3000131A: mov eax, 0x66666667 */
    658     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x3000131F: imul ecx */
    659       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    660       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    661     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001321: sar edx, 3 */
    662     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    663     edx = (uint32_t)((int32_t)edx >> 3u);
    664     ecx = edx; /* 0x30001324: mov ecx, edx */
    665     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30001326: shr ecx, 0x1f */
    666     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    667     ecx = ecx >> 31u; /* 0x30001326: shr ecx, 0x1f */
    668     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
    669     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    670     edx = edx + ecx; /* 0x30001329: add edx, ecx */
    671     _flag_k = FK_ADD;
    672     eax = 1; /* 0x3000132B: mov eax, 1 */
    673     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
    674     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    675     eax = eax - edx; /* 0x30001330: sub eax, edx */
    676     _flag_k = FK_CMP;
    677     PUSH32(esp, eax); /* 0x30001332: push eax */
    678     PUSH32(esp, ebx); /* 0x30001333: push ebx */
    679     ecx = esi; /* 0x30001334: mov ecx, esi */
    680     RECOMP_ICALL(0x30001860u); /* 0x30001336: call 0x30001860 */ /* not lifted */
    681     RECOMP_FLAGS_IN();
    682     ecx = MEM32(ebp + 0x8); /* 0x3000133B: mov ecx, dword ptr [ebp + 8] */
    683     edx = MEM32(esi + 0x8); /* 0x3000133E: mov edx, dword ptr [esi + 8] */
    684     PUSH32(esp, ecx); /* 0x30001341: push ecx */
    685     PUSH32(esp, edx); /* 0x30001342: push edx */
    686     PUSH32(esp, edi); /* 0x30001343: push edi */
    687     RECOMP_ICALL(0x30001DC0u); /* 0x30001344: call 0x30001dc0 */ /* not lifted */
    688     RECOMP_FLAGS_IN();
    689     eax = MEM32(esi + 0x8); /* 0x30001349: mov eax, dword ptr [esi + 8] */
    690     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
    691     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    692     esp = esp + 0xCu; /* 0x3000134C: add esp, 0xc */
    693     _flag_k = FK_ADD;
    694     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x14u);
    695     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    696     eax = eax + 0x14u; /* 0x3000134F: add eax, 0x14 */
    697     _flag_k = FK_ADD;
    698     edi = POP32_VAL(esp); /* 0x30001352: pop edi */
    699     MEM32(esi + 0x8) = eax; /* 0x30001353: mov dword ptr [esi + 8], eax */
    700     esi = POP32_VAL(esp); /* 0x30001356: pop esi */
    701     ebx = POP32_VAL(esp); /* 0x30001357: pop ebx */
    702     ebp = POP32_VAL(esp); /* 0x30001358: pop ebp */
    703     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x30001359: ret 0x10 */
    704 L_3000135C:
    705     PUSH32(esp, ecx); /* 0x3000135C: push ecx */
    706     PUSH32(esp, ecx); /* 0x3000135D: push ecx */
    707     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFFFFFFECu);
    708     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    709     ecx = ecx + 0xFFFFFFECu; /* 0x3000135E: add ecx, -0x14 */
    710     _flag_k = FK_ADD;
    711     PUSH32(esp, ecx); /* 0x30001361: push ecx */
    712     ecx = esi; /* 0x30001362: mov ecx, esi */
    713     RECOMP_ICALL(0x300017D0u); /* 0x30001364: call 0x300017d0 */ /* not lifted */
    714     RECOMP_FLAGS_IN();
    715     eax = MEM32(esi + 0x8); /* 0x30001369: mov eax, dword ptr [esi + 8] */
    716     PUSH32(esp, eax); /* 0x3000136C: push eax */
    717     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
    718     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    719     eax = eax + 0xFFFFFFECu; /* 0x3000136D: add eax, -0x14 */
    720     _flag_k = FK_ADD;
    721     PUSH32(esp, eax); /* 0x30001370: push eax */
    722     PUSH32(esp, edi); /* 0x30001371: push edi */
    723     RECOMP_ICALL(0x30001D80u); /* 0x30001372: call 0x30001d80 */ /* not lifted */
    724     RECOMP_FLAGS_IN();
    725     eax = MEM32(ebp + 0x8); /* 0x30001377: mov eax, dword ptr [ebp + 8] */
    726     PUSH32(esp, eax); /* 0x3000137A: push eax */
    727     ecx = edi + 0x14; /* 0x3000137B: lea ecx, [edi + 0x14] */
    728     PUSH32(esp, ecx); /* 0x3000137E: push ecx */
    729     PUSH32(esp, edi); /* 0x3000137F: push edi */
    730     RECOMP_ICALL(0x30001DC0u); /* 0x30001380: call 0x30001dc0 */ /* not lifted */
    731     RECOMP_FLAGS_IN();
    732     eax = MEM32(esi + 0x8); /* 0x30001385: mov eax, dword ptr [esi + 8] */
    733     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u);
    734     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    735     esp = esp + 0x18u; /* 0x30001388: add esp, 0x18 */
    736     _flag_k = FK_ADD;
    737     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x14u);
    738     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    739     eax = eax + 0x14u; /* 0x3000138B: add eax, 0x14 */
    740     _flag_k = FK_ADD;
    741     MEM32(esi + 0x8) = eax; /* 0x3000138E: mov dword ptr [esi + 8], eax */
    742 L_30001391:
    743     edi = POP32_VAL(esp); /* 0x30001391: pop edi */
    744     esi = POP32_VAL(esp); /* 0x30001392: pop esi */
    745     ebx = POP32_VAL(esp); /* 0x30001393: pop ebx */
    746     ebp = POP32_VAL(esp); /* 0x30001394: pop ebp */
    747     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x30001395: ret 0x10 */
    748     RECOMP_REGS_OUT();
    749 }
    750 
    751 void sub_300013A0(void) {
    752     int _fpu_cmp = 0;
    753     uint32_t _cf = 0;
    754     int _df = 1;
    755     uint32_t _flag_k = FK_NONE;
    756     uint32_t _flag_a = 0, _flag_b = 0;
    757     uint32_t _itail_tgt = 0;
    758     RECOMP_REGS_LOCALS
    759     RECOMP_ENTER(0x300013A0u);
    760 
    761 L_300013A0:
    762     PUSH32(esp, ebp); /* 0x300013A0: push ebp */
    763     ebp = esp; /* 0x300013A1: mov ebp, esp */
    764     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
    765     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    766     esp = esp - 8; /* 0x300013A3: sub esp, 8 */
    767     _flag_k = FK_CMP;
    768     PUSH32(esp, ebx); /* 0x300013A6: push ebx */
    769     PUSH32(esp, esi); /* 0x300013A7: push esi */
    770     esi = MEM32(ebp + 0x8); /* 0x300013A8: mov esi, dword ptr [ebp + 8] */
    771     PUSH32(esp, edi); /* 0x300013AB: push edi */
    772     edi = ecx; /* 0x300013AC: mov edi, ecx */
    773     ecx = MEM32(esi + 0x4); /* 0x300013AE: mov ecx, dword ptr [esi + 4] */
    774     /* test ecx, ecx */ /* 0x300013B1: test ecx, ecx */
    775     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
    776     _cf = 0;
    777     _flag_k = FK_TEST;
    778     MEM32(ebp + (-0x4)) = ecx; /* 0x300013B3: mov dword ptr [ebp - 4], ecx */
    779     if (TEST_Z(_flag_a, _flag_b)) goto L_30001699; /* 0x300013B6: je 0x30001699 */
    780 L_300013BC:
    781     edx = MEM32(esi + 0x8); /* 0x300013BC: mov edx, dword ptr [esi + 8] */
    782     MEM32(ebp + 0x8) = edx; /* 0x300013BF: mov dword ptr [ebp + 8], edx */
    783     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
    784     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    785     edx = edx - ecx; /* 0x300013C2: sub edx, ecx */
    786     _flag_k = FK_CMP;
    787     eax = 0x66666667u; /* 0x300013C4: mov eax, 0x66666667 */
    788     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x300013C9: imul edx */
    789       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    790       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    791     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300013CB: sar edx, 3 */
    792     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    793     edx = (uint32_t)((int32_t)edx >> 3u);
    794     eax = edx; /* 0x300013CE: mov eax, edx */
    795     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x300013D0: shr eax, 0x1f */
    796     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    797     eax = eax >> 31u; /* 0x300013D0: shr eax, 0x1f */
    798     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
    799     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    800     edx = edx + eax; /* 0x300013D3: add edx, eax */
    801     _flag_k = FK_ADD;
    802     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_30001699; /* 0x300013D5: je 0x30001699 */
    803 L_300013DB:
    804     eax = MEM32(edi + 0x4); /* 0x300013DB: mov eax, dword ptr [edi + 4] */
    805     /* test eax, eax */ /* 0x300013DE: test eax, eax */
    806     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
    807     _cf = 0;
    808     _flag_k = FK_TEST;
    809     if (TEST_Z(_flag_a, _flag_b)) goto L_300013FB; /* 0x300013E0: je 0x300013fb */
    810 L_300013E2:
    811     ecx = MEM32(ebp + 0x10); /* 0x300013E2: mov ecx, dword ptr [ebp + 0x10] */
    812     edx = MEM32(ebp + 0xC); /* 0x300013E5: mov edx, dword ptr [ebp + 0xc] */
    813     PUSH32(esp, ecx); /* 0x300013E8: push ecx */
    814     PUSH32(esp, edx); /* 0x300013E9: push edx */
    815     PUSH32(esp, esi); /* 0x300013EA: push esi */
    816     ecx = eax; /* 0x300013EB: mov ecx, eax */
    817     RECOMP_ICALL(0x30002600u); /* 0x300013ED: call 0x30002600 */ /* not lifted */
    818     RECOMP_FLAGS_IN();
    819     edi = POP32_VAL(esp); /* 0x300013F2: pop edi */
    820     esi = POP32_VAL(esp); /* 0x300013F3: pop esi */
    821     ebx = POP32_VAL(esp); /* 0x300013F4: pop ebx */
    822     esp = ebp; /* 0x300013F5: mov esp, ebp */
    823     ebp = POP32_VAL(esp); /* 0x300013F7: pop ebp */
    824     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x300013F8: ret 0x10 */
    825 L_300013FB:
    826     eax = MEM32(ebp + 0x10); /* 0x300013FB: mov eax, dword ptr [ebp + 0x10] */
    827     /* cmp eax, MEM32(ebp + 0x14) */ /* 0x300013FE: cmp eax, dword ptr [ebp + 0x14] */
    828     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + 0x14));
    829     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    830     _flag_k = FK_CMP;
    831     if (CMP_NE(_flag_a, _flag_b)) goto L_30001699; /* 0x30001401: jne 0x30001699 */
    832 L_30001407:
    833     edx = MEM32(ebp + 0x8); /* 0x30001407: mov edx, dword ptr [ebp + 8] */
    834     esi = MEM32(ebp + 0xC); /* 0x3000140A: mov esi, dword ptr [ebp + 0xc] */
    835     edi = MEM32(esi + 0x8); /* 0x3000140D: mov edi, dword ptr [esi + 8] */
    836     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
    837     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    838     edx = edx - ecx; /* 0x30001410: sub edx, ecx */
    839     _flag_k = FK_CMP;
    840     eax = 0x66666667u; /* 0x30001412: mov eax, 0x66666667 */
    841     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x30001417: imul edx */
    842       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    843       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    844     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001419: sar edx, 3 */
    845     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    846     edx = (uint32_t)((int32_t)edx >> 3u);
    847     ecx = edx; /* 0x3000141C: mov ecx, edx */
    848     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x3000141E: shr ecx, 0x1f */
    849     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    850     ecx = ecx >> 31u; /* 0x3000141E: shr ecx, 0x1f */
    851     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
    852     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    853     edx = edx + ecx; /* 0x30001421: add edx, ecx */
    854     _flag_k = FK_ADD;
    855     ecx = edx; /* 0x30001423: mov ecx, edx */
    856     edx = MEM32(esi + 0xC); /* 0x30001425: mov edx, dword ptr [esi + 0xc] */
    857     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi);
    858     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    859     edx = edx - edi; /* 0x30001428: sub edx, edi */
    860     _flag_k = FK_CMP;
    861     eax = 0x66666667u; /* 0x3000142A: mov eax, 0x66666667 */
    862     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x3000142F: imul edx */
    863       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    864       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    865     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001431: sar edx, 3 */
    866     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    867     edx = (uint32_t)((int32_t)edx >> 3u);
    868     eax = edx; /* 0x30001434: mov eax, edx */
    869     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30001436: shr eax, 0x1f */
    870     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    871     eax = eax >> 31u; /* 0x30001436: shr eax, 0x1f */
    872     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
    873     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    874     edx = edx + eax; /* 0x30001439: add edx, eax */
    875     _flag_k = FK_ADD;
    876     /* cmp edx, ecx */ /* 0x3000143B: cmp edx, ecx */
    877     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
    878     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    879     _flag_k = FK_CMP;
    880     ebx = edi; /* 0x3000143D: mov ebx, edi */
    881     MEM32(ebp + (-0x8)) = ecx; /* 0x3000143F: mov dword ptr [ebp - 8], ecx */
    882     if (CMP_AE(_flag_a, _flag_b)) goto L_30001593; /* 0x30001442: jae 0x30001593 */
    883 L_30001448:
    884     eax = MEM32(esi + 0x4); /* 0x30001448: mov eax, dword ptr [esi + 4] */
    885     /* test eax, eax */ /* 0x3000144B: test eax, eax */
    886     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
    887     _cf = 0;
    888     _flag_k = FK_TEST;
    889     if (TEST_Z(_flag_a, _flag_b)) goto L_3000146A; /* 0x3000144D: je 0x3000146a */
    890 L_3000144F:
    891     edx = edi; /* 0x3000144F: mov edx, edi */
    892     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
    893     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    894     edx = edx - eax; /* 0x30001451: sub edx, eax */
    895     _flag_k = FK_CMP;
    896     eax = 0x66666667u; /* 0x30001453: mov eax, 0x66666667 */
    897     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x30001458: imul edx */
    898       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    899       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    900     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000145A: sar edx, 3 */
    901     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    902     edx = (uint32_t)((int32_t)edx >> 3u);
    903     eax = edx; /* 0x3000145D: mov eax, edx */
    904     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x3000145F: shr eax, 0x1f */
    905     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    906     eax = eax >> 31u; /* 0x3000145F: shr eax, 0x1f */
    907     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
    908     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    909     edx = edx + eax; /* 0x30001462: add edx, eax */
    910     _flag_k = FK_ADD;
    911     /* cmp ecx, edx */ /* 0x30001464: cmp ecx, edx */
    912     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
    913     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    914     _flag_k = FK_CMP;
    915     if (CMP_AE(_flag_a, _flag_b)) goto L_3000146A; /* 0x30001466: jae 0x3000146a */
    916 L_30001468:
    917     ecx = edx; /* 0x30001468: mov ecx, edx */
    918 L_3000146A:
    919     eax = MEM32(esi + 0x4); /* 0x3000146A: mov eax, dword ptr [esi + 4] */
    920     /* test eax, eax */ /* 0x3000146D: test eax, eax */
    921     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
    922     _cf = 0;
    923     _flag_k = FK_TEST;
    924     if (TEST_NZ(_flag_a, _flag_b)) goto L_30001475; /* 0x3000146F: jne 0x30001475 */
    925 L_30001471:
    926     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    927     edx = 0; /* 0x30001471: xor edx, edx */
    928     _cf = 0;
    929     _flag_k = FK_TEST;
    930     goto L_30001488; /* 0x30001473: jmp 0x30001488 */
    931 L_30001475:
    932     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
    933     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    934     edi = edi - eax; /* 0x30001475: sub edi, eax */
    935     _flag_k = FK_CMP;
    936     eax = 0x66666667u; /* 0x30001477: mov eax, 0x66666667 */
    937     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edi); /* 0x3000147C: imul edi */
    938       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
    939       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
    940     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000147E: sar edx, 3 */
    941     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    942     edx = (uint32_t)((int32_t)edx >> 3u);
    943     eax = edx; /* 0x30001481: mov eax, edx */
    944     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30001483: shr eax, 0x1f */
    945     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    946     eax = eax >> 31u; /* 0x30001483: shr eax, 0x1f */
    947     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
    948     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    949     edx = edx + eax; /* 0x30001486: add edx, eax */
    950     _flag_k = FK_ADD;
    951 L_30001488:
    952     eax = edx + ecx; /* 0x30001488: lea eax, [edx + ecx] */
    953     /* test eax, eax */ /* 0x3000148B: test eax, eax */
    954     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
    955     _cf = 0;
    956     _flag_k = FK_TEST;
    957     MEM32(ebp + 0xC) = eax; /* 0x3000148D: mov dword ptr [ebp + 0xc], eax */
    958     if (TEST_NS(_flag_a, _flag_b)) goto L_30001494; /* 0x30001490: jge 0x30001494 */
    959 L_30001492:
    960     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    961     eax = 0; /* 0x30001492: xor eax, eax */
    962     _cf = 0;
    963     _flag_k = FK_TEST;
    964 L_30001494:
    965     ecx = eax + eax * 4; /* 0x30001494: lea ecx, [eax + eax*4] */
    966     if (2u) _cf = (((ecx) >> 30) & 1u); /* 0x30001497: shl ecx, 2 */
    967     if (2u) { _flag_a = recomp_flags_pack((ecx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
    968     ecx = ecx << 2u; /* 0x30001497: shl ecx, 2 */
    969     PUSH32(esp, ecx); /* 0x3000149A: push ecx */
    970     RECOMP_ICALL(0x300180A8u); /* 0x3000149B: call 0x300180a8 */ /* not lifted */
    971     RECOMP_FLAGS_IN();
    972     edi = MEM32(esi + 0x4); /* 0x300014A0: mov edi, dword ptr [esi + 4] */
    973     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    974     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    975     esp = esp + 4; /* 0x300014A3: add esp, 4 */
    976     _flag_k = FK_ADD;
    977     /* cmp edi, ebx */ /* 0x300014A6: cmp edi, ebx */
    978     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
    979     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    980     _flag_k = FK_CMP;
    981     MEM32(ebp + 0x14) = eax; /* 0x300014A8: mov dword ptr [ebp + 0x14], eax */
    982     MEM32(ebp + 0x10) = eax; /* 0x300014AB: mov dword ptr [ebp + 0x10], eax */
    983     if (CMP_EQ(_flag_a, _flag_b)) goto L_300014CD; /* 0x300014AE: je 0x300014cd */
    984 L_300014B0:
    985     edx = MEM32(ebp + 0x10); /* 0x300014B0: mov edx, dword ptr [ebp + 0x10] */
    986     PUSH32(esp, edi); /* 0x300014B3: push edi */
    987     PUSH32(esp, edx); /* 0x300014B4: push edx */
    988     RECOMP_ICALL(0x30001DF0u); /* 0x300014B5: call 0x30001df0 */ /* not lifted */
    989     RECOMP_FLAGS_IN();
    990     edx = MEM32(ebp + 0x10); /* 0x300014BA: mov edx, dword ptr [ebp + 0x10] */
    991     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x14u);
    992     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    993     edx = edx + 0x14u; /* 0x300014BD: add edx, 0x14 */
    994     _flag_k = FK_ADD;
    995     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
    996     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    997     edi = edi + 0x14u; /* 0x300014C0: add edi, 0x14 */
    998     _flag_k = FK_ADD;
    999     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1000     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1001     esp = esp + 8; /* 0x300014C3: add esp, 8 */
   1002     _flag_k = FK_ADD;
   1003     /* cmp edi, ebx */ /* 0x300014C6: cmp edi, ebx */
   1004     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   1005     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1006     _flag_k = FK_CMP;
   1007     MEM32(ebp + 0x10) = edx; /* 0x300014C8: mov dword ptr [ebp + 0x10], edx */
   1008     RECOMP_BACKEDGE();
   1009     if (CMP_NE(_flag_a, _flag_b)) goto L_300014B0; /* 0x300014CB: jne 0x300014b0 */
   1010 L_300014CD:
   1011     eax = MEM32(ebp + 0x10); /* 0x300014CD: mov eax, dword ptr [ebp + 0x10] */
   1012     edi = MEM32(ebp + (-0x4)); /* 0x300014D0: mov edi, dword ptr [ebp - 4] */
   1013     MEM32(ebp + 0x10) = eax; /* 0x300014D3: mov dword ptr [ebp + 0x10], eax */
   1014     /* cmp edi, MEM32(ebp + 0x8) */ /* 0x300014D6: cmp edi, dword ptr [ebp + 8] */
   1015     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebp + 0x8));
   1016     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1017     _flag_k = FK_CMP;
   1018     if (CMP_EQ(_flag_a, _flag_b)) goto L_300014FB; /* 0x300014D9: je 0x300014fb */
   1019 L_300014DB:
   1020     ecx = MEM32(ebp + 0x10); /* 0x300014DB: mov ecx, dword ptr [ebp + 0x10] */
   1021     PUSH32(esp, edi); /* 0x300014DE: push edi */
   1022     PUSH32(esp, ecx); /* 0x300014DF: push ecx */
   1023     RECOMP_ICALL(0x30001DF0u); /* 0x300014E0: call 0x30001df0 */ /* not lifted */
   1024     RECOMP_FLAGS_IN();
   1025     edx = MEM32(ebp + 0x10); /* 0x300014E5: mov edx, dword ptr [ebp + 0x10] */
   1026     eax = MEM32(ebp + 0x8); /* 0x300014E8: mov eax, dword ptr [ebp + 8] */
   1027     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x14u);
   1028     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1029     edx = edx + 0x14u; /* 0x300014EB: add edx, 0x14 */
   1030     _flag_k = FK_ADD;
   1031     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   1032     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1033     edi = edi + 0x14u; /* 0x300014EE: add edi, 0x14 */
   1034     _flag_k = FK_ADD;
   1035     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1036     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1037     esp = esp + 8; /* 0x300014F1: add esp, 8 */
   1038     _flag_k = FK_ADD;
   1039     /* cmp edi, eax */ /* 0x300014F4: cmp edi, eax */
   1040     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   1041     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1042     _flag_k = FK_CMP;
   1043     MEM32(ebp + 0x10) = edx; /* 0x300014F6: mov dword ptr [ebp + 0x10], edx */
   1044     RECOMP_BACKEDGE();
   1045     if (CMP_NE(_flag_a, _flag_b)) goto L_300014DB; /* 0x300014F9: jne 0x300014db */
   1046 L_300014FB:
   1047     edi = MEM32(esi + 0x8); /* 0x300014FB: mov edi, dword ptr [esi + 8] */
   1048     /* cmp ebx, edi */ /* 0x300014FE: cmp ebx, edi */
   1049     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edi);
   1050     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1051     _flag_k = FK_CMP;
   1052     if (CMP_EQ(_flag_a, _flag_b)) goto L_30001522; /* 0x30001500: je 0x30001522 */
   1053 L_30001502:
   1054     eax = MEM32(ebp + 0x10); /* 0x30001502: mov eax, dword ptr [ebp + 0x10] */
   1055     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   1056     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1057     eax = eax - ebx; /* 0x30001505: sub eax, ebx */
   1058     _flag_k = FK_CMP;
   1059     MEM32(ebp + 0x10) = eax; /* 0x30001507: mov dword ptr [ebp + 0x10], eax */
   1060     goto L_3000150F; /* 0x3000150A: jmp 0x3000150f */
   1061 L_3000150C:
   1062     eax = MEM32(ebp + 0x10); /* 0x3000150C: mov eax, dword ptr [ebp + 0x10] */
   1063 L_3000150F:
   1064     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   1065     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1066     eax = eax + ebx; /* 0x3000150F: add eax, ebx */
   1067     _flag_k = FK_ADD;
   1068     PUSH32(esp, ebx); /* 0x30001511: push ebx */
   1069     PUSH32(esp, eax); /* 0x30001512: push eax */
   1070     RECOMP_ICALL(0x30001DF0u); /* 0x30001513: call 0x30001df0 */ /* not lifted */
   1071     RECOMP_FLAGS_IN();
   1072     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x14u);
   1073     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1074     ebx = ebx + 0x14u; /* 0x30001518: add ebx, 0x14 */
   1075     _flag_k = FK_ADD;
   1076     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1077     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1078     esp = esp + 8; /* 0x3000151B: add esp, 8 */
   1079     _flag_k = FK_ADD;
   1080     /* cmp ebx, edi */ /* 0x3000151E: cmp ebx, edi */
   1081     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edi);
   1082     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1083     _flag_k = FK_CMP;
   1084     RECOMP_BACKEDGE();
   1085     if (CMP_NE(_flag_a, _flag_b)) goto L_3000150C; /* 0x30001520: jne 0x3000150c */
   1086 L_30001522:
   1087     ebx = MEM32(esi + 0x8); /* 0x30001522: mov ebx, dword ptr [esi + 8] */
   1088     edi = MEM32(esi + 0x4); /* 0x30001525: mov edi, dword ptr [esi + 4] */
   1089     /* cmp edi, ebx */ /* 0x30001528: cmp edi, ebx */
   1090     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   1091     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1092     _flag_k = FK_CMP;
   1093     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000153C; /* 0x3000152A: je 0x3000153c */
   1094 L_3000152C:
   1095     PUSH32(esp, 0); /* 0x3000152C: push 0 */
   1096     ecx = edi; /* 0x3000152E: mov ecx, edi */
   1097     RECOMP_ICALL(0x30001E40u); /* 0x30001530: call 0x30001e40 */ /* not lifted */
   1098     RECOMP_FLAGS_IN();
   1099     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   1100     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1101     edi = edi + 0x14u; /* 0x30001535: add edi, 0x14 */
   1102     _flag_k = FK_ADD;
   1103     /* cmp edi, ebx */ /* 0x30001538: cmp edi, ebx */
   1104     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   1105     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1106     _flag_k = FK_CMP;
   1107     RECOMP_BACKEDGE();
   1108     if (CMP_NE(_flag_a, _flag_b)) goto L_3000152C; /* 0x3000153A: jne 0x3000152c */
   1109 L_3000153C:
   1110     edx = MEM32(esi + 0x4); /* 0x3000153C: mov edx, dword ptr [esi + 4] */
   1111     PUSH32(esp, edx); /* 0x3000153F: push edx */
   1112     RECOMP_ICALL(0x30018080u); /* 0x30001540: call 0x30018080 */ /* not lifted */
   1113     RECOMP_FLAGS_IN();
   1114     eax = MEM32(ebp + 0xC); /* 0x30001545: mov eax, dword ptr [ebp + 0xc] */
   1115     edi = MEM32(ebp + 0x14); /* 0x30001548: mov edi, dword ptr [ebp + 0x14] */
   1116     eax = eax + eax * 4; /* 0x3000154B: lea eax, [eax + eax*4] */
   1117     ecx = edi + eax * 4; /* 0x3000154E: lea ecx, [edi + eax*4] */
   1118     eax = MEM32(esi + 0x4); /* 0x30001551: mov eax, dword ptr [esi + 4] */
   1119     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1120     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1121     esp = esp + 4; /* 0x30001554: add esp, 4 */
   1122     _flag_k = FK_ADD;
   1123     /* test eax, eax */ /* 0x30001557: test eax, eax */
   1124     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1125     _cf = 0;
   1126     _flag_k = FK_TEST;
   1127     MEM32(esi + 0xC) = ecx; /* 0x30001559: mov dword ptr [esi + 0xc], ecx */
   1128     if (TEST_NZ(_flag_a, _flag_b)) goto L_30001562; /* 0x3000155C: jne 0x30001562 */
   1129 L_3000155E:
   1130     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1131     edx = 0; /* 0x3000155E: xor edx, edx */
   1132     _cf = 0;
   1133     _flag_k = FK_TEST;
   1134     goto L_30001578; /* 0x30001560: jmp 0x30001578 */
   1135 L_30001562:
   1136     ecx = MEM32(esi + 0x8); /* 0x30001562: mov ecx, dword ptr [esi + 8] */
   1137     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   1138     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1139     ecx = ecx - eax; /* 0x30001565: sub ecx, eax */
   1140     _flag_k = FK_CMP;
   1141     eax = 0x66666667u; /* 0x30001567: mov eax, 0x66666667 */
   1142     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x3000156C: imul ecx */
   1143       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   1144       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   1145     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000156E: sar edx, 3 */
   1146     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1147     edx = (uint32_t)((int32_t)edx >> 3u);
   1148     eax = edx; /* 0x30001571: mov eax, edx */
   1149     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30001573: shr eax, 0x1f */
   1150     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1151     eax = eax >> 31u; /* 0x30001573: shr eax, 0x1f */
   1152     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   1153     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1154     edx = edx + eax; /* 0x30001576: add edx, eax */
   1155     _flag_k = FK_ADD;
   1156 L_30001578:
   1157     ecx = MEM32(ebp + (-0x8)); /* 0x30001578: mov ecx, dword ptr [ebp - 8] */
   1158     eax = edx + ecx; /* 0x3000157B: lea eax, [edx + ecx] */
   1159     edx = eax + eax * 4; /* 0x3000157E: lea edx, [eax + eax*4] */
   1160     eax = edi + edx * 4; /* 0x30001581: lea eax, [edi + edx*4] */
   1161     MEM32(esi + 0x4) = edi; /* 0x30001584: mov dword ptr [esi + 4], edi */
   1162     edi = POP32_VAL(esp); /* 0x30001587: pop edi */
   1163     MEM32(esi + 0x8) = eax; /* 0x30001588: mov dword ptr [esi + 8], eax */
   1164     esi = POP32_VAL(esp); /* 0x3000158B: pop esi */
   1165     ebx = POP32_VAL(esp); /* 0x3000158C: pop ebx */
   1166     esp = ebp; /* 0x3000158D: mov esp, ebp */
   1167     ebp = POP32_VAL(esp); /* 0x3000158F: pop ebp */
   1168     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x30001590: ret 0x10 */
   1169 L_30001593:
   1170     edx = edi; /* 0x30001593: mov edx, edi */
   1171     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx);
   1172     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1173     edx = edx - ebx; /* 0x30001595: sub edx, ebx */
   1174     _flag_k = FK_CMP;
   1175     eax = 0x66666667u; /* 0x30001597: mov eax, 0x66666667 */
   1176     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x3000159C: imul edx */
   1177       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   1178       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   1179     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000159E: sar edx, 3 */
   1180     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1181     edx = (uint32_t)((int32_t)edx >> 3u);
   1182     eax = edx; /* 0x300015A1: mov eax, edx */
   1183     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x300015A3: shr eax, 0x1f */
   1184     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1185     eax = eax >> 31u; /* 0x300015A3: shr eax, 0x1f */
   1186     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   1187     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1188     edx = edx + eax; /* 0x300015A6: add edx, eax */
   1189     _flag_k = FK_ADD;
   1190     /* cmp edx, ecx */ /* 0x300015A8: cmp edx, ecx */
   1191     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   1192     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1193     _flag_k = FK_CMP;
   1194     if (CMP_AE(_flag_a, _flag_b)) goto L_30001657; /* 0x300015AA: jae 0x30001657 */
   1195 L_300015B0:
   1196     eax = ecx + ecx * 4; /* 0x300015B0: lea eax, [ecx + ecx*4] */
   1197     if (2u) _cf = (((eax) >> 30) & 1u); /* 0x300015B3: shl eax, 2 */
   1198     if (2u) { _flag_a = recomp_flags_pack((eax << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1199     eax = eax << 2u; /* 0x300015B3: shl eax, 2 */
   1200     MEM32(ebp + 0x14) = eax; /* 0x300015B6: mov dword ptr [ebp + 0x14], eax */
   1201     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   1202     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1203     eax = eax + ebx; /* 0x300015B9: add eax, ebx */
   1204     _flag_k = FK_ADD;
   1205     /* cmp ebx, edi */ /* 0x300015BB: cmp ebx, edi */
   1206     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edi);
   1207     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1208     _flag_k = FK_CMP;
   1209     MEM32(ebp + 0x10) = ebx; /* 0x300015BD: mov dword ptr [ebp + 0x10], ebx */
   1210     if (CMP_EQ(_flag_a, _flag_b)) goto L_300015EB; /* 0x300015C0: je 0x300015eb */
   1211 L_300015C2:
   1212     MEM32(ebp + 0xC) = eax; /* 0x300015C2: mov dword ptr [ebp + 0xc], eax */
   1213 L_300015C5:
   1214     ecx = MEM32(ebp + 0x10); /* 0x300015C5: mov ecx, dword ptr [ebp + 0x10] */
   1215     edx = MEM32(ebp + 0xC); /* 0x300015C8: mov edx, dword ptr [ebp + 0xc] */
   1216     PUSH32(esp, ecx); /* 0x300015CB: push ecx */
   1217     PUSH32(esp, edx); /* 0x300015CC: push edx */
   1218     RECOMP_ICALL(0x30001DF0u); /* 0x300015CD: call 0x30001df0 */ /* not lifted */
   1219     RECOMP_FLAGS_IN();
   1220     eax = MEM32(ebp + 0x10); /* 0x300015D2: mov eax, dword ptr [ebp + 0x10] */
   1221     edx = MEM32(ebp + 0xC); /* 0x300015D5: mov edx, dword ptr [ebp + 0xc] */
   1222     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x14u);
   1223     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1224     eax = eax + 0x14u; /* 0x300015D8: add eax, 0x14 */
   1225     _flag_k = FK_ADD;
   1226     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x14u);
   1227     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1228     edx = edx + 0x14u; /* 0x300015DB: add edx, 0x14 */
   1229     _flag_k = FK_ADD;
   1230     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1231     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1232     esp = esp + 8; /* 0x300015DE: add esp, 8 */
   1233     _flag_k = FK_ADD;
   1234     /* cmp eax, edi */ /* 0x300015E1: cmp eax, edi */
   1235     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1236     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1237     _flag_k = FK_CMP;
   1238     MEM32(ebp + 0x10) = eax; /* 0x300015E3: mov dword ptr [ebp + 0x10], eax */
   1239     MEM32(ebp + 0xC) = edx; /* 0x300015E6: mov dword ptr [ebp + 0xc], edx */
   1240     RECOMP_BACKEDGE();
   1241     if (CMP_NE(_flag_a, _flag_b)) goto L_300015C5; /* 0x300015E9: jne 0x300015c5 */
   1242 L_300015EB:
   1243     eax = MEM32(esi + 0x8); /* 0x300015EB: mov eax, dword ptr [esi + 8] */
   1244     ecx = MEM32(ebp + 0x8); /* 0x300015EE: mov ecx, dword ptr [ebp + 8] */
   1245     PUSH32(esp, eax); /* 0x300015F1: push eax */
   1246     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   1247     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1248     eax = eax - ebx; /* 0x300015F2: sub eax, ebx */
   1249     _flag_k = FK_CMP;
   1250     PUSH32(esp, ecx); /* 0x300015F4: push ecx */
   1251     ecx = eax; /* 0x300015F5: mov ecx, eax */
   1252     eax = 0x66666667u; /* 0x300015F7: mov eax, 0x66666667 */
   1253     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x300015FC: imul ecx */
   1254       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   1255       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   1256     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300015FE: sar edx, 3 */
   1257     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1258     edx = (uint32_t)((int32_t)edx >> 3u);
   1259     eax = edx; /* 0x30001601: mov eax, edx */
   1260     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30001603: shr eax, 0x1f */
   1261     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1262     eax = eax >> 31u; /* 0x30001603: shr eax, 0x1f */
   1263     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   1264     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1265     edx = edx + eax; /* 0x30001606: add edx, eax */
   1266     _flag_k = FK_ADD;
   1267     ecx = edx + edx * 4; /* 0x30001608: lea ecx, [edx + edx*4] */
   1268     edx = MEM32(ebp + (-0x4)); /* 0x3000160B: mov edx, dword ptr [ebp - 4] */
   1269     eax = edx + ecx * 4; /* 0x3000160E: lea eax, [edx + ecx*4] */
   1270     PUSH32(esp, eax); /* 0x30001611: push eax */
   1271     ecx = esi; /* 0x30001612: mov ecx, esi */
   1272     RECOMP_ICALL(0x300017D0u); /* 0x30001614: call 0x300017d0 */ /* not lifted */
   1273     RECOMP_FLAGS_IN();
   1274     ecx = MEM32(esi + 0x8); /* 0x30001619: mov ecx, dword ptr [esi + 8] */
   1275     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   1276     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1277     ecx = ecx - ebx; /* 0x3000161C: sub ecx, ebx */
   1278     _flag_k = FK_CMP;
   1279     eax = 0x66666667u; /* 0x3000161E: mov eax, 0x66666667 */
   1280     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30001623: imul ecx */
   1281       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   1282       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   1283     eax = MEM32(ebp + (-0x4)); /* 0x30001625: mov eax, dword ptr [ebp - 4] */
   1284     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001628: sar edx, 3 */
   1285     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1286     edx = (uint32_t)((int32_t)edx >> 3u);
   1287     ecx = edx; /* 0x3000162B: mov ecx, edx */
   1288     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x3000162D: shr ecx, 0x1f */
   1289     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1290     ecx = ecx >> 31u; /* 0x3000162D: shr ecx, 0x1f */
   1291     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   1292     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1293     edx = edx + ecx; /* 0x30001630: add edx, ecx */
   1294     _flag_k = FK_ADD;
   1295     edx = edx + edx * 4; /* 0x30001632: lea edx, [edx + edx*4] */
   1296     PUSH32(esp, ebx); /* 0x30001635: push ebx */
   1297     ecx = eax + edx * 4; /* 0x30001636: lea ecx, [eax + edx*4] */
   1298     PUSH32(esp, ecx); /* 0x30001639: push ecx */
   1299     PUSH32(esp, eax); /* 0x3000163A: push eax */
   1300     RECOMP_ICALL(0x30001D40u); /* 0x3000163B: call 0x30001d40 */ /* not lifted */
   1301     RECOMP_FLAGS_IN();
   1302     eax = MEM32(esi + 0x8); /* 0x30001640: mov eax, dword ptr [esi + 8] */
   1303     edx = MEM32(ebp + 0x14); /* 0x30001643: mov edx, dword ptr [ebp + 0x14] */
   1304     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   1305     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1306     esp = esp + 0xCu; /* 0x30001646: add esp, 0xc */
   1307     _flag_k = FK_ADD;
   1308     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   1309     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1310     eax = eax + edx; /* 0x30001649: add eax, edx */
   1311     _flag_k = FK_ADD;
   1312     edi = POP32_VAL(esp); /* 0x3000164B: pop edi */
   1313     MEM32(esi + 0x8) = eax; /* 0x3000164C: mov dword ptr [esi + 8], eax */
   1314     esi = POP32_VAL(esp); /* 0x3000164F: pop esi */
   1315     ebx = POP32_VAL(esp); /* 0x30001650: pop ebx */
   1316     esp = ebp; /* 0x30001651: mov esp, ebp */
   1317     ebp = POP32_VAL(esp); /* 0x30001653: pop ebp */
   1318     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x30001654: ret 0x10 */
   1319 L_30001657:
   1320     /* test ecx, ecx */ /* 0x30001657: test ecx, ecx */
   1321     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   1322     _cf = 0;
   1323     _flag_k = FK_TEST;
   1324     if (TEST_Z(_flag_a, _flag_b)) goto L_30001699; /* 0x30001659: jbe 0x30001699 */
   1325 L_3000165B:
   1326     eax = ecx + ecx * 4; /* 0x3000165B: lea eax, [ecx + ecx*4] */
   1327     PUSH32(esp, edi); /* 0x3000165E: push edi */
   1328     if (2u) _cf = (((eax) >> 30) & 1u); /* 0x3000165F: shl eax, 2 */
   1329     if (2u) { _flag_a = recomp_flags_pack((eax << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1330     eax = eax << 2u; /* 0x3000165F: shl eax, 2 */
   1331     PUSH32(esp, edi); /* 0x30001662: push edi */
   1332     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   1333     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1334     edi = edi - eax; /* 0x30001663: sub edi, eax */
   1335     _flag_k = FK_CMP;
   1336     PUSH32(esp, edi); /* 0x30001665: push edi */
   1337     ecx = esi; /* 0x30001666: mov ecx, esi */
   1338     MEM32(ebp + 0x14) = eax; /* 0x30001668: mov dword ptr [ebp + 0x14], eax */
   1339     RECOMP_ICALL(0x300017D0u); /* 0x3000166B: call 0x300017d0 */ /* not lifted */
   1340     RECOMP_FLAGS_IN();
   1341     eax = MEM32(esi + 0x8); /* 0x30001670: mov eax, dword ptr [esi + 8] */
   1342     edi = MEM32(ebp + 0x14); /* 0x30001673: mov edi, dword ptr [ebp + 0x14] */
   1343     PUSH32(esp, eax); /* 0x30001676: push eax */
   1344     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1345     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1346     eax = eax - edi; /* 0x30001677: sub eax, edi */
   1347     _flag_k = FK_CMP;
   1348     PUSH32(esp, eax); /* 0x30001679: push eax */
   1349     PUSH32(esp, ebx); /* 0x3000167A: push ebx */
   1350     RECOMP_ICALL(0x30001D80u); /* 0x3000167B: call 0x30001d80 */ /* not lifted */
   1351     RECOMP_FLAGS_IN();
   1352     eax = MEM32(ebp + 0x8); /* 0x30001680: mov eax, dword ptr [ebp + 8] */
   1353     ecx = MEM32(ebp + (-0x4)); /* 0x30001683: mov ecx, dword ptr [ebp - 4] */
   1354     PUSH32(esp, ebx); /* 0x30001686: push ebx */
   1355     PUSH32(esp, eax); /* 0x30001687: push eax */
   1356     PUSH32(esp, ecx); /* 0x30001688: push ecx */
   1357     RECOMP_ICALL(0x30001D40u); /* 0x30001689: call 0x30001d40 */ /* not lifted */
   1358     RECOMP_FLAGS_IN();
   1359     eax = MEM32(esi + 0x8); /* 0x3000168E: mov eax, dword ptr [esi + 8] */
   1360     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u);
   1361     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1362     esp = esp + 0x18u; /* 0x30001691: add esp, 0x18 */
   1363     _flag_k = FK_ADD;
   1364     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1365     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1366     eax = eax + edi; /* 0x30001694: add eax, edi */
   1367     _flag_k = FK_ADD;
   1368     MEM32(esi + 0x8) = eax; /* 0x30001696: mov dword ptr [esi + 8], eax */
   1369 L_30001699:
   1370     edi = POP32_VAL(esp); /* 0x30001699: pop edi */
   1371     esi = POP32_VAL(esp); /* 0x3000169A: pop esi */
   1372     ebx = POP32_VAL(esp); /* 0x3000169B: pop ebx */
   1373     esp = ebp; /* 0x3000169C: mov esp, ebp */
   1374     ebp = POP32_VAL(esp); /* 0x3000169E: pop ebp */
   1375     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x3000169F: ret 0x10 */
   1376     RECOMP_REGS_OUT();
   1377 }
   1378 
   1379 void sub_300016B0(void) {
   1380     int _fpu_cmp = 0;
   1381     uint32_t _cf = 0;
   1382     int _df = 1;
   1383     uint32_t _flag_k = FK_NONE;
   1384     uint32_t _flag_a = 0, _flag_b = 0;
   1385     uint32_t _itail_tgt = 0;
   1386     RECOMP_REGS_LOCALS
   1387     RECOMP_ENTER(0x300016B0u);
   1388 
   1389 L_300016B0:
   1390     ecx = MEM32(ecx + 0x4); /* 0x300016B0: mov ecx, dword ptr [ecx + 4] */
   1391     /* test ecx, ecx */ /* 0x300016B3: test ecx, ecx */
   1392     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   1393     _cf = 0;
   1394     _flag_k = FK_TEST;
   1395     if (TEST_Z(_flag_a, _flag_b)) goto L_300016BC; /* 0x300016B5: je 0x300016bc */
   1396 L_300016B7:
   1397     goto L_30002830; /* 0x300016B7: jmp 0x30002830 */
   1398 L_300016BC:
   1399     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300016BC: ret  */
   1400 L_30002830:
   1401     PUSH32(esp, ebp); /* 0x30002830: push ebp */
   1402     ebp = esp; /* 0x30002831: mov ebp, esp */
   1403     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002833: push -1 */
   1404     PUSH32(esp, 0x300185A8u); /* 0x30002835: push 0x300185a8 */
   1405     eax = MEM32(FS_BASE + (0)); /* 0x3000283A: mov eax, dword ptr fs:[0] */
   1406     PUSH32(esp, eax); /* 0x30002840: push eax */
   1407     MEM32(FS_BASE + (0)) = esp; /* 0x30002841: mov dword ptr fs:[0], esp */
   1408     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x44u);
   1409     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1410     esp = esp - 0x44u; /* 0x30002848: sub esp, 0x44 */
   1411     _flag_k = FK_CMP;
   1412     SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x3000284B: mov al, byte ptr [ebp - 0xd] */
   1413     PUSH32(esp, ebx); /* 0x3000284E: push ebx */
   1414     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1415     ebx = 0; /* 0x3000284F: xor ebx, ebx */
   1416     _cf = 0;
   1417     _flag_k = FK_TEST;
   1418     PUSH32(esp, esi); /* 0x30002851: push esi */
   1419     PUSH32(esp, edi); /* 0x30002852: push edi */
   1420     MEM32(ebp + (-0x18)) = ecx; /* 0x30002853: mov dword ptr [ebp - 0x18], ecx */
   1421     MEM8(ebp + (-0x3C)) = (uint8_t)(LO8(eax)); /* 0x30002856: mov byte ptr [ebp - 0x3c], al */
   1422     MEM32(ebp + (-0x38)) = ebx; /* 0x30002859: mov dword ptr [ebp - 0x38], ebx */
   1423     MEM32(ebp + (-0x34)) = ebx; /* 0x3000285C: mov dword ptr [ebp - 0x34], ebx */
   1424     MEM32(ebp + (-0x30)) = ebx; /* 0x3000285F: mov dword ptr [ebp - 0x30], ebx */
   1425     SET_LO8(edx, MEM8(ebp + (-0xD))); /* 0x30002862: mov dl, byte ptr [ebp - 0xd] */
   1426     MEM32(ebp + (-0x4)) = ebx; /* 0x30002865: mov dword ptr [ebp - 4], ebx */
   1427     MEM8(ebp + (-0x2C)) = (uint8_t)(LO8(edx)); /* 0x30002868: mov byte ptr [ebp - 0x2c], dl */
   1428     MEM32(ebp + (-0x28)) = ebx; /* 0x3000286B: mov dword ptr [ebp - 0x28], ebx */
   1429     MEM32(ebp + (-0x24)) = ebx; /* 0x3000286E: mov dword ptr [ebp - 0x24], ebx */
   1430     MEM32(ebp + (-0x20)) = ebx; /* 0x30002871: mov dword ptr [ebp - 0x20], ebx */
   1431     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x30002874: mov byte ptr [ebp - 4], 1 */
   1432     esi = ecx + 0x14; /* 0x30002878: lea esi, [ecx + 0x14] */
   1433 L_3000287B:
   1434     eax = MEM32(esi + 0x4); /* 0x3000287B: mov eax, dword ptr [esi + 4] */
   1435     /* cmp eax, ebx */ /* 0x3000287E: cmp eax, ebx */
   1436     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   1437     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1438     _flag_k = FK_CMP;
   1439     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002986; /* 0x30002880: je 0x30002986 */
   1440 L_30002886:
   1441     ecx = MEM32(esi + 0x8); /* 0x30002886: mov ecx, dword ptr [esi + 8] */
   1442     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   1443     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1444     ecx = ecx - eax; /* 0x30002889: sub ecx, eax */
   1445     _flag_k = FK_CMP;
   1446     eax = 0x66666667u; /* 0x3000288B: mov eax, 0x66666667 */
   1447     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002890: imul ecx */
   1448       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   1449       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   1450     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002892: sar edx, 3 */
   1451     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1452     edx = (uint32_t)((int32_t)edx >> 3u);
   1453     eax = edx; /* 0x30002895: mov eax, edx */
   1454     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002897: shr eax, 0x1f */
   1455     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1456     eax = eax >> 31u; /* 0x30002897: shr eax, 0x1f */
   1457     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   1458     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1459     edx = edx + eax; /* 0x3000289A: add edx, eax */
   1460     _flag_k = FK_ADD;
   1461     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_30002986; /* 0x3000289C: je 0x30002986 */
   1462 L_300028A2:
   1463     ecx = MEM32(ebp + (-0x18)); /* 0x300028A2: mov ecx, dword ptr [ebp - 0x18] */
   1464     eax = MEM32(ecx + 0x1C); /* 0x300028A5: mov eax, dword ptr [ecx + 0x1c] */
   1465     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   1466     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1467     eax = eax + 0xFFFFFFECu; /* 0x300028A8: add eax, -0x14 */
   1468     _flag_k = FK_ADD;
   1469     PUSH32(esp, eax); /* 0x300028AB: push eax */
   1470     ecx = ebp + (-0x50); /* 0x300028AC: lea ecx, [ebp - 0x50] */
   1471     RECOMP_ICALL(0x30007A50u); /* 0x300028AF: call 0x30007a50 */ /* not lifted */
   1472     RECOMP_FLAGS_IN();
   1473     ebx = MEM32(esi + 0x8); /* 0x300028B4: mov ebx, dword ptr [esi + 8] */
   1474     edi = ebx; /* 0x300028B7: lea edi, [ebx] */
   1475     /* cmp edi, ebx */ /* 0x300028B9: cmp edi, ebx */
   1476     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   1477     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1478     _flag_k = FK_CMP;
   1479     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x300028BB: mov byte ptr [ebp - 4], 2 */
   1480     if (CMP_EQ(_flag_a, _flag_b)) goto L_300028E0; /* 0x300028BF: je 0x300028e0 */
   1481 L_300028C1:
   1482     edx = edi + (-0x14); /* 0x300028C1: lea edx, [edi - 0x14] */
   1483     MEM32(ebp + (-0x14)) = edx; /* 0x300028C4: mov dword ptr [ebp - 0x14], edx */
   1484 L_300028C7:
   1485     ecx = MEM32(ebp + (-0x14)); /* 0x300028C7: mov ecx, dword ptr [ebp - 0x14] */
   1486     PUSH32(esp, edi); /* 0x300028CA: push edi */
   1487     RECOMP_ICALL(0x300080D0u); /* 0x300028CB: call 0x300080d0 */ /* not lifted */
   1488     RECOMP_FLAGS_IN();
   1489     ecx = MEM32(ebp + (-0x14)); /* 0x300028D0: mov ecx, dword ptr [ebp - 0x14] */
   1490     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   1491     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1492     edi = edi + 0x14u; /* 0x300028D3: add edi, 0x14 */
   1493     _flag_k = FK_ADD;
   1494     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x14u);
   1495     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1496     ecx = ecx + 0x14u; /* 0x300028D6: add ecx, 0x14 */
   1497     _flag_k = FK_ADD;
   1498     /* cmp edi, ebx */ /* 0x300028D9: cmp edi, ebx */
   1499     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   1500     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1501     _flag_k = FK_CMP;
   1502     MEM32(ebp + (-0x14)) = ecx; /* 0x300028DB: mov dword ptr [ebp - 0x14], ecx */
   1503     RECOMP_BACKEDGE();
   1504     if (CMP_NE(_flag_a, _flag_b)) goto L_300028C7; /* 0x300028DE: jne 0x300028c7 */
   1505 L_300028E0:
   1506     ebx = MEM32(esi + 0x8); /* 0x300028E0: mov ebx, dword ptr [esi + 8] */
   1507     edi = ebx + (-0x14); /* 0x300028E3: lea edi, [ebx - 0x14] */
   1508     /* cmp edi, ebx */ /* 0x300028E6: cmp edi, ebx */
   1509     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   1510     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1511     _flag_k = FK_CMP;
   1512     if (CMP_EQ(_flag_a, _flag_b)) goto L_300028FA; /* 0x300028E8: je 0x300028fa */
   1513 L_300028EA:
   1514     PUSH32(esp, 0); /* 0x300028EA: push 0 */
   1515     ecx = edi; /* 0x300028EC: mov ecx, edi */
   1516     RECOMP_ICALL(0x30001E40u); /* 0x300028EE: call 0x30001e40 */ /* not lifted */
   1517     RECOMP_FLAGS_IN();
   1518     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   1519     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1520     edi = edi + 0x14u; /* 0x300028F3: add edi, 0x14 */
   1521     _flag_k = FK_ADD;
   1522     /* cmp edi, ebx */ /* 0x300028F6: cmp edi, ebx */
   1523     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   1524     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1525     _flag_k = FK_CMP;
   1526     RECOMP_BACKEDGE();
   1527     if (CMP_NE(_flag_a, _flag_b)) goto L_300028EA; /* 0x300028F8: jne 0x300028ea */
   1528 L_300028FA:
   1529     eax = MEM32(esi + 0x8); /* 0x300028FA: mov eax, dword ptr [esi + 8] */
   1530     edi = MEM32(ebp + (-0x18)); /* 0x300028FD: mov edi, dword ptr [ebp - 0x18] */
   1531     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   1532     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1533     eax = eax + 0xFFFFFFECu; /* 0x30002900: add eax, -0x14 */
   1534     _flag_k = FK_ADD;
   1535     MEM32(esi + 0x8) = eax; /* 0x30002903: mov dword ptr [esi + 8], eax */
   1536     eax = MEM32(edi + 0x10); /* 0x30002906: mov eax, dword ptr [edi + 0x10] */
   1537     ecx = ebp + (-0x50); /* 0x30002909: lea ecx, [ebp - 0x50] */
   1538     MEM32(ebp + (-0x1C)) = eax; /* 0x3000290C: mov dword ptr [ebp - 0x1c], eax */
   1539     RECOMP_ICALL(0x300081D0u); /* 0x3000290F: call 0x300081d0 */ /* not lifted */
   1540     RECOMP_FLAGS_IN();
   1541     _st[0] += (double)*(float*)ADDR(ebp + (-0x1C)); /* 0x30002914: fadd dword ptr [ebp - 0x1c] */
   1542     _st[0] = fabs(_st[0]); /* 0x30002917: fabs  */
   1543     _fpu_cmp = FPU_CMP(_st[0], *(double*)ADDR(0x30019118)); /* 0x30002919: fcomp qword ptr [0x30019118] */
   1544     fp_pop();
   1545     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3000291F: fnstsw ax */
   1546     /* test HI8(eax), 0x41u */ /* 0x30002921: test ah, 0x41 */
   1547     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24;
   1548     _cf = 0;
   1549     _flag_k = FK_NARROW(FK_TEST, 24);
   1550     if (TEST_NZ(_flag_a, _flag_b)) goto L_3000294B; /* 0x30002924: jne 0x3000294b */
   1551 L_30002926:
   1552     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002926: push -1 */
   1553     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002928: push -1 */
   1554     ecx = ebp + (-0x3C); /* 0x3000292A: lea ecx, [ebp - 0x3c] */
   1555     PUSH32(esp, ecx); /* 0x3000292D: push ecx */
   1556     edx = ebp + (-0x50); /* 0x3000292E: lea edx, [ebp - 0x50] */
   1557     PUSH32(esp, edx); /* 0x30002931: push edx */
   1558     ecx = edi + 0x24; /* 0x30002932: lea ecx, [edi + 0x24] */
   1559     RECOMP_ICALL(0x30001170u); /* 0x30002935: call 0x30001170 */ /* not lifted */
   1560     RECOMP_FLAGS_IN();
   1561     PUSH32(esp, 1); /* 0x3000293A: push 1 */
   1562     PUSH32(esp, 1); /* 0x3000293C: push 1 */
   1563     eax = ebp + (-0x2C); /* 0x3000293E: lea eax, [ebp - 0x2c] */
   1564     ecx = ebp + (-0x3C); /* 0x30002941: lea ecx, [ebp - 0x3c] */
   1565     PUSH32(esp, eax); /* 0x30002944: push eax */
   1566     PUSH32(esp, ecx); /* 0x30002945: push ecx */
   1567     ecx = edi + 0x2C; /* 0x30002946: lea ecx, [edi + 0x2c] */
   1568     goto L_3000296E; /* 0x30002949: jmp 0x3000296e */
   1569 L_3000294B:
   1570     PUSH32(esp, 1); /* 0x3000294B: push 1 */
   1571     PUSH32(esp, 1); /* 0x3000294D: push 1 */
   1572     edx = ebp + (-0x3C); /* 0x3000294F: lea edx, [ebp - 0x3c] */
   1573     PUSH32(esp, edx); /* 0x30002952: push edx */
   1574     eax = ebp + (-0x50); /* 0x30002953: lea eax, [ebp - 0x50] */
   1575     PUSH32(esp, eax); /* 0x30002956: push eax */
   1576     ecx = edi + 0x2C; /* 0x30002957: lea ecx, [edi + 0x2c] */
   1577     RECOMP_ICALL(0x30001170u); /* 0x3000295A: call 0x30001170 */ /* not lifted */
   1578     RECOMP_FLAGS_IN();
   1579     PUSH32(esp, 0xFFFFFFFFu); /* 0x3000295F: push -1 */
   1580     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002961: push -1 */
   1581     ecx = ebp + (-0x2C); /* 0x30002963: lea ecx, [ebp - 0x2c] */
   1582     PUSH32(esp, ecx); /* 0x30002966: push ecx */
   1583     edx = ebp + (-0x3C); /* 0x30002967: lea edx, [ebp - 0x3c] */
   1584     PUSH32(esp, edx); /* 0x3000296A: push edx */
   1585     ecx = edi + 0x24; /* 0x3000296B: lea ecx, [edi + 0x24] */
   1586 L_3000296E:
   1587     RECOMP_ICALL(0x300013A0u); /* 0x3000296E: call 0x300013a0 */ /* not lifted */
   1588     RECOMP_FLAGS_IN();
   1589     ecx = ebp + (-0x50); /* 0x30002973: lea ecx, [ebp - 0x50] */
   1590     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x30002976: mov byte ptr [ebp - 4], 1 */
   1591     RECOMP_ICALL(0x30007AB0u); /* 0x3000297A: call 0x30007ab0 */ /* not lifted */
   1592     RECOMP_FLAGS_IN();
   1593     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1594     ebx = 0; /* 0x3000297F: xor ebx, ebx */
   1595     _cf = 0;
   1596     _flag_k = FK_TEST;
   1597     RECOMP_BACKEDGE();
   1598     goto L_3000287B; /* 0x30002981: jmp 0x3000287b */
   1599 L_30002986:
   1600     eax = ebp + (-0x2C); /* 0x30002986: lea eax, [ebp - 0x2c] */
   1601     /* cmp esi, eax */ /* 0x30002989: cmp esi, eax */
   1602     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   1603     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1604     _flag_k = FK_CMP;
   1605     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002ABA; /* 0x3000298B: je 0x30002aba */
   1606 L_30002991:
   1607     eax = MEM32(ebp + (-0x28)); /* 0x30002991: mov eax, dword ptr [ebp - 0x28] */
   1608     /* cmp eax, ebx */ /* 0x30002994: cmp eax, ebx */
   1609     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   1610     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1611     _flag_k = FK_CMP;
   1612     if (CMP_EQ(_flag_a, _flag_b)) goto L_300029B0; /* 0x30002996: je 0x300029b0 */
   1613 L_30002998:
   1614     ecx = MEM32(ebp + (-0x24)); /* 0x30002998: mov ecx, dword ptr [ebp - 0x24] */
   1615     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   1616     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1617     ecx = ecx - eax; /* 0x3000299B: sub ecx, eax */
   1618     _flag_k = FK_CMP;
   1619     eax = 0x66666667u; /* 0x3000299D: mov eax, 0x66666667 */
   1620     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x300029A2: imul ecx */
   1621       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   1622       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   1623     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300029A4: sar edx, 3 */
   1624     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1625     edx = (uint32_t)((int32_t)edx >> 3u);
   1626     ecx = edx; /* 0x300029A7: mov ecx, edx */
   1627     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x300029A9: shr ecx, 0x1f */
   1628     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1629     ecx = ecx >> 31u; /* 0x300029A9: shr ecx, 0x1f */
   1630     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   1631     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1632     edx = edx + ecx; /* 0x300029AC: add edx, ecx */
   1633     _flag_k = FK_ADD;
   1634     ebx = edx; /* 0x300029AE: mov ebx, edx */
   1635 L_300029B0:
   1636     edi = MEM32(esi + 0x4); /* 0x300029B0: mov edi, dword ptr [esi + 4] */
   1637     /* test edi, edi */ /* 0x300029B3: test edi, edi */
   1638     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   1639     _cf = 0;
   1640     _flag_k = FK_TEST;
   1641     if (TEST_NZ(_flag_a, _flag_b)) goto L_300029BB; /* 0x300029B5: jne 0x300029bb */
   1642 L_300029B7:
   1643     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1644     edx = 0; /* 0x300029B7: xor edx, edx */
   1645     _cf = 0;
   1646     _flag_k = FK_TEST;
   1647     goto L_300029D1; /* 0x300029B9: jmp 0x300029d1 */
   1648 L_300029BB:
   1649     ecx = MEM32(esi + 0x8); /* 0x300029BB: mov ecx, dword ptr [esi + 8] */
   1650     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   1651     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1652     ecx = ecx - edi; /* 0x300029BE: sub ecx, edi */
   1653     _flag_k = FK_CMP;
   1654     eax = 0x66666667u; /* 0x300029C0: mov eax, 0x66666667 */
   1655     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x300029C5: imul ecx */
   1656       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   1657       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   1658     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300029C7: sar edx, 3 */
   1659     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1660     edx = (uint32_t)((int32_t)edx >> 3u);
   1661     eax = edx; /* 0x300029CA: mov eax, edx */
   1662     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x300029CC: shr eax, 0x1f */
   1663     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1664     eax = eax >> 31u; /* 0x300029CC: shr eax, 0x1f */
   1665     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   1666     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1667     edx = edx + eax; /* 0x300029CF: add edx, eax */
   1668     _flag_k = FK_ADD;
   1669 L_300029D1:
   1670     /* cmp ebx, edx */ /* 0x300029D1: cmp ebx, edx */
   1671     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edx);
   1672     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1673     _flag_k = FK_CMP;
   1674     if (CMP_A(_flag_a, _flag_b)) goto L_30002A0B; /* 0x300029D3: ja 0x30002a0b */
   1675 L_300029D5:
   1676     ecx = MEM32(ebp + (-0x24)); /* 0x300029D5: mov ecx, dword ptr [ebp - 0x24] */
   1677     edx = MEM32(ebp + (-0x28)); /* 0x300029D8: mov edx, dword ptr [ebp - 0x28] */
   1678     PUSH32(esp, edi); /* 0x300029DB: push edi */
   1679     PUSH32(esp, ecx); /* 0x300029DC: push ecx */
   1680     PUSH32(esp, edx); /* 0x300029DD: push edx */
   1681     RECOMP_ICALL(0x30001D40u); /* 0x300029DE: call 0x30001d40 */ /* not lifted */
   1682     RECOMP_FLAGS_IN();
   1683     ecx = MEM32(esi + 0x8); /* 0x300029E3: mov ecx, dword ptr [esi + 8] */
   1684     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   1685     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1686     esp = esp + 0xCu; /* 0x300029E6: add esp, 0xc */
   1687     _flag_k = FK_ADD;
   1688     PUSH32(esp, ecx); /* 0x300029E9: push ecx */
   1689     PUSH32(esp, eax); /* 0x300029EA: push eax */
   1690     ecx = esi; /* 0x300029EB: mov ecx, esi */
   1691     RECOMP_ICALL(0x300017A0u); /* 0x300029ED: call 0x300017a0 */ /* not lifted */
   1692     RECOMP_FLAGS_IN();
   1693     ecx = ebp + (-0x2C); /* 0x300029F2: lea ecx, [ebp - 0x2c] */
   1694     RECOMP_ICALL(0x30001CB0u); /* 0x300029F5: call 0x30001cb0 */ /* not lifted */
   1695     RECOMP_FLAGS_IN();
   1696     edx = eax + eax * 4; /* 0x300029FA: lea edx, [eax + eax*4] */
   1697     eax = MEM32(esi + 0x4); /* 0x300029FD: mov eax, dword ptr [esi + 4] */
   1698     ecx = eax + edx * 4; /* 0x30002A00: lea ecx, [eax + edx*4] */
   1699     MEM32(esi + 0x8) = ecx; /* 0x30002A03: mov dword ptr [esi + 8], ecx */
   1700     goto L_30002AB8; /* 0x30002A06: jmp 0x30002ab8 */
   1701 L_30002A0B:
   1702     ecx = esi; /* 0x30002A0B: mov ecx, esi */
   1703     RECOMP_ICALL(0x30001C80u); /* 0x30002A0D: call 0x30001c80 */ /* not lifted */
   1704     RECOMP_FLAGS_IN();
   1705     ecx = ebp + (-0x2C); /* 0x30002A12: lea ecx, [ebp - 0x2c] */
   1706     edi = eax; /* 0x30002A15: mov edi, eax */
   1707     RECOMP_ICALL(0x30001CB0u); /* 0x30002A17: call 0x30001cb0 */ /* not lifted */
   1708     RECOMP_FLAGS_IN();
   1709     /* cmp eax, edi */ /* 0x30002A1C: cmp eax, edi */
   1710     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1711     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1712     _flag_k = FK_CMP;
   1713     if (CMP_A(_flag_a, _flag_b)) goto L_30002A67; /* 0x30002A1E: ja 0x30002a67 */
   1714 L_30002A20:
   1715     edi = MEM32(ebp + (-0x28)); /* 0x30002A20: mov edi, dword ptr [ebp - 0x28] */
   1716     ecx = esi; /* 0x30002A23: mov ecx, esi */
   1717     RECOMP_ICALL(0x30001CB0u); /* 0x30002A25: call 0x30001cb0 */ /* not lifted */
   1718     RECOMP_FLAGS_IN();
   1719     ecx = MEM32(ebp + (-0x28)); /* 0x30002A2A: mov ecx, dword ptr [ebp - 0x28] */
   1720     edx = eax + eax * 4; /* 0x30002A2D: lea edx, [eax + eax*4] */
   1721     eax = MEM32(esi + 0x4); /* 0x30002A30: mov eax, dword ptr [esi + 4] */
   1722     PUSH32(esp, eax); /* 0x30002A33: push eax */
   1723     edi = edi + edx * 4; /* 0x30002A34: lea edi, [edi + edx*4] */
   1724     PUSH32(esp, edi); /* 0x30002A37: push edi */
   1725     PUSH32(esp, ecx); /* 0x30002A38: push ecx */
   1726     RECOMP_ICALL(0x30001D40u); /* 0x30002A39: call 0x30001d40 */ /* not lifted */
   1727     RECOMP_FLAGS_IN();
   1728     edx = MEM32(esi + 0x8); /* 0x30002A3E: mov edx, dword ptr [esi + 8] */
   1729     eax = MEM32(ebp + (-0x24)); /* 0x30002A41: mov eax, dword ptr [ebp - 0x24] */
   1730     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   1731     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1732     esp = esp + 0xCu; /* 0x30002A44: add esp, 0xc */
   1733     _flag_k = FK_ADD;
   1734     PUSH32(esp, edx); /* 0x30002A47: push edx */
   1735     PUSH32(esp, eax); /* 0x30002A48: push eax */
   1736     PUSH32(esp, edi); /* 0x30002A49: push edi */
   1737     ecx = esi; /* 0x30002A4A: mov ecx, esi */
   1738     RECOMP_ICALL(0x300017D0u); /* 0x30002A4C: call 0x300017d0 */ /* not lifted */
   1739     RECOMP_FLAGS_IN();
   1740     ecx = ebp + (-0x2C); /* 0x30002A51: lea ecx, [ebp - 0x2c] */
   1741     RECOMP_ICALL(0x30001CB0u); /* 0x30002A54: call 0x30001cb0 */ /* not lifted */
   1742     RECOMP_FLAGS_IN();
   1743     edx = MEM32(esi + 0x4); /* 0x30002A59: mov edx, dword ptr [esi + 4] */
   1744     ecx = eax + eax * 4; /* 0x30002A5C: lea ecx, [eax + eax*4] */
   1745     eax = edx + ecx * 4; /* 0x30002A5F: lea eax, [edx + ecx*4] */
   1746     MEM32(esi + 0x8) = eax; /* 0x30002A62: mov dword ptr [esi + 8], eax */
   1747     goto L_30002AB8; /* 0x30002A65: jmp 0x30002ab8 */
   1748 L_30002A67:
   1749     ecx = MEM32(esi + 0x8); /* 0x30002A67: mov ecx, dword ptr [esi + 8] */
   1750     edx = MEM32(esi + 0x4); /* 0x30002A6A: mov edx, dword ptr [esi + 4] */
   1751     PUSH32(esp, ecx); /* 0x30002A6D: push ecx */
   1752     PUSH32(esp, edx); /* 0x30002A6E: push edx */
   1753     ecx = esi; /* 0x30002A6F: mov ecx, esi */
   1754     RECOMP_ICALL(0x300017A0u); /* 0x30002A71: call 0x300017a0 */ /* not lifted */
   1755     RECOMP_FLAGS_IN();
   1756     eax = MEM32(esi + 0x4); /* 0x30002A76: mov eax, dword ptr [esi + 4] */
   1757     PUSH32(esp, eax); /* 0x30002A79: push eax */
   1758     RECOMP_ICALL(0x30018080u); /* 0x30002A7A: call 0x30018080 */ /* not lifted */
   1759     RECOMP_FLAGS_IN();
   1760     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1761     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1762     esp = esp + 4; /* 0x30002A7F: add esp, 4 */
   1763     _flag_k = FK_ADD;
   1764     ecx = ebp + (-0x2C); /* 0x30002A82: lea ecx, [ebp - 0x2c] */
   1765     RECOMP_ICALL(0x30001CB0u); /* 0x30002A85: call 0x30001cb0 */ /* not lifted */
   1766     RECOMP_FLAGS_IN();
   1767     /* test eax, eax */ /* 0x30002A8A: test eax, eax */
   1768     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   1769     _cf = 0;
   1770     _flag_k = FK_TEST;
   1771     if (TEST_NS(_flag_a, _flag_b)) goto L_30002A90; /* 0x30002A8C: jge 0x30002a90 */
   1772 L_30002A8E:
   1773     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1774     eax = 0; /* 0x30002A8E: xor eax, eax */
   1775     _cf = 0;
   1776     _flag_k = FK_TEST;
   1777 L_30002A90:
   1778     eax = eax + eax * 4; /* 0x30002A90: lea eax, [eax + eax*4] */
   1779     if (2u) _cf = (((eax) >> 30) & 1u); /* 0x30002A93: shl eax, 2 */
   1780     if (2u) { _flag_a = recomp_flags_pack((eax << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   1781     eax = eax << 2u; /* 0x30002A93: shl eax, 2 */
   1782     PUSH32(esp, eax); /* 0x30002A96: push eax */
   1783     RECOMP_ICALL(0x300180A8u); /* 0x30002A97: call 0x300180a8 */ /* not lifted */
   1784     RECOMP_FLAGS_IN();
   1785     ecx = MEM32(ebp + (-0x24)); /* 0x30002A9C: mov ecx, dword ptr [ebp - 0x24] */
   1786     edx = MEM32(ebp + (-0x28)); /* 0x30002A9F: mov edx, dword ptr [ebp - 0x28] */
   1787     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1788     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1789     esp = esp + 4; /* 0x30002AA2: add esp, 4 */
   1790     _flag_k = FK_ADD;
   1791     PUSH32(esp, eax); /* 0x30002AA5: push eax */
   1792     PUSH32(esp, ecx); /* 0x30002AA6: push ecx */
   1793     PUSH32(esp, edx); /* 0x30002AA7: push edx */
   1794     ecx = esi; /* 0x30002AA8: mov ecx, esi */
   1795     MEM32(esi + 0x4) = eax; /* 0x30002AAA: mov dword ptr [esi + 4], eax */
   1796     RECOMP_ICALL(0x300017D0u); /* 0x30002AAD: call 0x300017d0 */ /* not lifted */
   1797     RECOMP_FLAGS_IN();
   1798     MEM32(esi + 0x8) = eax; /* 0x30002AB2: mov dword ptr [esi + 8], eax */
   1799     MEM32(esi + 0xC) = eax; /* 0x30002AB5: mov dword ptr [esi + 0xc], eax */
   1800 L_30002AB8:
   1801     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1802     ebx = 0; /* 0x30002AB8: xor ebx, ebx */
   1803     _cf = 0;
   1804     _flag_k = FK_TEST;
   1805 L_30002ABA:
   1806     esi = MEM32(ebp + (-0x18)); /* 0x30002ABA: mov esi, dword ptr [ebp - 0x18] */
   1807     ecx = esi + 0x24; /* 0x30002ABD: lea ecx, [esi + 0x24] */
   1808     RECOMP_ICALL(0x300016B0u); /* 0x30002AC0: call 0x300016b0 */ /* not lifted */
   1809     RECOMP_FLAGS_IN();
   1810     ecx = esi + 0x2C; /* 0x30002AC5: lea ecx, [esi + 0x2c] */
   1811     RECOMP_ICALL(0x300016B0u); /* 0x30002AC8: call 0x300016b0 */ /* not lifted */
   1812     RECOMP_FLAGS_IN();
   1813     edi = MEM32(ebp + (-0x24)); /* 0x30002ACD: mov edi, dword ptr [ebp - 0x24] */
   1814     esi = MEM32(ebp + (-0x28)); /* 0x30002AD0: mov esi, dword ptr [ebp - 0x28] */
   1815     /* cmp esi, edi */ /* 0x30002AD3: cmp esi, edi */
   1816     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   1817     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1818     _flag_k = FK_CMP;
   1819     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x30002AD5: mov byte ptr [ebp - 4], 0 */
   1820     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002AED; /* 0x30002AD9: je 0x30002aed */
   1821 L_30002ADB:
   1822     PUSH32(esp, ebx); /* 0x30002ADB: push ebx */
   1823     ecx = esi; /* 0x30002ADC: mov ecx, esi */
   1824     RECOMP_ICALL(0x30001E40u); /* 0x30002ADE: call 0x30001e40 */ /* not lifted */
   1825     RECOMP_FLAGS_IN();
   1826     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   1827     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1828     esi = esi + 0x14u; /* 0x30002AE3: add esi, 0x14 */
   1829     _flag_k = FK_ADD;
   1830     /* cmp esi, edi */ /* 0x30002AE6: cmp esi, edi */
   1831     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   1832     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1833     _flag_k = FK_CMP;
   1834     RECOMP_BACKEDGE();
   1835     if (CMP_NE(_flag_a, _flag_b)) goto L_30002ADB; /* 0x30002AE8: jne 0x30002adb */
   1836 L_30002AEA:
   1837     esi = MEM32(ebp + (-0x28)); /* 0x30002AEA: mov esi, dword ptr [ebp - 0x28] */
   1838 L_30002AED:
   1839     PUSH32(esp, esi); /* 0x30002AED: push esi */
   1840     RECOMP_ICALL(0x30018080u); /* 0x30002AEE: call 0x30018080 */ /* not lifted */
   1841     RECOMP_FLAGS_IN();
   1842     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1843     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1844     esp = esp + 4; /* 0x30002AF3: add esp, 4 */
   1845     _flag_k = FK_ADD;
   1846     ecx = ebp + (-0x3C); /* 0x30002AF6: lea ecx, [ebp - 0x3c] */
   1847     MEM32(ebp + (-0x28)) = ebx; /* 0x30002AF9: mov dword ptr [ebp - 0x28], ebx */
   1848     MEM32(ebp + (-0x24)) = ebx; /* 0x30002AFC: mov dword ptr [ebp - 0x24], ebx */
   1849     MEM32(ebp + (-0x20)) = ebx; /* 0x30002AFF: mov dword ptr [ebp - 0x20], ebx */
   1850     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x30002B02: mov dword ptr [ebp - 4], 0xffffffff */
   1851     RECOMP_ICALL(0x30002B80u); /* 0x30002B09: call 0x30002b80 */ /* not lifted */
   1852     RECOMP_FLAGS_IN();
   1853     ecx = MEM32(ebp + (-0xC)); /* 0x30002B0E: mov ecx, dword ptr [ebp - 0xc] */
   1854     edi = POP32_VAL(esp); /* 0x30002B11: pop edi */
   1855     esi = POP32_VAL(esp); /* 0x30002B12: pop esi */
   1856     ebx = POP32_VAL(esp); /* 0x30002B13: pop ebx */
   1857     MEM32(FS_BASE + (0)) = ecx; /* 0x30002B14: mov dword ptr fs:[0], ecx */
   1858     esp = ebp; /* 0x30002B1B: mov esp, ebp */
   1859     ebp = POP32_VAL(esp); /* 0x30002B1D: pop ebp */
   1860     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30002B1E: ret  */
   1861     RECOMP_REGS_OUT();
   1862 }
   1863 
   1864 void sub_300016C0(void) {
   1865     int _fpu_cmp = 0;
   1866     uint32_t _cf = 0;
   1867     int _df = 1;
   1868     uint32_t _flag_k = FK_NONE;
   1869     uint32_t _flag_a = 0, _flag_b = 0;
   1870     uint32_t _itail_tgt = 0;
   1871     RECOMP_REGS_LOCALS
   1872     RECOMP_ENTER(0x300016C0u);
   1873 
   1874 L_300016C0:
   1875     PUSH32(esp, ebp); /* 0x300016C0: push ebp */
   1876     ebp = esp; /* 0x300016C1: mov ebp, esp */
   1877     ecx = MEM32(ecx + 0x4); /* 0x300016C3: mov ecx, dword ptr [ecx + 4] */
   1878     /* test ecx, ecx */ /* 0x300016C6: test ecx, ecx */
   1879     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   1880     _cf = 0;
   1881     _flag_k = FK_TEST;
   1882     if (TEST_Z(_flag_a, _flag_b)) goto L_300016E9; /* 0x300016C8: je 0x300016e9 */
   1883 L_300016CA:
   1884     edx = MEM32(ebp + 0x8); /* 0x300016CA: mov edx, dword ptr [ebp + 8] */
   1885     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   1886     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1887     esp = esp - 0xCu; /* 0x300016CD: sub esp, 0xc */
   1888     _flag_k = FK_CMP;
   1889     eax = esp; /* 0x300016D0: mov eax, esp */
   1890     MEM32(eax) = edx; /* 0x300016D2: mov dword ptr [eax], edx */
   1891     edx = MEM32(ebp + 0xC); /* 0x300016D4: mov edx, dword ptr [ebp + 0xc] */
   1892     MEM32(eax + 0x4) = edx; /* 0x300016D7: mov dword ptr [eax + 4], edx */
   1893     edx = MEM32(ebp + 0x10); /* 0x300016DA: mov edx, dword ptr [ebp + 0x10] */
   1894     MEM32(eax + 0x8) = edx; /* 0x300016DD: mov dword ptr [eax + 8], edx */
   1895     RECOMP_ICALL(0x30002B20u); /* 0x300016E0: call 0x30002b20 */ /* not lifted */
   1896     RECOMP_FLAGS_IN();
   1897     ebp = POP32_VAL(esp); /* 0x300016E5: pop ebp */
   1898     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x300016E6: ret 0x10 */
   1899 L_300016E9:
   1900     /* cmp MEM32(ebp + 0x14), 0xFFFFFFFFu */ /* 0x300016E9: cmp dword ptr [ebp + 0x14], -1 */
   1901     _flag_a = (uint32_t)(MEM32(ebp + 0x14)); _flag_b = (uint32_t)(0xFFFFFFFFu);
   1902     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1903     _flag_k = FK_CMP;
   1904     SET_LO8(eax, (CMP_EQ(_flag_a, _flag_b)) ? 1 : 0); /* 0x300016ED: sete al */
   1905     ebp = POP32_VAL(esp); /* 0x300016F0: pop ebp */
   1906     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x300016F1: ret 0x10 */
   1907     RECOMP_REGS_OUT();
   1908 }
   1909 
   1910 void sub_30001700(void) {
   1911     int _fpu_cmp = 0;
   1912     uint32_t _cf = 0;
   1913     int _df = 1;
   1914     uint32_t _flag_k = FK_NONE;
   1915     uint32_t _flag_a = 0, _flag_b = 0;
   1916     uint32_t _itail_tgt = 0;
   1917     RECOMP_REGS_LOCALS
   1918     RECOMP_ENTER(0x30001700u);
   1919 
   1920 L_30001700:
   1921     eax = 1; /* 0x30001700: mov eax, 1 */
   1922     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30001705: ret 0xc */
   1923     RECOMP_REGS_OUT();
   1924 }
   1925 
   1926 void sub_30001710(void) {
   1927     int _fpu_cmp = 0;
   1928     uint32_t _cf = 0;
   1929     int _df = 1;
   1930     uint32_t _flag_k = FK_NONE;
   1931     uint32_t _flag_a = 0, _flag_b = 0;
   1932     uint32_t _itail_tgt = 0;
   1933     RECOMP_REGS_LOCALS
   1934     RECOMP_ENTER(0x30001710u);
   1935 
   1936 L_30001710:
   1937     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
   1938     SET_LO8(eax, 0); /* 0x30001710: xor al, al */
   1939     _cf = 0;
   1940     _flag_k = FK_NARROW(FK_TEST, 24);
   1941     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x30001712: ret 0x14 */
   1942     RECOMP_REGS_OUT();
   1943 }
   1944 
   1945 void sub_30001720(void) {
   1946     int _fpu_cmp = 0;
   1947     uint32_t _cf = 0;
   1948     int _df = 1;
   1949     uint32_t _flag_k = FK_NONE;
   1950     uint32_t _flag_a = 0, _flag_b = 0;
   1951     uint32_t _itail_tgt = 0;
   1952     RECOMP_REGS_LOCALS
   1953     RECOMP_ENTER(0x30001720u);
   1954 
   1955 L_30001720:
   1956     RECOMP_ICALL(0x30001730u); /* 0x30001720: call 0x30001730 */ /* not lifted */
   1957     RECOMP_FLAGS_IN();
   1958     goto L_30001740; /* 0x30001725: jmp 0x30001740 */
   1959 L_30001740:
   1960     PUSH32(esp, 0x30001750u); /* 0x30001740: push 0x30001750 */
   1961     RECOMP_ICALL(0x300180ECu); /* 0x30001745: call 0x300180ec */ /* not lifted */
   1962     RECOMP_FLAGS_IN();
   1963     ecx = POP32_VAL(esp); /* 0x3000174A: pop ecx */
   1964     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000174B: ret  */
   1965     RECOMP_REGS_OUT();
   1966 }
   1967 
   1968 void sub_30001730(void) {
   1969     int _fpu_cmp = 0;
   1970     uint32_t _cf = 0;
   1971     int _df = 1;
   1972     uint32_t _flag_k = FK_NONE;
   1973     uint32_t _flag_a = 0, _flag_b = 0;
   1974     uint32_t _itail_tgt = 0;
   1975     RECOMP_REGS_LOCALS
   1976     RECOMP_ENTER(0x30001730u);
   1977 
   1978 L_30001730:
   1979     ecx = 0x3001E3A1u; /* 0x30001730: mov ecx, 0x3001e3a1 */
   1980 L_30001735:
   1981     { _itail_tgt = (uint32_t)(MEM32(0x30019018)); goto _ljump; }
   1982     { RECOMP_REGS_OUT(); return; } /* end of function */
   1983   _ljump:
   1984     switch (_itail_tgt) {
   1985       case 0x30001730u: goto L_30001730;
   1986       case 0x30001735u: goto L_30001735;
   1987       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   1988     }
   1989     RECOMP_REGS_OUT();
   1990 }
   1991 
   1992 void sub_30001740(void) {
   1993     int _fpu_cmp = 0;
   1994     uint32_t _cf = 0;
   1995     int _df = 1;
   1996     uint32_t _flag_k = FK_NONE;
   1997     uint32_t _flag_a = 0, _flag_b = 0;
   1998     uint32_t _itail_tgt = 0;
   1999     RECOMP_REGS_LOCALS
   2000     RECOMP_ENTER(0x30001740u);
   2001 
   2002 L_30001740:
   2003     PUSH32(esp, 0x30001750u); /* 0x30001740: push 0x30001750 */
   2004     RECOMP_ICALL(0x300180ECu); /* 0x30001745: call 0x300180ec */ /* not lifted */
   2005     RECOMP_FLAGS_IN();
   2006     ecx = POP32_VAL(esp); /* 0x3000174A: pop ecx */
   2007     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000174B: ret  */
   2008     RECOMP_REGS_OUT();
   2009 }
   2010 
   2011 void sub_30001750(void) {
   2012     int _fpu_cmp = 0;
   2013     uint32_t _cf = 0;
   2014     int _df = 1;
   2015     uint32_t _flag_k = FK_NONE;
   2016     uint32_t _flag_a = 0, _flag_b = 0;
   2017     uint32_t _itail_tgt = 0;
   2018     RECOMP_REGS_LOCALS
   2019     RECOMP_ENTER(0x30001750u);
   2020 
   2021 L_30001750:
   2022     ecx = 0x3001E3A1u; /* 0x30001750: mov ecx, 0x3001e3a1 */
   2023 L_30001755:
   2024     { _itail_tgt = (uint32_t)(MEM32(0x3001901C)); goto _ljump; }
   2025     { RECOMP_REGS_OUT(); return; } /* end of function */
   2026   _ljump:
   2027     switch (_itail_tgt) {
   2028       case 0x30001750u: goto L_30001750;
   2029       case 0x30001755u: goto L_30001755;
   2030       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   2031     }
   2032     RECOMP_REGS_OUT();
   2033 }
   2034 
   2035 void sub_30001760(void) {
   2036     int _fpu_cmp = 0;
   2037     uint32_t _cf = 0;
   2038     int _df = 1;
   2039     uint32_t _flag_k = FK_NONE;
   2040     uint32_t _flag_a = 0, _flag_b = 0;
   2041     uint32_t _itail_tgt = 0;
   2042     RECOMP_REGS_LOCALS
   2043     RECOMP_ENTER(0x30001760u);
   2044 
   2045 L_30001760:
   2046     RECOMP_ICALL(0x30001770u); /* 0x30001760: call 0x30001770 */ /* not lifted */
   2047     RECOMP_FLAGS_IN();
   2048     goto L_30001780; /* 0x30001765: jmp 0x30001780 */
   2049 L_30001780:
   2050     PUSH32(esp, 0x30001790u); /* 0x30001780: push 0x30001790 */
   2051     RECOMP_ICALL(0x300180ECu); /* 0x30001785: call 0x300180ec */ /* not lifted */
   2052     RECOMP_FLAGS_IN();
   2053     ecx = POP32_VAL(esp); /* 0x3000178A: pop ecx */
   2054     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000178B: ret  */
   2055     RECOMP_REGS_OUT();
   2056 }
   2057 
   2058 void sub_30001770(void) {
   2059     int _fpu_cmp = 0;
   2060     uint32_t _cf = 0;
   2061     int _df = 1;
   2062     uint32_t _flag_k = FK_NONE;
   2063     uint32_t _flag_a = 0, _flag_b = 0;
   2064     uint32_t _itail_tgt = 0;
   2065     RECOMP_REGS_LOCALS
   2066     RECOMP_ENTER(0x30001770u);
   2067 
   2068 L_30001770:
   2069     ecx = 0x3001E3A0u; /* 0x30001770: mov ecx, 0x3001e3a0 */
   2070 L_30001775:
   2071     { _itail_tgt = (uint32_t)(MEM32(0x30019020)); goto _ljump; }
   2072     { RECOMP_REGS_OUT(); return; } /* end of function */
   2073   _ljump:
   2074     switch (_itail_tgt) {
   2075       case 0x30001770u: goto L_30001770;
   2076       case 0x30001775u: goto L_30001775;
   2077       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   2078     }
   2079     RECOMP_REGS_OUT();
   2080 }
   2081 
   2082 void sub_30001780(void) {
   2083     int _fpu_cmp = 0;
   2084     uint32_t _cf = 0;
   2085     int _df = 1;
   2086     uint32_t _flag_k = FK_NONE;
   2087     uint32_t _flag_a = 0, _flag_b = 0;
   2088     uint32_t _itail_tgt = 0;
   2089     RECOMP_REGS_LOCALS
   2090     RECOMP_ENTER(0x30001780u);
   2091 
   2092 L_30001780:
   2093     PUSH32(esp, 0x30001790u); /* 0x30001780: push 0x30001790 */
   2094     RECOMP_ICALL(0x300180ECu); /* 0x30001785: call 0x300180ec */ /* not lifted */
   2095     RECOMP_FLAGS_IN();
   2096     ecx = POP32_VAL(esp); /* 0x3000178A: pop ecx */
   2097     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000178B: ret  */
   2098     RECOMP_REGS_OUT();
   2099 }
   2100 
   2101 void sub_30001790(void) {
   2102     int _fpu_cmp = 0;
   2103     uint32_t _cf = 0;
   2104     int _df = 1;
   2105     uint32_t _flag_k = FK_NONE;
   2106     uint32_t _flag_a = 0, _flag_b = 0;
   2107     uint32_t _itail_tgt = 0;
   2108     RECOMP_REGS_LOCALS
   2109     RECOMP_ENTER(0x30001790u);
   2110 
   2111 L_30001790:
   2112     ecx = 0x3001E3A0u; /* 0x30001790: mov ecx, 0x3001e3a0 */
   2113 L_30001795:
   2114     { _itail_tgt = (uint32_t)(MEM32(0x30019024)); goto _ljump; }
   2115     { RECOMP_REGS_OUT(); return; } /* end of function */
   2116   _ljump:
   2117     switch (_itail_tgt) {
   2118       case 0x30001790u: goto L_30001790;
   2119       case 0x30001795u: goto L_30001795;
   2120       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   2121     }
   2122     RECOMP_REGS_OUT();
   2123 }
   2124 
   2125 void sub_300017A0(void) {
   2126     int _fpu_cmp = 0;
   2127     uint32_t _cf = 0;
   2128     int _df = 1;
   2129     uint32_t _flag_k = FK_NONE;
   2130     uint32_t _flag_a = 0, _flag_b = 0;
   2131     uint32_t _itail_tgt = 0;
   2132     RECOMP_REGS_LOCALS
   2133     RECOMP_ENTER(0x300017A0u);
   2134 
   2135 L_300017A0:
   2136     PUSH32(esp, ebp); /* 0x300017A0: push ebp */
   2137     ebp = esp; /* 0x300017A1: mov ebp, esp */
   2138     PUSH32(esp, esi); /* 0x300017A3: push esi */
   2139     esi = MEM32(ebp + 0x8); /* 0x300017A4: mov esi, dword ptr [ebp + 8] */
   2140     PUSH32(esp, edi); /* 0x300017A7: push edi */
   2141     edi = MEM32(ebp + 0xC); /* 0x300017A8: mov edi, dword ptr [ebp + 0xc] */
   2142     /* cmp esi, edi */ /* 0x300017AB: cmp esi, edi */
   2143     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   2144     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2145     _flag_k = FK_CMP;
   2146     if (CMP_EQ(_flag_a, _flag_b)) goto L_300017BD; /* 0x300017AD: je 0x300017bd */
   2147 L_300017AF:
   2148     ecx = esi; /* 0x300017AF: mov ecx, esi */
   2149     RECOMP_ICALL(0x30007AB0u); /* 0x300017B1: call 0x30007ab0 */ /* not lifted */
   2150     RECOMP_FLAGS_IN();
   2151     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   2152     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2153     esi = esi + 0x14u; /* 0x300017B6: add esi, 0x14 */
   2154     _flag_k = FK_ADD;
   2155     /* cmp esi, edi */ /* 0x300017B9: cmp esi, edi */
   2156     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   2157     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2158     _flag_k = FK_CMP;
   2159     RECOMP_BACKEDGE();
   2160     if (CMP_NE(_flag_a, _flag_b)) goto L_300017AF; /* 0x300017BB: jne 0x300017af */
   2161 L_300017BD:
   2162     edi = POP32_VAL(esp); /* 0x300017BD: pop edi */
   2163     esi = POP32_VAL(esp); /* 0x300017BE: pop esi */
   2164     ebp = POP32_VAL(esp); /* 0x300017BF: pop ebp */
   2165     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x300017C0: ret 8 */
   2166     RECOMP_REGS_OUT();
   2167 }
   2168 
   2169 void sub_300017D0(void) {
   2170     int _fpu_cmp = 0;
   2171     uint32_t _cf = 0;
   2172     int _df = 1;
   2173     uint32_t _flag_k = FK_NONE;
   2174     uint32_t _flag_a = 0, _flag_b = 0;
   2175     uint32_t _itail_tgt = 0;
   2176     RECOMP_REGS_LOCALS
   2177     RECOMP_ENTER(0x300017D0u);
   2178 
   2179 L_300017D0:
   2180     PUSH32(esp, ebp); /* 0x300017D0: push ebp */
   2181     ebp = esp; /* 0x300017D1: mov ebp, esp */
   2182     PUSH32(esp, ebx); /* 0x300017D3: push ebx */
   2183     ebx = MEM32(ebp + 0xC); /* 0x300017D4: mov ebx, dword ptr [ebp + 0xc] */
   2184     PUSH32(esp, esi); /* 0x300017D7: push esi */
   2185     esi = MEM32(ebp + 0x8); /* 0x300017D8: mov esi, dword ptr [ebp + 8] */
   2186     /* cmp esi, ebx */ /* 0x300017DB: cmp esi, ebx */
   2187     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   2188     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2189     _flag_k = FK_CMP;
   2190     if (CMP_EQ(_flag_a, _flag_b)) goto L_30001800; /* 0x300017DD: je 0x30001800 */
   2191 L_300017DF:
   2192     PUSH32(esp, edi); /* 0x300017DF: push edi */
   2193     edi = MEM32(ebp + 0x10); /* 0x300017E0: mov edi, dword ptr [ebp + 0x10] */
   2194 L_300017E3:
   2195     PUSH32(esp, esi); /* 0x300017E3: push esi */
   2196     PUSH32(esp, edi); /* 0x300017E4: push edi */
   2197     RECOMP_ICALL(0x30001DF0u); /* 0x300017E5: call 0x30001df0 */ /* not lifted */
   2198     RECOMP_FLAGS_IN();
   2199     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   2200     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2201     esi = esi + 0x14u; /* 0x300017EA: add esi, 0x14 */
   2202     _flag_k = FK_ADD;
   2203     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2204     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2205     esp = esp + 8; /* 0x300017ED: add esp, 8 */
   2206     _flag_k = FK_ADD;
   2207     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   2208     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2209     edi = edi + 0x14u; /* 0x300017F0: add edi, 0x14 */
   2210     _flag_k = FK_ADD;
   2211     /* cmp esi, ebx */ /* 0x300017F3: cmp esi, ebx */
   2212     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   2213     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2214     _flag_k = FK_CMP;
   2215     RECOMP_BACKEDGE();
   2216     if (CMP_NE(_flag_a, _flag_b)) goto L_300017E3; /* 0x300017F5: jne 0x300017e3 */
   2217 L_300017F7:
   2218     eax = edi; /* 0x300017F7: mov eax, edi */
   2219     edi = POP32_VAL(esp); /* 0x300017F9: pop edi */
   2220     esi = POP32_VAL(esp); /* 0x300017FA: pop esi */
   2221     ebx = POP32_VAL(esp); /* 0x300017FB: pop ebx */
   2222     ebp = POP32_VAL(esp); /* 0x300017FC: pop ebp */
   2223     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x300017FD: ret 0xc */
   2224 L_30001800:
   2225     eax = MEM32(ebp + 0x10); /* 0x30001800: mov eax, dword ptr [ebp + 0x10] */
   2226     esi = POP32_VAL(esp); /* 0x30001803: pop esi */
   2227     ebx = POP32_VAL(esp); /* 0x30001804: pop ebx */
   2228     ebp = POP32_VAL(esp); /* 0x30001805: pop ebp */
   2229     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30001806: ret 0xc */
   2230     RECOMP_REGS_OUT();
   2231 }
   2232 
   2233 void sub_30001810(void) {
   2234     int _fpu_cmp = 0;
   2235     uint32_t _cf = 0;
   2236     int _df = 1;
   2237     uint32_t _flag_k = FK_NONE;
   2238     uint32_t _flag_a = 0, _flag_b = 0;
   2239     uint32_t _itail_tgt = 0;
   2240     RECOMP_REGS_LOCALS
   2241     RECOMP_ENTER(0x30001810u);
   2242 
   2243 L_30001810:
   2244     PUSH32(esp, ebp); /* 0x30001810: push ebp */
   2245     ebp = esp; /* 0x30001811: mov ebp, esp */
   2246     eax = MEM32(ebp + 0x8); /* 0x30001813: mov eax, dword ptr [ebp + 8] */
   2247     ecx = MEM32(ecx); /* 0x30001816: mov ecx, dword ptr [ecx] */
   2248     eax = eax + eax * 2; /* 0x30001818: lea eax, [eax + eax*2] */
   2249     eax = ecx + eax * 4; /* 0x3000181B: lea eax, [ecx + eax*4] */
   2250     ebp = POP32_VAL(esp); /* 0x3000181E: pop ebp */
   2251     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3000181F: ret 4 */
   2252     RECOMP_REGS_OUT();
   2253 }
   2254 
   2255 void sub_30001830(void) {
   2256     int _fpu_cmp = 0;
   2257     uint32_t _cf = 0;
   2258     int _df = 1;
   2259     uint32_t _flag_k = FK_NONE;
   2260     uint32_t _flag_a = 0, _flag_b = 0;
   2261     uint32_t _itail_tgt = 0;
   2262     RECOMP_REGS_LOCALS
   2263     RECOMP_ENTER(0x30001830u);
   2264 
   2265 L_30001830:
   2266     eax = ecx + 0x8; /* 0x30001830: lea eax, [ecx + 8] */
   2267     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001833: ret  */
   2268     RECOMP_REGS_OUT();
   2269 }
   2270 
   2271 void sub_30001840(void) {
   2272     int _fpu_cmp = 0;
   2273     uint32_t _cf = 0;
   2274     int _df = 1;
   2275     uint32_t _flag_k = FK_NONE;
   2276     uint32_t _flag_a = 0, _flag_b = 0;
   2277     uint32_t _itail_tgt = 0;
   2278     RECOMP_REGS_LOCALS
   2279     RECOMP_ENTER(0x30001840u);
   2280 
   2281 L_30001840:
   2282     eax = MEM32(ecx + 0x4); /* 0x30001840: mov eax, dword ptr [ecx + 4] */
   2283     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001843: ret  */
   2284     RECOMP_REGS_OUT();
   2285 }
   2286 
   2287 void sub_30001850(void) {
   2288     int _fpu_cmp = 0;
   2289     uint32_t _cf = 0;
   2290     int _df = 1;
   2291     uint32_t _flag_k = FK_NONE;
   2292     uint32_t _flag_a = 0, _flag_b = 0;
   2293     uint32_t _itail_tgt = 0;
   2294     RECOMP_REGS_LOCALS
   2295     RECOMP_ENTER(0x30001850u);
   2296 
   2297 L_30001850:
   2298     edx = MEM32(ecx + 0x4); /* 0x30001850: mov edx, dword ptr [ecx + 4] */
   2299     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2300     eax = 0; /* 0x30001853: xor eax, eax */
   2301     _cf = 0;
   2302     _flag_k = FK_TEST;
   2303     /* test edx, edx */ /* 0x30001855: test edx, edx */
   2304     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx);
   2305     _cf = 0;
   2306     _flag_k = FK_TEST;
   2307     SET_LO8(eax, (TEST_Z(_flag_a, _flag_b)) ? 1 : 0); /* 0x30001857: sete al */
   2308     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3000185A: ret  */
   2309     RECOMP_REGS_OUT();
   2310 }
   2311 
   2312 void sub_30001860(void) {
   2313     int _fpu_cmp = 0;
   2314     uint32_t _cf = 0;
   2315     int _df = 1;
   2316     uint32_t _flag_k = FK_NONE;
   2317     uint32_t _flag_a = 0, _flag_b = 0;
   2318     uint32_t _itail_tgt = 0;
   2319     RECOMP_REGS_LOCALS
   2320     RECOMP_ENTER(0x30001860u);
   2321 
   2322 L_30001860:
   2323     PUSH32(esp, ebp); /* 0x30001860: push ebp */
   2324     ebp = esp; /* 0x30001861: mov ebp, esp */
   2325     PUSH32(esp, edi); /* 0x30001863: push edi */
   2326     edi = MEM32(ebp + 0xC); /* 0x30001864: mov edi, dword ptr [ebp + 0xc] */
   2327     /* test edi, edi */ /* 0x30001867: test edi, edi */
   2328     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   2329     _cf = 0;
   2330     _flag_k = FK_TEST;
   2331     if (TEST_Z(_flag_a, _flag_b)) goto L_30001885; /* 0x30001869: jbe 0x30001885 */
   2332 L_3000186B:
   2333     PUSH32(esp, ebx); /* 0x3000186B: push ebx */
   2334     ebx = MEM32(ebp + 0x10); /* 0x3000186C: mov ebx, dword ptr [ebp + 0x10] */
   2335     PUSH32(esp, esi); /* 0x3000186F: push esi */
   2336     esi = MEM32(ebp + 0x8); /* 0x30001870: mov esi, dword ptr [ebp + 8] */
   2337 L_30001873:
   2338     PUSH32(esp, ebx); /* 0x30001873: push ebx */
   2339     PUSH32(esp, esi); /* 0x30001874: push esi */
   2340     RECOMP_ICALL(0x30001DF0u); /* 0x30001875: call 0x30001df0 */ /* not lifted */
   2341     RECOMP_FLAGS_IN();
   2342     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2343     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2344     esp = esp + 8; /* 0x3000187A: add esp, 8 */
   2345     _flag_k = FK_ADD;
   2346     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   2347     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2348     esi = esi + 0x14u; /* 0x3000187D: add esi, 0x14 */
   2349     _flag_k = FK_ADD;
   2350     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1);
   2351     edi = edi - 1; /* 0x30001880: dec edi */
   2352     _flag_k = FK_DEC;
   2353     RECOMP_BACKEDGE();
   2354     if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_30001873; /* 0x30001881: jne 0x30001873 */
   2355 L_30001883:
   2356     esi = POP32_VAL(esp); /* 0x30001883: pop esi */
   2357     ebx = POP32_VAL(esp); /* 0x30001884: pop ebx */
   2358 L_30001885:
   2359     edi = POP32_VAL(esp); /* 0x30001885: pop edi */
   2360     ebp = POP32_VAL(esp); /* 0x30001886: pop ebp */
   2361     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30001887: ret 0xc */
   2362     RECOMP_REGS_OUT();
   2363 }
   2364 
   2365 void sub_30001890(void) {
   2366     int _fpu_cmp = 0;
   2367     uint32_t _cf = 0;
   2368     int _df = 1;
   2369     uint32_t _flag_k = FK_NONE;
   2370     uint32_t _flag_a = 0, _flag_b = 0;
   2371     uint32_t _itail_tgt = 0;
   2372     RECOMP_REGS_LOCALS
   2373     RECOMP_ENTER(0x30001890u);
   2374 
   2375 L_30001890:
   2376     eax = MEM32(ecx); /* 0x30001890: mov eax, dword ptr [ecx] */
   2377     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001892: ret  */
   2378     RECOMP_REGS_OUT();
   2379 }
   2380 
   2381 void sub_300018A0(void) {
   2382     int _fpu_cmp = 0;
   2383     uint32_t _cf = 0;
   2384     int _df = 1;
   2385     uint32_t _flag_k = FK_NONE;
   2386     uint32_t _flag_a = 0, _flag_b = 0;
   2387     uint32_t _itail_tgt = 0;
   2388     RECOMP_REGS_LOCALS
   2389     RECOMP_ENTER(0x300018A0u);
   2390 
   2391 L_300018A0:
   2392     eax = MEM32(ecx + 0x4); /* 0x300018A0: mov eax, dword ptr [ecx + 4] */
   2393     ecx = MEM32(ecx); /* 0x300018A3: mov ecx, dword ptr [ecx] */
   2394     eax = eax + eax * 2; /* 0x300018A5: lea eax, [eax + eax*2] */
   2395     eax = ecx + eax * 4; /* 0x300018A8: lea eax, [ecx + eax*4] */
   2396     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300018AB: ret  */
   2397     RECOMP_REGS_OUT();
   2398 }
   2399 
   2400 void sub_300018B0(void) {
   2401     int _fpu_cmp = 0;
   2402     uint32_t _cf = 0;
   2403     int _df = 1;
   2404     uint32_t _flag_k = FK_NONE;
   2405     uint32_t _flag_a = 0, _flag_b = 0;
   2406     uint32_t _itail_tgt = 0;
   2407     RECOMP_REGS_LOCALS
   2408     RECOMP_ENTER(0x300018B0u);
   2409 
   2410 L_300018B0:
   2411     SET_LO8(eax, MEM8(ecx + 0x14)); /* 0x300018B0: mov al, byte ptr [ecx + 0x14] */
   2412     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300018B3: ret  */
   2413     RECOMP_REGS_OUT();
   2414 }
   2415 
   2416 void sub_300018C0(void) {
   2417     int _fpu_cmp = 0;
   2418     uint32_t _cf = 0;
   2419     int _df = 1;
   2420     uint32_t _flag_k = FK_NONE;
   2421     uint32_t _flag_a = 0, _flag_b = 0;
   2422     uint32_t _itail_tgt = 0;
   2423     RECOMP_REGS_LOCALS
   2424     RECOMP_ENTER(0x300018C0u);
   2425 
   2426 L_300018C0:
   2427     eax = ecx; /* 0x300018C0: mov eax, ecx */
   2428     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300018C2: ret  */
   2429     RECOMP_REGS_OUT();
   2430 }
   2431 
   2432 void sub_300018D0(void) {
   2433     int _fpu_cmp = 0;
   2434     uint32_t _cf = 0;
   2435     int _df = 1;
   2436     uint32_t _flag_k = FK_NONE;
   2437     uint32_t _flag_a = 0, _flag_b = 0;
   2438     uint32_t _itail_tgt = 0;
   2439     RECOMP_REGS_LOCALS
   2440     RECOMP_ENTER(0x300018D0u);
   2441 
   2442 L_300018D0:
   2443     PUSH32(esp, ebp); /* 0x300018D0: push ebp */
   2444     ebp = esp; /* 0x300018D1: mov ebp, esp */
   2445     eax = ecx; /* 0x300018D3: mov eax, ecx */
   2446     ecx = MEM32(ebp + 0x8); /* 0x300018D5: mov ecx, dword ptr [ebp + 8] */
   2447     edx = MEM32(ecx + 0x4); /* 0x300018D8: mov edx, dword ptr [ecx + 4] */
   2448     MEM32(eax + 0x4) = edx; /* 0x300018DB: mov dword ptr [eax + 4], edx */
   2449     MEM32(eax) = 0x3001910Cu; /* 0x300018DE: mov dword ptr [eax], 0x3001910c */
   2450     ebp = POP32_VAL(esp); /* 0x300018E4: pop ebp */
   2451     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x300018E5: ret 4 */
   2452     RECOMP_REGS_OUT();
   2453 }
   2454 
   2455 void sub_300018F0(void) {
   2456     int _fpu_cmp = 0;
   2457     uint32_t _cf = 0;
   2458     int _df = 1;
   2459     uint32_t _flag_k = FK_NONE;
   2460     uint32_t _flag_a = 0, _flag_b = 0;
   2461     uint32_t _itail_tgt = 0;
   2462     RECOMP_REGS_LOCALS
   2463     RECOMP_ENTER(0x300018F0u);
   2464 
   2465 L_300018F0:
   2466     PUSH32(esp, ebp); /* 0x300018F0: push ebp */
   2467     ebp = esp; /* 0x300018F1: mov ebp, esp */
   2468     PUSH32(esp, ebx); /* 0x300018F3: push ebx */
   2469     SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x300018F4: mov bl, byte ptr [ebp + 8] */
   2470     /* test LO8(ebx), 2 */ /* 0x300018F7: test bl, 2 */
   2471     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24;
   2472     _cf = 0;
   2473     _flag_k = FK_NARROW(FK_TEST, 24);
   2474     PUSH32(esp, esi); /* 0x300018FA: push esi */
   2475     esi = ecx; /* 0x300018FB: mov esi, ecx */
   2476     if (TEST_Z(_flag_a, _flag_b)) goto L_3000192B; /* 0x300018FD: je 0x3000192b */
   2477 L_300018FF:
   2478     eax = MEM32(esi + (-0x4)); /* 0x300018FF: mov eax, dword ptr [esi - 4] */
   2479     PUSH32(esp, edi); /* 0x30001902: push edi */
   2480     PUSH32(esp, 0x30001020u); /* 0x30001903: push 0x30001020 */
   2481     edi = esi + (-0x4); /* 0x30001908: lea edi, [esi - 4] */
   2482     PUSH32(esp, eax); /* 0x3000190B: push eax */
   2483     PUSH32(esp, 8); /* 0x3000190C: push 8 */
   2484     PUSH32(esp, esi); /* 0x3000190E: push esi */
   2485     RECOMP_ICALL(0x300180FEu); /* 0x3000190F: call 0x300180fe */ /* not lifted */
   2486     RECOMP_FLAGS_IN();
   2487     /* test LO8(ebx), 1 */ /* 0x30001914: test bl, 1 */
   2488     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24;
   2489     _cf = 0;
   2490     _flag_k = FK_NARROW(FK_TEST, 24);
   2491     if (TEST_Z(_flag_a, _flag_b)) goto L_30001922; /* 0x30001917: je 0x30001922 */
   2492 L_30001919:
   2493     PUSH32(esp, edi); /* 0x30001919: push edi */
   2494     RECOMP_ICALL(0x30018080u); /* 0x3000191A: call 0x30018080 */ /* not lifted */
   2495     RECOMP_FLAGS_IN();
   2496     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2497     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2498     esp = esp + 4; /* 0x3000191F: add esp, 4 */
   2499     _flag_k = FK_ADD;
   2500 L_30001922:
   2501     eax = edi; /* 0x30001922: mov eax, edi */
   2502     edi = POP32_VAL(esp); /* 0x30001924: pop edi */
   2503     esi = POP32_VAL(esp); /* 0x30001925: pop esi */
   2504     ebx = POP32_VAL(esp); /* 0x30001926: pop ebx */
   2505     ebp = POP32_VAL(esp); /* 0x30001927: pop ebp */
   2506     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30001928: ret 4 */
   2507 L_3000192B:
   2508     ecx = esi; /* 0x3000192B: mov ecx, esi */
   2509     RECOMP_ICALL(0x30001020u); /* 0x3000192D: call 0x30001020 */ /* not lifted */
   2510     RECOMP_FLAGS_IN();
   2511     /* test LO8(ebx), 1 */ /* 0x30001932: test bl, 1 */
   2512     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24;
   2513     _cf = 0;
   2514     _flag_k = FK_NARROW(FK_TEST, 24);
   2515     if (TEST_Z(_flag_a, _flag_b)) goto L_30001940; /* 0x30001935: je 0x30001940 */
   2516 L_30001937:
   2517     PUSH32(esp, esi); /* 0x30001937: push esi */
   2518     RECOMP_ICALL(0x30018080u); /* 0x30001938: call 0x30018080 */ /* not lifted */
   2519     RECOMP_FLAGS_IN();
   2520     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2521     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2522     esp = esp + 4; /* 0x3000193D: add esp, 4 */
   2523     _flag_k = FK_ADD;
   2524 L_30001940:
   2525     eax = esi; /* 0x30001940: mov eax, esi */
   2526     esi = POP32_VAL(esp); /* 0x30001942: pop esi */
   2527     ebx = POP32_VAL(esp); /* 0x30001943: pop ebx */
   2528     ebp = POP32_VAL(esp); /* 0x30001944: pop ebp */
   2529     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30001945: ret 4 */
   2530     RECOMP_REGS_OUT();
   2531 }
   2532 
   2533 void sub_30001950(void) {
   2534     int _fpu_cmp = 0;
   2535     uint32_t _cf = 0;
   2536     int _df = 1;
   2537     uint32_t _flag_k = FK_NONE;
   2538     uint32_t _flag_a = 0, _flag_b = 0;
   2539     uint32_t _itail_tgt = 0;
   2540     RECOMP_REGS_LOCALS
   2541     RECOMP_ENTER(0x30001950u);
   2542 
   2543 L_30001950:
   2544     fp_push(*(float*)&MEM32(ecx + 0xC)); /* 0x30001950: fld dword ptr [ecx + 0xc] */
   2545     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001953: ret  */
   2546     RECOMP_REGS_OUT();
   2547 }
   2548 
   2549 void sub_30001960(void) {
   2550     int _fpu_cmp = 0;
   2551     uint32_t _cf = 0;
   2552     int _df = 1;
   2553     uint32_t _flag_k = FK_NONE;
   2554     uint32_t _flag_a = 0, _flag_b = 0;
   2555     uint32_t _itail_tgt = 0;
   2556     RECOMP_REGS_LOCALS
   2557     RECOMP_ENTER(0x30001960u);
   2558 
   2559 L_30001960:
   2560     PUSH32(esp, ebp); /* 0x30001960: push ebp */
   2561     ebp = esp; /* 0x30001961: mov ebp, esp */
   2562     eax = MEM32(ebp + 0x8); /* 0x30001963: mov eax, dword ptr [ebp + 8] */
   2563     fp_push(*(float*)&MEM32(eax + 0x8)); /* 0x30001966: fld dword ptr [eax + 8] */
   2564     _st[0] *= (double)*(float*)ADDR(ecx + 0x8); /* 0x30001969: fmul dword ptr [ecx + 8] */
   2565     fp_push(*(float*)&MEM32(eax + 0x4)); /* 0x3000196C: fld dword ptr [eax + 4] */
   2566     _st[0] *= (double)*(float*)ADDR(ecx + 0x4); /* 0x3000196F: fmul dword ptr [ecx + 4] */
   2567     { double _v = fp_pop(); _st[0] += _v; } /* 0x30001972: faddp st(1) */
   2568     fp_push(*(float*)&MEM32(eax)); /* 0x30001974: fld dword ptr [eax] */
   2569     _st[0] *= (double)*(float*)ADDR(ecx); /* 0x30001976: fmul dword ptr [ecx] */
   2570     { double _v = fp_pop(); _st[0] += _v; } /* 0x30001978: faddp st(1) */
   2571     _st[0] -= (double)*(float*)ADDR(ecx + 0xC); /* 0x3000197A: fsub dword ptr [ecx + 0xc] */
   2572     ebp = POP32_VAL(esp); /* 0x3000197D: pop ebp */
   2573     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3000197E: ret 4 */
   2574     RECOMP_REGS_OUT();
   2575 }
   2576 
   2577 void sub_30001990(void) {
   2578     int _fpu_cmp = 0;
   2579     uint32_t _cf = 0;
   2580     int _df = 1;
   2581     uint32_t _flag_k = FK_NONE;
   2582     uint32_t _flag_a = 0, _flag_b = 0;
   2583     uint32_t _itail_tgt = 0;
   2584     RECOMP_REGS_LOCALS
   2585     RECOMP_ENTER(0x30001990u);
   2586 
   2587 L_30001990:
   2588     PUSH32(esp, ebp); /* 0x30001990: push ebp */
   2589     ebp = esp; /* 0x30001991: mov ebp, esp */
   2590     eax = ecx; /* 0x30001993: mov eax, ecx */
   2591     ecx = MEM32(ebp + 0x8); /* 0x30001995: mov ecx, dword ptr [ebp + 8] */
   2592     PUSH32(esp, esi); /* 0x30001998: push esi */
   2593     esi = MEM32(ecx); /* 0x30001999: mov esi, dword ptr [ecx] */
   2594     edx = eax; /* 0x3000199B: mov edx, eax */
   2595     MEM32(edx) = esi; /* 0x3000199D: mov dword ptr [edx], esi */
   2596     esi = MEM32(ecx + 0x4); /* 0x3000199F: mov esi, dword ptr [ecx + 4] */
   2597     MEM32(edx + 0x4) = esi; /* 0x300019A2: mov dword ptr [edx + 4], esi */
   2598     esi = MEM32(ecx + 0x8); /* 0x300019A5: mov esi, dword ptr [ecx + 8] */
   2599     MEM32(edx + 0x8) = esi; /* 0x300019A8: mov dword ptr [edx + 8], esi */
   2600     ecx = MEM32(ecx + 0xC); /* 0x300019AB: mov ecx, dword ptr [ecx + 0xc] */
   2601     MEM32(edx + 0xC) = ecx; /* 0x300019AE: mov dword ptr [edx + 0xc], ecx */
   2602     esi = POP32_VAL(esp); /* 0x300019B1: pop esi */
   2603     ebp = POP32_VAL(esp); /* 0x300019B2: pop ebp */
   2604     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x300019B3: ret 4 */
   2605     RECOMP_REGS_OUT();
   2606 }
   2607 
   2608 void sub_300019C0(void) {
   2609     int _fpu_cmp = 0;
   2610     uint32_t _cf = 0;
   2611     int _df = 1;
   2612     uint32_t _flag_k = FK_NONE;
   2613     uint32_t _flag_a = 0, _flag_b = 0;
   2614     uint32_t _itail_tgt = 0;
   2615     RECOMP_REGS_LOCALS
   2616     RECOMP_ENTER(0x300019C0u);
   2617 
   2618 L_300019C0:
   2619     PUSH32(esp, ebp); /* 0x300019C0: push ebp */
   2620     ebp = esp; /* 0x300019C1: mov ebp, esp */
   2621     PUSH32(esp, 0xFFFFFFFFu); /* 0x300019C3: push -1 */
   2622     PUSH32(esp, 0x30018451u); /* 0x300019C5: push 0x30018451 */
   2623     eax = MEM32(FS_BASE + (0)); /* 0x300019CA: mov eax, dword ptr fs:[0] */
   2624     PUSH32(esp, eax); /* 0x300019D0: push eax */
   2625     MEM32(FS_BASE + (0)) = esp; /* 0x300019D1: mov dword ptr fs:[0], esp */
   2626     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   2627     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2628     esp = esp - 0xCu; /* 0x300019D8: sub esp, 0xc */
   2629     _flag_k = FK_CMP;
   2630     PUSH32(esp, ebx); /* 0x300019DB: push ebx */
   2631     ebx = MEM32(ebp + 0x8); /* 0x300019DC: mov ebx, dword ptr [ebp + 8] */
   2632     PUSH32(esp, esi); /* 0x300019DF: push esi */
   2633     PUSH32(esp, edi); /* 0x300019E0: push edi */
   2634     edi = ecx; /* 0x300019E1: mov edi, ecx */
   2635     eax = ebx + 0x4; /* 0x300019E3: lea eax, [ebx + 4] */
   2636     edx = MEM32(eax); /* 0x300019E6: mov edx, dword ptr [eax] */
   2637     ecx = edi + 0x4; /* 0x300019E8: lea ecx, [edi + 4] */
   2638     MEM32(ecx) = edx; /* 0x300019EB: mov dword ptr [ecx], edx */
   2639     edx = MEM32(eax + 0x4); /* 0x300019ED: mov edx, dword ptr [eax + 4] */
   2640     MEM32(ecx + 0x4) = edx; /* 0x300019F0: mov dword ptr [ecx + 4], edx */
   2641     edx = MEM32(eax + 0x8); /* 0x300019F3: mov edx, dword ptr [eax + 8] */
   2642     MEM32(ecx + 0x8) = edx; /* 0x300019F6: mov dword ptr [ecx + 8], edx */
   2643     eax = MEM32(eax + 0xC); /* 0x300019F9: mov eax, dword ptr [eax + 0xc] */
   2644     MEM32(ecx + 0xC) = eax; /* 0x300019FC: mov dword ptr [ecx + 0xc], eax */
   2645     SET_LO8(ecx, MEM8(ebx + 0x14)); /* 0x300019FF: mov cl, byte ptr [ebx + 0x14] */
   2646     MEM8(edi + 0x14) = (uint8_t)(LO8(ecx)); /* 0x30001A02: mov byte ptr [edi + 0x14], cl */
   2647     eax = MEM32(ebx + 0x18); /* 0x30001A05: mov eax, dword ptr [ebx + 0x18] */
   2648     /* test eax, eax */ /* 0x30001A08: test eax, eax */
   2649     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   2650     _cf = 0;
   2651     _flag_k = FK_TEST;
   2652     if (TEST_NZ(_flag_a, _flag_b)) goto L_30001A10; /* 0x30001A0A: jne 0x30001a10 */
   2653 L_30001A0C:
   2654     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2655     edx = 0; /* 0x30001A0C: xor edx, edx */
   2656     _cf = 0;
   2657     _flag_k = FK_TEST;
   2658     goto L_30001A26; /* 0x30001A0E: jmp 0x30001a26 */
   2659 L_30001A10:
   2660     ecx = MEM32(ebx + 0x1C); /* 0x30001A10: mov ecx, dword ptr [ebx + 0x1c] */
   2661     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   2662     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2663     ecx = ecx - eax; /* 0x30001A13: sub ecx, eax */
   2664     _flag_k = FK_CMP;
   2665     eax = 0x66666667u; /* 0x30001A15: mov eax, 0x66666667 */
   2666     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30001A1A: imul ecx */
   2667       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   2668       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   2669     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001A1C: sar edx, 3 */
   2670     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   2671     edx = (uint32_t)((int32_t)edx >> 3u);
   2672     eax = edx; /* 0x30001A1F: mov eax, edx */
   2673     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30001A21: shr eax, 0x1f */
   2674     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   2675     eax = eax >> 31u; /* 0x30001A21: shr eax, 0x1f */
   2676     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   2677     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2678     edx = edx + eax; /* 0x30001A24: add edx, eax */
   2679     _flag_k = FK_ADD;
   2680 L_30001A26:
   2681     /* test edx, edx */ /* 0x30001A26: test edx, edx */
   2682     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx);
   2683     _cf = 0;
   2684     _flag_k = FK_TEST;
   2685     eax = edx; /* 0x30001A28: mov eax, edx */
   2686     if (TEST_NS(_flag_a, _flag_b)) goto L_30001A2E; /* 0x30001A2A: jge 0x30001a2e */
   2687 L_30001A2C:
   2688     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2689     eax = 0; /* 0x30001A2C: xor eax, eax */
   2690     _cf = 0;
   2691     _flag_k = FK_TEST;
   2692 L_30001A2E:
   2693     ecx = eax + eax * 4; /* 0x30001A2E: lea ecx, [eax + eax*4] */
   2694     if (2u) _cf = (((ecx) >> 30) & 1u); /* 0x30001A31: shl ecx, 2 */
   2695     if (2u) { _flag_a = recomp_flags_pack((ecx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   2696     ecx = ecx << 2u; /* 0x30001A31: shl ecx, 2 */
   2697     PUSH32(esp, ecx); /* 0x30001A34: push ecx */
   2698     RECOMP_ICALL(0x300180A8u); /* 0x30001A35: call 0x300180a8 */ /* not lifted */
   2699     RECOMP_FLAGS_IN();
   2700     MEM32(edi + 0x18) = eax; /* 0x30001A3A: mov dword ptr [edi + 0x18], eax */
   2701     ecx = MEM32(ebx + 0x1C); /* 0x30001A3D: mov ecx, dword ptr [ebx + 0x1c] */
   2702     ebx = MEM32(ebx + 0x18); /* 0x30001A40: mov ebx, dword ptr [ebx + 0x18] */
   2703     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2704     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2705     esp = esp + 4; /* 0x30001A43: add esp, 4 */
   2706     _flag_k = FK_ADD;
   2707     /* cmp ebx, ecx */ /* 0x30001A46: cmp ebx, ecx */
   2708     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ecx);
   2709     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2710     _flag_k = FK_CMP;
   2711     esi = eax; /* 0x30001A48: mov esi, eax */
   2712     MEM32(ebp + (-0x10)) = ecx; /* 0x30001A4A: mov dword ptr [ebp - 0x10], ecx */
   2713     MEM32(ebp + (-0x14)) = esi; /* 0x30001A4D: mov dword ptr [ebp - 0x14], esi */
   2714     if (CMP_EQ(_flag_a, _flag_b)) goto L_30001A7F; /* 0x30001A50: je 0x30001a7f */
   2715 L_30001A52:
   2716     MEM32(ebp + (-0x18)) = esi; /* 0x30001A52: mov dword ptr [ebp - 0x18], esi */
   2717     /* test esi, esi */ /* 0x30001A55: test esi, esi */
   2718     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   2719     _cf = 0;
   2720     _flag_k = FK_TEST;
   2721     MEM32(ebp + (-0x4)) = 0; /* 0x30001A57: mov dword ptr [ebp - 4], 0 */
   2722     if (TEST_Z(_flag_a, _flag_b)) goto L_30001A6B; /* 0x30001A5E: je 0x30001a6b */
   2723 L_30001A60:
   2724     PUSH32(esp, ebx); /* 0x30001A60: push ebx */
   2725     ecx = esi; /* 0x30001A61: mov ecx, esi */
   2726     RECOMP_ICALL(0x30007A50u); /* 0x30001A63: call 0x30007a50 */ /* not lifted */
   2727     RECOMP_FLAGS_IN();
   2728     ecx = MEM32(ebp + (-0x10)); /* 0x30001A68: mov ecx, dword ptr [ebp - 0x10] */
   2729 L_30001A6B:
   2730     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   2731     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2732     esi = esi + 0x14u; /* 0x30001A6B: add esi, 0x14 */
   2733     _flag_k = FK_ADD;
   2734     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x14u);
   2735     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2736     ebx = ebx + 0x14u; /* 0x30001A6E: add ebx, 0x14 */
   2737     _flag_k = FK_ADD;
   2738     /* cmp ebx, ecx */ /* 0x30001A71: cmp ebx, ecx */
   2739     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ecx);
   2740     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2741     _flag_k = FK_CMP;
   2742     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x30001A73: mov dword ptr [ebp - 4], 0xffffffff */
   2743     MEM32(ebp + (-0x14)) = esi; /* 0x30001A7A: mov dword ptr [ebp - 0x14], esi */
   2744     RECOMP_BACKEDGE();
   2745     if (CMP_NE(_flag_a, _flag_b)) goto L_30001A52; /* 0x30001A7D: jne 0x30001a52 */
   2746 L_30001A7F:
   2747     eax = MEM32(ebp + 0x8); /* 0x30001A7F: mov eax, dword ptr [ebp + 8] */
   2748     MEM32(edi + 0x1C) = esi; /* 0x30001A82: mov dword ptr [edi + 0x1c], esi */
   2749     MEM32(edi + 0x20) = esi; /* 0x30001A85: mov dword ptr [edi + 0x20], esi */
   2750     edx = MEM32(eax + 0x28); /* 0x30001A88: mov edx, dword ptr [eax + 0x28] */
   2751     MEM32(edi + 0x28) = edx; /* 0x30001A8B: mov dword ptr [edi + 0x28], edx */
   2752     ecx = 0x3001910Cu; /* 0x30001A8E: mov ecx, 0x3001910c */
   2753     MEM32(edi + 0x24) = ecx; /* 0x30001A93: mov dword ptr [edi + 0x24], ecx */
   2754     eax = MEM32(eax + 0x30); /* 0x30001A96: mov eax, dword ptr [eax + 0x30] */
   2755     MEM32(edi + 0x30) = eax; /* 0x30001A99: mov dword ptr [edi + 0x30], eax */
   2756     MEM32(edi + 0x2C) = ecx; /* 0x30001A9C: mov dword ptr [edi + 0x2c], ecx */
   2757     ecx = MEM32(ebp + (-0xC)); /* 0x30001A9F: mov ecx, dword ptr [ebp - 0xc] */
   2758     MEM32(edi) = 0x30019114u; /* 0x30001AA2: mov dword ptr [edi], 0x30019114 */
   2759     eax = edi; /* 0x30001AA8: mov eax, edi */
   2760     edi = POP32_VAL(esp); /* 0x30001AAA: pop edi */
   2761     esi = POP32_VAL(esp); /* 0x30001AAB: pop esi */
   2762     ebx = POP32_VAL(esp); /* 0x30001AAC: pop ebx */
   2763     MEM32(FS_BASE + (0)) = ecx; /* 0x30001AAD: mov dword ptr fs:[0], ecx */
   2764     esp = ebp; /* 0x30001AB4: mov esp, ebp */
   2765     ebp = POP32_VAL(esp); /* 0x30001AB6: pop ebp */
   2766     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30001AB7: ret 4 */
   2767     RECOMP_REGS_OUT();
   2768 }
   2769 
   2770 void sub_30001AC0(void) {
   2771     int _fpu_cmp = 0;
   2772     uint32_t _cf = 0;
   2773     int _df = 1;
   2774     uint32_t _flag_k = FK_NONE;
   2775     uint32_t _flag_a = 0, _flag_b = 0;
   2776     uint32_t _itail_tgt = 0;
   2777     RECOMP_REGS_LOCALS
   2778     RECOMP_ENTER(0x30001AC0u);
   2779 
   2780 L_30001AC0:
   2781     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001AC0: ret  */
   2782     RECOMP_REGS_OUT();
   2783 }
   2784 
   2785 void sub_30001AD0(void) {
   2786     int _fpu_cmp = 0;
   2787     uint32_t _cf = 0;
   2788     int _df = 1;
   2789     uint32_t _flag_k = FK_NONE;
   2790     uint32_t _flag_a = 0, _flag_b = 0;
   2791     uint32_t _itail_tgt = 0;
   2792     RECOMP_REGS_LOCALS
   2793     RECOMP_ENTER(0x30001AD0u);
   2794 
   2795 L_30001AD0:
   2796     PUSH32(esp, ebp); /* 0x30001AD0: push ebp */
   2797     ebp = esp; /* 0x30001AD1: mov ebp, esp */
   2798     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   2799     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2800     esp = esp - 0xCu; /* 0x30001AD3: sub esp, 0xc */
   2801     _flag_k = FK_CMP;
   2802     PUSH32(esp, ebx); /* 0x30001AD6: push ebx */
   2803     PUSH32(esp, esi); /* 0x30001AD7: push esi */
   2804     eax = ecx; /* 0x30001AD8: mov eax, ecx */
   2805     PUSH32(esp, edi); /* 0x30001ADA: push edi */
   2806     edi = MEM32(ebp + 0x8); /* 0x30001ADB: mov edi, dword ptr [ebp + 8] */
   2807     ecx = edi + 0x4; /* 0x30001ADE: lea ecx, [edi + 4] */
   2808     esi = MEM32(ecx); /* 0x30001AE1: mov esi, dword ptr [ecx] */
   2809     edx = eax + 0x4; /* 0x30001AE3: lea edx, [eax + 4] */
   2810     MEM32(edx) = esi; /* 0x30001AE6: mov dword ptr [edx], esi */
   2811     esi = MEM32(ecx + 0x4); /* 0x30001AE8: mov esi, dword ptr [ecx + 4] */
   2812     MEM32(edx + 0x4) = esi; /* 0x30001AEB: mov dword ptr [edx + 4], esi */
   2813     esi = MEM32(ecx + 0x8); /* 0x30001AEE: mov esi, dword ptr [ecx + 8] */
   2814     MEM32(edx + 0x8) = esi; /* 0x30001AF1: mov dword ptr [edx + 8], esi */
   2815     ecx = MEM32(ecx + 0xC); /* 0x30001AF4: mov ecx, dword ptr [ecx + 0xc] */
   2816     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   2817     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2818     edi = edi + 0x14u; /* 0x30001AF7: add edi, 0x14 */
   2819     _flag_k = FK_ADD;
   2820     esi = eax + 0x14; /* 0x30001AFA: lea esi, [eax + 0x14] */
   2821     /* cmp esi, edi */ /* 0x30001AFD: cmp esi, edi */
   2822     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   2823     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2824     _flag_k = FK_CMP;
   2825     MEM32(ebp + (-0x8)) = eax; /* 0x30001AFF: mov dword ptr [ebp - 8], eax */
   2826     MEM32(edx + 0xC) = ecx; /* 0x30001B02: mov dword ptr [edx + 0xc], ecx */
   2827     if (CMP_EQ(_flag_a, _flag_b)) goto L_30001C67; /* 0x30001B05: je 0x30001c67 */
   2828 L_30001B0B:
   2829     eax = MEM32(edi + 0x4); /* 0x30001B0B: mov eax, dword ptr [edi + 4] */
   2830     /* test eax, eax */ /* 0x30001B0E: test eax, eax */
   2831     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   2832     _cf = 0;
   2833     _flag_k = FK_TEST;
   2834     if (TEST_NZ(_flag_a, _flag_b)) goto L_30001B17; /* 0x30001B10: jne 0x30001b17 */
   2835 L_30001B12:
   2836     MEM32(ebp + (-0x4)) = eax; /* 0x30001B12: mov dword ptr [ebp - 4], eax */
   2837     goto L_30001B30; /* 0x30001B15: jmp 0x30001b30 */
   2838 L_30001B17:
   2839     ecx = MEM32(edi + 0x8); /* 0x30001B17: mov ecx, dword ptr [edi + 8] */
   2840     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   2841     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2842     ecx = ecx - eax; /* 0x30001B1A: sub ecx, eax */
   2843     _flag_k = FK_CMP;
   2844     eax = 0x66666667u; /* 0x30001B1C: mov eax, 0x66666667 */
   2845     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30001B21: imul ecx */
   2846       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   2847       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   2848     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001B23: sar edx, 3 */
   2849     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   2850     edx = (uint32_t)((int32_t)edx >> 3u);
   2851     eax = edx; /* 0x30001B26: mov eax, edx */
   2852     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30001B28: shr eax, 0x1f */
   2853     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   2854     eax = eax >> 31u; /* 0x30001B28: shr eax, 0x1f */
   2855     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   2856     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2857     edx = edx + eax; /* 0x30001B2B: add edx, eax */
   2858     _flag_k = FK_ADD;
   2859     MEM32(ebp + (-0x4)) = edx; /* 0x30001B2D: mov dword ptr [ebp - 4], edx */
   2860 L_30001B30:
   2861     ebx = MEM32(esi + 0x4); /* 0x30001B30: mov ebx, dword ptr [esi + 4] */
   2862     /* test ebx, ebx */ /* 0x30001B33: test ebx, ebx */
   2863     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
   2864     _cf = 0;
   2865     _flag_k = FK_TEST;
   2866     if (TEST_NZ(_flag_a, _flag_b)) goto L_30001B3B; /* 0x30001B35: jne 0x30001b3b */
   2867 L_30001B37:
   2868     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2869     edx = 0; /* 0x30001B37: xor edx, edx */
   2870     _cf = 0;
   2871     _flag_k = FK_TEST;
   2872     goto L_30001B51; /* 0x30001B39: jmp 0x30001b51 */
   2873 L_30001B3B:
   2874     ecx = MEM32(esi + 0x8); /* 0x30001B3B: mov ecx, dword ptr [esi + 8] */
   2875     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   2876     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2877     ecx = ecx - ebx; /* 0x30001B3E: sub ecx, ebx */
   2878     _flag_k = FK_CMP;
   2879     eax = 0x66666667u; /* 0x30001B40: mov eax, 0x66666667 */
   2880     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30001B45: imul ecx */
   2881       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   2882       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   2883     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001B47: sar edx, 3 */
   2884     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   2885     edx = (uint32_t)((int32_t)edx >> 3u);
   2886     ecx = edx; /* 0x30001B4A: mov ecx, edx */
   2887     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30001B4C: shr ecx, 0x1f */
   2888     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   2889     ecx = ecx >> 31u; /* 0x30001B4C: shr ecx, 0x1f */
   2890     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   2891     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2892     edx = edx + ecx; /* 0x30001B4F: add edx, ecx */
   2893     _flag_k = FK_ADD;
   2894 L_30001B51:
   2895     /* cmp MEM32(ebp + (-0x4)), edx */ /* 0x30001B51: cmp dword ptr [ebp - 4], edx */
   2896     _flag_a = (uint32_t)(MEM32(ebp + (-0x4))); _flag_b = (uint32_t)(edx);
   2897     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2898     _flag_k = FK_CMP;
   2899     if (CMP_A(_flag_a, _flag_b)) goto L_30001BBA; /* 0x30001B54: ja 0x30001bba */
   2900 L_30001B56:
   2901     eax = MEM32(edi + 0x8); /* 0x30001B56: mov eax, dword ptr [edi + 8] */
   2902     ecx = ebx; /* 0x30001B59: mov ecx, ebx */
   2903     ebx = MEM32(edi + 0x4); /* 0x30001B5B: mov ebx, dword ptr [edi + 4] */
   2904     /* cmp ebx, eax */ /* 0x30001B5E: cmp ebx, eax */
   2905     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
   2906     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2907     _flag_k = FK_CMP;
   2908     MEM32(ebp + (-0xC)) = eax; /* 0x30001B60: mov dword ptr [ebp - 0xc], eax */
   2909     MEM32(ebp + (-0x4)) = ecx; /* 0x30001B63: mov dword ptr [ebp - 4], ecx */
   2910     if (CMP_EQ(_flag_a, _flag_b)) goto L_30001B83; /* 0x30001B66: je 0x30001b83 */
   2911 L_30001B68:
   2912     PUSH32(esp, ebx); /* 0x30001B68: push ebx */
   2913     RECOMP_ICALL(0x300080D0u); /* 0x30001B69: call 0x300080d0 */ /* not lifted */
   2914     RECOMP_FLAGS_IN();
   2915     edx = MEM32(ebp + (-0x4)); /* 0x30001B6E: mov edx, dword ptr [ebp - 4] */
   2916     eax = MEM32(ebp + (-0xC)); /* 0x30001B71: mov eax, dword ptr [ebp - 0xc] */
   2917     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x14u);
   2918     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2919     edx = edx + 0x14u; /* 0x30001B74: add edx, 0x14 */
   2920     _flag_k = FK_ADD;
   2921     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x14u);
   2922     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2923     ebx = ebx + 0x14u; /* 0x30001B77: add ebx, 0x14 */
   2924     _flag_k = FK_ADD;
   2925     /* cmp ebx, eax */ /* 0x30001B7A: cmp ebx, eax */
   2926     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
   2927     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2928     _flag_k = FK_CMP;
   2929     MEM32(ebp + (-0x4)) = edx; /* 0x30001B7C: mov dword ptr [ebp - 4], edx */
   2930     ecx = edx; /* 0x30001B7F: mov ecx, edx */
   2931     RECOMP_BACKEDGE();
   2932     if (CMP_NE(_flag_a, _flag_b)) goto L_30001B68; /* 0x30001B81: jne 0x30001b68 */
   2933 L_30001B83:
   2934     eax = MEM32(esi + 0x8); /* 0x30001B83: mov eax, dword ptr [esi + 8] */
   2935     /* cmp ecx, eax */ /* 0x30001B86: cmp ecx, eax */
   2936     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   2937     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2938     _flag_k = FK_CMP;
   2939     MEM32(ebp + (-0xC)) = eax; /* 0x30001B88: mov dword ptr [ebp - 0xc], eax */
   2940     ebx = ecx; /* 0x30001B8B: mov ebx, ecx */
   2941     if (CMP_EQ(_flag_a, _flag_b)) goto L_30001BA2; /* 0x30001B8D: je 0x30001ba2 */
   2942 L_30001B8F:
   2943     PUSH32(esp, 0); /* 0x30001B8F: push 0 */
   2944     ecx = ebx; /* 0x30001B91: mov ecx, ebx */
   2945     RECOMP_ICALL(0x30001E40u); /* 0x30001B93: call 0x30001e40 */ /* not lifted */
   2946     RECOMP_FLAGS_IN();
   2947     eax = MEM32(ebp + (-0xC)); /* 0x30001B98: mov eax, dword ptr [ebp - 0xc] */
   2948     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x14u);
   2949     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2950     ebx = ebx + 0x14u; /* 0x30001B9B: add ebx, 0x14 */
   2951     _flag_k = FK_ADD;
   2952     /* cmp ebx, eax */ /* 0x30001B9E: cmp ebx, eax */
   2953     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
   2954     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2955     _flag_k = FK_CMP;
   2956     RECOMP_BACKEDGE();
   2957     if (CMP_NE(_flag_a, _flag_b)) goto L_30001B8F; /* 0x30001BA0: jne 0x30001b8f */
   2958 L_30001BA2:
   2959     ecx = edi; /* 0x30001BA2: mov ecx, edi */
   2960     RECOMP_ICALL(0x30001CB0u); /* 0x30001BA4: call 0x30001cb0 */ /* not lifted */
   2961     RECOMP_FLAGS_IN();
   2962     edx = eax + eax * 4; /* 0x30001BA9: lea edx, [eax + eax*4] */
   2963     eax = MEM32(esi + 0x4); /* 0x30001BAC: mov eax, dword ptr [esi + 4] */
   2964     ecx = eax + edx * 4; /* 0x30001BAF: lea ecx, [eax + edx*4] */
   2965     MEM32(esi + 0x8) = ecx; /* 0x30001BB2: mov dword ptr [esi + 8], ecx */
   2966     goto L_30001C64; /* 0x30001BB5: jmp 0x30001c64 */
   2967 L_30001BBA:
   2968     ecx = edi; /* 0x30001BBA: mov ecx, edi */
   2969     RECOMP_ICALL(0x30001CB0u); /* 0x30001BBC: call 0x30001cb0 */ /* not lifted */
   2970     RECOMP_FLAGS_IN();
   2971     ecx = esi; /* 0x30001BC1: mov ecx, esi */
   2972     ebx = eax; /* 0x30001BC3: mov ebx, eax */
   2973     RECOMP_ICALL(0x30001C80u); /* 0x30001BC5: call 0x30001c80 */ /* not lifted */
   2974     RECOMP_FLAGS_IN();
   2975     /* cmp ebx, eax */ /* 0x30001BCA: cmp ebx, eax */
   2976     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
   2977     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2978     _flag_k = FK_CMP;
   2979     if (CMP_A(_flag_a, _flag_b)) goto L_30001C14; /* 0x30001BCC: ja 0x30001c14 */
   2980 L_30001BCE:
   2981     ebx = MEM32(edi + 0x4); /* 0x30001BCE: mov ebx, dword ptr [edi + 4] */
   2982     ecx = esi; /* 0x30001BD1: mov ecx, esi */
   2983     RECOMP_ICALL(0x30001CB0u); /* 0x30001BD3: call 0x30001cb0 */ /* not lifted */
   2984     RECOMP_FLAGS_IN();
   2985     ecx = MEM32(edi + 0x4); /* 0x30001BD8: mov ecx, dword ptr [edi + 4] */
   2986     edx = eax + eax * 4; /* 0x30001BDB: lea edx, [eax + eax*4] */
   2987     eax = MEM32(esi + 0x4); /* 0x30001BDE: mov eax, dword ptr [esi + 4] */
   2988     PUSH32(esp, eax); /* 0x30001BE1: push eax */
   2989     ebx = ebx + edx * 4; /* 0x30001BE2: lea ebx, [ebx + edx*4] */
   2990     PUSH32(esp, ebx); /* 0x30001BE5: push ebx */
   2991     PUSH32(esp, ecx); /* 0x30001BE6: push ecx */
   2992     RECOMP_ICALL(0x30001D40u); /* 0x30001BE7: call 0x30001d40 */ /* not lifted */
   2993     RECOMP_FLAGS_IN();
   2994     edx = MEM32(esi + 0x8); /* 0x30001BEC: mov edx, dword ptr [esi + 8] */
   2995     eax = MEM32(edi + 0x8); /* 0x30001BEF: mov eax, dword ptr [edi + 8] */
   2996     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   2997     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2998     esp = esp + 0xCu; /* 0x30001BF2: add esp, 0xc */
   2999     _flag_k = FK_ADD;
   3000     PUSH32(esp, edx); /* 0x30001BF5: push edx */
   3001     PUSH32(esp, eax); /* 0x30001BF6: push eax */
   3002     PUSH32(esp, ebx); /* 0x30001BF7: push ebx */
   3003     ecx = esi; /* 0x30001BF8: mov ecx, esi */
   3004     RECOMP_ICALL(0x300017D0u); /* 0x30001BFA: call 0x300017d0 */ /* not lifted */
   3005     RECOMP_FLAGS_IN();
   3006     ecx = edi; /* 0x30001BFF: mov ecx, edi */
   3007     RECOMP_ICALL(0x30001CB0u); /* 0x30001C01: call 0x30001cb0 */ /* not lifted */
   3008     RECOMP_FLAGS_IN();
   3009     edx = MEM32(esi + 0x4); /* 0x30001C06: mov edx, dword ptr [esi + 4] */
   3010     ecx = eax + eax * 4; /* 0x30001C09: lea ecx, [eax + eax*4] */
   3011     eax = edx + ecx * 4; /* 0x30001C0C: lea eax, [edx + ecx*4] */
   3012     MEM32(esi + 0x8) = eax; /* 0x30001C0F: mov dword ptr [esi + 8], eax */
   3013     goto L_30001C64; /* 0x30001C12: jmp 0x30001c64 */
   3014 L_30001C14:
   3015     ecx = MEM32(esi + 0x8); /* 0x30001C14: mov ecx, dword ptr [esi + 8] */
   3016     edx = MEM32(esi + 0x4); /* 0x30001C17: mov edx, dword ptr [esi + 4] */
   3017     PUSH32(esp, ecx); /* 0x30001C1A: push ecx */
   3018     PUSH32(esp, edx); /* 0x30001C1B: push edx */
   3019     ecx = esi; /* 0x30001C1C: mov ecx, esi */
   3020     RECOMP_ICALL(0x300017A0u); /* 0x30001C1E: call 0x300017a0 */ /* not lifted */
   3021     RECOMP_FLAGS_IN();
   3022     eax = MEM32(esi + 0x4); /* 0x30001C23: mov eax, dword ptr [esi + 4] */
   3023     PUSH32(esp, eax); /* 0x30001C26: push eax */
   3024     RECOMP_ICALL(0x30018080u); /* 0x30001C27: call 0x30018080 */ /* not lifted */
   3025     RECOMP_FLAGS_IN();
   3026     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3027     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3028     esp = esp + 4; /* 0x30001C2C: add esp, 4 */
   3029     _flag_k = FK_ADD;
   3030     ecx = edi; /* 0x30001C2F: mov ecx, edi */
   3031     RECOMP_ICALL(0x30001CB0u); /* 0x30001C31: call 0x30001cb0 */ /* not lifted */
   3032     RECOMP_FLAGS_IN();
   3033     /* test eax, eax */ /* 0x30001C36: test eax, eax */
   3034     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3035     _cf = 0;
   3036     _flag_k = FK_TEST;
   3037     if (TEST_NS(_flag_a, _flag_b)) goto L_30001C3C; /* 0x30001C38: jge 0x30001c3c */
   3038 L_30001C3A:
   3039     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3040     eax = 0; /* 0x30001C3A: xor eax, eax */
   3041     _cf = 0;
   3042     _flag_k = FK_TEST;
   3043 L_30001C3C:
   3044     ecx = eax + eax * 4; /* 0x30001C3C: lea ecx, [eax + eax*4] */
   3045     if (2u) _cf = (((ecx) >> 30) & 1u); /* 0x30001C3F: shl ecx, 2 */
   3046     if (2u) { _flag_a = recomp_flags_pack((ecx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3047     ecx = ecx << 2u; /* 0x30001C3F: shl ecx, 2 */
   3048     PUSH32(esp, ecx); /* 0x30001C42: push ecx */
   3049     RECOMP_ICALL(0x300180A8u); /* 0x30001C43: call 0x300180a8 */ /* not lifted */
   3050     RECOMP_FLAGS_IN();
   3051     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3052     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3053     esp = esp + 4; /* 0x30001C48: add esp, 4 */
   3054     _flag_k = FK_ADD;
   3055     MEM32(esi + 0x4) = eax; /* 0x30001C4B: mov dword ptr [esi + 4], eax */
   3056     ecx = MEM32(edi + 0x8); /* 0x30001C4E: mov ecx, dword ptr [edi + 8] */
   3057     edi = MEM32(edi + 0x4); /* 0x30001C51: mov edi, dword ptr [edi + 4] */
   3058     PUSH32(esp, eax); /* 0x30001C54: push eax */
   3059     PUSH32(esp, ecx); /* 0x30001C55: push ecx */
   3060     PUSH32(esp, edi); /* 0x30001C56: push edi */
   3061     ecx = esi; /* 0x30001C57: mov ecx, esi */
   3062     RECOMP_ICALL(0x300017D0u); /* 0x30001C59: call 0x300017d0 */ /* not lifted */
   3063     RECOMP_FLAGS_IN();
   3064     MEM32(esi + 0x8) = eax; /* 0x30001C5E: mov dword ptr [esi + 8], eax */
   3065     MEM32(esi + 0xC) = eax; /* 0x30001C61: mov dword ptr [esi + 0xc], eax */
   3066 L_30001C64:
   3067     eax = MEM32(ebp + (-0x8)); /* 0x30001C64: mov eax, dword ptr [ebp - 8] */
   3068 L_30001C67:
   3069     ecx = MEM32(ebp + 0x8); /* 0x30001C67: mov ecx, dword ptr [ebp + 8] */
   3070     edx = MEM32(ecx + 0x28); /* 0x30001C6A: mov edx, dword ptr [ecx + 0x28] */
   3071     edi = POP32_VAL(esp); /* 0x30001C6D: pop edi */
   3072     MEM32(eax + 0x28) = edx; /* 0x30001C6E: mov dword ptr [eax + 0x28], edx */
   3073     ecx = MEM32(ecx + 0x30); /* 0x30001C71: mov ecx, dword ptr [ecx + 0x30] */
   3074     esi = POP32_VAL(esp); /* 0x30001C74: pop esi */
   3075     MEM32(eax + 0x30) = ecx; /* 0x30001C75: mov dword ptr [eax + 0x30], ecx */
   3076     ebx = POP32_VAL(esp); /* 0x30001C78: pop ebx */
   3077     esp = ebp; /* 0x30001C79: mov esp, ebp */
   3078     ebp = POP32_VAL(esp); /* 0x30001C7B: pop ebp */
   3079     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30001C7C: ret 4 */
   3080     RECOMP_REGS_OUT();
   3081 }
   3082 
   3083 void sub_30001C64(void) {
   3084     int _fpu_cmp = 0;
   3085     uint32_t _cf = 0;
   3086     int _df = 1;
   3087     uint32_t _flag_k = FK_NONE;
   3088     uint32_t _flag_a = 0, _flag_b = 0;
   3089     uint32_t _itail_tgt = 0;
   3090     RECOMP_REGS_LOCALS
   3091     RECOMP_ENTER(0x30001C64u);
   3092 
   3093 L_30001C64:
   3094     eax = MEM32(ebp + (-0x8)); /* 0x30001C64: mov eax, dword ptr [ebp - 8] */
   3095     ecx = MEM32(ebp + 0x8); /* 0x30001C67: mov ecx, dword ptr [ebp + 8] */
   3096     edx = MEM32(ecx + 0x28); /* 0x30001C6A: mov edx, dword ptr [ecx + 0x28] */
   3097     edi = POP32_VAL(esp); /* 0x30001C6D: pop edi */
   3098     MEM32(eax + 0x28) = edx; /* 0x30001C6E: mov dword ptr [eax + 0x28], edx */
   3099     ecx = MEM32(ecx + 0x30); /* 0x30001C71: mov ecx, dword ptr [ecx + 0x30] */
   3100     esi = POP32_VAL(esp); /* 0x30001C74: pop esi */
   3101     MEM32(eax + 0x30) = ecx; /* 0x30001C75: mov dword ptr [eax + 0x30], ecx */
   3102     ebx = POP32_VAL(esp); /* 0x30001C78: pop ebx */
   3103     esp = ebp; /* 0x30001C79: mov esp, ebp */
   3104     ebp = POP32_VAL(esp); /* 0x30001C7B: pop ebp */
   3105     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30001C7C: ret 4 */
   3106     RECOMP_REGS_OUT();
   3107 }
   3108 
   3109 void sub_30001C80(void) {
   3110     int _fpu_cmp = 0;
   3111     uint32_t _cf = 0;
   3112     int _df = 1;
   3113     uint32_t _flag_k = FK_NONE;
   3114     uint32_t _flag_a = 0, _flag_b = 0;
   3115     uint32_t _itail_tgt = 0;
   3116     RECOMP_REGS_LOCALS
   3117     RECOMP_ENTER(0x30001C80u);
   3118 
   3119 L_30001C80:
   3120     eax = MEM32(ecx + 0x4); /* 0x30001C80: mov eax, dword ptr [ecx + 4] */
   3121     /* test eax, eax */ /* 0x30001C83: test eax, eax */
   3122     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3123     _cf = 0;
   3124     _flag_k = FK_TEST;
   3125     if (TEST_NZ(_flag_a, _flag_b)) goto L_30001C88; /* 0x30001C85: jne 0x30001c88 */
   3126 L_30001C87:
   3127     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001C87: ret  */
   3128 L_30001C88:
   3129     ecx = MEM32(ecx + 0xC); /* 0x30001C88: mov ecx, dword ptr [ecx + 0xc] */
   3130     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   3131     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3132     ecx = ecx - eax; /* 0x30001C8B: sub ecx, eax */
   3133     _flag_k = FK_CMP;
   3134     eax = 0x66666667u; /* 0x30001C8D: mov eax, 0x66666667 */
   3135     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30001C92: imul ecx */
   3136       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   3137       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   3138     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001C94: sar edx, 3 */
   3139     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3140     edx = (uint32_t)((int32_t)edx >> 3u);
   3141     eax = edx; /* 0x30001C97: mov eax, edx */
   3142     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30001C99: shr eax, 0x1f */
   3143     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3144     eax = eax >> 31u; /* 0x30001C99: shr eax, 0x1f */
   3145     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   3146     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3147     edx = edx + eax; /* 0x30001C9C: add edx, eax */
   3148     _flag_k = FK_ADD;
   3149     eax = edx; /* 0x30001C9E: mov eax, edx */
   3150     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001CA0: ret  */
   3151     RECOMP_REGS_OUT();
   3152 }
   3153 
   3154 void sub_30001CB0(void) {
   3155     int _fpu_cmp = 0;
   3156     uint32_t _cf = 0;
   3157     int _df = 1;
   3158     uint32_t _flag_k = FK_NONE;
   3159     uint32_t _flag_a = 0, _flag_b = 0;
   3160     uint32_t _itail_tgt = 0;
   3161     RECOMP_REGS_LOCALS
   3162     RECOMP_ENTER(0x30001CB0u);
   3163 
   3164 L_30001CB0:
   3165     eax = MEM32(ecx + 0x4); /* 0x30001CB0: mov eax, dword ptr [ecx + 4] */
   3166     /* test eax, eax */ /* 0x30001CB3: test eax, eax */
   3167     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3168     _cf = 0;
   3169     _flag_k = FK_TEST;
   3170     if (TEST_NZ(_flag_a, _flag_b)) goto L_30001CB8; /* 0x30001CB5: jne 0x30001cb8 */
   3171 L_30001CB7:
   3172     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001CB7: ret  */
   3173 L_30001CB8:
   3174     ecx = MEM32(ecx + 0x8); /* 0x30001CB8: mov ecx, dword ptr [ecx + 8] */
   3175     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   3176     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3177     ecx = ecx - eax; /* 0x30001CBB: sub ecx, eax */
   3178     _flag_k = FK_CMP;
   3179     eax = 0x66666667u; /* 0x30001CBD: mov eax, 0x66666667 */
   3180     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30001CC2: imul ecx */
   3181       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   3182       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   3183     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001CC4: sar edx, 3 */
   3184     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3185     edx = (uint32_t)((int32_t)edx >> 3u);
   3186     eax = edx; /* 0x30001CC7: mov eax, edx */
   3187     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30001CC9: shr eax, 0x1f */
   3188     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3189     eax = eax >> 31u; /* 0x30001CC9: shr eax, 0x1f */
   3190     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   3191     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3192     edx = edx + eax; /* 0x30001CCC: add edx, eax */
   3193     _flag_k = FK_ADD;
   3194     eax = edx; /* 0x30001CCE: mov eax, edx */
   3195     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001CD0: ret  */
   3196     RECOMP_REGS_OUT();
   3197 }
   3198 
   3199 void sub_30001CE0(void) {
   3200     int _fpu_cmp = 0;
   3201     uint32_t _cf = 0;
   3202     int _df = 1;
   3203     uint32_t _flag_k = FK_NONE;
   3204     uint32_t _flag_a = 0, _flag_b = 0;
   3205     uint32_t _itail_tgt = 0;
   3206     RECOMP_REGS_LOCALS
   3207     RECOMP_ENTER(0x30001CE0u);
   3208 
   3209 L_30001CE0:
   3210     PUSH32(esp, ebp); /* 0x30001CE0: push ebp */
   3211     ebp = esp; /* 0x30001CE1: mov ebp, esp */
   3212     PUSH32(esp, ebx); /* 0x30001CE3: push ebx */
   3213     SET_LO8(ebx, MEM8(ebp + 0x8)); /* 0x30001CE4: mov bl, byte ptr [ebp + 8] */
   3214     /* test LO8(ebx), 2 */ /* 0x30001CE7: test bl, 2 */
   3215     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(2) << 24;
   3216     _cf = 0;
   3217     _flag_k = FK_NARROW(FK_TEST, 24);
   3218     PUSH32(esp, esi); /* 0x30001CEA: push esi */
   3219     esi = ecx; /* 0x30001CEB: mov esi, ecx */
   3220     if (TEST_Z(_flag_a, _flag_b)) goto L_30001D1B; /* 0x30001CED: je 0x30001d1b */
   3221 L_30001CEF:
   3222     eax = MEM32(esi + (-0x4)); /* 0x30001CEF: mov eax, dword ptr [esi - 4] */
   3223     PUSH32(esp, edi); /* 0x30001CF2: push edi */
   3224     PUSH32(esp, 0x30002140u); /* 0x30001CF3: push 0x30002140 */
   3225     edi = esi + (-0x4); /* 0x30001CF8: lea edi, [esi - 4] */
   3226     PUSH32(esp, eax); /* 0x30001CFB: push eax */
   3227     PUSH32(esp, 0x34u); /* 0x30001CFC: push 0x34 */
   3228     PUSH32(esp, esi); /* 0x30001CFE: push esi */
   3229     RECOMP_ICALL(0x300180FEu); /* 0x30001CFF: call 0x300180fe */ /* not lifted */
   3230     RECOMP_FLAGS_IN();
   3231     /* test LO8(ebx), 1 */ /* 0x30001D04: test bl, 1 */
   3232     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24;
   3233     _cf = 0;
   3234     _flag_k = FK_NARROW(FK_TEST, 24);
   3235     if (TEST_Z(_flag_a, _flag_b)) goto L_30001D12; /* 0x30001D07: je 0x30001d12 */
   3236 L_30001D09:
   3237     PUSH32(esp, edi); /* 0x30001D09: push edi */
   3238     RECOMP_ICALL(0x30018080u); /* 0x30001D0A: call 0x30018080 */ /* not lifted */
   3239     RECOMP_FLAGS_IN();
   3240     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3241     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3242     esp = esp + 4; /* 0x30001D0F: add esp, 4 */
   3243     _flag_k = FK_ADD;
   3244 L_30001D12:
   3245     eax = edi; /* 0x30001D12: mov eax, edi */
   3246     edi = POP32_VAL(esp); /* 0x30001D14: pop edi */
   3247     esi = POP32_VAL(esp); /* 0x30001D15: pop esi */
   3248     ebx = POP32_VAL(esp); /* 0x30001D16: pop ebx */
   3249     ebp = POP32_VAL(esp); /* 0x30001D17: pop ebp */
   3250     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30001D18: ret 4 */
   3251 L_30001D1B:
   3252     ecx = esi; /* 0x30001D1B: mov ecx, esi */
   3253     RECOMP_ICALL(0x30002140u); /* 0x30001D1D: call 0x30002140 */ /* not lifted */
   3254     RECOMP_FLAGS_IN();
   3255     /* test LO8(ebx), 1 */ /* 0x30001D22: test bl, 1 */
   3256     _flag_a = (uint32_t)(LO8(ebx)) << 24; _flag_b = (uint32_t)(1) << 24;
   3257     _cf = 0;
   3258     _flag_k = FK_NARROW(FK_TEST, 24);
   3259     if (TEST_Z(_flag_a, _flag_b)) goto L_30001D30; /* 0x30001D25: je 0x30001d30 */
   3260 L_30001D27:
   3261     PUSH32(esp, esi); /* 0x30001D27: push esi */
   3262     RECOMP_ICALL(0x30018080u); /* 0x30001D28: call 0x30018080 */ /* not lifted */
   3263     RECOMP_FLAGS_IN();
   3264     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3265     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3266     esp = esp + 4; /* 0x30001D2D: add esp, 4 */
   3267     _flag_k = FK_ADD;
   3268 L_30001D30:
   3269     eax = esi; /* 0x30001D30: mov eax, esi */
   3270     esi = POP32_VAL(esp); /* 0x30001D32: pop esi */
   3271     ebx = POP32_VAL(esp); /* 0x30001D33: pop ebx */
   3272     ebp = POP32_VAL(esp); /* 0x30001D34: pop ebp */
   3273     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30001D35: ret 4 */
   3274     RECOMP_REGS_OUT();
   3275 }
   3276 
   3277 void sub_30001D40(void) {
   3278     int _fpu_cmp = 0;
   3279     uint32_t _cf = 0;
   3280     int _df = 1;
   3281     uint32_t _flag_k = FK_NONE;
   3282     uint32_t _flag_a = 0, _flag_b = 0;
   3283     uint32_t _itail_tgt = 0;
   3284     RECOMP_REGS_LOCALS
   3285     RECOMP_ENTER(0x30001D40u);
   3286 
   3287 L_30001D40:
   3288     PUSH32(esp, ebp); /* 0x30001D40: push ebp */
   3289     ebp = esp; /* 0x30001D41: mov ebp, esp */
   3290     PUSH32(esp, ebx); /* 0x30001D43: push ebx */
   3291     ebx = MEM32(ebp + 0xC); /* 0x30001D44: mov ebx, dword ptr [ebp + 0xc] */
   3292     PUSH32(esp, esi); /* 0x30001D47: push esi */
   3293     esi = MEM32(ebp + 0x8); /* 0x30001D48: mov esi, dword ptr [ebp + 8] */
   3294     /* cmp esi, ebx */ /* 0x30001D4B: cmp esi, ebx */
   3295     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   3296     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3297     _flag_k = FK_CMP;
   3298     if (CMP_EQ(_flag_a, _flag_b)) goto L_30001D6C; /* 0x30001D4D: je 0x30001d6c */
   3299 L_30001D4F:
   3300     PUSH32(esp, edi); /* 0x30001D4F: push edi */
   3301     edi = MEM32(ebp + 0x10); /* 0x30001D50: mov edi, dword ptr [ebp + 0x10] */
   3302 L_30001D53:
   3303     PUSH32(esp, esi); /* 0x30001D53: push esi */
   3304     ecx = edi; /* 0x30001D54: mov ecx, edi */
   3305     RECOMP_ICALL(0x300080D0u); /* 0x30001D56: call 0x300080d0 */ /* not lifted */
   3306     RECOMP_FLAGS_IN();
   3307     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   3308     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3309     esi = esi + 0x14u; /* 0x30001D5B: add esi, 0x14 */
   3310     _flag_k = FK_ADD;
   3311     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   3312     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3313     edi = edi + 0x14u; /* 0x30001D5E: add edi, 0x14 */
   3314     _flag_k = FK_ADD;
   3315     /* cmp esi, ebx */ /* 0x30001D61: cmp esi, ebx */
   3316     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   3317     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3318     _flag_k = FK_CMP;
   3319     RECOMP_BACKEDGE();
   3320     if (CMP_NE(_flag_a, _flag_b)) goto L_30001D53; /* 0x30001D63: jne 0x30001d53 */
   3321 L_30001D65:
   3322     eax = edi; /* 0x30001D65: mov eax, edi */
   3323     edi = POP32_VAL(esp); /* 0x30001D67: pop edi */
   3324     esi = POP32_VAL(esp); /* 0x30001D68: pop esi */
   3325     ebx = POP32_VAL(esp); /* 0x30001D69: pop ebx */
   3326     ebp = POP32_VAL(esp); /* 0x30001D6A: pop ebp */
   3327     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001D6B: ret  */
   3328 L_30001D6C:
   3329     eax = MEM32(ebp + 0x10); /* 0x30001D6C: mov eax, dword ptr [ebp + 0x10] */
   3330     esi = POP32_VAL(esp); /* 0x30001D6F: pop esi */
   3331     ebx = POP32_VAL(esp); /* 0x30001D70: pop ebx */
   3332     ebp = POP32_VAL(esp); /* 0x30001D71: pop ebp */
   3333     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001D72: ret  */
   3334     RECOMP_REGS_OUT();
   3335 }
   3336 
   3337 void sub_30001D80(void) {
   3338     int _fpu_cmp = 0;
   3339     uint32_t _cf = 0;
   3340     int _df = 1;
   3341     uint32_t _flag_k = FK_NONE;
   3342     uint32_t _flag_a = 0, _flag_b = 0;
   3343     uint32_t _itail_tgt = 0;
   3344     RECOMP_REGS_LOCALS
   3345     RECOMP_ENTER(0x30001D80u);
   3346 
   3347 L_30001D80:
   3348     PUSH32(esp, ebp); /* 0x30001D80: push ebp */
   3349     ebp = esp; /* 0x30001D81: mov ebp, esp */
   3350     PUSH32(esp, ebx); /* 0x30001D83: push ebx */
   3351     ebx = MEM32(ebp + 0x8); /* 0x30001D84: mov ebx, dword ptr [ebp + 8] */
   3352     PUSH32(esp, esi); /* 0x30001D87: push esi */
   3353     esi = MEM32(ebp + 0xC); /* 0x30001D88: mov esi, dword ptr [ebp + 0xc] */
   3354     /* cmp ebx, esi */ /* 0x30001D8B: cmp ebx, esi */
   3355     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi);
   3356     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3357     _flag_k = FK_CMP;
   3358     if (CMP_EQ(_flag_a, _flag_b)) goto L_30001DAC; /* 0x30001D8D: je 0x30001dac */
   3359 L_30001D8F:
   3360     PUSH32(esp, edi); /* 0x30001D8F: push edi */
   3361     edi = MEM32(ebp + 0x10); /* 0x30001D90: mov edi, dword ptr [ebp + 0x10] */
   3362 L_30001D93:
   3363     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   3364     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3365     esi = esi - 0x14u; /* 0x30001D93: sub esi, 0x14 */
   3366     _flag_k = FK_CMP;
   3367     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   3368     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3369     edi = edi - 0x14u; /* 0x30001D96: sub edi, 0x14 */
   3370     _flag_k = FK_CMP;
   3371     PUSH32(esp, esi); /* 0x30001D99: push esi */
   3372     ecx = edi; /* 0x30001D9A: mov ecx, edi */
   3373     RECOMP_ICALL(0x300080D0u); /* 0x30001D9C: call 0x300080d0 */ /* not lifted */
   3374     RECOMP_FLAGS_IN();
   3375     /* cmp esi, ebx */ /* 0x30001DA1: cmp esi, ebx */
   3376     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   3377     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3378     _flag_k = FK_CMP;
   3379     RECOMP_BACKEDGE();
   3380     if (CMP_NE(_flag_a, _flag_b)) goto L_30001D93; /* 0x30001DA3: jne 0x30001d93 */
   3381 L_30001DA5:
   3382     eax = edi; /* 0x30001DA5: mov eax, edi */
   3383     edi = POP32_VAL(esp); /* 0x30001DA7: pop edi */
   3384     esi = POP32_VAL(esp); /* 0x30001DA8: pop esi */
   3385     ebx = POP32_VAL(esp); /* 0x30001DA9: pop ebx */
   3386     ebp = POP32_VAL(esp); /* 0x30001DAA: pop ebp */
   3387     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001DAB: ret  */
   3388 L_30001DAC:
   3389     eax = MEM32(ebp + 0x10); /* 0x30001DAC: mov eax, dword ptr [ebp + 0x10] */
   3390     esi = POP32_VAL(esp); /* 0x30001DAF: pop esi */
   3391     ebx = POP32_VAL(esp); /* 0x30001DB0: pop ebx */
   3392     ebp = POP32_VAL(esp); /* 0x30001DB1: pop ebp */
   3393     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001DB2: ret  */
   3394     RECOMP_REGS_OUT();
   3395 }
   3396 
   3397 void sub_30001DC0(void) {
   3398     int _fpu_cmp = 0;
   3399     uint32_t _cf = 0;
   3400     int _df = 1;
   3401     uint32_t _flag_k = FK_NONE;
   3402     uint32_t _flag_a = 0, _flag_b = 0;
   3403     uint32_t _itail_tgt = 0;
   3404     RECOMP_REGS_LOCALS
   3405     RECOMP_ENTER(0x30001DC0u);
   3406 
   3407 L_30001DC0:
   3408     PUSH32(esp, ebp); /* 0x30001DC0: push ebp */
   3409     ebp = esp; /* 0x30001DC1: mov ebp, esp */
   3410     PUSH32(esp, esi); /* 0x30001DC3: push esi */
   3411     esi = MEM32(ebp + 0x8); /* 0x30001DC4: mov esi, dword ptr [ebp + 8] */
   3412     PUSH32(esp, edi); /* 0x30001DC7: push edi */
   3413     edi = MEM32(ebp + 0xC); /* 0x30001DC8: mov edi, dword ptr [ebp + 0xc] */
   3414     /* cmp esi, edi */ /* 0x30001DCB: cmp esi, edi */
   3415     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   3416     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3417     _flag_k = FK_CMP;
   3418     if (CMP_EQ(_flag_a, _flag_b)) goto L_30001DE3; /* 0x30001DCD: je 0x30001de3 */
   3419 L_30001DCF:
   3420     PUSH32(esp, ebx); /* 0x30001DCF: push ebx */
   3421     ebx = MEM32(ebp + 0x10); /* 0x30001DD0: mov ebx, dword ptr [ebp + 0x10] */
   3422 L_30001DD3:
   3423     PUSH32(esp, ebx); /* 0x30001DD3: push ebx */
   3424     ecx = esi; /* 0x30001DD4: mov ecx, esi */
   3425     RECOMP_ICALL(0x300080D0u); /* 0x30001DD6: call 0x300080d0 */ /* not lifted */
   3426     RECOMP_FLAGS_IN();
   3427     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   3428     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3429     esi = esi + 0x14u; /* 0x30001DDB: add esi, 0x14 */
   3430     _flag_k = FK_ADD;
   3431     /* cmp esi, edi */ /* 0x30001DDE: cmp esi, edi */
   3432     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   3433     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3434     _flag_k = FK_CMP;
   3435     RECOMP_BACKEDGE();
   3436     if (CMP_NE(_flag_a, _flag_b)) goto L_30001DD3; /* 0x30001DE0: jne 0x30001dd3 */
   3437 L_30001DE2:
   3438     ebx = POP32_VAL(esp); /* 0x30001DE2: pop ebx */
   3439 L_30001DE3:
   3440     edi = POP32_VAL(esp); /* 0x30001DE3: pop edi */
   3441     esi = POP32_VAL(esp); /* 0x30001DE4: pop esi */
   3442     ebp = POP32_VAL(esp); /* 0x30001DE5: pop ebp */
   3443     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001DE6: ret  */
   3444     RECOMP_REGS_OUT();
   3445 }
   3446 
   3447 void sub_30001DF0(void) {
   3448     int _fpu_cmp = 0;
   3449     uint32_t _cf = 0;
   3450     int _df = 1;
   3451     uint32_t _flag_k = FK_NONE;
   3452     uint32_t _flag_a = 0, _flag_b = 0;
   3453     uint32_t _itail_tgt = 0;
   3454     RECOMP_REGS_LOCALS
   3455     RECOMP_ENTER(0x30001DF0u);
   3456 
   3457 L_30001DF0:
   3458     PUSH32(esp, ebp); /* 0x30001DF0: push ebp */
   3459     ebp = esp; /* 0x30001DF1: mov ebp, esp */
   3460     PUSH32(esp, 0xFFFFFFFFu); /* 0x30001DF3: push -1 */
   3461     PUSH32(esp, 0x30018471u); /* 0x30001DF5: push 0x30018471 */
   3462     eax = MEM32(FS_BASE + (0)); /* 0x30001DFA: mov eax, dword ptr fs:[0] */
   3463     PUSH32(esp, eax); /* 0x30001E00: push eax */
   3464     MEM32(FS_BASE + (0)) = esp; /* 0x30001E01: mov dword ptr fs:[0], esp */
   3465     PUSH32(esp, ecx); /* 0x30001E08: push ecx */
   3466     ecx = MEM32(ebp + 0x8); /* 0x30001E09: mov ecx, dword ptr [ebp + 8] */
   3467     MEM32(ebp + (-0x10)) = ecx; /* 0x30001E0C: mov dword ptr [ebp - 0x10], ecx */
   3468     /* test ecx, ecx */ /* 0x30001E0F: test ecx, ecx */
   3469     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   3470     _cf = 0;
   3471     _flag_k = FK_TEST;
   3472     MEM32(ebp + (-0x4)) = 0; /* 0x30001E11: mov dword ptr [ebp - 4], 0 */
   3473     if (TEST_Z(_flag_a, _flag_b)) goto L_30001E23; /* 0x30001E18: je 0x30001e23 */
   3474 L_30001E1A:
   3475     eax = MEM32(ebp + 0xC); /* 0x30001E1A: mov eax, dword ptr [ebp + 0xc] */
   3476     PUSH32(esp, eax); /* 0x30001E1D: push eax */
   3477     RECOMP_ICALL(0x30007A50u); /* 0x30001E1E: call 0x30007a50 */ /* not lifted */
   3478     RECOMP_FLAGS_IN();
   3479 L_30001E23:
   3480     ecx = MEM32(ebp + (-0xC)); /* 0x30001E23: mov ecx, dword ptr [ebp - 0xc] */
   3481     MEM32(FS_BASE + (0)) = ecx; /* 0x30001E26: mov dword ptr fs:[0], ecx */
   3482     esp = ebp; /* 0x30001E2D: mov esp, ebp */
   3483     ebp = POP32_VAL(esp); /* 0x30001E2F: pop ebp */
   3484     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001E30: ret  */
   3485     RECOMP_REGS_OUT();
   3486 }
   3487 
   3488 void sub_30001E40(void) {
   3489     int _fpu_cmp = 0;
   3490     uint32_t _cf = 0;
   3491     int _df = 1;
   3492     uint32_t _flag_k = FK_NONE;
   3493     uint32_t _flag_a = 0, _flag_b = 0;
   3494     uint32_t _itail_tgt = 0;
   3495     RECOMP_REGS_LOCALS
   3496     RECOMP_ENTER(0x30001E40u);
   3497 
   3498 L_30001E40:
   3499     PUSH32(esp, ebp); /* 0x30001E40: push ebp */
   3500     ebp = esp; /* 0x30001E41: mov ebp, esp */
   3501     PUSH32(esp, esi); /* 0x30001E43: push esi */
   3502     esi = ecx; /* 0x30001E44: mov esi, ecx */
   3503     RECOMP_ICALL(0x30007AB0u); /* 0x30001E46: call 0x30007ab0 */ /* not lifted */
   3504     RECOMP_FLAGS_IN();
   3505     /* test MEM8(ebp + 0x8), 1 */ /* 0x30001E4B: test byte ptr [ebp + 8], 1 */
   3506     _flag_a = (uint32_t)(MEM8(ebp + 0x8)) << 24; _flag_b = (uint32_t)(1) << 24;
   3507     _cf = 0;
   3508     _flag_k = FK_NARROW(FK_TEST, 24);
   3509     if (TEST_Z(_flag_a, _flag_b)) goto L_30001E5A; /* 0x30001E4F: je 0x30001e5a */
   3510 L_30001E51:
   3511     PUSH32(esp, esi); /* 0x30001E51: push esi */
   3512     RECOMP_ICALL(0x30018080u); /* 0x30001E52: call 0x30018080 */ /* not lifted */
   3513     RECOMP_FLAGS_IN();
   3514     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3515     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3516     esp = esp + 4; /* 0x30001E57: add esp, 4 */
   3517     _flag_k = FK_ADD;
   3518 L_30001E5A:
   3519     eax = esi; /* 0x30001E5A: mov eax, esi */
   3520     esi = POP32_VAL(esp); /* 0x30001E5C: pop esi */
   3521     ebp = POP32_VAL(esp); /* 0x30001E5D: pop ebp */
   3522     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30001E5E: ret 4 */
   3523     RECOMP_REGS_OUT();
   3524 }
   3525 
   3526 void sub_30001E70(void) {
   3527     int _fpu_cmp = 0;
   3528     uint32_t _cf = 0;
   3529     int _df = 1;
   3530     uint32_t _flag_k = FK_NONE;
   3531     uint32_t _flag_a = 0, _flag_b = 0;
   3532     uint32_t _itail_tgt = 0;
   3533     RECOMP_REGS_LOCALS
   3534     RECOMP_ENTER(0x30001E70u);
   3535 
   3536 L_30001E70:
   3537     PUSH32(esp, ebp); /* 0x30001E70: push ebp */
   3538     ebp = esp; /* 0x30001E71: mov ebp, esp */
   3539     PUSH32(esp, 0xFFFFFFFFu); /* 0x30001E73: push -1 */
   3540     PUSH32(esp, 0x30018496u); /* 0x30001E75: push 0x30018496 */
   3541     eax = MEM32(FS_BASE + (0)); /* 0x30001E7A: mov eax, dword ptr fs:[0] */
   3542     PUSH32(esp, eax); /* 0x30001E80: push eax */
   3543     MEM32(FS_BASE + (0)) = esp; /* 0x30001E81: mov dword ptr fs:[0], esp */
   3544     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3545     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3546     esp = esp - 8; /* 0x30001E88: sub esp, 8 */
   3547     _flag_k = FK_CMP;
   3548     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3549     eax = 0; /* 0x30001E8B: xor eax, eax */
   3550     _cf = 0;
   3551     _flag_k = FK_TEST;
   3552     PUSH32(esp, esi); /* 0x30001E8D: push esi */
   3553     esi = ecx; /* 0x30001E8E: mov esi, ecx */
   3554     SET_LO8(ecx, MEM8(ebp + (-0xD))); /* 0x30001E90: mov cl, byte ptr [ebp - 0xd] */
   3555     MEM32(esi + 0x4) = eax; /* 0x30001E93: mov dword ptr [esi + 4], eax */
   3556     MEM32(esi + 0x8) = eax; /* 0x30001E96: mov dword ptr [esi + 8], eax */
   3557     MEM32(esi + 0xC) = eax; /* 0x30001E99: mov dword ptr [esi + 0xc], eax */
   3558     MEM32(esi + 0x10) = eax; /* 0x30001E9C: mov dword ptr [esi + 0x10], eax */
   3559     MEM32(ebp + (-0x14)) = esi; /* 0x30001E9F: mov dword ptr [ebp - 0x14], esi */
   3560     MEM8(esi + 0x14) = (uint8_t)(LO8(ecx)); /* 0x30001EA2: mov byte ptr [esi + 0x14], cl */
   3561     MEM32(esi + 0x18) = eax; /* 0x30001EA5: mov dword ptr [esi + 0x18], eax */
   3562     MEM32(esi + 0x1C) = eax; /* 0x30001EA8: mov dword ptr [esi + 0x1c], eax */
   3563     MEM32(esi + 0x20) = eax; /* 0x30001EAB: mov dword ptr [esi + 0x20], eax */
   3564     ecx = esi + 0x24; /* 0x30001EAE: lea ecx, [esi + 0x24] */
   3565     MEM32(ebp + (-0x4)) = eax; /* 0x30001EB1: mov dword ptr [ebp - 4], eax */
   3566     RECOMP_ICALL(0x30001000u); /* 0x30001EB4: call 0x30001000 */ /* not lifted */
   3567     RECOMP_FLAGS_IN();
   3568     ecx = esi + 0x2C; /* 0x30001EB9: lea ecx, [esi + 0x2c] */
   3569     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x30001EBC: mov byte ptr [ebp - 4], 1 */
   3570     RECOMP_ICALL(0x30001000u); /* 0x30001EC0: call 0x30001000 */ /* not lifted */
   3571     RECOMP_FLAGS_IN();
   3572     ecx = MEM32(ebp + (-0xC)); /* 0x30001EC5: mov ecx, dword ptr [ebp - 0xc] */
   3573     MEM32(esi) = 0x30019114u; /* 0x30001EC8: mov dword ptr [esi], 0x30019114 */
   3574     eax = esi; /* 0x30001ECE: mov eax, esi */
   3575     esi = POP32_VAL(esp); /* 0x30001ED0: pop esi */
   3576     MEM32(FS_BASE + (0)) = ecx; /* 0x30001ED1: mov dword ptr fs:[0], ecx */
   3577     esp = ebp; /* 0x30001ED8: mov esp, ebp */
   3578     ebp = POP32_VAL(esp); /* 0x30001EDA: pop ebp */
   3579     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30001EDB: ret  */
   3580     RECOMP_REGS_OUT();
   3581 }
   3582 
   3583 void sub_30001EE0(void) {
   3584     int _fpu_cmp = 0;
   3585     uint32_t _cf = 0;
   3586     int _df = 1;
   3587     uint32_t _flag_k = FK_NONE;
   3588     uint32_t _flag_a = 0, _flag_b = 0;
   3589     uint32_t _itail_tgt = 0;
   3590     RECOMP_REGS_LOCALS
   3591     RECOMP_ENTER(0x30001EE0u);
   3592 
   3593 L_30001EE0:
   3594     PUSH32(esp, ebp); /* 0x30001EE0: push ebp */
   3595     ebp = esp; /* 0x30001EE1: mov ebp, esp */
   3596     PUSH32(esp, 0xFFFFFFFFu); /* 0x30001EE3: push -1 */
   3597     PUSH32(esp, 0x300184C1u); /* 0x30001EE5: push 0x300184c1 */
   3598     eax = MEM32(FS_BASE + (0)); /* 0x30001EEA: mov eax, dword ptr fs:[0] */
   3599     PUSH32(esp, eax); /* 0x30001EF0: push eax */
   3600     MEM32(FS_BASE + (0)) = esp; /* 0x30001EF1: mov dword ptr fs:[0], esp */
   3601     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x24u);
   3602     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3603     esp = esp - 0x24u; /* 0x30001EF8: sub esp, 0x24 */
   3604     _flag_k = FK_CMP;
   3605     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3606     eax = 0; /* 0x30001EFB: xor eax, eax */
   3607     _cf = 0;
   3608     _flag_k = FK_TEST;
   3609     PUSH32(esp, ebx); /* 0x30001EFD: push ebx */
   3610     ebx = ecx; /* 0x30001EFE: mov ebx, ecx */
   3611     SET_LO8(ecx, MEM8(ebp + 0xB)); /* 0x30001F00: mov cl, byte ptr [ebp + 0xb] */
   3612     PUSH32(esp, esi); /* 0x30001F03: push esi */
   3613     esi = ebx + 0x14; /* 0x30001F04: lea esi, [ebx + 0x14] */
   3614     MEM32(ebx + 0x4) = eax; /* 0x30001F07: mov dword ptr [ebx + 4], eax */
   3615     MEM32(ebx + 0x8) = eax; /* 0x30001F0A: mov dword ptr [ebx + 8], eax */
   3616     MEM32(ebx + 0xC) = eax; /* 0x30001F0D: mov dword ptr [ebx + 0xc], eax */
   3617     MEM32(ebx + 0x10) = eax; /* 0x30001F10: mov dword ptr [ebx + 0x10], eax */
   3618     PUSH32(esp, edi); /* 0x30001F13: push edi */
   3619     MEM32(ebp + (-0x20)) = ebx; /* 0x30001F14: mov dword ptr [ebp - 0x20], ebx */
   3620     MEM8(esi) = (uint8_t)(LO8(ecx)); /* 0x30001F17: mov byte ptr [esi], cl */
   3621     MEM32(esi + 0x4) = eax; /* 0x30001F19: mov dword ptr [esi + 4], eax */
   3622     MEM32(esi + 0x8) = eax; /* 0x30001F1C: mov dword ptr [esi + 8], eax */
   3623     MEM32(esi + 0xC) = eax; /* 0x30001F1F: mov dword ptr [esi + 0xc], eax */
   3624     ecx = ebx + 0x24; /* 0x30001F22: lea ecx, [ebx + 0x24] */
   3625     MEM32(ebp + (-0x4)) = eax; /* 0x30001F25: mov dword ptr [ebp - 4], eax */
   3626     RECOMP_ICALL(0x30001000u); /* 0x30001F28: call 0x30001000 */ /* not lifted */
   3627     RECOMP_FLAGS_IN();
   3628     ecx = ebx + 0x2C; /* 0x30001F2D: lea ecx, [ebx + 0x2c] */
   3629     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x30001F30: mov byte ptr [ebp - 4], 1 */
   3630     RECOMP_ICALL(0x30001000u); /* 0x30001F34: call 0x30001000 */ /* not lifted */
   3631     RECOMP_FLAGS_IN();
   3632     edx = MEM32(ebp + 0x8); /* 0x30001F39: mov edx, dword ptr [ebp + 8] */
   3633     PUSH32(esp, edx); /* 0x30001F3C: push edx */
   3634     ecx = ebp + (-0x30); /* 0x30001F3D: lea ecx, [ebp - 0x30] */
   3635     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x30001F40: mov byte ptr [ebp - 4], 2 */
   3636     MEM32(ebx) = 0x30019114u; /* 0x30001F44: mov dword ptr [ebx], 0x30019114 */
   3637     RECOMP_ICALL(0x300097A0u); /* 0x30001F4A: call 0x300097a0 */ /* not lifted */
   3638     RECOMP_FLAGS_IN();
   3639     ecx = MEM32(eax); /* 0x30001F4F: mov ecx, dword ptr [eax] */
   3640     MEM32(ebx + 0x4) = ecx; /* 0x30001F51: mov dword ptr [ebx + 4], ecx */
   3641     edx = MEM32(eax + 0x4); /* 0x30001F54: mov edx, dword ptr [eax + 4] */
   3642     MEM32(ebx + 0x8) = edx; /* 0x30001F57: mov dword ptr [ebx + 8], edx */
   3643     ecx = MEM32(eax + 0x8); /* 0x30001F5A: mov ecx, dword ptr [eax + 8] */
   3644     MEM32(ebx + 0xC) = ecx; /* 0x30001F5D: mov dword ptr [ebx + 0xc], ecx */
   3645     edx = MEM32(eax + 0xC); /* 0x30001F60: mov edx, dword ptr [eax + 0xc] */
   3646     MEM32(ebx + 0x10) = edx; /* 0x30001F63: mov dword ptr [ebx + 0x10], edx */
   3647     ecx = MEM32(esi + 0x8); /* 0x30001F66: mov ecx, dword ptr [esi + 8] */
   3648     edx = MEM32(esi + 0xC); /* 0x30001F69: mov edx, dword ptr [esi + 0xc] */
   3649     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   3650     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3651     edx = edx - ecx; /* 0x30001F6C: sub edx, ecx */
   3652     _flag_k = FK_CMP;
   3653     eax = 0x66666667u; /* 0x30001F6E: mov eax, 0x66666667 */
   3654     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x30001F73: imul edx */
   3655       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   3656       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   3657     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001F75: sar edx, 3 */
   3658     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3659     edx = (uint32_t)((int32_t)edx >> 3u);
   3660     eax = edx; /* 0x30001F78: mov eax, edx */
   3661     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30001F7A: shr eax, 0x1f */
   3662     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3663     eax = eax >> 31u; /* 0x30001F7A: shr eax, 0x1f */
   3664     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   3665     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3666     edx = edx + eax; /* 0x30001F7D: add edx, eax */
   3667     _flag_k = FK_ADD;
   3668     /* cmp edx, 1 */ /* 0x30001F7F: cmp edx, 1 */
   3669     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1);
   3670     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3671     _flag_k = FK_CMP;
   3672     edi = ecx; /* 0x30001F82: mov edi, ecx */
   3673     if (CMP_AE(_flag_a, _flag_b)) goto L_3000208A; /* 0x30001F84: jae 0x3000208a */
   3674 L_30001F8A:
   3675     eax = MEM32(esi + 0x4); /* 0x30001F8A: mov eax, dword ptr [esi + 4] */
   3676     /* test eax, eax */ /* 0x30001F8D: test eax, eax */
   3677     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3678     _cf = 0;
   3679     _flag_k = FK_TEST;
   3680     if (TEST_Z(_flag_a, _flag_b)) goto L_30001FAE; /* 0x30001F8F: je 0x30001fae */
   3681 L_30001F91:
   3682     edx = ecx; /* 0x30001F91: mov edx, ecx */
   3683     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   3684     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3685     edx = edx - eax; /* 0x30001F93: sub edx, eax */
   3686     _flag_k = FK_CMP;
   3687     eax = 0x66666667u; /* 0x30001F95: mov eax, 0x66666667 */
   3688     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x30001F9A: imul edx */
   3689       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   3690       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   3691     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001F9C: sar edx, 3 */
   3692     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3693     edx = (uint32_t)((int32_t)edx >> 3u);
   3694     eax = edx; /* 0x30001F9F: mov eax, edx */
   3695     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30001FA1: shr eax, 0x1f */
   3696     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3697     eax = eax >> 31u; /* 0x30001FA1: shr eax, 0x1f */
   3698     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   3699     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3700     edx = edx + eax; /* 0x30001FA4: add edx, eax */
   3701     _flag_k = FK_ADD;
   3702     /* cmp edx, 1 */ /* 0x30001FA6: cmp edx, 1 */
   3703     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1);
   3704     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3705     _flag_k = FK_CMP;
   3706     MEM32(ebp + (-0x14)) = edx; /* 0x30001FA9: mov dword ptr [ebp - 0x14], edx */
   3707     if (CMP_A(_flag_a, _flag_b)) goto L_30001FB5; /* 0x30001FAC: ja 0x30001fb5 */
   3708 L_30001FAE:
   3709     MEM32(ebp + (-0x14)) = 1; /* 0x30001FAE: mov dword ptr [ebp - 0x14], 1 */
   3710 L_30001FB5:
   3711     eax = MEM32(esi + 0x4); /* 0x30001FB5: mov eax, dword ptr [esi + 4] */
   3712     /* test eax, eax */ /* 0x30001FB8: test eax, eax */
   3713     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3714     _cf = 0;
   3715     _flag_k = FK_TEST;
   3716     if (TEST_NZ(_flag_a, _flag_b)) goto L_30001FC0; /* 0x30001FBA: jne 0x30001fc0 */
   3717 L_30001FBC:
   3718     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3719     edx = 0; /* 0x30001FBC: xor edx, edx */
   3720     _cf = 0;
   3721     _flag_k = FK_TEST;
   3722     goto L_30001FD3; /* 0x30001FBE: jmp 0x30001fd3 */
   3723 L_30001FC0:
   3724     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   3725     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3726     ecx = ecx - eax; /* 0x30001FC0: sub ecx, eax */
   3727     _flag_k = FK_CMP;
   3728     eax = 0x66666667u; /* 0x30001FC2: mov eax, 0x66666667 */
   3729     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30001FC7: imul ecx */
   3730       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   3731       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   3732     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30001FC9: sar edx, 3 */
   3733     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3734     edx = (uint32_t)((int32_t)edx >> 3u);
   3735     ecx = edx; /* 0x30001FCC: mov ecx, edx */
   3736     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30001FCE: shr ecx, 0x1f */
   3737     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3738     ecx = ecx >> 31u; /* 0x30001FCE: shr ecx, 0x1f */
   3739     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   3740     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3741     edx = edx + ecx; /* 0x30001FD1: add edx, ecx */
   3742     _flag_k = FK_ADD;
   3743 L_30001FD3:
   3744     eax = MEM32(ebp + (-0x14)); /* 0x30001FD3: mov eax, dword ptr [ebp - 0x14] */
   3745     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   3746     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3747     eax = eax + edx; /* 0x30001FD6: add eax, edx */
   3748     _flag_k = FK_ADD;
   3749     /* test eax, eax */ /* 0x30001FD8: test eax, eax */
   3750     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3751     _cf = 0;
   3752     _flag_k = FK_TEST;
   3753     MEM32(ebp + (-0x18)) = eax; /* 0x30001FDA: mov dword ptr [ebp - 0x18], eax */
   3754     if (TEST_NS(_flag_a, _flag_b)) goto L_30001FE1; /* 0x30001FDD: jge 0x30001fe1 */
   3755 L_30001FDF:
   3756     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3757     eax = 0; /* 0x30001FDF: xor eax, eax */
   3758     _cf = 0;
   3759     _flag_k = FK_TEST;
   3760 L_30001FE1:
   3761     ecx = eax + eax * 4; /* 0x30001FE1: lea ecx, [eax + eax*4] */
   3762     if (2u) _cf = (((ecx) >> 30) & 1u); /* 0x30001FE4: shl ecx, 2 */
   3763     if (2u) { _flag_a = recomp_flags_pack((ecx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3764     ecx = ecx << 2u; /* 0x30001FE4: shl ecx, 2 */
   3765     PUSH32(esp, ecx); /* 0x30001FE7: push ecx */
   3766     RECOMP_ICALL(0x300180A8u); /* 0x30001FE8: call 0x300180a8 */ /* not lifted */
   3767     RECOMP_FLAGS_IN();
   3768     MEM32(ebp + (-0x1C)) = eax; /* 0x30001FED: mov dword ptr [ebp - 0x1c], eax */
   3769     MEM32(ebp + (-0x10)) = eax; /* 0x30001FF0: mov dword ptr [ebp - 0x10], eax */
   3770     eax = MEM32(esi + 0x4); /* 0x30001FF3: mov eax, dword ptr [esi + 4] */
   3771     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3772     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3773     esp = esp + 4; /* 0x30001FF6: add esp, 4 */
   3774     _flag_k = FK_ADD;
   3775     /* cmp eax, edi */ /* 0x30001FF9: cmp eax, edi */
   3776     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   3777     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3778     _flag_k = FK_CMP;
   3779     MEM32(ebp + (-0x14)) = eax; /* 0x30001FFB: mov dword ptr [ebp - 0x14], eax */
   3780     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002023; /* 0x30001FFE: je 0x30002023 */
   3781 L_30002000:
   3782     goto L_30002005; /* 0x30002000: jmp 0x30002005 */
   3783 L_30002002:
   3784     eax = MEM32(ebp + (-0x14)); /* 0x30002002: mov eax, dword ptr [ebp - 0x14] */
   3785 L_30002005:
   3786     edx = MEM32(ebp + (-0x10)); /* 0x30002005: mov edx, dword ptr [ebp - 0x10] */
   3787     PUSH32(esp, eax); /* 0x30002008: push eax */
   3788     PUSH32(esp, edx); /* 0x30002009: push edx */
   3789     RECOMP_ICALL(0x30001DF0u); /* 0x3000200A: call 0x30001df0 */ /* not lifted */
   3790     RECOMP_FLAGS_IN();
   3791     _flag_a = (uint32_t)(MEM32(ebp + (-0x10))); _flag_b = (uint32_t)(0x14u);
   3792     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3793     MEM32(ebp + (-0x10)) = MEM32(ebp + (-0x10)) + 0x14u; /* 0x3000200F: add dword ptr [ebp - 0x10], 0x14 */
   3794     _flag_k = FK_ADD;
   3795     eax = MEM32(ebp + (-0x14)); /* 0x30002013: mov eax, dword ptr [ebp - 0x14] */
   3796     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x14u);
   3797     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3798     eax = eax + 0x14u; /* 0x30002016: add eax, 0x14 */
   3799     _flag_k = FK_ADD;
   3800     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3801     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3802     esp = esp + 8; /* 0x30002019: add esp, 8 */
   3803     _flag_k = FK_ADD;
   3804     /* cmp eax, edi */ /* 0x3000201C: cmp eax, edi */
   3805     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   3806     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3807     _flag_k = FK_CMP;
   3808     MEM32(ebp + (-0x14)) = eax; /* 0x3000201E: mov dword ptr [ebp - 0x14], eax */
   3809     RECOMP_BACKEDGE();
   3810     if (CMP_NE(_flag_a, _flag_b)) goto L_30002002; /* 0x30002021: jne 0x30002002 */
   3811 L_30002023:
   3812     eax = MEM32(ebp + 0x8); /* 0x30002023: mov eax, dword ptr [ebp + 8] */
   3813     ecx = MEM32(ebp + (-0x10)); /* 0x30002026: mov ecx, dword ptr [ebp - 0x10] */
   3814     PUSH32(esp, eax); /* 0x30002029: push eax */
   3815     PUSH32(esp, 1); /* 0x3000202A: push 1 */
   3816     PUSH32(esp, ecx); /* 0x3000202C: push ecx */
   3817     ecx = esi; /* 0x3000202D: mov ecx, esi */
   3818     RECOMP_ICALL(0x30001860u); /* 0x3000202F: call 0x30001860 */ /* not lifted */
   3819     RECOMP_FLAGS_IN();
   3820     edx = MEM32(ebp + (-0x10)); /* 0x30002034: mov edx, dword ptr [ebp - 0x10] */
   3821     eax = MEM32(esi + 0x8); /* 0x30002037: mov eax, dword ptr [esi + 8] */
   3822     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x14u);
   3823     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3824     edx = edx + 0x14u; /* 0x3000203A: add edx, 0x14 */
   3825     _flag_k = FK_ADD;
   3826     PUSH32(esp, edx); /* 0x3000203D: push edx */
   3827     PUSH32(esp, eax); /* 0x3000203E: push eax */
   3828     PUSH32(esp, edi); /* 0x3000203F: push edi */
   3829     ecx = esi; /* 0x30002040: mov ecx, esi */
   3830     RECOMP_ICALL(0x300017D0u); /* 0x30002042: call 0x300017d0 */ /* not lifted */
   3831     RECOMP_FLAGS_IN();
   3832     ecx = MEM32(esi + 0x8); /* 0x30002047: mov ecx, dword ptr [esi + 8] */
   3833     edx = MEM32(esi + 0x4); /* 0x3000204A: mov edx, dword ptr [esi + 4] */
   3834     PUSH32(esp, ecx); /* 0x3000204D: push ecx */
   3835     PUSH32(esp, edx); /* 0x3000204E: push edx */
   3836     ecx = esi; /* 0x3000204F: mov ecx, esi */
   3837     RECOMP_ICALL(0x300017A0u); /* 0x30002051: call 0x300017a0 */ /* not lifted */
   3838     RECOMP_FLAGS_IN();
   3839     eax = MEM32(esi + 0x4); /* 0x30002056: mov eax, dword ptr [esi + 4] */
   3840     PUSH32(esp, eax); /* 0x30002059: push eax */
   3841     RECOMP_ICALL(0x30018080u); /* 0x3000205A: call 0x30018080 */ /* not lifted */
   3842     RECOMP_FLAGS_IN();
   3843     eax = MEM32(ebp + (-0x18)); /* 0x3000205F: mov eax, dword ptr [ebp - 0x18] */
   3844     edi = MEM32(ebp + (-0x1C)); /* 0x30002062: mov edi, dword ptr [ebp - 0x1c] */
   3845     ecx = eax + eax * 4; /* 0x30002065: lea ecx, [eax + eax*4] */
   3846     edx = edi + ecx * 4; /* 0x30002068: lea edx, [edi + ecx*4] */
   3847     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3848     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3849     esp = esp + 4; /* 0x3000206B: add esp, 4 */
   3850     _flag_k = FK_ADD;
   3851     ecx = esi; /* 0x3000206E: mov ecx, esi */
   3852     MEM32(esi + 0xC) = edx; /* 0x30002070: mov dword ptr [esi + 0xc], edx */
   3853     RECOMP_ICALL(0x30001CB0u); /* 0x30002073: call 0x30001cb0 */ /* not lifted */
   3854     RECOMP_FLAGS_IN();
   3855     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   3856     eax = eax + 1; /* 0x30002078: inc eax */
   3857     _flag_k = FK_INC;
   3858     eax = eax + eax * 4; /* 0x30002079: lea eax, [eax + eax*4] */
   3859     ecx = edi + eax * 4; /* 0x3000207C: lea ecx, [edi + eax*4] */
   3860     MEM32(esi + 0x8) = ecx; /* 0x3000207F: mov dword ptr [esi + 8], ecx */
   3861     MEM32(esi + 0x4) = edi; /* 0x30002082: mov dword ptr [esi + 4], edi */
   3862     goto L_30002120; /* 0x30002085: jmp 0x30002120 */
   3863 L_3000208A:
   3864     edx = ecx; /* 0x3000208A: mov edx, ecx */
   3865     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi);
   3866     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3867     edx = edx - edi; /* 0x3000208C: sub edx, edi */
   3868     _flag_k = FK_CMP;
   3869     eax = 0x66666667u; /* 0x3000208E: mov eax, 0x66666667 */
   3870     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x30002093: imul edx */
   3871       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   3872       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   3873     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002095: sar edx, 3 */
   3874     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3875     edx = (uint32_t)((int32_t)edx >> 3u);
   3876     eax = edx; /* 0x30002098: mov eax, edx */
   3877     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x3000209A: shr eax, 0x1f */
   3878     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3879     eax = eax >> 31u; /* 0x3000209A: shr eax, 0x1f */
   3880     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   3881     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3882     edx = edx + eax; /* 0x3000209D: add edx, eax */
   3883     _flag_k = FK_ADD;
   3884     /* cmp edx, 1 */ /* 0x3000209F: cmp edx, 1 */
   3885     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1);
   3886     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3887     _flag_k = FK_CMP;
   3888     if (CMP_AE(_flag_a, _flag_b)) goto L_300020F0; /* 0x300020A2: jae 0x300020f0 */
   3889 L_300020A4:
   3890     edx = edi + 0x14; /* 0x300020A4: lea edx, [edi + 0x14] */
   3891     PUSH32(esp, edx); /* 0x300020A7: push edx */
   3892     PUSH32(esp, ecx); /* 0x300020A8: push ecx */
   3893     PUSH32(esp, edi); /* 0x300020A9: push edi */
   3894     ecx = esi; /* 0x300020AA: mov ecx, esi */
   3895     RECOMP_ICALL(0x300017D0u); /* 0x300020AC: call 0x300017d0 */ /* not lifted */
   3896     RECOMP_FLAGS_IN();
   3897     ecx = MEM32(esi + 0x8); /* 0x300020B1: mov ecx, dword ptr [esi + 8] */
   3898     eax = MEM32(ebp + 0x8); /* 0x300020B4: mov eax, dword ptr [ebp + 8] */
   3899     PUSH32(esp, eax); /* 0x300020B7: push eax */
   3900     edx = ecx; /* 0x300020B8: mov edx, ecx */
   3901     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi);
   3902     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3903     edx = edx - edi; /* 0x300020BA: sub edx, edi */
   3904     _flag_k = FK_CMP;
   3905     eax = 0x66666667u; /* 0x300020BC: mov eax, 0x66666667 */
   3906     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x300020C1: imul edx */
   3907       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   3908       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   3909     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300020C3: sar edx, 3 */
   3910     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3911     edx = (uint32_t)((int32_t)edx >> 3u);
   3912     eax = edx; /* 0x300020C6: mov eax, edx */
   3913     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x300020C8: shr eax, 0x1f */
   3914     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   3915     eax = eax >> 31u; /* 0x300020C8: shr eax, 0x1f */
   3916     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   3917     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3918     edx = edx + eax; /* 0x300020CB: add edx, eax */
   3919     _flag_k = FK_ADD;
   3920     eax = 1; /* 0x300020CD: mov eax, 1 */
   3921     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   3922     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3923     eax = eax - edx; /* 0x300020D2: sub eax, edx */
   3924     _flag_k = FK_CMP;
   3925     PUSH32(esp, eax); /* 0x300020D4: push eax */
   3926     PUSH32(esp, ecx); /* 0x300020D5: push ecx */
   3927     ecx = esi; /* 0x300020D6: mov ecx, esi */
   3928     RECOMP_ICALL(0x30001860u); /* 0x300020D8: call 0x30001860 */ /* not lifted */
   3929     RECOMP_FLAGS_IN();
   3930     ecx = MEM32(ebp + 0x8); /* 0x300020DD: mov ecx, dword ptr [ebp + 8] */
   3931     edx = MEM32(esi + 0x8); /* 0x300020E0: mov edx, dword ptr [esi + 8] */
   3932     PUSH32(esp, ecx); /* 0x300020E3: push ecx */
   3933     PUSH32(esp, edx); /* 0x300020E4: push edx */
   3934     PUSH32(esp, edi); /* 0x300020E5: push edi */
   3935     RECOMP_ICALL(0x30001DC0u); /* 0x300020E6: call 0x30001dc0 */ /* not lifted */
   3936     RECOMP_FLAGS_IN();
   3937     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   3938     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3939     esp = esp + 0xCu; /* 0x300020EB: add esp, 0xc */
   3940     _flag_k = FK_ADD;
   3941     goto L_3000211C; /* 0x300020EE: jmp 0x3000211c */
   3942 L_300020F0:
   3943     PUSH32(esp, ecx); /* 0x300020F0: push ecx */
   3944     PUSH32(esp, ecx); /* 0x300020F1: push ecx */
   3945     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFFFFFFECu);
   3946     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3947     ecx = ecx + 0xFFFFFFECu; /* 0x300020F2: add ecx, -0x14 */
   3948     _flag_k = FK_ADD;
   3949     PUSH32(esp, ecx); /* 0x300020F5: push ecx */
   3950     ecx = esi; /* 0x300020F6: mov ecx, esi */
   3951     RECOMP_ICALL(0x300017D0u); /* 0x300020F8: call 0x300017d0 */ /* not lifted */
   3952     RECOMP_FLAGS_IN();
   3953     eax = MEM32(esi + 0x8); /* 0x300020FD: mov eax, dword ptr [esi + 8] */
   3954     PUSH32(esp, eax); /* 0x30002100: push eax */
   3955     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   3956     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3957     eax = eax + 0xFFFFFFECu; /* 0x30002101: add eax, -0x14 */
   3958     _flag_k = FK_ADD;
   3959     PUSH32(esp, eax); /* 0x30002104: push eax */
   3960     PUSH32(esp, edi); /* 0x30002105: push edi */
   3961     RECOMP_ICALL(0x30001D80u); /* 0x30002106: call 0x30001d80 */ /* not lifted */
   3962     RECOMP_FLAGS_IN();
   3963     eax = MEM32(ebp + 0x8); /* 0x3000210B: mov eax, dword ptr [ebp + 8] */
   3964     PUSH32(esp, eax); /* 0x3000210E: push eax */
   3965     ecx = edi + 0x14; /* 0x3000210F: lea ecx, [edi + 0x14] */
   3966     PUSH32(esp, ecx); /* 0x30002112: push ecx */
   3967     PUSH32(esp, edi); /* 0x30002113: push edi */
   3968     RECOMP_ICALL(0x30001DC0u); /* 0x30002114: call 0x30001dc0 */ /* not lifted */
   3969     RECOMP_FLAGS_IN();
   3970     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u);
   3971     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3972     esp = esp + 0x18u; /* 0x30002119: add esp, 0x18 */
   3973     _flag_k = FK_ADD;
   3974 L_3000211C:
   3975     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(0x14u);
   3976     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3977     MEM32(esi + 0x8) = MEM32(esi + 0x8) + 0x14u; /* 0x3000211C: add dword ptr [esi + 8], 0x14 */
   3978     _flag_k = FK_ADD;
   3979 L_30002120:
   3980     ecx = MEM32(ebp + (-0xC)); /* 0x30002120: mov ecx, dword ptr [ebp - 0xc] */
   3981     edi = POP32_VAL(esp); /* 0x30002123: pop edi */
   3982     esi = POP32_VAL(esp); /* 0x30002124: pop esi */
   3983     eax = ebx; /* 0x30002125: mov eax, ebx */
   3984     ebx = POP32_VAL(esp); /* 0x30002127: pop ebx */
   3985     MEM32(FS_BASE + (0)) = ecx; /* 0x30002128: mov dword ptr fs:[0], ecx */
   3986     esp = ebp; /* 0x3000212F: mov esp, ebp */
   3987     ebp = POP32_VAL(esp); /* 0x30002131: pop ebp */
   3988     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30002132: ret 4 */
   3989     RECOMP_REGS_OUT();
   3990 }
   3991 
   3992 void sub_30002120(void) {
   3993     int _fpu_cmp = 0;
   3994     uint32_t _cf = 0;
   3995     int _df = 1;
   3996     uint32_t _flag_k = FK_NONE;
   3997     uint32_t _flag_a = 0, _flag_b = 0;
   3998     uint32_t _itail_tgt = 0;
   3999     RECOMP_REGS_LOCALS
   4000     RECOMP_ENTER(0x30002120u);
   4001 
   4002 L_30002120:
   4003     ecx = MEM32(ebp + (-0xC)); /* 0x30002120: mov ecx, dword ptr [ebp - 0xc] */
   4004     edi = POP32_VAL(esp); /* 0x30002123: pop edi */
   4005     esi = POP32_VAL(esp); /* 0x30002124: pop esi */
   4006     eax = ebx; /* 0x30002125: mov eax, ebx */
   4007     ebx = POP32_VAL(esp); /* 0x30002127: pop ebx */
   4008     MEM32(FS_BASE + (0)) = ecx; /* 0x30002128: mov dword ptr fs:[0], ecx */
   4009     esp = ebp; /* 0x3000212F: mov esp, ebp */
   4010     ebp = POP32_VAL(esp); /* 0x30002131: pop ebp */
   4011     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30002132: ret 4 */
   4012     RECOMP_REGS_OUT();
   4013 }
   4014 
   4015 void sub_30002140(void) {
   4016     int _fpu_cmp = 0;
   4017     uint32_t _cf = 0;
   4018     int _df = 1;
   4019     uint32_t _flag_k = FK_NONE;
   4020     uint32_t _flag_a = 0, _flag_b = 0;
   4021     uint32_t _itail_tgt = 0;
   4022     RECOMP_REGS_LOCALS
   4023     RECOMP_ENTER(0x30002140u);
   4024 
   4025 L_30002140:
   4026     PUSH32(esp, ebp); /* 0x30002140: push ebp */
   4027     ebp = esp; /* 0x30002141: mov ebp, esp */
   4028     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002143: push -1 */
   4029     PUSH32(esp, 0x300184E6u); /* 0x30002145: push 0x300184e6 */
   4030     eax = MEM32(FS_BASE + (0)); /* 0x3000214A: mov eax, dword ptr fs:[0] */
   4031     PUSH32(esp, eax); /* 0x30002150: push eax */
   4032     MEM32(FS_BASE + (0)) = esp; /* 0x30002151: mov dword ptr fs:[0], esp */
   4033     PUSH32(esp, ecx); /* 0x30002158: push ecx */
   4034     PUSH32(esp, ebx); /* 0x30002159: push ebx */
   4035     PUSH32(esp, esi); /* 0x3000215A: push esi */
   4036     esi = ecx; /* 0x3000215B: mov esi, ecx */
   4037     PUSH32(esp, edi); /* 0x3000215D: push edi */
   4038     MEM32(ebp + (-0x10)) = esi; /* 0x3000215E: mov dword ptr [ebp - 0x10], esi */
   4039     MEM32(esi) = 0x30019114u; /* 0x30002161: mov dword ptr [esi], 0x30019114 */
   4040     ecx = esi + 0x2C; /* 0x30002167: lea ecx, [esi + 0x2c] */
   4041     MEM32(ebp + (-0x4)) = 1; /* 0x3000216A: mov dword ptr [ebp - 4], 1 */
   4042     RECOMP_ICALL(0x30001020u); /* 0x30002171: call 0x30001020 */ /* not lifted */
   4043     RECOMP_FLAGS_IN();
   4044     ecx = esi + 0x24; /* 0x30002176: lea ecx, [esi + 0x24] */
   4045     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x30002179: mov byte ptr [ebp - 4], 0 */
   4046     RECOMP_ICALL(0x30001020u); /* 0x3000217D: call 0x30001020 */ /* not lifted */
   4047     RECOMP_FLAGS_IN();
   4048     ebx = MEM32(esi + 0x1C); /* 0x30002182: mov ebx, dword ptr [esi + 0x1c] */
   4049     edi = MEM32(esi + 0x18); /* 0x30002185: mov edi, dword ptr [esi + 0x18] */
   4050     /* cmp edi, ebx */ /* 0x30002188: cmp edi, ebx */
   4051     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   4052     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4053     _flag_k = FK_CMP;
   4054     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3000218A: mov dword ptr [ebp - 4], 0xffffffff */
   4055     if (CMP_EQ(_flag_a, _flag_b)) goto L_300021A1; /* 0x30002191: je 0x300021a1 */
   4056 L_30002193:
   4057     ecx = edi; /* 0x30002193: mov ecx, edi */
   4058     RECOMP_ICALL(0x30007AB0u); /* 0x30002195: call 0x30007ab0 */ /* not lifted */
   4059     RECOMP_FLAGS_IN();
   4060     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   4061     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4062     edi = edi + 0x14u; /* 0x3000219A: add edi, 0x14 */
   4063     _flag_k = FK_ADD;
   4064     /* cmp edi, ebx */ /* 0x3000219D: cmp edi, ebx */
   4065     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   4066     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4067     _flag_k = FK_CMP;
   4068     RECOMP_BACKEDGE();
   4069     if (CMP_NE(_flag_a, _flag_b)) goto L_30002193; /* 0x3000219F: jne 0x30002193 */
   4070 L_300021A1:
   4071     eax = MEM32(esi + 0x18); /* 0x300021A1: mov eax, dword ptr [esi + 0x18] */
   4072     PUSH32(esp, eax); /* 0x300021A4: push eax */
   4073     RECOMP_ICALL(0x30018080u); /* 0x300021A5: call 0x30018080 */ /* not lifted */
   4074     RECOMP_FLAGS_IN();
   4075     ecx = MEM32(ebp + (-0xC)); /* 0x300021AA: mov ecx, dword ptr [ebp - 0xc] */
   4076     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4077     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4078     esp = esp + 4; /* 0x300021AD: add esp, 4 */
   4079     _flag_k = FK_ADD;
   4080     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4081     eax = 0; /* 0x300021B0: xor eax, eax */
   4082     _cf = 0;
   4083     _flag_k = FK_TEST;
   4084     edi = POP32_VAL(esp); /* 0x300021B2: pop edi */
   4085     MEM32(esi + 0x18) = eax; /* 0x300021B3: mov dword ptr [esi + 0x18], eax */
   4086     MEM32(esi + 0x1C) = eax; /* 0x300021B6: mov dword ptr [esi + 0x1c], eax */
   4087     MEM32(esi + 0x20) = eax; /* 0x300021B9: mov dword ptr [esi + 0x20], eax */
   4088     esi = POP32_VAL(esp); /* 0x300021BC: pop esi */
   4089     ebx = POP32_VAL(esp); /* 0x300021BD: pop ebx */
   4090     MEM32(FS_BASE + (0)) = ecx; /* 0x300021BE: mov dword ptr fs:[0], ecx */
   4091     esp = ebp; /* 0x300021C5: mov esp, ebp */
   4092     ebp = POP32_VAL(esp); /* 0x300021C7: pop ebp */
   4093     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300021C8: ret  */
   4094     RECOMP_REGS_OUT();
   4095 }
   4096 
   4097 void sub_300021D0(void) {
   4098     int _fpu_cmp = 0;
   4099     uint32_t _cf = 0;
   4100     int _df = 1;
   4101     uint32_t _flag_k = FK_NONE;
   4102     uint32_t _flag_a = 0, _flag_b = 0;
   4103     uint32_t _itail_tgt = 0;
   4104     RECOMP_REGS_LOCALS
   4105     RECOMP_ENTER(0x300021D0u);
   4106 
   4107 L_300021D0:
   4108     PUSH32(esp, ebp); /* 0x300021D0: push ebp */
   4109     ebp = esp; /* 0x300021D1: mov ebp, esp */
   4110     PUSH32(esp, 0xFFFFFFFFu); /* 0x300021D3: push -1 */
   4111     PUSH32(esp, 0x30018510u); /* 0x300021D5: push 0x30018510 */
   4112     eax = MEM32(FS_BASE + (0)); /* 0x300021DA: mov eax, dword ptr fs:[0] */
   4113     PUSH32(esp, eax); /* 0x300021E0: push eax */
   4114     MEM32(FS_BASE + (0)) = esp; /* 0x300021E1: mov dword ptr fs:[0], esp */
   4115     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x64u);
   4116     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4117     esp = esp - 0x64u; /* 0x300021E8: sub esp, 0x64 */
   4118     _flag_k = FK_CMP;
   4119     SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x300021EB: mov al, byte ptr [ebp + 0xb] */
   4120     PUSH32(esp, esi); /* 0x300021EE: push esi */
   4121     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4122     esi = 0; /* 0x300021EF: xor esi, esi */
   4123     _cf = 0;
   4124     _flag_k = FK_TEST;
   4125     PUSH32(esp, edi); /* 0x300021F1: push edi */
   4126     MEM32(ebp + (-0x10)) = ecx; /* 0x300021F2: mov dword ptr [ebp - 0x10], ecx */
   4127     MEM8(ebp + (-0x48)) = (uint8_t)(LO8(eax)); /* 0x300021F5: mov byte ptr [ebp - 0x48], al */
   4128     MEM32(ebp + (-0x44)) = esi; /* 0x300021F8: mov dword ptr [ebp - 0x44], esi */
   4129     MEM32(ebp + (-0x40)) = esi; /* 0x300021FB: mov dword ptr [ebp - 0x40], esi */
   4130     MEM32(ebp + (-0x3C)) = esi; /* 0x300021FE: mov dword ptr [ebp - 0x3c], esi */
   4131     edi = MEM32(ebp + 0x8); /* 0x30002201: mov edi, dword ptr [ebp + 8] */
   4132     eax = MEM32(edi + 0x4); /* 0x30002204: mov eax, dword ptr [edi + 4] */
   4133     /* cmp eax, esi */ /* 0x30002207: cmp eax, esi */
   4134     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi);
   4135     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4136     _flag_k = FK_CMP;
   4137     MEM32(ebp + (-0x4)) = esi; /* 0x30002209: mov dword ptr [ebp - 4], esi */
   4138     if (CMP_NE(_flag_a, _flag_b)) goto L_30002212; /* 0x3000220C: jne 0x30002212 */
   4139 L_3000220E:
   4140     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4141     edx = 0; /* 0x3000220E: xor edx, edx */
   4142     _cf = 0;
   4143     _flag_k = FK_TEST;
   4144     goto L_30002228; /* 0x30002210: jmp 0x30002228 */
   4145 L_30002212:
   4146     ecx = MEM32(edi + 0x8); /* 0x30002212: mov ecx, dword ptr [edi + 8] */
   4147     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   4148     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4149     ecx = ecx - eax; /* 0x30002215: sub ecx, eax */
   4150     _flag_k = FK_CMP;
   4151     eax = 0x66666667u; /* 0x30002217: mov eax, 0x66666667 */
   4152     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x3000221C: imul ecx */
   4153       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   4154       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   4155     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000221E: sar edx, 3 */
   4156     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4157     edx = (uint32_t)((int32_t)edx >> 3u);
   4158     ecx = edx; /* 0x30002221: mov ecx, edx */
   4159     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30002223: shr ecx, 0x1f */
   4160     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4161     ecx = ecx >> 31u; /* 0x30002223: shr ecx, 0x1f */
   4162     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   4163     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4164     edx = edx + ecx; /* 0x30002226: add edx, ecx */
   4165     _flag_k = FK_ADD;
   4166 L_30002228:
   4167     if (1u) _cf = (((edx) >> 0) & 1u); /* 0x30002228: shr edx, 1 */
   4168     if (1u) { _flag_a = recomp_flags_pack((edx >> 1u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4169     edx = edx >> 1u; /* 0x30002228: shr edx, 1 */
   4170     PUSH32(esp, ebx); /* 0x3000222A: push ebx */
   4171     ebx = edx; /* 0x3000222B: mov ebx, edx */
   4172     if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_30002294; /* 0x3000222D: je 0x30002294 */
   4173 L_3000222F:
   4174     /* cmp ebx, esi */ /* 0x3000222F: cmp ebx, esi */
   4175     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi);
   4176     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4177     _flag_k = FK_CMP;
   4178     eax = ebx; /* 0x30002231: mov eax, ebx */
   4179     if (CMP_GE(_flag_a, _flag_b)) goto L_30002237; /* 0x30002233: jge 0x30002237 */
   4180 L_30002235:
   4181     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4182     eax = 0; /* 0x30002235: xor eax, eax */
   4183     _cf = 0;
   4184     _flag_k = FK_TEST;
   4185 L_30002237:
   4186     edx = eax + eax * 4; /* 0x30002237: lea edx, [eax + eax*4] */
   4187     if (2u) _cf = (((edx) >> 30) & 1u); /* 0x3000223A: shl edx, 2 */
   4188     if (2u) { _flag_a = recomp_flags_pack((edx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4189     edx = edx << 2u; /* 0x3000223A: shl edx, 2 */
   4190     PUSH32(esp, edx); /* 0x3000223D: push edx */
   4191     RECOMP_ICALL(0x300180A8u); /* 0x3000223E: call 0x300180a8 */ /* not lifted */
   4192     RECOMP_FLAGS_IN();
   4193     ecx = MEM32(ebp + (-0x44)); /* 0x30002243: mov ecx, dword ptr [ebp - 0x44] */
   4194     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4195     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4196     esp = esp + 4; /* 0x30002246: add esp, 4 */
   4197     _flag_k = FK_ADD;
   4198     esi = eax; /* 0x30002249: mov esi, eax */
   4199     eax = MEM32(ebp + (-0x40)); /* 0x3000224B: mov eax, dword ptr [ebp - 0x40] */
   4200     PUSH32(esp, esi); /* 0x3000224E: push esi */
   4201     PUSH32(esp, eax); /* 0x3000224F: push eax */
   4202     PUSH32(esp, ecx); /* 0x30002250: push ecx */
   4203     ecx = ebp + (-0x48); /* 0x30002251: lea ecx, [ebp - 0x48] */
   4204     RECOMP_ICALL(0x300017D0u); /* 0x30002254: call 0x300017d0 */ /* not lifted */
   4205     RECOMP_FLAGS_IN();
   4206     edx = MEM32(ebp + (-0x40)); /* 0x30002259: mov edx, dword ptr [ebp - 0x40] */
   4207     eax = MEM32(ebp + (-0x44)); /* 0x3000225C: mov eax, dword ptr [ebp - 0x44] */
   4208     PUSH32(esp, edx); /* 0x3000225F: push edx */
   4209     PUSH32(esp, eax); /* 0x30002260: push eax */
   4210     ecx = ebp + (-0x48); /* 0x30002261: lea ecx, [ebp - 0x48] */
   4211     RECOMP_ICALL(0x300017A0u); /* 0x30002264: call 0x300017a0 */ /* not lifted */
   4212     RECOMP_FLAGS_IN();
   4213     ecx = MEM32(ebp + (-0x44)); /* 0x30002269: mov ecx, dword ptr [ebp - 0x44] */
   4214     PUSH32(esp, ecx); /* 0x3000226C: push ecx */
   4215     RECOMP_ICALL(0x30018080u); /* 0x3000226D: call 0x30018080 */ /* not lifted */
   4216     RECOMP_FLAGS_IN();
   4217     edx = ebx + ebx * 4; /* 0x30002272: lea edx, [ebx + ebx*4] */
   4218     eax = esi + edx * 4; /* 0x30002275: lea eax, [esi + edx*4] */
   4219     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4220     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4221     esp = esp + 4; /* 0x30002278: add esp, 4 */
   4222     _flag_k = FK_ADD;
   4223     ecx = ebp + (-0x48); /* 0x3000227B: lea ecx, [ebp - 0x48] */
   4224     MEM32(ebp + (-0x3C)) = eax; /* 0x3000227E: mov dword ptr [ebp - 0x3c], eax */
   4225     RECOMP_ICALL(0x30001CB0u); /* 0x30002281: call 0x30001cb0 */ /* not lifted */
   4226     RECOMP_FLAGS_IN();
   4227     ecx = eax + eax * 4; /* 0x30002286: lea ecx, [eax + eax*4] */
   4228     edx = esi + ecx * 4; /* 0x30002289: lea edx, [esi + ecx*4] */
   4229     MEM32(ebp + (-0x44)) = esi; /* 0x3000228C: mov dword ptr [ebp - 0x44], esi */
   4230     MEM32(ebp + (-0x40)) = edx; /* 0x3000228F: mov dword ptr [ebp - 0x40], edx */
   4231     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4232     esi = 0; /* 0x30002292: xor esi, esi */
   4233     _cf = 0;
   4234     _flag_k = FK_TEST;
   4235 L_30002294:
   4236     SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x30002294: mov al, byte ptr [ebp + 0xb] */
   4237     MEM8(ebp + (-0x38)) = (uint8_t)(LO8(eax)); /* 0x30002297: mov byte ptr [ebp - 0x38], al */
   4238     MEM32(ebp + (-0x34)) = esi; /* 0x3000229A: mov dword ptr [ebp - 0x34], esi */
   4239     MEM32(ebp + (-0x30)) = esi; /* 0x3000229D: mov dword ptr [ebp - 0x30], esi */
   4240     MEM32(ebp + (-0x2C)) = esi; /* 0x300022A0: mov dword ptr [ebp - 0x2c], esi */
   4241     eax = MEM32(edi + 0x4); /* 0x300022A3: mov eax, dword ptr [edi + 4] */
   4242     /* cmp eax, esi */ /* 0x300022A6: cmp eax, esi */
   4243     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi);
   4244     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4245     _flag_k = FK_CMP;
   4246     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x300022A8: mov byte ptr [ebp - 4], 1 */
   4247     if (CMP_NE(_flag_a, _flag_b)) goto L_300022B2; /* 0x300022AC: jne 0x300022b2 */
   4248 L_300022AE:
   4249     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4250     edx = 0; /* 0x300022AE: xor edx, edx */
   4251     _cf = 0;
   4252     _flag_k = FK_TEST;
   4253     goto L_300022C8; /* 0x300022B0: jmp 0x300022c8 */
   4254 L_300022B2:
   4255     ecx = MEM32(edi + 0x8); /* 0x300022B2: mov ecx, dword ptr [edi + 8] */
   4256     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   4257     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4258     ecx = ecx - eax; /* 0x300022B5: sub ecx, eax */
   4259     _flag_k = FK_CMP;
   4260     eax = 0x66666667u; /* 0x300022B7: mov eax, 0x66666667 */
   4261     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x300022BC: imul ecx */
   4262       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   4263       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   4264     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300022BE: sar edx, 3 */
   4265     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4266     edx = (uint32_t)((int32_t)edx >> 3u);
   4267     ecx = edx; /* 0x300022C1: mov ecx, edx */
   4268     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x300022C3: shr ecx, 0x1f */
   4269     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4270     ecx = ecx >> 31u; /* 0x300022C3: shr ecx, 0x1f */
   4271     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   4272     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4273     edx = edx + ecx; /* 0x300022C6: add edx, ecx */
   4274     _flag_k = FK_ADD;
   4275 L_300022C8:
   4276     if (1u) _cf = (((edx) >> 0) & 1u); /* 0x300022C8: shr edx, 1 */
   4277     if (1u) { _flag_a = recomp_flags_pack((edx >> 1u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4278     edx = edx >> 1u; /* 0x300022C8: shr edx, 1 */
   4279     ecx = ebp + (-0x38); /* 0x300022CA: lea ecx, [ebp - 0x38] */
   4280     ebx = edx; /* 0x300022CD: mov ebx, edx */
   4281     RECOMP_ICALL(0x30001C80u); /* 0x300022CF: call 0x30001c80 */ /* not lifted */
   4282     RECOMP_FLAGS_IN();
   4283     /* cmp eax, ebx */ /* 0x300022D4: cmp eax, ebx */
   4284     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   4285     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4286     _flag_k = FK_CMP;
   4287     if (CMP_AE(_flag_a, _flag_b)) goto L_3000233B; /* 0x300022D6: jae 0x3000233b */
   4288 L_300022D8:
   4289     /* test ebx, ebx */ /* 0x300022D8: test ebx, ebx */
   4290     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
   4291     _cf = 0;
   4292     _flag_k = FK_TEST;
   4293     eax = ebx; /* 0x300022DA: mov eax, ebx */
   4294     if (TEST_NS(_flag_a, _flag_b)) goto L_300022E0; /* 0x300022DC: jge 0x300022e0 */
   4295 L_300022DE:
   4296     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4297     eax = 0; /* 0x300022DE: xor eax, eax */
   4298     _cf = 0;
   4299     _flag_k = FK_TEST;
   4300 L_300022E0:
   4301     edx = eax + eax * 4; /* 0x300022E0: lea edx, [eax + eax*4] */
   4302     if (2u) _cf = (((edx) >> 30) & 1u); /* 0x300022E3: shl edx, 2 */
   4303     if (2u) { _flag_a = recomp_flags_pack((edx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4304     edx = edx << 2u; /* 0x300022E3: shl edx, 2 */
   4305     PUSH32(esp, edx); /* 0x300022E6: push edx */
   4306     RECOMP_ICALL(0x300180A8u); /* 0x300022E7: call 0x300180a8 */ /* not lifted */
   4307     RECOMP_FLAGS_IN();
   4308     ecx = MEM32(ebp + (-0x34)); /* 0x300022EC: mov ecx, dword ptr [ebp - 0x34] */
   4309     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4310     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4311     esp = esp + 4; /* 0x300022EF: add esp, 4 */
   4312     _flag_k = FK_ADD;
   4313     esi = eax; /* 0x300022F2: mov esi, eax */
   4314     eax = MEM32(ebp + (-0x30)); /* 0x300022F4: mov eax, dword ptr [ebp - 0x30] */
   4315     PUSH32(esp, esi); /* 0x300022F7: push esi */
   4316     PUSH32(esp, eax); /* 0x300022F8: push eax */
   4317     PUSH32(esp, ecx); /* 0x300022F9: push ecx */
   4318     ecx = ebp + (-0x38); /* 0x300022FA: lea ecx, [ebp - 0x38] */
   4319     RECOMP_ICALL(0x300017D0u); /* 0x300022FD: call 0x300017d0 */ /* not lifted */
   4320     RECOMP_FLAGS_IN();
   4321     edx = MEM32(ebp + (-0x30)); /* 0x30002302: mov edx, dword ptr [ebp - 0x30] */
   4322     eax = MEM32(ebp + (-0x34)); /* 0x30002305: mov eax, dword ptr [ebp - 0x34] */
   4323     PUSH32(esp, edx); /* 0x30002308: push edx */
   4324     PUSH32(esp, eax); /* 0x30002309: push eax */
   4325     ecx = ebp + (-0x38); /* 0x3000230A: lea ecx, [ebp - 0x38] */
   4326     RECOMP_ICALL(0x300017A0u); /* 0x3000230D: call 0x300017a0 */ /* not lifted */
   4327     RECOMP_FLAGS_IN();
   4328     ecx = MEM32(ebp + (-0x34)); /* 0x30002312: mov ecx, dword ptr [ebp - 0x34] */
   4329     PUSH32(esp, ecx); /* 0x30002315: push ecx */
   4330     RECOMP_ICALL(0x30018080u); /* 0x30002316: call 0x30018080 */ /* not lifted */
   4331     RECOMP_FLAGS_IN();
   4332     edx = ebx + ebx * 4; /* 0x3000231B: lea edx, [ebx + ebx*4] */
   4333     eax = esi + edx * 4; /* 0x3000231E: lea eax, [esi + edx*4] */
   4334     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4335     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4336     esp = esp + 4; /* 0x30002321: add esp, 4 */
   4337     _flag_k = FK_ADD;
   4338     ecx = ebp + (-0x38); /* 0x30002324: lea ecx, [ebp - 0x38] */
   4339     MEM32(ebp + (-0x2C)) = eax; /* 0x30002327: mov dword ptr [ebp - 0x2c], eax */
   4340     RECOMP_ICALL(0x30001CB0u); /* 0x3000232A: call 0x30001cb0 */ /* not lifted */
   4341     RECOMP_FLAGS_IN();
   4342     ecx = eax + eax * 4; /* 0x3000232F: lea ecx, [eax + eax*4] */
   4343     edx = esi + ecx * 4; /* 0x30002332: lea edx, [esi + ecx*4] */
   4344     MEM32(ebp + (-0x30)) = edx; /* 0x30002335: mov dword ptr [ebp - 0x30], edx */
   4345     MEM32(ebp + (-0x34)) = esi; /* 0x30002338: mov dword ptr [ebp - 0x34], esi */
   4346 L_3000233B:
   4347     esi = MEM32(edi + 0x4); /* 0x3000233B: mov esi, dword ptr [edi + 4] */
   4348     edi = MEM32(edi + 0x8); /* 0x3000233E: mov edi, dword ptr [edi + 8] */
   4349     ecx = ebp + (-0x70); /* 0x30002341: lea ecx, [ebp - 0x70] */
   4350     MEM32(ebp + 0x8) = edi; /* 0x30002344: mov dword ptr [ebp + 8], edi */
   4351     RECOMP_ICALL(0x30007930u); /* 0x30002347: call 0x30007930 */ /* not lifted */
   4352     RECOMP_FLAGS_IN();
   4353     ecx = ebp + (-0x5C); /* 0x3000234C: lea ecx, [ebp - 0x5c] */
   4354     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x3000234F: mov byte ptr [ebp - 4], 2 */
   4355     RECOMP_ICALL(0x30007930u); /* 0x30002353: call 0x30007930 */ /* not lifted */
   4356     RECOMP_FLAGS_IN();
   4357     /* cmp esi, edi */ /* 0x30002358: cmp esi, edi */
   4358     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   4359     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4360     _flag_k = FK_CMP;
   4361     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x3000235A: mov byte ptr [ebp - 4], 3 */
   4362     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000241B; /* 0x3000235E: je 0x3000241b */
   4363 L_30002364:
   4364     ebx = esi + 0x8; /* 0x30002364: lea ebx, [esi + 8] */
   4365 L_30002367:
   4366     edx = MEM32(ebp + (-0x10)); /* 0x30002367: mov edx, dword ptr [ebp - 0x10] */
   4367     eax = ebp + (-0x5C); /* 0x3000236A: lea eax, [ebp - 0x5c] */
   4368     PUSH32(esp, eax); /* 0x3000236D: push eax */
   4369     ecx = ebp + (-0x70); /* 0x3000236E: lea ecx, [ebp - 0x70] */
   4370     PUSH32(esp, ecx); /* 0x30002371: push ecx */
   4371     PUSH32(esp, esi); /* 0x30002372: push esi */
   4372     ecx = edx + 0x4; /* 0x30002373: lea ecx, [edx + 4] */
   4373     RECOMP_ICALL(0x30009AC0u); /* 0x30002376: call 0x30009ac0 */ /* not lifted */
   4374     RECOMP_FLAGS_IN();
   4375     edi = eax; /* 0x3000237B: mov edi, eax */
   4376     /* test edi, edi */ /* 0x3000237D: test edi, edi */
   4377     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   4378     _cf = 0;
   4379     _flag_k = FK_TEST;
   4380     if (TEST_NZ(_flag_a, _flag_b)) goto L_300023D2; /* 0x3000237F: jne 0x300023d2 */
   4381 L_30002381:
   4382     eax = ebx; /* 0x30002381: mov eax, ebx */
   4383     ecx = MEM32(eax); /* 0x30002383: mov ecx, dword ptr [eax] */
   4384     edx = MEM32(eax + 0x4); /* 0x30002385: mov edx, dword ptr [eax + 4] */
   4385     eax = MEM32(eax + 0x8); /* 0x30002388: mov eax, dword ptr [eax + 8] */
   4386     MEM32(ebp + (-0x1C)) = ecx; /* 0x3000238B: mov dword ptr [ebp - 0x1c], ecx */
   4387     ecx = MEM32(ebp + (-0x10)); /* 0x3000238E: mov ecx, dword ptr [ebp - 0x10] */
   4388     MEM32(ebp + (-0x14)) = eax; /* 0x30002391: mov dword ptr [ebp - 0x14], eax */
   4389     eax = ecx + 0x4; /* 0x30002394: lea eax, [ecx + 4] */
   4390     PUSH32(esp, eax); /* 0x30002397: push eax */
   4391     ecx = ebp + (-0x1C); /* 0x30002398: lea ecx, [ebp - 0x1c] */
   4392     MEM32(ebp + (-0x18)) = edx; /* 0x3000239B: mov dword ptr [ebp - 0x18], edx */
   4393     RECOMP_ICALL(MEM32(0x300190D8)); /* 0x3000239E: call dword ptr [0x300190d8] */
   4394     RECOMP_FLAGS_IN();
   4395     edx = MEM32(eax); /* 0x300023A4: mov edx, dword ptr [eax] */
   4396     MEM32(ebp + (-0x28)) = edx; /* 0x300023A6: mov dword ptr [ebp - 0x28], edx */
   4397     ecx = MEM32(eax + 0x4); /* 0x300023A9: mov ecx, dword ptr [eax + 4] */
   4398     MEM32(ebp + (-0x24)) = ecx; /* 0x300023AC: mov dword ptr [ebp - 0x24], ecx */
   4399     edx = MEM32(eax + 0x8); /* 0x300023AF: mov edx, dword ptr [eax + 8] */
   4400     ecx = ebp + (-0x28); /* 0x300023B2: lea ecx, [ebp - 0x28] */
   4401     MEM32(ebp + (-0x20)) = edx; /* 0x300023B5: mov dword ptr [ebp - 0x20], edx */
   4402     RECOMP_ICALL(MEM32(0x300190E8)); /* 0x300023B8: call dword ptr [0x300190e8] */
   4403     RECOMP_FLAGS_IN();
   4404     { _st[0] = _st[0]; g_st_i64[0] = g_st_i64[0]; fp_pop(); } /* 0x300023BE: fstp st(0) */
   4405     eax = MEM32(ebp + (-0x10)); /* 0x300023C0: mov eax, dword ptr [ebp - 0x10] */
   4406     ecx = eax + 0x14; /* 0x300023C3: lea ecx, [eax + 0x14] */
   4407     eax = MEM32(ecx + 0x8); /* 0x300023C6: mov eax, dword ptr [ecx + 8] */
   4408     PUSH32(esp, esi); /* 0x300023C9: push esi */
   4409     PUSH32(esp, eax); /* 0x300023CA: push eax */
   4410     RECOMP_ICALL(0x30002C40u); /* 0x300023CB: call 0x30002c40 */ /* not lifted */
   4411     RECOMP_FLAGS_IN();
   4412     goto L_3000240A; /* 0x300023D0: jmp 0x3000240a */
   4413 L_300023D2:
   4414     /* cmp edi, 0xFFFFFFFFu */ /* 0x300023D2: cmp edi, -1 */
   4415     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFFu);
   4416     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4417     _flag_k = FK_CMP;
   4418     if (CMP_EQ(_flag_a, _flag_b)) goto L_300023DC; /* 0x300023D5: je 0x300023dc */
   4419 L_300023D7:
   4420     /* cmp edi, 2 */ /* 0x300023D7: cmp edi, 2 */
   4421     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2);
   4422     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4423     _flag_k = FK_CMP;
   4424     if (CMP_NE(_flag_a, _flag_b)) goto L_300023EE; /* 0x300023DA: jne 0x300023ee */
   4425 L_300023DC:
   4426     edx = MEM32(ebp + (-0x40)); /* 0x300023DC: mov edx, dword ptr [ebp - 0x40] */
   4427     ecx = ebp + (-0x70); /* 0x300023DF: lea ecx, [ebp - 0x70] */
   4428     PUSH32(esp, ecx); /* 0x300023E2: push ecx */
   4429     PUSH32(esp, 1); /* 0x300023E3: push 1 */
   4430     PUSH32(esp, edx); /* 0x300023E5: push edx */
   4431     ecx = ebp + (-0x48); /* 0x300023E6: lea ecx, [ebp - 0x48] */
   4432     RECOMP_ICALL(0x30002E30u); /* 0x300023E9: call 0x30002e30 */ /* not lifted */
   4433     RECOMP_FLAGS_IN();
   4434 L_300023EE:
   4435     /* cmp edi, 1 */ /* 0x300023EE: cmp edi, 1 */
   4436     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1);
   4437     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4438     _flag_k = FK_CMP;
   4439     if (CMP_EQ(_flag_a, _flag_b)) goto L_300023F8; /* 0x300023F1: je 0x300023f8 */
   4440 L_300023F3:
   4441     /* cmp edi, 2 */ /* 0x300023F3: cmp edi, 2 */
   4442     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2);
   4443     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4444     _flag_k = FK_CMP;
   4445     if (CMP_NE(_flag_a, _flag_b)) goto L_3000240A; /* 0x300023F6: jne 0x3000240a */
   4446 L_300023F8:
   4447     ecx = MEM32(ebp + (-0x30)); /* 0x300023F8: mov ecx, dword ptr [ebp - 0x30] */
   4448     eax = ebp + (-0x5C); /* 0x300023FB: lea eax, [ebp - 0x5c] */
   4449     PUSH32(esp, eax); /* 0x300023FE: push eax */
   4450     PUSH32(esp, 1); /* 0x300023FF: push 1 */
   4451     PUSH32(esp, ecx); /* 0x30002401: push ecx */
   4452     ecx = ebp + (-0x38); /* 0x30002402: lea ecx, [ebp - 0x38] */
   4453     RECOMP_ICALL(0x30002E30u); /* 0x30002405: call 0x30002e30 */ /* not lifted */
   4454     RECOMP_FLAGS_IN();
   4455 L_3000240A:
   4456     eax = MEM32(ebp + 0x8); /* 0x3000240A: mov eax, dword ptr [ebp + 8] */
   4457     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   4458     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4459     esi = esi + 0x14u; /* 0x3000240D: add esi, 0x14 */
   4460     _flag_k = FK_ADD;
   4461     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x14u);
   4462     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4463     ebx = ebx + 0x14u; /* 0x30002410: add ebx, 0x14 */
   4464     _flag_k = FK_ADD;
   4465     /* cmp esi, eax */ /* 0x30002413: cmp esi, eax */
   4466     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   4467     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4468     _flag_k = FK_CMP;
   4469     RECOMP_BACKEDGE();
   4470     if (CMP_NE(_flag_a, _flag_b)) goto L_30002367; /* 0x30002415: jne 0x30002367 */
   4471 L_3000241B:
   4472     eax = MEM32(ebp + (-0x44)); /* 0x3000241B: mov eax, dword ptr [ebp - 0x44] */
   4473     /* test eax, eax */ /* 0x3000241E: test eax, eax */
   4474     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4475     _cf = 0;
   4476     _flag_k = FK_TEST;
   4477     esi = MEM32(ebp + 0xC); /* 0x30002420: mov esi, dword ptr [ebp + 0xc] */
   4478     ebx = POP32_VAL(esp); /* 0x30002423: pop ebx */
   4479     if (TEST_Z(_flag_a, _flag_b)) goto L_30002450; /* 0x30002424: je 0x30002450 */
   4480 L_30002426:
   4481     ecx = MEM32(ebp + (-0x40)); /* 0x30002426: mov ecx, dword ptr [ebp - 0x40] */
   4482     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   4483     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4484     ecx = ecx - eax; /* 0x30002429: sub ecx, eax */
   4485     _flag_k = FK_CMP;
   4486     eax = 0x66666667u; /* 0x3000242B: mov eax, 0x66666667 */
   4487     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002430: imul ecx */
   4488       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   4489       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   4490     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002432: sar edx, 3 */
   4491     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4492     edx = (uint32_t)((int32_t)edx >> 3u);
   4493     eax = edx; /* 0x30002435: mov eax, edx */
   4494     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002437: shr eax, 0x1f */
   4495     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4496     eax = eax >> 31u; /* 0x30002437: shr eax, 0x1f */
   4497     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   4498     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4499     edx = edx + eax; /* 0x3000243A: add edx, eax */
   4500     _flag_k = FK_ADD;
   4501     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_30002450; /* 0x3000243C: je 0x30002450 */
   4502 L_3000243E:
   4503     edx = MEM32(ebp + (-0x10)); /* 0x3000243E: mov edx, dword ptr [ebp - 0x10] */
   4504     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002441: push -1 */
   4505     PUSH32(esp, esi); /* 0x30002443: push esi */
   4506     ecx = ebp + (-0x48); /* 0x30002444: lea ecx, [ebp - 0x48] */
   4507     PUSH32(esp, ecx); /* 0x30002447: push ecx */
   4508     ecx = edx + 0x24; /* 0x30002448: lea ecx, [edx + 0x24] */
   4509     RECOMP_ICALL(0x30001040u); /* 0x3000244B: call 0x30001040 */ /* not lifted */
   4510     RECOMP_FLAGS_IN();
   4511 L_30002450:
   4512     eax = MEM32(ebp + (-0x34)); /* 0x30002450: mov eax, dword ptr [ebp - 0x34] */
   4513     /* test eax, eax */ /* 0x30002453: test eax, eax */
   4514     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4515     _cf = 0;
   4516     _flag_k = FK_TEST;
   4517     if (TEST_Z(_flag_a, _flag_b)) goto L_30002481; /* 0x30002455: je 0x30002481 */
   4518 L_30002457:
   4519     ecx = MEM32(ebp + (-0x30)); /* 0x30002457: mov ecx, dword ptr [ebp - 0x30] */
   4520     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   4521     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4522     ecx = ecx - eax; /* 0x3000245A: sub ecx, eax */
   4523     _flag_k = FK_CMP;
   4524     eax = 0x66666667u; /* 0x3000245C: mov eax, 0x66666667 */
   4525     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002461: imul ecx */
   4526       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   4527       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   4528     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002463: sar edx, 3 */
   4529     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4530     edx = (uint32_t)((int32_t)edx >> 3u);
   4531     eax = edx; /* 0x30002466: mov eax, edx */
   4532     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002468: shr eax, 0x1f */
   4533     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4534     eax = eax >> 31u; /* 0x30002468: shr eax, 0x1f */
   4535     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   4536     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4537     edx = edx + eax; /* 0x3000246B: add edx, eax */
   4538     _flag_k = FK_ADD;
   4539     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_30002481; /* 0x3000246D: je 0x30002481 */
   4540 L_3000246F:
   4541     edx = MEM32(ebp + (-0x10)); /* 0x3000246F: mov edx, dword ptr [ebp - 0x10] */
   4542     PUSH32(esp, 1); /* 0x30002472: push 1 */
   4543     PUSH32(esp, esi); /* 0x30002474: push esi */
   4544     ecx = ebp + (-0x38); /* 0x30002475: lea ecx, [ebp - 0x38] */
   4545     PUSH32(esp, ecx); /* 0x30002478: push ecx */
   4546     ecx = edx + 0x2C; /* 0x30002479: lea ecx, [edx + 0x2c] */
   4547     RECOMP_ICALL(0x30001040u); /* 0x3000247C: call 0x30001040 */ /* not lifted */
   4548     RECOMP_FLAGS_IN();
   4549 L_30002481:
   4550     ecx = ebp + (-0x5C); /* 0x30002481: lea ecx, [ebp - 0x5c] */
   4551     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x30002484: mov byte ptr [ebp - 4], 2 */
   4552     RECOMP_ICALL(0x30007AB0u); /* 0x30002488: call 0x30007ab0 */ /* not lifted */
   4553     RECOMP_FLAGS_IN();
   4554     ecx = ebp + (-0x70); /* 0x3000248D: lea ecx, [ebp - 0x70] */
   4555     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x30002490: mov byte ptr [ebp - 4], 1 */
   4556     RECOMP_ICALL(0x30007AB0u); /* 0x30002494: call 0x30007ab0 */ /* not lifted */
   4557     RECOMP_FLAGS_IN();
   4558     eax = MEM32(ebp + (-0x30)); /* 0x30002499: mov eax, dword ptr [ebp - 0x30] */
   4559     ecx = MEM32(ebp + (-0x34)); /* 0x3000249C: mov ecx, dword ptr [ebp - 0x34] */
   4560     PUSH32(esp, eax); /* 0x3000249F: push eax */
   4561     PUSH32(esp, ecx); /* 0x300024A0: push ecx */
   4562     ecx = ebp + (-0x38); /* 0x300024A1: lea ecx, [ebp - 0x38] */
   4563     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x300024A4: mov byte ptr [ebp - 4], 0 */
   4564     RECOMP_ICALL(0x300017A0u); /* 0x300024A8: call 0x300017a0 */ /* not lifted */
   4565     RECOMP_FLAGS_IN();
   4566     edx = MEM32(ebp + (-0x34)); /* 0x300024AD: mov edx, dword ptr [ebp - 0x34] */
   4567     PUSH32(esp, edx); /* 0x300024B0: push edx */
   4568     RECOMP_ICALL(0x30018080u); /* 0x300024B1: call 0x30018080 */ /* not lifted */
   4569     RECOMP_FLAGS_IN();
   4570     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4571     eax = 0; /* 0x300024B6: xor eax, eax */
   4572     _cf = 0;
   4573     _flag_k = FK_TEST;
   4574     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4575     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4576     esp = esp + 4; /* 0x300024B8: add esp, 4 */
   4577     _flag_k = FK_ADD;
   4578     ecx = ebp + (-0x48); /* 0x300024BB: lea ecx, [ebp - 0x48] */
   4579     MEM32(ebp + (-0x34)) = eax; /* 0x300024BE: mov dword ptr [ebp - 0x34], eax */
   4580     MEM32(ebp + (-0x30)) = eax; /* 0x300024C1: mov dword ptr [ebp - 0x30], eax */
   4581     MEM32(ebp + (-0x2C)) = eax; /* 0x300024C4: mov dword ptr [ebp - 0x2c], eax */
   4582     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x300024C7: mov dword ptr [ebp - 4], 0xffffffff */
   4583     RECOMP_ICALL(0x30002B80u); /* 0x300024CE: call 0x30002b80 */ /* not lifted */
   4584     RECOMP_FLAGS_IN();
   4585     ecx = MEM32(ebp + (-0xC)); /* 0x300024D3: mov ecx, dword ptr [ebp - 0xc] */
   4586     edi = POP32_VAL(esp); /* 0x300024D6: pop edi */
   4587     esi = POP32_VAL(esp); /* 0x300024D7: pop esi */
   4588     MEM32(FS_BASE + (0)) = ecx; /* 0x300024D8: mov dword ptr fs:[0], ecx */
   4589     esp = ebp; /* 0x300024DF: mov esp, ebp */
   4590     ebp = POP32_VAL(esp); /* 0x300024E1: pop ebp */
   4591     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x300024E2: ret 8 */
   4592     RECOMP_REGS_OUT();
   4593 }
   4594 
   4595 void sub_300024F0(void) {
   4596     int _fpu_cmp = 0;
   4597     uint32_t _cf = 0;
   4598     int _df = 1;
   4599     uint32_t _flag_k = FK_NONE;
   4600     uint32_t _flag_a = 0, _flag_b = 0;
   4601     uint32_t _itail_tgt = 0;
   4602     RECOMP_REGS_LOCALS
   4603     RECOMP_ENTER(0x300024F0u);
   4604 
   4605 L_300024F0:
   4606     PUSH32(esp, ebp); /* 0x300024F0: push ebp */
   4607     ebp = esp; /* 0x300024F1: mov ebp, esp */
   4608     PUSH32(esp, 0xFFFFFFFFu); /* 0x300024F3: push -1 */
   4609     PUSH32(esp, 0x30018540u); /* 0x300024F5: push 0x30018540 */
   4610     eax = MEM32(FS_BASE + (0)); /* 0x300024FA: mov eax, dword ptr fs:[0] */
   4611     PUSH32(esp, eax); /* 0x30002500: push eax */
   4612     MEM32(FS_BASE + (0)) = esp; /* 0x30002501: mov dword ptr fs:[0], esp */
   4613     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x48u);
   4614     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4615     esp = esp - 0x48u; /* 0x30002508: sub esp, 0x48 */
   4616     _flag_k = FK_CMP;
   4617     SET_LO8(eax, MEM8(ebp + 0xF)); /* 0x3000250B: mov al, byte ptr [ebp + 0xf] */
   4618     PUSH32(esp, ebx); /* 0x3000250E: push ebx */
   4619     PUSH32(esp, esi); /* 0x3000250F: push esi */
   4620     MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(eax)); /* 0x30002510: mov byte ptr [ebp - 0x1c], al */
   4621     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4622     eax = 0; /* 0x30002513: xor eax, eax */
   4623     _cf = 0;
   4624     _flag_k = FK_TEST;
   4625     PUSH32(esp, edi); /* 0x30002515: push edi */
   4626     edi = ecx; /* 0x30002516: mov edi, ecx */
   4627     MEM32(ebp + (-0x18)) = eax; /* 0x30002518: mov dword ptr [ebp - 0x18], eax */
   4628     MEM32(ebp + (-0x14)) = eax; /* 0x3000251B: mov dword ptr [ebp - 0x14], eax */
   4629     MEM32(ebp + (-0x10)) = eax; /* 0x3000251E: mov dword ptr [ebp - 0x10], eax */
   4630     SET_LO8(ecx, MEM8(ebp + 0xF)); /* 0x30002521: mov cl, byte ptr [ebp + 0xf] */
   4631     MEM32(ebp + (-0x4)) = eax; /* 0x30002524: mov dword ptr [ebp - 4], eax */
   4632     MEM8(ebp + (-0x2C)) = (uint8_t)(LO8(ecx)); /* 0x30002527: mov byte ptr [ebp - 0x2c], cl */
   4633     MEM32(ebp + (-0x28)) = eax; /* 0x3000252A: mov dword ptr [ebp - 0x28], eax */
   4634     MEM32(ebp + (-0x24)) = eax; /* 0x3000252D: mov dword ptr [ebp - 0x24], eax */
   4635     MEM32(ebp + (-0x20)) = eax; /* 0x30002530: mov dword ptr [ebp - 0x20], eax */
   4636     ecx = ebp + (-0x54); /* 0x30002533: lea ecx, [ebp - 0x54] */
   4637     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x30002536: mov byte ptr [ebp - 4], 1 */
   4638     RECOMP_ICALL(0x30007930u); /* 0x3000253A: call 0x30007930 */ /* not lifted */
   4639     RECOMP_FLAGS_IN();
   4640     ecx = ebp + (-0x40); /* 0x3000253F: lea ecx, [ebp - 0x40] */
   4641     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x30002542: mov byte ptr [ebp - 4], 2 */
   4642     RECOMP_ICALL(0x30007930u); /* 0x30002546: call 0x30007930 */ /* not lifted */
   4643     RECOMP_FLAGS_IN();
   4644     ebx = MEM32(ebp + 0x8); /* 0x3000254B: mov ebx, dword ptr [ebp + 8] */
   4645     edx = ebp + (-0x40); /* 0x3000254E: lea edx, [ebp - 0x40] */
   4646     PUSH32(esp, edx); /* 0x30002551: push edx */
   4647     eax = ebp + (-0x54); /* 0x30002552: lea eax, [ebp - 0x54] */
   4648     PUSH32(esp, eax); /* 0x30002555: push eax */
   4649     PUSH32(esp, ebx); /* 0x30002556: push ebx */
   4650     ecx = edi + 0x4; /* 0x30002557: lea ecx, [edi + 4] */
   4651     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x3000255A: mov byte ptr [ebp - 4], 3 */
   4652     RECOMP_ICALL(0x30009AC0u); /* 0x3000255E: call 0x30009ac0 */ /* not lifted */
   4653     RECOMP_FLAGS_IN();
   4654     esi = eax; /* 0x30002563: mov esi, eax */
   4655     /* test esi, esi */ /* 0x30002565: test esi, esi */
   4656     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(esi);
   4657     _cf = 0;
   4658     _flag_k = FK_TEST;
   4659     if (TEST_NZ(_flag_a, _flag_b)) goto L_3000257A; /* 0x30002567: jne 0x3000257a */
   4660 L_30002569:
   4661     ecx = MEM32(ebp + 0xC); /* 0x30002569: mov ecx, dword ptr [ebp + 0xc] */
   4662     eax = MEM32(ecx + 0x8); /* 0x3000256C: mov eax, dword ptr [ecx + 8] */
   4663     PUSH32(esp, ebx); /* 0x3000256F: push ebx */
   4664     PUSH32(esp, 1); /* 0x30002570: push 1 */
   4665     PUSH32(esp, eax); /* 0x30002572: push eax */
   4666     RECOMP_ICALL(0x30002E30u); /* 0x30002573: call 0x30002e30 */ /* not lifted */
   4667     RECOMP_FLAGS_IN();
   4668     goto L_300025B7; /* 0x30002578: jmp 0x300025b7 */
   4669 L_3000257A:
   4670     /* cmp esi, 0xFFFFFFFFu */ /* 0x3000257A: cmp esi, -1 */
   4671     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xFFFFFFFFu);
   4672     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4673     _flag_k = FK_CMP;
   4674     ebx = MEM32(ebp + 0x10); /* 0x3000257D: mov ebx, dword ptr [ebp + 0x10] */
   4675     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002587; /* 0x30002580: je 0x30002587 */
   4676 L_30002582:
   4677     /* cmp esi, 2 */ /* 0x30002582: cmp esi, 2 */
   4678     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(2);
   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_3000259A; /* 0x30002585: jne 0x3000259a */
   4682 L_30002587:
   4683     ecx = MEM32(ebp + 0xC); /* 0x30002587: mov ecx, dword ptr [ebp + 0xc] */
   4684     PUSH32(esp, 0xFFFFFFFFu); /* 0x3000258A: push -1 */
   4685     PUSH32(esp, ebx); /* 0x3000258C: push ebx */
   4686     PUSH32(esp, ecx); /* 0x3000258D: push ecx */
   4687     edx = ebp + (-0x54); /* 0x3000258E: lea edx, [ebp - 0x54] */
   4688     PUSH32(esp, edx); /* 0x30002591: push edx */
   4689     ecx = edi + 0x24; /* 0x30002592: lea ecx, [edi + 0x24] */
   4690     RECOMP_ICALL(0x30001170u); /* 0x30002595: call 0x30001170 */ /* not lifted */
   4691     RECOMP_FLAGS_IN();
   4692 L_3000259A:
   4693     /* cmp esi, 1 */ /* 0x3000259A: cmp esi, 1 */
   4694     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1);
   4695     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4696     _flag_k = FK_CMP;
   4697     if (CMP_EQ(_flag_a, _flag_b)) goto L_300025A4; /* 0x3000259D: je 0x300025a4 */
   4698 L_3000259F:
   4699     /* cmp esi, 2 */ /* 0x3000259F: cmp esi, 2 */
   4700     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(2);
   4701     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4702     _flag_k = FK_CMP;
   4703     if (CMP_NE(_flag_a, _flag_b)) goto L_300025B7; /* 0x300025A2: jne 0x300025b7 */
   4704 L_300025A4:
   4705     eax = MEM32(ebp + 0xC); /* 0x300025A4: mov eax, dword ptr [ebp + 0xc] */
   4706     PUSH32(esp, 1); /* 0x300025A7: push 1 */
   4707     PUSH32(esp, ebx); /* 0x300025A9: push ebx */
   4708     PUSH32(esp, eax); /* 0x300025AA: push eax */
   4709     ecx = ebp + (-0x40); /* 0x300025AB: lea ecx, [ebp - 0x40] */
   4710     PUSH32(esp, ecx); /* 0x300025AE: push ecx */
   4711     ecx = edi + 0x2C; /* 0x300025AF: lea ecx, [edi + 0x2c] */
   4712     RECOMP_ICALL(0x30001170u); /* 0x300025B2: call 0x30001170 */ /* not lifted */
   4713     RECOMP_FLAGS_IN();
   4714 L_300025B7:
   4715     ecx = ebp + (-0x40); /* 0x300025B7: lea ecx, [ebp - 0x40] */
   4716     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x300025BA: mov byte ptr [ebp - 4], 2 */
   4717     RECOMP_ICALL(0x30007AB0u); /* 0x300025BE: call 0x30007ab0 */ /* not lifted */
   4718     RECOMP_FLAGS_IN();
   4719     ecx = ebp + (-0x54); /* 0x300025C3: lea ecx, [ebp - 0x54] */
   4720     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x300025C6: mov byte ptr [ebp - 4], 1 */
   4721     RECOMP_ICALL(0x30007AB0u); /* 0x300025CA: call 0x30007ab0 */ /* not lifted */
   4722     RECOMP_FLAGS_IN();
   4723     PUSH32(esp, 0); /* 0x300025CF: push 0 */
   4724     RECOMP_ICALL(0x30018080u); /* 0x300025D1: call 0x30018080 */ /* not lifted */
   4725     RECOMP_FLAGS_IN();
   4726     PUSH32(esp, 0); /* 0x300025D6: push 0 */
   4727     RECOMP_ICALL(0x30018080u); /* 0x300025D8: call 0x30018080 */ /* not lifted */
   4728     RECOMP_FLAGS_IN();
   4729     ecx = MEM32(ebp + (-0xC)); /* 0x300025DD: mov ecx, dword ptr [ebp - 0xc] */
   4730     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4731     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4732     esp = esp + 8; /* 0x300025E0: add esp, 8 */
   4733     _flag_k = FK_ADD;
   4734     edi = POP32_VAL(esp); /* 0x300025E3: pop edi */
   4735     esi = POP32_VAL(esp); /* 0x300025E4: pop esi */
   4736     ebx = POP32_VAL(esp); /* 0x300025E5: pop ebx */
   4737     MEM32(FS_BASE + (0)) = ecx; /* 0x300025E6: mov dword ptr fs:[0], ecx */
   4738     esp = ebp; /* 0x300025ED: mov esp, ebp */
   4739     ebp = POP32_VAL(esp); /* 0x300025EF: pop ebp */
   4740     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x300025F0: ret 0xc */
   4741     RECOMP_REGS_OUT();
   4742 }
   4743 
   4744 void sub_30002600(void) {
   4745     int _fpu_cmp = 0;
   4746     uint32_t _cf = 0;
   4747     int _df = 1;
   4748     uint32_t _flag_k = FK_NONE;
   4749     uint32_t _flag_a = 0, _flag_b = 0;
   4750     uint32_t _itail_tgt = 0;
   4751     RECOMP_REGS_LOCALS
   4752     RECOMP_ENTER(0x30002600u);
   4753 
   4754 L_30002600:
   4755     PUSH32(esp, ebp); /* 0x30002600: push ebp */
   4756     ebp = esp; /* 0x30002601: mov ebp, esp */
   4757     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002603: push -1 */
   4758     PUSH32(esp, 0x30018578u); /* 0x30002605: push 0x30018578 */
   4759     eax = MEM32(FS_BASE + (0)); /* 0x3000260A: mov eax, dword ptr fs:[0] */
   4760     PUSH32(esp, eax); /* 0x30002610: push eax */
   4761     MEM32(FS_BASE + (0)) = esp; /* 0x30002611: mov dword ptr fs:[0], esp */
   4762     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x5Cu);
   4763     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4764     esp = esp - 0x5Cu; /* 0x30002618: sub esp, 0x5c */
   4765     _flag_k = FK_CMP;
   4766     SET_LO8(eax, MEM8(ebp + 0xF)); /* 0x3000261B: mov al, byte ptr [ebp + 0xf] */
   4767     PUSH32(esp, ebx); /* 0x3000261E: push ebx */
   4768     PUSH32(esp, esi); /* 0x3000261F: push esi */
   4769     PUSH32(esp, edi); /* 0x30002620: push edi */
   4770     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4771     edi = 0; /* 0x30002621: xor edi, edi */
   4772     _cf = 0;
   4773     _flag_k = FK_TEST;
   4774     ebx = ecx; /* 0x30002623: mov ebx, ecx */
   4775     MEM8(ebp + (-0x2C)) = (uint8_t)(LO8(eax)); /* 0x30002625: mov byte ptr [ebp - 0x2c], al */
   4776     MEM32(ebp + (-0x28)) = edi; /* 0x30002628: mov dword ptr [ebp - 0x28], edi */
   4777     MEM32(ebp + (-0x24)) = edi; /* 0x3000262B: mov dword ptr [ebp - 0x24], edi */
   4778     MEM32(ebp + (-0x20)) = edi; /* 0x3000262E: mov dword ptr [ebp - 0x20], edi */
   4779     SET_LO8(ecx, MEM8(ebp + 0xF)); /* 0x30002631: mov cl, byte ptr [ebp + 0xf] */
   4780     MEM32(ebp + (-0x4)) = edi; /* 0x30002634: mov dword ptr [ebp - 4], edi */
   4781     MEM8(ebp + (-0x1C)) = (uint8_t)(LO8(ecx)); /* 0x30002637: mov byte ptr [ebp - 0x1c], cl */
   4782     MEM32(ebp + (-0x18)) = edi; /* 0x3000263A: mov dword ptr [ebp - 0x18], edi */
   4783     MEM32(ebp + (-0x14)) = edi; /* 0x3000263D: mov dword ptr [ebp - 0x14], edi */
   4784     MEM32(ebp + (-0x10)) = edi; /* 0x30002640: mov dword ptr [ebp - 0x10], edi */
   4785     ecx = ebp + (-0x68); /* 0x30002643: lea ecx, [ebp - 0x68] */
   4786     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x30002646: mov byte ptr [ebp - 4], 1 */
   4787     RECOMP_ICALL(0x30007930u); /* 0x3000264A: call 0x30007930 */ /* not lifted */
   4788     RECOMP_FLAGS_IN();
   4789     ecx = ebp + (-0x54); /* 0x3000264F: lea ecx, [ebp - 0x54] */
   4790     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x30002652: mov byte ptr [ebp - 4], 2 */
   4791     RECOMP_ICALL(0x30007930u); /* 0x30002656: call 0x30007930 */ /* not lifted */
   4792     RECOMP_FLAGS_IN();
   4793     esi = MEM32(ebp + 0x8); /* 0x3000265B: mov esi, dword ptr [ebp + 8] */
   4794     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x3000265E: mov byte ptr [ebp - 4], 3 */
   4795 L_30002662:
   4796     eax = MEM32(esi + 0x4); /* 0x30002662: mov eax, dword ptr [esi + 4] */
   4797     /* cmp eax, edi */ /* 0x30002665: cmp eax, edi */
   4798     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4799     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4800     _flag_k = FK_CMP;
   4801     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002738; /* 0x30002667: je 0x30002738 */
   4802 L_3000266D:
   4803     edi = MEM32(esi + 0x8); /* 0x3000266D: mov edi, dword ptr [esi + 8] */
   4804     ecx = edi; /* 0x30002670: mov ecx, edi */
   4805     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   4806     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4807     ecx = ecx - eax; /* 0x30002672: sub ecx, eax */
   4808     _flag_k = FK_CMP;
   4809     eax = 0x66666667u; /* 0x30002674: mov eax, 0x66666667 */
   4810     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002679: imul ecx */
   4811       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   4812       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   4813     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000267B: sar edx, 3 */
   4814     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4815     edx = (uint32_t)((int32_t)edx >> 3u);
   4816     eax = edx; /* 0x3000267E: mov eax, edx */
   4817     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002680: shr eax, 0x1f */
   4818     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4819     eax = eax >> 31u; /* 0x30002680: shr eax, 0x1f */
   4820     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   4821     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4822     edx = edx + eax; /* 0x30002683: add edx, eax */
   4823     _flag_k = FK_ADD;
   4824     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_30002736; /* 0x30002685: je 0x30002736 */
   4825 L_3000268B:
   4826     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFECu);
   4827     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4828     edi = edi + 0xFFFFFFECu; /* 0x3000268B: add edi, -0x14 */
   4829     _flag_k = FK_ADD;
   4830     PUSH32(esp, edi); /* 0x3000268E: push edi */
   4831     ecx = ebp + (-0x40); /* 0x3000268F: lea ecx, [ebp - 0x40] */
   4832     RECOMP_ICALL(0x30007A50u); /* 0x30002692: call 0x30007a50 */ /* not lifted */
   4833     RECOMP_FLAGS_IN();
   4834     eax = MEM32(esi + 0x8); /* 0x30002697: mov eax, dword ptr [esi + 8] */
   4835     ecx = eax + (-0x14); /* 0x3000269A: lea ecx, [eax - 0x14] */
   4836     PUSH32(esp, ecx); /* 0x3000269D: push ecx */
   4837     PUSH32(esp, eax); /* 0x3000269E: push eax */
   4838     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x14u);
   4839     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4840     ecx = ecx + 0x14u; /* 0x3000269F: add ecx, 0x14 */
   4841     _flag_k = FK_ADD;
   4842     PUSH32(esp, ecx); /* 0x300026A2: push ecx */
   4843     MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x300026A3: mov byte ptr [ebp - 4], 4 */
   4844     RECOMP_ICALL(0x30001D40u); /* 0x300026A7: call 0x30001d40 */ /* not lifted */
   4845     RECOMP_FLAGS_IN();
   4846     eax = MEM32(esi + 0x8); /* 0x300026AC: mov eax, dword ptr [esi + 8] */
   4847     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   4848     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4849     esp = esp + 0xCu; /* 0x300026AF: add esp, 0xc */
   4850     _flag_k = FK_ADD;
   4851     PUSH32(esp, eax); /* 0x300026B2: push eax */
   4852     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   4853     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4854     eax = eax + 0xFFFFFFECu; /* 0x300026B3: add eax, -0x14 */
   4855     _flag_k = FK_ADD;
   4856     PUSH32(esp, eax); /* 0x300026B6: push eax */
   4857     ecx = esi; /* 0x300026B7: mov ecx, esi */
   4858     RECOMP_ICALL(0x300017A0u); /* 0x300026B9: call 0x300017a0 */ /* not lifted */
   4859     RECOMP_FLAGS_IN();
   4860     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(0xFFFFFFECu);
   4861     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4862     MEM32(esi + 0x8) = MEM32(esi + 0x8) + 0xFFFFFFECu; /* 0x300026BE: add dword ptr [esi + 8], -0x14 */
   4863     _flag_k = FK_ADD;
   4864     ecx = ebp + (-0x54); /* 0x300026C2: lea ecx, [ebp - 0x54] */
   4865     PUSH32(esp, ecx); /* 0x300026C5: push ecx */
   4866     edx = ebp + (-0x68); /* 0x300026C6: lea edx, [ebp - 0x68] */
   4867     PUSH32(esp, edx); /* 0x300026C9: push edx */
   4868     eax = ebp + (-0x40); /* 0x300026CA: lea eax, [ebp - 0x40] */
   4869     PUSH32(esp, eax); /* 0x300026CD: push eax */
   4870     ecx = ebx + 0x4; /* 0x300026CE: lea ecx, [ebx + 4] */
   4871     RECOMP_ICALL(0x30009AC0u); /* 0x300026D1: call 0x30009ac0 */ /* not lifted */
   4872     RECOMP_FLAGS_IN();
   4873     edi = eax; /* 0x300026D6: mov edi, eax */
   4874     /* test edi, edi */ /* 0x300026D8: test edi, edi */
   4875     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   4876     _cf = 0;
   4877     _flag_k = FK_TEST;
   4878     if (TEST_NZ(_flag_a, _flag_b)) goto L_300026EB; /* 0x300026DA: jne 0x300026eb */
   4879 L_300026DC:
   4880     ecx = MEM32(ebp + 0xC); /* 0x300026DC: mov ecx, dword ptr [ebp + 0xc] */
   4881     eax = MEM32(ecx + 0x8); /* 0x300026DF: mov eax, dword ptr [ecx + 8] */
   4882     edx = ebp + (-0x40); /* 0x300026E2: lea edx, [ebp - 0x40] */
   4883     PUSH32(esp, edx); /* 0x300026E5: push edx */
   4884     PUSH32(esp, 1); /* 0x300026E6: push 1 */
   4885     PUSH32(esp, eax); /* 0x300026E8: push eax */
   4886     goto L_3000271E; /* 0x300026E9: jmp 0x3000271e */
   4887 L_300026EB:
   4888     /* cmp edi, 0xFFFFFFFFu */ /* 0x300026EB: cmp edi, -1 */
   4889     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFFu);
   4890     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4891     _flag_k = FK_CMP;
   4892     if (CMP_EQ(_flag_a, _flag_b)) goto L_300026F5; /* 0x300026EE: je 0x300026f5 */
   4893 L_300026F0:
   4894     /* cmp edi, 2 */ /* 0x300026F0: cmp edi, 2 */
   4895     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2);
   4896     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4897     _flag_k = FK_CMP;
   4898     if (CMP_NE(_flag_a, _flag_b)) goto L_30002707; /* 0x300026F3: jne 0x30002707 */
   4899 L_300026F5:
   4900     ecx = MEM32(ebp + (-0x24)); /* 0x300026F5: mov ecx, dword ptr [ebp - 0x24] */
   4901     eax = ebp + (-0x68); /* 0x300026F8: lea eax, [ebp - 0x68] */
   4902     PUSH32(esp, eax); /* 0x300026FB: push eax */
   4903     PUSH32(esp, 1); /* 0x300026FC: push 1 */
   4904     PUSH32(esp, ecx); /* 0x300026FE: push ecx */
   4905     ecx = ebp + (-0x2C); /* 0x300026FF: lea ecx, [ebp - 0x2c] */
   4906     RECOMP_ICALL(0x30002E30u); /* 0x30002702: call 0x30002e30 */ /* not lifted */
   4907     RECOMP_FLAGS_IN();
   4908 L_30002707:
   4909     /* cmp edi, 1 */ /* 0x30002707: cmp edi, 1 */
   4910     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1);
   4911     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4912     _flag_k = FK_CMP;
   4913     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002711; /* 0x3000270A: je 0x30002711 */
   4914 L_3000270C:
   4915     /* cmp edi, 2 */ /* 0x3000270C: cmp edi, 2 */
   4916     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2);
   4917     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4918     _flag_k = FK_CMP;
   4919     if (CMP_NE(_flag_a, _flag_b)) goto L_30002723; /* 0x3000270F: jne 0x30002723 */
   4920 L_30002711:
   4921     eax = MEM32(ebp + (-0x14)); /* 0x30002711: mov eax, dword ptr [ebp - 0x14] */
   4922     edx = ebp + (-0x54); /* 0x30002714: lea edx, [ebp - 0x54] */
   4923     PUSH32(esp, edx); /* 0x30002717: push edx */
   4924     PUSH32(esp, 1); /* 0x30002718: push 1 */
   4925     PUSH32(esp, eax); /* 0x3000271A: push eax */
   4926     ecx = ebp + (-0x1C); /* 0x3000271B: lea ecx, [ebp - 0x1c] */
   4927 L_3000271E:
   4928     RECOMP_ICALL(0x30002E30u); /* 0x3000271E: call 0x30002e30 */ /* not lifted */
   4929     RECOMP_FLAGS_IN();
   4930 L_30002723:
   4931     ecx = ebp + (-0x40); /* 0x30002723: lea ecx, [ebp - 0x40] */
   4932     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x30002726: mov byte ptr [ebp - 4], 3 */
   4933     RECOMP_ICALL(0x30007AB0u); /* 0x3000272A: call 0x30007ab0 */ /* not lifted */
   4934     RECOMP_FLAGS_IN();
   4935     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4936     edi = 0; /* 0x3000272F: xor edi, edi */
   4937     _cf = 0;
   4938     _flag_k = FK_TEST;
   4939     RECOMP_BACKEDGE();
   4940     goto L_30002662; /* 0x30002731: jmp 0x30002662 */
   4941 L_30002736:
   4942     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4943     edi = 0; /* 0x30002736: xor edi, edi */
   4944     _cf = 0;
   4945     _flag_k = FK_TEST;
   4946 L_30002738:
   4947     eax = MEM32(ebp + (-0x28)); /* 0x30002738: mov eax, dword ptr [ebp - 0x28] */
   4948     /* cmp eax, edi */ /* 0x3000273B: cmp eax, edi */
   4949     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4950     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4951     _flag_k = FK_CMP;
   4952     esi = MEM32(ebp + 0x10); /* 0x3000273D: mov esi, dword ptr [ebp + 0x10] */
   4953     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000276D; /* 0x30002740: je 0x3000276d */
   4954 L_30002742:
   4955     ecx = MEM32(ebp + (-0x24)); /* 0x30002742: mov ecx, dword ptr [ebp - 0x24] */
   4956     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   4957     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4958     ecx = ecx - eax; /* 0x30002745: sub ecx, eax */
   4959     _flag_k = FK_CMP;
   4960     eax = 0x66666667u; /* 0x30002747: mov eax, 0x66666667 */
   4961     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x3000274C: imul ecx */
   4962       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   4963       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   4964     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000274E: sar edx, 3 */
   4965     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4966     edx = (uint32_t)((int32_t)edx >> 3u);
   4967     ecx = edx; /* 0x30002751: mov ecx, edx */
   4968     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30002753: shr ecx, 0x1f */
   4969     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   4970     ecx = ecx >> 31u; /* 0x30002753: shr ecx, 0x1f */
   4971     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   4972     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4973     edx = edx + ecx; /* 0x30002756: add edx, ecx */
   4974     _flag_k = FK_ADD;
   4975     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_3000276D; /* 0x30002758: je 0x3000276d */
   4976 L_3000275A:
   4977     edx = MEM32(ebp + 0xC); /* 0x3000275A: mov edx, dword ptr [ebp + 0xc] */
   4978     PUSH32(esp, 0xFFFFFFFFu); /* 0x3000275D: push -1 */
   4979     PUSH32(esp, esi); /* 0x3000275F: push esi */
   4980     PUSH32(esp, edx); /* 0x30002760: push edx */
   4981     eax = ebp + (-0x2C); /* 0x30002761: lea eax, [ebp - 0x2c] */
   4982     PUSH32(esp, eax); /* 0x30002764: push eax */
   4983     ecx = ebx + 0x24; /* 0x30002765: lea ecx, [ebx + 0x24] */
   4984     RECOMP_ICALL(0x300013A0u); /* 0x30002768: call 0x300013a0 */ /* not lifted */
   4985     RECOMP_FLAGS_IN();
   4986 L_3000276D:
   4987     eax = MEM32(ebp + (-0x18)); /* 0x3000276D: mov eax, dword ptr [ebp - 0x18] */
   4988     /* cmp eax, edi */ /* 0x30002770: cmp eax, edi */
   4989     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4990     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4991     _flag_k = FK_CMP;
   4992     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000279F; /* 0x30002772: je 0x3000279f */
   4993 L_30002774:
   4994     ecx = MEM32(ebp + (-0x14)); /* 0x30002774: mov ecx, dword ptr [ebp - 0x14] */
   4995     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   4996     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4997     ecx = ecx - eax; /* 0x30002777: sub ecx, eax */
   4998     _flag_k = FK_CMP;
   4999     eax = 0x66666667u; /* 0x30002779: mov eax, 0x66666667 */
   5000     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x3000277E: imul ecx */
   5001       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   5002       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   5003     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002780: sar edx, 3 */
   5004     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5005     edx = (uint32_t)((int32_t)edx >> 3u);
   5006     ecx = edx; /* 0x30002783: mov ecx, edx */
   5007     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30002785: shr ecx, 0x1f */
   5008     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5009     ecx = ecx >> 31u; /* 0x30002785: shr ecx, 0x1f */
   5010     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   5011     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5012     edx = edx + ecx; /* 0x30002788: add edx, ecx */
   5013     _flag_k = FK_ADD;
   5014     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_3000279F; /* 0x3000278A: je 0x3000279f */
   5015 L_3000278C:
   5016     edx = MEM32(ebp + 0xC); /* 0x3000278C: mov edx, dword ptr [ebp + 0xc] */
   5017     PUSH32(esp, 1); /* 0x3000278F: push 1 */
   5018     PUSH32(esp, esi); /* 0x30002791: push esi */
   5019     PUSH32(esp, edx); /* 0x30002792: push edx */
   5020     eax = ebp + (-0x1C); /* 0x30002793: lea eax, [ebp - 0x1c] */
   5021     PUSH32(esp, eax); /* 0x30002796: push eax */
   5022     ecx = ebx + 0x2C; /* 0x30002797: lea ecx, [ebx + 0x2c] */
   5023     RECOMP_ICALL(0x300013A0u); /* 0x3000279A: call 0x300013a0 */ /* not lifted */
   5024     RECOMP_FLAGS_IN();
   5025 L_3000279F:
   5026     ecx = ebp + (-0x54); /* 0x3000279F: lea ecx, [ebp - 0x54] */
   5027     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x300027A2: mov byte ptr [ebp - 4], 2 */
   5028     RECOMP_ICALL(0x30007AB0u); /* 0x300027A6: call 0x30007ab0 */ /* not lifted */
   5029     RECOMP_FLAGS_IN();
   5030     ecx = ebp + (-0x68); /* 0x300027AB: lea ecx, [ebp - 0x68] */
   5031     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x300027AE: mov byte ptr [ebp - 4], 1 */
   5032     RECOMP_ICALL(0x30007AB0u); /* 0x300027B2: call 0x30007ab0 */ /* not lifted */
   5033     RECOMP_FLAGS_IN();
   5034     eax = MEM32(ebp + (-0x14)); /* 0x300027B7: mov eax, dword ptr [ebp - 0x14] */
   5035     esi = MEM32(ebp + (-0x18)); /* 0x300027BA: mov esi, dword ptr [ebp - 0x18] */
   5036     /* cmp esi, eax */ /* 0x300027BD: cmp esi, eax */
   5037     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   5038     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5039     _flag_k = FK_CMP;
   5040     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x300027BF: mov byte ptr [ebp - 4], 0 */
   5041     edi = eax; /* 0x300027C3: mov edi, eax */
   5042     if (CMP_EQ(_flag_a, _flag_b)) goto L_300027D8; /* 0x300027C5: je 0x300027d8 */
   5043 L_300027C7:
   5044     ecx = esi; /* 0x300027C7: mov ecx, esi */
   5045     RECOMP_ICALL(0x30007AB0u); /* 0x300027C9: call 0x30007ab0 */ /* not lifted */
   5046     RECOMP_FLAGS_IN();
   5047     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   5048     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5049     esi = esi + 0x14u; /* 0x300027CE: add esi, 0x14 */
   5050     _flag_k = FK_ADD;
   5051     /* cmp esi, edi */ /* 0x300027D1: cmp esi, edi */
   5052     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   5053     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5054     _flag_k = FK_CMP;
   5055     RECOMP_BACKEDGE();
   5056     if (CMP_NE(_flag_a, _flag_b)) goto L_300027C7; /* 0x300027D3: jne 0x300027c7 */
   5057 L_300027D5:
   5058     esi = MEM32(ebp + (-0x18)); /* 0x300027D5: mov esi, dword ptr [ebp - 0x18] */
   5059 L_300027D8:
   5060     PUSH32(esp, esi); /* 0x300027D8: push esi */
   5061     RECOMP_ICALL(0x30018080u); /* 0x300027D9: call 0x30018080 */ /* not lifted */
   5062     RECOMP_FLAGS_IN();
   5063     esi = MEM32(ebp + (-0x28)); /* 0x300027DE: mov esi, dword ptr [ebp - 0x28] */
   5064     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5065     eax = 0; /* 0x300027E1: xor eax, eax */
   5066     _cf = 0;
   5067     _flag_k = FK_TEST;
   5068     MEM32(ebp + (-0x18)) = eax; /* 0x300027E3: mov dword ptr [ebp - 0x18], eax */
   5069     MEM32(ebp + (-0x14)) = eax; /* 0x300027E6: mov dword ptr [ebp - 0x14], eax */
   5070     MEM32(ebp + (-0x10)) = eax; /* 0x300027E9: mov dword ptr [ebp - 0x10], eax */
   5071     eax = MEM32(ebp + (-0x24)); /* 0x300027EC: mov eax, dword ptr [ebp - 0x24] */
   5072     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5073     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5074     esp = esp + 4; /* 0x300027EF: add esp, 4 */
   5075     _flag_k = FK_ADD;
   5076     /* cmp esi, eax */ /* 0x300027F2: cmp esi, eax */
   5077     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   5078     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5079     _flag_k = FK_CMP;
   5080     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x300027F4: mov dword ptr [ebp - 4], 0xffffffff */
   5081     edi = eax; /* 0x300027FB: mov edi, eax */
   5082     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002810; /* 0x300027FD: je 0x30002810 */
   5083 L_300027FF:
   5084     ecx = esi; /* 0x300027FF: mov ecx, esi */
   5085     RECOMP_ICALL(0x30007AB0u); /* 0x30002801: call 0x30007ab0 */ /* not lifted */
   5086     RECOMP_FLAGS_IN();
   5087     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   5088     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5089     esi = esi + 0x14u; /* 0x30002806: add esi, 0x14 */
   5090     _flag_k = FK_ADD;
   5091     /* cmp esi, edi */ /* 0x30002809: cmp esi, edi */
   5092     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   5093     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5094     _flag_k = FK_CMP;
   5095     RECOMP_BACKEDGE();
   5096     if (CMP_NE(_flag_a, _flag_b)) goto L_300027FF; /* 0x3000280B: jne 0x300027ff */
   5097 L_3000280D:
   5098     esi = MEM32(ebp + (-0x28)); /* 0x3000280D: mov esi, dword ptr [ebp - 0x28] */
   5099 L_30002810:
   5100     PUSH32(esp, esi); /* 0x30002810: push esi */
   5101     RECOMP_ICALL(0x30018080u); /* 0x30002811: call 0x30018080 */ /* not lifted */
   5102     RECOMP_FLAGS_IN();
   5103     ecx = MEM32(ebp + (-0xC)); /* 0x30002816: mov ecx, dword ptr [ebp - 0xc] */
   5104     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5105     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5106     esp = esp + 4; /* 0x30002819: add esp, 4 */
   5107     _flag_k = FK_ADD;
   5108     edi = POP32_VAL(esp); /* 0x3000281C: pop edi */
   5109     esi = POP32_VAL(esp); /* 0x3000281D: pop esi */
   5110     ebx = POP32_VAL(esp); /* 0x3000281E: pop ebx */
   5111     MEM32(FS_BASE + (0)) = ecx; /* 0x3000281F: mov dword ptr fs:[0], ecx */
   5112     esp = ebp; /* 0x30002826: mov esp, ebp */
   5113     ebp = POP32_VAL(esp); /* 0x30002828: pop ebp */
   5114     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30002829: ret 0xc */
   5115     RECOMP_REGS_OUT();
   5116 }
   5117 
   5118 void sub_30002662(void) {
   5119     int _fpu_cmp = 0;
   5120     uint32_t _cf = 0;
   5121     int _df = 1;
   5122     uint32_t _flag_k = FK_NONE;
   5123     uint32_t _flag_a = 0, _flag_b = 0;
   5124     uint32_t _itail_tgt = 0;
   5125     RECOMP_REGS_LOCALS
   5126     RECOMP_ENTER(0x30002662u);
   5127 
   5128 L_30002662:
   5129     eax = MEM32(esi + 0x4); /* 0x30002662: mov eax, dword ptr [esi + 4] */
   5130     /* cmp eax, edi */ /* 0x30002665: cmp eax, edi */
   5131     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5132     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5133     _flag_k = FK_CMP;
   5134     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002738; /* 0x30002667: je 0x30002738 */
   5135 L_3000266D:
   5136     edi = MEM32(esi + 0x8); /* 0x3000266D: mov edi, dword ptr [esi + 8] */
   5137     ecx = edi; /* 0x30002670: mov ecx, edi */
   5138     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   5139     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5140     ecx = ecx - eax; /* 0x30002672: sub ecx, eax */
   5141     _flag_k = FK_CMP;
   5142     eax = 0x66666667u; /* 0x30002674: mov eax, 0x66666667 */
   5143     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002679: imul ecx */
   5144       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   5145       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   5146     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000267B: sar edx, 3 */
   5147     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5148     edx = (uint32_t)((int32_t)edx >> 3u);
   5149     eax = edx; /* 0x3000267E: mov eax, edx */
   5150     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002680: shr eax, 0x1f */
   5151     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5152     eax = eax >> 31u; /* 0x30002680: shr eax, 0x1f */
   5153     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   5154     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5155     edx = edx + eax; /* 0x30002683: add edx, eax */
   5156     _flag_k = FK_ADD;
   5157     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_30002736; /* 0x30002685: je 0x30002736 */
   5158 L_3000268B:
   5159     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFECu);
   5160     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5161     edi = edi + 0xFFFFFFECu; /* 0x3000268B: add edi, -0x14 */
   5162     _flag_k = FK_ADD;
   5163     PUSH32(esp, edi); /* 0x3000268E: push edi */
   5164     ecx = ebp + (-0x40); /* 0x3000268F: lea ecx, [ebp - 0x40] */
   5165     RECOMP_ICALL(0x30007A50u); /* 0x30002692: call 0x30007a50 */ /* not lifted */
   5166     RECOMP_FLAGS_IN();
   5167     eax = MEM32(esi + 0x8); /* 0x30002697: mov eax, dword ptr [esi + 8] */
   5168     ecx = eax + (-0x14); /* 0x3000269A: lea ecx, [eax - 0x14] */
   5169     PUSH32(esp, ecx); /* 0x3000269D: push ecx */
   5170     PUSH32(esp, eax); /* 0x3000269E: push eax */
   5171     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x14u);
   5172     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5173     ecx = ecx + 0x14u; /* 0x3000269F: add ecx, 0x14 */
   5174     _flag_k = FK_ADD;
   5175     PUSH32(esp, ecx); /* 0x300026A2: push ecx */
   5176     MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x300026A3: mov byte ptr [ebp - 4], 4 */
   5177     RECOMP_ICALL(0x30001D40u); /* 0x300026A7: call 0x30001d40 */ /* not lifted */
   5178     RECOMP_FLAGS_IN();
   5179     eax = MEM32(esi + 0x8); /* 0x300026AC: mov eax, dword ptr [esi + 8] */
   5180     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   5181     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5182     esp = esp + 0xCu; /* 0x300026AF: add esp, 0xc */
   5183     _flag_k = FK_ADD;
   5184     PUSH32(esp, eax); /* 0x300026B2: push eax */
   5185     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   5186     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5187     eax = eax + 0xFFFFFFECu; /* 0x300026B3: add eax, -0x14 */
   5188     _flag_k = FK_ADD;
   5189     PUSH32(esp, eax); /* 0x300026B6: push eax */
   5190     ecx = esi; /* 0x300026B7: mov ecx, esi */
   5191     RECOMP_ICALL(0x300017A0u); /* 0x300026B9: call 0x300017a0 */ /* not lifted */
   5192     RECOMP_FLAGS_IN();
   5193     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(0xFFFFFFECu);
   5194     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5195     MEM32(esi + 0x8) = MEM32(esi + 0x8) + 0xFFFFFFECu; /* 0x300026BE: add dword ptr [esi + 8], -0x14 */
   5196     _flag_k = FK_ADD;
   5197     ecx = ebp + (-0x54); /* 0x300026C2: lea ecx, [ebp - 0x54] */
   5198     PUSH32(esp, ecx); /* 0x300026C5: push ecx */
   5199     edx = ebp + (-0x68); /* 0x300026C6: lea edx, [ebp - 0x68] */
   5200     PUSH32(esp, edx); /* 0x300026C9: push edx */
   5201     eax = ebp + (-0x40); /* 0x300026CA: lea eax, [ebp - 0x40] */
   5202     PUSH32(esp, eax); /* 0x300026CD: push eax */
   5203     ecx = ebx + 0x4; /* 0x300026CE: lea ecx, [ebx + 4] */
   5204     RECOMP_ICALL(0x30009AC0u); /* 0x300026D1: call 0x30009ac0 */ /* not lifted */
   5205     RECOMP_FLAGS_IN();
   5206     edi = eax; /* 0x300026D6: mov edi, eax */
   5207     /* test edi, edi */ /* 0x300026D8: test edi, edi */
   5208     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   5209     _cf = 0;
   5210     _flag_k = FK_TEST;
   5211     if (TEST_NZ(_flag_a, _flag_b)) goto L_300026EB; /* 0x300026DA: jne 0x300026eb */
   5212 L_300026DC:
   5213     ecx = MEM32(ebp + 0xC); /* 0x300026DC: mov ecx, dword ptr [ebp + 0xc] */
   5214     eax = MEM32(ecx + 0x8); /* 0x300026DF: mov eax, dword ptr [ecx + 8] */
   5215     edx = ebp + (-0x40); /* 0x300026E2: lea edx, [ebp - 0x40] */
   5216     PUSH32(esp, edx); /* 0x300026E5: push edx */
   5217     PUSH32(esp, 1); /* 0x300026E6: push 1 */
   5218     PUSH32(esp, eax); /* 0x300026E8: push eax */
   5219     goto L_3000271E; /* 0x300026E9: jmp 0x3000271e */
   5220 L_300026EB:
   5221     /* cmp edi, 0xFFFFFFFFu */ /* 0x300026EB: cmp edi, -1 */
   5222     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFFu);
   5223     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5224     _flag_k = FK_CMP;
   5225     if (CMP_EQ(_flag_a, _flag_b)) goto L_300026F5; /* 0x300026EE: je 0x300026f5 */
   5226 L_300026F0:
   5227     /* cmp edi, 2 */ /* 0x300026F0: cmp edi, 2 */
   5228     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2);
   5229     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5230     _flag_k = FK_CMP;
   5231     if (CMP_NE(_flag_a, _flag_b)) goto L_30002707; /* 0x300026F3: jne 0x30002707 */
   5232 L_300026F5:
   5233     ecx = MEM32(ebp + (-0x24)); /* 0x300026F5: mov ecx, dword ptr [ebp - 0x24] */
   5234     eax = ebp + (-0x68); /* 0x300026F8: lea eax, [ebp - 0x68] */
   5235     PUSH32(esp, eax); /* 0x300026FB: push eax */
   5236     PUSH32(esp, 1); /* 0x300026FC: push 1 */
   5237     PUSH32(esp, ecx); /* 0x300026FE: push ecx */
   5238     ecx = ebp + (-0x2C); /* 0x300026FF: lea ecx, [ebp - 0x2c] */
   5239     RECOMP_ICALL(0x30002E30u); /* 0x30002702: call 0x30002e30 */ /* not lifted */
   5240     RECOMP_FLAGS_IN();
   5241 L_30002707:
   5242     /* cmp edi, 1 */ /* 0x30002707: cmp edi, 1 */
   5243     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1);
   5244     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5245     _flag_k = FK_CMP;
   5246     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002711; /* 0x3000270A: je 0x30002711 */
   5247 L_3000270C:
   5248     /* cmp edi, 2 */ /* 0x3000270C: cmp edi, 2 */
   5249     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2);
   5250     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5251     _flag_k = FK_CMP;
   5252     if (CMP_NE(_flag_a, _flag_b)) goto L_30002723; /* 0x3000270F: jne 0x30002723 */
   5253 L_30002711:
   5254     eax = MEM32(ebp + (-0x14)); /* 0x30002711: mov eax, dword ptr [ebp - 0x14] */
   5255     edx = ebp + (-0x54); /* 0x30002714: lea edx, [ebp - 0x54] */
   5256     PUSH32(esp, edx); /* 0x30002717: push edx */
   5257     PUSH32(esp, 1); /* 0x30002718: push 1 */
   5258     PUSH32(esp, eax); /* 0x3000271A: push eax */
   5259     ecx = ebp + (-0x1C); /* 0x3000271B: lea ecx, [ebp - 0x1c] */
   5260 L_3000271E:
   5261     RECOMP_ICALL(0x30002E30u); /* 0x3000271E: call 0x30002e30 */ /* not lifted */
   5262     RECOMP_FLAGS_IN();
   5263 L_30002723:
   5264     ecx = ebp + (-0x40); /* 0x30002723: lea ecx, [ebp - 0x40] */
   5265     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x30002726: mov byte ptr [ebp - 4], 3 */
   5266     RECOMP_ICALL(0x30007AB0u); /* 0x3000272A: call 0x30007ab0 */ /* not lifted */
   5267     RECOMP_FLAGS_IN();
   5268     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5269     edi = 0; /* 0x3000272F: xor edi, edi */
   5270     _cf = 0;
   5271     _flag_k = FK_TEST;
   5272     RECOMP_BACKEDGE();
   5273     goto L_30002662; /* 0x30002731: jmp 0x30002662 */
   5274 L_30002736:
   5275     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5276     edi = 0; /* 0x30002736: xor edi, edi */
   5277     _cf = 0;
   5278     _flag_k = FK_TEST;
   5279 L_30002738:
   5280     eax = MEM32(ebp + (-0x28)); /* 0x30002738: mov eax, dword ptr [ebp - 0x28] */
   5281     /* cmp eax, edi */ /* 0x3000273B: cmp eax, edi */
   5282     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5283     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5284     _flag_k = FK_CMP;
   5285     esi = MEM32(ebp + 0x10); /* 0x3000273D: mov esi, dword ptr [ebp + 0x10] */
   5286     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000276D; /* 0x30002740: je 0x3000276d */
   5287 L_30002742:
   5288     ecx = MEM32(ebp + (-0x24)); /* 0x30002742: mov ecx, dword ptr [ebp - 0x24] */
   5289     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   5290     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5291     ecx = ecx - eax; /* 0x30002745: sub ecx, eax */
   5292     _flag_k = FK_CMP;
   5293     eax = 0x66666667u; /* 0x30002747: mov eax, 0x66666667 */
   5294     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x3000274C: imul ecx */
   5295       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   5296       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   5297     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000274E: sar edx, 3 */
   5298     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5299     edx = (uint32_t)((int32_t)edx >> 3u);
   5300     ecx = edx; /* 0x30002751: mov ecx, edx */
   5301     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30002753: shr ecx, 0x1f */
   5302     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5303     ecx = ecx >> 31u; /* 0x30002753: shr ecx, 0x1f */
   5304     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   5305     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5306     edx = edx + ecx; /* 0x30002756: add edx, ecx */
   5307     _flag_k = FK_ADD;
   5308     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_3000276D; /* 0x30002758: je 0x3000276d */
   5309 L_3000275A:
   5310     edx = MEM32(ebp + 0xC); /* 0x3000275A: mov edx, dword ptr [ebp + 0xc] */
   5311     PUSH32(esp, 0xFFFFFFFFu); /* 0x3000275D: push -1 */
   5312     PUSH32(esp, esi); /* 0x3000275F: push esi */
   5313     PUSH32(esp, edx); /* 0x30002760: push edx */
   5314     eax = ebp + (-0x2C); /* 0x30002761: lea eax, [ebp - 0x2c] */
   5315     PUSH32(esp, eax); /* 0x30002764: push eax */
   5316     ecx = ebx + 0x24; /* 0x30002765: lea ecx, [ebx + 0x24] */
   5317     RECOMP_ICALL(0x300013A0u); /* 0x30002768: call 0x300013a0 */ /* not lifted */
   5318     RECOMP_FLAGS_IN();
   5319 L_3000276D:
   5320     eax = MEM32(ebp + (-0x18)); /* 0x3000276D: mov eax, dword ptr [ebp - 0x18] */
   5321     /* cmp eax, edi */ /* 0x30002770: cmp eax, edi */
   5322     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5323     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5324     _flag_k = FK_CMP;
   5325     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000279F; /* 0x30002772: je 0x3000279f */
   5326 L_30002774:
   5327     ecx = MEM32(ebp + (-0x14)); /* 0x30002774: mov ecx, dword ptr [ebp - 0x14] */
   5328     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   5329     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5330     ecx = ecx - eax; /* 0x30002777: sub ecx, eax */
   5331     _flag_k = FK_CMP;
   5332     eax = 0x66666667u; /* 0x30002779: mov eax, 0x66666667 */
   5333     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x3000277E: imul ecx */
   5334       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   5335       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   5336     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002780: sar edx, 3 */
   5337     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5338     edx = (uint32_t)((int32_t)edx >> 3u);
   5339     ecx = edx; /* 0x30002783: mov ecx, edx */
   5340     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30002785: shr ecx, 0x1f */
   5341     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5342     ecx = ecx >> 31u; /* 0x30002785: shr ecx, 0x1f */
   5343     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   5344     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5345     edx = edx + ecx; /* 0x30002788: add edx, ecx */
   5346     _flag_k = FK_ADD;
   5347     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_3000279F; /* 0x3000278A: je 0x3000279f */
   5348 L_3000278C:
   5349     edx = MEM32(ebp + 0xC); /* 0x3000278C: mov edx, dword ptr [ebp + 0xc] */
   5350     PUSH32(esp, 1); /* 0x3000278F: push 1 */
   5351     PUSH32(esp, esi); /* 0x30002791: push esi */
   5352     PUSH32(esp, edx); /* 0x30002792: push edx */
   5353     eax = ebp + (-0x1C); /* 0x30002793: lea eax, [ebp - 0x1c] */
   5354     PUSH32(esp, eax); /* 0x30002796: push eax */
   5355     ecx = ebx + 0x2C; /* 0x30002797: lea ecx, [ebx + 0x2c] */
   5356     RECOMP_ICALL(0x300013A0u); /* 0x3000279A: call 0x300013a0 */ /* not lifted */
   5357     RECOMP_FLAGS_IN();
   5358 L_3000279F:
   5359     ecx = ebp + (-0x54); /* 0x3000279F: lea ecx, [ebp - 0x54] */
   5360     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x300027A2: mov byte ptr [ebp - 4], 2 */
   5361     RECOMP_ICALL(0x30007AB0u); /* 0x300027A6: call 0x30007ab0 */ /* not lifted */
   5362     RECOMP_FLAGS_IN();
   5363     ecx = ebp + (-0x68); /* 0x300027AB: lea ecx, [ebp - 0x68] */
   5364     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x300027AE: mov byte ptr [ebp - 4], 1 */
   5365     RECOMP_ICALL(0x30007AB0u); /* 0x300027B2: call 0x30007ab0 */ /* not lifted */
   5366     RECOMP_FLAGS_IN();
   5367     eax = MEM32(ebp + (-0x14)); /* 0x300027B7: mov eax, dword ptr [ebp - 0x14] */
   5368     esi = MEM32(ebp + (-0x18)); /* 0x300027BA: mov esi, dword ptr [ebp - 0x18] */
   5369     /* cmp esi, eax */ /* 0x300027BD: cmp esi, eax */
   5370     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   5371     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5372     _flag_k = FK_CMP;
   5373     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x300027BF: mov byte ptr [ebp - 4], 0 */
   5374     edi = eax; /* 0x300027C3: mov edi, eax */
   5375     if (CMP_EQ(_flag_a, _flag_b)) goto L_300027D8; /* 0x300027C5: je 0x300027d8 */
   5376 L_300027C7:
   5377     ecx = esi; /* 0x300027C7: mov ecx, esi */
   5378     RECOMP_ICALL(0x30007AB0u); /* 0x300027C9: call 0x30007ab0 */ /* not lifted */
   5379     RECOMP_FLAGS_IN();
   5380     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   5381     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5382     esi = esi + 0x14u; /* 0x300027CE: add esi, 0x14 */
   5383     _flag_k = FK_ADD;
   5384     /* cmp esi, edi */ /* 0x300027D1: cmp esi, edi */
   5385     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   5386     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5387     _flag_k = FK_CMP;
   5388     RECOMP_BACKEDGE();
   5389     if (CMP_NE(_flag_a, _flag_b)) goto L_300027C7; /* 0x300027D3: jne 0x300027c7 */
   5390 L_300027D5:
   5391     esi = MEM32(ebp + (-0x18)); /* 0x300027D5: mov esi, dword ptr [ebp - 0x18] */
   5392 L_300027D8:
   5393     PUSH32(esp, esi); /* 0x300027D8: push esi */
   5394     RECOMP_ICALL(0x30018080u); /* 0x300027D9: call 0x30018080 */ /* not lifted */
   5395     RECOMP_FLAGS_IN();
   5396     esi = MEM32(ebp + (-0x28)); /* 0x300027DE: mov esi, dword ptr [ebp - 0x28] */
   5397     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5398     eax = 0; /* 0x300027E1: xor eax, eax */
   5399     _cf = 0;
   5400     _flag_k = FK_TEST;
   5401     MEM32(ebp + (-0x18)) = eax; /* 0x300027E3: mov dword ptr [ebp - 0x18], eax */
   5402     MEM32(ebp + (-0x14)) = eax; /* 0x300027E6: mov dword ptr [ebp - 0x14], eax */
   5403     MEM32(ebp + (-0x10)) = eax; /* 0x300027E9: mov dword ptr [ebp - 0x10], eax */
   5404     eax = MEM32(ebp + (-0x24)); /* 0x300027EC: mov eax, dword ptr [ebp - 0x24] */
   5405     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5406     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5407     esp = esp + 4; /* 0x300027EF: add esp, 4 */
   5408     _flag_k = FK_ADD;
   5409     /* cmp esi, eax */ /* 0x300027F2: cmp esi, eax */
   5410     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   5411     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5412     _flag_k = FK_CMP;
   5413     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x300027F4: mov dword ptr [ebp - 4], 0xffffffff */
   5414     edi = eax; /* 0x300027FB: mov edi, eax */
   5415     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002810; /* 0x300027FD: je 0x30002810 */
   5416 L_300027FF:
   5417     ecx = esi; /* 0x300027FF: mov ecx, esi */
   5418     RECOMP_ICALL(0x30007AB0u); /* 0x30002801: call 0x30007ab0 */ /* not lifted */
   5419     RECOMP_FLAGS_IN();
   5420     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   5421     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5422     esi = esi + 0x14u; /* 0x30002806: add esi, 0x14 */
   5423     _flag_k = FK_ADD;
   5424     /* cmp esi, edi */ /* 0x30002809: cmp esi, edi */
   5425     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   5426     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5427     _flag_k = FK_CMP;
   5428     RECOMP_BACKEDGE();
   5429     if (CMP_NE(_flag_a, _flag_b)) goto L_300027FF; /* 0x3000280B: jne 0x300027ff */
   5430 L_3000280D:
   5431     esi = MEM32(ebp + (-0x28)); /* 0x3000280D: mov esi, dword ptr [ebp - 0x28] */
   5432 L_30002810:
   5433     PUSH32(esp, esi); /* 0x30002810: push esi */
   5434     RECOMP_ICALL(0x30018080u); /* 0x30002811: call 0x30018080 */ /* not lifted */
   5435     RECOMP_FLAGS_IN();
   5436     ecx = MEM32(ebp + (-0xC)); /* 0x30002816: mov ecx, dword ptr [ebp - 0xc] */
   5437     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5438     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5439     esp = esp + 4; /* 0x30002819: add esp, 4 */
   5440     _flag_k = FK_ADD;
   5441     edi = POP32_VAL(esp); /* 0x3000281C: pop edi */
   5442     esi = POP32_VAL(esp); /* 0x3000281D: pop esi */
   5443     ebx = POP32_VAL(esp); /* 0x3000281E: pop ebx */
   5444     MEM32(FS_BASE + (0)) = ecx; /* 0x3000281F: mov dword ptr fs:[0], ecx */
   5445     esp = ebp; /* 0x30002826: mov esp, ebp */
   5446     ebp = POP32_VAL(esp); /* 0x30002828: pop ebp */
   5447     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30002829: ret 0xc */
   5448     RECOMP_REGS_OUT();
   5449 }
   5450 
   5451 void sub_3000271E(void) {
   5452     int _fpu_cmp = 0;
   5453     uint32_t _cf = 0;
   5454     int _df = 1;
   5455     uint32_t _flag_k = FK_NONE;
   5456     uint32_t _flag_a = 0, _flag_b = 0;
   5457     uint32_t _itail_tgt = 0;
   5458     RECOMP_REGS_LOCALS
   5459     RECOMP_ENTER(0x3000271Eu);
   5460 
   5461     goto L_3000271E;
   5462 L_30002662:
   5463     eax = MEM32(esi + 0x4); /* 0x30002662: mov eax, dword ptr [esi + 4] */
   5464     /* cmp eax, edi */ /* 0x30002665: cmp eax, edi */
   5465     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5466     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5467     _flag_k = FK_CMP;
   5468     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002738; /* 0x30002667: je 0x30002738 */
   5469 L_3000266D:
   5470     edi = MEM32(esi + 0x8); /* 0x3000266D: mov edi, dword ptr [esi + 8] */
   5471     ecx = edi; /* 0x30002670: mov ecx, edi */
   5472     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   5473     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5474     ecx = ecx - eax; /* 0x30002672: sub ecx, eax */
   5475     _flag_k = FK_CMP;
   5476     eax = 0x66666667u; /* 0x30002674: mov eax, 0x66666667 */
   5477     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002679: imul ecx */
   5478       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   5479       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   5480     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000267B: sar edx, 3 */
   5481     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5482     edx = (uint32_t)((int32_t)edx >> 3u);
   5483     eax = edx; /* 0x3000267E: mov eax, edx */
   5484     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002680: shr eax, 0x1f */
   5485     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5486     eax = eax >> 31u; /* 0x30002680: shr eax, 0x1f */
   5487     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   5488     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5489     edx = edx + eax; /* 0x30002683: add edx, eax */
   5490     _flag_k = FK_ADD;
   5491     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_30002736; /* 0x30002685: je 0x30002736 */
   5492 L_3000268B:
   5493     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFECu);
   5494     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5495     edi = edi + 0xFFFFFFECu; /* 0x3000268B: add edi, -0x14 */
   5496     _flag_k = FK_ADD;
   5497     PUSH32(esp, edi); /* 0x3000268E: push edi */
   5498     ecx = ebp + (-0x40); /* 0x3000268F: lea ecx, [ebp - 0x40] */
   5499     RECOMP_ICALL(0x30007A50u); /* 0x30002692: call 0x30007a50 */ /* not lifted */
   5500     RECOMP_FLAGS_IN();
   5501     eax = MEM32(esi + 0x8); /* 0x30002697: mov eax, dword ptr [esi + 8] */
   5502     ecx = eax + (-0x14); /* 0x3000269A: lea ecx, [eax - 0x14] */
   5503     PUSH32(esp, ecx); /* 0x3000269D: push ecx */
   5504     PUSH32(esp, eax); /* 0x3000269E: push eax */
   5505     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x14u);
   5506     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5507     ecx = ecx + 0x14u; /* 0x3000269F: add ecx, 0x14 */
   5508     _flag_k = FK_ADD;
   5509     PUSH32(esp, ecx); /* 0x300026A2: push ecx */
   5510     MEM8(ebp + (-0x4)) = (uint8_t)(4); /* 0x300026A3: mov byte ptr [ebp - 4], 4 */
   5511     RECOMP_ICALL(0x30001D40u); /* 0x300026A7: call 0x30001d40 */ /* not lifted */
   5512     RECOMP_FLAGS_IN();
   5513     eax = MEM32(esi + 0x8); /* 0x300026AC: mov eax, dword ptr [esi + 8] */
   5514     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   5515     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5516     esp = esp + 0xCu; /* 0x300026AF: add esp, 0xc */
   5517     _flag_k = FK_ADD;
   5518     PUSH32(esp, eax); /* 0x300026B2: push eax */
   5519     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   5520     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5521     eax = eax + 0xFFFFFFECu; /* 0x300026B3: add eax, -0x14 */
   5522     _flag_k = FK_ADD;
   5523     PUSH32(esp, eax); /* 0x300026B6: push eax */
   5524     ecx = esi; /* 0x300026B7: mov ecx, esi */
   5525     RECOMP_ICALL(0x300017A0u); /* 0x300026B9: call 0x300017a0 */ /* not lifted */
   5526     RECOMP_FLAGS_IN();
   5527     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(0xFFFFFFECu);
   5528     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5529     MEM32(esi + 0x8) = MEM32(esi + 0x8) + 0xFFFFFFECu; /* 0x300026BE: add dword ptr [esi + 8], -0x14 */
   5530     _flag_k = FK_ADD;
   5531     ecx = ebp + (-0x54); /* 0x300026C2: lea ecx, [ebp - 0x54] */
   5532     PUSH32(esp, ecx); /* 0x300026C5: push ecx */
   5533     edx = ebp + (-0x68); /* 0x300026C6: lea edx, [ebp - 0x68] */
   5534     PUSH32(esp, edx); /* 0x300026C9: push edx */
   5535     eax = ebp + (-0x40); /* 0x300026CA: lea eax, [ebp - 0x40] */
   5536     PUSH32(esp, eax); /* 0x300026CD: push eax */
   5537     ecx = ebx + 0x4; /* 0x300026CE: lea ecx, [ebx + 4] */
   5538     RECOMP_ICALL(0x30009AC0u); /* 0x300026D1: call 0x30009ac0 */ /* not lifted */
   5539     RECOMP_FLAGS_IN();
   5540     edi = eax; /* 0x300026D6: mov edi, eax */
   5541     /* test edi, edi */ /* 0x300026D8: test edi, edi */
   5542     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   5543     _cf = 0;
   5544     _flag_k = FK_TEST;
   5545     if (TEST_NZ(_flag_a, _flag_b)) goto L_300026EB; /* 0x300026DA: jne 0x300026eb */
   5546 L_300026DC:
   5547     ecx = MEM32(ebp + 0xC); /* 0x300026DC: mov ecx, dword ptr [ebp + 0xc] */
   5548     eax = MEM32(ecx + 0x8); /* 0x300026DF: mov eax, dword ptr [ecx + 8] */
   5549     edx = ebp + (-0x40); /* 0x300026E2: lea edx, [ebp - 0x40] */
   5550     PUSH32(esp, edx); /* 0x300026E5: push edx */
   5551     PUSH32(esp, 1); /* 0x300026E6: push 1 */
   5552     PUSH32(esp, eax); /* 0x300026E8: push eax */
   5553     goto L_3000271E; /* 0x300026E9: jmp 0x3000271e */
   5554 L_300026EB:
   5555     /* cmp edi, 0xFFFFFFFFu */ /* 0x300026EB: cmp edi, -1 */
   5556     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFFu);
   5557     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5558     _flag_k = FK_CMP;
   5559     if (CMP_EQ(_flag_a, _flag_b)) goto L_300026F5; /* 0x300026EE: je 0x300026f5 */
   5560 L_300026F0:
   5561     /* cmp edi, 2 */ /* 0x300026F0: cmp edi, 2 */
   5562     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2);
   5563     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5564     _flag_k = FK_CMP;
   5565     if (CMP_NE(_flag_a, _flag_b)) goto L_30002707; /* 0x300026F3: jne 0x30002707 */
   5566 L_300026F5:
   5567     ecx = MEM32(ebp + (-0x24)); /* 0x300026F5: mov ecx, dword ptr [ebp - 0x24] */
   5568     eax = ebp + (-0x68); /* 0x300026F8: lea eax, [ebp - 0x68] */
   5569     PUSH32(esp, eax); /* 0x300026FB: push eax */
   5570     PUSH32(esp, 1); /* 0x300026FC: push 1 */
   5571     PUSH32(esp, ecx); /* 0x300026FE: push ecx */
   5572     ecx = ebp + (-0x2C); /* 0x300026FF: lea ecx, [ebp - 0x2c] */
   5573     RECOMP_ICALL(0x30002E30u); /* 0x30002702: call 0x30002e30 */ /* not lifted */
   5574     RECOMP_FLAGS_IN();
   5575 L_30002707:
   5576     /* cmp edi, 1 */ /* 0x30002707: cmp edi, 1 */
   5577     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1);
   5578     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5579     _flag_k = FK_CMP;
   5580     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002711; /* 0x3000270A: je 0x30002711 */
   5581 L_3000270C:
   5582     /* cmp edi, 2 */ /* 0x3000270C: cmp edi, 2 */
   5583     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(2);
   5584     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5585     _flag_k = FK_CMP;
   5586     if (CMP_NE(_flag_a, _flag_b)) goto L_30002723; /* 0x3000270F: jne 0x30002723 */
   5587 L_30002711:
   5588     eax = MEM32(ebp + (-0x14)); /* 0x30002711: mov eax, dword ptr [ebp - 0x14] */
   5589     edx = ebp + (-0x54); /* 0x30002714: lea edx, [ebp - 0x54] */
   5590     PUSH32(esp, edx); /* 0x30002717: push edx */
   5591     PUSH32(esp, 1); /* 0x30002718: push 1 */
   5592     PUSH32(esp, eax); /* 0x3000271A: push eax */
   5593     ecx = ebp + (-0x1C); /* 0x3000271B: lea ecx, [ebp - 0x1c] */
   5594 L_3000271E:
   5595     RECOMP_ICALL(0x30002E30u); /* 0x3000271E: call 0x30002e30 */ /* not lifted */
   5596     RECOMP_FLAGS_IN();
   5597 L_30002723:
   5598     ecx = ebp + (-0x40); /* 0x30002723: lea ecx, [ebp - 0x40] */
   5599     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x30002726: mov byte ptr [ebp - 4], 3 */
   5600     RECOMP_ICALL(0x30007AB0u); /* 0x3000272A: call 0x30007ab0 */ /* not lifted */
   5601     RECOMP_FLAGS_IN();
   5602     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5603     edi = 0; /* 0x3000272F: xor edi, edi */
   5604     _cf = 0;
   5605     _flag_k = FK_TEST;
   5606     RECOMP_BACKEDGE();
   5607     goto L_30002662; /* 0x30002731: jmp 0x30002662 */
   5608 L_30002736:
   5609     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5610     edi = 0; /* 0x30002736: xor edi, edi */
   5611     _cf = 0;
   5612     _flag_k = FK_TEST;
   5613 L_30002738:
   5614     eax = MEM32(ebp + (-0x28)); /* 0x30002738: mov eax, dword ptr [ebp - 0x28] */
   5615     /* cmp eax, edi */ /* 0x3000273B: cmp eax, edi */
   5616     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5617     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5618     _flag_k = FK_CMP;
   5619     esi = MEM32(ebp + 0x10); /* 0x3000273D: mov esi, dword ptr [ebp + 0x10] */
   5620     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000276D; /* 0x30002740: je 0x3000276d */
   5621 L_30002742:
   5622     ecx = MEM32(ebp + (-0x24)); /* 0x30002742: mov ecx, dword ptr [ebp - 0x24] */
   5623     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   5624     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5625     ecx = ecx - eax; /* 0x30002745: sub ecx, eax */
   5626     _flag_k = FK_CMP;
   5627     eax = 0x66666667u; /* 0x30002747: mov eax, 0x66666667 */
   5628     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x3000274C: imul ecx */
   5629       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   5630       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   5631     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000274E: sar edx, 3 */
   5632     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5633     edx = (uint32_t)((int32_t)edx >> 3u);
   5634     ecx = edx; /* 0x30002751: mov ecx, edx */
   5635     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30002753: shr ecx, 0x1f */
   5636     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5637     ecx = ecx >> 31u; /* 0x30002753: shr ecx, 0x1f */
   5638     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   5639     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5640     edx = edx + ecx; /* 0x30002756: add edx, ecx */
   5641     _flag_k = FK_ADD;
   5642     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_3000276D; /* 0x30002758: je 0x3000276d */
   5643 L_3000275A:
   5644     edx = MEM32(ebp + 0xC); /* 0x3000275A: mov edx, dword ptr [ebp + 0xc] */
   5645     PUSH32(esp, 0xFFFFFFFFu); /* 0x3000275D: push -1 */
   5646     PUSH32(esp, esi); /* 0x3000275F: push esi */
   5647     PUSH32(esp, edx); /* 0x30002760: push edx */
   5648     eax = ebp + (-0x2C); /* 0x30002761: lea eax, [ebp - 0x2c] */
   5649     PUSH32(esp, eax); /* 0x30002764: push eax */
   5650     ecx = ebx + 0x24; /* 0x30002765: lea ecx, [ebx + 0x24] */
   5651     RECOMP_ICALL(0x300013A0u); /* 0x30002768: call 0x300013a0 */ /* not lifted */
   5652     RECOMP_FLAGS_IN();
   5653 L_3000276D:
   5654     eax = MEM32(ebp + (-0x18)); /* 0x3000276D: mov eax, dword ptr [ebp - 0x18] */
   5655     /* cmp eax, edi */ /* 0x30002770: cmp eax, edi */
   5656     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5657     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5658     _flag_k = FK_CMP;
   5659     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000279F; /* 0x30002772: je 0x3000279f */
   5660 L_30002774:
   5661     ecx = MEM32(ebp + (-0x14)); /* 0x30002774: mov ecx, dword ptr [ebp - 0x14] */
   5662     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   5663     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5664     ecx = ecx - eax; /* 0x30002777: sub ecx, eax */
   5665     _flag_k = FK_CMP;
   5666     eax = 0x66666667u; /* 0x30002779: mov eax, 0x66666667 */
   5667     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x3000277E: imul ecx */
   5668       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   5669       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   5670     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002780: sar edx, 3 */
   5671     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5672     edx = (uint32_t)((int32_t)edx >> 3u);
   5673     ecx = edx; /* 0x30002783: mov ecx, edx */
   5674     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30002785: shr ecx, 0x1f */
   5675     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5676     ecx = ecx >> 31u; /* 0x30002785: shr ecx, 0x1f */
   5677     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   5678     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5679     edx = edx + ecx; /* 0x30002788: add edx, ecx */
   5680     _flag_k = FK_ADD;
   5681     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_3000279F; /* 0x3000278A: je 0x3000279f */
   5682 L_3000278C:
   5683     edx = MEM32(ebp + 0xC); /* 0x3000278C: mov edx, dword ptr [ebp + 0xc] */
   5684     PUSH32(esp, 1); /* 0x3000278F: push 1 */
   5685     PUSH32(esp, esi); /* 0x30002791: push esi */
   5686     PUSH32(esp, edx); /* 0x30002792: push edx */
   5687     eax = ebp + (-0x1C); /* 0x30002793: lea eax, [ebp - 0x1c] */
   5688     PUSH32(esp, eax); /* 0x30002796: push eax */
   5689     ecx = ebx + 0x2C; /* 0x30002797: lea ecx, [ebx + 0x2c] */
   5690     RECOMP_ICALL(0x300013A0u); /* 0x3000279A: call 0x300013a0 */ /* not lifted */
   5691     RECOMP_FLAGS_IN();
   5692 L_3000279F:
   5693     ecx = ebp + (-0x54); /* 0x3000279F: lea ecx, [ebp - 0x54] */
   5694     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x300027A2: mov byte ptr [ebp - 4], 2 */
   5695     RECOMP_ICALL(0x30007AB0u); /* 0x300027A6: call 0x30007ab0 */ /* not lifted */
   5696     RECOMP_FLAGS_IN();
   5697     ecx = ebp + (-0x68); /* 0x300027AB: lea ecx, [ebp - 0x68] */
   5698     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x300027AE: mov byte ptr [ebp - 4], 1 */
   5699     RECOMP_ICALL(0x30007AB0u); /* 0x300027B2: call 0x30007ab0 */ /* not lifted */
   5700     RECOMP_FLAGS_IN();
   5701     eax = MEM32(ebp + (-0x14)); /* 0x300027B7: mov eax, dword ptr [ebp - 0x14] */
   5702     esi = MEM32(ebp + (-0x18)); /* 0x300027BA: mov esi, dword ptr [ebp - 0x18] */
   5703     /* cmp esi, eax */ /* 0x300027BD: cmp esi, eax */
   5704     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   5705     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5706     _flag_k = FK_CMP;
   5707     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x300027BF: mov byte ptr [ebp - 4], 0 */
   5708     edi = eax; /* 0x300027C3: mov edi, eax */
   5709     if (CMP_EQ(_flag_a, _flag_b)) goto L_300027D8; /* 0x300027C5: je 0x300027d8 */
   5710 L_300027C7:
   5711     ecx = esi; /* 0x300027C7: mov ecx, esi */
   5712     RECOMP_ICALL(0x30007AB0u); /* 0x300027C9: call 0x30007ab0 */ /* not lifted */
   5713     RECOMP_FLAGS_IN();
   5714     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   5715     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5716     esi = esi + 0x14u; /* 0x300027CE: add esi, 0x14 */
   5717     _flag_k = FK_ADD;
   5718     /* cmp esi, edi */ /* 0x300027D1: cmp esi, edi */
   5719     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   5720     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5721     _flag_k = FK_CMP;
   5722     RECOMP_BACKEDGE();
   5723     if (CMP_NE(_flag_a, _flag_b)) goto L_300027C7; /* 0x300027D3: jne 0x300027c7 */
   5724 L_300027D5:
   5725     esi = MEM32(ebp + (-0x18)); /* 0x300027D5: mov esi, dword ptr [ebp - 0x18] */
   5726 L_300027D8:
   5727     PUSH32(esp, esi); /* 0x300027D8: push esi */
   5728     RECOMP_ICALL(0x30018080u); /* 0x300027D9: call 0x30018080 */ /* not lifted */
   5729     RECOMP_FLAGS_IN();
   5730     esi = MEM32(ebp + (-0x28)); /* 0x300027DE: mov esi, dword ptr [ebp - 0x28] */
   5731     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5732     eax = 0; /* 0x300027E1: xor eax, eax */
   5733     _cf = 0;
   5734     _flag_k = FK_TEST;
   5735     MEM32(ebp + (-0x18)) = eax; /* 0x300027E3: mov dword ptr [ebp - 0x18], eax */
   5736     MEM32(ebp + (-0x14)) = eax; /* 0x300027E6: mov dword ptr [ebp - 0x14], eax */
   5737     MEM32(ebp + (-0x10)) = eax; /* 0x300027E9: mov dword ptr [ebp - 0x10], eax */
   5738     eax = MEM32(ebp + (-0x24)); /* 0x300027EC: mov eax, dword ptr [ebp - 0x24] */
   5739     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5740     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5741     esp = esp + 4; /* 0x300027EF: add esp, 4 */
   5742     _flag_k = FK_ADD;
   5743     /* cmp esi, eax */ /* 0x300027F2: cmp esi, eax */
   5744     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   5745     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5746     _flag_k = FK_CMP;
   5747     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x300027F4: mov dword ptr [ebp - 4], 0xffffffff */
   5748     edi = eax; /* 0x300027FB: mov edi, eax */
   5749     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002810; /* 0x300027FD: je 0x30002810 */
   5750 L_300027FF:
   5751     ecx = esi; /* 0x300027FF: mov ecx, esi */
   5752     RECOMP_ICALL(0x30007AB0u); /* 0x30002801: call 0x30007ab0 */ /* not lifted */
   5753     RECOMP_FLAGS_IN();
   5754     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   5755     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5756     esi = esi + 0x14u; /* 0x30002806: add esi, 0x14 */
   5757     _flag_k = FK_ADD;
   5758     /* cmp esi, edi */ /* 0x30002809: cmp esi, edi */
   5759     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   5760     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5761     _flag_k = FK_CMP;
   5762     RECOMP_BACKEDGE();
   5763     if (CMP_NE(_flag_a, _flag_b)) goto L_300027FF; /* 0x3000280B: jne 0x300027ff */
   5764 L_3000280D:
   5765     esi = MEM32(ebp + (-0x28)); /* 0x3000280D: mov esi, dword ptr [ebp - 0x28] */
   5766 L_30002810:
   5767     PUSH32(esp, esi); /* 0x30002810: push esi */
   5768     RECOMP_ICALL(0x30018080u); /* 0x30002811: call 0x30018080 */ /* not lifted */
   5769     RECOMP_FLAGS_IN();
   5770     ecx = MEM32(ebp + (-0xC)); /* 0x30002816: mov ecx, dword ptr [ebp - 0xc] */
   5771     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5772     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5773     esp = esp + 4; /* 0x30002819: add esp, 4 */
   5774     _flag_k = FK_ADD;
   5775     edi = POP32_VAL(esp); /* 0x3000281C: pop edi */
   5776     esi = POP32_VAL(esp); /* 0x3000281D: pop esi */
   5777     ebx = POP32_VAL(esp); /* 0x3000281E: pop ebx */
   5778     MEM32(FS_BASE + (0)) = ecx; /* 0x3000281F: mov dword ptr fs:[0], ecx */
   5779     esp = ebp; /* 0x30002826: mov esp, ebp */
   5780     ebp = POP32_VAL(esp); /* 0x30002828: pop ebp */
   5781     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30002829: ret 0xc */
   5782     RECOMP_REGS_OUT();
   5783 }
   5784 
   5785 void sub_30002830(void) {
   5786     int _fpu_cmp = 0;
   5787     uint32_t _cf = 0;
   5788     int _df = 1;
   5789     uint32_t _flag_k = FK_NONE;
   5790     uint32_t _flag_a = 0, _flag_b = 0;
   5791     uint32_t _itail_tgt = 0;
   5792     RECOMP_REGS_LOCALS
   5793     RECOMP_ENTER(0x30002830u);
   5794 
   5795 L_30002830:
   5796     PUSH32(esp, ebp); /* 0x30002830: push ebp */
   5797     ebp = esp; /* 0x30002831: mov ebp, esp */
   5798     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002833: push -1 */
   5799     PUSH32(esp, 0x300185A8u); /* 0x30002835: push 0x300185a8 */
   5800     eax = MEM32(FS_BASE + (0)); /* 0x3000283A: mov eax, dword ptr fs:[0] */
   5801     PUSH32(esp, eax); /* 0x30002840: push eax */
   5802     MEM32(FS_BASE + (0)) = esp; /* 0x30002841: mov dword ptr fs:[0], esp */
   5803     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x44u);
   5804     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5805     esp = esp - 0x44u; /* 0x30002848: sub esp, 0x44 */
   5806     _flag_k = FK_CMP;
   5807     SET_LO8(eax, MEM8(ebp + (-0xD))); /* 0x3000284B: mov al, byte ptr [ebp - 0xd] */
   5808     PUSH32(esp, ebx); /* 0x3000284E: push ebx */
   5809     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5810     ebx = 0; /* 0x3000284F: xor ebx, ebx */
   5811     _cf = 0;
   5812     _flag_k = FK_TEST;
   5813     PUSH32(esp, esi); /* 0x30002851: push esi */
   5814     PUSH32(esp, edi); /* 0x30002852: push edi */
   5815     MEM32(ebp + (-0x18)) = ecx; /* 0x30002853: mov dword ptr [ebp - 0x18], ecx */
   5816     MEM8(ebp + (-0x3C)) = (uint8_t)(LO8(eax)); /* 0x30002856: mov byte ptr [ebp - 0x3c], al */
   5817     MEM32(ebp + (-0x38)) = ebx; /* 0x30002859: mov dword ptr [ebp - 0x38], ebx */
   5818     MEM32(ebp + (-0x34)) = ebx; /* 0x3000285C: mov dword ptr [ebp - 0x34], ebx */
   5819     MEM32(ebp + (-0x30)) = ebx; /* 0x3000285F: mov dword ptr [ebp - 0x30], ebx */
   5820     SET_LO8(edx, MEM8(ebp + (-0xD))); /* 0x30002862: mov dl, byte ptr [ebp - 0xd] */
   5821     MEM32(ebp + (-0x4)) = ebx; /* 0x30002865: mov dword ptr [ebp - 4], ebx */
   5822     MEM8(ebp + (-0x2C)) = (uint8_t)(LO8(edx)); /* 0x30002868: mov byte ptr [ebp - 0x2c], dl */
   5823     MEM32(ebp + (-0x28)) = ebx; /* 0x3000286B: mov dword ptr [ebp - 0x28], ebx */
   5824     MEM32(ebp + (-0x24)) = ebx; /* 0x3000286E: mov dword ptr [ebp - 0x24], ebx */
   5825     MEM32(ebp + (-0x20)) = ebx; /* 0x30002871: mov dword ptr [ebp - 0x20], ebx */
   5826     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x30002874: mov byte ptr [ebp - 4], 1 */
   5827     esi = ecx + 0x14; /* 0x30002878: lea esi, [ecx + 0x14] */
   5828 L_3000287B:
   5829     eax = MEM32(esi + 0x4); /* 0x3000287B: mov eax, dword ptr [esi + 4] */
   5830     /* cmp eax, ebx */ /* 0x3000287E: cmp eax, ebx */
   5831     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   5832     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5833     _flag_k = FK_CMP;
   5834     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002986; /* 0x30002880: je 0x30002986 */
   5835 L_30002886:
   5836     ecx = MEM32(esi + 0x8); /* 0x30002886: mov ecx, dword ptr [esi + 8] */
   5837     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   5838     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5839     ecx = ecx - eax; /* 0x30002889: sub ecx, eax */
   5840     _flag_k = FK_CMP;
   5841     eax = 0x66666667u; /* 0x3000288B: mov eax, 0x66666667 */
   5842     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002890: imul ecx */
   5843       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   5844       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   5845     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002892: sar edx, 3 */
   5846     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5847     edx = (uint32_t)((int32_t)edx >> 3u);
   5848     eax = edx; /* 0x30002895: mov eax, edx */
   5849     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002897: shr eax, 0x1f */
   5850     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   5851     eax = eax >> 31u; /* 0x30002897: shr eax, 0x1f */
   5852     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   5853     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5854     edx = edx + eax; /* 0x3000289A: add edx, eax */
   5855     _flag_k = FK_ADD;
   5856     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_30002986; /* 0x3000289C: je 0x30002986 */
   5857 L_300028A2:
   5858     ecx = MEM32(ebp + (-0x18)); /* 0x300028A2: mov ecx, dword ptr [ebp - 0x18] */
   5859     eax = MEM32(ecx + 0x1C); /* 0x300028A5: mov eax, dword ptr [ecx + 0x1c] */
   5860     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   5861     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5862     eax = eax + 0xFFFFFFECu; /* 0x300028A8: add eax, -0x14 */
   5863     _flag_k = FK_ADD;
   5864     PUSH32(esp, eax); /* 0x300028AB: push eax */
   5865     ecx = ebp + (-0x50); /* 0x300028AC: lea ecx, [ebp - 0x50] */
   5866     RECOMP_ICALL(0x30007A50u); /* 0x300028AF: call 0x30007a50 */ /* not lifted */
   5867     RECOMP_FLAGS_IN();
   5868     ebx = MEM32(esi + 0x8); /* 0x300028B4: mov ebx, dword ptr [esi + 8] */
   5869     edi = ebx; /* 0x300028B7: lea edi, [ebx] */
   5870     /* cmp edi, ebx */ /* 0x300028B9: cmp edi, ebx */
   5871     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   5872     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5873     _flag_k = FK_CMP;
   5874     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x300028BB: mov byte ptr [ebp - 4], 2 */
   5875     if (CMP_EQ(_flag_a, _flag_b)) goto L_300028E0; /* 0x300028BF: je 0x300028e0 */
   5876 L_300028C1:
   5877     edx = edi + (-0x14); /* 0x300028C1: lea edx, [edi - 0x14] */
   5878     MEM32(ebp + (-0x14)) = edx; /* 0x300028C4: mov dword ptr [ebp - 0x14], edx */
   5879 L_300028C7:
   5880     ecx = MEM32(ebp + (-0x14)); /* 0x300028C7: mov ecx, dword ptr [ebp - 0x14] */
   5881     PUSH32(esp, edi); /* 0x300028CA: push edi */
   5882     RECOMP_ICALL(0x300080D0u); /* 0x300028CB: call 0x300080d0 */ /* not lifted */
   5883     RECOMP_FLAGS_IN();
   5884     ecx = MEM32(ebp + (-0x14)); /* 0x300028D0: mov ecx, dword ptr [ebp - 0x14] */
   5885     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   5886     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5887     edi = edi + 0x14u; /* 0x300028D3: add edi, 0x14 */
   5888     _flag_k = FK_ADD;
   5889     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x14u);
   5890     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5891     ecx = ecx + 0x14u; /* 0x300028D6: add ecx, 0x14 */
   5892     _flag_k = FK_ADD;
   5893     /* cmp edi, ebx */ /* 0x300028D9: cmp edi, ebx */
   5894     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   5895     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5896     _flag_k = FK_CMP;
   5897     MEM32(ebp + (-0x14)) = ecx; /* 0x300028DB: mov dword ptr [ebp - 0x14], ecx */
   5898     RECOMP_BACKEDGE();
   5899     if (CMP_NE(_flag_a, _flag_b)) goto L_300028C7; /* 0x300028DE: jne 0x300028c7 */
   5900 L_300028E0:
   5901     ebx = MEM32(esi + 0x8); /* 0x300028E0: mov ebx, dword ptr [esi + 8] */
   5902     edi = ebx + (-0x14); /* 0x300028E3: lea edi, [ebx - 0x14] */
   5903     /* cmp edi, ebx */ /* 0x300028E6: cmp edi, ebx */
   5904     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   5905     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5906     _flag_k = FK_CMP;
   5907     if (CMP_EQ(_flag_a, _flag_b)) goto L_300028FA; /* 0x300028E8: je 0x300028fa */
   5908 L_300028EA:
   5909     PUSH32(esp, 0); /* 0x300028EA: push 0 */
   5910     ecx = edi; /* 0x300028EC: mov ecx, edi */
   5911     RECOMP_ICALL(0x30001E40u); /* 0x300028EE: call 0x30001e40 */ /* not lifted */
   5912     RECOMP_FLAGS_IN();
   5913     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   5914     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5915     edi = edi + 0x14u; /* 0x300028F3: add edi, 0x14 */
   5916     _flag_k = FK_ADD;
   5917     /* cmp edi, ebx */ /* 0x300028F6: cmp edi, ebx */
   5918     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   5919     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5920     _flag_k = FK_CMP;
   5921     RECOMP_BACKEDGE();
   5922     if (CMP_NE(_flag_a, _flag_b)) goto L_300028EA; /* 0x300028F8: jne 0x300028ea */
   5923 L_300028FA:
   5924     eax = MEM32(esi + 0x8); /* 0x300028FA: mov eax, dword ptr [esi + 8] */
   5925     edi = MEM32(ebp + (-0x18)); /* 0x300028FD: mov edi, dword ptr [ebp - 0x18] */
   5926     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   5927     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5928     eax = eax + 0xFFFFFFECu; /* 0x30002900: add eax, -0x14 */
   5929     _flag_k = FK_ADD;
   5930     MEM32(esi + 0x8) = eax; /* 0x30002903: mov dword ptr [esi + 8], eax */
   5931     eax = MEM32(edi + 0x10); /* 0x30002906: mov eax, dword ptr [edi + 0x10] */
   5932     ecx = ebp + (-0x50); /* 0x30002909: lea ecx, [ebp - 0x50] */
   5933     MEM32(ebp + (-0x1C)) = eax; /* 0x3000290C: mov dword ptr [ebp - 0x1c], eax */
   5934     RECOMP_ICALL(0x300081D0u); /* 0x3000290F: call 0x300081d0 */ /* not lifted */
   5935     RECOMP_FLAGS_IN();
   5936     _st[0] += (double)*(float*)ADDR(ebp + (-0x1C)); /* 0x30002914: fadd dword ptr [ebp - 0x1c] */
   5937     _st[0] = fabs(_st[0]); /* 0x30002917: fabs  */
   5938     _fpu_cmp = FPU_CMP(_st[0], *(double*)ADDR(0x30019118)); /* 0x30002919: fcomp qword ptr [0x30019118] */
   5939     fp_pop();
   5940     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3000291F: fnstsw ax */
   5941     /* test HI8(eax), 0x41u */ /* 0x30002921: test ah, 0x41 */
   5942     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24;
   5943     _cf = 0;
   5944     _flag_k = FK_NARROW(FK_TEST, 24);
   5945     if (TEST_NZ(_flag_a, _flag_b)) goto L_3000294B; /* 0x30002924: jne 0x3000294b */
   5946 L_30002926:
   5947     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002926: push -1 */
   5948     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002928: push -1 */
   5949     ecx = ebp + (-0x3C); /* 0x3000292A: lea ecx, [ebp - 0x3c] */
   5950     PUSH32(esp, ecx); /* 0x3000292D: push ecx */
   5951     edx = ebp + (-0x50); /* 0x3000292E: lea edx, [ebp - 0x50] */
   5952     PUSH32(esp, edx); /* 0x30002931: push edx */
   5953     ecx = edi + 0x24; /* 0x30002932: lea ecx, [edi + 0x24] */
   5954     RECOMP_ICALL(0x30001170u); /* 0x30002935: call 0x30001170 */ /* not lifted */
   5955     RECOMP_FLAGS_IN();
   5956     PUSH32(esp, 1); /* 0x3000293A: push 1 */
   5957     PUSH32(esp, 1); /* 0x3000293C: push 1 */
   5958     eax = ebp + (-0x2C); /* 0x3000293E: lea eax, [ebp - 0x2c] */
   5959     ecx = ebp + (-0x3C); /* 0x30002941: lea ecx, [ebp - 0x3c] */
   5960     PUSH32(esp, eax); /* 0x30002944: push eax */
   5961     PUSH32(esp, ecx); /* 0x30002945: push ecx */
   5962     ecx = edi + 0x2C; /* 0x30002946: lea ecx, [edi + 0x2c] */
   5963     goto L_3000296E; /* 0x30002949: jmp 0x3000296e */
   5964 L_3000294B:
   5965     PUSH32(esp, 1); /* 0x3000294B: push 1 */
   5966     PUSH32(esp, 1); /* 0x3000294D: push 1 */
   5967     edx = ebp + (-0x3C); /* 0x3000294F: lea edx, [ebp - 0x3c] */
   5968     PUSH32(esp, edx); /* 0x30002952: push edx */
   5969     eax = ebp + (-0x50); /* 0x30002953: lea eax, [ebp - 0x50] */
   5970     PUSH32(esp, eax); /* 0x30002956: push eax */
   5971     ecx = edi + 0x2C; /* 0x30002957: lea ecx, [edi + 0x2c] */
   5972     RECOMP_ICALL(0x30001170u); /* 0x3000295A: call 0x30001170 */ /* not lifted */
   5973     RECOMP_FLAGS_IN();
   5974     PUSH32(esp, 0xFFFFFFFFu); /* 0x3000295F: push -1 */
   5975     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002961: push -1 */
   5976     ecx = ebp + (-0x2C); /* 0x30002963: lea ecx, [ebp - 0x2c] */
   5977     PUSH32(esp, ecx); /* 0x30002966: push ecx */
   5978     edx = ebp + (-0x3C); /* 0x30002967: lea edx, [ebp - 0x3c] */
   5979     PUSH32(esp, edx); /* 0x3000296A: push edx */
   5980     ecx = edi + 0x24; /* 0x3000296B: lea ecx, [edi + 0x24] */
   5981 L_3000296E:
   5982     RECOMP_ICALL(0x300013A0u); /* 0x3000296E: call 0x300013a0 */ /* not lifted */
   5983     RECOMP_FLAGS_IN();
   5984     ecx = ebp + (-0x50); /* 0x30002973: lea ecx, [ebp - 0x50] */
   5985     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x30002976: mov byte ptr [ebp - 4], 1 */
   5986     RECOMP_ICALL(0x30007AB0u); /* 0x3000297A: call 0x30007ab0 */ /* not lifted */
   5987     RECOMP_FLAGS_IN();
   5988     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5989     ebx = 0; /* 0x3000297F: xor ebx, ebx */
   5990     _cf = 0;
   5991     _flag_k = FK_TEST;
   5992     RECOMP_BACKEDGE();
   5993     goto L_3000287B; /* 0x30002981: jmp 0x3000287b */
   5994 L_30002986:
   5995     eax = ebp + (-0x2C); /* 0x30002986: lea eax, [ebp - 0x2c] */
   5996     /* cmp esi, eax */ /* 0x30002989: cmp esi, eax */
   5997     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   5998     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5999     _flag_k = FK_CMP;
   6000     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002ABA; /* 0x3000298B: je 0x30002aba */
   6001 L_30002991:
   6002     eax = MEM32(ebp + (-0x28)); /* 0x30002991: mov eax, dword ptr [ebp - 0x28] */
   6003     /* cmp eax, ebx */ /* 0x30002994: cmp eax, ebx */
   6004     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   6005     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6006     _flag_k = FK_CMP;
   6007     if (CMP_EQ(_flag_a, _flag_b)) goto L_300029B0; /* 0x30002996: je 0x300029b0 */
   6008 L_30002998:
   6009     ecx = MEM32(ebp + (-0x24)); /* 0x30002998: mov ecx, dword ptr [ebp - 0x24] */
   6010     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   6011     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6012     ecx = ecx - eax; /* 0x3000299B: sub ecx, eax */
   6013     _flag_k = FK_CMP;
   6014     eax = 0x66666667u; /* 0x3000299D: mov eax, 0x66666667 */
   6015     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x300029A2: imul ecx */
   6016       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   6017       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   6018     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300029A4: sar edx, 3 */
   6019     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6020     edx = (uint32_t)((int32_t)edx >> 3u);
   6021     ecx = edx; /* 0x300029A7: mov ecx, edx */
   6022     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x300029A9: shr ecx, 0x1f */
   6023     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6024     ecx = ecx >> 31u; /* 0x300029A9: shr ecx, 0x1f */
   6025     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   6026     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6027     edx = edx + ecx; /* 0x300029AC: add edx, ecx */
   6028     _flag_k = FK_ADD;
   6029     ebx = edx; /* 0x300029AE: mov ebx, edx */
   6030 L_300029B0:
   6031     edi = MEM32(esi + 0x4); /* 0x300029B0: mov edi, dword ptr [esi + 4] */
   6032     /* test edi, edi */ /* 0x300029B3: test edi, edi */
   6033     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   6034     _cf = 0;
   6035     _flag_k = FK_TEST;
   6036     if (TEST_NZ(_flag_a, _flag_b)) goto L_300029BB; /* 0x300029B5: jne 0x300029bb */
   6037 L_300029B7:
   6038     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6039     edx = 0; /* 0x300029B7: xor edx, edx */
   6040     _cf = 0;
   6041     _flag_k = FK_TEST;
   6042     goto L_300029D1; /* 0x300029B9: jmp 0x300029d1 */
   6043 L_300029BB:
   6044     ecx = MEM32(esi + 0x8); /* 0x300029BB: mov ecx, dword ptr [esi + 8] */
   6045     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   6046     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6047     ecx = ecx - edi; /* 0x300029BE: sub ecx, edi */
   6048     _flag_k = FK_CMP;
   6049     eax = 0x66666667u; /* 0x300029C0: mov eax, 0x66666667 */
   6050     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x300029C5: imul ecx */
   6051       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   6052       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   6053     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300029C7: sar edx, 3 */
   6054     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6055     edx = (uint32_t)((int32_t)edx >> 3u);
   6056     eax = edx; /* 0x300029CA: mov eax, edx */
   6057     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x300029CC: shr eax, 0x1f */
   6058     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6059     eax = eax >> 31u; /* 0x300029CC: shr eax, 0x1f */
   6060     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   6061     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6062     edx = edx + eax; /* 0x300029CF: add edx, eax */
   6063     _flag_k = FK_ADD;
   6064 L_300029D1:
   6065     /* cmp ebx, edx */ /* 0x300029D1: cmp ebx, edx */
   6066     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edx);
   6067     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6068     _flag_k = FK_CMP;
   6069     if (CMP_A(_flag_a, _flag_b)) goto L_30002A0B; /* 0x300029D3: ja 0x30002a0b */
   6070 L_300029D5:
   6071     ecx = MEM32(ebp + (-0x24)); /* 0x300029D5: mov ecx, dword ptr [ebp - 0x24] */
   6072     edx = MEM32(ebp + (-0x28)); /* 0x300029D8: mov edx, dword ptr [ebp - 0x28] */
   6073     PUSH32(esp, edi); /* 0x300029DB: push edi */
   6074     PUSH32(esp, ecx); /* 0x300029DC: push ecx */
   6075     PUSH32(esp, edx); /* 0x300029DD: push edx */
   6076     RECOMP_ICALL(0x30001D40u); /* 0x300029DE: call 0x30001d40 */ /* not lifted */
   6077     RECOMP_FLAGS_IN();
   6078     ecx = MEM32(esi + 0x8); /* 0x300029E3: mov ecx, dword ptr [esi + 8] */
   6079     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   6080     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6081     esp = esp + 0xCu; /* 0x300029E6: add esp, 0xc */
   6082     _flag_k = FK_ADD;
   6083     PUSH32(esp, ecx); /* 0x300029E9: push ecx */
   6084     PUSH32(esp, eax); /* 0x300029EA: push eax */
   6085     ecx = esi; /* 0x300029EB: mov ecx, esi */
   6086     RECOMP_ICALL(0x300017A0u); /* 0x300029ED: call 0x300017a0 */ /* not lifted */
   6087     RECOMP_FLAGS_IN();
   6088     ecx = ebp + (-0x2C); /* 0x300029F2: lea ecx, [ebp - 0x2c] */
   6089     RECOMP_ICALL(0x30001CB0u); /* 0x300029F5: call 0x30001cb0 */ /* not lifted */
   6090     RECOMP_FLAGS_IN();
   6091     edx = eax + eax * 4; /* 0x300029FA: lea edx, [eax + eax*4] */
   6092     eax = MEM32(esi + 0x4); /* 0x300029FD: mov eax, dword ptr [esi + 4] */
   6093     ecx = eax + edx * 4; /* 0x30002A00: lea ecx, [eax + edx*4] */
   6094     MEM32(esi + 0x8) = ecx; /* 0x30002A03: mov dword ptr [esi + 8], ecx */
   6095     goto L_30002AB8; /* 0x30002A06: jmp 0x30002ab8 */
   6096 L_30002A0B:
   6097     ecx = esi; /* 0x30002A0B: mov ecx, esi */
   6098     RECOMP_ICALL(0x30001C80u); /* 0x30002A0D: call 0x30001c80 */ /* not lifted */
   6099     RECOMP_FLAGS_IN();
   6100     ecx = ebp + (-0x2C); /* 0x30002A12: lea ecx, [ebp - 0x2c] */
   6101     edi = eax; /* 0x30002A15: mov edi, eax */
   6102     RECOMP_ICALL(0x30001CB0u); /* 0x30002A17: call 0x30001cb0 */ /* not lifted */
   6103     RECOMP_FLAGS_IN();
   6104     /* cmp eax, edi */ /* 0x30002A1C: cmp eax, edi */
   6105     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   6106     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6107     _flag_k = FK_CMP;
   6108     if (CMP_A(_flag_a, _flag_b)) goto L_30002A67; /* 0x30002A1E: ja 0x30002a67 */
   6109 L_30002A20:
   6110     edi = MEM32(ebp + (-0x28)); /* 0x30002A20: mov edi, dword ptr [ebp - 0x28] */
   6111     ecx = esi; /* 0x30002A23: mov ecx, esi */
   6112     RECOMP_ICALL(0x30001CB0u); /* 0x30002A25: call 0x30001cb0 */ /* not lifted */
   6113     RECOMP_FLAGS_IN();
   6114     ecx = MEM32(ebp + (-0x28)); /* 0x30002A2A: mov ecx, dword ptr [ebp - 0x28] */
   6115     edx = eax + eax * 4; /* 0x30002A2D: lea edx, [eax + eax*4] */
   6116     eax = MEM32(esi + 0x4); /* 0x30002A30: mov eax, dword ptr [esi + 4] */
   6117     PUSH32(esp, eax); /* 0x30002A33: push eax */
   6118     edi = edi + edx * 4; /* 0x30002A34: lea edi, [edi + edx*4] */
   6119     PUSH32(esp, edi); /* 0x30002A37: push edi */
   6120     PUSH32(esp, ecx); /* 0x30002A38: push ecx */
   6121     RECOMP_ICALL(0x30001D40u); /* 0x30002A39: call 0x30001d40 */ /* not lifted */
   6122     RECOMP_FLAGS_IN();
   6123     edx = MEM32(esi + 0x8); /* 0x30002A3E: mov edx, dword ptr [esi + 8] */
   6124     eax = MEM32(ebp + (-0x24)); /* 0x30002A41: mov eax, dword ptr [ebp - 0x24] */
   6125     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   6126     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6127     esp = esp + 0xCu; /* 0x30002A44: add esp, 0xc */
   6128     _flag_k = FK_ADD;
   6129     PUSH32(esp, edx); /* 0x30002A47: push edx */
   6130     PUSH32(esp, eax); /* 0x30002A48: push eax */
   6131     PUSH32(esp, edi); /* 0x30002A49: push edi */
   6132     ecx = esi; /* 0x30002A4A: mov ecx, esi */
   6133     RECOMP_ICALL(0x300017D0u); /* 0x30002A4C: call 0x300017d0 */ /* not lifted */
   6134     RECOMP_FLAGS_IN();
   6135     ecx = ebp + (-0x2C); /* 0x30002A51: lea ecx, [ebp - 0x2c] */
   6136     RECOMP_ICALL(0x30001CB0u); /* 0x30002A54: call 0x30001cb0 */ /* not lifted */
   6137     RECOMP_FLAGS_IN();
   6138     edx = MEM32(esi + 0x4); /* 0x30002A59: mov edx, dword ptr [esi + 4] */
   6139     ecx = eax + eax * 4; /* 0x30002A5C: lea ecx, [eax + eax*4] */
   6140     eax = edx + ecx * 4; /* 0x30002A5F: lea eax, [edx + ecx*4] */
   6141     MEM32(esi + 0x8) = eax; /* 0x30002A62: mov dword ptr [esi + 8], eax */
   6142     goto L_30002AB8; /* 0x30002A65: jmp 0x30002ab8 */
   6143 L_30002A67:
   6144     ecx = MEM32(esi + 0x8); /* 0x30002A67: mov ecx, dword ptr [esi + 8] */
   6145     edx = MEM32(esi + 0x4); /* 0x30002A6A: mov edx, dword ptr [esi + 4] */
   6146     PUSH32(esp, ecx); /* 0x30002A6D: push ecx */
   6147     PUSH32(esp, edx); /* 0x30002A6E: push edx */
   6148     ecx = esi; /* 0x30002A6F: mov ecx, esi */
   6149     RECOMP_ICALL(0x300017A0u); /* 0x30002A71: call 0x300017a0 */ /* not lifted */
   6150     RECOMP_FLAGS_IN();
   6151     eax = MEM32(esi + 0x4); /* 0x30002A76: mov eax, dword ptr [esi + 4] */
   6152     PUSH32(esp, eax); /* 0x30002A79: push eax */
   6153     RECOMP_ICALL(0x30018080u); /* 0x30002A7A: call 0x30018080 */ /* not lifted */
   6154     RECOMP_FLAGS_IN();
   6155     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6156     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6157     esp = esp + 4; /* 0x30002A7F: add esp, 4 */
   6158     _flag_k = FK_ADD;
   6159     ecx = ebp + (-0x2C); /* 0x30002A82: lea ecx, [ebp - 0x2c] */
   6160     RECOMP_ICALL(0x30001CB0u); /* 0x30002A85: call 0x30001cb0 */ /* not lifted */
   6161     RECOMP_FLAGS_IN();
   6162     /* test eax, eax */ /* 0x30002A8A: test eax, eax */
   6163     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   6164     _cf = 0;
   6165     _flag_k = FK_TEST;
   6166     if (TEST_NS(_flag_a, _flag_b)) goto L_30002A90; /* 0x30002A8C: jge 0x30002a90 */
   6167 L_30002A8E:
   6168     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6169     eax = 0; /* 0x30002A8E: xor eax, eax */
   6170     _cf = 0;
   6171     _flag_k = FK_TEST;
   6172 L_30002A90:
   6173     eax = eax + eax * 4; /* 0x30002A90: lea eax, [eax + eax*4] */
   6174     if (2u) _cf = (((eax) >> 30) & 1u); /* 0x30002A93: shl eax, 2 */
   6175     if (2u) { _flag_a = recomp_flags_pack((eax << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6176     eax = eax << 2u; /* 0x30002A93: shl eax, 2 */
   6177     PUSH32(esp, eax); /* 0x30002A96: push eax */
   6178     RECOMP_ICALL(0x300180A8u); /* 0x30002A97: call 0x300180a8 */ /* not lifted */
   6179     RECOMP_FLAGS_IN();
   6180     ecx = MEM32(ebp + (-0x24)); /* 0x30002A9C: mov ecx, dword ptr [ebp - 0x24] */
   6181     edx = MEM32(ebp + (-0x28)); /* 0x30002A9F: mov edx, dword ptr [ebp - 0x28] */
   6182     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6183     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6184     esp = esp + 4; /* 0x30002AA2: add esp, 4 */
   6185     _flag_k = FK_ADD;
   6186     PUSH32(esp, eax); /* 0x30002AA5: push eax */
   6187     PUSH32(esp, ecx); /* 0x30002AA6: push ecx */
   6188     PUSH32(esp, edx); /* 0x30002AA7: push edx */
   6189     ecx = esi; /* 0x30002AA8: mov ecx, esi */
   6190     MEM32(esi + 0x4) = eax; /* 0x30002AAA: mov dword ptr [esi + 4], eax */
   6191     RECOMP_ICALL(0x300017D0u); /* 0x30002AAD: call 0x300017d0 */ /* not lifted */
   6192     RECOMP_FLAGS_IN();
   6193     MEM32(esi + 0x8) = eax; /* 0x30002AB2: mov dword ptr [esi + 8], eax */
   6194     MEM32(esi + 0xC) = eax; /* 0x30002AB5: mov dword ptr [esi + 0xc], eax */
   6195 L_30002AB8:
   6196     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6197     ebx = 0; /* 0x30002AB8: xor ebx, ebx */
   6198     _cf = 0;
   6199     _flag_k = FK_TEST;
   6200 L_30002ABA:
   6201     esi = MEM32(ebp + (-0x18)); /* 0x30002ABA: mov esi, dword ptr [ebp - 0x18] */
   6202     ecx = esi + 0x24; /* 0x30002ABD: lea ecx, [esi + 0x24] */
   6203     RECOMP_ICALL(0x300016B0u); /* 0x30002AC0: call 0x300016b0 */ /* not lifted */
   6204     RECOMP_FLAGS_IN();
   6205     ecx = esi + 0x2C; /* 0x30002AC5: lea ecx, [esi + 0x2c] */
   6206     RECOMP_ICALL(0x300016B0u); /* 0x30002AC8: call 0x300016b0 */ /* not lifted */
   6207     RECOMP_FLAGS_IN();
   6208     edi = MEM32(ebp + (-0x24)); /* 0x30002ACD: mov edi, dword ptr [ebp - 0x24] */
   6209     esi = MEM32(ebp + (-0x28)); /* 0x30002AD0: mov esi, dword ptr [ebp - 0x28] */
   6210     /* cmp esi, edi */ /* 0x30002AD3: cmp esi, edi */
   6211     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   6212     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6213     _flag_k = FK_CMP;
   6214     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x30002AD5: mov byte ptr [ebp - 4], 0 */
   6215     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002AED; /* 0x30002AD9: je 0x30002aed */
   6216 L_30002ADB:
   6217     PUSH32(esp, ebx); /* 0x30002ADB: push ebx */
   6218     ecx = esi; /* 0x30002ADC: mov ecx, esi */
   6219     RECOMP_ICALL(0x30001E40u); /* 0x30002ADE: call 0x30001e40 */ /* not lifted */
   6220     RECOMP_FLAGS_IN();
   6221     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   6222     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6223     esi = esi + 0x14u; /* 0x30002AE3: add esi, 0x14 */
   6224     _flag_k = FK_ADD;
   6225     /* cmp esi, edi */ /* 0x30002AE6: cmp esi, edi */
   6226     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   6227     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6228     _flag_k = FK_CMP;
   6229     RECOMP_BACKEDGE();
   6230     if (CMP_NE(_flag_a, _flag_b)) goto L_30002ADB; /* 0x30002AE8: jne 0x30002adb */
   6231 L_30002AEA:
   6232     esi = MEM32(ebp + (-0x28)); /* 0x30002AEA: mov esi, dword ptr [ebp - 0x28] */
   6233 L_30002AED:
   6234     PUSH32(esp, esi); /* 0x30002AED: push esi */
   6235     RECOMP_ICALL(0x30018080u); /* 0x30002AEE: call 0x30018080 */ /* not lifted */
   6236     RECOMP_FLAGS_IN();
   6237     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6238     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6239     esp = esp + 4; /* 0x30002AF3: add esp, 4 */
   6240     _flag_k = FK_ADD;
   6241     ecx = ebp + (-0x3C); /* 0x30002AF6: lea ecx, [ebp - 0x3c] */
   6242     MEM32(ebp + (-0x28)) = ebx; /* 0x30002AF9: mov dword ptr [ebp - 0x28], ebx */
   6243     MEM32(ebp + (-0x24)) = ebx; /* 0x30002AFC: mov dword ptr [ebp - 0x24], ebx */
   6244     MEM32(ebp + (-0x20)) = ebx; /* 0x30002AFF: mov dword ptr [ebp - 0x20], ebx */
   6245     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x30002B02: mov dword ptr [ebp - 4], 0xffffffff */
   6246     RECOMP_ICALL(0x30002B80u); /* 0x30002B09: call 0x30002b80 */ /* not lifted */
   6247     RECOMP_FLAGS_IN();
   6248     ecx = MEM32(ebp + (-0xC)); /* 0x30002B0E: mov ecx, dword ptr [ebp - 0xc] */
   6249     edi = POP32_VAL(esp); /* 0x30002B11: pop edi */
   6250     esi = POP32_VAL(esp); /* 0x30002B12: pop esi */
   6251     ebx = POP32_VAL(esp); /* 0x30002B13: pop ebx */
   6252     MEM32(FS_BASE + (0)) = ecx; /* 0x30002B14: mov dword ptr fs:[0], ecx */
   6253     esp = ebp; /* 0x30002B1B: mov esp, ebp */
   6254     ebp = POP32_VAL(esp); /* 0x30002B1D: pop ebp */
   6255     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30002B1E: ret  */
   6256     RECOMP_REGS_OUT();
   6257 }
   6258 
   6259 void sub_3000287B(void) {
   6260     int _fpu_cmp = 0;
   6261     uint32_t _cf = 0;
   6262     int _df = 1;
   6263     uint32_t _flag_k = FK_NONE;
   6264     uint32_t _flag_a = 0, _flag_b = 0;
   6265     uint32_t _itail_tgt = 0;
   6266     RECOMP_REGS_LOCALS
   6267     RECOMP_ENTER(0x3000287Bu);
   6268 
   6269 L_3000287B:
   6270     eax = MEM32(esi + 0x4); /* 0x3000287B: mov eax, dword ptr [esi + 4] */
   6271     /* cmp eax, ebx */ /* 0x3000287E: cmp eax, ebx */
   6272     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   6273     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6274     _flag_k = FK_CMP;
   6275     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002986; /* 0x30002880: je 0x30002986 */
   6276 L_30002886:
   6277     ecx = MEM32(esi + 0x8); /* 0x30002886: mov ecx, dword ptr [esi + 8] */
   6278     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   6279     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6280     ecx = ecx - eax; /* 0x30002889: sub ecx, eax */
   6281     _flag_k = FK_CMP;
   6282     eax = 0x66666667u; /* 0x3000288B: mov eax, 0x66666667 */
   6283     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002890: imul ecx */
   6284       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   6285       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   6286     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002892: sar edx, 3 */
   6287     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6288     edx = (uint32_t)((int32_t)edx >> 3u);
   6289     eax = edx; /* 0x30002895: mov eax, edx */
   6290     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002897: shr eax, 0x1f */
   6291     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6292     eax = eax >> 31u; /* 0x30002897: shr eax, 0x1f */
   6293     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   6294     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6295     edx = edx + eax; /* 0x3000289A: add edx, eax */
   6296     _flag_k = FK_ADD;
   6297     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_30002986; /* 0x3000289C: je 0x30002986 */
   6298 L_300028A2:
   6299     ecx = MEM32(ebp + (-0x18)); /* 0x300028A2: mov ecx, dword ptr [ebp - 0x18] */
   6300     eax = MEM32(ecx + 0x1C); /* 0x300028A5: mov eax, dword ptr [ecx + 0x1c] */
   6301     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   6302     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6303     eax = eax + 0xFFFFFFECu; /* 0x300028A8: add eax, -0x14 */
   6304     _flag_k = FK_ADD;
   6305     PUSH32(esp, eax); /* 0x300028AB: push eax */
   6306     ecx = ebp + (-0x50); /* 0x300028AC: lea ecx, [ebp - 0x50] */
   6307     RECOMP_ICALL(0x30007A50u); /* 0x300028AF: call 0x30007a50 */ /* not lifted */
   6308     RECOMP_FLAGS_IN();
   6309     ebx = MEM32(esi + 0x8); /* 0x300028B4: mov ebx, dword ptr [esi + 8] */
   6310     edi = ebx; /* 0x300028B7: lea edi, [ebx] */
   6311     /* cmp edi, ebx */ /* 0x300028B9: cmp edi, ebx */
   6312     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   6313     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6314     _flag_k = FK_CMP;
   6315     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x300028BB: mov byte ptr [ebp - 4], 2 */
   6316     if (CMP_EQ(_flag_a, _flag_b)) goto L_300028E0; /* 0x300028BF: je 0x300028e0 */
   6317 L_300028C1:
   6318     edx = edi + (-0x14); /* 0x300028C1: lea edx, [edi - 0x14] */
   6319     MEM32(ebp + (-0x14)) = edx; /* 0x300028C4: mov dword ptr [ebp - 0x14], edx */
   6320 L_300028C7:
   6321     ecx = MEM32(ebp + (-0x14)); /* 0x300028C7: mov ecx, dword ptr [ebp - 0x14] */
   6322     PUSH32(esp, edi); /* 0x300028CA: push edi */
   6323     RECOMP_ICALL(0x300080D0u); /* 0x300028CB: call 0x300080d0 */ /* not lifted */
   6324     RECOMP_FLAGS_IN();
   6325     ecx = MEM32(ebp + (-0x14)); /* 0x300028D0: mov ecx, dword ptr [ebp - 0x14] */
   6326     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   6327     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6328     edi = edi + 0x14u; /* 0x300028D3: add edi, 0x14 */
   6329     _flag_k = FK_ADD;
   6330     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x14u);
   6331     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6332     ecx = ecx + 0x14u; /* 0x300028D6: add ecx, 0x14 */
   6333     _flag_k = FK_ADD;
   6334     /* cmp edi, ebx */ /* 0x300028D9: cmp edi, ebx */
   6335     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   6336     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6337     _flag_k = FK_CMP;
   6338     MEM32(ebp + (-0x14)) = ecx; /* 0x300028DB: mov dword ptr [ebp - 0x14], ecx */
   6339     RECOMP_BACKEDGE();
   6340     if (CMP_NE(_flag_a, _flag_b)) goto L_300028C7; /* 0x300028DE: jne 0x300028c7 */
   6341 L_300028E0:
   6342     ebx = MEM32(esi + 0x8); /* 0x300028E0: mov ebx, dword ptr [esi + 8] */
   6343     edi = ebx + (-0x14); /* 0x300028E3: lea edi, [ebx - 0x14] */
   6344     /* cmp edi, ebx */ /* 0x300028E6: cmp edi, ebx */
   6345     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   6346     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6347     _flag_k = FK_CMP;
   6348     if (CMP_EQ(_flag_a, _flag_b)) goto L_300028FA; /* 0x300028E8: je 0x300028fa */
   6349 L_300028EA:
   6350     PUSH32(esp, 0); /* 0x300028EA: push 0 */
   6351     ecx = edi; /* 0x300028EC: mov ecx, edi */
   6352     RECOMP_ICALL(0x30001E40u); /* 0x300028EE: call 0x30001e40 */ /* not lifted */
   6353     RECOMP_FLAGS_IN();
   6354     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   6355     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6356     edi = edi + 0x14u; /* 0x300028F3: add edi, 0x14 */
   6357     _flag_k = FK_ADD;
   6358     /* cmp edi, ebx */ /* 0x300028F6: cmp edi, ebx */
   6359     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   6360     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6361     _flag_k = FK_CMP;
   6362     RECOMP_BACKEDGE();
   6363     if (CMP_NE(_flag_a, _flag_b)) goto L_300028EA; /* 0x300028F8: jne 0x300028ea */
   6364 L_300028FA:
   6365     eax = MEM32(esi + 0x8); /* 0x300028FA: mov eax, dword ptr [esi + 8] */
   6366     edi = MEM32(ebp + (-0x18)); /* 0x300028FD: mov edi, dword ptr [ebp - 0x18] */
   6367     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   6368     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6369     eax = eax + 0xFFFFFFECu; /* 0x30002900: add eax, -0x14 */
   6370     _flag_k = FK_ADD;
   6371     MEM32(esi + 0x8) = eax; /* 0x30002903: mov dword ptr [esi + 8], eax */
   6372     eax = MEM32(edi + 0x10); /* 0x30002906: mov eax, dword ptr [edi + 0x10] */
   6373     ecx = ebp + (-0x50); /* 0x30002909: lea ecx, [ebp - 0x50] */
   6374     MEM32(ebp + (-0x1C)) = eax; /* 0x3000290C: mov dword ptr [ebp - 0x1c], eax */
   6375     RECOMP_ICALL(0x300081D0u); /* 0x3000290F: call 0x300081d0 */ /* not lifted */
   6376     RECOMP_FLAGS_IN();
   6377     _st[0] += (double)*(float*)ADDR(ebp + (-0x1C)); /* 0x30002914: fadd dword ptr [ebp - 0x1c] */
   6378     _st[0] = fabs(_st[0]); /* 0x30002917: fabs  */
   6379     _fpu_cmp = FPU_CMP(_st[0], *(double*)ADDR(0x30019118)); /* 0x30002919: fcomp qword ptr [0x30019118] */
   6380     fp_pop();
   6381     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3000291F: fnstsw ax */
   6382     /* test HI8(eax), 0x41u */ /* 0x30002921: test ah, 0x41 */
   6383     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24;
   6384     _cf = 0;
   6385     _flag_k = FK_NARROW(FK_TEST, 24);
   6386     if (TEST_NZ(_flag_a, _flag_b)) goto L_3000294B; /* 0x30002924: jne 0x3000294b */
   6387 L_30002926:
   6388     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002926: push -1 */
   6389     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002928: push -1 */
   6390     ecx = ebp + (-0x3C); /* 0x3000292A: lea ecx, [ebp - 0x3c] */
   6391     PUSH32(esp, ecx); /* 0x3000292D: push ecx */
   6392     edx = ebp + (-0x50); /* 0x3000292E: lea edx, [ebp - 0x50] */
   6393     PUSH32(esp, edx); /* 0x30002931: push edx */
   6394     ecx = edi + 0x24; /* 0x30002932: lea ecx, [edi + 0x24] */
   6395     RECOMP_ICALL(0x30001170u); /* 0x30002935: call 0x30001170 */ /* not lifted */
   6396     RECOMP_FLAGS_IN();
   6397     PUSH32(esp, 1); /* 0x3000293A: push 1 */
   6398     PUSH32(esp, 1); /* 0x3000293C: push 1 */
   6399     eax = ebp + (-0x2C); /* 0x3000293E: lea eax, [ebp - 0x2c] */
   6400     ecx = ebp + (-0x3C); /* 0x30002941: lea ecx, [ebp - 0x3c] */
   6401     PUSH32(esp, eax); /* 0x30002944: push eax */
   6402     PUSH32(esp, ecx); /* 0x30002945: push ecx */
   6403     ecx = edi + 0x2C; /* 0x30002946: lea ecx, [edi + 0x2c] */
   6404     goto L_3000296E; /* 0x30002949: jmp 0x3000296e */
   6405 L_3000294B:
   6406     PUSH32(esp, 1); /* 0x3000294B: push 1 */
   6407     PUSH32(esp, 1); /* 0x3000294D: push 1 */
   6408     edx = ebp + (-0x3C); /* 0x3000294F: lea edx, [ebp - 0x3c] */
   6409     PUSH32(esp, edx); /* 0x30002952: push edx */
   6410     eax = ebp + (-0x50); /* 0x30002953: lea eax, [ebp - 0x50] */
   6411     PUSH32(esp, eax); /* 0x30002956: push eax */
   6412     ecx = edi + 0x2C; /* 0x30002957: lea ecx, [edi + 0x2c] */
   6413     RECOMP_ICALL(0x30001170u); /* 0x3000295A: call 0x30001170 */ /* not lifted */
   6414     RECOMP_FLAGS_IN();
   6415     PUSH32(esp, 0xFFFFFFFFu); /* 0x3000295F: push -1 */
   6416     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002961: push -1 */
   6417     ecx = ebp + (-0x2C); /* 0x30002963: lea ecx, [ebp - 0x2c] */
   6418     PUSH32(esp, ecx); /* 0x30002966: push ecx */
   6419     edx = ebp + (-0x3C); /* 0x30002967: lea edx, [ebp - 0x3c] */
   6420     PUSH32(esp, edx); /* 0x3000296A: push edx */
   6421     ecx = edi + 0x24; /* 0x3000296B: lea ecx, [edi + 0x24] */
   6422 L_3000296E:
   6423     RECOMP_ICALL(0x300013A0u); /* 0x3000296E: call 0x300013a0 */ /* not lifted */
   6424     RECOMP_FLAGS_IN();
   6425     ecx = ebp + (-0x50); /* 0x30002973: lea ecx, [ebp - 0x50] */
   6426     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x30002976: mov byte ptr [ebp - 4], 1 */
   6427     RECOMP_ICALL(0x30007AB0u); /* 0x3000297A: call 0x30007ab0 */ /* not lifted */
   6428     RECOMP_FLAGS_IN();
   6429     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6430     ebx = 0; /* 0x3000297F: xor ebx, ebx */
   6431     _cf = 0;
   6432     _flag_k = FK_TEST;
   6433     RECOMP_BACKEDGE();
   6434     goto L_3000287B; /* 0x30002981: jmp 0x3000287b */
   6435 L_30002986:
   6436     eax = ebp + (-0x2C); /* 0x30002986: lea eax, [ebp - 0x2c] */
   6437     /* cmp esi, eax */ /* 0x30002989: cmp esi, eax */
   6438     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   6439     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6440     _flag_k = FK_CMP;
   6441     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002ABA; /* 0x3000298B: je 0x30002aba */
   6442 L_30002991:
   6443     eax = MEM32(ebp + (-0x28)); /* 0x30002991: mov eax, dword ptr [ebp - 0x28] */
   6444     /* cmp eax, ebx */ /* 0x30002994: cmp eax, ebx */
   6445     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   6446     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6447     _flag_k = FK_CMP;
   6448     if (CMP_EQ(_flag_a, _flag_b)) goto L_300029B0; /* 0x30002996: je 0x300029b0 */
   6449 L_30002998:
   6450     ecx = MEM32(ebp + (-0x24)); /* 0x30002998: mov ecx, dword ptr [ebp - 0x24] */
   6451     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   6452     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6453     ecx = ecx - eax; /* 0x3000299B: sub ecx, eax */
   6454     _flag_k = FK_CMP;
   6455     eax = 0x66666667u; /* 0x3000299D: mov eax, 0x66666667 */
   6456     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x300029A2: imul ecx */
   6457       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   6458       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   6459     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300029A4: sar edx, 3 */
   6460     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6461     edx = (uint32_t)((int32_t)edx >> 3u);
   6462     ecx = edx; /* 0x300029A7: mov ecx, edx */
   6463     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x300029A9: shr ecx, 0x1f */
   6464     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6465     ecx = ecx >> 31u; /* 0x300029A9: shr ecx, 0x1f */
   6466     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   6467     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6468     edx = edx + ecx; /* 0x300029AC: add edx, ecx */
   6469     _flag_k = FK_ADD;
   6470     ebx = edx; /* 0x300029AE: mov ebx, edx */
   6471 L_300029B0:
   6472     edi = MEM32(esi + 0x4); /* 0x300029B0: mov edi, dword ptr [esi + 4] */
   6473     /* test edi, edi */ /* 0x300029B3: test edi, edi */
   6474     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   6475     _cf = 0;
   6476     _flag_k = FK_TEST;
   6477     if (TEST_NZ(_flag_a, _flag_b)) goto L_300029BB; /* 0x300029B5: jne 0x300029bb */
   6478 L_300029B7:
   6479     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6480     edx = 0; /* 0x300029B7: xor edx, edx */
   6481     _cf = 0;
   6482     _flag_k = FK_TEST;
   6483     goto L_300029D1; /* 0x300029B9: jmp 0x300029d1 */
   6484 L_300029BB:
   6485     ecx = MEM32(esi + 0x8); /* 0x300029BB: mov ecx, dword ptr [esi + 8] */
   6486     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   6487     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6488     ecx = ecx - edi; /* 0x300029BE: sub ecx, edi */
   6489     _flag_k = FK_CMP;
   6490     eax = 0x66666667u; /* 0x300029C0: mov eax, 0x66666667 */
   6491     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x300029C5: imul ecx */
   6492       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   6493       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   6494     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300029C7: sar edx, 3 */
   6495     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6496     edx = (uint32_t)((int32_t)edx >> 3u);
   6497     eax = edx; /* 0x300029CA: mov eax, edx */
   6498     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x300029CC: shr eax, 0x1f */
   6499     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6500     eax = eax >> 31u; /* 0x300029CC: shr eax, 0x1f */
   6501     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   6502     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6503     edx = edx + eax; /* 0x300029CF: add edx, eax */
   6504     _flag_k = FK_ADD;
   6505 L_300029D1:
   6506     /* cmp ebx, edx */ /* 0x300029D1: cmp ebx, edx */
   6507     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edx);
   6508     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6509     _flag_k = FK_CMP;
   6510     if (CMP_A(_flag_a, _flag_b)) goto L_30002A0B; /* 0x300029D3: ja 0x30002a0b */
   6511 L_300029D5:
   6512     ecx = MEM32(ebp + (-0x24)); /* 0x300029D5: mov ecx, dword ptr [ebp - 0x24] */
   6513     edx = MEM32(ebp + (-0x28)); /* 0x300029D8: mov edx, dword ptr [ebp - 0x28] */
   6514     PUSH32(esp, edi); /* 0x300029DB: push edi */
   6515     PUSH32(esp, ecx); /* 0x300029DC: push ecx */
   6516     PUSH32(esp, edx); /* 0x300029DD: push edx */
   6517     RECOMP_ICALL(0x30001D40u); /* 0x300029DE: call 0x30001d40 */ /* not lifted */
   6518     RECOMP_FLAGS_IN();
   6519     ecx = MEM32(esi + 0x8); /* 0x300029E3: mov ecx, dword ptr [esi + 8] */
   6520     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   6521     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6522     esp = esp + 0xCu; /* 0x300029E6: add esp, 0xc */
   6523     _flag_k = FK_ADD;
   6524     PUSH32(esp, ecx); /* 0x300029E9: push ecx */
   6525     PUSH32(esp, eax); /* 0x300029EA: push eax */
   6526     ecx = esi; /* 0x300029EB: mov ecx, esi */
   6527     RECOMP_ICALL(0x300017A0u); /* 0x300029ED: call 0x300017a0 */ /* not lifted */
   6528     RECOMP_FLAGS_IN();
   6529     ecx = ebp + (-0x2C); /* 0x300029F2: lea ecx, [ebp - 0x2c] */
   6530     RECOMP_ICALL(0x30001CB0u); /* 0x300029F5: call 0x30001cb0 */ /* not lifted */
   6531     RECOMP_FLAGS_IN();
   6532     edx = eax + eax * 4; /* 0x300029FA: lea edx, [eax + eax*4] */
   6533     eax = MEM32(esi + 0x4); /* 0x300029FD: mov eax, dword ptr [esi + 4] */
   6534     ecx = eax + edx * 4; /* 0x30002A00: lea ecx, [eax + edx*4] */
   6535     MEM32(esi + 0x8) = ecx; /* 0x30002A03: mov dword ptr [esi + 8], ecx */
   6536     goto L_30002AB8; /* 0x30002A06: jmp 0x30002ab8 */
   6537 L_30002A0B:
   6538     ecx = esi; /* 0x30002A0B: mov ecx, esi */
   6539     RECOMP_ICALL(0x30001C80u); /* 0x30002A0D: call 0x30001c80 */ /* not lifted */
   6540     RECOMP_FLAGS_IN();
   6541     ecx = ebp + (-0x2C); /* 0x30002A12: lea ecx, [ebp - 0x2c] */
   6542     edi = eax; /* 0x30002A15: mov edi, eax */
   6543     RECOMP_ICALL(0x30001CB0u); /* 0x30002A17: call 0x30001cb0 */ /* not lifted */
   6544     RECOMP_FLAGS_IN();
   6545     /* cmp eax, edi */ /* 0x30002A1C: cmp eax, edi */
   6546     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   6547     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6548     _flag_k = FK_CMP;
   6549     if (CMP_A(_flag_a, _flag_b)) goto L_30002A67; /* 0x30002A1E: ja 0x30002a67 */
   6550 L_30002A20:
   6551     edi = MEM32(ebp + (-0x28)); /* 0x30002A20: mov edi, dword ptr [ebp - 0x28] */
   6552     ecx = esi; /* 0x30002A23: mov ecx, esi */
   6553     RECOMP_ICALL(0x30001CB0u); /* 0x30002A25: call 0x30001cb0 */ /* not lifted */
   6554     RECOMP_FLAGS_IN();
   6555     ecx = MEM32(ebp + (-0x28)); /* 0x30002A2A: mov ecx, dword ptr [ebp - 0x28] */
   6556     edx = eax + eax * 4; /* 0x30002A2D: lea edx, [eax + eax*4] */
   6557     eax = MEM32(esi + 0x4); /* 0x30002A30: mov eax, dword ptr [esi + 4] */
   6558     PUSH32(esp, eax); /* 0x30002A33: push eax */
   6559     edi = edi + edx * 4; /* 0x30002A34: lea edi, [edi + edx*4] */
   6560     PUSH32(esp, edi); /* 0x30002A37: push edi */
   6561     PUSH32(esp, ecx); /* 0x30002A38: push ecx */
   6562     RECOMP_ICALL(0x30001D40u); /* 0x30002A39: call 0x30001d40 */ /* not lifted */
   6563     RECOMP_FLAGS_IN();
   6564     edx = MEM32(esi + 0x8); /* 0x30002A3E: mov edx, dword ptr [esi + 8] */
   6565     eax = MEM32(ebp + (-0x24)); /* 0x30002A41: mov eax, dword ptr [ebp - 0x24] */
   6566     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   6567     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6568     esp = esp + 0xCu; /* 0x30002A44: add esp, 0xc */
   6569     _flag_k = FK_ADD;
   6570     PUSH32(esp, edx); /* 0x30002A47: push edx */
   6571     PUSH32(esp, eax); /* 0x30002A48: push eax */
   6572     PUSH32(esp, edi); /* 0x30002A49: push edi */
   6573     ecx = esi; /* 0x30002A4A: mov ecx, esi */
   6574     RECOMP_ICALL(0x300017D0u); /* 0x30002A4C: call 0x300017d0 */ /* not lifted */
   6575     RECOMP_FLAGS_IN();
   6576     ecx = ebp + (-0x2C); /* 0x30002A51: lea ecx, [ebp - 0x2c] */
   6577     RECOMP_ICALL(0x30001CB0u); /* 0x30002A54: call 0x30001cb0 */ /* not lifted */
   6578     RECOMP_FLAGS_IN();
   6579     edx = MEM32(esi + 0x4); /* 0x30002A59: mov edx, dword ptr [esi + 4] */
   6580     ecx = eax + eax * 4; /* 0x30002A5C: lea ecx, [eax + eax*4] */
   6581     eax = edx + ecx * 4; /* 0x30002A5F: lea eax, [edx + ecx*4] */
   6582     MEM32(esi + 0x8) = eax; /* 0x30002A62: mov dword ptr [esi + 8], eax */
   6583     goto L_30002AB8; /* 0x30002A65: jmp 0x30002ab8 */
   6584 L_30002A67:
   6585     ecx = MEM32(esi + 0x8); /* 0x30002A67: mov ecx, dword ptr [esi + 8] */
   6586     edx = MEM32(esi + 0x4); /* 0x30002A6A: mov edx, dword ptr [esi + 4] */
   6587     PUSH32(esp, ecx); /* 0x30002A6D: push ecx */
   6588     PUSH32(esp, edx); /* 0x30002A6E: push edx */
   6589     ecx = esi; /* 0x30002A6F: mov ecx, esi */
   6590     RECOMP_ICALL(0x300017A0u); /* 0x30002A71: call 0x300017a0 */ /* not lifted */
   6591     RECOMP_FLAGS_IN();
   6592     eax = MEM32(esi + 0x4); /* 0x30002A76: mov eax, dword ptr [esi + 4] */
   6593     PUSH32(esp, eax); /* 0x30002A79: push eax */
   6594     RECOMP_ICALL(0x30018080u); /* 0x30002A7A: call 0x30018080 */ /* not lifted */
   6595     RECOMP_FLAGS_IN();
   6596     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6597     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6598     esp = esp + 4; /* 0x30002A7F: add esp, 4 */
   6599     _flag_k = FK_ADD;
   6600     ecx = ebp + (-0x2C); /* 0x30002A82: lea ecx, [ebp - 0x2c] */
   6601     RECOMP_ICALL(0x30001CB0u); /* 0x30002A85: call 0x30001cb0 */ /* not lifted */
   6602     RECOMP_FLAGS_IN();
   6603     /* test eax, eax */ /* 0x30002A8A: test eax, eax */
   6604     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   6605     _cf = 0;
   6606     _flag_k = FK_TEST;
   6607     if (TEST_NS(_flag_a, _flag_b)) goto L_30002A90; /* 0x30002A8C: jge 0x30002a90 */
   6608 L_30002A8E:
   6609     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6610     eax = 0; /* 0x30002A8E: xor eax, eax */
   6611     _cf = 0;
   6612     _flag_k = FK_TEST;
   6613 L_30002A90:
   6614     eax = eax + eax * 4; /* 0x30002A90: lea eax, [eax + eax*4] */
   6615     if (2u) _cf = (((eax) >> 30) & 1u); /* 0x30002A93: shl eax, 2 */
   6616     if (2u) { _flag_a = recomp_flags_pack((eax << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6617     eax = eax << 2u; /* 0x30002A93: shl eax, 2 */
   6618     PUSH32(esp, eax); /* 0x30002A96: push eax */
   6619     RECOMP_ICALL(0x300180A8u); /* 0x30002A97: call 0x300180a8 */ /* not lifted */
   6620     RECOMP_FLAGS_IN();
   6621     ecx = MEM32(ebp + (-0x24)); /* 0x30002A9C: mov ecx, dword ptr [ebp - 0x24] */
   6622     edx = MEM32(ebp + (-0x28)); /* 0x30002A9F: mov edx, dword ptr [ebp - 0x28] */
   6623     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6624     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6625     esp = esp + 4; /* 0x30002AA2: add esp, 4 */
   6626     _flag_k = FK_ADD;
   6627     PUSH32(esp, eax); /* 0x30002AA5: push eax */
   6628     PUSH32(esp, ecx); /* 0x30002AA6: push ecx */
   6629     PUSH32(esp, edx); /* 0x30002AA7: push edx */
   6630     ecx = esi; /* 0x30002AA8: mov ecx, esi */
   6631     MEM32(esi + 0x4) = eax; /* 0x30002AAA: mov dword ptr [esi + 4], eax */
   6632     RECOMP_ICALL(0x300017D0u); /* 0x30002AAD: call 0x300017d0 */ /* not lifted */
   6633     RECOMP_FLAGS_IN();
   6634     MEM32(esi + 0x8) = eax; /* 0x30002AB2: mov dword ptr [esi + 8], eax */
   6635     MEM32(esi + 0xC) = eax; /* 0x30002AB5: mov dword ptr [esi + 0xc], eax */
   6636 L_30002AB8:
   6637     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6638     ebx = 0; /* 0x30002AB8: xor ebx, ebx */
   6639     _cf = 0;
   6640     _flag_k = FK_TEST;
   6641 L_30002ABA:
   6642     esi = MEM32(ebp + (-0x18)); /* 0x30002ABA: mov esi, dword ptr [ebp - 0x18] */
   6643     ecx = esi + 0x24; /* 0x30002ABD: lea ecx, [esi + 0x24] */
   6644     RECOMP_ICALL(0x300016B0u); /* 0x30002AC0: call 0x300016b0 */ /* not lifted */
   6645     RECOMP_FLAGS_IN();
   6646     ecx = esi + 0x2C; /* 0x30002AC5: lea ecx, [esi + 0x2c] */
   6647     RECOMP_ICALL(0x300016B0u); /* 0x30002AC8: call 0x300016b0 */ /* not lifted */
   6648     RECOMP_FLAGS_IN();
   6649     edi = MEM32(ebp + (-0x24)); /* 0x30002ACD: mov edi, dword ptr [ebp - 0x24] */
   6650     esi = MEM32(ebp + (-0x28)); /* 0x30002AD0: mov esi, dword ptr [ebp - 0x28] */
   6651     /* cmp esi, edi */ /* 0x30002AD3: cmp esi, edi */
   6652     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   6653     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6654     _flag_k = FK_CMP;
   6655     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x30002AD5: mov byte ptr [ebp - 4], 0 */
   6656     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002AED; /* 0x30002AD9: je 0x30002aed */
   6657 L_30002ADB:
   6658     PUSH32(esp, ebx); /* 0x30002ADB: push ebx */
   6659     ecx = esi; /* 0x30002ADC: mov ecx, esi */
   6660     RECOMP_ICALL(0x30001E40u); /* 0x30002ADE: call 0x30001e40 */ /* not lifted */
   6661     RECOMP_FLAGS_IN();
   6662     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   6663     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6664     esi = esi + 0x14u; /* 0x30002AE3: add esi, 0x14 */
   6665     _flag_k = FK_ADD;
   6666     /* cmp esi, edi */ /* 0x30002AE6: cmp esi, edi */
   6667     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   6668     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6669     _flag_k = FK_CMP;
   6670     RECOMP_BACKEDGE();
   6671     if (CMP_NE(_flag_a, _flag_b)) goto L_30002ADB; /* 0x30002AE8: jne 0x30002adb */
   6672 L_30002AEA:
   6673     esi = MEM32(ebp + (-0x28)); /* 0x30002AEA: mov esi, dword ptr [ebp - 0x28] */
   6674 L_30002AED:
   6675     PUSH32(esp, esi); /* 0x30002AED: push esi */
   6676     RECOMP_ICALL(0x30018080u); /* 0x30002AEE: call 0x30018080 */ /* not lifted */
   6677     RECOMP_FLAGS_IN();
   6678     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6679     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6680     esp = esp + 4; /* 0x30002AF3: add esp, 4 */
   6681     _flag_k = FK_ADD;
   6682     ecx = ebp + (-0x3C); /* 0x30002AF6: lea ecx, [ebp - 0x3c] */
   6683     MEM32(ebp + (-0x28)) = ebx; /* 0x30002AF9: mov dword ptr [ebp - 0x28], ebx */
   6684     MEM32(ebp + (-0x24)) = ebx; /* 0x30002AFC: mov dword ptr [ebp - 0x24], ebx */
   6685     MEM32(ebp + (-0x20)) = ebx; /* 0x30002AFF: mov dword ptr [ebp - 0x20], ebx */
   6686     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x30002B02: mov dword ptr [ebp - 4], 0xffffffff */
   6687     RECOMP_ICALL(0x30002B80u); /* 0x30002B09: call 0x30002b80 */ /* not lifted */
   6688     RECOMP_FLAGS_IN();
   6689     ecx = MEM32(ebp + (-0xC)); /* 0x30002B0E: mov ecx, dword ptr [ebp - 0xc] */
   6690     edi = POP32_VAL(esp); /* 0x30002B11: pop edi */
   6691     esi = POP32_VAL(esp); /* 0x30002B12: pop esi */
   6692     ebx = POP32_VAL(esp); /* 0x30002B13: pop ebx */
   6693     MEM32(FS_BASE + (0)) = ecx; /* 0x30002B14: mov dword ptr fs:[0], ecx */
   6694     esp = ebp; /* 0x30002B1B: mov esp, ebp */
   6695     ebp = POP32_VAL(esp); /* 0x30002B1D: pop ebp */
   6696     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30002B1E: ret  */
   6697     RECOMP_REGS_OUT();
   6698 }
   6699 
   6700 void sub_3000296E(void) {
   6701     int _fpu_cmp = 0;
   6702     uint32_t _cf = 0;
   6703     int _df = 1;
   6704     uint32_t _flag_k = FK_NONE;
   6705     uint32_t _flag_a = 0, _flag_b = 0;
   6706     uint32_t _itail_tgt = 0;
   6707     RECOMP_REGS_LOCALS
   6708     RECOMP_ENTER(0x3000296Eu);
   6709 
   6710     goto L_3000296E;
   6711 L_3000287B:
   6712     eax = MEM32(esi + 0x4); /* 0x3000287B: mov eax, dword ptr [esi + 4] */
   6713     /* cmp eax, ebx */ /* 0x3000287E: cmp eax, ebx */
   6714     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   6715     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6716     _flag_k = FK_CMP;
   6717     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002986; /* 0x30002880: je 0x30002986 */
   6718 L_30002886:
   6719     ecx = MEM32(esi + 0x8); /* 0x30002886: mov ecx, dword ptr [esi + 8] */
   6720     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   6721     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6722     ecx = ecx - eax; /* 0x30002889: sub ecx, eax */
   6723     _flag_k = FK_CMP;
   6724     eax = 0x66666667u; /* 0x3000288B: mov eax, 0x66666667 */
   6725     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002890: imul ecx */
   6726       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   6727       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   6728     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002892: sar edx, 3 */
   6729     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6730     edx = (uint32_t)((int32_t)edx >> 3u);
   6731     eax = edx; /* 0x30002895: mov eax, edx */
   6732     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002897: shr eax, 0x1f */
   6733     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6734     eax = eax >> 31u; /* 0x30002897: shr eax, 0x1f */
   6735     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   6736     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6737     edx = edx + eax; /* 0x3000289A: add edx, eax */
   6738     _flag_k = FK_ADD;
   6739     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_E)) goto L_30002986; /* 0x3000289C: je 0x30002986 */
   6740 L_300028A2:
   6741     ecx = MEM32(ebp + (-0x18)); /* 0x300028A2: mov ecx, dword ptr [ebp - 0x18] */
   6742     eax = MEM32(ecx + 0x1C); /* 0x300028A5: mov eax, dword ptr [ecx + 0x1c] */
   6743     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   6744     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6745     eax = eax + 0xFFFFFFECu; /* 0x300028A8: add eax, -0x14 */
   6746     _flag_k = FK_ADD;
   6747     PUSH32(esp, eax); /* 0x300028AB: push eax */
   6748     ecx = ebp + (-0x50); /* 0x300028AC: lea ecx, [ebp - 0x50] */
   6749     RECOMP_ICALL(0x30007A50u); /* 0x300028AF: call 0x30007a50 */ /* not lifted */
   6750     RECOMP_FLAGS_IN();
   6751     ebx = MEM32(esi + 0x8); /* 0x300028B4: mov ebx, dword ptr [esi + 8] */
   6752     edi = ebx; /* 0x300028B7: lea edi, [ebx] */
   6753     /* cmp edi, ebx */ /* 0x300028B9: cmp edi, ebx */
   6754     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   6755     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6756     _flag_k = FK_CMP;
   6757     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x300028BB: mov byte ptr [ebp - 4], 2 */
   6758     if (CMP_EQ(_flag_a, _flag_b)) goto L_300028E0; /* 0x300028BF: je 0x300028e0 */
   6759 L_300028C1:
   6760     edx = edi + (-0x14); /* 0x300028C1: lea edx, [edi - 0x14] */
   6761     MEM32(ebp + (-0x14)) = edx; /* 0x300028C4: mov dword ptr [ebp - 0x14], edx */
   6762 L_300028C7:
   6763     ecx = MEM32(ebp + (-0x14)); /* 0x300028C7: mov ecx, dword ptr [ebp - 0x14] */
   6764     PUSH32(esp, edi); /* 0x300028CA: push edi */
   6765     RECOMP_ICALL(0x300080D0u); /* 0x300028CB: call 0x300080d0 */ /* not lifted */
   6766     RECOMP_FLAGS_IN();
   6767     ecx = MEM32(ebp + (-0x14)); /* 0x300028D0: mov ecx, dword ptr [ebp - 0x14] */
   6768     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   6769     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6770     edi = edi + 0x14u; /* 0x300028D3: add edi, 0x14 */
   6771     _flag_k = FK_ADD;
   6772     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x14u);
   6773     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6774     ecx = ecx + 0x14u; /* 0x300028D6: add ecx, 0x14 */
   6775     _flag_k = FK_ADD;
   6776     /* cmp edi, ebx */ /* 0x300028D9: cmp edi, ebx */
   6777     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   6778     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6779     _flag_k = FK_CMP;
   6780     MEM32(ebp + (-0x14)) = ecx; /* 0x300028DB: mov dword ptr [ebp - 0x14], ecx */
   6781     RECOMP_BACKEDGE();
   6782     if (CMP_NE(_flag_a, _flag_b)) goto L_300028C7; /* 0x300028DE: jne 0x300028c7 */
   6783 L_300028E0:
   6784     ebx = MEM32(esi + 0x8); /* 0x300028E0: mov ebx, dword ptr [esi + 8] */
   6785     edi = ebx + (-0x14); /* 0x300028E3: lea edi, [ebx - 0x14] */
   6786     /* cmp edi, ebx */ /* 0x300028E6: cmp edi, ebx */
   6787     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   6788     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6789     _flag_k = FK_CMP;
   6790     if (CMP_EQ(_flag_a, _flag_b)) goto L_300028FA; /* 0x300028E8: je 0x300028fa */
   6791 L_300028EA:
   6792     PUSH32(esp, 0); /* 0x300028EA: push 0 */
   6793     ecx = edi; /* 0x300028EC: mov ecx, edi */
   6794     RECOMP_ICALL(0x30001E40u); /* 0x300028EE: call 0x30001e40 */ /* not lifted */
   6795     RECOMP_FLAGS_IN();
   6796     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   6797     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6798     edi = edi + 0x14u; /* 0x300028F3: add edi, 0x14 */
   6799     _flag_k = FK_ADD;
   6800     /* cmp edi, ebx */ /* 0x300028F6: cmp edi, ebx */
   6801     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ebx);
   6802     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6803     _flag_k = FK_CMP;
   6804     RECOMP_BACKEDGE();
   6805     if (CMP_NE(_flag_a, _flag_b)) goto L_300028EA; /* 0x300028F8: jne 0x300028ea */
   6806 L_300028FA:
   6807     eax = MEM32(esi + 0x8); /* 0x300028FA: mov eax, dword ptr [esi + 8] */
   6808     edi = MEM32(ebp + (-0x18)); /* 0x300028FD: mov edi, dword ptr [ebp - 0x18] */
   6809     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   6810     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6811     eax = eax + 0xFFFFFFECu; /* 0x30002900: add eax, -0x14 */
   6812     _flag_k = FK_ADD;
   6813     MEM32(esi + 0x8) = eax; /* 0x30002903: mov dword ptr [esi + 8], eax */
   6814     eax = MEM32(edi + 0x10); /* 0x30002906: mov eax, dword ptr [edi + 0x10] */
   6815     ecx = ebp + (-0x50); /* 0x30002909: lea ecx, [ebp - 0x50] */
   6816     MEM32(ebp + (-0x1C)) = eax; /* 0x3000290C: mov dword ptr [ebp - 0x1c], eax */
   6817     RECOMP_ICALL(0x300081D0u); /* 0x3000290F: call 0x300081d0 */ /* not lifted */
   6818     RECOMP_FLAGS_IN();
   6819     _st[0] += (double)*(float*)ADDR(ebp + (-0x1C)); /* 0x30002914: fadd dword ptr [ebp - 0x1c] */
   6820     _st[0] = fabs(_st[0]); /* 0x30002917: fabs  */
   6821     _fpu_cmp = FPU_CMP(_st[0], *(double*)ADDR(0x30019118)); /* 0x30002919: fcomp qword ptr [0x30019118] */
   6822     fp_pop();
   6823     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3000291F: fnstsw ax */
   6824     /* test HI8(eax), 0x41u */ /* 0x30002921: test ah, 0x41 */
   6825     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24;
   6826     _cf = 0;
   6827     _flag_k = FK_NARROW(FK_TEST, 24);
   6828     if (TEST_NZ(_flag_a, _flag_b)) goto L_3000294B; /* 0x30002924: jne 0x3000294b */
   6829 L_30002926:
   6830     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002926: push -1 */
   6831     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002928: push -1 */
   6832     ecx = ebp + (-0x3C); /* 0x3000292A: lea ecx, [ebp - 0x3c] */
   6833     PUSH32(esp, ecx); /* 0x3000292D: push ecx */
   6834     edx = ebp + (-0x50); /* 0x3000292E: lea edx, [ebp - 0x50] */
   6835     PUSH32(esp, edx); /* 0x30002931: push edx */
   6836     ecx = edi + 0x24; /* 0x30002932: lea ecx, [edi + 0x24] */
   6837     RECOMP_ICALL(0x30001170u); /* 0x30002935: call 0x30001170 */ /* not lifted */
   6838     RECOMP_FLAGS_IN();
   6839     PUSH32(esp, 1); /* 0x3000293A: push 1 */
   6840     PUSH32(esp, 1); /* 0x3000293C: push 1 */
   6841     eax = ebp + (-0x2C); /* 0x3000293E: lea eax, [ebp - 0x2c] */
   6842     ecx = ebp + (-0x3C); /* 0x30002941: lea ecx, [ebp - 0x3c] */
   6843     PUSH32(esp, eax); /* 0x30002944: push eax */
   6844     PUSH32(esp, ecx); /* 0x30002945: push ecx */
   6845     ecx = edi + 0x2C; /* 0x30002946: lea ecx, [edi + 0x2c] */
   6846     goto L_3000296E; /* 0x30002949: jmp 0x3000296e */
   6847 L_3000294B:
   6848     PUSH32(esp, 1); /* 0x3000294B: push 1 */
   6849     PUSH32(esp, 1); /* 0x3000294D: push 1 */
   6850     edx = ebp + (-0x3C); /* 0x3000294F: lea edx, [ebp - 0x3c] */
   6851     PUSH32(esp, edx); /* 0x30002952: push edx */
   6852     eax = ebp + (-0x50); /* 0x30002953: lea eax, [ebp - 0x50] */
   6853     PUSH32(esp, eax); /* 0x30002956: push eax */
   6854     ecx = edi + 0x2C; /* 0x30002957: lea ecx, [edi + 0x2c] */
   6855     RECOMP_ICALL(0x30001170u); /* 0x3000295A: call 0x30001170 */ /* not lifted */
   6856     RECOMP_FLAGS_IN();
   6857     PUSH32(esp, 0xFFFFFFFFu); /* 0x3000295F: push -1 */
   6858     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002961: push -1 */
   6859     ecx = ebp + (-0x2C); /* 0x30002963: lea ecx, [ebp - 0x2c] */
   6860     PUSH32(esp, ecx); /* 0x30002966: push ecx */
   6861     edx = ebp + (-0x3C); /* 0x30002967: lea edx, [ebp - 0x3c] */
   6862     PUSH32(esp, edx); /* 0x3000296A: push edx */
   6863     ecx = edi + 0x24; /* 0x3000296B: lea ecx, [edi + 0x24] */
   6864 L_3000296E:
   6865     RECOMP_ICALL(0x300013A0u); /* 0x3000296E: call 0x300013a0 */ /* not lifted */
   6866     RECOMP_FLAGS_IN();
   6867     ecx = ebp + (-0x50); /* 0x30002973: lea ecx, [ebp - 0x50] */
   6868     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x30002976: mov byte ptr [ebp - 4], 1 */
   6869     RECOMP_ICALL(0x30007AB0u); /* 0x3000297A: call 0x30007ab0 */ /* not lifted */
   6870     RECOMP_FLAGS_IN();
   6871     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6872     ebx = 0; /* 0x3000297F: xor ebx, ebx */
   6873     _cf = 0;
   6874     _flag_k = FK_TEST;
   6875     RECOMP_BACKEDGE();
   6876     goto L_3000287B; /* 0x30002981: jmp 0x3000287b */
   6877 L_30002986:
   6878     eax = ebp + (-0x2C); /* 0x30002986: lea eax, [ebp - 0x2c] */
   6879     /* cmp esi, eax */ /* 0x30002989: cmp esi, eax */
   6880     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   6881     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6882     _flag_k = FK_CMP;
   6883     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002ABA; /* 0x3000298B: je 0x30002aba */
   6884 L_30002991:
   6885     eax = MEM32(ebp + (-0x28)); /* 0x30002991: mov eax, dword ptr [ebp - 0x28] */
   6886     /* cmp eax, ebx */ /* 0x30002994: cmp eax, ebx */
   6887     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   6888     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6889     _flag_k = FK_CMP;
   6890     if (CMP_EQ(_flag_a, _flag_b)) goto L_300029B0; /* 0x30002996: je 0x300029b0 */
   6891 L_30002998:
   6892     ecx = MEM32(ebp + (-0x24)); /* 0x30002998: mov ecx, dword ptr [ebp - 0x24] */
   6893     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   6894     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6895     ecx = ecx - eax; /* 0x3000299B: sub ecx, eax */
   6896     _flag_k = FK_CMP;
   6897     eax = 0x66666667u; /* 0x3000299D: mov eax, 0x66666667 */
   6898     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x300029A2: imul ecx */
   6899       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   6900       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   6901     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300029A4: sar edx, 3 */
   6902     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6903     edx = (uint32_t)((int32_t)edx >> 3u);
   6904     ecx = edx; /* 0x300029A7: mov ecx, edx */
   6905     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x300029A9: shr ecx, 0x1f */
   6906     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6907     ecx = ecx >> 31u; /* 0x300029A9: shr ecx, 0x1f */
   6908     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   6909     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6910     edx = edx + ecx; /* 0x300029AC: add edx, ecx */
   6911     _flag_k = FK_ADD;
   6912     ebx = edx; /* 0x300029AE: mov ebx, edx */
   6913 L_300029B0:
   6914     edi = MEM32(esi + 0x4); /* 0x300029B0: mov edi, dword ptr [esi + 4] */
   6915     /* test edi, edi */ /* 0x300029B3: test edi, edi */
   6916     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   6917     _cf = 0;
   6918     _flag_k = FK_TEST;
   6919     if (TEST_NZ(_flag_a, _flag_b)) goto L_300029BB; /* 0x300029B5: jne 0x300029bb */
   6920 L_300029B7:
   6921     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6922     edx = 0; /* 0x300029B7: xor edx, edx */
   6923     _cf = 0;
   6924     _flag_k = FK_TEST;
   6925     goto L_300029D1; /* 0x300029B9: jmp 0x300029d1 */
   6926 L_300029BB:
   6927     ecx = MEM32(esi + 0x8); /* 0x300029BB: mov ecx, dword ptr [esi + 8] */
   6928     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   6929     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6930     ecx = ecx - edi; /* 0x300029BE: sub ecx, edi */
   6931     _flag_k = FK_CMP;
   6932     eax = 0x66666667u; /* 0x300029C0: mov eax, 0x66666667 */
   6933     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x300029C5: imul ecx */
   6934       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   6935       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   6936     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x300029C7: sar edx, 3 */
   6937     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6938     edx = (uint32_t)((int32_t)edx >> 3u);
   6939     eax = edx; /* 0x300029CA: mov eax, edx */
   6940     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x300029CC: shr eax, 0x1f */
   6941     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   6942     eax = eax >> 31u; /* 0x300029CC: shr eax, 0x1f */
   6943     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   6944     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6945     edx = edx + eax; /* 0x300029CF: add edx, eax */
   6946     _flag_k = FK_ADD;
   6947 L_300029D1:
   6948     /* cmp ebx, edx */ /* 0x300029D1: cmp ebx, edx */
   6949     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edx);
   6950     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6951     _flag_k = FK_CMP;
   6952     if (CMP_A(_flag_a, _flag_b)) goto L_30002A0B; /* 0x300029D3: ja 0x30002a0b */
   6953 L_300029D5:
   6954     ecx = MEM32(ebp + (-0x24)); /* 0x300029D5: mov ecx, dword ptr [ebp - 0x24] */
   6955     edx = MEM32(ebp + (-0x28)); /* 0x300029D8: mov edx, dword ptr [ebp - 0x28] */
   6956     PUSH32(esp, edi); /* 0x300029DB: push edi */
   6957     PUSH32(esp, ecx); /* 0x300029DC: push ecx */
   6958     PUSH32(esp, edx); /* 0x300029DD: push edx */
   6959     RECOMP_ICALL(0x30001D40u); /* 0x300029DE: call 0x30001d40 */ /* not lifted */
   6960     RECOMP_FLAGS_IN();
   6961     ecx = MEM32(esi + 0x8); /* 0x300029E3: mov ecx, dword ptr [esi + 8] */
   6962     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   6963     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6964     esp = esp + 0xCu; /* 0x300029E6: add esp, 0xc */
   6965     _flag_k = FK_ADD;
   6966     PUSH32(esp, ecx); /* 0x300029E9: push ecx */
   6967     PUSH32(esp, eax); /* 0x300029EA: push eax */
   6968     ecx = esi; /* 0x300029EB: mov ecx, esi */
   6969     RECOMP_ICALL(0x300017A0u); /* 0x300029ED: call 0x300017a0 */ /* not lifted */
   6970     RECOMP_FLAGS_IN();
   6971     ecx = ebp + (-0x2C); /* 0x300029F2: lea ecx, [ebp - 0x2c] */
   6972     RECOMP_ICALL(0x30001CB0u); /* 0x300029F5: call 0x30001cb0 */ /* not lifted */
   6973     RECOMP_FLAGS_IN();
   6974     edx = eax + eax * 4; /* 0x300029FA: lea edx, [eax + eax*4] */
   6975     eax = MEM32(esi + 0x4); /* 0x300029FD: mov eax, dword ptr [esi + 4] */
   6976     ecx = eax + edx * 4; /* 0x30002A00: lea ecx, [eax + edx*4] */
   6977     MEM32(esi + 0x8) = ecx; /* 0x30002A03: mov dword ptr [esi + 8], ecx */
   6978     goto L_30002AB8; /* 0x30002A06: jmp 0x30002ab8 */
   6979 L_30002A0B:
   6980     ecx = esi; /* 0x30002A0B: mov ecx, esi */
   6981     RECOMP_ICALL(0x30001C80u); /* 0x30002A0D: call 0x30001c80 */ /* not lifted */
   6982     RECOMP_FLAGS_IN();
   6983     ecx = ebp + (-0x2C); /* 0x30002A12: lea ecx, [ebp - 0x2c] */
   6984     edi = eax; /* 0x30002A15: mov edi, eax */
   6985     RECOMP_ICALL(0x30001CB0u); /* 0x30002A17: call 0x30001cb0 */ /* not lifted */
   6986     RECOMP_FLAGS_IN();
   6987     /* cmp eax, edi */ /* 0x30002A1C: cmp eax, edi */
   6988     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   6989     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6990     _flag_k = FK_CMP;
   6991     if (CMP_A(_flag_a, _flag_b)) goto L_30002A67; /* 0x30002A1E: ja 0x30002a67 */
   6992 L_30002A20:
   6993     edi = MEM32(ebp + (-0x28)); /* 0x30002A20: mov edi, dword ptr [ebp - 0x28] */
   6994     ecx = esi; /* 0x30002A23: mov ecx, esi */
   6995     RECOMP_ICALL(0x30001CB0u); /* 0x30002A25: call 0x30001cb0 */ /* not lifted */
   6996     RECOMP_FLAGS_IN();
   6997     ecx = MEM32(ebp + (-0x28)); /* 0x30002A2A: mov ecx, dword ptr [ebp - 0x28] */
   6998     edx = eax + eax * 4; /* 0x30002A2D: lea edx, [eax + eax*4] */
   6999     eax = MEM32(esi + 0x4); /* 0x30002A30: mov eax, dword ptr [esi + 4] */
   7000     PUSH32(esp, eax); /* 0x30002A33: push eax */
   7001     edi = edi + edx * 4; /* 0x30002A34: lea edi, [edi + edx*4] */
   7002     PUSH32(esp, edi); /* 0x30002A37: push edi */
   7003     PUSH32(esp, ecx); /* 0x30002A38: push ecx */
   7004     RECOMP_ICALL(0x30001D40u); /* 0x30002A39: call 0x30001d40 */ /* not lifted */
   7005     RECOMP_FLAGS_IN();
   7006     edx = MEM32(esi + 0x8); /* 0x30002A3E: mov edx, dword ptr [esi + 8] */
   7007     eax = MEM32(ebp + (-0x24)); /* 0x30002A41: mov eax, dword ptr [ebp - 0x24] */
   7008     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   7009     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7010     esp = esp + 0xCu; /* 0x30002A44: add esp, 0xc */
   7011     _flag_k = FK_ADD;
   7012     PUSH32(esp, edx); /* 0x30002A47: push edx */
   7013     PUSH32(esp, eax); /* 0x30002A48: push eax */
   7014     PUSH32(esp, edi); /* 0x30002A49: push edi */
   7015     ecx = esi; /* 0x30002A4A: mov ecx, esi */
   7016     RECOMP_ICALL(0x300017D0u); /* 0x30002A4C: call 0x300017d0 */ /* not lifted */
   7017     RECOMP_FLAGS_IN();
   7018     ecx = ebp + (-0x2C); /* 0x30002A51: lea ecx, [ebp - 0x2c] */
   7019     RECOMP_ICALL(0x30001CB0u); /* 0x30002A54: call 0x30001cb0 */ /* not lifted */
   7020     RECOMP_FLAGS_IN();
   7021     edx = MEM32(esi + 0x4); /* 0x30002A59: mov edx, dword ptr [esi + 4] */
   7022     ecx = eax + eax * 4; /* 0x30002A5C: lea ecx, [eax + eax*4] */
   7023     eax = edx + ecx * 4; /* 0x30002A5F: lea eax, [edx + ecx*4] */
   7024     MEM32(esi + 0x8) = eax; /* 0x30002A62: mov dword ptr [esi + 8], eax */
   7025     goto L_30002AB8; /* 0x30002A65: jmp 0x30002ab8 */
   7026 L_30002A67:
   7027     ecx = MEM32(esi + 0x8); /* 0x30002A67: mov ecx, dword ptr [esi + 8] */
   7028     edx = MEM32(esi + 0x4); /* 0x30002A6A: mov edx, dword ptr [esi + 4] */
   7029     PUSH32(esp, ecx); /* 0x30002A6D: push ecx */
   7030     PUSH32(esp, edx); /* 0x30002A6E: push edx */
   7031     ecx = esi; /* 0x30002A6F: mov ecx, esi */
   7032     RECOMP_ICALL(0x300017A0u); /* 0x30002A71: call 0x300017a0 */ /* not lifted */
   7033     RECOMP_FLAGS_IN();
   7034     eax = MEM32(esi + 0x4); /* 0x30002A76: mov eax, dword ptr [esi + 4] */
   7035     PUSH32(esp, eax); /* 0x30002A79: push eax */
   7036     RECOMP_ICALL(0x30018080u); /* 0x30002A7A: call 0x30018080 */ /* not lifted */
   7037     RECOMP_FLAGS_IN();
   7038     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7039     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7040     esp = esp + 4; /* 0x30002A7F: add esp, 4 */
   7041     _flag_k = FK_ADD;
   7042     ecx = ebp + (-0x2C); /* 0x30002A82: lea ecx, [ebp - 0x2c] */
   7043     RECOMP_ICALL(0x30001CB0u); /* 0x30002A85: call 0x30001cb0 */ /* not lifted */
   7044     RECOMP_FLAGS_IN();
   7045     /* test eax, eax */ /* 0x30002A8A: test eax, eax */
   7046     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   7047     _cf = 0;
   7048     _flag_k = FK_TEST;
   7049     if (TEST_NS(_flag_a, _flag_b)) goto L_30002A90; /* 0x30002A8C: jge 0x30002a90 */
   7050 L_30002A8E:
   7051     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7052     eax = 0; /* 0x30002A8E: xor eax, eax */
   7053     _cf = 0;
   7054     _flag_k = FK_TEST;
   7055 L_30002A90:
   7056     eax = eax + eax * 4; /* 0x30002A90: lea eax, [eax + eax*4] */
   7057     if (2u) _cf = (((eax) >> 30) & 1u); /* 0x30002A93: shl eax, 2 */
   7058     if (2u) { _flag_a = recomp_flags_pack((eax << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7059     eax = eax << 2u; /* 0x30002A93: shl eax, 2 */
   7060     PUSH32(esp, eax); /* 0x30002A96: push eax */
   7061     RECOMP_ICALL(0x300180A8u); /* 0x30002A97: call 0x300180a8 */ /* not lifted */
   7062     RECOMP_FLAGS_IN();
   7063     ecx = MEM32(ebp + (-0x24)); /* 0x30002A9C: mov ecx, dword ptr [ebp - 0x24] */
   7064     edx = MEM32(ebp + (-0x28)); /* 0x30002A9F: mov edx, dword ptr [ebp - 0x28] */
   7065     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7066     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7067     esp = esp + 4; /* 0x30002AA2: add esp, 4 */
   7068     _flag_k = FK_ADD;
   7069     PUSH32(esp, eax); /* 0x30002AA5: push eax */
   7070     PUSH32(esp, ecx); /* 0x30002AA6: push ecx */
   7071     PUSH32(esp, edx); /* 0x30002AA7: push edx */
   7072     ecx = esi; /* 0x30002AA8: mov ecx, esi */
   7073     MEM32(esi + 0x4) = eax; /* 0x30002AAA: mov dword ptr [esi + 4], eax */
   7074     RECOMP_ICALL(0x300017D0u); /* 0x30002AAD: call 0x300017d0 */ /* not lifted */
   7075     RECOMP_FLAGS_IN();
   7076     MEM32(esi + 0x8) = eax; /* 0x30002AB2: mov dword ptr [esi + 8], eax */
   7077     MEM32(esi + 0xC) = eax; /* 0x30002AB5: mov dword ptr [esi + 0xc], eax */
   7078 L_30002AB8:
   7079     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7080     ebx = 0; /* 0x30002AB8: xor ebx, ebx */
   7081     _cf = 0;
   7082     _flag_k = FK_TEST;
   7083 L_30002ABA:
   7084     esi = MEM32(ebp + (-0x18)); /* 0x30002ABA: mov esi, dword ptr [ebp - 0x18] */
   7085     ecx = esi + 0x24; /* 0x30002ABD: lea ecx, [esi + 0x24] */
   7086     RECOMP_ICALL(0x300016B0u); /* 0x30002AC0: call 0x300016b0 */ /* not lifted */
   7087     RECOMP_FLAGS_IN();
   7088     ecx = esi + 0x2C; /* 0x30002AC5: lea ecx, [esi + 0x2c] */
   7089     RECOMP_ICALL(0x300016B0u); /* 0x30002AC8: call 0x300016b0 */ /* not lifted */
   7090     RECOMP_FLAGS_IN();
   7091     edi = MEM32(ebp + (-0x24)); /* 0x30002ACD: mov edi, dword ptr [ebp - 0x24] */
   7092     esi = MEM32(ebp + (-0x28)); /* 0x30002AD0: mov esi, dword ptr [ebp - 0x28] */
   7093     /* cmp esi, edi */ /* 0x30002AD3: cmp esi, edi */
   7094     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   7095     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7096     _flag_k = FK_CMP;
   7097     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x30002AD5: mov byte ptr [ebp - 4], 0 */
   7098     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002AED; /* 0x30002AD9: je 0x30002aed */
   7099 L_30002ADB:
   7100     PUSH32(esp, ebx); /* 0x30002ADB: push ebx */
   7101     ecx = esi; /* 0x30002ADC: mov ecx, esi */
   7102     RECOMP_ICALL(0x30001E40u); /* 0x30002ADE: call 0x30001e40 */ /* not lifted */
   7103     RECOMP_FLAGS_IN();
   7104     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   7105     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7106     esi = esi + 0x14u; /* 0x30002AE3: add esi, 0x14 */
   7107     _flag_k = FK_ADD;
   7108     /* cmp esi, edi */ /* 0x30002AE6: cmp esi, edi */
   7109     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   7110     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7111     _flag_k = FK_CMP;
   7112     RECOMP_BACKEDGE();
   7113     if (CMP_NE(_flag_a, _flag_b)) goto L_30002ADB; /* 0x30002AE8: jne 0x30002adb */
   7114 L_30002AEA:
   7115     esi = MEM32(ebp + (-0x28)); /* 0x30002AEA: mov esi, dword ptr [ebp - 0x28] */
   7116 L_30002AED:
   7117     PUSH32(esp, esi); /* 0x30002AED: push esi */
   7118     RECOMP_ICALL(0x30018080u); /* 0x30002AEE: call 0x30018080 */ /* not lifted */
   7119     RECOMP_FLAGS_IN();
   7120     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7121     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7122     esp = esp + 4; /* 0x30002AF3: add esp, 4 */
   7123     _flag_k = FK_ADD;
   7124     ecx = ebp + (-0x3C); /* 0x30002AF6: lea ecx, [ebp - 0x3c] */
   7125     MEM32(ebp + (-0x28)) = ebx; /* 0x30002AF9: mov dword ptr [ebp - 0x28], ebx */
   7126     MEM32(ebp + (-0x24)) = ebx; /* 0x30002AFC: mov dword ptr [ebp - 0x24], ebx */
   7127     MEM32(ebp + (-0x20)) = ebx; /* 0x30002AFF: mov dword ptr [ebp - 0x20], ebx */
   7128     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x30002B02: mov dword ptr [ebp - 4], 0xffffffff */
   7129     RECOMP_ICALL(0x30002B80u); /* 0x30002B09: call 0x30002b80 */ /* not lifted */
   7130     RECOMP_FLAGS_IN();
   7131     ecx = MEM32(ebp + (-0xC)); /* 0x30002B0E: mov ecx, dword ptr [ebp - 0xc] */
   7132     edi = POP32_VAL(esp); /* 0x30002B11: pop edi */
   7133     esi = POP32_VAL(esp); /* 0x30002B12: pop esi */
   7134     ebx = POP32_VAL(esp); /* 0x30002B13: pop ebx */
   7135     MEM32(FS_BASE + (0)) = ecx; /* 0x30002B14: mov dword ptr fs:[0], ecx */
   7136     esp = ebp; /* 0x30002B1B: mov esp, ebp */
   7137     ebp = POP32_VAL(esp); /* 0x30002B1D: pop ebp */
   7138     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30002B1E: ret  */
   7139     RECOMP_REGS_OUT();
   7140 }
   7141 
   7142 void sub_300029D1(void) {
   7143     int _fpu_cmp = 0;
   7144     uint32_t _cf = 0;
   7145     int _df = 1;
   7146     uint32_t _flag_k = FK_NONE;
   7147     uint32_t _flag_a = 0, _flag_b = 0;
   7148     uint32_t _itail_tgt = 0;
   7149     RECOMP_REGS_LOCALS
   7150     RECOMP_ENTER(0x300029D1u);
   7151 
   7152 L_300029D1:
   7153     /* cmp ebx, edx */ /* 0x300029D1: cmp ebx, edx */
   7154     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edx);
   7155     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7156     _flag_k = FK_CMP;
   7157     if (CMP_A(_flag_a, _flag_b)) goto L_30002A0B; /* 0x300029D3: ja 0x30002a0b */
   7158 L_300029D5:
   7159     ecx = MEM32(ebp + (-0x24)); /* 0x300029D5: mov ecx, dword ptr [ebp - 0x24] */
   7160     edx = MEM32(ebp + (-0x28)); /* 0x300029D8: mov edx, dword ptr [ebp - 0x28] */
   7161     PUSH32(esp, edi); /* 0x300029DB: push edi */
   7162     PUSH32(esp, ecx); /* 0x300029DC: push ecx */
   7163     PUSH32(esp, edx); /* 0x300029DD: push edx */
   7164     RECOMP_ICALL(0x30001D40u); /* 0x300029DE: call 0x30001d40 */ /* not lifted */
   7165     RECOMP_FLAGS_IN();
   7166     ecx = MEM32(esi + 0x8); /* 0x300029E3: mov ecx, dword ptr [esi + 8] */
   7167     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   7168     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7169     esp = esp + 0xCu; /* 0x300029E6: add esp, 0xc */
   7170     _flag_k = FK_ADD;
   7171     PUSH32(esp, ecx); /* 0x300029E9: push ecx */
   7172     PUSH32(esp, eax); /* 0x300029EA: push eax */
   7173     ecx = esi; /* 0x300029EB: mov ecx, esi */
   7174     RECOMP_ICALL(0x300017A0u); /* 0x300029ED: call 0x300017a0 */ /* not lifted */
   7175     RECOMP_FLAGS_IN();
   7176     ecx = ebp + (-0x2C); /* 0x300029F2: lea ecx, [ebp - 0x2c] */
   7177     RECOMP_ICALL(0x30001CB0u); /* 0x300029F5: call 0x30001cb0 */ /* not lifted */
   7178     RECOMP_FLAGS_IN();
   7179     edx = eax + eax * 4; /* 0x300029FA: lea edx, [eax + eax*4] */
   7180     eax = MEM32(esi + 0x4); /* 0x300029FD: mov eax, dword ptr [esi + 4] */
   7181     ecx = eax + edx * 4; /* 0x30002A00: lea ecx, [eax + edx*4] */
   7182     MEM32(esi + 0x8) = ecx; /* 0x30002A03: mov dword ptr [esi + 8], ecx */
   7183     goto L_30002AB8; /* 0x30002A06: jmp 0x30002ab8 */
   7184 L_30002A0B:
   7185     ecx = esi; /* 0x30002A0B: mov ecx, esi */
   7186     RECOMP_ICALL(0x30001C80u); /* 0x30002A0D: call 0x30001c80 */ /* not lifted */
   7187     RECOMP_FLAGS_IN();
   7188     ecx = ebp + (-0x2C); /* 0x30002A12: lea ecx, [ebp - 0x2c] */
   7189     edi = eax; /* 0x30002A15: mov edi, eax */
   7190     RECOMP_ICALL(0x30001CB0u); /* 0x30002A17: call 0x30001cb0 */ /* not lifted */
   7191     RECOMP_FLAGS_IN();
   7192     /* cmp eax, edi */ /* 0x30002A1C: cmp eax, edi */
   7193     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   7194     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7195     _flag_k = FK_CMP;
   7196     if (CMP_A(_flag_a, _flag_b)) goto L_30002A67; /* 0x30002A1E: ja 0x30002a67 */
   7197 L_30002A20:
   7198     edi = MEM32(ebp + (-0x28)); /* 0x30002A20: mov edi, dword ptr [ebp - 0x28] */
   7199     ecx = esi; /* 0x30002A23: mov ecx, esi */
   7200     RECOMP_ICALL(0x30001CB0u); /* 0x30002A25: call 0x30001cb0 */ /* not lifted */
   7201     RECOMP_FLAGS_IN();
   7202     ecx = MEM32(ebp + (-0x28)); /* 0x30002A2A: mov ecx, dword ptr [ebp - 0x28] */
   7203     edx = eax + eax * 4; /* 0x30002A2D: lea edx, [eax + eax*4] */
   7204     eax = MEM32(esi + 0x4); /* 0x30002A30: mov eax, dword ptr [esi + 4] */
   7205     PUSH32(esp, eax); /* 0x30002A33: push eax */
   7206     edi = edi + edx * 4; /* 0x30002A34: lea edi, [edi + edx*4] */
   7207     PUSH32(esp, edi); /* 0x30002A37: push edi */
   7208     PUSH32(esp, ecx); /* 0x30002A38: push ecx */
   7209     RECOMP_ICALL(0x30001D40u); /* 0x30002A39: call 0x30001d40 */ /* not lifted */
   7210     RECOMP_FLAGS_IN();
   7211     edx = MEM32(esi + 0x8); /* 0x30002A3E: mov edx, dword ptr [esi + 8] */
   7212     eax = MEM32(ebp + (-0x24)); /* 0x30002A41: mov eax, dword ptr [ebp - 0x24] */
   7213     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   7214     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7215     esp = esp + 0xCu; /* 0x30002A44: add esp, 0xc */
   7216     _flag_k = FK_ADD;
   7217     PUSH32(esp, edx); /* 0x30002A47: push edx */
   7218     PUSH32(esp, eax); /* 0x30002A48: push eax */
   7219     PUSH32(esp, edi); /* 0x30002A49: push edi */
   7220     ecx = esi; /* 0x30002A4A: mov ecx, esi */
   7221     RECOMP_ICALL(0x300017D0u); /* 0x30002A4C: call 0x300017d0 */ /* not lifted */
   7222     RECOMP_FLAGS_IN();
   7223     ecx = ebp + (-0x2C); /* 0x30002A51: lea ecx, [ebp - 0x2c] */
   7224     RECOMP_ICALL(0x30001CB0u); /* 0x30002A54: call 0x30001cb0 */ /* not lifted */
   7225     RECOMP_FLAGS_IN();
   7226     edx = MEM32(esi + 0x4); /* 0x30002A59: mov edx, dword ptr [esi + 4] */
   7227     ecx = eax + eax * 4; /* 0x30002A5C: lea ecx, [eax + eax*4] */
   7228     eax = edx + ecx * 4; /* 0x30002A5F: lea eax, [edx + ecx*4] */
   7229     MEM32(esi + 0x8) = eax; /* 0x30002A62: mov dword ptr [esi + 8], eax */
   7230     goto L_30002AB8; /* 0x30002A65: jmp 0x30002ab8 */
   7231 L_30002A67:
   7232     ecx = MEM32(esi + 0x8); /* 0x30002A67: mov ecx, dword ptr [esi + 8] */
   7233     edx = MEM32(esi + 0x4); /* 0x30002A6A: mov edx, dword ptr [esi + 4] */
   7234     PUSH32(esp, ecx); /* 0x30002A6D: push ecx */
   7235     PUSH32(esp, edx); /* 0x30002A6E: push edx */
   7236     ecx = esi; /* 0x30002A6F: mov ecx, esi */
   7237     RECOMP_ICALL(0x300017A0u); /* 0x30002A71: call 0x300017a0 */ /* not lifted */
   7238     RECOMP_FLAGS_IN();
   7239     eax = MEM32(esi + 0x4); /* 0x30002A76: mov eax, dword ptr [esi + 4] */
   7240     PUSH32(esp, eax); /* 0x30002A79: push eax */
   7241     RECOMP_ICALL(0x30018080u); /* 0x30002A7A: call 0x30018080 */ /* not lifted */
   7242     RECOMP_FLAGS_IN();
   7243     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7244     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7245     esp = esp + 4; /* 0x30002A7F: add esp, 4 */
   7246     _flag_k = FK_ADD;
   7247     ecx = ebp + (-0x2C); /* 0x30002A82: lea ecx, [ebp - 0x2c] */
   7248     RECOMP_ICALL(0x30001CB0u); /* 0x30002A85: call 0x30001cb0 */ /* not lifted */
   7249     RECOMP_FLAGS_IN();
   7250     /* test eax, eax */ /* 0x30002A8A: test eax, eax */
   7251     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   7252     _cf = 0;
   7253     _flag_k = FK_TEST;
   7254     if (TEST_NS(_flag_a, _flag_b)) goto L_30002A90; /* 0x30002A8C: jge 0x30002a90 */
   7255 L_30002A8E:
   7256     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7257     eax = 0; /* 0x30002A8E: xor eax, eax */
   7258     _cf = 0;
   7259     _flag_k = FK_TEST;
   7260 L_30002A90:
   7261     eax = eax + eax * 4; /* 0x30002A90: lea eax, [eax + eax*4] */
   7262     if (2u) _cf = (((eax) >> 30) & 1u); /* 0x30002A93: shl eax, 2 */
   7263     if (2u) { _flag_a = recomp_flags_pack((eax << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7264     eax = eax << 2u; /* 0x30002A93: shl eax, 2 */
   7265     PUSH32(esp, eax); /* 0x30002A96: push eax */
   7266     RECOMP_ICALL(0x300180A8u); /* 0x30002A97: call 0x300180a8 */ /* not lifted */
   7267     RECOMP_FLAGS_IN();
   7268     ecx = MEM32(ebp + (-0x24)); /* 0x30002A9C: mov ecx, dword ptr [ebp - 0x24] */
   7269     edx = MEM32(ebp + (-0x28)); /* 0x30002A9F: mov edx, dword ptr [ebp - 0x28] */
   7270     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7271     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7272     esp = esp + 4; /* 0x30002AA2: add esp, 4 */
   7273     _flag_k = FK_ADD;
   7274     PUSH32(esp, eax); /* 0x30002AA5: push eax */
   7275     PUSH32(esp, ecx); /* 0x30002AA6: push ecx */
   7276     PUSH32(esp, edx); /* 0x30002AA7: push edx */
   7277     ecx = esi; /* 0x30002AA8: mov ecx, esi */
   7278     MEM32(esi + 0x4) = eax; /* 0x30002AAA: mov dword ptr [esi + 4], eax */
   7279     RECOMP_ICALL(0x300017D0u); /* 0x30002AAD: call 0x300017d0 */ /* not lifted */
   7280     RECOMP_FLAGS_IN();
   7281     MEM32(esi + 0x8) = eax; /* 0x30002AB2: mov dword ptr [esi + 8], eax */
   7282     MEM32(esi + 0xC) = eax; /* 0x30002AB5: mov dword ptr [esi + 0xc], eax */
   7283 L_30002AB8:
   7284     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7285     ebx = 0; /* 0x30002AB8: xor ebx, ebx */
   7286     _cf = 0;
   7287     _flag_k = FK_TEST;
   7288     esi = MEM32(ebp + (-0x18)); /* 0x30002ABA: mov esi, dword ptr [ebp - 0x18] */
   7289     ecx = esi + 0x24; /* 0x30002ABD: lea ecx, [esi + 0x24] */
   7290     RECOMP_ICALL(0x300016B0u); /* 0x30002AC0: call 0x300016b0 */ /* not lifted */
   7291     RECOMP_FLAGS_IN();
   7292     ecx = esi + 0x2C; /* 0x30002AC5: lea ecx, [esi + 0x2c] */
   7293     RECOMP_ICALL(0x300016B0u); /* 0x30002AC8: call 0x300016b0 */ /* not lifted */
   7294     RECOMP_FLAGS_IN();
   7295     edi = MEM32(ebp + (-0x24)); /* 0x30002ACD: mov edi, dword ptr [ebp - 0x24] */
   7296     esi = MEM32(ebp + (-0x28)); /* 0x30002AD0: mov esi, dword ptr [ebp - 0x28] */
   7297     /* cmp esi, edi */ /* 0x30002AD3: cmp esi, edi */
   7298     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   7299     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7300     _flag_k = FK_CMP;
   7301     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x30002AD5: mov byte ptr [ebp - 4], 0 */
   7302     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002AED; /* 0x30002AD9: je 0x30002aed */
   7303 L_30002ADB:
   7304     PUSH32(esp, ebx); /* 0x30002ADB: push ebx */
   7305     ecx = esi; /* 0x30002ADC: mov ecx, esi */
   7306     RECOMP_ICALL(0x30001E40u); /* 0x30002ADE: call 0x30001e40 */ /* not lifted */
   7307     RECOMP_FLAGS_IN();
   7308     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   7309     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7310     esi = esi + 0x14u; /* 0x30002AE3: add esi, 0x14 */
   7311     _flag_k = FK_ADD;
   7312     /* cmp esi, edi */ /* 0x30002AE6: cmp esi, edi */
   7313     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   7314     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7315     _flag_k = FK_CMP;
   7316     RECOMP_BACKEDGE();
   7317     if (CMP_NE(_flag_a, _flag_b)) goto L_30002ADB; /* 0x30002AE8: jne 0x30002adb */
   7318 L_30002AEA:
   7319     esi = MEM32(ebp + (-0x28)); /* 0x30002AEA: mov esi, dword ptr [ebp - 0x28] */
   7320 L_30002AED:
   7321     PUSH32(esp, esi); /* 0x30002AED: push esi */
   7322     RECOMP_ICALL(0x30018080u); /* 0x30002AEE: call 0x30018080 */ /* not lifted */
   7323     RECOMP_FLAGS_IN();
   7324     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7325     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7326     esp = esp + 4; /* 0x30002AF3: add esp, 4 */
   7327     _flag_k = FK_ADD;
   7328     ecx = ebp + (-0x3C); /* 0x30002AF6: lea ecx, [ebp - 0x3c] */
   7329     MEM32(ebp + (-0x28)) = ebx; /* 0x30002AF9: mov dword ptr [ebp - 0x28], ebx */
   7330     MEM32(ebp + (-0x24)) = ebx; /* 0x30002AFC: mov dword ptr [ebp - 0x24], ebx */
   7331     MEM32(ebp + (-0x20)) = ebx; /* 0x30002AFF: mov dword ptr [ebp - 0x20], ebx */
   7332     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x30002B02: mov dword ptr [ebp - 4], 0xffffffff */
   7333     RECOMP_ICALL(0x30002B80u); /* 0x30002B09: call 0x30002b80 */ /* not lifted */
   7334     RECOMP_FLAGS_IN();
   7335     ecx = MEM32(ebp + (-0xC)); /* 0x30002B0E: mov ecx, dword ptr [ebp - 0xc] */
   7336     edi = POP32_VAL(esp); /* 0x30002B11: pop edi */
   7337     esi = POP32_VAL(esp); /* 0x30002B12: pop esi */
   7338     ebx = POP32_VAL(esp); /* 0x30002B13: pop ebx */
   7339     MEM32(FS_BASE + (0)) = ecx; /* 0x30002B14: mov dword ptr fs:[0], ecx */
   7340     esp = ebp; /* 0x30002B1B: mov esp, ebp */
   7341     ebp = POP32_VAL(esp); /* 0x30002B1D: pop ebp */
   7342     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30002B1E: ret  */
   7343     RECOMP_REGS_OUT();
   7344 }
   7345 
   7346 void sub_30002AB8(void) {
   7347     int _fpu_cmp = 0;
   7348     uint32_t _cf = 0;
   7349     int _df = 1;
   7350     uint32_t _flag_k = FK_NONE;
   7351     uint32_t _flag_a = 0, _flag_b = 0;
   7352     uint32_t _itail_tgt = 0;
   7353     RECOMP_REGS_LOCALS
   7354     RECOMP_ENTER(0x30002AB8u);
   7355 
   7356 L_30002AB8:
   7357     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7358     ebx = 0; /* 0x30002AB8: xor ebx, ebx */
   7359     _cf = 0;
   7360     _flag_k = FK_TEST;
   7361     esi = MEM32(ebp + (-0x18)); /* 0x30002ABA: mov esi, dword ptr [ebp - 0x18] */
   7362     ecx = esi + 0x24; /* 0x30002ABD: lea ecx, [esi + 0x24] */
   7363     RECOMP_ICALL(0x300016B0u); /* 0x30002AC0: call 0x300016b0 */ /* not lifted */
   7364     RECOMP_FLAGS_IN();
   7365     ecx = esi + 0x2C; /* 0x30002AC5: lea ecx, [esi + 0x2c] */
   7366     RECOMP_ICALL(0x300016B0u); /* 0x30002AC8: call 0x300016b0 */ /* not lifted */
   7367     RECOMP_FLAGS_IN();
   7368     edi = MEM32(ebp + (-0x24)); /* 0x30002ACD: mov edi, dword ptr [ebp - 0x24] */
   7369     esi = MEM32(ebp + (-0x28)); /* 0x30002AD0: mov esi, dword ptr [ebp - 0x28] */
   7370     /* cmp esi, edi */ /* 0x30002AD3: cmp esi, edi */
   7371     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   7372     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7373     _flag_k = FK_CMP;
   7374     MEM8(ebp + (-0x4)) = (uint8_t)(0); /* 0x30002AD5: mov byte ptr [ebp - 4], 0 */
   7375     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002AED; /* 0x30002AD9: je 0x30002aed */
   7376 L_30002ADB:
   7377     PUSH32(esp, ebx); /* 0x30002ADB: push ebx */
   7378     ecx = esi; /* 0x30002ADC: mov ecx, esi */
   7379     RECOMP_ICALL(0x30001E40u); /* 0x30002ADE: call 0x30001e40 */ /* not lifted */
   7380     RECOMP_FLAGS_IN();
   7381     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   7382     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7383     esi = esi + 0x14u; /* 0x30002AE3: add esi, 0x14 */
   7384     _flag_k = FK_ADD;
   7385     /* cmp esi, edi */ /* 0x30002AE6: cmp esi, edi */
   7386     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edi);
   7387     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7388     _flag_k = FK_CMP;
   7389     RECOMP_BACKEDGE();
   7390     if (CMP_NE(_flag_a, _flag_b)) goto L_30002ADB; /* 0x30002AE8: jne 0x30002adb */
   7391 L_30002AEA:
   7392     esi = MEM32(ebp + (-0x28)); /* 0x30002AEA: mov esi, dword ptr [ebp - 0x28] */
   7393 L_30002AED:
   7394     PUSH32(esp, esi); /* 0x30002AED: push esi */
   7395     RECOMP_ICALL(0x30018080u); /* 0x30002AEE: call 0x30018080 */ /* not lifted */
   7396     RECOMP_FLAGS_IN();
   7397     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7398     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7399     esp = esp + 4; /* 0x30002AF3: add esp, 4 */
   7400     _flag_k = FK_ADD;
   7401     ecx = ebp + (-0x3C); /* 0x30002AF6: lea ecx, [ebp - 0x3c] */
   7402     MEM32(ebp + (-0x28)) = ebx; /* 0x30002AF9: mov dword ptr [ebp - 0x28], ebx */
   7403     MEM32(ebp + (-0x24)) = ebx; /* 0x30002AFC: mov dword ptr [ebp - 0x24], ebx */
   7404     MEM32(ebp + (-0x20)) = ebx; /* 0x30002AFF: mov dword ptr [ebp - 0x20], ebx */
   7405     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x30002B02: mov dword ptr [ebp - 4], 0xffffffff */
   7406     RECOMP_ICALL(0x30002B80u); /* 0x30002B09: call 0x30002b80 */ /* not lifted */
   7407     RECOMP_FLAGS_IN();
   7408     ecx = MEM32(ebp + (-0xC)); /* 0x30002B0E: mov ecx, dword ptr [ebp - 0xc] */
   7409     edi = POP32_VAL(esp); /* 0x30002B11: pop edi */
   7410     esi = POP32_VAL(esp); /* 0x30002B12: pop esi */
   7411     ebx = POP32_VAL(esp); /* 0x30002B13: pop ebx */
   7412     MEM32(FS_BASE + (0)) = ecx; /* 0x30002B14: mov dword ptr fs:[0], ecx */
   7413     esp = ebp; /* 0x30002B1B: mov esp, ebp */
   7414     ebp = POP32_VAL(esp); /* 0x30002B1D: pop ebp */
   7415     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30002B1E: ret  */
   7416     RECOMP_REGS_OUT();
   7417 }
   7418 
   7419 void sub_30002B20(void) {
   7420     int _fpu_cmp = 0;
   7421     uint32_t _cf = 0;
   7422     int _df = 1;
   7423     uint32_t _flag_k = FK_NONE;
   7424     uint32_t _flag_a = 0, _flag_b = 0;
   7425     uint32_t _itail_tgt = 0;
   7426     RECOMP_REGS_LOCALS
   7427     RECOMP_ENTER(0x30002B20u);
   7428 
   7429 L_30002B20:
   7430     PUSH32(esp, ebp); /* 0x30002B20: push ebp */
   7431     ebp = esp; /* 0x30002B21: mov ebp, esp */
   7432     PUSH32(esp, esi); /* 0x30002B23: push esi */
   7433     esi = ecx; /* 0x30002B24: mov esi, ecx */
   7434     eax = ebp + 0x8; /* 0x30002B26: lea eax, [ebp + 8] */
   7435     PUSH32(esp, eax); /* 0x30002B29: push eax */
   7436     ecx = esi + 0x4; /* 0x30002B2A: lea ecx, [esi + 4] */
   7437     RECOMP_ICALL(0x30009870u); /* 0x30002B2D: call 0x30009870 */ /* not lifted */
   7438     RECOMP_FLAGS_IN();
   7439     /* cmp eax, 1 */ /* 0x30002B32: cmp eax, 1 */
   7440     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   7441     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7442     _flag_k = FK_CMP;
   7443     if (CMP_NE(_flag_a, _flag_b)) goto L_30002B5B; /* 0x30002B35: jne 0x30002b5b */
   7444 L_30002B37:
   7445     edx = MEM32(ebp + 0x8); /* 0x30002B37: mov edx, dword ptr [ebp + 8] */
   7446     PUSH32(esp, eax); /* 0x30002B3A: push eax */
   7447     eax = MEM32(ebp + 0xC); /* 0x30002B3B: mov eax, dword ptr [ebp + 0xc] */
   7448     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   7449     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7450     esp = esp - 0xCu; /* 0x30002B3E: sub esp, 0xc */
   7451     _flag_k = FK_CMP;
   7452     ecx = esp; /* 0x30002B41: mov ecx, esp */
   7453     MEM32(ecx) = edx; /* 0x30002B43: mov dword ptr [ecx], edx */
   7454     edx = MEM32(ebp + 0x10); /* 0x30002B45: mov edx, dword ptr [ebp + 0x10] */
   7455     MEM32(ecx + 0x4) = eax; /* 0x30002B48: mov dword ptr [ecx + 4], eax */
   7456     MEM32(ecx + 0x8) = edx; /* 0x30002B4B: mov dword ptr [ecx + 8], edx */
   7457     ecx = esi + 0x2C; /* 0x30002B4E: lea ecx, [esi + 0x2c] */
   7458     RECOMP_ICALL(0x300016C0u); /* 0x30002B51: call 0x300016c0 */ /* not lifted */
   7459     RECOMP_FLAGS_IN();
   7460     esi = POP32_VAL(esp); /* 0x30002B56: pop esi */
   7461     ebp = POP32_VAL(esp); /* 0x30002B57: pop ebp */
   7462     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30002B58: ret 0xc */
   7463 L_30002B5B:
   7464     ecx = MEM32(ebp + 0x8); /* 0x30002B5B: mov ecx, dword ptr [ebp + 8] */
   7465     edx = MEM32(ebp + 0xC); /* 0x30002B5E: mov edx, dword ptr [ebp + 0xc] */
   7466     PUSH32(esp, 0xFFFFFFFFu); /* 0x30002B61: push -1 */
   7467     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   7468     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7469     esp = esp - 0xCu; /* 0x30002B63: sub esp, 0xc */
   7470     _flag_k = FK_CMP;
   7471     eax = esp; /* 0x30002B66: mov eax, esp */
   7472     MEM32(eax) = ecx; /* 0x30002B68: mov dword ptr [eax], ecx */
   7473     ecx = MEM32(ebp + 0x10); /* 0x30002B6A: mov ecx, dword ptr [ebp + 0x10] */
   7474     MEM32(eax + 0x4) = edx; /* 0x30002B6D: mov dword ptr [eax + 4], edx */
   7475     MEM32(eax + 0x8) = ecx; /* 0x30002B70: mov dword ptr [eax + 8], ecx */
   7476     ecx = esi + 0x24; /* 0x30002B73: lea ecx, [esi + 0x24] */
   7477     RECOMP_ICALL(0x300016C0u); /* 0x30002B76: call 0x300016c0 */ /* not lifted */
   7478     RECOMP_FLAGS_IN();
   7479     esi = POP32_VAL(esp); /* 0x30002B7B: pop esi */
   7480     ebp = POP32_VAL(esp); /* 0x30002B7C: pop ebp */
   7481     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30002B7D: ret 0xc */
   7482     RECOMP_REGS_OUT();
   7483 }
   7484 
   7485 void sub_30002B80(void) {
   7486     int _fpu_cmp = 0;
   7487     uint32_t _cf = 0;
   7488     int _df = 1;
   7489     uint32_t _flag_k = FK_NONE;
   7490     uint32_t _flag_a = 0, _flag_b = 0;
   7491     uint32_t _itail_tgt = 0;
   7492     RECOMP_REGS_LOCALS
   7493     RECOMP_ENTER(0x30002B80u);
   7494 
   7495 L_30002B80:
   7496     PUSH32(esp, ebx); /* 0x30002B80: push ebx */
   7497     PUSH32(esp, esi); /* 0x30002B81: push esi */
   7498     PUSH32(esp, edi); /* 0x30002B82: push edi */
   7499     edi = ecx; /* 0x30002B83: mov edi, ecx */
   7500     ebx = MEM32(edi + 0x8); /* 0x30002B85: mov ebx, dword ptr [edi + 8] */
   7501     esi = MEM32(edi + 0x4); /* 0x30002B88: mov esi, dword ptr [edi + 4] */
   7502     /* cmp esi, ebx */ /* 0x30002B8B: cmp esi, ebx */
   7503     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   7504     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7505     _flag_k = FK_CMP;
   7506     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002B9D; /* 0x30002B8D: je 0x30002b9d */
   7507 L_30002B8F:
   7508     ecx = esi; /* 0x30002B8F: mov ecx, esi */
   7509     RECOMP_ICALL(0x30007AB0u); /* 0x30002B91: call 0x30007ab0 */ /* not lifted */
   7510     RECOMP_FLAGS_IN();
   7511     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   7512     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7513     esi = esi + 0x14u; /* 0x30002B96: add esi, 0x14 */
   7514     _flag_k = FK_ADD;
   7515     /* cmp esi, ebx */ /* 0x30002B99: cmp esi, ebx */
   7516     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   7517     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7518     _flag_k = FK_CMP;
   7519     RECOMP_BACKEDGE();
   7520     if (CMP_NE(_flag_a, _flag_b)) goto L_30002B8F; /* 0x30002B9B: jne 0x30002b8f */
   7521 L_30002B9D:
   7522     eax = MEM32(edi + 0x4); /* 0x30002B9D: mov eax, dword ptr [edi + 4] */
   7523     PUSH32(esp, eax); /* 0x30002BA0: push eax */
   7524     RECOMP_ICALL(0x30018080u); /* 0x30002BA1: call 0x30018080 */ /* not lifted */
   7525     RECOMP_FLAGS_IN();
   7526     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7527     eax = 0; /* 0x30002BA6: xor eax, eax */
   7528     _cf = 0;
   7529     _flag_k = FK_TEST;
   7530     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7531     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7532     esp = esp + 4; /* 0x30002BA8: add esp, 4 */
   7533     _flag_k = FK_ADD;
   7534     MEM32(edi + 0x4) = eax; /* 0x30002BAB: mov dword ptr [edi + 4], eax */
   7535     MEM32(edi + 0x8) = eax; /* 0x30002BAE: mov dword ptr [edi + 8], eax */
   7536     MEM32(edi + 0xC) = eax; /* 0x30002BB1: mov dword ptr [edi + 0xc], eax */
   7537     edi = POP32_VAL(esp); /* 0x30002BB4: pop edi */
   7538     esi = POP32_VAL(esp); /* 0x30002BB5: pop esi */
   7539     ebx = POP32_VAL(esp); /* 0x30002BB6: pop ebx */
   7540     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30002BB7: ret  */
   7541     RECOMP_REGS_OUT();
   7542 }
   7543 
   7544 void sub_30002BC0(void) {
   7545     int _fpu_cmp = 0;
   7546     uint32_t _cf = 0;
   7547     int _df = 1;
   7548     uint32_t _flag_k = FK_NONE;
   7549     uint32_t _flag_a = 0, _flag_b = 0;
   7550     uint32_t _itail_tgt = 0;
   7551     RECOMP_REGS_LOCALS
   7552     RECOMP_ENTER(0x30002BC0u);
   7553 
   7554 L_30002BC0:
   7555     RECOMP_ICALL(0x30002BD0u); /* 0x30002BC0: call 0x30002bd0 */ /* not lifted */
   7556     RECOMP_FLAGS_IN();
   7557     goto L_30002BE0; /* 0x30002BC5: jmp 0x30002be0 */
   7558 L_30002BE0:
   7559     PUSH32(esp, 0x30002BF0u); /* 0x30002BE0: push 0x30002bf0 */
   7560     RECOMP_ICALL(0x300180ECu); /* 0x30002BE5: call 0x300180ec */ /* not lifted */
   7561     RECOMP_FLAGS_IN();
   7562     ecx = POP32_VAL(esp); /* 0x30002BEA: pop ecx */
   7563     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30002BEB: ret  */
   7564     RECOMP_REGS_OUT();
   7565 }
   7566 
   7567 void sub_30002BD0(void) {
   7568     int _fpu_cmp = 0;
   7569     uint32_t _cf = 0;
   7570     int _df = 1;
   7571     uint32_t _flag_k = FK_NONE;
   7572     uint32_t _flag_a = 0, _flag_b = 0;
   7573     uint32_t _itail_tgt = 0;
   7574     RECOMP_REGS_LOCALS
   7575     RECOMP_ENTER(0x30002BD0u);
   7576 
   7577 L_30002BD0:
   7578     ecx = 0x3001E3A5u; /* 0x30002BD0: mov ecx, 0x3001e3a5 */
   7579 L_30002BD5:
   7580     { _itail_tgt = (uint32_t)(MEM32(0x30019018)); goto _ljump; }
   7581     { RECOMP_REGS_OUT(); return; } /* end of function */
   7582   _ljump:
   7583     switch (_itail_tgt) {
   7584       case 0x30002BD0u: goto L_30002BD0;
   7585       case 0x30002BD5u: goto L_30002BD5;
   7586       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   7587     }
   7588     RECOMP_REGS_OUT();
   7589 }
   7590 
   7591 void sub_30002BE0(void) {
   7592     int _fpu_cmp = 0;
   7593     uint32_t _cf = 0;
   7594     int _df = 1;
   7595     uint32_t _flag_k = FK_NONE;
   7596     uint32_t _flag_a = 0, _flag_b = 0;
   7597     uint32_t _itail_tgt = 0;
   7598     RECOMP_REGS_LOCALS
   7599     RECOMP_ENTER(0x30002BE0u);
   7600 
   7601 L_30002BE0:
   7602     PUSH32(esp, 0x30002BF0u); /* 0x30002BE0: push 0x30002bf0 */
   7603     RECOMP_ICALL(0x300180ECu); /* 0x30002BE5: call 0x300180ec */ /* not lifted */
   7604     RECOMP_FLAGS_IN();
   7605     ecx = POP32_VAL(esp); /* 0x30002BEA: pop ecx */
   7606     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30002BEB: ret  */
   7607     RECOMP_REGS_OUT();
   7608 }
   7609 
   7610 void sub_30002BF0(void) {
   7611     int _fpu_cmp = 0;
   7612     uint32_t _cf = 0;
   7613     int _df = 1;
   7614     uint32_t _flag_k = FK_NONE;
   7615     uint32_t _flag_a = 0, _flag_b = 0;
   7616     uint32_t _itail_tgt = 0;
   7617     RECOMP_REGS_LOCALS
   7618     RECOMP_ENTER(0x30002BF0u);
   7619 
   7620 L_30002BF0:
   7621     ecx = 0x3001E3A5u; /* 0x30002BF0: mov ecx, 0x3001e3a5 */
   7622 L_30002BF5:
   7623     { _itail_tgt = (uint32_t)(MEM32(0x3001901C)); goto _ljump; }
   7624     { RECOMP_REGS_OUT(); return; } /* end of function */
   7625   _ljump:
   7626     switch (_itail_tgt) {
   7627       case 0x30002BF0u: goto L_30002BF0;
   7628       case 0x30002BF5u: goto L_30002BF5;
   7629       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   7630     }
   7631     RECOMP_REGS_OUT();
   7632 }
   7633 
   7634 void sub_30002C00(void) {
   7635     int _fpu_cmp = 0;
   7636     uint32_t _cf = 0;
   7637     int _df = 1;
   7638     uint32_t _flag_k = FK_NONE;
   7639     uint32_t _flag_a = 0, _flag_b = 0;
   7640     uint32_t _itail_tgt = 0;
   7641     RECOMP_REGS_LOCALS
   7642     RECOMP_ENTER(0x30002C00u);
   7643 
   7644 L_30002C00:
   7645     RECOMP_ICALL(0x30002C10u); /* 0x30002C00: call 0x30002c10 */ /* not lifted */
   7646     RECOMP_FLAGS_IN();
   7647     goto L_30002C20; /* 0x30002C05: jmp 0x30002c20 */
   7648 L_30002C20:
   7649     PUSH32(esp, 0x30002C30u); /* 0x30002C20: push 0x30002c30 */
   7650     RECOMP_ICALL(0x300180ECu); /* 0x30002C25: call 0x300180ec */ /* not lifted */
   7651     RECOMP_FLAGS_IN();
   7652     ecx = POP32_VAL(esp); /* 0x30002C2A: pop ecx */
   7653     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30002C2B: ret  */
   7654     RECOMP_REGS_OUT();
   7655 }
   7656 
   7657 void sub_30002C10(void) {
   7658     int _fpu_cmp = 0;
   7659     uint32_t _cf = 0;
   7660     int _df = 1;
   7661     uint32_t _flag_k = FK_NONE;
   7662     uint32_t _flag_a = 0, _flag_b = 0;
   7663     uint32_t _itail_tgt = 0;
   7664     RECOMP_REGS_LOCALS
   7665     RECOMP_ENTER(0x30002C10u);
   7666 
   7667 L_30002C10:
   7668     ecx = 0x3001E3A4u; /* 0x30002C10: mov ecx, 0x3001e3a4 */
   7669 L_30002C15:
   7670     { _itail_tgt = (uint32_t)(MEM32(0x30019020)); goto _ljump; }
   7671     { RECOMP_REGS_OUT(); return; } /* end of function */
   7672   _ljump:
   7673     switch (_itail_tgt) {
   7674       case 0x30002C10u: goto L_30002C10;
   7675       case 0x30002C15u: goto L_30002C15;
   7676       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   7677     }
   7678     RECOMP_REGS_OUT();
   7679 }
   7680 
   7681 void sub_30002C20(void) {
   7682     int _fpu_cmp = 0;
   7683     uint32_t _cf = 0;
   7684     int _df = 1;
   7685     uint32_t _flag_k = FK_NONE;
   7686     uint32_t _flag_a = 0, _flag_b = 0;
   7687     uint32_t _itail_tgt = 0;
   7688     RECOMP_REGS_LOCALS
   7689     RECOMP_ENTER(0x30002C20u);
   7690 
   7691 L_30002C20:
   7692     PUSH32(esp, 0x30002C30u); /* 0x30002C20: push 0x30002c30 */
   7693     RECOMP_ICALL(0x300180ECu); /* 0x30002C25: call 0x300180ec */ /* not lifted */
   7694     RECOMP_FLAGS_IN();
   7695     ecx = POP32_VAL(esp); /* 0x30002C2A: pop ecx */
   7696     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30002C2B: ret  */
   7697     RECOMP_REGS_OUT();
   7698 }
   7699 
   7700 void sub_30002C30(void) {
   7701     int _fpu_cmp = 0;
   7702     uint32_t _cf = 0;
   7703     int _df = 1;
   7704     uint32_t _flag_k = FK_NONE;
   7705     uint32_t _flag_a = 0, _flag_b = 0;
   7706     uint32_t _itail_tgt = 0;
   7707     RECOMP_REGS_LOCALS
   7708     RECOMP_ENTER(0x30002C30u);
   7709 
   7710 L_30002C30:
   7711     ecx = 0x3001E3A4u; /* 0x30002C30: mov ecx, 0x3001e3a4 */
   7712 L_30002C35:
   7713     { _itail_tgt = (uint32_t)(MEM32(0x30019024)); goto _ljump; }
   7714     { RECOMP_REGS_OUT(); return; } /* end of function */
   7715   _ljump:
   7716     switch (_itail_tgt) {
   7717       case 0x30002C30u: goto L_30002C30;
   7718       case 0x30002C35u: goto L_30002C35;
   7719       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   7720     }
   7721     RECOMP_REGS_OUT();
   7722 }
   7723 
   7724 void sub_30002C40(void) {
   7725     int _fpu_cmp = 0;
   7726     uint32_t _cf = 0;
   7727     int _df = 1;
   7728     uint32_t _flag_k = FK_NONE;
   7729     uint32_t _flag_a = 0, _flag_b = 0;
   7730     uint32_t _itail_tgt = 0;
   7731     RECOMP_REGS_LOCALS
   7732     RECOMP_ENTER(0x30002C40u);
   7733 
   7734 L_30002C40:
   7735     PUSH32(esp, ebp); /* 0x30002C40: push ebp */
   7736     ebp = esp; /* 0x30002C41: mov ebp, esp */
   7737     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   7738     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7739     esp = esp - 0xCu; /* 0x30002C43: sub esp, 0xc */
   7740     _flag_k = FK_CMP;
   7741     PUSH32(esp, ebx); /* 0x30002C46: push ebx */
   7742     PUSH32(esp, esi); /* 0x30002C47: push esi */
   7743     esi = ecx; /* 0x30002C48: mov esi, ecx */
   7744     ebx = MEM32(esi + 0x4); /* 0x30002C4A: mov ebx, dword ptr [esi + 4] */
   7745     PUSH32(esp, edi); /* 0x30002C4D: push edi */
   7746     edi = MEM32(ebp + 0x8); /* 0x30002C4E: mov edi, dword ptr [ebp + 8] */
   7747     ecx = edi; /* 0x30002C51: mov ecx, edi */
   7748     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   7749     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7750     ecx = ecx - ebx; /* 0x30002C53: sub ecx, ebx */
   7751     _flag_k = FK_CMP;
   7752     eax = 0x66666667u; /* 0x30002C55: mov eax, 0x66666667 */
   7753     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002C5A: imul ecx */
   7754       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   7755       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   7756     ecx = MEM32(esi + 0x8); /* 0x30002C5C: mov ecx, dword ptr [esi + 8] */
   7757     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002C5F: sar edx, 3 */
   7758     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7759     edx = (uint32_t)((int32_t)edx >> 3u);
   7760     eax = edx; /* 0x30002C62: mov eax, edx */
   7761     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002C64: shr eax, 0x1f */
   7762     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7763     eax = eax >> 31u; /* 0x30002C64: shr eax, 0x1f */
   7764     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   7765     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7766     edx = edx + eax; /* 0x30002C67: add edx, eax */
   7767     _flag_k = FK_ADD;
   7768     MEM32(ebp + (-0xC)) = edx; /* 0x30002C69: mov dword ptr [ebp - 0xc], edx */
   7769     edx = MEM32(esi + 0xC); /* 0x30002C6C: mov edx, dword ptr [esi + 0xc] */
   7770     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   7771     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7772     edx = edx - ecx; /* 0x30002C6F: sub edx, ecx */
   7773     _flag_k = FK_CMP;
   7774     eax = 0x66666667u; /* 0x30002C71: mov eax, 0x66666667 */
   7775     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x30002C76: imul edx */
   7776       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   7777       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   7778     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002C78: sar edx, 3 */
   7779     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7780     edx = (uint32_t)((int32_t)edx >> 3u);
   7781     eax = edx; /* 0x30002C7B: mov eax, edx */
   7782     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002C7D: shr eax, 0x1f */
   7783     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7784     eax = eax >> 31u; /* 0x30002C7D: shr eax, 0x1f */
   7785     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   7786     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7787     edx = edx + eax; /* 0x30002C80: add edx, eax */
   7788     _flag_k = FK_ADD;
   7789     /* cmp edx, 1 */ /* 0x30002C82: cmp edx, 1 */
   7790     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1);
   7791     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7792     _flag_k = FK_CMP;
   7793     if (CMP_AE(_flag_a, _flag_b)) goto L_30002D7B; /* 0x30002C85: jae 0x30002d7b */
   7794 L_30002C8B:
   7795     /* test ebx, ebx */ /* 0x30002C8B: test ebx, ebx */
   7796     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
   7797     _cf = 0;
   7798     _flag_k = FK_TEST;
   7799     if (TEST_Z(_flag_a, _flag_b)) goto L_30002CAC; /* 0x30002C8D: je 0x30002cac */
   7800 L_30002C8F:
   7801     edx = ecx; /* 0x30002C8F: mov edx, ecx */
   7802     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx);
   7803     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7804     edx = edx - ebx; /* 0x30002C91: sub edx, ebx */
   7805     _flag_k = FK_CMP;
   7806     eax = 0x66666667u; /* 0x30002C93: mov eax, 0x66666667 */
   7807     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x30002C98: imul edx */
   7808       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   7809       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   7810     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002C9A: sar edx, 3 */
   7811     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7812     edx = (uint32_t)((int32_t)edx >> 3u);
   7813     eax = edx; /* 0x30002C9D: mov eax, edx */
   7814     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002C9F: shr eax, 0x1f */
   7815     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7816     eax = eax >> 31u; /* 0x30002C9F: shr eax, 0x1f */
   7817     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   7818     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7819     edx = edx + eax; /* 0x30002CA2: add edx, eax */
   7820     _flag_k = FK_ADD;
   7821     /* cmp edx, 1 */ /* 0x30002CA4: cmp edx, 1 */
   7822     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1);
   7823     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7824     _flag_k = FK_CMP;
   7825     MEM32(ebp + 0x8) = edx; /* 0x30002CA7: mov dword ptr [ebp + 8], edx */
   7826     if (CMP_A(_flag_a, _flag_b)) goto L_30002CB3; /* 0x30002CAA: ja 0x30002cb3 */
   7827 L_30002CAC:
   7828     MEM32(ebp + 0x8) = 1; /* 0x30002CAC: mov dword ptr [ebp + 8], 1 */
   7829 L_30002CB3:
   7830     /* test ebx, ebx */ /* 0x30002CB3: test ebx, ebx */
   7831     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(ebx);
   7832     _cf = 0;
   7833     _flag_k = FK_TEST;
   7834     if (TEST_NZ(_flag_a, _flag_b)) goto L_30002CBB; /* 0x30002CB5: jne 0x30002cbb */
   7835 L_30002CB7:
   7836     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7837     edx = 0; /* 0x30002CB7: xor edx, edx */
   7838     _cf = 0;
   7839     _flag_k = FK_TEST;
   7840     goto L_30002CCE; /* 0x30002CB9: jmp 0x30002cce */
   7841 L_30002CBB:
   7842     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   7843     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7844     ecx = ecx - ebx; /* 0x30002CBB: sub ecx, ebx */
   7845     _flag_k = FK_CMP;
   7846     eax = 0x66666667u; /* 0x30002CBD: mov eax, 0x66666667 */
   7847     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002CC2: imul ecx */
   7848       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   7849       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   7850     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002CC4: sar edx, 3 */
   7851     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7852     edx = (uint32_t)((int32_t)edx >> 3u);
   7853     ecx = edx; /* 0x30002CC7: mov ecx, edx */
   7854     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30002CC9: shr ecx, 0x1f */
   7855     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7856     ecx = ecx >> 31u; /* 0x30002CC9: shr ecx, 0x1f */
   7857     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   7858     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7859     edx = edx + ecx; /* 0x30002CCC: add edx, ecx */
   7860     _flag_k = FK_ADD;
   7861 L_30002CCE:
   7862     eax = MEM32(ebp + 0x8); /* 0x30002CCE: mov eax, dword ptr [ebp + 8] */
   7863     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   7864     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7865     eax = eax + edx; /* 0x30002CD1: add eax, edx */
   7866     _flag_k = FK_ADD;
   7867     /* test eax, eax */ /* 0x30002CD3: test eax, eax */
   7868     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   7869     _cf = 0;
   7870     _flag_k = FK_TEST;
   7871     MEM32(ebp + (-0x4)) = eax; /* 0x30002CD5: mov dword ptr [ebp - 4], eax */
   7872     if (TEST_NS(_flag_a, _flag_b)) goto L_30002CDC; /* 0x30002CD8: jge 0x30002cdc */
   7873 L_30002CDA:
   7874     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7875     eax = 0; /* 0x30002CDA: xor eax, eax */
   7876     _cf = 0;
   7877     _flag_k = FK_TEST;
   7878 L_30002CDC:
   7879     ecx = eax + eax * 4; /* 0x30002CDC: lea ecx, [eax + eax*4] */
   7880     if (2u) _cf = (((ecx) >> 30) & 1u); /* 0x30002CDF: shl ecx, 2 */
   7881     if (2u) { _flag_a = recomp_flags_pack((ecx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7882     ecx = ecx << 2u; /* 0x30002CDF: shl ecx, 2 */
   7883     PUSH32(esp, ecx); /* 0x30002CE2: push ecx */
   7884     RECOMP_ICALL(0x300180A8u); /* 0x30002CE3: call 0x300180a8 */ /* not lifted */
   7885     RECOMP_FLAGS_IN();
   7886     ebx = MEM32(esi + 0x4); /* 0x30002CE8: mov ebx, dword ptr [esi + 4] */
   7887     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7888     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7889     esp = esp + 4; /* 0x30002CEB: add esp, 4 */
   7890     _flag_k = FK_ADD;
   7891     /* cmp ebx, edi */ /* 0x30002CEE: cmp ebx, edi */
   7892     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edi);
   7893     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7894     _flag_k = FK_CMP;
   7895     MEM32(ebp + (-0x8)) = eax; /* 0x30002CF0: mov dword ptr [ebp - 8], eax */
   7896     MEM32(ebp + 0x8) = eax; /* 0x30002CF3: mov dword ptr [ebp + 8], eax */
   7897     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002D15; /* 0x30002CF6: je 0x30002d15 */
   7898 L_30002CF8:
   7899     edx = MEM32(ebp + 0x8); /* 0x30002CF8: mov edx, dword ptr [ebp + 8] */
   7900     PUSH32(esp, ebx); /* 0x30002CFB: push ebx */
   7901     PUSH32(esp, edx); /* 0x30002CFC: push edx */
   7902     RECOMP_ICALL(0x30001DF0u); /* 0x30002CFD: call 0x30001df0 */ /* not lifted */
   7903     RECOMP_FLAGS_IN();
   7904     edx = MEM32(ebp + 0x8); /* 0x30002D02: mov edx, dword ptr [ebp + 8] */
   7905     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x14u);
   7906     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7907     edx = edx + 0x14u; /* 0x30002D05: add edx, 0x14 */
   7908     _flag_k = FK_ADD;
   7909     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x14u);
   7910     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7911     ebx = ebx + 0x14u; /* 0x30002D08: add ebx, 0x14 */
   7912     _flag_k = FK_ADD;
   7913     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   7914     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7915     esp = esp + 8; /* 0x30002D0B: add esp, 8 */
   7916     _flag_k = FK_ADD;
   7917     /* cmp ebx, edi */ /* 0x30002D0E: cmp ebx, edi */
   7918     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edi);
   7919     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7920     _flag_k = FK_CMP;
   7921     MEM32(ebp + 0x8) = edx; /* 0x30002D10: mov dword ptr [ebp + 8], edx */
   7922     RECOMP_BACKEDGE();
   7923     if (CMP_NE(_flag_a, _flag_b)) goto L_30002CF8; /* 0x30002D13: jne 0x30002cf8 */
   7924 L_30002D15:
   7925     eax = MEM32(ebp + 0xC); /* 0x30002D15: mov eax, dword ptr [ebp + 0xc] */
   7926     ecx = MEM32(ebp + 0x8); /* 0x30002D18: mov ecx, dword ptr [ebp + 8] */
   7927     PUSH32(esp, eax); /* 0x30002D1B: push eax */
   7928     PUSH32(esp, ecx); /* 0x30002D1C: push ecx */
   7929     RECOMP_ICALL(0x30001DF0u); /* 0x30002D1D: call 0x30001df0 */ /* not lifted */
   7930     RECOMP_FLAGS_IN();
   7931     edx = MEM32(ebp + 0x8); /* 0x30002D22: mov edx, dword ptr [ebp + 8] */
   7932     eax = MEM32(esi + 0x8); /* 0x30002D25: mov eax, dword ptr [esi + 8] */
   7933     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   7934     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7935     esp = esp + 8; /* 0x30002D28: add esp, 8 */
   7936     _flag_k = FK_ADD;
   7937     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x14u);
   7938     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7939     edx = edx + 0x14u; /* 0x30002D2B: add edx, 0x14 */
   7940     _flag_k = FK_ADD;
   7941     PUSH32(esp, edx); /* 0x30002D2E: push edx */
   7942     PUSH32(esp, eax); /* 0x30002D2F: push eax */
   7943     PUSH32(esp, edi); /* 0x30002D30: push edi */
   7944     ecx = esi; /* 0x30002D31: mov ecx, esi */
   7945     RECOMP_ICALL(0x300017D0u); /* 0x30002D33: call 0x300017d0 */ /* not lifted */
   7946     RECOMP_FLAGS_IN();
   7947     ecx = MEM32(esi + 0x8); /* 0x30002D38: mov ecx, dword ptr [esi + 8] */
   7948     edx = MEM32(esi + 0x4); /* 0x30002D3B: mov edx, dword ptr [esi + 4] */
   7949     PUSH32(esp, ecx); /* 0x30002D3E: push ecx */
   7950     PUSH32(esp, edx); /* 0x30002D3F: push edx */
   7951     ecx = esi; /* 0x30002D40: mov ecx, esi */
   7952     RECOMP_ICALL(0x300017A0u); /* 0x30002D42: call 0x300017a0 */ /* not lifted */
   7953     RECOMP_FLAGS_IN();
   7954     eax = MEM32(esi + 0x4); /* 0x30002D47: mov eax, dword ptr [esi + 4] */
   7955     PUSH32(esp, eax); /* 0x30002D4A: push eax */
   7956     RECOMP_ICALL(0x30018080u); /* 0x30002D4B: call 0x30018080 */ /* not lifted */
   7957     RECOMP_FLAGS_IN();
   7958     eax = MEM32(ebp + (-0x4)); /* 0x30002D50: mov eax, dword ptr [ebp - 4] */
   7959     edi = MEM32(ebp + (-0x8)); /* 0x30002D53: mov edi, dword ptr [ebp - 8] */
   7960     ecx = eax + eax * 4; /* 0x30002D56: lea ecx, [eax + eax*4] */
   7961     edx = edi + ecx * 4; /* 0x30002D59: lea edx, [edi + ecx*4] */
   7962     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7963     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7964     esp = esp + 4; /* 0x30002D5C: add esp, 4 */
   7965     _flag_k = FK_ADD;
   7966     ecx = esi; /* 0x30002D5F: mov ecx, esi */
   7967     MEM32(esi + 0xC) = edx; /* 0x30002D61: mov dword ptr [esi + 0xc], edx */
   7968     RECOMP_ICALL(0x30001CB0u); /* 0x30002D64: call 0x30001cb0 */ /* not lifted */
   7969     RECOMP_FLAGS_IN();
   7970     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   7971     eax = eax + 1; /* 0x30002D69: inc eax */
   7972     _flag_k = FK_INC;
   7973     eax = eax + eax * 4; /* 0x30002D6A: lea eax, [eax + eax*4] */
   7974     ecx = edi + eax * 4; /* 0x30002D6D: lea ecx, [edi + eax*4] */
   7975     MEM32(esi + 0x8) = ecx; /* 0x30002D70: mov dword ptr [esi + 8], ecx */
   7976     MEM32(esi + 0x4) = edi; /* 0x30002D73: mov dword ptr [esi + 4], edi */
   7977     goto L_30002E11; /* 0x30002D76: jmp 0x30002e11 */
   7978 L_30002D7B:
   7979     edx = ecx; /* 0x30002D7B: mov edx, ecx */
   7980     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi);
   7981     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7982     edx = edx - edi; /* 0x30002D7D: sub edx, edi */
   7983     _flag_k = FK_CMP;
   7984     eax = 0x66666667u; /* 0x30002D7F: mov eax, 0x66666667 */
   7985     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x30002D84: imul edx */
   7986       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   7987       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   7988     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002D86: sar edx, 3 */
   7989     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7990     edx = (uint32_t)((int32_t)edx >> 3u);
   7991     eax = edx; /* 0x30002D89: mov eax, edx */
   7992     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002D8B: shr eax, 0x1f */
   7993     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   7994     eax = eax >> 31u; /* 0x30002D8B: shr eax, 0x1f */
   7995     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   7996     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7997     edx = edx + eax; /* 0x30002D8E: add edx, eax */
   7998     _flag_k = FK_ADD;
   7999     /* cmp edx, 1 */ /* 0x30002D90: cmp edx, 1 */
   8000     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1);
   8001     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8002     _flag_k = FK_CMP;
   8003     if (CMP_AE(_flag_a, _flag_b)) goto L_30002DE1; /* 0x30002D93: jae 0x30002de1 */
   8004 L_30002D95:
   8005     edx = edi + 0x14; /* 0x30002D95: lea edx, [edi + 0x14] */
   8006     PUSH32(esp, edx); /* 0x30002D98: push edx */
   8007     PUSH32(esp, ecx); /* 0x30002D99: push ecx */
   8008     PUSH32(esp, edi); /* 0x30002D9A: push edi */
   8009     ecx = esi; /* 0x30002D9B: mov ecx, esi */
   8010     RECOMP_ICALL(0x300017D0u); /* 0x30002D9D: call 0x300017d0 */ /* not lifted */
   8011     RECOMP_FLAGS_IN();
   8012     ebx = MEM32(esi + 0x8); /* 0x30002DA2: mov ebx, dword ptr [esi + 8] */
   8013     eax = MEM32(ebp + 0xC); /* 0x30002DA5: mov eax, dword ptr [ebp + 0xc] */
   8014     PUSH32(esp, eax); /* 0x30002DA8: push eax */
   8015     ecx = ebx; /* 0x30002DA9: mov ecx, ebx */
   8016     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   8017     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8018     ecx = ecx - edi; /* 0x30002DAB: sub ecx, edi */
   8019     _flag_k = FK_CMP;
   8020     eax = 0x66666667u; /* 0x30002DAD: mov eax, 0x66666667 */
   8021     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002DB2: imul ecx */
   8022       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   8023       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   8024     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002DB4: sar edx, 3 */
   8025     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8026     edx = (uint32_t)((int32_t)edx >> 3u);
   8027     ecx = edx; /* 0x30002DB7: mov ecx, edx */
   8028     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30002DB9: shr ecx, 0x1f */
   8029     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8030     ecx = ecx >> 31u; /* 0x30002DB9: shr ecx, 0x1f */
   8031     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   8032     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8033     edx = edx + ecx; /* 0x30002DBC: add edx, ecx */
   8034     _flag_k = FK_ADD;
   8035     eax = 1; /* 0x30002DBE: mov eax, 1 */
   8036     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   8037     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8038     eax = eax - edx; /* 0x30002DC3: sub eax, edx */
   8039     _flag_k = FK_CMP;
   8040     PUSH32(esp, eax); /* 0x30002DC5: push eax */
   8041     PUSH32(esp, ebx); /* 0x30002DC6: push ebx */
   8042     ecx = esi; /* 0x30002DC7: mov ecx, esi */
   8043     RECOMP_ICALL(0x30001860u); /* 0x30002DC9: call 0x30001860 */ /* not lifted */
   8044     RECOMP_FLAGS_IN();
   8045     ecx = MEM32(ebp + 0xC); /* 0x30002DCE: mov ecx, dword ptr [ebp + 0xc] */
   8046     edx = MEM32(esi + 0x8); /* 0x30002DD1: mov edx, dword ptr [esi + 8] */
   8047     PUSH32(esp, ecx); /* 0x30002DD4: push ecx */
   8048     PUSH32(esp, edx); /* 0x30002DD5: push edx */
   8049     PUSH32(esp, edi); /* 0x30002DD6: push edi */
   8050     RECOMP_ICALL(0x30001DC0u); /* 0x30002DD7: call 0x30001dc0 */ /* not lifted */
   8051     RECOMP_FLAGS_IN();
   8052     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
   8053     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8054     esp = esp + 0xCu; /* 0x30002DDC: add esp, 0xc */
   8055     _flag_k = FK_ADD;
   8056     goto L_30002E0D; /* 0x30002DDF: jmp 0x30002e0d */
   8057 L_30002DE1:
   8058     PUSH32(esp, ecx); /* 0x30002DE1: push ecx */
   8059     PUSH32(esp, ecx); /* 0x30002DE2: push ecx */
   8060     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFFFFFFECu);
   8061     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8062     ecx = ecx + 0xFFFFFFECu; /* 0x30002DE3: add ecx, -0x14 */
   8063     _flag_k = FK_ADD;
   8064     PUSH32(esp, ecx); /* 0x30002DE6: push ecx */
   8065     ecx = esi; /* 0x30002DE7: mov ecx, esi */
   8066     RECOMP_ICALL(0x300017D0u); /* 0x30002DE9: call 0x300017d0 */ /* not lifted */
   8067     RECOMP_FLAGS_IN();
   8068     eax = MEM32(esi + 0x8); /* 0x30002DEE: mov eax, dword ptr [esi + 8] */
   8069     PUSH32(esp, eax); /* 0x30002DF1: push eax */
   8070     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0xFFFFFFECu);
   8071     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8072     eax = eax + 0xFFFFFFECu; /* 0x30002DF2: add eax, -0x14 */
   8073     _flag_k = FK_ADD;
   8074     PUSH32(esp, eax); /* 0x30002DF5: push eax */
   8075     PUSH32(esp, edi); /* 0x30002DF6: push edi */
   8076     RECOMP_ICALL(0x30001D80u); /* 0x30002DF7: call 0x30001d80 */ /* not lifted */
   8077     RECOMP_FLAGS_IN();
   8078     eax = MEM32(ebp + 0xC); /* 0x30002DFC: mov eax, dword ptr [ebp + 0xc] */
   8079     PUSH32(esp, eax); /* 0x30002DFF: push eax */
   8080     ecx = edi + 0x14; /* 0x30002E00: lea ecx, [edi + 0x14] */
   8081     PUSH32(esp, ecx); /* 0x30002E03: push ecx */
   8082     PUSH32(esp, edi); /* 0x30002E04: push edi */
   8083     RECOMP_ICALL(0x30001DC0u); /* 0x30002E05: call 0x30001dc0 */ /* not lifted */
   8084     RECOMP_FLAGS_IN();
   8085     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x18u);
   8086     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8087     esp = esp + 0x18u; /* 0x30002E0A: add esp, 0x18 */
   8088     _flag_k = FK_ADD;
   8089 L_30002E0D:
   8090     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(0x14u);
   8091     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8092     MEM32(esi + 0x8) = MEM32(esi + 0x8) + 0x14u; /* 0x30002E0D: add dword ptr [esi + 8], 0x14 */
   8093     _flag_k = FK_ADD;
   8094 L_30002E11:
   8095     eax = MEM32(ebp + (-0xC)); /* 0x30002E11: mov eax, dword ptr [ebp - 0xc] */
   8096     edx = eax + eax * 4; /* 0x30002E14: lea edx, [eax + eax*4] */
   8097     eax = MEM32(esi + 0x4); /* 0x30002E17: mov eax, dword ptr [esi + 4] */
   8098     edi = POP32_VAL(esp); /* 0x30002E1A: pop edi */
   8099     esi = POP32_VAL(esp); /* 0x30002E1B: pop esi */
   8100     eax = eax + edx * 4; /* 0x30002E1C: lea eax, [eax + edx*4] */
   8101     ebx = POP32_VAL(esp); /* 0x30002E1F: pop ebx */
   8102     esp = ebp; /* 0x30002E20: mov esp, ebp */
   8103     ebp = POP32_VAL(esp); /* 0x30002E22: pop ebp */
   8104     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x30002E23: ret 8 */
   8105     RECOMP_REGS_OUT();
   8106 }
   8107 
   8108 void sub_30002E11(void) {
   8109     int _fpu_cmp = 0;
   8110     uint32_t _cf = 0;
   8111     int _df = 1;
   8112     uint32_t _flag_k = FK_NONE;
   8113     uint32_t _flag_a = 0, _flag_b = 0;
   8114     uint32_t _itail_tgt = 0;
   8115     RECOMP_REGS_LOCALS
   8116     RECOMP_ENTER(0x30002E11u);
   8117 
   8118 L_30002E11:
   8119     eax = MEM32(ebp + (-0xC)); /* 0x30002E11: mov eax, dword ptr [ebp - 0xc] */
   8120     edx = eax + eax * 4; /* 0x30002E14: lea edx, [eax + eax*4] */
   8121     eax = MEM32(esi + 0x4); /* 0x30002E17: mov eax, dword ptr [esi + 4] */
   8122     edi = POP32_VAL(esp); /* 0x30002E1A: pop edi */
   8123     esi = POP32_VAL(esp); /* 0x30002E1B: pop esi */
   8124     eax = eax + edx * 4; /* 0x30002E1C: lea eax, [eax + edx*4] */
   8125     ebx = POP32_VAL(esp); /* 0x30002E1F: pop ebx */
   8126     esp = ebp; /* 0x30002E20: mov esp, ebp */
   8127     ebp = POP32_VAL(esp); /* 0x30002E22: pop ebp */
   8128     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x30002E23: ret 8 */
   8129     RECOMP_REGS_OUT();
   8130 }
   8131 
   8132 void sub_30002E30(void) {
   8133     int _fpu_cmp = 0;
   8134     uint32_t _cf = 0;
   8135     int _df = 1;
   8136     uint32_t _flag_k = FK_NONE;
   8137     uint32_t _flag_a = 0, _flag_b = 0;
   8138     uint32_t _itail_tgt = 0;
   8139     RECOMP_REGS_LOCALS
   8140     RECOMP_ENTER(0x30002E30u);
   8141 
   8142 L_30002E30:
   8143     PUSH32(esp, ebp); /* 0x30002E30: push ebp */
   8144     ebp = esp; /* 0x30002E31: mov ebp, esp */
   8145     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
   8146     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8147     esp = esp - 0x10u; /* 0x30002E33: sub esp, 0x10 */
   8148     _flag_k = FK_CMP;
   8149     edx = MEM32(ecx + 0xC); /* 0x30002E36: mov edx, dword ptr [ecx + 0xc] */
   8150     PUSH32(esp, ebx); /* 0x30002E39: push ebx */
   8151     PUSH32(esp, esi); /* 0x30002E3A: push esi */
   8152     esi = MEM32(ecx + 0x8); /* 0x30002E3B: mov esi, dword ptr [ecx + 8] */
   8153     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(esi);
   8154     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8155     edx = edx - esi; /* 0x30002E3E: sub edx, esi */
   8156     _flag_k = FK_CMP;
   8157     eax = 0x66666667u; /* 0x30002E40: mov eax, 0x66666667 */
   8158     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x30002E45: imul edx */
   8159       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   8160       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   8161     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002E47: sar edx, 3 */
   8162     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8163     edx = (uint32_t)((int32_t)edx >> 3u);
   8164     eax = edx; /* 0x30002E4A: mov eax, edx */
   8165     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002E4C: shr eax, 0x1f */
   8166     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8167     eax = eax >> 31u; /* 0x30002E4C: shr eax, 0x1f */
   8168     PUSH32(esp, edi); /* 0x30002E4F: push edi */
   8169     edi = MEM32(ebp + 0xC); /* 0x30002E50: mov edi, dword ptr [ebp + 0xc] */
   8170     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   8171     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8172     edx = edx + eax; /* 0x30002E53: add edx, eax */
   8173     _flag_k = FK_ADD;
   8174     /* cmp edx, edi */ /* 0x30002E55: cmp edx, edi */
   8175     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi);
   8176     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8177     _flag_k = FK_CMP;
   8178     MEM32(ebp + (-0x4)) = ecx; /* 0x30002E57: mov dword ptr [ebp - 4], ecx */
   8179     if (CMP_AE(_flag_a, _flag_b)) goto L_30002FCF; /* 0x30002E5A: jae 0x30002fcf */
   8180 L_30002E60:
   8181     ecx = MEM32(ecx + 0x4); /* 0x30002E60: mov ecx, dword ptr [ecx + 4] */
   8182     /* test ecx, ecx */ /* 0x30002E63: test ecx, ecx */
   8183     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   8184     _cf = 0;
   8185     _flag_k = FK_TEST;
   8186     if (TEST_Z(_flag_a, _flag_b)) goto L_30002E82; /* 0x30002E65: je 0x30002e82 */
   8187 L_30002E67:
   8188     edx = esi; /* 0x30002E67: mov edx, esi */
   8189     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   8190     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8191     edx = edx - ecx; /* 0x30002E69: sub edx, ecx */
   8192     _flag_k = FK_CMP;
   8193     eax = 0x66666667u; /* 0x30002E6B: mov eax, 0x66666667 */
   8194     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x30002E70: imul edx */
   8195       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   8196       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   8197     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002E72: sar edx, 3 */
   8198     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8199     edx = (uint32_t)((int32_t)edx >> 3u);
   8200     eax = edx; /* 0x30002E75: mov eax, edx */
   8201     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002E77: shr eax, 0x1f */
   8202     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8203     eax = eax >> 31u; /* 0x30002E77: shr eax, 0x1f */
   8204     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   8205     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8206     edx = edx + eax; /* 0x30002E7A: add edx, eax */
   8207     _flag_k = FK_ADD;
   8208     /* cmp edi, edx */ /* 0x30002E7C: cmp edi, edx */
   8209     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx);
   8210     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8211     _flag_k = FK_CMP;
   8212     ebx = edx; /* 0x30002E7E: mov ebx, edx */
   8213     if (CMP_B(_flag_a, _flag_b)) goto L_30002E84; /* 0x30002E80: jb 0x30002e84 */
   8214 L_30002E82:
   8215     ebx = edi; /* 0x30002E82: mov ebx, edi */
   8216 L_30002E84:
   8217     /* test ecx, ecx */ /* 0x30002E84: test ecx, ecx */
   8218     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   8219     _cf = 0;
   8220     _flag_k = FK_TEST;
   8221     if (TEST_NZ(_flag_a, _flag_b)) goto L_30002E8C; /* 0x30002E86: jne 0x30002e8c */
   8222 L_30002E88:
   8223     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   8224     edx = 0; /* 0x30002E88: xor edx, edx */
   8225     _cf = 0;
   8226     _flag_k = FK_TEST;
   8227     goto L_30002E9F; /* 0x30002E8A: jmp 0x30002e9f */
   8228 L_30002E8C:
   8229     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ecx);
   8230     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8231     esi = esi - ecx; /* 0x30002E8C: sub esi, ecx */
   8232     _flag_k = FK_CMP;
   8233     eax = 0x66666667u; /* 0x30002E8E: mov eax, 0x66666667 */
   8234     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(esi); /* 0x30002E93: imul esi */
   8235       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   8236       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   8237     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002E95: sar edx, 3 */
   8238     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8239     edx = (uint32_t)((int32_t)edx >> 3u);
   8240     ecx = edx; /* 0x30002E98: mov ecx, edx */
   8241     if (31u) _cf = (((ecx) >> 30) & 1u); /* 0x30002E9A: shr ecx, 0x1f */
   8242     if (31u) { _flag_a = recomp_flags_pack((ecx >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8243     ecx = ecx >> 31u; /* 0x30002E9A: shr ecx, 0x1f */
   8244     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   8245     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8246     edx = edx + ecx; /* 0x30002E9D: add edx, ecx */
   8247     _flag_k = FK_ADD;
   8248 L_30002E9F:
   8249     eax = edx + ebx; /* 0x30002E9F: lea eax, [edx + ebx] */
   8250     /* test eax, eax */ /* 0x30002EA2: test eax, eax */
   8251     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8252     _cf = 0;
   8253     _flag_k = FK_TEST;
   8254     MEM32(ebp + (-0xC)) = eax; /* 0x30002EA4: mov dword ptr [ebp - 0xc], eax */
   8255     if (TEST_NS(_flag_a, _flag_b)) goto L_30002EAB; /* 0x30002EA7: jge 0x30002eab */
   8256 L_30002EA9:
   8257     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   8258     eax = 0; /* 0x30002EA9: xor eax, eax */
   8259     _cf = 0;
   8260     _flag_k = FK_TEST;
   8261 L_30002EAB:
   8262     edx = eax + eax * 4; /* 0x30002EAB: lea edx, [eax + eax*4] */
   8263     if (2u) _cf = (((edx) >> 30) & 1u); /* 0x30002EAE: shl edx, 2 */
   8264     if (2u) { _flag_a = recomp_flags_pack((edx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8265     edx = edx << 2u; /* 0x30002EAE: shl edx, 2 */
   8266     PUSH32(esp, edx); /* 0x30002EB1: push edx */
   8267     RECOMP_ICALL(0x300180A8u); /* 0x30002EB2: call 0x300180a8 */ /* not lifted */
   8268     RECOMP_FLAGS_IN();
   8269     ebx = MEM32(ebp + (-0x4)); /* 0x30002EB7: mov ebx, dword ptr [ebp - 4] */
   8270     esi = MEM32(ebx + 0x4); /* 0x30002EBA: mov esi, dword ptr [ebx + 4] */
   8271     MEM32(ebp + (-0x10)) = eax; /* 0x30002EBD: mov dword ptr [ebp - 0x10], eax */
   8272     MEM32(ebp + 0xC) = eax; /* 0x30002EC0: mov dword ptr [ebp + 0xc], eax */
   8273     eax = MEM32(ebp + 0x8); /* 0x30002EC3: mov eax, dword ptr [ebp + 8] */
   8274     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   8275     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8276     esp = esp + 4; /* 0x30002EC6: add esp, 4 */
   8277     _flag_k = FK_ADD;
   8278     /* cmp esi, eax */ /* 0x30002EC9: cmp esi, eax */
   8279     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   8280     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8281     _flag_k = FK_CMP;
   8282     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002EED; /* 0x30002ECB: je 0x30002eed */
   8283 L_30002ECD:
   8284     eax = MEM32(ebp + 0xC); /* 0x30002ECD: mov eax, dword ptr [ebp + 0xc] */
   8285     PUSH32(esp, esi); /* 0x30002ED0: push esi */
   8286     PUSH32(esp, eax); /* 0x30002ED1: push eax */
   8287     RECOMP_ICALL(0x30001DF0u); /* 0x30002ED2: call 0x30001df0 */ /* not lifted */
   8288     RECOMP_FLAGS_IN();
   8289     edx = MEM32(ebp + 0xC); /* 0x30002ED7: mov edx, dword ptr [ebp + 0xc] */
   8290     eax = MEM32(ebp + 0x8); /* 0x30002EDA: mov eax, dword ptr [ebp + 8] */
   8291     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x14u);
   8292     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8293     edx = edx + 0x14u; /* 0x30002EDD: add edx, 0x14 */
   8294     _flag_k = FK_ADD;
   8295     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   8296     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8297     esi = esi + 0x14u; /* 0x30002EE0: add esi, 0x14 */
   8298     _flag_k = FK_ADD;
   8299     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   8300     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8301     esp = esp + 8; /* 0x30002EE3: add esp, 8 */
   8302     _flag_k = FK_ADD;
   8303     /* cmp esi, eax */ /* 0x30002EE6: cmp esi, eax */
   8304     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   8305     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8306     _flag_k = FK_CMP;
   8307     MEM32(ebp + 0xC) = edx; /* 0x30002EE8: mov dword ptr [ebp + 0xc], edx */
   8308     RECOMP_BACKEDGE();
   8309     if (CMP_NE(_flag_a, _flag_b)) goto L_30002ECD; /* 0x30002EEB: jne 0x30002ecd */
   8310 L_30002EED:
   8311     /* test edi, edi */ /* 0x30002EED: test edi, edi */
   8312     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   8313     _cf = 0;
   8314     _flag_k = FK_TEST;
   8315     esi = MEM32(ebp + 0xC); /* 0x30002EEF: mov esi, dword ptr [ebp + 0xc] */
   8316     if (TEST_Z(_flag_a, _flag_b)) goto L_30002F10; /* 0x30002EF2: jbe 0x30002f10 */
   8317 L_30002EF4:
   8318     MEM32(ebp + (-0x8)) = edi; /* 0x30002EF4: mov dword ptr [ebp - 8], edi */
   8319 L_30002EF7:
   8320     ecx = MEM32(ebp + 0x10); /* 0x30002EF7: mov ecx, dword ptr [ebp + 0x10] */
   8321     PUSH32(esp, ecx); /* 0x30002EFA: push ecx */
   8322     PUSH32(esp, esi); /* 0x30002EFB: push esi */
   8323     RECOMP_ICALL(0x30001DF0u); /* 0x30002EFC: call 0x30001df0 */ /* not lifted */
   8324     RECOMP_FLAGS_IN();
   8325     eax = MEM32(ebp + (-0x8)); /* 0x30002F01: mov eax, dword ptr [ebp - 8] */
   8326     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   8327     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8328     esp = esp + 8; /* 0x30002F04: add esp, 8 */
   8329     _flag_k = FK_ADD;
   8330     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   8331     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8332     esi = esi + 0x14u; /* 0x30002F07: add esi, 0x14 */
   8333     _flag_k = FK_ADD;
   8334     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   8335     eax = eax - 1; /* 0x30002F0A: dec eax */
   8336     _flag_k = FK_DEC;
   8337     MEM32(ebp + (-0x8)) = eax; /* 0x30002F0B: mov dword ptr [ebp - 8], eax */
   8338     RECOMP_BACKEDGE();
   8339     if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_30002EF7; /* 0x30002F0E: jne 0x30002ef7 */
   8340 L_30002F10:
   8341     eax = MEM32(ebp + 0xC); /* 0x30002F10: mov eax, dword ptr [ebp + 0xc] */
   8342     esi = MEM32(ebp + 0x8); /* 0x30002F13: mov esi, dword ptr [ebp + 8] */
   8343     edx = edi + edi * 4; /* 0x30002F16: lea edx, [edi + edi*4] */
   8344     ecx = eax + edx * 4; /* 0x30002F19: lea ecx, [eax + edx*4] */
   8345     eax = MEM32(ebx + 0x8); /* 0x30002F1C: mov eax, dword ptr [ebx + 8] */
   8346     /* cmp esi, eax */ /* 0x30002F1F: cmp esi, eax */
   8347     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   8348     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8349     _flag_k = FK_CMP;
   8350     MEM32(ebp + 0x10) = eax; /* 0x30002F21: mov dword ptr [ebp + 0x10], eax */
   8351     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002F49; /* 0x30002F24: je 0x30002f49 */
   8352 L_30002F26:
   8353     MEM32(ebp + 0x8) = ecx; /* 0x30002F26: mov dword ptr [ebp + 8], ecx */
   8354 L_30002F29:
   8355     ecx = MEM32(ebp + 0x8); /* 0x30002F29: mov ecx, dword ptr [ebp + 8] */
   8356     PUSH32(esp, esi); /* 0x30002F2C: push esi */
   8357     PUSH32(esp, ecx); /* 0x30002F2D: push ecx */
   8358     RECOMP_ICALL(0x30001DF0u); /* 0x30002F2E: call 0x30001df0 */ /* not lifted */
   8359     RECOMP_FLAGS_IN();
   8360     ecx = MEM32(ebp + 0x8); /* 0x30002F33: mov ecx, dword ptr [ebp + 8] */
   8361     eax = MEM32(ebp + 0x10); /* 0x30002F36: mov eax, dword ptr [ebp + 0x10] */
   8362     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   8363     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8364     esi = esi + 0x14u; /* 0x30002F39: add esi, 0x14 */
   8365     _flag_k = FK_ADD;
   8366     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x14u);
   8367     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8368     ecx = ecx + 0x14u; /* 0x30002F3C: add ecx, 0x14 */
   8369     _flag_k = FK_ADD;
   8370     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   8371     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8372     esp = esp + 8; /* 0x30002F3F: add esp, 8 */
   8373     _flag_k = FK_ADD;
   8374     /* cmp esi, eax */ /* 0x30002F42: cmp esi, eax */
   8375     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   8376     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8377     _flag_k = FK_CMP;
   8378     MEM32(ebp + 0x8) = ecx; /* 0x30002F44: mov dword ptr [ebp + 8], ecx */
   8379     RECOMP_BACKEDGE();
   8380     if (CMP_NE(_flag_a, _flag_b)) goto L_30002F29; /* 0x30002F47: jne 0x30002f29 */
   8381 L_30002F49:
   8382     eax = MEM32(ebx + 0x8); /* 0x30002F49: mov eax, dword ptr [ebx + 8] */
   8383     esi = MEM32(ebx + 0x4); /* 0x30002F4C: mov esi, dword ptr [ebx + 4] */
   8384     /* cmp esi, eax */ /* 0x30002F4F: cmp esi, eax */
   8385     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   8386     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8387     _flag_k = FK_CMP;
   8388     MEM32(ebp + 0x8) = eax; /* 0x30002F51: mov dword ptr [ebp + 8], eax */
   8389     if (CMP_EQ(_flag_a, _flag_b)) goto L_30002F67; /* 0x30002F54: je 0x30002f67 */
   8390 L_30002F56:
   8391     ecx = esi; /* 0x30002F56: mov ecx, esi */
   8392     RECOMP_ICALL(0x30007AB0u); /* 0x30002F58: call 0x30007ab0 */ /* not lifted */
   8393     RECOMP_FLAGS_IN();
   8394     eax = MEM32(ebp + 0x8); /* 0x30002F5D: mov eax, dword ptr [ebp + 8] */
   8395     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   8396     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8397     esi = esi + 0x14u; /* 0x30002F60: add esi, 0x14 */
   8398     _flag_k = FK_ADD;
   8399     /* cmp esi, eax */ /* 0x30002F63: cmp esi, eax */
   8400     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   8401     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8402     _flag_k = FK_CMP;
   8403     RECOMP_BACKEDGE();
   8404     if (CMP_NE(_flag_a, _flag_b)) goto L_30002F56; /* 0x30002F65: jne 0x30002f56 */
   8405 L_30002F67:
   8406     edx = MEM32(ebx + 0x4); /* 0x30002F67: mov edx, dword ptr [ebx + 4] */
   8407     PUSH32(esp, edx); /* 0x30002F6A: push edx */
   8408     RECOMP_ICALL(0x30018080u); /* 0x30002F6B: call 0x30018080 */ /* not lifted */
   8409     RECOMP_FLAGS_IN();
   8410     eax = MEM32(ebp + (-0xC)); /* 0x30002F70: mov eax, dword ptr [ebp - 0xc] */
   8411     esi = MEM32(ebp + (-0x10)); /* 0x30002F73: mov esi, dword ptr [ebp - 0x10] */
   8412     eax = eax + eax * 4; /* 0x30002F76: lea eax, [eax + eax*4] */
   8413     ecx = esi + eax * 4; /* 0x30002F79: lea ecx, [esi + eax*4] */
   8414     eax = MEM32(ebx + 0x4); /* 0x30002F7C: mov eax, dword ptr [ebx + 4] */
   8415     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   8416     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8417     esp = esp + 4; /* 0x30002F7F: add esp, 4 */
   8418     _flag_k = FK_ADD;
   8419     /* test eax, eax */ /* 0x30002F82: test eax, eax */
   8420     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8421     _cf = 0;
   8422     _flag_k = FK_TEST;
   8423     MEM32(ebx + 0xC) = ecx; /* 0x30002F84: mov dword ptr [ebx + 0xc], ecx */
   8424     if (TEST_NZ(_flag_a, _flag_b)) goto L_30002FA2; /* 0x30002F87: jne 0x30002fa2 */
   8425 L_30002F89:
   8426     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   8427     edx = 0; /* 0x30002F89: xor edx, edx */
   8428     _cf = 0;
   8429     _flag_k = FK_TEST;
   8430     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx);
   8431     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8432     edi = edi + edx; /* 0x30002F8B: add edi, edx */
   8433     _flag_k = FK_ADD;
   8434     ecx = edi + edi * 4; /* 0x30002F8D: lea ecx, [edi + edi*4] */
   8435     edi = POP32_VAL(esp); /* 0x30002F90: pop edi */
   8436     edx = esi + ecx * 4; /* 0x30002F91: lea edx, [esi + ecx*4] */
   8437     MEM32(ebx + 0x4) = esi; /* 0x30002F94: mov dword ptr [ebx + 4], esi */
   8438     esi = POP32_VAL(esp); /* 0x30002F97: pop esi */
   8439     MEM32(ebx + 0x8) = edx; /* 0x30002F98: mov dword ptr [ebx + 8], edx */
   8440     ebx = POP32_VAL(esp); /* 0x30002F9B: pop ebx */
   8441     esp = ebp; /* 0x30002F9C: mov esp, ebp */
   8442     ebp = POP32_VAL(esp); /* 0x30002F9E: pop ebp */
   8443     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30002F9F: ret 0xc */
   8444 L_30002FA2:
   8445     ecx = MEM32(ebx + 0x8); /* 0x30002FA2: mov ecx, dword ptr [ebx + 8] */
   8446     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   8447     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8448     ecx = ecx - eax; /* 0x30002FA5: sub ecx, eax */
   8449     _flag_k = FK_CMP;
   8450     eax = 0x66666667u; /* 0x30002FA7: mov eax, 0x66666667 */
   8451     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(ecx); /* 0x30002FAC: imul ecx */
   8452       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   8453       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   8454     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002FAE: sar edx, 3 */
   8455     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8456     edx = (uint32_t)((int32_t)edx >> 3u);
   8457     eax = edx; /* 0x30002FB1: mov eax, edx */
   8458     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002FB3: shr eax, 0x1f */
   8459     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8460     eax = eax >> 31u; /* 0x30002FB3: shr eax, 0x1f */
   8461     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   8462     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8463     edx = edx + eax; /* 0x30002FB6: add edx, eax */
   8464     _flag_k = FK_ADD;
   8465     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx);
   8466     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8467     edi = edi + edx; /* 0x30002FB8: add edi, edx */
   8468     _flag_k = FK_ADD;
   8469     ecx = edi + edi * 4; /* 0x30002FBA: lea ecx, [edi + edi*4] */
   8470     edi = POP32_VAL(esp); /* 0x30002FBD: pop edi */
   8471     edx = esi + ecx * 4; /* 0x30002FBE: lea edx, [esi + ecx*4] */
   8472     MEM32(ebx + 0x4) = esi; /* 0x30002FC1: mov dword ptr [ebx + 4], esi */
   8473     esi = POP32_VAL(esp); /* 0x30002FC4: pop esi */
   8474     MEM32(ebx + 0x8) = edx; /* 0x30002FC5: mov dword ptr [ebx + 8], edx */
   8475     ebx = POP32_VAL(esp); /* 0x30002FC8: pop ebx */
   8476     esp = ebp; /* 0x30002FC9: mov esp, ebp */
   8477     ebp = POP32_VAL(esp); /* 0x30002FCB: pop ebp */
   8478     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30002FCC: ret 0xc */
   8479 L_30002FCF:
   8480     ebx = MEM32(ebp + 0x8); /* 0x30002FCF: mov ebx, dword ptr [ebp + 8] */
   8481     edx = esi; /* 0x30002FD2: mov edx, esi */
   8482     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx);
   8483     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8484     edx = edx - ebx; /* 0x30002FD4: sub edx, ebx */
   8485     _flag_k = FK_CMP;
   8486     eax = 0x66666667u; /* 0x30002FD6: mov eax, 0x66666667 */
   8487     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x30002FDB: imul edx */
   8488       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   8489       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   8490     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x30002FDD: sar edx, 3 */
   8491     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8492     edx = (uint32_t)((int32_t)edx >> 3u);
   8493     eax = edx; /* 0x30002FE0: mov eax, edx */
   8494     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30002FE2: shr eax, 0x1f */
   8495     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8496     eax = eax >> 31u; /* 0x30002FE2: shr eax, 0x1f */
   8497     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   8498     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8499     edx = edx + eax; /* 0x30002FE5: add edx, eax */
   8500     _flag_k = FK_ADD;
   8501     /* cmp edx, edi */ /* 0x30002FE7: cmp edx, edi */
   8502     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi);
   8503     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8504     _flag_k = FK_CMP;
   8505     if (CMP_AE(_flag_a, _flag_b)) goto L_30003097; /* 0x30002FE9: jae 0x30003097 */
   8506 L_30002FEF:
   8507     eax = edi + edi * 4; /* 0x30002FEF: lea eax, [edi + edi*4] */
   8508     if (2u) _cf = (((eax) >> 30) & 1u); /* 0x30002FF2: shl eax, 2 */
   8509     if (2u) { _flag_a = recomp_flags_pack((eax << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8510     eax = eax << 2u; /* 0x30002FF2: shl eax, 2 */
   8511     MEM32(ebp + 0x8) = eax; /* 0x30002FF5: mov dword ptr [ebp + 8], eax */
   8512     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   8513     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8514     eax = eax + ebx; /* 0x30002FF8: add eax, ebx */
   8515     _flag_k = FK_ADD;
   8516     /* cmp ebx, esi */ /* 0x30002FFA: cmp ebx, esi */
   8517     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi);
   8518     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8519     _flag_k = FK_CMP;
   8520     MEM32(ebp + 0xC) = ebx; /* 0x30002FFC: mov dword ptr [ebp + 0xc], ebx */
   8521     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000302D; /* 0x30002FFF: je 0x3000302d */
   8522 L_30003001:
   8523     MEM32(ebp + (-0x8)) = eax; /* 0x30003001: mov dword ptr [ebp - 8], eax */
   8524 L_30003004:
   8525     ecx = MEM32(ebp + 0xC); /* 0x30003004: mov ecx, dword ptr [ebp + 0xc] */
   8526     edx = MEM32(ebp + (-0x8)); /* 0x30003007: mov edx, dword ptr [ebp - 8] */
   8527     PUSH32(esp, ecx); /* 0x3000300A: push ecx */
   8528     PUSH32(esp, edx); /* 0x3000300B: push edx */
   8529     RECOMP_ICALL(0x30001DF0u); /* 0x3000300C: call 0x30001df0 */ /* not lifted */
   8530     RECOMP_FLAGS_IN();
   8531     eax = MEM32(ebp + 0xC); /* 0x30003011: mov eax, dword ptr [ebp + 0xc] */
   8532     edx = MEM32(ebp + (-0x8)); /* 0x30003014: mov edx, dword ptr [ebp - 8] */
   8533     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x14u);
   8534     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8535     eax = eax + 0x14u; /* 0x30003017: add eax, 0x14 */
   8536     _flag_k = FK_ADD;
   8537     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x14u);
   8538     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8539     edx = edx + 0x14u; /* 0x3000301A: add edx, 0x14 */
   8540     _flag_k = FK_ADD;
   8541     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   8542     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8543     esp = esp + 8; /* 0x3000301D: add esp, 8 */
   8544     _flag_k = FK_ADD;
   8545     /* cmp eax, esi */ /* 0x30003020: cmp eax, esi */
   8546     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(esi);
   8547     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8548     _flag_k = FK_CMP;
   8549     MEM32(ebp + 0xC) = eax; /* 0x30003022: mov dword ptr [ebp + 0xc], eax */
   8550     MEM32(ebp + (-0x8)) = edx; /* 0x30003025: mov dword ptr [ebp - 8], edx */
   8551     RECOMP_BACKEDGE();
   8552     if (CMP_NE(_flag_a, _flag_b)) goto L_30003004; /* 0x30003028: jne 0x30003004 */
   8553 L_3000302A:
   8554     ecx = MEM32(ebp + (-0x4)); /* 0x3000302A: mov ecx, dword ptr [ebp - 4] */
   8555 L_3000302D:
   8556     esi = MEM32(ecx + 0x8); /* 0x3000302D: mov esi, dword ptr [ecx + 8] */
   8557     edx = esi; /* 0x30003030: mov edx, esi */
   8558     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ebx);
   8559     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8560     edx = edx - ebx; /* 0x30003032: sub edx, ebx */
   8561     _flag_k = FK_CMP;
   8562     eax = 0x66666667u; /* 0x30003034: mov eax, 0x66666667 */
   8563     { int64_t _r = (int64_t)(int32_t)eax * (int32_t)(edx); /* 0x30003039: imul edx */
   8564       eax = (uint32_t)_r; edx = (uint32_t)(_r >> 32); uint32_t _ov = _r != (int32_t)_r;
   8565       _flag_k = FK_EFLAGS; _flag_a = _ov ? 0x801u : 0u; _flag_b = 0; _cf = _ov; }
   8566     if (3u) _cf = (((edx) >> 2) & 1u); /* 0x3000303B: sar edx, 3 */
   8567     if (3u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 3u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8568     edx = (uint32_t)((int32_t)edx >> 3u);
   8569     eax = edx; /* 0x3000303E: mov eax, edx */
   8570     if (31u) _cf = (((eax) >> 30) & 1u); /* 0x30003040: shr eax, 0x1f */
   8571     if (31u) { _flag_a = recomp_flags_pack((eax >> 31u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8572     eax = eax >> 31u; /* 0x30003040: shr eax, 0x1f */
   8573     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
   8574     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8575     edx = edx + eax; /* 0x30003043: add edx, eax */
   8576     _flag_k = FK_ADD;
   8577     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx);
   8578     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8579     edi = edi - edx; /* 0x30003045: sub edi, edx */
   8580     _flag_k = FK_CMP;
   8581     eax = edi; /* 0x30003047: mov eax, edi */
   8582     edi = MEM32(ebp + 0x10); /* 0x30003049: mov edi, dword ptr [ebp + 0x10] */
   8583     if (/* sub result */ CMP_EQ(_flag_a, _flag_b)) goto L_3000306A; /* 0x3000304C: je 0x3000306a */
   8584 L_3000304E:
   8585     MEM32(ebp + 0x10) = eax; /* 0x3000304E: mov dword ptr [ebp + 0x10], eax */
   8586 L_30003051:
   8587     PUSH32(esp, edi); /* 0x30003051: push edi */
   8588     PUSH32(esp, esi); /* 0x30003052: push esi */
   8589     RECOMP_ICALL(0x30001DF0u); /* 0x30003053: call 0x30001df0 */ /* not lifted */
   8590     RECOMP_FLAGS_IN();
   8591     eax = MEM32(ebp + 0x10); /* 0x30003058: mov eax, dword ptr [ebp + 0x10] */
   8592     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   8593     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8594     esp = esp + 8; /* 0x3000305B: add esp, 8 */
   8595     _flag_k = FK_ADD;
   8596     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   8597     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8598     esi = esi + 0x14u; /* 0x3000305E: add esi, 0x14 */
   8599     _flag_k = FK_ADD;
   8600     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   8601     eax = eax - 1; /* 0x30003061: dec eax */
   8602     _flag_k = FK_DEC;
   8603     MEM32(ebp + 0x10) = eax; /* 0x30003062: mov dword ptr [ebp + 0x10], eax */
   8604     RECOMP_BACKEDGE();
   8605     if (/* dec result */ CMP_NE(_flag_a, _flag_b)) goto L_30003051; /* 0x30003065: jne 0x30003051 */
   8606 L_30003067:
   8607     ecx = MEM32(ebp + (-0x4)); /* 0x30003067: mov ecx, dword ptr [ebp - 4] */
   8608 L_3000306A:
   8609     esi = MEM32(ecx + 0x8); /* 0x3000306A: mov esi, dword ptr [ecx + 8] */
   8610     /* cmp ebx, esi */ /* 0x3000306D: cmp ebx, esi */
   8611     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi);
   8612     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8613     _flag_k = FK_CMP;
   8614     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003083; /* 0x3000306F: je 0x30003083 */
   8615 L_30003071:
   8616     PUSH32(esp, edi); /* 0x30003071: push edi */
   8617     ecx = ebx; /* 0x30003072: mov ecx, ebx */
   8618     RECOMP_ICALL(0x300080D0u); /* 0x30003074: call 0x300080d0 */ /* not lifted */
   8619     RECOMP_FLAGS_IN();
   8620     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x14u);
   8621     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8622     ebx = ebx + 0x14u; /* 0x30003079: add ebx, 0x14 */
   8623     _flag_k = FK_ADD;
   8624     /* cmp ebx, esi */ /* 0x3000307C: cmp ebx, esi */
   8625     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi);
   8626     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8627     _flag_k = FK_CMP;
   8628     RECOMP_BACKEDGE();
   8629     if (CMP_NE(_flag_a, _flag_b)) goto L_30003071; /* 0x3000307E: jne 0x30003071 */
   8630 L_30003080:
   8631     ecx = MEM32(ebp + (-0x4)); /* 0x30003080: mov ecx, dword ptr [ebp - 4] */
   8632 L_30003083:
   8633     eax = MEM32(ecx + 0x8); /* 0x30003083: mov eax, dword ptr [ecx + 8] */
   8634     edx = MEM32(ebp + 0x8); /* 0x30003086: mov edx, dword ptr [ebp + 8] */
   8635     edi = POP32_VAL(esp); /* 0x30003089: pop edi */
   8636     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   8637     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8638     eax = eax + edx; /* 0x3000308A: add eax, edx */
   8639     _flag_k = FK_ADD;
   8640     esi = POP32_VAL(esp); /* 0x3000308C: pop esi */
   8641     MEM32(ecx + 0x8) = eax; /* 0x3000308D: mov dword ptr [ecx + 8], eax */
   8642     ebx = POP32_VAL(esp); /* 0x30003090: pop ebx */
   8643     esp = ebp; /* 0x30003091: mov esp, ebp */
   8644     ebp = POP32_VAL(esp); /* 0x30003093: pop ebp */
   8645     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30003094: ret 0xc */
   8646 L_30003097:
   8647     /* test edi, edi */ /* 0x30003097: test edi, edi */
   8648     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   8649     _cf = 0;
   8650     _flag_k = FK_TEST;
   8651     if (TEST_Z(_flag_a, _flag_b)) goto L_30003117; /* 0x30003099: jbe 0x30003117 */
   8652 L_3000309B:
   8653     eax = edi + edi * 4; /* 0x3000309B: lea eax, [edi + edi*4] */
   8654     if (2u) _cf = (((eax) >> 30) & 1u); /* 0x3000309E: shl eax, 2 */
   8655     if (2u) { _flag_a = recomp_flags_pack((eax << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8656     eax = eax << 2u; /* 0x3000309E: shl eax, 2 */
   8657     edi = esi; /* 0x300030A1: mov edi, esi */
   8658     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   8659     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8660     edi = edi - eax; /* 0x300030A3: sub edi, eax */
   8661     _flag_k = FK_CMP;
   8662     /* cmp edi, esi */ /* 0x300030A5: cmp edi, esi */
   8663     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi);
   8664     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8665     _flag_k = FK_CMP;
   8666     MEM32(ebp + 0xC) = esi; /* 0x300030A7: mov dword ptr [ebp + 0xc], esi */
   8667     MEM32(ebp + 0x8) = eax; /* 0x300030AA: mov dword ptr [ebp + 8], eax */
   8668     if (CMP_EQ(_flag_a, _flag_b)) goto L_300030D2; /* 0x300030AD: je 0x300030d2 */
   8669 L_300030AF:
   8670     eax = MEM32(ebp + 0xC); /* 0x300030AF: mov eax, dword ptr [ebp + 0xc] */
   8671     PUSH32(esp, edi); /* 0x300030B2: push edi */
   8672     PUSH32(esp, eax); /* 0x300030B3: push eax */
   8673     RECOMP_ICALL(0x30001DF0u); /* 0x300030B4: call 0x30001df0 */ /* not lifted */
   8674     RECOMP_FLAGS_IN();
   8675     edx = MEM32(ebp + 0xC); /* 0x300030B9: mov edx, dword ptr [ebp + 0xc] */
   8676     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0x14u);
   8677     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8678     edx = edx + 0x14u; /* 0x300030BC: add edx, 0x14 */
   8679     _flag_k = FK_ADD;
   8680     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   8681     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8682     edi = edi + 0x14u; /* 0x300030BF: add edi, 0x14 */
   8683     _flag_k = FK_ADD;
   8684     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   8685     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8686     esp = esp + 8; /* 0x300030C2: add esp, 8 */
   8687     _flag_k = FK_ADD;
   8688     /* cmp edi, esi */ /* 0x300030C5: cmp edi, esi */
   8689     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(esi);
   8690     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8691     _flag_k = FK_CMP;
   8692     MEM32(ebp + 0xC) = edx; /* 0x300030C7: mov dword ptr [ebp + 0xc], edx */
   8693     RECOMP_BACKEDGE();
   8694     if (CMP_NE(_flag_a, _flag_b)) goto L_300030AF; /* 0x300030CA: jne 0x300030af */
   8695 L_300030CC:
   8696     ecx = MEM32(ebp + (-0x4)); /* 0x300030CC: mov ecx, dword ptr [ebp - 4] */
   8697     eax = MEM32(ebp + 0x8); /* 0x300030CF: mov eax, dword ptr [ebp + 8] */
   8698 L_300030D2:
   8699     edi = MEM32(ecx + 0x8); /* 0x300030D2: mov edi, dword ptr [ecx + 8] */
   8700     esi = edi; /* 0x300030D5: mov esi, edi */
   8701     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
   8702     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8703     esi = esi - eax; /* 0x300030D7: sub esi, eax */
   8704     _flag_k = FK_CMP;
   8705     /* cmp ebx, esi */ /* 0x300030D9: cmp ebx, esi */
   8706     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi);
   8707     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8708     _flag_k = FK_CMP;
   8709     if (CMP_EQ(_flag_a, _flag_b)) goto L_300030F5; /* 0x300030DB: je 0x300030f5 */
   8710 L_300030DD:
   8711     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x14u);
   8712     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8713     esi = esi - 0x14u; /* 0x300030DD: sub esi, 0x14 */
   8714     _flag_k = FK_CMP;
   8715     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
   8716     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8717     edi = edi - 0x14u; /* 0x300030E0: sub edi, 0x14 */
   8718     _flag_k = FK_CMP;
   8719     PUSH32(esp, esi); /* 0x300030E3: push esi */
   8720     ecx = edi; /* 0x300030E4: mov ecx, edi */
   8721     RECOMP_ICALL(0x300080D0u); /* 0x300030E6: call 0x300080d0 */ /* not lifted */
   8722     RECOMP_FLAGS_IN();
   8723     /* cmp esi, ebx */ /* 0x300030EB: cmp esi, ebx */
   8724     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
   8725     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8726     _flag_k = FK_CMP;
   8727     RECOMP_BACKEDGE();
   8728     if (CMP_NE(_flag_a, _flag_b)) goto L_300030DD; /* 0x300030ED: jne 0x300030dd */
   8729 L_300030EF:
   8730     ecx = MEM32(ebp + (-0x4)); /* 0x300030EF: mov ecx, dword ptr [ebp - 4] */
   8731     eax = MEM32(ebp + 0x8); /* 0x300030F2: mov eax, dword ptr [ebp + 8] */
   8732 L_300030F5:
   8733     esi = eax + ebx; /* 0x300030F5: lea esi, [eax + ebx] */
   8734     /* cmp ebx, esi */ /* 0x300030F8: cmp ebx, esi */
   8735     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi);
   8736     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8737     _flag_k = FK_CMP;
   8738     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003114; /* 0x300030FA: je 0x30003114 */
   8739 L_300030FC:
   8740     edi = MEM32(ebp + 0x10); /* 0x300030FC: mov edi, dword ptr [ebp + 0x10] */
   8741 L_300030FF:
   8742     PUSH32(esp, edi); /* 0x300030FF: push edi */
   8743     ecx = ebx; /* 0x30003100: mov ecx, ebx */
   8744     RECOMP_ICALL(0x300080D0u); /* 0x30003102: call 0x300080d0 */ /* not lifted */
   8745     RECOMP_FLAGS_IN();
   8746     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x14u);
   8747     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8748     ebx = ebx + 0x14u; /* 0x30003107: add ebx, 0x14 */
   8749     _flag_k = FK_ADD;
   8750     /* cmp ebx, esi */ /* 0x3000310A: cmp ebx, esi */
   8751     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(esi);
   8752     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8753     _flag_k = FK_CMP;
   8754     RECOMP_BACKEDGE();
   8755     if (CMP_NE(_flag_a, _flag_b)) goto L_300030FF; /* 0x3000310C: jne 0x300030ff */
   8756 L_3000310E:
   8757     ecx = MEM32(ebp + (-0x4)); /* 0x3000310E: mov ecx, dword ptr [ebp - 4] */
   8758     eax = MEM32(ebp + 0x8); /* 0x30003111: mov eax, dword ptr [ebp + 8] */
   8759 L_30003114:
   8760     _flag_a = (uint32_t)(MEM32(ecx + 0x8)); _flag_b = (uint32_t)(eax);
   8761     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8762     MEM32(ecx + 0x8) = MEM32(ecx + 0x8) + eax; /* 0x30003114: add dword ptr [ecx + 8], eax */
   8763     _flag_k = FK_ADD;
   8764 L_30003117:
   8765     edi = POP32_VAL(esp); /* 0x30003117: pop edi */
   8766     esi = POP32_VAL(esp); /* 0x30003118: pop esi */
   8767     ebx = POP32_VAL(esp); /* 0x30003119: pop ebx */
   8768     esp = ebp; /* 0x3000311A: mov esp, ebp */
   8769     ebp = POP32_VAL(esp); /* 0x3000311C: pop ebp */
   8770     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x3000311D: ret 0xc */
   8771     RECOMP_REGS_OUT();
   8772 }
   8773 
   8774 void sub_30003120(void) {
   8775     int _fpu_cmp = 0;
   8776     uint32_t _cf = 0;
   8777     int _df = 1;
   8778     uint32_t _flag_k = FK_NONE;
   8779     uint32_t _flag_a = 0, _flag_b = 0;
   8780     uint32_t _itail_tgt = 0;
   8781     RECOMP_REGS_LOCALS
   8782     RECOMP_ENTER(0x30003120u);
   8783 
   8784 L_30003120:
   8785     PUSH32(esp, ebp); /* 0x30003120: push ebp */
   8786     ebp = esp; /* 0x30003121: mov ebp, esp */
   8787     PUSH32(esp, 0xFFFFFFFFu); /* 0x30003123: push -1 */
   8788     PUSH32(esp, 0x300185D4u); /* 0x30003125: push 0x300185d4 */
   8789     eax = MEM32(FS_BASE + (0)); /* 0x3000312A: mov eax, dword ptr fs:[0] */
   8790     PUSH32(esp, eax); /* 0x30003130: push eax */
   8791     MEM32(FS_BASE + (0)) = esp; /* 0x30003131: mov dword ptr fs:[0], esp */
   8792     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   8793     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8794     esp = esp - 8; /* 0x30003138: sub esp, 8 */
   8795     _flag_k = FK_CMP;
   8796     PUSH32(esp, ebx); /* 0x3000313B: push ebx */
   8797     PUSH32(esp, esi); /* 0x3000313C: push esi */
   8798     ebx = ecx; /* 0x3000313D: mov ebx, ecx */
   8799     PUSH32(esp, edi); /* 0x3000313F: push edi */
   8800     MEM32(ebp + (-0x14)) = ebx; /* 0x30003140: mov dword ptr [ebp - 0x14], ebx */
   8801     SET_LO8(eax, MEM8(ebp + 0xF)); /* 0x30003143: mov al, byte ptr [ebp + 0xf] */
   8802     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   8803     edx = 0; /* 0x30003146: xor edx, edx */
   8804     _cf = 0;
   8805     _flag_k = FK_TEST;
   8806     esi = ebx + 0x4; /* 0x30003148: lea esi, [ebx + 4] */
   8807     MEM32(ebp + (-0x4)) = edx; /* 0x3000314B: mov dword ptr [ebp - 4], edx */
   8808     MEM8(esi) = (uint8_t)(LO8(eax)); /* 0x3000314E: mov byte ptr [esi], al */
   8809     MEM32(esi + 0x4) = edx; /* 0x30003150: mov dword ptr [esi + 4], edx */
   8810     MEM32(esi + 0x8) = edx; /* 0x30003153: mov dword ptr [esi + 8], edx */
   8811     MEM32(esi + 0xC) = edx; /* 0x30003156: mov dword ptr [esi + 0xc], edx */
   8812     eax = MEM32(ebp + 0x8); /* 0x30003159: mov eax, dword ptr [ebp + 8] */
   8813     edi = MEM32(ebp + 0xC); /* 0x3000315C: mov edi, dword ptr [ebp + 0xc] */
   8814     ecx = MEM32(ebp + 0x10); /* 0x3000315F: mov ecx, dword ptr [ebp + 0x10] */
   8815     MEM32(ebx + 0x14) = eax; /* 0x30003162: mov dword ptr [ebx + 0x14], eax */
   8816     eax = (uint32_t)((int32_t)eax * (int32_t)edi); /* 0x30003165: imul eax, edi */
   8817     MEM32(ebx + 0x1C) = ecx; /* 0x30003168: mov dword ptr [ebx + 0x1c], ecx */
   8818     ecx = MEM32(ebp + 0x14); /* 0x3000316B: mov ecx, dword ptr [ebp + 0x14] */
   8819     MEM32(ebx + 0x18) = edi; /* 0x3000316E: mov dword ptr [ebx + 0x18], edi */
   8820     MEM32(ebx + 0x20) = ecx; /* 0x30003171: mov dword ptr [ebx + 0x20], ecx */
   8821     MEM32(ebx + 0x24) = edx; /* 0x30003174: mov dword ptr [ebx + 0x24], edx */
   8822     MEM32(ebx + 0x28) = edx; /* 0x30003177: mov dword ptr [ebx + 0x28], edx */
   8823     MEM8(ebx + 0x2C) = (uint8_t)(1); /* 0x3000317A: mov byte ptr [ebx + 0x2c], 1 */
   8824     MEM32(ebx) = 0x30019124u; /* 0x3000317E: mov dword ptr [ebx], 0x30019124 */
   8825     MEM32(ebp + 0x8) = eax; /* 0x30003184: mov dword ptr [ebp + 8], eax */
   8826     eax = MEM32(esi + 0x4); /* 0x30003187: mov eax, dword ptr [esi + 4] */
   8827     /* cmp eax, edx */ /* 0x3000318A: cmp eax, edx */
   8828     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   8829     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8830     _flag_k = FK_CMP;
   8831     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x3000318C: mov byte ptr [ebp - 4], 1 */
   8832     if (CMP_NE(_flag_a, _flag_b)) goto L_30003196; /* 0x30003190: jne 0x30003196 */
   8833 L_30003192:
   8834     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   8835     ecx = 0; /* 0x30003192: xor ecx, ecx */
   8836     _cf = 0;
   8837     _flag_k = FK_TEST;
   8838     goto L_3000319E; /* 0x30003194: jmp 0x3000319e */
   8839 L_30003196:
   8840     ecx = MEM32(esi + 0xC); /* 0x30003196: mov ecx, dword ptr [esi + 0xc] */
   8841     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   8842     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8843     ecx = ecx - eax; /* 0x30003199: sub ecx, eax */
   8844     _flag_k = FK_CMP;
   8845     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x3000319B: sar ecx, 2 */
   8846     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8847     ecx = (uint32_t)((int32_t)ecx >> 2u);
   8848 L_3000319E:
   8849     eax = MEM32(ebp + 0x8); /* 0x3000319E: mov eax, dword ptr [ebp + 8] */
   8850     /* cmp ecx, eax */ /* 0x300031A1: cmp ecx, eax */
   8851     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
   8852     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8853     _flag_k = FK_CMP;
   8854     if (CMP_AE(_flag_a, _flag_b)) goto L_3000321A; /* 0x300031A3: jae 0x3000321a */
   8855 L_300031A5:
   8856     /* cmp eax, edx */ /* 0x300031A5: cmp eax, edx */
   8857     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   8858     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8859     _flag_k = FK_CMP;
   8860     if (CMP_GE(_flag_a, _flag_b)) goto L_300031AB; /* 0x300031A7: jge 0x300031ab */
   8861 L_300031A9:
   8862     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   8863     eax = 0; /* 0x300031A9: xor eax, eax */
   8864     _cf = 0;
   8865     _flag_k = FK_TEST;
   8866 L_300031AB:
   8867     edx = eax * 4; /* 0x300031AB: lea edx, [eax*4] */
   8868     PUSH32(esp, edx); /* 0x300031B2: push edx */
   8869     RECOMP_ICALL(0x300180A8u); /* 0x300031B3: call 0x300180a8 */ /* not lifted */
   8870     RECOMP_FLAGS_IN();
   8871     edx = MEM32(esi + 0x8); /* 0x300031B8: mov edx, dword ptr [esi + 8] */
   8872     edi = eax; /* 0x300031BB: mov edi, eax */
   8873     eax = MEM32(esi + 0x4); /* 0x300031BD: mov eax, dword ptr [esi + 4] */
   8874     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   8875     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8876     esp = esp + 4; /* 0x300031C0: add esp, 4 */
   8877     _flag_k = FK_ADD;
   8878     /* cmp eax, edx */ /* 0x300031C3: cmp eax, edx */
   8879     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   8880     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8881     _flag_k = FK_CMP;
   8882     MEM32(ebp + 0x10) = edi; /* 0x300031C5: mov dword ptr [ebp + 0x10], edi */
   8883     ecx = edi; /* 0x300031C8: mov ecx, edi */
   8884     if (CMP_EQ(_flag_a, _flag_b)) goto L_300031E1; /* 0x300031CA: je 0x300031e1 */
   8885 L_300031CC:
   8886     /* test ecx, ecx */ /* 0x300031CC: test ecx, ecx */
   8887     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   8888     _cf = 0;
   8889     _flag_k = FK_TEST;
   8890     if (TEST_Z(_flag_a, _flag_b)) goto L_300031D7; /* 0x300031CE: je 0x300031d7 */
   8891 L_300031D0:
   8892     edi = MEM32(eax); /* 0x300031D0: mov edi, dword ptr [eax] */
   8893     MEM32(ecx) = edi; /* 0x300031D2: mov dword ptr [ecx], edi */
   8894     edi = MEM32(ebp + 0x10); /* 0x300031D4: mov edi, dword ptr [ebp + 0x10] */
   8895 L_300031D7:
   8896     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
   8897     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8898     eax = eax + 4; /* 0x300031D7: add eax, 4 */
   8899     _flag_k = FK_ADD;
   8900     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4);
   8901     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8902     ecx = ecx + 4; /* 0x300031DA: add ecx, 4 */
   8903     _flag_k = FK_ADD;
   8904     /* cmp eax, edx */ /* 0x300031DD: cmp eax, edx */
   8905     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   8906     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8907     _flag_k = FK_CMP;
   8908     RECOMP_BACKEDGE();
   8909     if (CMP_NE(_flag_a, _flag_b)) goto L_300031CC; /* 0x300031DF: jne 0x300031cc */
   8910 L_300031E1:
   8911     eax = MEM32(esi + 0x4); /* 0x300031E1: mov eax, dword ptr [esi + 4] */
   8912     PUSH32(esp, eax); /* 0x300031E4: push eax */
   8913     MEM32(ebp + 0x10) = eax; /* 0x300031E5: mov dword ptr [ebp + 0x10], eax */
   8914     RECOMP_ICALL(0x30018080u); /* 0x300031E8: call 0x30018080 */ /* not lifted */
   8915     RECOMP_FLAGS_IN();
   8916     eax = MEM32(ebp + 0x8); /* 0x300031ED: mov eax, dword ptr [ebp + 8] */
   8917     ecx = edi + eax * 4; /* 0x300031F0: lea ecx, [edi + eax*4] */
   8918     MEM32(esi + 0xC) = ecx; /* 0x300031F3: mov dword ptr [esi + 0xc], ecx */
   8919     ecx = MEM32(esi + 0x4); /* 0x300031F6: mov ecx, dword ptr [esi + 4] */
   8920     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   8921     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   8922     esp = esp + 4; /* 0x300031F9: add esp, 4 */
   8923     _flag_k = FK_ADD;
   8924     /* test ecx, ecx */ /* 0x300031FC: test ecx, ecx */
   8925     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   8926     _cf = 0;
   8927     _flag_k = FK_TEST;
   8928     if (TEST_NZ(_flag_a, _flag_b)) goto L_30003204; /* 0x300031FE: jne 0x30003204 */
   8929 L_30003200:
   8930     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   8931     eax = 0; /* 0x30003200: xor eax, eax */
   8932     _cf = 0;
   8933     _flag_k = FK_TEST;
   8934     goto L_3000320C; /* 0x30003202: jmp 0x3000320c */
   8935 L_30003204:
   8936     eax = MEM32(esi + 0x8); /* 0x30003204: mov eax, dword ptr [esi + 8] */
   8937     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   8938     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8939     eax = eax - ecx; /* 0x30003207: sub eax, ecx */
   8940     _flag_k = FK_CMP;
   8941     if (2u) _cf = (((eax) >> 1) & 1u); /* 0x30003209: sar eax, 2 */
   8942     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8943     eax = (uint32_t)((int32_t)eax >> 2u);
   8944 L_3000320C:
   8945     edx = edi + eax * 4; /* 0x3000320C: lea edx, [edi + eax*4] */
   8946     MEM32(esi + 0x8) = edx; /* 0x3000320F: mov dword ptr [esi + 8], edx */
   8947     MEM32(esi + 0x4) = edi; /* 0x30003212: mov dword ptr [esi + 4], edi */
   8948     edi = MEM32(ebp + 0xC); /* 0x30003215: mov edi, dword ptr [ebp + 0xc] */
   8949     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   8950     edx = 0; /* 0x30003218: xor edx, edx */
   8951     _cf = 0;
   8952     _flag_k = FK_TEST;
   8953 L_3000321A:
   8954     eax = MEM32(ebx + 0x14); /* 0x3000321A: mov eax, dword ptr [ebx + 0x14] */
   8955     eax = (uint32_t)((int32_t)eax * (int32_t)edi); /* 0x3000321D: imul eax, edi */
   8956     /* test eax, eax */ /* 0x30003220: test eax, eax */
   8957     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   8958     _cf = 0;
   8959     _flag_k = FK_TEST;
   8960     MEM32(ebp + 0x10) = edx; /* 0x30003222: mov dword ptr [ebp + 0x10], edx */
   8961     if (TEST_LE(_flag_a, _flag_b)) goto L_30003394; /* 0x30003225: jle 0x30003394 */
   8962 L_3000322B:
   8963     goto L_3000322F; /* 0x3000322B: jmp 0x3000322f */
   8964 L_3000322D:
   8965     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   8966     edx = 0; /* 0x3000322D: xor edx, edx */
   8967     _cf = 0;
   8968     _flag_k = FK_TEST;
   8969 L_3000322F:
   8970     edi = MEM32(esi + 0x8); /* 0x3000322F: mov edi, dword ptr [esi + 8] */
   8971     ecx = MEM32(esi + 0xC); /* 0x30003232: mov ecx, dword ptr [esi + 0xc] */
   8972     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   8973     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8974     ecx = ecx - edi; /* 0x30003235: sub ecx, edi */
   8975     _flag_k = FK_CMP;
   8976     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003237: sar ecx, 2 */
   8977     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   8978     ecx = (uint32_t)((int32_t)ecx >> 2u);
   8979     /* cmp ecx, 1 */ /* 0x3000323A: cmp ecx, 1 */
   8980     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   8981     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8982     _flag_k = FK_CMP;
   8983     MEM32(ebp + 0x8) = edx; /* 0x3000323D: mov dword ptr [ebp + 8], edx */
   8984     if (CMP_AE(_flag_a, _flag_b)) goto L_300032F2; /* 0x30003240: jae 0x300032f2 */
   8985 L_30003246:
   8986     ecx = esi; /* 0x30003246: mov ecx, esi */
   8987     RECOMP_ICALL(0x3000E9A0u); /* 0x30003248: call 0x3000e9a0 */ /* not lifted */
   8988     RECOMP_FLAGS_IN();
   8989     /* cmp eax, 1 */ /* 0x3000324D: cmp eax, 1 */
   8990     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   8991     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   8992     _flag_k = FK_CMP;
   8993     if (CMP_BE(_flag_a, _flag_b)) goto L_3000325D; /* 0x30003250: jbe 0x3000325d */
   8994 L_30003252:
   8995     ecx = esi; /* 0x30003252: mov ecx, esi */
   8996     RECOMP_ICALL(0x3000E9A0u); /* 0x30003254: call 0x3000e9a0 */ /* not lifted */
   8997     RECOMP_FLAGS_IN();
   8998     ebx = eax; /* 0x30003259: mov ebx, eax */
   8999     goto L_30003262; /* 0x3000325B: jmp 0x30003262 */
   9000 L_3000325D:
   9001     ebx = 1; /* 0x3000325D: mov ebx, 1 */
   9002 L_30003262:
   9003     ecx = esi; /* 0x30003262: mov ecx, esi */
   9004     RECOMP_ICALL(0x3000E9A0u); /* 0x30003264: call 0x3000e9a0 */ /* not lifted */
   9005     RECOMP_FLAGS_IN();
   9006     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   9007     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9008     eax = eax + ebx; /* 0x30003269: add eax, ebx */
   9009     _flag_k = FK_ADD;
   9010     MEM32(ebp + (-0x10)) = eax; /* 0x3000326B: mov dword ptr [ebp - 0x10], eax */
   9011     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_NS)) goto L_30003272; /* 0x3000326E: jns 0x30003272 */
   9012 L_30003270:
   9013     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   9014     eax = 0; /* 0x30003270: xor eax, eax */
   9015     _cf = 0;
   9016     _flag_k = FK_TEST;
   9017 L_30003272:
   9018     edx = eax * 4; /* 0x30003272: lea edx, [eax*4] */
   9019     PUSH32(esp, edx); /* 0x30003279: push edx */
   9020     RECOMP_ICALL(0x300180A8u); /* 0x3000327A: call 0x300180a8 */ /* not lifted */
   9021     RECOMP_FLAGS_IN();
   9022     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   9023     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9024     esp = esp + 4; /* 0x3000327F: add esp, 4 */
   9025     _flag_k = FK_ADD;
   9026     ebx = eax; /* 0x30003282: mov ebx, eax */
   9027     eax = MEM32(esi + 0x4); /* 0x30003284: mov eax, dword ptr [esi + 4] */
   9028     PUSH32(esp, ebx); /* 0x30003287: push ebx */
   9029     PUSH32(esp, edi); /* 0x30003288: push edi */
   9030     PUSH32(esp, eax); /* 0x30003289: push eax */
   9031     ecx = esi; /* 0x3000328A: mov ecx, esi */
   9032     RECOMP_ICALL(0x30012BB0u); /* 0x3000328C: call 0x30012bb0 */ /* not lifted */
   9033     RECOMP_FLAGS_IN();
   9034     ecx = ebp + 0x8; /* 0x30003291: lea ecx, [ebp + 8] */
   9035     PUSH32(esp, ecx); /* 0x30003294: push ecx */
   9036     PUSH32(esp, 1); /* 0x30003295: push 1 */
   9037     PUSH32(esp, eax); /* 0x30003297: push eax */
   9038     ecx = esi; /* 0x30003298: mov ecx, esi */
   9039     MEM32(ebp + 0x14) = eax; /* 0x3000329A: mov dword ptr [ebp + 0x14], eax */
   9040     RECOMP_ICALL(0x30005340u); /* 0x3000329D: call 0x30005340 */ /* not lifted */
   9041     RECOMP_FLAGS_IN();
   9042     edx = MEM32(ebp + 0x14); /* 0x300032A2: mov edx, dword ptr [ebp + 0x14] */
   9043     eax = MEM32(esi + 0x8); /* 0x300032A5: mov eax, dword ptr [esi + 8] */
   9044     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4);
   9045     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9046     edx = edx + 4; /* 0x300032A8: add edx, 4 */
   9047     _flag_k = FK_ADD;
   9048     PUSH32(esp, edx); /* 0x300032AB: push edx */
   9049     PUSH32(esp, eax); /* 0x300032AC: push eax */
   9050     PUSH32(esp, edi); /* 0x300032AD: push edi */
   9051     ecx = esi; /* 0x300032AE: mov ecx, esi */
   9052     RECOMP_ICALL(0x30012BB0u); /* 0x300032B0: call 0x30012bb0 */ /* not lifted */
   9053     RECOMP_FLAGS_IN();
   9054     ecx = MEM32(esi + 0x8); /* 0x300032B5: mov ecx, dword ptr [esi + 8] */
   9055     edx = MEM32(esi + 0x4); /* 0x300032B8: mov edx, dword ptr [esi + 4] */
   9056     PUSH32(esp, ecx); /* 0x300032BB: push ecx */
   9057     PUSH32(esp, edx); /* 0x300032BC: push edx */
   9058     ecx = esi; /* 0x300032BD: mov ecx, esi */
   9059     RECOMP_ICALL(0x3000EC10u); /* 0x300032BF: call 0x3000ec10 */ /* not lifted */
   9060     RECOMP_FLAGS_IN();
   9061     eax = MEM32(esi + 0x4); /* 0x300032C4: mov eax, dword ptr [esi + 4] */
   9062     PUSH32(esp, eax); /* 0x300032C7: push eax */
   9063     RECOMP_ICALL(0x30018080u); /* 0x300032C8: call 0x30018080 */ /* not lifted */
   9064     RECOMP_FLAGS_IN();
   9065     ecx = MEM32(ebp + (-0x10)); /* 0x300032CD: mov ecx, dword ptr [ebp - 0x10] */
   9066     edx = ebx + ecx * 4; /* 0x300032D0: lea edx, [ebx + ecx*4] */
   9067     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   9068     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9069     esp = esp + 4; /* 0x300032D3: add esp, 4 */
   9070     _flag_k = FK_ADD;
   9071     ecx = esi; /* 0x300032D6: mov ecx, esi */
   9072     MEM32(esi + 0xC) = edx; /* 0x300032D8: mov dword ptr [esi + 0xc], edx */
   9073     RECOMP_ICALL(0x3000E9A0u); /* 0x300032DB: call 0x3000e9a0 */ /* not lifted */
   9074     RECOMP_FLAGS_IN();
   9075     eax = ebx + eax * 4 + 0x4; /* 0x300032E0: lea eax, [ebx + eax*4 + 4] */
   9076     MEM32(esi + 0x4) = ebx; /* 0x300032E4: mov dword ptr [esi + 4], ebx */
   9077     ebx = MEM32(ebp + (-0x14)); /* 0x300032E7: mov ebx, dword ptr [ebp - 0x14] */
   9078     MEM32(esi + 0x8) = eax; /* 0x300032EA: mov dword ptr [esi + 8], eax */
   9079     goto L_3000337E; /* 0x300032ED: jmp 0x3000337e */
   9080 L_300032F2:
   9081     eax = edi; /* 0x300032F2: mov eax, edi */
   9082     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   9083     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9084     eax = eax - edi; /* 0x300032F4: sub eax, edi */
   9085     _flag_k = FK_CMP;
   9086     if (2u) _cf = (((eax) >> 1) & 1u); /* 0x300032F6: sar eax, 2 */
   9087     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   9088     eax = (uint32_t)((int32_t)eax >> 2u);
   9089     /* cmp eax, 1 */ /* 0x300032F9: cmp eax, 1 */
   9090     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   9091     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9092     _flag_k = FK_CMP;
   9093     if (CMP_AE(_flag_a, _flag_b)) goto L_3000333E; /* 0x300032FC: jae 0x3000333e */
   9094 L_300032FE:
   9095     ecx = edi + 0x4; /* 0x300032FE: lea ecx, [edi + 4] */
   9096     PUSH32(esp, ecx); /* 0x30003301: push ecx */
   9097     PUSH32(esp, edi); /* 0x30003302: push edi */
   9098     PUSH32(esp, edi); /* 0x30003303: push edi */
   9099     ecx = esi; /* 0x30003304: mov ecx, esi */
   9100     RECOMP_ICALL(0x30012BB0u); /* 0x30003306: call 0x30012bb0 */ /* not lifted */
   9101     RECOMP_FLAGS_IN();
   9102     eax = MEM32(esi + 0x8); /* 0x3000330B: mov eax, dword ptr [esi + 8] */
   9103     ecx = eax; /* 0x3000330E: mov ecx, eax */
   9104     edx = ebp + 0x8; /* 0x30003310: lea edx, [ebp + 8] */
   9105     PUSH32(esp, edx); /* 0x30003313: push edx */
   9106     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   9107     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9108     ecx = ecx - edi; /* 0x30003314: sub ecx, edi */
   9109     _flag_k = FK_CMP;
   9110     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003316: sar ecx, 2 */
   9111     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   9112     ecx = (uint32_t)((int32_t)ecx >> 2u);
   9113     edx = 1; /* 0x30003319: mov edx, 1 */
   9114     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   9115     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9116     edx = edx - ecx; /* 0x3000331E: sub edx, ecx */
   9117     _flag_k = FK_CMP;
   9118     PUSH32(esp, edx); /* 0x30003320: push edx */
   9119     PUSH32(esp, eax); /* 0x30003321: push eax */
   9120     ecx = esi; /* 0x30003322: mov ecx, esi */
   9121     RECOMP_ICALL(0x30005340u); /* 0x30003324: call 0x30005340 */ /* not lifted */
   9122     RECOMP_FLAGS_IN();
   9123     eax = MEM32(esi + 0x8); /* 0x30003329: mov eax, dword ptr [esi + 8] */
   9124     /* cmp edi, eax */ /* 0x3000332C: cmp edi, eax */
   9125     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9126     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9127     _flag_k = FK_CMP;
   9128     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000337A; /* 0x3000332E: je 0x3000337a */
   9129 L_30003330:
   9130     ecx = MEM32(ebp + 0x8); /* 0x30003330: mov ecx, dword ptr [ebp + 8] */
   9131     MEM32(edi) = ecx; /* 0x30003333: mov dword ptr [edi], ecx */
   9132     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
   9133     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9134     edi = edi + 4; /* 0x30003335: add edi, 4 */
   9135     _flag_k = FK_ADD;
   9136     /* cmp edi, eax */ /* 0x30003338: cmp edi, eax */
   9137     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9138     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9139     _flag_k = FK_CMP;
   9140     RECOMP_BACKEDGE();
   9141     if (CMP_NE(_flag_a, _flag_b)) goto L_30003330; /* 0x3000333A: jne 0x30003330 */
   9142 L_3000333C:
   9143     goto L_3000337A; /* 0x3000333C: jmp 0x3000337a */
   9144 L_3000333E:
   9145     PUSH32(esp, edi); /* 0x3000333E: push edi */
   9146     eax = edi + (-0x4); /* 0x3000333F: lea eax, [edi - 4] */
   9147     PUSH32(esp, edi); /* 0x30003342: push edi */
   9148     PUSH32(esp, eax); /* 0x30003343: push eax */
   9149     ecx = esi; /* 0x30003344: mov ecx, esi */
   9150     MEM32(ebp + 0x14) = eax; /* 0x30003346: mov dword ptr [ebp + 0x14], eax */
   9151     RECOMP_ICALL(0x30012BB0u); /* 0x30003349: call 0x30012bb0 */ /* not lifted */
   9152     RECOMP_FLAGS_IN();
   9153     ecx = MEM32(esi + 0x8); /* 0x3000334E: mov ecx, dword ptr [esi + 8] */
   9154     eax = ecx + (-0x4); /* 0x30003351: lea eax, [ecx - 4] */
   9155     /* cmp edi, eax */ /* 0x30003354: cmp edi, eax */
   9156     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9157     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9158     _flag_k = FK_CMP;
   9159     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003367; /* 0x30003356: je 0x30003367 */
   9160 L_30003358:
   9161     edx = MEM32(eax + (-0x4)); /* 0x30003358: mov edx, dword ptr [eax - 4] */
   9162     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
   9163     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9164     eax = eax - 4; /* 0x3000335B: sub eax, 4 */
   9165     _flag_k = FK_CMP;
   9166     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4);
   9167     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9168     ecx = ecx - 4; /* 0x3000335E: sub ecx, 4 */
   9169     _flag_k = FK_CMP;
   9170     /* cmp eax, edi */ /* 0x30003361: cmp eax, edi */
   9171     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   9172     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9173     _flag_k = FK_CMP;
   9174     MEM32(ecx) = edx; /* 0x30003363: mov dword ptr [ecx], edx */
   9175     RECOMP_BACKEDGE();
   9176     if (CMP_NE(_flag_a, _flag_b)) goto L_30003358; /* 0x30003365: jne 0x30003358 */
   9177 L_30003367:
   9178     eax = edi + 0x4; /* 0x30003367: lea eax, [edi + 4] */
   9179     /* cmp edi, eax */ /* 0x3000336A: cmp edi, eax */
   9180     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9181     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9182     _flag_k = FK_CMP;
   9183     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000337A; /* 0x3000336C: je 0x3000337a */
   9184 L_3000336E:
   9185     ecx = MEM32(ebp + 0x8); /* 0x3000336E: mov ecx, dword ptr [ebp + 8] */
   9186     MEM32(edi) = ecx; /* 0x30003371: mov dword ptr [edi], ecx */
   9187     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
   9188     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9189     edi = edi + 4; /* 0x30003373: add edi, 4 */
   9190     _flag_k = FK_ADD;
   9191     /* cmp edi, eax */ /* 0x30003376: cmp edi, eax */
   9192     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9193     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9194     _flag_k = FK_CMP;
   9195     RECOMP_BACKEDGE();
   9196     if (CMP_NE(_flag_a, _flag_b)) goto L_3000336E; /* 0x30003378: jne 0x3000336e */
   9197 L_3000337A:
   9198     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(4);
   9199     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9200     MEM32(esi + 0x8) = MEM32(esi + 0x8) + 4; /* 0x3000337A: add dword ptr [esi + 8], 4 */
   9201     _flag_k = FK_ADD;
   9202 L_3000337E:
   9203     edx = MEM32(ebx + 0x14); /* 0x3000337E: mov edx, dword ptr [ebx + 0x14] */
   9204     edx = (uint32_t)((int32_t)edx * (int32_t)MEM32(ebp + 0xC)); /* 0x30003381: imul edx, dword ptr [ebp + 0xc] */
   9205     eax = MEM32(ebp + 0x10); /* 0x30003385: mov eax, dword ptr [ebp + 0x10] */
   9206     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   9207     eax = eax + 1; /* 0x30003388: inc eax */
   9208     _flag_k = FK_INC;
   9209     /* cmp eax, edx */ /* 0x30003389: cmp eax, edx */
   9210     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   9211     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9212     _flag_k = FK_CMP;
   9213     MEM32(ebp + 0x10) = eax; /* 0x3000338B: mov dword ptr [ebp + 0x10], eax */
   9214     RECOMP_BACKEDGE();
   9215     if (CMP_L(_flag_a, _flag_b)) goto L_3000322D; /* 0x3000338E: jl 0x3000322d */
   9216 L_30003394:
   9217     fp_push((double)(int32_t)MEM32(ebx + 0x14)); /* 0x30003394: fild dword ptr [ebx + 0x14] */
   9218     ecx = MEM32(ebp + (-0xC)); /* 0x30003397: mov ecx, dword ptr [ebp - 0xc] */
   9219     edi = POP32_VAL(esp); /* 0x3000339A: pop edi */
   9220     esi = POP32_VAL(esp); /* 0x3000339B: pop esi */
   9221     _st[0] = (double)*(float*)ADDR(ebx + 0x1C) / _st[0]; /* 0x3000339C: fdivr dword ptr [ebx + 0x1c] */
   9222     eax = ebx; /* 0x3000339F: mov eax, ebx */
   9223     { float _v = (float)fp_pop(); *(float*)ADDR(ebx + 0x24) = _v; } /* 0x300033A1: fstp dword ptr [ebx + 0x24] */
   9224     fp_push((double)(int32_t)MEM32(ebx + 0x18)); /* 0x300033A4: fild dword ptr [ebx + 0x18] */
   9225     _st[0] = (double)*(float*)ADDR(ebx + 0x20) / _st[0]; /* 0x300033A7: fdivr dword ptr [ebx + 0x20] */
   9226     { float _v = (float)fp_pop(); *(float*)ADDR(ebx + 0x28) = _v; } /* 0x300033AA: fstp dword ptr [ebx + 0x28] */
   9227     ebx = POP32_VAL(esp); /* 0x300033AD: pop ebx */
   9228     MEM32(FS_BASE + (0)) = ecx; /* 0x300033AE: mov dword ptr fs:[0], ecx */
   9229     esp = ebp; /* 0x300033B5: mov esp, ebp */
   9230     ebp = POP32_VAL(esp); /* 0x300033B7: pop ebp */
   9231     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x300033B8: ret 0x10 */
   9232     RECOMP_REGS_OUT();
   9233 }
   9234 
   9235 void sub_3000322D(void) {
   9236     int _fpu_cmp = 0;
   9237     uint32_t _cf = 0;
   9238     int _df = 1;
   9239     uint32_t _flag_k = FK_NONE;
   9240     uint32_t _flag_a = 0, _flag_b = 0;
   9241     uint32_t _itail_tgt = 0;
   9242     RECOMP_REGS_LOCALS
   9243     RECOMP_ENTER(0x3000322Du);
   9244 
   9245 L_3000322D:
   9246     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   9247     edx = 0; /* 0x3000322D: xor edx, edx */
   9248     _cf = 0;
   9249     _flag_k = FK_TEST;
   9250     edi = MEM32(esi + 0x8); /* 0x3000322F: mov edi, dword ptr [esi + 8] */
   9251     ecx = MEM32(esi + 0xC); /* 0x30003232: mov ecx, dword ptr [esi + 0xc] */
   9252     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   9253     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9254     ecx = ecx - edi; /* 0x30003235: sub ecx, edi */
   9255     _flag_k = FK_CMP;
   9256     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003237: sar ecx, 2 */
   9257     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   9258     ecx = (uint32_t)((int32_t)ecx >> 2u);
   9259     /* cmp ecx, 1 */ /* 0x3000323A: cmp ecx, 1 */
   9260     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   9261     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9262     _flag_k = FK_CMP;
   9263     MEM32(ebp + 0x8) = edx; /* 0x3000323D: mov dword ptr [ebp + 8], edx */
   9264     if (CMP_AE(_flag_a, _flag_b)) goto L_300032F2; /* 0x30003240: jae 0x300032f2 */
   9265 L_30003246:
   9266     ecx = esi; /* 0x30003246: mov ecx, esi */
   9267     RECOMP_ICALL(0x3000E9A0u); /* 0x30003248: call 0x3000e9a0 */ /* not lifted */
   9268     RECOMP_FLAGS_IN();
   9269     /* cmp eax, 1 */ /* 0x3000324D: cmp eax, 1 */
   9270     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   9271     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9272     _flag_k = FK_CMP;
   9273     if (CMP_BE(_flag_a, _flag_b)) goto L_3000325D; /* 0x30003250: jbe 0x3000325d */
   9274 L_30003252:
   9275     ecx = esi; /* 0x30003252: mov ecx, esi */
   9276     RECOMP_ICALL(0x3000E9A0u); /* 0x30003254: call 0x3000e9a0 */ /* not lifted */
   9277     RECOMP_FLAGS_IN();
   9278     ebx = eax; /* 0x30003259: mov ebx, eax */
   9279     goto L_30003262; /* 0x3000325B: jmp 0x30003262 */
   9280 L_3000325D:
   9281     ebx = 1; /* 0x3000325D: mov ebx, 1 */
   9282 L_30003262:
   9283     ecx = esi; /* 0x30003262: mov ecx, esi */
   9284     RECOMP_ICALL(0x3000E9A0u); /* 0x30003264: call 0x3000e9a0 */ /* not lifted */
   9285     RECOMP_FLAGS_IN();
   9286     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   9287     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9288     eax = eax + ebx; /* 0x30003269: add eax, ebx */
   9289     _flag_k = FK_ADD;
   9290     MEM32(ebp + (-0x10)) = eax; /* 0x3000326B: mov dword ptr [ebp - 0x10], eax */
   9291     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_NS)) goto L_30003272; /* 0x3000326E: jns 0x30003272 */
   9292 L_30003270:
   9293     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   9294     eax = 0; /* 0x30003270: xor eax, eax */
   9295     _cf = 0;
   9296     _flag_k = FK_TEST;
   9297 L_30003272:
   9298     edx = eax * 4; /* 0x30003272: lea edx, [eax*4] */
   9299     PUSH32(esp, edx); /* 0x30003279: push edx */
   9300     RECOMP_ICALL(0x300180A8u); /* 0x3000327A: call 0x300180a8 */ /* not lifted */
   9301     RECOMP_FLAGS_IN();
   9302     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   9303     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9304     esp = esp + 4; /* 0x3000327F: add esp, 4 */
   9305     _flag_k = FK_ADD;
   9306     ebx = eax; /* 0x30003282: mov ebx, eax */
   9307     eax = MEM32(esi + 0x4); /* 0x30003284: mov eax, dword ptr [esi + 4] */
   9308     PUSH32(esp, ebx); /* 0x30003287: push ebx */
   9309     PUSH32(esp, edi); /* 0x30003288: push edi */
   9310     PUSH32(esp, eax); /* 0x30003289: push eax */
   9311     ecx = esi; /* 0x3000328A: mov ecx, esi */
   9312     RECOMP_ICALL(0x30012BB0u); /* 0x3000328C: call 0x30012bb0 */ /* not lifted */
   9313     RECOMP_FLAGS_IN();
   9314     ecx = ebp + 0x8; /* 0x30003291: lea ecx, [ebp + 8] */
   9315     PUSH32(esp, ecx); /* 0x30003294: push ecx */
   9316     PUSH32(esp, 1); /* 0x30003295: push 1 */
   9317     PUSH32(esp, eax); /* 0x30003297: push eax */
   9318     ecx = esi; /* 0x30003298: mov ecx, esi */
   9319     MEM32(ebp + 0x14) = eax; /* 0x3000329A: mov dword ptr [ebp + 0x14], eax */
   9320     RECOMP_ICALL(0x30005340u); /* 0x3000329D: call 0x30005340 */ /* not lifted */
   9321     RECOMP_FLAGS_IN();
   9322     edx = MEM32(ebp + 0x14); /* 0x300032A2: mov edx, dword ptr [ebp + 0x14] */
   9323     eax = MEM32(esi + 0x8); /* 0x300032A5: mov eax, dword ptr [esi + 8] */
   9324     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4);
   9325     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9326     edx = edx + 4; /* 0x300032A8: add edx, 4 */
   9327     _flag_k = FK_ADD;
   9328     PUSH32(esp, edx); /* 0x300032AB: push edx */
   9329     PUSH32(esp, eax); /* 0x300032AC: push eax */
   9330     PUSH32(esp, edi); /* 0x300032AD: push edi */
   9331     ecx = esi; /* 0x300032AE: mov ecx, esi */
   9332     RECOMP_ICALL(0x30012BB0u); /* 0x300032B0: call 0x30012bb0 */ /* not lifted */
   9333     RECOMP_FLAGS_IN();
   9334     ecx = MEM32(esi + 0x8); /* 0x300032B5: mov ecx, dword ptr [esi + 8] */
   9335     edx = MEM32(esi + 0x4); /* 0x300032B8: mov edx, dword ptr [esi + 4] */
   9336     PUSH32(esp, ecx); /* 0x300032BB: push ecx */
   9337     PUSH32(esp, edx); /* 0x300032BC: push edx */
   9338     ecx = esi; /* 0x300032BD: mov ecx, esi */
   9339     RECOMP_ICALL(0x3000EC10u); /* 0x300032BF: call 0x3000ec10 */ /* not lifted */
   9340     RECOMP_FLAGS_IN();
   9341     eax = MEM32(esi + 0x4); /* 0x300032C4: mov eax, dword ptr [esi + 4] */
   9342     PUSH32(esp, eax); /* 0x300032C7: push eax */
   9343     RECOMP_ICALL(0x30018080u); /* 0x300032C8: call 0x30018080 */ /* not lifted */
   9344     RECOMP_FLAGS_IN();
   9345     ecx = MEM32(ebp + (-0x10)); /* 0x300032CD: mov ecx, dword ptr [ebp - 0x10] */
   9346     edx = ebx + ecx * 4; /* 0x300032D0: lea edx, [ebx + ecx*4] */
   9347     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   9348     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9349     esp = esp + 4; /* 0x300032D3: add esp, 4 */
   9350     _flag_k = FK_ADD;
   9351     ecx = esi; /* 0x300032D6: mov ecx, esi */
   9352     MEM32(esi + 0xC) = edx; /* 0x300032D8: mov dword ptr [esi + 0xc], edx */
   9353     RECOMP_ICALL(0x3000E9A0u); /* 0x300032DB: call 0x3000e9a0 */ /* not lifted */
   9354     RECOMP_FLAGS_IN();
   9355     eax = ebx + eax * 4 + 0x4; /* 0x300032E0: lea eax, [ebx + eax*4 + 4] */
   9356     MEM32(esi + 0x4) = ebx; /* 0x300032E4: mov dword ptr [esi + 4], ebx */
   9357     ebx = MEM32(ebp + (-0x14)); /* 0x300032E7: mov ebx, dword ptr [ebp - 0x14] */
   9358     MEM32(esi + 0x8) = eax; /* 0x300032EA: mov dword ptr [esi + 8], eax */
   9359     goto L_3000337E; /* 0x300032ED: jmp 0x3000337e */
   9360 L_300032F2:
   9361     eax = edi; /* 0x300032F2: mov eax, edi */
   9362     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   9363     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9364     eax = eax - edi; /* 0x300032F4: sub eax, edi */
   9365     _flag_k = FK_CMP;
   9366     if (2u) _cf = (((eax) >> 1) & 1u); /* 0x300032F6: sar eax, 2 */
   9367     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   9368     eax = (uint32_t)((int32_t)eax >> 2u);
   9369     /* cmp eax, 1 */ /* 0x300032F9: cmp eax, 1 */
   9370     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   9371     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9372     _flag_k = FK_CMP;
   9373     if (CMP_AE(_flag_a, _flag_b)) goto L_3000333E; /* 0x300032FC: jae 0x3000333e */
   9374 L_300032FE:
   9375     ecx = edi + 0x4; /* 0x300032FE: lea ecx, [edi + 4] */
   9376     PUSH32(esp, ecx); /* 0x30003301: push ecx */
   9377     PUSH32(esp, edi); /* 0x30003302: push edi */
   9378     PUSH32(esp, edi); /* 0x30003303: push edi */
   9379     ecx = esi; /* 0x30003304: mov ecx, esi */
   9380     RECOMP_ICALL(0x30012BB0u); /* 0x30003306: call 0x30012bb0 */ /* not lifted */
   9381     RECOMP_FLAGS_IN();
   9382     eax = MEM32(esi + 0x8); /* 0x3000330B: mov eax, dword ptr [esi + 8] */
   9383     ecx = eax; /* 0x3000330E: mov ecx, eax */
   9384     edx = ebp + 0x8; /* 0x30003310: lea edx, [ebp + 8] */
   9385     PUSH32(esp, edx); /* 0x30003313: push edx */
   9386     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   9387     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9388     ecx = ecx - edi; /* 0x30003314: sub ecx, edi */
   9389     _flag_k = FK_CMP;
   9390     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003316: sar ecx, 2 */
   9391     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   9392     ecx = (uint32_t)((int32_t)ecx >> 2u);
   9393     edx = 1; /* 0x30003319: mov edx, 1 */
   9394     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   9395     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9396     edx = edx - ecx; /* 0x3000331E: sub edx, ecx */
   9397     _flag_k = FK_CMP;
   9398     PUSH32(esp, edx); /* 0x30003320: push edx */
   9399     PUSH32(esp, eax); /* 0x30003321: push eax */
   9400     ecx = esi; /* 0x30003322: mov ecx, esi */
   9401     RECOMP_ICALL(0x30005340u); /* 0x30003324: call 0x30005340 */ /* not lifted */
   9402     RECOMP_FLAGS_IN();
   9403     eax = MEM32(esi + 0x8); /* 0x30003329: mov eax, dword ptr [esi + 8] */
   9404     /* cmp edi, eax */ /* 0x3000332C: cmp edi, eax */
   9405     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9406     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9407     _flag_k = FK_CMP;
   9408     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000337A; /* 0x3000332E: je 0x3000337a */
   9409 L_30003330:
   9410     ecx = MEM32(ebp + 0x8); /* 0x30003330: mov ecx, dword ptr [ebp + 8] */
   9411     MEM32(edi) = ecx; /* 0x30003333: mov dword ptr [edi], ecx */
   9412     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
   9413     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9414     edi = edi + 4; /* 0x30003335: add edi, 4 */
   9415     _flag_k = FK_ADD;
   9416     /* cmp edi, eax */ /* 0x30003338: cmp edi, eax */
   9417     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9418     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9419     _flag_k = FK_CMP;
   9420     RECOMP_BACKEDGE();
   9421     if (CMP_NE(_flag_a, _flag_b)) goto L_30003330; /* 0x3000333A: jne 0x30003330 */
   9422 L_3000333C:
   9423     goto L_3000337A; /* 0x3000333C: jmp 0x3000337a */
   9424 L_3000333E:
   9425     PUSH32(esp, edi); /* 0x3000333E: push edi */
   9426     eax = edi + (-0x4); /* 0x3000333F: lea eax, [edi - 4] */
   9427     PUSH32(esp, edi); /* 0x30003342: push edi */
   9428     PUSH32(esp, eax); /* 0x30003343: push eax */
   9429     ecx = esi; /* 0x30003344: mov ecx, esi */
   9430     MEM32(ebp + 0x14) = eax; /* 0x30003346: mov dword ptr [ebp + 0x14], eax */
   9431     RECOMP_ICALL(0x30012BB0u); /* 0x30003349: call 0x30012bb0 */ /* not lifted */
   9432     RECOMP_FLAGS_IN();
   9433     ecx = MEM32(esi + 0x8); /* 0x3000334E: mov ecx, dword ptr [esi + 8] */
   9434     eax = ecx + (-0x4); /* 0x30003351: lea eax, [ecx - 4] */
   9435     /* cmp edi, eax */ /* 0x30003354: cmp edi, eax */
   9436     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9437     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9438     _flag_k = FK_CMP;
   9439     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003367; /* 0x30003356: je 0x30003367 */
   9440 L_30003358:
   9441     edx = MEM32(eax + (-0x4)); /* 0x30003358: mov edx, dword ptr [eax - 4] */
   9442     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
   9443     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9444     eax = eax - 4; /* 0x3000335B: sub eax, 4 */
   9445     _flag_k = FK_CMP;
   9446     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4);
   9447     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9448     ecx = ecx - 4; /* 0x3000335E: sub ecx, 4 */
   9449     _flag_k = FK_CMP;
   9450     /* cmp eax, edi */ /* 0x30003361: cmp eax, edi */
   9451     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   9452     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9453     _flag_k = FK_CMP;
   9454     MEM32(ecx) = edx; /* 0x30003363: mov dword ptr [ecx], edx */
   9455     RECOMP_BACKEDGE();
   9456     if (CMP_NE(_flag_a, _flag_b)) goto L_30003358; /* 0x30003365: jne 0x30003358 */
   9457 L_30003367:
   9458     eax = edi + 0x4; /* 0x30003367: lea eax, [edi + 4] */
   9459     /* cmp edi, eax */ /* 0x3000336A: cmp edi, eax */
   9460     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9461     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9462     _flag_k = FK_CMP;
   9463     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000337A; /* 0x3000336C: je 0x3000337a */
   9464 L_3000336E:
   9465     ecx = MEM32(ebp + 0x8); /* 0x3000336E: mov ecx, dword ptr [ebp + 8] */
   9466     MEM32(edi) = ecx; /* 0x30003371: mov dword ptr [edi], ecx */
   9467     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
   9468     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9469     edi = edi + 4; /* 0x30003373: add edi, 4 */
   9470     _flag_k = FK_ADD;
   9471     /* cmp edi, eax */ /* 0x30003376: cmp edi, eax */
   9472     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9473     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9474     _flag_k = FK_CMP;
   9475     RECOMP_BACKEDGE();
   9476     if (CMP_NE(_flag_a, _flag_b)) goto L_3000336E; /* 0x30003378: jne 0x3000336e */
   9477 L_3000337A:
   9478     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(4);
   9479     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9480     MEM32(esi + 0x8) = MEM32(esi + 0x8) + 4; /* 0x3000337A: add dword ptr [esi + 8], 4 */
   9481     _flag_k = FK_ADD;
   9482 L_3000337E:
   9483     edx = MEM32(ebx + 0x14); /* 0x3000337E: mov edx, dword ptr [ebx + 0x14] */
   9484     edx = (uint32_t)((int32_t)edx * (int32_t)MEM32(ebp + 0xC)); /* 0x30003381: imul edx, dword ptr [ebp + 0xc] */
   9485     eax = MEM32(ebp + 0x10); /* 0x30003385: mov eax, dword ptr [ebp + 0x10] */
   9486     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   9487     eax = eax + 1; /* 0x30003388: inc eax */
   9488     _flag_k = FK_INC;
   9489     /* cmp eax, edx */ /* 0x30003389: cmp eax, edx */
   9490     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   9491     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9492     _flag_k = FK_CMP;
   9493     MEM32(ebp + 0x10) = eax; /* 0x3000338B: mov dword ptr [ebp + 0x10], eax */
   9494     RECOMP_BACKEDGE();
   9495     if (CMP_L(_flag_a, _flag_b)) goto L_3000322D; /* 0x3000338E: jl 0x3000322d */
   9496 L_30003394:
   9497     fp_push((double)(int32_t)MEM32(ebx + 0x14)); /* 0x30003394: fild dword ptr [ebx + 0x14] */
   9498     ecx = MEM32(ebp + (-0xC)); /* 0x30003397: mov ecx, dword ptr [ebp - 0xc] */
   9499     edi = POP32_VAL(esp); /* 0x3000339A: pop edi */
   9500     esi = POP32_VAL(esp); /* 0x3000339B: pop esi */
   9501     _st[0] = (double)*(float*)ADDR(ebx + 0x1C) / _st[0]; /* 0x3000339C: fdivr dword ptr [ebx + 0x1c] */
   9502     eax = ebx; /* 0x3000339F: mov eax, ebx */
   9503     { float _v = (float)fp_pop(); *(float*)ADDR(ebx + 0x24) = _v; } /* 0x300033A1: fstp dword ptr [ebx + 0x24] */
   9504     fp_push((double)(int32_t)MEM32(ebx + 0x18)); /* 0x300033A4: fild dword ptr [ebx + 0x18] */
   9505     _st[0] = (double)*(float*)ADDR(ebx + 0x20) / _st[0]; /* 0x300033A7: fdivr dword ptr [ebx + 0x20] */
   9506     { float _v = (float)fp_pop(); *(float*)ADDR(ebx + 0x28) = _v; } /* 0x300033AA: fstp dword ptr [ebx + 0x28] */
   9507     ebx = POP32_VAL(esp); /* 0x300033AD: pop ebx */
   9508     MEM32(FS_BASE + (0)) = ecx; /* 0x300033AE: mov dword ptr fs:[0], ecx */
   9509     esp = ebp; /* 0x300033B5: mov esp, ebp */
   9510     ebp = POP32_VAL(esp); /* 0x300033B7: pop ebp */
   9511     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x300033B8: ret 0x10 */
   9512     RECOMP_REGS_OUT();
   9513 }
   9514 
   9515 void sub_30003262(void) {
   9516     int _fpu_cmp = 0;
   9517     uint32_t _cf = 0;
   9518     int _df = 1;
   9519     uint32_t _flag_k = FK_NONE;
   9520     uint32_t _flag_a = 0, _flag_b = 0;
   9521     uint32_t _itail_tgt = 0;
   9522     RECOMP_REGS_LOCALS
   9523     RECOMP_ENTER(0x30003262u);
   9524 
   9525     goto L_30003262;
   9526 L_3000322D:
   9527     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   9528     edx = 0; /* 0x3000322D: xor edx, edx */
   9529     _cf = 0;
   9530     _flag_k = FK_TEST;
   9531     edi = MEM32(esi + 0x8); /* 0x3000322F: mov edi, dword ptr [esi + 8] */
   9532     ecx = MEM32(esi + 0xC); /* 0x30003232: mov ecx, dword ptr [esi + 0xc] */
   9533     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   9534     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9535     ecx = ecx - edi; /* 0x30003235: sub ecx, edi */
   9536     _flag_k = FK_CMP;
   9537     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003237: sar ecx, 2 */
   9538     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   9539     ecx = (uint32_t)((int32_t)ecx >> 2u);
   9540     /* cmp ecx, 1 */ /* 0x3000323A: cmp ecx, 1 */
   9541     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   9542     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9543     _flag_k = FK_CMP;
   9544     MEM32(ebp + 0x8) = edx; /* 0x3000323D: mov dword ptr [ebp + 8], edx */
   9545     if (CMP_AE(_flag_a, _flag_b)) goto L_300032F2; /* 0x30003240: jae 0x300032f2 */
   9546 L_30003246:
   9547     ecx = esi; /* 0x30003246: mov ecx, esi */
   9548     RECOMP_ICALL(0x3000E9A0u); /* 0x30003248: call 0x3000e9a0 */ /* not lifted */
   9549     RECOMP_FLAGS_IN();
   9550     /* cmp eax, 1 */ /* 0x3000324D: cmp eax, 1 */
   9551     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   9552     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9553     _flag_k = FK_CMP;
   9554     if (CMP_BE(_flag_a, _flag_b)) goto L_3000325D; /* 0x30003250: jbe 0x3000325d */
   9555 L_30003252:
   9556     ecx = esi; /* 0x30003252: mov ecx, esi */
   9557     RECOMP_ICALL(0x3000E9A0u); /* 0x30003254: call 0x3000e9a0 */ /* not lifted */
   9558     RECOMP_FLAGS_IN();
   9559     ebx = eax; /* 0x30003259: mov ebx, eax */
   9560     goto L_30003262; /* 0x3000325B: jmp 0x30003262 */
   9561 L_3000325D:
   9562     ebx = 1; /* 0x3000325D: mov ebx, 1 */
   9563 L_30003262:
   9564     ecx = esi; /* 0x30003262: mov ecx, esi */
   9565     RECOMP_ICALL(0x3000E9A0u); /* 0x30003264: call 0x3000e9a0 */ /* not lifted */
   9566     RECOMP_FLAGS_IN();
   9567     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   9568     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9569     eax = eax + ebx; /* 0x30003269: add eax, ebx */
   9570     _flag_k = FK_ADD;
   9571     MEM32(ebp + (-0x10)) = eax; /* 0x3000326B: mov dword ptr [ebp - 0x10], eax */
   9572     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_NS)) goto L_30003272; /* 0x3000326E: jns 0x30003272 */
   9573 L_30003270:
   9574     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   9575     eax = 0; /* 0x30003270: xor eax, eax */
   9576     _cf = 0;
   9577     _flag_k = FK_TEST;
   9578 L_30003272:
   9579     edx = eax * 4; /* 0x30003272: lea edx, [eax*4] */
   9580     PUSH32(esp, edx); /* 0x30003279: push edx */
   9581     RECOMP_ICALL(0x300180A8u); /* 0x3000327A: call 0x300180a8 */ /* not lifted */
   9582     RECOMP_FLAGS_IN();
   9583     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   9584     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9585     esp = esp + 4; /* 0x3000327F: add esp, 4 */
   9586     _flag_k = FK_ADD;
   9587     ebx = eax; /* 0x30003282: mov ebx, eax */
   9588     eax = MEM32(esi + 0x4); /* 0x30003284: mov eax, dword ptr [esi + 4] */
   9589     PUSH32(esp, ebx); /* 0x30003287: push ebx */
   9590     PUSH32(esp, edi); /* 0x30003288: push edi */
   9591     PUSH32(esp, eax); /* 0x30003289: push eax */
   9592     ecx = esi; /* 0x3000328A: mov ecx, esi */
   9593     RECOMP_ICALL(0x30012BB0u); /* 0x3000328C: call 0x30012bb0 */ /* not lifted */
   9594     RECOMP_FLAGS_IN();
   9595     ecx = ebp + 0x8; /* 0x30003291: lea ecx, [ebp + 8] */
   9596     PUSH32(esp, ecx); /* 0x30003294: push ecx */
   9597     PUSH32(esp, 1); /* 0x30003295: push 1 */
   9598     PUSH32(esp, eax); /* 0x30003297: push eax */
   9599     ecx = esi; /* 0x30003298: mov ecx, esi */
   9600     MEM32(ebp + 0x14) = eax; /* 0x3000329A: mov dword ptr [ebp + 0x14], eax */
   9601     RECOMP_ICALL(0x30005340u); /* 0x3000329D: call 0x30005340 */ /* not lifted */
   9602     RECOMP_FLAGS_IN();
   9603     edx = MEM32(ebp + 0x14); /* 0x300032A2: mov edx, dword ptr [ebp + 0x14] */
   9604     eax = MEM32(esi + 0x8); /* 0x300032A5: mov eax, dword ptr [esi + 8] */
   9605     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4);
   9606     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9607     edx = edx + 4; /* 0x300032A8: add edx, 4 */
   9608     _flag_k = FK_ADD;
   9609     PUSH32(esp, edx); /* 0x300032AB: push edx */
   9610     PUSH32(esp, eax); /* 0x300032AC: push eax */
   9611     PUSH32(esp, edi); /* 0x300032AD: push edi */
   9612     ecx = esi; /* 0x300032AE: mov ecx, esi */
   9613     RECOMP_ICALL(0x30012BB0u); /* 0x300032B0: call 0x30012bb0 */ /* not lifted */
   9614     RECOMP_FLAGS_IN();
   9615     ecx = MEM32(esi + 0x8); /* 0x300032B5: mov ecx, dword ptr [esi + 8] */
   9616     edx = MEM32(esi + 0x4); /* 0x300032B8: mov edx, dword ptr [esi + 4] */
   9617     PUSH32(esp, ecx); /* 0x300032BB: push ecx */
   9618     PUSH32(esp, edx); /* 0x300032BC: push edx */
   9619     ecx = esi; /* 0x300032BD: mov ecx, esi */
   9620     RECOMP_ICALL(0x3000EC10u); /* 0x300032BF: call 0x3000ec10 */ /* not lifted */
   9621     RECOMP_FLAGS_IN();
   9622     eax = MEM32(esi + 0x4); /* 0x300032C4: mov eax, dword ptr [esi + 4] */
   9623     PUSH32(esp, eax); /* 0x300032C7: push eax */
   9624     RECOMP_ICALL(0x30018080u); /* 0x300032C8: call 0x30018080 */ /* not lifted */
   9625     RECOMP_FLAGS_IN();
   9626     ecx = MEM32(ebp + (-0x10)); /* 0x300032CD: mov ecx, dword ptr [ebp - 0x10] */
   9627     edx = ebx + ecx * 4; /* 0x300032D0: lea edx, [ebx + ecx*4] */
   9628     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   9629     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9630     esp = esp + 4; /* 0x300032D3: add esp, 4 */
   9631     _flag_k = FK_ADD;
   9632     ecx = esi; /* 0x300032D6: mov ecx, esi */
   9633     MEM32(esi + 0xC) = edx; /* 0x300032D8: mov dword ptr [esi + 0xc], edx */
   9634     RECOMP_ICALL(0x3000E9A0u); /* 0x300032DB: call 0x3000e9a0 */ /* not lifted */
   9635     RECOMP_FLAGS_IN();
   9636     eax = ebx + eax * 4 + 0x4; /* 0x300032E0: lea eax, [ebx + eax*4 + 4] */
   9637     MEM32(esi + 0x4) = ebx; /* 0x300032E4: mov dword ptr [esi + 4], ebx */
   9638     ebx = MEM32(ebp + (-0x14)); /* 0x300032E7: mov ebx, dword ptr [ebp - 0x14] */
   9639     MEM32(esi + 0x8) = eax; /* 0x300032EA: mov dword ptr [esi + 8], eax */
   9640     goto L_3000337E; /* 0x300032ED: jmp 0x3000337e */
   9641 L_300032F2:
   9642     eax = edi; /* 0x300032F2: mov eax, edi */
   9643     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   9644     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9645     eax = eax - edi; /* 0x300032F4: sub eax, edi */
   9646     _flag_k = FK_CMP;
   9647     if (2u) _cf = (((eax) >> 1) & 1u); /* 0x300032F6: sar eax, 2 */
   9648     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   9649     eax = (uint32_t)((int32_t)eax >> 2u);
   9650     /* cmp eax, 1 */ /* 0x300032F9: cmp eax, 1 */
   9651     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   9652     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9653     _flag_k = FK_CMP;
   9654     if (CMP_AE(_flag_a, _flag_b)) goto L_3000333E; /* 0x300032FC: jae 0x3000333e */
   9655 L_300032FE:
   9656     ecx = edi + 0x4; /* 0x300032FE: lea ecx, [edi + 4] */
   9657     PUSH32(esp, ecx); /* 0x30003301: push ecx */
   9658     PUSH32(esp, edi); /* 0x30003302: push edi */
   9659     PUSH32(esp, edi); /* 0x30003303: push edi */
   9660     ecx = esi; /* 0x30003304: mov ecx, esi */
   9661     RECOMP_ICALL(0x30012BB0u); /* 0x30003306: call 0x30012bb0 */ /* not lifted */
   9662     RECOMP_FLAGS_IN();
   9663     eax = MEM32(esi + 0x8); /* 0x3000330B: mov eax, dword ptr [esi + 8] */
   9664     ecx = eax; /* 0x3000330E: mov ecx, eax */
   9665     edx = ebp + 0x8; /* 0x30003310: lea edx, [ebp + 8] */
   9666     PUSH32(esp, edx); /* 0x30003313: push edx */
   9667     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   9668     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9669     ecx = ecx - edi; /* 0x30003314: sub ecx, edi */
   9670     _flag_k = FK_CMP;
   9671     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003316: sar ecx, 2 */
   9672     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   9673     ecx = (uint32_t)((int32_t)ecx >> 2u);
   9674     edx = 1; /* 0x30003319: mov edx, 1 */
   9675     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   9676     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9677     edx = edx - ecx; /* 0x3000331E: sub edx, ecx */
   9678     _flag_k = FK_CMP;
   9679     PUSH32(esp, edx); /* 0x30003320: push edx */
   9680     PUSH32(esp, eax); /* 0x30003321: push eax */
   9681     ecx = esi; /* 0x30003322: mov ecx, esi */
   9682     RECOMP_ICALL(0x30005340u); /* 0x30003324: call 0x30005340 */ /* not lifted */
   9683     RECOMP_FLAGS_IN();
   9684     eax = MEM32(esi + 0x8); /* 0x30003329: mov eax, dword ptr [esi + 8] */
   9685     /* cmp edi, eax */ /* 0x3000332C: cmp edi, eax */
   9686     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9687     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9688     _flag_k = FK_CMP;
   9689     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000337A; /* 0x3000332E: je 0x3000337a */
   9690 L_30003330:
   9691     ecx = MEM32(ebp + 0x8); /* 0x30003330: mov ecx, dword ptr [ebp + 8] */
   9692     MEM32(edi) = ecx; /* 0x30003333: mov dword ptr [edi], ecx */
   9693     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
   9694     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9695     edi = edi + 4; /* 0x30003335: add edi, 4 */
   9696     _flag_k = FK_ADD;
   9697     /* cmp edi, eax */ /* 0x30003338: cmp edi, eax */
   9698     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9699     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9700     _flag_k = FK_CMP;
   9701     RECOMP_BACKEDGE();
   9702     if (CMP_NE(_flag_a, _flag_b)) goto L_30003330; /* 0x3000333A: jne 0x30003330 */
   9703 L_3000333C:
   9704     goto L_3000337A; /* 0x3000333C: jmp 0x3000337a */
   9705 L_3000333E:
   9706     PUSH32(esp, edi); /* 0x3000333E: push edi */
   9707     eax = edi + (-0x4); /* 0x3000333F: lea eax, [edi - 4] */
   9708     PUSH32(esp, edi); /* 0x30003342: push edi */
   9709     PUSH32(esp, eax); /* 0x30003343: push eax */
   9710     ecx = esi; /* 0x30003344: mov ecx, esi */
   9711     MEM32(ebp + 0x14) = eax; /* 0x30003346: mov dword ptr [ebp + 0x14], eax */
   9712     RECOMP_ICALL(0x30012BB0u); /* 0x30003349: call 0x30012bb0 */ /* not lifted */
   9713     RECOMP_FLAGS_IN();
   9714     ecx = MEM32(esi + 0x8); /* 0x3000334E: mov ecx, dword ptr [esi + 8] */
   9715     eax = ecx + (-0x4); /* 0x30003351: lea eax, [ecx - 4] */
   9716     /* cmp edi, eax */ /* 0x30003354: cmp edi, eax */
   9717     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9718     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9719     _flag_k = FK_CMP;
   9720     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003367; /* 0x30003356: je 0x30003367 */
   9721 L_30003358:
   9722     edx = MEM32(eax + (-0x4)); /* 0x30003358: mov edx, dword ptr [eax - 4] */
   9723     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
   9724     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9725     eax = eax - 4; /* 0x3000335B: sub eax, 4 */
   9726     _flag_k = FK_CMP;
   9727     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4);
   9728     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9729     ecx = ecx - 4; /* 0x3000335E: sub ecx, 4 */
   9730     _flag_k = FK_CMP;
   9731     /* cmp eax, edi */ /* 0x30003361: cmp eax, edi */
   9732     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   9733     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9734     _flag_k = FK_CMP;
   9735     MEM32(ecx) = edx; /* 0x30003363: mov dword ptr [ecx], edx */
   9736     RECOMP_BACKEDGE();
   9737     if (CMP_NE(_flag_a, _flag_b)) goto L_30003358; /* 0x30003365: jne 0x30003358 */
   9738 L_30003367:
   9739     eax = edi + 0x4; /* 0x30003367: lea eax, [edi + 4] */
   9740     /* cmp edi, eax */ /* 0x3000336A: cmp edi, eax */
   9741     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9742     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9743     _flag_k = FK_CMP;
   9744     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000337A; /* 0x3000336C: je 0x3000337a */
   9745 L_3000336E:
   9746     ecx = MEM32(ebp + 0x8); /* 0x3000336E: mov ecx, dword ptr [ebp + 8] */
   9747     MEM32(edi) = ecx; /* 0x30003371: mov dword ptr [edi], ecx */
   9748     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
   9749     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9750     edi = edi + 4; /* 0x30003373: add edi, 4 */
   9751     _flag_k = FK_ADD;
   9752     /* cmp edi, eax */ /* 0x30003376: cmp edi, eax */
   9753     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9754     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9755     _flag_k = FK_CMP;
   9756     RECOMP_BACKEDGE();
   9757     if (CMP_NE(_flag_a, _flag_b)) goto L_3000336E; /* 0x30003378: jne 0x3000336e */
   9758 L_3000337A:
   9759     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(4);
   9760     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9761     MEM32(esi + 0x8) = MEM32(esi + 0x8) + 4; /* 0x3000337A: add dword ptr [esi + 8], 4 */
   9762     _flag_k = FK_ADD;
   9763 L_3000337E:
   9764     edx = MEM32(ebx + 0x14); /* 0x3000337E: mov edx, dword ptr [ebx + 0x14] */
   9765     edx = (uint32_t)((int32_t)edx * (int32_t)MEM32(ebp + 0xC)); /* 0x30003381: imul edx, dword ptr [ebp + 0xc] */
   9766     eax = MEM32(ebp + 0x10); /* 0x30003385: mov eax, dword ptr [ebp + 0x10] */
   9767     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   9768     eax = eax + 1; /* 0x30003388: inc eax */
   9769     _flag_k = FK_INC;
   9770     /* cmp eax, edx */ /* 0x30003389: cmp eax, edx */
   9771     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
   9772     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9773     _flag_k = FK_CMP;
   9774     MEM32(ebp + 0x10) = eax; /* 0x3000338B: mov dword ptr [ebp + 0x10], eax */
   9775     RECOMP_BACKEDGE();
   9776     if (CMP_L(_flag_a, _flag_b)) goto L_3000322D; /* 0x3000338E: jl 0x3000322d */
   9777 L_30003394:
   9778     fp_push((double)(int32_t)MEM32(ebx + 0x14)); /* 0x30003394: fild dword ptr [ebx + 0x14] */
   9779     ecx = MEM32(ebp + (-0xC)); /* 0x30003397: mov ecx, dword ptr [ebp - 0xc] */
   9780     edi = POP32_VAL(esp); /* 0x3000339A: pop edi */
   9781     esi = POP32_VAL(esp); /* 0x3000339B: pop esi */
   9782     _st[0] = (double)*(float*)ADDR(ebx + 0x1C) / _st[0]; /* 0x3000339C: fdivr dword ptr [ebx + 0x1c] */
   9783     eax = ebx; /* 0x3000339F: mov eax, ebx */
   9784     { float _v = (float)fp_pop(); *(float*)ADDR(ebx + 0x24) = _v; } /* 0x300033A1: fstp dword ptr [ebx + 0x24] */
   9785     fp_push((double)(int32_t)MEM32(ebx + 0x18)); /* 0x300033A4: fild dword ptr [ebx + 0x18] */
   9786     _st[0] = (double)*(float*)ADDR(ebx + 0x20) / _st[0]; /* 0x300033A7: fdivr dword ptr [ebx + 0x20] */
   9787     { float _v = (float)fp_pop(); *(float*)ADDR(ebx + 0x28) = _v; } /* 0x300033AA: fstp dword ptr [ebx + 0x28] */
   9788     ebx = POP32_VAL(esp); /* 0x300033AD: pop ebx */
   9789     MEM32(FS_BASE + (0)) = ecx; /* 0x300033AE: mov dword ptr fs:[0], ecx */
   9790     esp = ebp; /* 0x300033B5: mov esp, ebp */
   9791     ebp = POP32_VAL(esp); /* 0x300033B7: pop ebp */
   9792     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x300033B8: ret 0x10 */
   9793     RECOMP_REGS_OUT();
   9794 }
   9795 
   9796 void sub_300032F2(void) {
   9797     int _fpu_cmp = 0;
   9798     uint32_t _cf = 0;
   9799     int _df = 1;
   9800     uint32_t _flag_k = FK_NONE;
   9801     uint32_t _flag_a = 0, _flag_b = 0;
   9802     uint32_t _itail_tgt = 0;
   9803     RECOMP_REGS_LOCALS
   9804     RECOMP_ENTER(0x300032F2u);
   9805 
   9806     goto L_300032F2;
   9807 L_3000322D:
   9808     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   9809     edx = 0; /* 0x3000322D: xor edx, edx */
   9810     _cf = 0;
   9811     _flag_k = FK_TEST;
   9812     edi = MEM32(esi + 0x8); /* 0x3000322F: mov edi, dword ptr [esi + 8] */
   9813     ecx = MEM32(esi + 0xC); /* 0x30003232: mov ecx, dword ptr [esi + 0xc] */
   9814     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   9815     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9816     ecx = ecx - edi; /* 0x30003235: sub ecx, edi */
   9817     _flag_k = FK_CMP;
   9818     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003237: sar ecx, 2 */
   9819     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   9820     ecx = (uint32_t)((int32_t)ecx >> 2u);
   9821     /* cmp ecx, 1 */ /* 0x3000323A: cmp ecx, 1 */
   9822     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
   9823     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9824     _flag_k = FK_CMP;
   9825     MEM32(ebp + 0x8) = edx; /* 0x3000323D: mov dword ptr [ebp + 8], edx */
   9826     if (CMP_AE(_flag_a, _flag_b)) goto L_300032F2; /* 0x30003240: jae 0x300032f2 */
   9827 L_30003246:
   9828     ecx = esi; /* 0x30003246: mov ecx, esi */
   9829     RECOMP_ICALL(0x3000E9A0u); /* 0x30003248: call 0x3000e9a0 */ /* not lifted */
   9830     RECOMP_FLAGS_IN();
   9831     /* cmp eax, 1 */ /* 0x3000324D: cmp eax, 1 */
   9832     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   9833     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9834     _flag_k = FK_CMP;
   9835     if (CMP_BE(_flag_a, _flag_b)) goto L_3000325D; /* 0x30003250: jbe 0x3000325d */
   9836 L_30003252:
   9837     ecx = esi; /* 0x30003252: mov ecx, esi */
   9838     RECOMP_ICALL(0x3000E9A0u); /* 0x30003254: call 0x3000e9a0 */ /* not lifted */
   9839     RECOMP_FLAGS_IN();
   9840     ebx = eax; /* 0x30003259: mov ebx, eax */
   9841     goto L_30003262; /* 0x3000325B: jmp 0x30003262 */
   9842 L_3000325D:
   9843     ebx = 1; /* 0x3000325D: mov ebx, 1 */
   9844 L_30003262:
   9845     ecx = esi; /* 0x30003262: mov ecx, esi */
   9846     RECOMP_ICALL(0x3000E9A0u); /* 0x30003264: call 0x3000e9a0 */ /* not lifted */
   9847     RECOMP_FLAGS_IN();
   9848     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   9849     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9850     eax = eax + ebx; /* 0x30003269: add eax, ebx */
   9851     _flag_k = FK_ADD;
   9852     MEM32(ebp + (-0x10)) = eax; /* 0x3000326B: mov dword ptr [ebp - 0x10], eax */
   9853     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_NS)) goto L_30003272; /* 0x3000326E: jns 0x30003272 */
   9854 L_30003270:
   9855     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   9856     eax = 0; /* 0x30003270: xor eax, eax */
   9857     _cf = 0;
   9858     _flag_k = FK_TEST;
   9859 L_30003272:
   9860     edx = eax * 4; /* 0x30003272: lea edx, [eax*4] */
   9861     PUSH32(esp, edx); /* 0x30003279: push edx */
   9862     RECOMP_ICALL(0x300180A8u); /* 0x3000327A: call 0x300180a8 */ /* not lifted */
   9863     RECOMP_FLAGS_IN();
   9864     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   9865     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9866     esp = esp + 4; /* 0x3000327F: add esp, 4 */
   9867     _flag_k = FK_ADD;
   9868     ebx = eax; /* 0x30003282: mov ebx, eax */
   9869     eax = MEM32(esi + 0x4); /* 0x30003284: mov eax, dword ptr [esi + 4] */
   9870     PUSH32(esp, ebx); /* 0x30003287: push ebx */
   9871     PUSH32(esp, edi); /* 0x30003288: push edi */
   9872     PUSH32(esp, eax); /* 0x30003289: push eax */
   9873     ecx = esi; /* 0x3000328A: mov ecx, esi */
   9874     RECOMP_ICALL(0x30012BB0u); /* 0x3000328C: call 0x30012bb0 */ /* not lifted */
   9875     RECOMP_FLAGS_IN();
   9876     ecx = ebp + 0x8; /* 0x30003291: lea ecx, [ebp + 8] */
   9877     PUSH32(esp, ecx); /* 0x30003294: push ecx */
   9878     PUSH32(esp, 1); /* 0x30003295: push 1 */
   9879     PUSH32(esp, eax); /* 0x30003297: push eax */
   9880     ecx = esi; /* 0x30003298: mov ecx, esi */
   9881     MEM32(ebp + 0x14) = eax; /* 0x3000329A: mov dword ptr [ebp + 0x14], eax */
   9882     RECOMP_ICALL(0x30005340u); /* 0x3000329D: call 0x30005340 */ /* not lifted */
   9883     RECOMP_FLAGS_IN();
   9884     edx = MEM32(ebp + 0x14); /* 0x300032A2: mov edx, dword ptr [ebp + 0x14] */
   9885     eax = MEM32(esi + 0x8); /* 0x300032A5: mov eax, dword ptr [esi + 8] */
   9886     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4);
   9887     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9888     edx = edx + 4; /* 0x300032A8: add edx, 4 */
   9889     _flag_k = FK_ADD;
   9890     PUSH32(esp, edx); /* 0x300032AB: push edx */
   9891     PUSH32(esp, eax); /* 0x300032AC: push eax */
   9892     PUSH32(esp, edi); /* 0x300032AD: push edi */
   9893     ecx = esi; /* 0x300032AE: mov ecx, esi */
   9894     RECOMP_ICALL(0x30012BB0u); /* 0x300032B0: call 0x30012bb0 */ /* not lifted */
   9895     RECOMP_FLAGS_IN();
   9896     ecx = MEM32(esi + 0x8); /* 0x300032B5: mov ecx, dword ptr [esi + 8] */
   9897     edx = MEM32(esi + 0x4); /* 0x300032B8: mov edx, dword ptr [esi + 4] */
   9898     PUSH32(esp, ecx); /* 0x300032BB: push ecx */
   9899     PUSH32(esp, edx); /* 0x300032BC: push edx */
   9900     ecx = esi; /* 0x300032BD: mov ecx, esi */
   9901     RECOMP_ICALL(0x3000EC10u); /* 0x300032BF: call 0x3000ec10 */ /* not lifted */
   9902     RECOMP_FLAGS_IN();
   9903     eax = MEM32(esi + 0x4); /* 0x300032C4: mov eax, dword ptr [esi + 4] */
   9904     PUSH32(esp, eax); /* 0x300032C7: push eax */
   9905     RECOMP_ICALL(0x30018080u); /* 0x300032C8: call 0x30018080 */ /* not lifted */
   9906     RECOMP_FLAGS_IN();
   9907     ecx = MEM32(ebp + (-0x10)); /* 0x300032CD: mov ecx, dword ptr [ebp - 0x10] */
   9908     edx = ebx + ecx * 4; /* 0x300032D0: lea edx, [ebx + ecx*4] */
   9909     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   9910     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9911     esp = esp + 4; /* 0x300032D3: add esp, 4 */
   9912     _flag_k = FK_ADD;
   9913     ecx = esi; /* 0x300032D6: mov ecx, esi */
   9914     MEM32(esi + 0xC) = edx; /* 0x300032D8: mov dword ptr [esi + 0xc], edx */
   9915     RECOMP_ICALL(0x3000E9A0u); /* 0x300032DB: call 0x3000e9a0 */ /* not lifted */
   9916     RECOMP_FLAGS_IN();
   9917     eax = ebx + eax * 4 + 0x4; /* 0x300032E0: lea eax, [ebx + eax*4 + 4] */
   9918     MEM32(esi + 0x4) = ebx; /* 0x300032E4: mov dword ptr [esi + 4], ebx */
   9919     ebx = MEM32(ebp + (-0x14)); /* 0x300032E7: mov ebx, dword ptr [ebp - 0x14] */
   9920     MEM32(esi + 0x8) = eax; /* 0x300032EA: mov dword ptr [esi + 8], eax */
   9921     goto L_3000337E; /* 0x300032ED: jmp 0x3000337e */
   9922 L_300032F2:
   9923     eax = edi; /* 0x300032F2: mov eax, edi */
   9924     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   9925     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9926     eax = eax - edi; /* 0x300032F4: sub eax, edi */
   9927     _flag_k = FK_CMP;
   9928     if (2u) _cf = (((eax) >> 1) & 1u); /* 0x300032F6: sar eax, 2 */
   9929     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   9930     eax = (uint32_t)((int32_t)eax >> 2u);
   9931     /* cmp eax, 1 */ /* 0x300032F9: cmp eax, 1 */
   9932     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   9933     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9934     _flag_k = FK_CMP;
   9935     if (CMP_AE(_flag_a, _flag_b)) goto L_3000333E; /* 0x300032FC: jae 0x3000333e */
   9936 L_300032FE:
   9937     ecx = edi + 0x4; /* 0x300032FE: lea ecx, [edi + 4] */
   9938     PUSH32(esp, ecx); /* 0x30003301: push ecx */
   9939     PUSH32(esp, edi); /* 0x30003302: push edi */
   9940     PUSH32(esp, edi); /* 0x30003303: push edi */
   9941     ecx = esi; /* 0x30003304: mov ecx, esi */
   9942     RECOMP_ICALL(0x30012BB0u); /* 0x30003306: call 0x30012bb0 */ /* not lifted */
   9943     RECOMP_FLAGS_IN();
   9944     eax = MEM32(esi + 0x8); /* 0x3000330B: mov eax, dword ptr [esi + 8] */
   9945     ecx = eax; /* 0x3000330E: mov ecx, eax */
   9946     edx = ebp + 0x8; /* 0x30003310: lea edx, [ebp + 8] */
   9947     PUSH32(esp, edx); /* 0x30003313: push edx */
   9948     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
   9949     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9950     ecx = ecx - edi; /* 0x30003314: sub ecx, edi */
   9951     _flag_k = FK_CMP;
   9952     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003316: sar ecx, 2 */
   9953     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
   9954     ecx = (uint32_t)((int32_t)ecx >> 2u);
   9955     edx = 1; /* 0x30003319: mov edx, 1 */
   9956     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
   9957     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9958     edx = edx - ecx; /* 0x3000331E: sub edx, ecx */
   9959     _flag_k = FK_CMP;
   9960     PUSH32(esp, edx); /* 0x30003320: push edx */
   9961     PUSH32(esp, eax); /* 0x30003321: push eax */
   9962     ecx = esi; /* 0x30003322: mov ecx, esi */
   9963     RECOMP_ICALL(0x30005340u); /* 0x30003324: call 0x30005340 */ /* not lifted */
   9964     RECOMP_FLAGS_IN();
   9965     eax = MEM32(esi + 0x8); /* 0x30003329: mov eax, dword ptr [esi + 8] */
   9966     /* cmp edi, eax */ /* 0x3000332C: cmp edi, eax */
   9967     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9968     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9969     _flag_k = FK_CMP;
   9970     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000337A; /* 0x3000332E: je 0x3000337a */
   9971 L_30003330:
   9972     ecx = MEM32(ebp + 0x8); /* 0x30003330: mov ecx, dword ptr [ebp + 8] */
   9973     MEM32(edi) = ecx; /* 0x30003333: mov dword ptr [edi], ecx */
   9974     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
   9975     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   9976     edi = edi + 4; /* 0x30003335: add edi, 4 */
   9977     _flag_k = FK_ADD;
   9978     /* cmp edi, eax */ /* 0x30003338: cmp edi, eax */
   9979     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9980     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   9981     _flag_k = FK_CMP;
   9982     RECOMP_BACKEDGE();
   9983     if (CMP_NE(_flag_a, _flag_b)) goto L_30003330; /* 0x3000333A: jne 0x30003330 */
   9984 L_3000333C:
   9985     goto L_3000337A; /* 0x3000333C: jmp 0x3000337a */
   9986 L_3000333E:
   9987     PUSH32(esp, edi); /* 0x3000333E: push edi */
   9988     eax = edi + (-0x4); /* 0x3000333F: lea eax, [edi - 4] */
   9989     PUSH32(esp, edi); /* 0x30003342: push edi */
   9990     PUSH32(esp, eax); /* 0x30003343: push eax */
   9991     ecx = esi; /* 0x30003344: mov ecx, esi */
   9992     MEM32(ebp + 0x14) = eax; /* 0x30003346: mov dword ptr [ebp + 0x14], eax */
   9993     RECOMP_ICALL(0x30012BB0u); /* 0x30003349: call 0x30012bb0 */ /* not lifted */
   9994     RECOMP_FLAGS_IN();
   9995     ecx = MEM32(esi + 0x8); /* 0x3000334E: mov ecx, dword ptr [esi + 8] */
   9996     eax = ecx + (-0x4); /* 0x30003351: lea eax, [ecx - 4] */
   9997     /* cmp edi, eax */ /* 0x30003354: cmp edi, eax */
   9998     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   9999     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10000     _flag_k = FK_CMP;
  10001     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003367; /* 0x30003356: je 0x30003367 */
  10002 L_30003358:
  10003     edx = MEM32(eax + (-0x4)); /* 0x30003358: mov edx, dword ptr [eax - 4] */
  10004     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
  10005     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10006     eax = eax - 4; /* 0x3000335B: sub eax, 4 */
  10007     _flag_k = FK_CMP;
  10008     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4);
  10009     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10010     ecx = ecx - 4; /* 0x3000335E: sub ecx, 4 */
  10011     _flag_k = FK_CMP;
  10012     /* cmp eax, edi */ /* 0x30003361: cmp eax, edi */
  10013     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  10014     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10015     _flag_k = FK_CMP;
  10016     MEM32(ecx) = edx; /* 0x30003363: mov dword ptr [ecx], edx */
  10017     RECOMP_BACKEDGE();
  10018     if (CMP_NE(_flag_a, _flag_b)) goto L_30003358; /* 0x30003365: jne 0x30003358 */
  10019 L_30003367:
  10020     eax = edi + 0x4; /* 0x30003367: lea eax, [edi + 4] */
  10021     /* cmp edi, eax */ /* 0x3000336A: cmp edi, eax */
  10022     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10023     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10024     _flag_k = FK_CMP;
  10025     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000337A; /* 0x3000336C: je 0x3000337a */
  10026 L_3000336E:
  10027     ecx = MEM32(ebp + 0x8); /* 0x3000336E: mov ecx, dword ptr [ebp + 8] */
  10028     MEM32(edi) = ecx; /* 0x30003371: mov dword ptr [edi], ecx */
  10029     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
  10030     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10031     edi = edi + 4; /* 0x30003373: add edi, 4 */
  10032     _flag_k = FK_ADD;
  10033     /* cmp edi, eax */ /* 0x30003376: cmp edi, eax */
  10034     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10035     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10036     _flag_k = FK_CMP;
  10037     RECOMP_BACKEDGE();
  10038     if (CMP_NE(_flag_a, _flag_b)) goto L_3000336E; /* 0x30003378: jne 0x3000336e */
  10039 L_3000337A:
  10040     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(4);
  10041     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10042     MEM32(esi + 0x8) = MEM32(esi + 0x8) + 4; /* 0x3000337A: add dword ptr [esi + 8], 4 */
  10043     _flag_k = FK_ADD;
  10044 L_3000337E:
  10045     edx = MEM32(ebx + 0x14); /* 0x3000337E: mov edx, dword ptr [ebx + 0x14] */
  10046     edx = (uint32_t)((int32_t)edx * (int32_t)MEM32(ebp + 0xC)); /* 0x30003381: imul edx, dword ptr [ebp + 0xc] */
  10047     eax = MEM32(ebp + 0x10); /* 0x30003385: mov eax, dword ptr [ebp + 0x10] */
  10048     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  10049     eax = eax + 1; /* 0x30003388: inc eax */
  10050     _flag_k = FK_INC;
  10051     /* cmp eax, edx */ /* 0x30003389: cmp eax, edx */
  10052     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
  10053     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10054     _flag_k = FK_CMP;
  10055     MEM32(ebp + 0x10) = eax; /* 0x3000338B: mov dword ptr [ebp + 0x10], eax */
  10056     RECOMP_BACKEDGE();
  10057     if (CMP_L(_flag_a, _flag_b)) goto L_3000322D; /* 0x3000338E: jl 0x3000322d */
  10058 L_30003394:
  10059     fp_push((double)(int32_t)MEM32(ebx + 0x14)); /* 0x30003394: fild dword ptr [ebx + 0x14] */
  10060     ecx = MEM32(ebp + (-0xC)); /* 0x30003397: mov ecx, dword ptr [ebp - 0xc] */
  10061     edi = POP32_VAL(esp); /* 0x3000339A: pop edi */
  10062     esi = POP32_VAL(esp); /* 0x3000339B: pop esi */
  10063     _st[0] = (double)*(float*)ADDR(ebx + 0x1C) / _st[0]; /* 0x3000339C: fdivr dword ptr [ebx + 0x1c] */
  10064     eax = ebx; /* 0x3000339F: mov eax, ebx */
  10065     { float _v = (float)fp_pop(); *(float*)ADDR(ebx + 0x24) = _v; } /* 0x300033A1: fstp dword ptr [ebx + 0x24] */
  10066     fp_push((double)(int32_t)MEM32(ebx + 0x18)); /* 0x300033A4: fild dword ptr [ebx + 0x18] */
  10067     _st[0] = (double)*(float*)ADDR(ebx + 0x20) / _st[0]; /* 0x300033A7: fdivr dword ptr [ebx + 0x20] */
  10068     { float _v = (float)fp_pop(); *(float*)ADDR(ebx + 0x28) = _v; } /* 0x300033AA: fstp dword ptr [ebx + 0x28] */
  10069     ebx = POP32_VAL(esp); /* 0x300033AD: pop ebx */
  10070     MEM32(FS_BASE + (0)) = ecx; /* 0x300033AE: mov dword ptr fs:[0], ecx */
  10071     esp = ebp; /* 0x300033B5: mov esp, ebp */
  10072     ebp = POP32_VAL(esp); /* 0x300033B7: pop ebp */
  10073     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x300033B8: ret 0x10 */
  10074     RECOMP_REGS_OUT();
  10075 }
  10076 
  10077 void sub_3000337A(void) {
  10078     int _fpu_cmp = 0;
  10079     uint32_t _cf = 0;
  10080     int _df = 1;
  10081     uint32_t _flag_k = FK_NONE;
  10082     uint32_t _flag_a = 0, _flag_b = 0;
  10083     uint32_t _itail_tgt = 0;
  10084     RECOMP_REGS_LOCALS
  10085     RECOMP_ENTER(0x3000337Au);
  10086 
  10087     goto L_3000337A;
  10088 L_3000322D:
  10089     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  10090     edx = 0; /* 0x3000322D: xor edx, edx */
  10091     _cf = 0;
  10092     _flag_k = FK_TEST;
  10093     edi = MEM32(esi + 0x8); /* 0x3000322F: mov edi, dword ptr [esi + 8] */
  10094     ecx = MEM32(esi + 0xC); /* 0x30003232: mov ecx, dword ptr [esi + 0xc] */
  10095     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
  10096     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10097     ecx = ecx - edi; /* 0x30003235: sub ecx, edi */
  10098     _flag_k = FK_CMP;
  10099     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003237: sar ecx, 2 */
  10100     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10101     ecx = (uint32_t)((int32_t)ecx >> 2u);
  10102     /* cmp ecx, 1 */ /* 0x3000323A: cmp ecx, 1 */
  10103     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
  10104     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10105     _flag_k = FK_CMP;
  10106     MEM32(ebp + 0x8) = edx; /* 0x3000323D: mov dword ptr [ebp + 8], edx */
  10107     if (CMP_AE(_flag_a, _flag_b)) goto L_300032F2; /* 0x30003240: jae 0x300032f2 */
  10108 L_30003246:
  10109     ecx = esi; /* 0x30003246: mov ecx, esi */
  10110     RECOMP_ICALL(0x3000E9A0u); /* 0x30003248: call 0x3000e9a0 */ /* not lifted */
  10111     RECOMP_FLAGS_IN();
  10112     /* cmp eax, 1 */ /* 0x3000324D: cmp eax, 1 */
  10113     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  10114     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10115     _flag_k = FK_CMP;
  10116     if (CMP_BE(_flag_a, _flag_b)) goto L_3000325D; /* 0x30003250: jbe 0x3000325d */
  10117 L_30003252:
  10118     ecx = esi; /* 0x30003252: mov ecx, esi */
  10119     RECOMP_ICALL(0x3000E9A0u); /* 0x30003254: call 0x3000e9a0 */ /* not lifted */
  10120     RECOMP_FLAGS_IN();
  10121     ebx = eax; /* 0x30003259: mov ebx, eax */
  10122     goto L_30003262; /* 0x3000325B: jmp 0x30003262 */
  10123 L_3000325D:
  10124     ebx = 1; /* 0x3000325D: mov ebx, 1 */
  10125 L_30003262:
  10126     ecx = esi; /* 0x30003262: mov ecx, esi */
  10127     RECOMP_ICALL(0x3000E9A0u); /* 0x30003264: call 0x3000e9a0 */ /* not lifted */
  10128     RECOMP_FLAGS_IN();
  10129     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
  10130     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10131     eax = eax + ebx; /* 0x30003269: add eax, ebx */
  10132     _flag_k = FK_ADD;
  10133     MEM32(ebp + (-0x10)) = eax; /* 0x3000326B: mov dword ptr [ebp - 0x10], eax */
  10134     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_NS)) goto L_30003272; /* 0x3000326E: jns 0x30003272 */
  10135 L_30003270:
  10136     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  10137     eax = 0; /* 0x30003270: xor eax, eax */
  10138     _cf = 0;
  10139     _flag_k = FK_TEST;
  10140 L_30003272:
  10141     edx = eax * 4; /* 0x30003272: lea edx, [eax*4] */
  10142     PUSH32(esp, edx); /* 0x30003279: push edx */
  10143     RECOMP_ICALL(0x300180A8u); /* 0x3000327A: call 0x300180a8 */ /* not lifted */
  10144     RECOMP_FLAGS_IN();
  10145     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  10146     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10147     esp = esp + 4; /* 0x3000327F: add esp, 4 */
  10148     _flag_k = FK_ADD;
  10149     ebx = eax; /* 0x30003282: mov ebx, eax */
  10150     eax = MEM32(esi + 0x4); /* 0x30003284: mov eax, dword ptr [esi + 4] */
  10151     PUSH32(esp, ebx); /* 0x30003287: push ebx */
  10152     PUSH32(esp, edi); /* 0x30003288: push edi */
  10153     PUSH32(esp, eax); /* 0x30003289: push eax */
  10154     ecx = esi; /* 0x3000328A: mov ecx, esi */
  10155     RECOMP_ICALL(0x30012BB0u); /* 0x3000328C: call 0x30012bb0 */ /* not lifted */
  10156     RECOMP_FLAGS_IN();
  10157     ecx = ebp + 0x8; /* 0x30003291: lea ecx, [ebp + 8] */
  10158     PUSH32(esp, ecx); /* 0x30003294: push ecx */
  10159     PUSH32(esp, 1); /* 0x30003295: push 1 */
  10160     PUSH32(esp, eax); /* 0x30003297: push eax */
  10161     ecx = esi; /* 0x30003298: mov ecx, esi */
  10162     MEM32(ebp + 0x14) = eax; /* 0x3000329A: mov dword ptr [ebp + 0x14], eax */
  10163     RECOMP_ICALL(0x30005340u); /* 0x3000329D: call 0x30005340 */ /* not lifted */
  10164     RECOMP_FLAGS_IN();
  10165     edx = MEM32(ebp + 0x14); /* 0x300032A2: mov edx, dword ptr [ebp + 0x14] */
  10166     eax = MEM32(esi + 0x8); /* 0x300032A5: mov eax, dword ptr [esi + 8] */
  10167     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4);
  10168     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10169     edx = edx + 4; /* 0x300032A8: add edx, 4 */
  10170     _flag_k = FK_ADD;
  10171     PUSH32(esp, edx); /* 0x300032AB: push edx */
  10172     PUSH32(esp, eax); /* 0x300032AC: push eax */
  10173     PUSH32(esp, edi); /* 0x300032AD: push edi */
  10174     ecx = esi; /* 0x300032AE: mov ecx, esi */
  10175     RECOMP_ICALL(0x30012BB0u); /* 0x300032B0: call 0x30012bb0 */ /* not lifted */
  10176     RECOMP_FLAGS_IN();
  10177     ecx = MEM32(esi + 0x8); /* 0x300032B5: mov ecx, dword ptr [esi + 8] */
  10178     edx = MEM32(esi + 0x4); /* 0x300032B8: mov edx, dword ptr [esi + 4] */
  10179     PUSH32(esp, ecx); /* 0x300032BB: push ecx */
  10180     PUSH32(esp, edx); /* 0x300032BC: push edx */
  10181     ecx = esi; /* 0x300032BD: mov ecx, esi */
  10182     RECOMP_ICALL(0x3000EC10u); /* 0x300032BF: call 0x3000ec10 */ /* not lifted */
  10183     RECOMP_FLAGS_IN();
  10184     eax = MEM32(esi + 0x4); /* 0x300032C4: mov eax, dword ptr [esi + 4] */
  10185     PUSH32(esp, eax); /* 0x300032C7: push eax */
  10186     RECOMP_ICALL(0x30018080u); /* 0x300032C8: call 0x30018080 */ /* not lifted */
  10187     RECOMP_FLAGS_IN();
  10188     ecx = MEM32(ebp + (-0x10)); /* 0x300032CD: mov ecx, dword ptr [ebp - 0x10] */
  10189     edx = ebx + ecx * 4; /* 0x300032D0: lea edx, [ebx + ecx*4] */
  10190     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  10191     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10192     esp = esp + 4; /* 0x300032D3: add esp, 4 */
  10193     _flag_k = FK_ADD;
  10194     ecx = esi; /* 0x300032D6: mov ecx, esi */
  10195     MEM32(esi + 0xC) = edx; /* 0x300032D8: mov dword ptr [esi + 0xc], edx */
  10196     RECOMP_ICALL(0x3000E9A0u); /* 0x300032DB: call 0x3000e9a0 */ /* not lifted */
  10197     RECOMP_FLAGS_IN();
  10198     eax = ebx + eax * 4 + 0x4; /* 0x300032E0: lea eax, [ebx + eax*4 + 4] */
  10199     MEM32(esi + 0x4) = ebx; /* 0x300032E4: mov dword ptr [esi + 4], ebx */
  10200     ebx = MEM32(ebp + (-0x14)); /* 0x300032E7: mov ebx, dword ptr [ebp - 0x14] */
  10201     MEM32(esi + 0x8) = eax; /* 0x300032EA: mov dword ptr [esi + 8], eax */
  10202     goto L_3000337E; /* 0x300032ED: jmp 0x3000337e */
  10203 L_300032F2:
  10204     eax = edi; /* 0x300032F2: mov eax, edi */
  10205     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  10206     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10207     eax = eax - edi; /* 0x300032F4: sub eax, edi */
  10208     _flag_k = FK_CMP;
  10209     if (2u) _cf = (((eax) >> 1) & 1u); /* 0x300032F6: sar eax, 2 */
  10210     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10211     eax = (uint32_t)((int32_t)eax >> 2u);
  10212     /* cmp eax, 1 */ /* 0x300032F9: cmp eax, 1 */
  10213     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  10214     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10215     _flag_k = FK_CMP;
  10216     if (CMP_AE(_flag_a, _flag_b)) goto L_3000333E; /* 0x300032FC: jae 0x3000333e */
  10217 L_300032FE:
  10218     ecx = edi + 0x4; /* 0x300032FE: lea ecx, [edi + 4] */
  10219     PUSH32(esp, ecx); /* 0x30003301: push ecx */
  10220     PUSH32(esp, edi); /* 0x30003302: push edi */
  10221     PUSH32(esp, edi); /* 0x30003303: push edi */
  10222     ecx = esi; /* 0x30003304: mov ecx, esi */
  10223     RECOMP_ICALL(0x30012BB0u); /* 0x30003306: call 0x30012bb0 */ /* not lifted */
  10224     RECOMP_FLAGS_IN();
  10225     eax = MEM32(esi + 0x8); /* 0x3000330B: mov eax, dword ptr [esi + 8] */
  10226     ecx = eax; /* 0x3000330E: mov ecx, eax */
  10227     edx = ebp + 0x8; /* 0x30003310: lea edx, [ebp + 8] */
  10228     PUSH32(esp, edx); /* 0x30003313: push edx */
  10229     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
  10230     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10231     ecx = ecx - edi; /* 0x30003314: sub ecx, edi */
  10232     _flag_k = FK_CMP;
  10233     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003316: sar ecx, 2 */
  10234     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10235     ecx = (uint32_t)((int32_t)ecx >> 2u);
  10236     edx = 1; /* 0x30003319: mov edx, 1 */
  10237     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
  10238     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10239     edx = edx - ecx; /* 0x3000331E: sub edx, ecx */
  10240     _flag_k = FK_CMP;
  10241     PUSH32(esp, edx); /* 0x30003320: push edx */
  10242     PUSH32(esp, eax); /* 0x30003321: push eax */
  10243     ecx = esi; /* 0x30003322: mov ecx, esi */
  10244     RECOMP_ICALL(0x30005340u); /* 0x30003324: call 0x30005340 */ /* not lifted */
  10245     RECOMP_FLAGS_IN();
  10246     eax = MEM32(esi + 0x8); /* 0x30003329: mov eax, dword ptr [esi + 8] */
  10247     /* cmp edi, eax */ /* 0x3000332C: cmp edi, eax */
  10248     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10249     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10250     _flag_k = FK_CMP;
  10251     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000337A; /* 0x3000332E: je 0x3000337a */
  10252 L_30003330:
  10253     ecx = MEM32(ebp + 0x8); /* 0x30003330: mov ecx, dword ptr [ebp + 8] */
  10254     MEM32(edi) = ecx; /* 0x30003333: mov dword ptr [edi], ecx */
  10255     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
  10256     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10257     edi = edi + 4; /* 0x30003335: add edi, 4 */
  10258     _flag_k = FK_ADD;
  10259     /* cmp edi, eax */ /* 0x30003338: cmp edi, eax */
  10260     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10261     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10262     _flag_k = FK_CMP;
  10263     RECOMP_BACKEDGE();
  10264     if (CMP_NE(_flag_a, _flag_b)) goto L_30003330; /* 0x3000333A: jne 0x30003330 */
  10265 L_3000333C:
  10266     goto L_3000337A; /* 0x3000333C: jmp 0x3000337a */
  10267 L_3000333E:
  10268     PUSH32(esp, edi); /* 0x3000333E: push edi */
  10269     eax = edi + (-0x4); /* 0x3000333F: lea eax, [edi - 4] */
  10270     PUSH32(esp, edi); /* 0x30003342: push edi */
  10271     PUSH32(esp, eax); /* 0x30003343: push eax */
  10272     ecx = esi; /* 0x30003344: mov ecx, esi */
  10273     MEM32(ebp + 0x14) = eax; /* 0x30003346: mov dword ptr [ebp + 0x14], eax */
  10274     RECOMP_ICALL(0x30012BB0u); /* 0x30003349: call 0x30012bb0 */ /* not lifted */
  10275     RECOMP_FLAGS_IN();
  10276     ecx = MEM32(esi + 0x8); /* 0x3000334E: mov ecx, dword ptr [esi + 8] */
  10277     eax = ecx + (-0x4); /* 0x30003351: lea eax, [ecx - 4] */
  10278     /* cmp edi, eax */ /* 0x30003354: cmp edi, eax */
  10279     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10280     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10281     _flag_k = FK_CMP;
  10282     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003367; /* 0x30003356: je 0x30003367 */
  10283 L_30003358:
  10284     edx = MEM32(eax + (-0x4)); /* 0x30003358: mov edx, dword ptr [eax - 4] */
  10285     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
  10286     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10287     eax = eax - 4; /* 0x3000335B: sub eax, 4 */
  10288     _flag_k = FK_CMP;
  10289     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4);
  10290     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10291     ecx = ecx - 4; /* 0x3000335E: sub ecx, 4 */
  10292     _flag_k = FK_CMP;
  10293     /* cmp eax, edi */ /* 0x30003361: cmp eax, edi */
  10294     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  10295     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10296     _flag_k = FK_CMP;
  10297     MEM32(ecx) = edx; /* 0x30003363: mov dword ptr [ecx], edx */
  10298     RECOMP_BACKEDGE();
  10299     if (CMP_NE(_flag_a, _flag_b)) goto L_30003358; /* 0x30003365: jne 0x30003358 */
  10300 L_30003367:
  10301     eax = edi + 0x4; /* 0x30003367: lea eax, [edi + 4] */
  10302     /* cmp edi, eax */ /* 0x3000336A: cmp edi, eax */
  10303     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10304     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10305     _flag_k = FK_CMP;
  10306     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000337A; /* 0x3000336C: je 0x3000337a */
  10307 L_3000336E:
  10308     ecx = MEM32(ebp + 0x8); /* 0x3000336E: mov ecx, dword ptr [ebp + 8] */
  10309     MEM32(edi) = ecx; /* 0x30003371: mov dword ptr [edi], ecx */
  10310     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
  10311     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10312     edi = edi + 4; /* 0x30003373: add edi, 4 */
  10313     _flag_k = FK_ADD;
  10314     /* cmp edi, eax */ /* 0x30003376: cmp edi, eax */
  10315     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10316     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10317     _flag_k = FK_CMP;
  10318     RECOMP_BACKEDGE();
  10319     if (CMP_NE(_flag_a, _flag_b)) goto L_3000336E; /* 0x30003378: jne 0x3000336e */
  10320 L_3000337A:
  10321     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(4);
  10322     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10323     MEM32(esi + 0x8) = MEM32(esi + 0x8) + 4; /* 0x3000337A: add dword ptr [esi + 8], 4 */
  10324     _flag_k = FK_ADD;
  10325 L_3000337E:
  10326     edx = MEM32(ebx + 0x14); /* 0x3000337E: mov edx, dword ptr [ebx + 0x14] */
  10327     edx = (uint32_t)((int32_t)edx * (int32_t)MEM32(ebp + 0xC)); /* 0x30003381: imul edx, dword ptr [ebp + 0xc] */
  10328     eax = MEM32(ebp + 0x10); /* 0x30003385: mov eax, dword ptr [ebp + 0x10] */
  10329     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  10330     eax = eax + 1; /* 0x30003388: inc eax */
  10331     _flag_k = FK_INC;
  10332     /* cmp eax, edx */ /* 0x30003389: cmp eax, edx */
  10333     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
  10334     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10335     _flag_k = FK_CMP;
  10336     MEM32(ebp + 0x10) = eax; /* 0x3000338B: mov dword ptr [ebp + 0x10], eax */
  10337     RECOMP_BACKEDGE();
  10338     if (CMP_L(_flag_a, _flag_b)) goto L_3000322D; /* 0x3000338E: jl 0x3000322d */
  10339 L_30003394:
  10340     fp_push((double)(int32_t)MEM32(ebx + 0x14)); /* 0x30003394: fild dword ptr [ebx + 0x14] */
  10341     ecx = MEM32(ebp + (-0xC)); /* 0x30003397: mov ecx, dword ptr [ebp - 0xc] */
  10342     edi = POP32_VAL(esp); /* 0x3000339A: pop edi */
  10343     esi = POP32_VAL(esp); /* 0x3000339B: pop esi */
  10344     _st[0] = (double)*(float*)ADDR(ebx + 0x1C) / _st[0]; /* 0x3000339C: fdivr dword ptr [ebx + 0x1c] */
  10345     eax = ebx; /* 0x3000339F: mov eax, ebx */
  10346     { float _v = (float)fp_pop(); *(float*)ADDR(ebx + 0x24) = _v; } /* 0x300033A1: fstp dword ptr [ebx + 0x24] */
  10347     fp_push((double)(int32_t)MEM32(ebx + 0x18)); /* 0x300033A4: fild dword ptr [ebx + 0x18] */
  10348     _st[0] = (double)*(float*)ADDR(ebx + 0x20) / _st[0]; /* 0x300033A7: fdivr dword ptr [ebx + 0x20] */
  10349     { float _v = (float)fp_pop(); *(float*)ADDR(ebx + 0x28) = _v; } /* 0x300033AA: fstp dword ptr [ebx + 0x28] */
  10350     ebx = POP32_VAL(esp); /* 0x300033AD: pop ebx */
  10351     MEM32(FS_BASE + (0)) = ecx; /* 0x300033AE: mov dword ptr fs:[0], ecx */
  10352     esp = ebp; /* 0x300033B5: mov esp, ebp */
  10353     ebp = POP32_VAL(esp); /* 0x300033B7: pop ebp */
  10354     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x300033B8: ret 0x10 */
  10355     RECOMP_REGS_OUT();
  10356 }
  10357 
  10358 void sub_3000337E(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(0x3000337Eu);
  10367 
  10368     goto L_3000337E;
  10369 L_3000322D:
  10370     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  10371     edx = 0; /* 0x3000322D: xor edx, edx */
  10372     _cf = 0;
  10373     _flag_k = FK_TEST;
  10374     edi = MEM32(esi + 0x8); /* 0x3000322F: mov edi, dword ptr [esi + 8] */
  10375     ecx = MEM32(esi + 0xC); /* 0x30003232: mov ecx, dword ptr [esi + 0xc] */
  10376     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
  10377     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10378     ecx = ecx - edi; /* 0x30003235: sub ecx, edi */
  10379     _flag_k = FK_CMP;
  10380     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003237: sar ecx, 2 */
  10381     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10382     ecx = (uint32_t)((int32_t)ecx >> 2u);
  10383     /* cmp ecx, 1 */ /* 0x3000323A: cmp ecx, 1 */
  10384     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
  10385     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10386     _flag_k = FK_CMP;
  10387     MEM32(ebp + 0x8) = edx; /* 0x3000323D: mov dword ptr [ebp + 8], edx */
  10388     if (CMP_AE(_flag_a, _flag_b)) goto L_300032F2; /* 0x30003240: jae 0x300032f2 */
  10389 L_30003246:
  10390     ecx = esi; /* 0x30003246: mov ecx, esi */
  10391     RECOMP_ICALL(0x3000E9A0u); /* 0x30003248: call 0x3000e9a0 */ /* not lifted */
  10392     RECOMP_FLAGS_IN();
  10393     /* cmp eax, 1 */ /* 0x3000324D: cmp eax, 1 */
  10394     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  10395     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10396     _flag_k = FK_CMP;
  10397     if (CMP_BE(_flag_a, _flag_b)) goto L_3000325D; /* 0x30003250: jbe 0x3000325d */
  10398 L_30003252:
  10399     ecx = esi; /* 0x30003252: mov ecx, esi */
  10400     RECOMP_ICALL(0x3000E9A0u); /* 0x30003254: call 0x3000e9a0 */ /* not lifted */
  10401     RECOMP_FLAGS_IN();
  10402     ebx = eax; /* 0x30003259: mov ebx, eax */
  10403     goto L_30003262; /* 0x3000325B: jmp 0x30003262 */
  10404 L_3000325D:
  10405     ebx = 1; /* 0x3000325D: mov ebx, 1 */
  10406 L_30003262:
  10407     ecx = esi; /* 0x30003262: mov ecx, esi */
  10408     RECOMP_ICALL(0x3000E9A0u); /* 0x30003264: call 0x3000e9a0 */ /* not lifted */
  10409     RECOMP_FLAGS_IN();
  10410     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
  10411     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10412     eax = eax + ebx; /* 0x30003269: add eax, ebx */
  10413     _flag_k = FK_ADD;
  10414     MEM32(ebp + (-0x10)) = eax; /* 0x3000326B: mov dword ptr [ebp - 0x10], eax */
  10415     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_NS)) goto L_30003272; /* 0x3000326E: jns 0x30003272 */
  10416 L_30003270:
  10417     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  10418     eax = 0; /* 0x30003270: xor eax, eax */
  10419     _cf = 0;
  10420     _flag_k = FK_TEST;
  10421 L_30003272:
  10422     edx = eax * 4; /* 0x30003272: lea edx, [eax*4] */
  10423     PUSH32(esp, edx); /* 0x30003279: push edx */
  10424     RECOMP_ICALL(0x300180A8u); /* 0x3000327A: call 0x300180a8 */ /* not lifted */
  10425     RECOMP_FLAGS_IN();
  10426     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  10427     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10428     esp = esp + 4; /* 0x3000327F: add esp, 4 */
  10429     _flag_k = FK_ADD;
  10430     ebx = eax; /* 0x30003282: mov ebx, eax */
  10431     eax = MEM32(esi + 0x4); /* 0x30003284: mov eax, dword ptr [esi + 4] */
  10432     PUSH32(esp, ebx); /* 0x30003287: push ebx */
  10433     PUSH32(esp, edi); /* 0x30003288: push edi */
  10434     PUSH32(esp, eax); /* 0x30003289: push eax */
  10435     ecx = esi; /* 0x3000328A: mov ecx, esi */
  10436     RECOMP_ICALL(0x30012BB0u); /* 0x3000328C: call 0x30012bb0 */ /* not lifted */
  10437     RECOMP_FLAGS_IN();
  10438     ecx = ebp + 0x8; /* 0x30003291: lea ecx, [ebp + 8] */
  10439     PUSH32(esp, ecx); /* 0x30003294: push ecx */
  10440     PUSH32(esp, 1); /* 0x30003295: push 1 */
  10441     PUSH32(esp, eax); /* 0x30003297: push eax */
  10442     ecx = esi; /* 0x30003298: mov ecx, esi */
  10443     MEM32(ebp + 0x14) = eax; /* 0x3000329A: mov dword ptr [ebp + 0x14], eax */
  10444     RECOMP_ICALL(0x30005340u); /* 0x3000329D: call 0x30005340 */ /* not lifted */
  10445     RECOMP_FLAGS_IN();
  10446     edx = MEM32(ebp + 0x14); /* 0x300032A2: mov edx, dword ptr [ebp + 0x14] */
  10447     eax = MEM32(esi + 0x8); /* 0x300032A5: mov eax, dword ptr [esi + 8] */
  10448     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4);
  10449     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10450     edx = edx + 4; /* 0x300032A8: add edx, 4 */
  10451     _flag_k = FK_ADD;
  10452     PUSH32(esp, edx); /* 0x300032AB: push edx */
  10453     PUSH32(esp, eax); /* 0x300032AC: push eax */
  10454     PUSH32(esp, edi); /* 0x300032AD: push edi */
  10455     ecx = esi; /* 0x300032AE: mov ecx, esi */
  10456     RECOMP_ICALL(0x30012BB0u); /* 0x300032B0: call 0x30012bb0 */ /* not lifted */
  10457     RECOMP_FLAGS_IN();
  10458     ecx = MEM32(esi + 0x8); /* 0x300032B5: mov ecx, dword ptr [esi + 8] */
  10459     edx = MEM32(esi + 0x4); /* 0x300032B8: mov edx, dword ptr [esi + 4] */
  10460     PUSH32(esp, ecx); /* 0x300032BB: push ecx */
  10461     PUSH32(esp, edx); /* 0x300032BC: push edx */
  10462     ecx = esi; /* 0x300032BD: mov ecx, esi */
  10463     RECOMP_ICALL(0x3000EC10u); /* 0x300032BF: call 0x3000ec10 */ /* not lifted */
  10464     RECOMP_FLAGS_IN();
  10465     eax = MEM32(esi + 0x4); /* 0x300032C4: mov eax, dword ptr [esi + 4] */
  10466     PUSH32(esp, eax); /* 0x300032C7: push eax */
  10467     RECOMP_ICALL(0x30018080u); /* 0x300032C8: call 0x30018080 */ /* not lifted */
  10468     RECOMP_FLAGS_IN();
  10469     ecx = MEM32(ebp + (-0x10)); /* 0x300032CD: mov ecx, dword ptr [ebp - 0x10] */
  10470     edx = ebx + ecx * 4; /* 0x300032D0: lea edx, [ebx + ecx*4] */
  10471     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  10472     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10473     esp = esp + 4; /* 0x300032D3: add esp, 4 */
  10474     _flag_k = FK_ADD;
  10475     ecx = esi; /* 0x300032D6: mov ecx, esi */
  10476     MEM32(esi + 0xC) = edx; /* 0x300032D8: mov dword ptr [esi + 0xc], edx */
  10477     RECOMP_ICALL(0x3000E9A0u); /* 0x300032DB: call 0x3000e9a0 */ /* not lifted */
  10478     RECOMP_FLAGS_IN();
  10479     eax = ebx + eax * 4 + 0x4; /* 0x300032E0: lea eax, [ebx + eax*4 + 4] */
  10480     MEM32(esi + 0x4) = ebx; /* 0x300032E4: mov dword ptr [esi + 4], ebx */
  10481     ebx = MEM32(ebp + (-0x14)); /* 0x300032E7: mov ebx, dword ptr [ebp - 0x14] */
  10482     MEM32(esi + 0x8) = eax; /* 0x300032EA: mov dword ptr [esi + 8], eax */
  10483     goto L_3000337E; /* 0x300032ED: jmp 0x3000337e */
  10484 L_300032F2:
  10485     eax = edi; /* 0x300032F2: mov eax, edi */
  10486     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  10487     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10488     eax = eax - edi; /* 0x300032F4: sub eax, edi */
  10489     _flag_k = FK_CMP;
  10490     if (2u) _cf = (((eax) >> 1) & 1u); /* 0x300032F6: sar eax, 2 */
  10491     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10492     eax = (uint32_t)((int32_t)eax >> 2u);
  10493     /* cmp eax, 1 */ /* 0x300032F9: cmp eax, 1 */
  10494     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  10495     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10496     _flag_k = FK_CMP;
  10497     if (CMP_AE(_flag_a, _flag_b)) goto L_3000333E; /* 0x300032FC: jae 0x3000333e */
  10498 L_300032FE:
  10499     ecx = edi + 0x4; /* 0x300032FE: lea ecx, [edi + 4] */
  10500     PUSH32(esp, ecx); /* 0x30003301: push ecx */
  10501     PUSH32(esp, edi); /* 0x30003302: push edi */
  10502     PUSH32(esp, edi); /* 0x30003303: push edi */
  10503     ecx = esi; /* 0x30003304: mov ecx, esi */
  10504     RECOMP_ICALL(0x30012BB0u); /* 0x30003306: call 0x30012bb0 */ /* not lifted */
  10505     RECOMP_FLAGS_IN();
  10506     eax = MEM32(esi + 0x8); /* 0x3000330B: mov eax, dword ptr [esi + 8] */
  10507     ecx = eax; /* 0x3000330E: mov ecx, eax */
  10508     edx = ebp + 0x8; /* 0x30003310: lea edx, [ebp + 8] */
  10509     PUSH32(esp, edx); /* 0x30003313: push edx */
  10510     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
  10511     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10512     ecx = ecx - edi; /* 0x30003314: sub ecx, edi */
  10513     _flag_k = FK_CMP;
  10514     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003316: sar ecx, 2 */
  10515     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10516     ecx = (uint32_t)((int32_t)ecx >> 2u);
  10517     edx = 1; /* 0x30003319: mov edx, 1 */
  10518     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
  10519     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10520     edx = edx - ecx; /* 0x3000331E: sub edx, ecx */
  10521     _flag_k = FK_CMP;
  10522     PUSH32(esp, edx); /* 0x30003320: push edx */
  10523     PUSH32(esp, eax); /* 0x30003321: push eax */
  10524     ecx = esi; /* 0x30003322: mov ecx, esi */
  10525     RECOMP_ICALL(0x30005340u); /* 0x30003324: call 0x30005340 */ /* not lifted */
  10526     RECOMP_FLAGS_IN();
  10527     eax = MEM32(esi + 0x8); /* 0x30003329: mov eax, dword ptr [esi + 8] */
  10528     /* cmp edi, eax */ /* 0x3000332C: cmp edi, eax */
  10529     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10530     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10531     _flag_k = FK_CMP;
  10532     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000337A; /* 0x3000332E: je 0x3000337a */
  10533 L_30003330:
  10534     ecx = MEM32(ebp + 0x8); /* 0x30003330: mov ecx, dword ptr [ebp + 8] */
  10535     MEM32(edi) = ecx; /* 0x30003333: mov dword ptr [edi], ecx */
  10536     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
  10537     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10538     edi = edi + 4; /* 0x30003335: add edi, 4 */
  10539     _flag_k = FK_ADD;
  10540     /* cmp edi, eax */ /* 0x30003338: cmp edi, eax */
  10541     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10542     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10543     _flag_k = FK_CMP;
  10544     RECOMP_BACKEDGE();
  10545     if (CMP_NE(_flag_a, _flag_b)) goto L_30003330; /* 0x3000333A: jne 0x30003330 */
  10546 L_3000333C:
  10547     goto L_3000337A; /* 0x3000333C: jmp 0x3000337a */
  10548 L_3000333E:
  10549     PUSH32(esp, edi); /* 0x3000333E: push edi */
  10550     eax = edi + (-0x4); /* 0x3000333F: lea eax, [edi - 4] */
  10551     PUSH32(esp, edi); /* 0x30003342: push edi */
  10552     PUSH32(esp, eax); /* 0x30003343: push eax */
  10553     ecx = esi; /* 0x30003344: mov ecx, esi */
  10554     MEM32(ebp + 0x14) = eax; /* 0x30003346: mov dword ptr [ebp + 0x14], eax */
  10555     RECOMP_ICALL(0x30012BB0u); /* 0x30003349: call 0x30012bb0 */ /* not lifted */
  10556     RECOMP_FLAGS_IN();
  10557     ecx = MEM32(esi + 0x8); /* 0x3000334E: mov ecx, dword ptr [esi + 8] */
  10558     eax = ecx + (-0x4); /* 0x30003351: lea eax, [ecx - 4] */
  10559     /* cmp edi, eax */ /* 0x30003354: cmp edi, eax */
  10560     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10561     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10562     _flag_k = FK_CMP;
  10563     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003367; /* 0x30003356: je 0x30003367 */
  10564 L_30003358:
  10565     edx = MEM32(eax + (-0x4)); /* 0x30003358: mov edx, dword ptr [eax - 4] */
  10566     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
  10567     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10568     eax = eax - 4; /* 0x3000335B: sub eax, 4 */
  10569     _flag_k = FK_CMP;
  10570     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4);
  10571     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10572     ecx = ecx - 4; /* 0x3000335E: sub ecx, 4 */
  10573     _flag_k = FK_CMP;
  10574     /* cmp eax, edi */ /* 0x30003361: cmp eax, edi */
  10575     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  10576     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10577     _flag_k = FK_CMP;
  10578     MEM32(ecx) = edx; /* 0x30003363: mov dword ptr [ecx], edx */
  10579     RECOMP_BACKEDGE();
  10580     if (CMP_NE(_flag_a, _flag_b)) goto L_30003358; /* 0x30003365: jne 0x30003358 */
  10581 L_30003367:
  10582     eax = edi + 0x4; /* 0x30003367: lea eax, [edi + 4] */
  10583     /* cmp edi, eax */ /* 0x3000336A: cmp edi, eax */
  10584     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10585     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10586     _flag_k = FK_CMP;
  10587     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000337A; /* 0x3000336C: je 0x3000337a */
  10588 L_3000336E:
  10589     ecx = MEM32(ebp + 0x8); /* 0x3000336E: mov ecx, dword ptr [ebp + 8] */
  10590     MEM32(edi) = ecx; /* 0x30003371: mov dword ptr [edi], ecx */
  10591     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
  10592     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10593     edi = edi + 4; /* 0x30003373: add edi, 4 */
  10594     _flag_k = FK_ADD;
  10595     /* cmp edi, eax */ /* 0x30003376: cmp edi, eax */
  10596     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  10597     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10598     _flag_k = FK_CMP;
  10599     RECOMP_BACKEDGE();
  10600     if (CMP_NE(_flag_a, _flag_b)) goto L_3000336E; /* 0x30003378: jne 0x3000336e */
  10601 L_3000337A:
  10602     _flag_a = (uint32_t)(MEM32(esi + 0x8)); _flag_b = (uint32_t)(4);
  10603     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10604     MEM32(esi + 0x8) = MEM32(esi + 0x8) + 4; /* 0x3000337A: add dword ptr [esi + 8], 4 */
  10605     _flag_k = FK_ADD;
  10606 L_3000337E:
  10607     edx = MEM32(ebx + 0x14); /* 0x3000337E: mov edx, dword ptr [ebx + 0x14] */
  10608     edx = (uint32_t)((int32_t)edx * (int32_t)MEM32(ebp + 0xC)); /* 0x30003381: imul edx, dword ptr [ebp + 0xc] */
  10609     eax = MEM32(ebp + 0x10); /* 0x30003385: mov eax, dword ptr [ebp + 0x10] */
  10610     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  10611     eax = eax + 1; /* 0x30003388: inc eax */
  10612     _flag_k = FK_INC;
  10613     /* cmp eax, edx */ /* 0x30003389: cmp eax, edx */
  10614     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
  10615     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10616     _flag_k = FK_CMP;
  10617     MEM32(ebp + 0x10) = eax; /* 0x3000338B: mov dword ptr [ebp + 0x10], eax */
  10618     RECOMP_BACKEDGE();
  10619     if (CMP_L(_flag_a, _flag_b)) goto L_3000322D; /* 0x3000338E: jl 0x3000322d */
  10620 L_30003394:
  10621     fp_push((double)(int32_t)MEM32(ebx + 0x14)); /* 0x30003394: fild dword ptr [ebx + 0x14] */
  10622     ecx = MEM32(ebp + (-0xC)); /* 0x30003397: mov ecx, dword ptr [ebp - 0xc] */
  10623     edi = POP32_VAL(esp); /* 0x3000339A: pop edi */
  10624     esi = POP32_VAL(esp); /* 0x3000339B: pop esi */
  10625     _st[0] = (double)*(float*)ADDR(ebx + 0x1C) / _st[0]; /* 0x3000339C: fdivr dword ptr [ebx + 0x1c] */
  10626     eax = ebx; /* 0x3000339F: mov eax, ebx */
  10627     { float _v = (float)fp_pop(); *(float*)ADDR(ebx + 0x24) = _v; } /* 0x300033A1: fstp dword ptr [ebx + 0x24] */
  10628     fp_push((double)(int32_t)MEM32(ebx + 0x18)); /* 0x300033A4: fild dword ptr [ebx + 0x18] */
  10629     _st[0] = (double)*(float*)ADDR(ebx + 0x20) / _st[0]; /* 0x300033A7: fdivr dword ptr [ebx + 0x20] */
  10630     { float _v = (float)fp_pop(); *(float*)ADDR(ebx + 0x28) = _v; } /* 0x300033AA: fstp dword ptr [ebx + 0x28] */
  10631     ebx = POP32_VAL(esp); /* 0x300033AD: pop ebx */
  10632     MEM32(FS_BASE + (0)) = ecx; /* 0x300033AE: mov dword ptr fs:[0], ecx */
  10633     esp = ebp; /* 0x300033B5: mov esp, ebp */
  10634     ebp = POP32_VAL(esp); /* 0x300033B7: pop ebp */
  10635     RECOMP_FLAGS_OUT(); esp += 20; { RECOMP_REGS_OUT(); return; } /* 0x300033B8: ret 0x10 */
  10636     RECOMP_REGS_OUT();
  10637 }
  10638 
  10639 void sub_300033C0(void) {
  10640     int _fpu_cmp = 0;
  10641     uint32_t _cf = 0;
  10642     int _df = 1;
  10643     uint32_t _flag_k = FK_NONE;
  10644     uint32_t _flag_a = 0, _flag_b = 0;
  10645     uint32_t _itail_tgt = 0;
  10646     RECOMP_REGS_LOCALS
  10647     RECOMP_ENTER(0x300033C0u);
  10648 
  10649 L_300033C0:
  10650     PUSH32(esp, ebp); /* 0x300033C0: push ebp */
  10651     ebp = esp; /* 0x300033C1: mov ebp, esp */
  10652     eax = MEM32(ecx + 0x14); /* 0x300033C3: mov eax, dword ptr [ecx + 0x14] */
  10653     eax = (uint32_t)((int32_t)eax * (int32_t)MEM32(ebp + 0xC)); /* 0x300033C6: imul eax, dword ptr [ebp + 0xc] */
  10654     edx = MEM32(ebp + 0x8); /* 0x300033CA: mov edx, dword ptr [ebp + 8] */
  10655     ecx = MEM32(ecx + 0x8); /* 0x300033CD: mov ecx, dword ptr [ecx + 8] */
  10656     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
  10657     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10658     eax = eax + edx; /* 0x300033D0: add eax, edx */
  10659     _flag_k = FK_ADD;
  10660     edx = MEM32(ebp + 0x10); /* 0x300033D2: mov edx, dword ptr [ebp + 0x10] */
  10661     MEM32(ecx + eax * 4) = edx; /* 0x300033D5: mov dword ptr [ecx + eax*4], edx */
  10662     ebp = POP32_VAL(esp); /* 0x300033D8: pop ebp */
  10663     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x300033D9: ret 0xc */
  10664     RECOMP_REGS_OUT();
  10665 }
  10666 
  10667 void sub_300033E0(void) {
  10668     int _fpu_cmp = 0;
  10669     uint32_t _cf = 0;
  10670     int _df = 1;
  10671     uint32_t _flag_k = FK_NONE;
  10672     uint32_t _flag_a = 0, _flag_b = 0;
  10673     uint32_t _itail_tgt = 0;
  10674     RECOMP_REGS_LOCALS
  10675     RECOMP_ENTER(0x300033E0u);
  10676 
  10677 L_300033E0:
  10678     PUSH32(esp, ebp); /* 0x300033E0: push ebp */
  10679     ebp = esp; /* 0x300033E1: mov ebp, esp */
  10680     eax = MEM32(ecx + 0x8); /* 0x300033E3: mov eax, dword ptr [ecx + 8] */
  10681     ecx = MEM32(ebp + 0xC); /* 0x300033E6: mov ecx, dword ptr [ebp + 0xc] */
  10682     edx = MEM32(ebp + 0x8); /* 0x300033E9: mov edx, dword ptr [ebp + 8] */
  10683     MEM32(eax + edx * 4) = ecx; /* 0x300033EC: mov dword ptr [eax + edx*4], ecx */
  10684     ebp = POP32_VAL(esp); /* 0x300033EF: pop ebp */
  10685     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x300033F0: ret 8 */
  10686     RECOMP_REGS_OUT();
  10687 }
  10688 
  10689 void sub_30003400(void) {
  10690     int _fpu_cmp = 0;
  10691     uint32_t _cf = 0;
  10692     int _df = 1;
  10693     uint32_t _flag_k = FK_NONE;
  10694     uint32_t _flag_a = 0, _flag_b = 0;
  10695     uint32_t _itail_tgt = 0;
  10696     RECOMP_REGS_LOCALS
  10697     RECOMP_ENTER(0x30003400u);
  10698 
  10699 L_30003400:
  10700     PUSH32(esp, ebp); /* 0x30003400: push ebp */
  10701     ebp = esp; /* 0x30003401: mov ebp, esp */
  10702     PUSH32(esp, 0xFFFFFFFFu); /* 0x30003403: push -1 */
  10703     PUSH32(esp, 0x300185F4u); /* 0x30003405: push 0x300185f4 */
  10704     eax = MEM32(FS_BASE + (0)); /* 0x3000340A: mov eax, dword ptr fs:[0] */
  10705     PUSH32(esp, eax); /* 0x30003410: push eax */
  10706     MEM32(FS_BASE + (0)) = esp; /* 0x30003411: mov dword ptr fs:[0], esp */
  10707     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
  10708     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10709     esp = esp - 0xCu; /* 0x30003418: sub esp, 0xc */
  10710     _flag_k = FK_CMP;
  10711     PUSH32(esp, ebx); /* 0x3000341B: push ebx */
  10712     PUSH32(esp, esi); /* 0x3000341C: push esi */
  10713     ebx = ecx; /* 0x3000341D: mov ebx, ecx */
  10714     PUSH32(esp, edi); /* 0x3000341F: push edi */
  10715     MEM32(ebp + (-0x18)) = ebx; /* 0x30003420: mov dword ptr [ebp - 0x18], ebx */
  10716     SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x30003423: mov al, byte ptr [ebp + 0xb] */
  10717     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  10718     ecx = 0; /* 0x30003426: xor ecx, ecx */
  10719     _cf = 0;
  10720     _flag_k = FK_TEST;
  10721     esi = ebx + 0x4; /* 0x30003428: lea esi, [ebx + 4] */
  10722     MEM32(ebp + (-0x4)) = ecx; /* 0x3000342B: mov dword ptr [ebp - 4], ecx */
  10723     MEM8(esi) = (uint8_t)(LO8(eax)); /* 0x3000342E: mov byte ptr [esi], al */
  10724     MEM32(esi + 0x4) = ecx; /* 0x30003430: mov dword ptr [esi + 4], ecx */
  10725     MEM32(esi + 0x8) = ecx; /* 0x30003433: mov dword ptr [esi + 8], ecx */
  10726     MEM32(esi + 0xC) = ecx; /* 0x30003436: mov dword ptr [esi + 0xc], ecx */
  10727     eax = 0x3F800000u; /* 0x30003439: mov eax, 0x3f800000 */
  10728     edx = 1; /* 0x3000343E: mov edx, 1 */
  10729     MEM32(ebx + 0x14) = edx; /* 0x30003443: mov dword ptr [ebx + 0x14], edx */
  10730     MEM32(ebx + 0x18) = edx; /* 0x30003446: mov dword ptr [ebx + 0x18], edx */
  10731     MEM32(ebx + 0x1C) = eax; /* 0x30003449: mov dword ptr [ebx + 0x1c], eax */
  10732     MEM32(ebx + 0x20) = eax; /* 0x3000344C: mov dword ptr [ebx + 0x20], eax */
  10733     MEM32(ebx + 0x24) = ecx; /* 0x3000344F: mov dword ptr [ebx + 0x24], ecx */
  10734     MEM32(ebx + 0x28) = ecx; /* 0x30003452: mov dword ptr [ebx + 0x28], ecx */
  10735     MEM32(ebx) = 0x30019124u; /* 0x30003455: mov dword ptr [ebx], 0x30019124 */
  10736     eax = MEM32(esi + 0x4); /* 0x3000345B: mov eax, dword ptr [esi + 4] */
  10737     /* cmp eax, ecx */ /* 0x3000345E: cmp eax, ecx */
  10738     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  10739     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10740     _flag_k = FK_CMP;
  10741     MEM8(ebp + (-0x4)) = (uint8_t)(1); /* 0x30003460: mov byte ptr [ebp - 4], 1 */
  10742     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003472; /* 0x30003464: je 0x30003472 */
  10743 L_30003466:
  10744     ecx = MEM32(esi + 0xC); /* 0x30003466: mov ecx, dword ptr [esi + 0xc] */
  10745     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
  10746     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10747     ecx = ecx - eax; /* 0x30003469: sub ecx, eax */
  10748     _flag_k = FK_CMP;
  10749     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x3000346B: sar ecx, 2 */
  10750     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10751     ecx = (uint32_t)((int32_t)ecx >> 2u);
  10752     /* cmp ecx, edx */ /* 0x3000346E: cmp ecx, edx */
  10753     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
  10754     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10755     _flag_k = FK_CMP;
  10756     if (CMP_AE(_flag_a, _flag_b)) goto L_300034D3; /* 0x30003470: jae 0x300034d3 */
  10757 L_30003472:
  10758     PUSH32(esp, 4); /* 0x30003472: push 4 */
  10759     RECOMP_ICALL(0x300180A8u); /* 0x30003474: call 0x300180a8 */ /* not lifted */
  10760     RECOMP_FLAGS_IN();
  10761     edx = MEM32(esi + 0x8); /* 0x30003479: mov edx, dword ptr [esi + 8] */
  10762     edi = eax; /* 0x3000347C: mov edi, eax */
  10763     eax = MEM32(esi + 0x4); /* 0x3000347E: mov eax, dword ptr [esi + 4] */
  10764     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  10765     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10766     esp = esp + 4; /* 0x30003481: add esp, 4 */
  10767     _flag_k = FK_ADD;
  10768     /* cmp eax, edx */ /* 0x30003484: cmp eax, edx */
  10769     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
  10770     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10771     _flag_k = FK_CMP;
  10772     MEM32(ebp + (-0x10)) = edi; /* 0x30003486: mov dword ptr [ebp - 0x10], edi */
  10773     ecx = edi; /* 0x30003489: mov ecx, edi */
  10774     if (CMP_EQ(_flag_a, _flag_b)) goto L_300034A2; /* 0x3000348B: je 0x300034a2 */
  10775 L_3000348D:
  10776     /* test ecx, ecx */ /* 0x3000348D: test ecx, ecx */
  10777     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  10778     _cf = 0;
  10779     _flag_k = FK_TEST;
  10780     if (TEST_Z(_flag_a, _flag_b)) goto L_30003498; /* 0x3000348F: je 0x30003498 */
  10781 L_30003491:
  10782     edi = MEM32(eax); /* 0x30003491: mov edi, dword ptr [eax] */
  10783     MEM32(ecx) = edi; /* 0x30003493: mov dword ptr [ecx], edi */
  10784     edi = MEM32(ebp + (-0x10)); /* 0x30003495: mov edi, dword ptr [ebp - 0x10] */
  10785 L_30003498:
  10786     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
  10787     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10788     eax = eax + 4; /* 0x30003498: add eax, 4 */
  10789     _flag_k = FK_ADD;
  10790     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4);
  10791     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10792     ecx = ecx + 4; /* 0x3000349B: add ecx, 4 */
  10793     _flag_k = FK_ADD;
  10794     /* cmp eax, edx */ /* 0x3000349E: cmp eax, edx */
  10795     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
  10796     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10797     _flag_k = FK_CMP;
  10798     RECOMP_BACKEDGE();
  10799     if (CMP_NE(_flag_a, _flag_b)) goto L_3000348D; /* 0x300034A0: jne 0x3000348d */
  10800 L_300034A2:
  10801     eax = MEM32(esi + 0x4); /* 0x300034A2: mov eax, dword ptr [esi + 4] */
  10802     PUSH32(esp, eax); /* 0x300034A5: push eax */
  10803     MEM32(ebp + (-0x14)) = eax; /* 0x300034A6: mov dword ptr [ebp - 0x14], eax */
  10804     RECOMP_ICALL(0x30018080u); /* 0x300034A9: call 0x30018080 */ /* not lifted */
  10805     RECOMP_FLAGS_IN();
  10806     ecx = MEM32(esi + 0x4); /* 0x300034AE: mov ecx, dword ptr [esi + 4] */
  10807     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  10808     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10809     esp = esp + 4; /* 0x300034B1: add esp, 4 */
  10810     _flag_k = FK_ADD;
  10811     /* test ecx, ecx */ /* 0x300034B4: test ecx, ecx */
  10812     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  10813     _cf = 0;
  10814     _flag_k = FK_TEST;
  10815     edx = edi + 0x4; /* 0x300034B6: lea edx, [edi + 4] */
  10816     MEM32(esi + 0xC) = edx; /* 0x300034B9: mov dword ptr [esi + 0xc], edx */
  10817     if (TEST_NZ(_flag_a, _flag_b)) goto L_300034C2; /* 0x300034BC: jne 0x300034c2 */
  10818 L_300034BE:
  10819     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  10820     eax = 0; /* 0x300034BE: xor eax, eax */
  10821     _cf = 0;
  10822     _flag_k = FK_TEST;
  10823     goto L_300034CA; /* 0x300034C0: jmp 0x300034ca */
  10824 L_300034C2:
  10825     eax = MEM32(esi + 0x8); /* 0x300034C2: mov eax, dword ptr [esi + 8] */
  10826     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  10827     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10828     eax = eax - ecx; /* 0x300034C5: sub eax, ecx */
  10829     _flag_k = FK_CMP;
  10830     if (2u) _cf = (((eax) >> 1) & 1u); /* 0x300034C7: sar eax, 2 */
  10831     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)eax >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10832     eax = (uint32_t)((int32_t)eax >> 2u);
  10833 L_300034CA:
  10834     eax = edi + eax * 4; /* 0x300034CA: lea eax, [edi + eax*4] */
  10835     MEM32(esi + 0x8) = eax; /* 0x300034CD: mov dword ptr [esi + 8], eax */
  10836     MEM32(esi + 0x4) = edi; /* 0x300034D0: mov dword ptr [esi + 4], edi */
  10837 L_300034D3:
  10838     edi = MEM32(esi + 0x8); /* 0x300034D3: mov edi, dword ptr [esi + 8] */
  10839     ecx = MEM32(esi + 0xC); /* 0x300034D6: mov ecx, dword ptr [esi + 0xc] */
  10840     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
  10841     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10842     ecx = ecx - edi; /* 0x300034D9: sub ecx, edi */
  10843     _flag_k = FK_CMP;
  10844     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x300034DB: sar ecx, 2 */
  10845     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10846     ecx = (uint32_t)((int32_t)ecx >> 2u);
  10847     /* cmp ecx, 1 */ /* 0x300034DE: cmp ecx, 1 */
  10848     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
  10849     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10850     _flag_k = FK_CMP;
  10851     if (CMP_AE(_flag_a, _flag_b)) goto L_300035A1; /* 0x300034E1: jae 0x300035a1 */
  10852 L_300034E7:
  10853     ecx = esi; /* 0x300034E7: mov ecx, esi */
  10854     RECOMP_ICALL(0x3000E9A0u); /* 0x300034E9: call 0x3000e9a0 */ /* not lifted */
  10855     RECOMP_FLAGS_IN();
  10856     /* cmp eax, 1 */ /* 0x300034EE: cmp eax, 1 */
  10857     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
  10858     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10859     _flag_k = FK_CMP;
  10860     if (CMP_BE(_flag_a, _flag_b)) goto L_300034FE; /* 0x300034F1: jbe 0x300034fe */
  10861 L_300034F3:
  10862     ecx = esi; /* 0x300034F3: mov ecx, esi */
  10863     RECOMP_ICALL(0x3000E9A0u); /* 0x300034F5: call 0x3000e9a0 */ /* not lifted */
  10864     RECOMP_FLAGS_IN();
  10865     ebx = eax; /* 0x300034FA: mov ebx, eax */
  10866     goto L_30003503; /* 0x300034FC: jmp 0x30003503 */
  10867 L_300034FE:
  10868     ebx = 1; /* 0x300034FE: mov ebx, 1 */
  10869 L_30003503:
  10870     ecx = esi; /* 0x30003503: mov ecx, esi */
  10871     RECOMP_ICALL(0x3000E9A0u); /* 0x30003505: call 0x3000e9a0 */ /* not lifted */
  10872     RECOMP_FLAGS_IN();
  10873     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
  10874     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10875     eax = eax + ebx; /* 0x3000350A: add eax, ebx */
  10876     _flag_k = FK_ADD;
  10877     MEM32(ebp + (-0x14)) = eax; /* 0x3000350C: mov dword ptr [ebp - 0x14], eax */
  10878     if (/* add result */ recomp_cond(_flag_k, _flag_a, _flag_b, CC_NS)) goto L_30003513; /* 0x3000350F: jns 0x30003513 */
  10879 L_30003511:
  10880     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  10881     eax = 0; /* 0x30003511: xor eax, eax */
  10882     _cf = 0;
  10883     _flag_k = FK_TEST;
  10884 L_30003513:
  10885     edx = eax * 4; /* 0x30003513: lea edx, [eax*4] */
  10886     PUSH32(esp, edx); /* 0x3000351A: push edx */
  10887     RECOMP_ICALL(0x300180A8u); /* 0x3000351B: call 0x300180a8 */ /* not lifted */
  10888     RECOMP_FLAGS_IN();
  10889     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  10890     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10891     esp = esp + 4; /* 0x30003520: add esp, 4 */
  10892     _flag_k = FK_ADD;
  10893     ebx = eax; /* 0x30003523: mov ebx, eax */
  10894     eax = MEM32(esi + 0x4); /* 0x30003525: mov eax, dword ptr [esi + 4] */
  10895     PUSH32(esp, ebx); /* 0x30003528: push ebx */
  10896     PUSH32(esp, edi); /* 0x30003529: push edi */
  10897     PUSH32(esp, eax); /* 0x3000352A: push eax */
  10898     ecx = esi; /* 0x3000352B: mov ecx, esi */
  10899     RECOMP_ICALL(0x30012BB0u); /* 0x3000352D: call 0x30012bb0 */ /* not lifted */
  10900     RECOMP_FLAGS_IN();
  10901     ecx = ebp + 0x8; /* 0x30003532: lea ecx, [ebp + 8] */
  10902     PUSH32(esp, ecx); /* 0x30003535: push ecx */
  10903     PUSH32(esp, 1); /* 0x30003536: push 1 */
  10904     PUSH32(esp, eax); /* 0x30003538: push eax */
  10905     ecx = esi; /* 0x30003539: mov ecx, esi */
  10906     MEM32(ebp + (-0x10)) = eax; /* 0x3000353B: mov dword ptr [ebp - 0x10], eax */
  10907     RECOMP_ICALL(0x30005340u); /* 0x3000353E: call 0x30005340 */ /* not lifted */
  10908     RECOMP_FLAGS_IN();
  10909     edx = MEM32(ebp + (-0x10)); /* 0x30003543: mov edx, dword ptr [ebp - 0x10] */
  10910     eax = MEM32(esi + 0x8); /* 0x30003546: mov eax, dword ptr [esi + 8] */
  10911     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(4);
  10912     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10913     edx = edx + 4; /* 0x30003549: add edx, 4 */
  10914     _flag_k = FK_ADD;
  10915     PUSH32(esp, edx); /* 0x3000354C: push edx */
  10916     PUSH32(esp, eax); /* 0x3000354D: push eax */
  10917     PUSH32(esp, edi); /* 0x3000354E: push edi */
  10918     ecx = esi; /* 0x3000354F: mov ecx, esi */
  10919     RECOMP_ICALL(0x30012BB0u); /* 0x30003551: call 0x30012bb0 */ /* not lifted */
  10920     RECOMP_FLAGS_IN();
  10921     ecx = MEM32(esi + 0x8); /* 0x30003556: mov ecx, dword ptr [esi + 8] */
  10922     edx = MEM32(esi + 0x4); /* 0x30003559: mov edx, dword ptr [esi + 4] */
  10923     PUSH32(esp, ecx); /* 0x3000355C: push ecx */
  10924     PUSH32(esp, edx); /* 0x3000355D: push edx */
  10925     ecx = esi; /* 0x3000355E: mov ecx, esi */
  10926     RECOMP_ICALL(0x3000EC10u); /* 0x30003560: call 0x3000ec10 */ /* not lifted */
  10927     RECOMP_FLAGS_IN();
  10928     eax = MEM32(esi + 0x4); /* 0x30003565: mov eax, dword ptr [esi + 4] */
  10929     PUSH32(esp, eax); /* 0x30003568: push eax */
  10930     RECOMP_ICALL(0x30018080u); /* 0x30003569: call 0x30018080 */ /* not lifted */
  10931     RECOMP_FLAGS_IN();
  10932     ecx = MEM32(ebp + (-0x14)); /* 0x3000356E: mov ecx, dword ptr [ebp - 0x14] */
  10933     edx = ebx + ecx * 4; /* 0x30003571: lea edx, [ebx + ecx*4] */
  10934     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  10935     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  10936     esp = esp + 4; /* 0x30003574: add esp, 4 */
  10937     _flag_k = FK_ADD;
  10938     ecx = esi; /* 0x30003577: mov ecx, esi */
  10939     MEM32(esi + 0xC) = edx; /* 0x30003579: mov dword ptr [esi + 0xc], edx */
  10940     RECOMP_ICALL(0x3000E9A0u); /* 0x3000357C: call 0x3000e9a0 */ /* not lifted */
  10941     RECOMP_FLAGS_IN();
  10942     eax = ebx + eax * 4 + 0x4; /* 0x30003581: lea eax, [ebx + eax*4 + 4] */
  10943     edi = POP32_VAL(esp); /* 0x30003585: pop edi */
  10944     MEM32(esi + 0x8) = eax; /* 0x30003586: mov dword ptr [esi + 8], eax */
  10945     eax = MEM32(ebp + (-0x18)); /* 0x30003589: mov eax, dword ptr [ebp - 0x18] */
  10946     MEM32(esi + 0x4) = ebx; /* 0x3000358C: mov dword ptr [esi + 4], ebx */
  10947     esi = POP32_VAL(esp); /* 0x3000358F: pop esi */
  10948     ebx = POP32_VAL(esp); /* 0x30003590: pop ebx */
  10949     ecx = MEM32(ebp + (-0xC)); /* 0x30003591: mov ecx, dword ptr [ebp - 0xc] */
  10950     MEM32(FS_BASE + (0)) = ecx; /* 0x30003594: mov dword ptr fs:[0], ecx */
  10951     esp = ebp; /* 0x3000359B: mov esp, ebp */
  10952     ebp = POP32_VAL(esp); /* 0x3000359D: pop ebp */
  10953     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3000359E: ret 4 */
  10954 L_300035A1:
  10955     ecx = edi; /* 0x300035A1: mov ecx, edi */
  10956     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
  10957     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10958     ecx = ecx - edi; /* 0x300035A3: sub ecx, edi */
  10959     _flag_k = FK_CMP;
  10960     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x300035A5: sar ecx, 2 */
  10961     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10962     ecx = (uint32_t)((int32_t)ecx >> 2u);
  10963     /* cmp ecx, 1 */ /* 0x300035A8: cmp ecx, 1 */
  10964     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(1);
  10965     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10966     _flag_k = FK_CMP;
  10967     if (CMP_AE(_flag_a, _flag_b)) goto L_300035ED; /* 0x300035AB: jae 0x300035ed */
  10968 L_300035AD:
  10969     edx = edi + 0x4; /* 0x300035AD: lea edx, [edi + 4] */
  10970     PUSH32(esp, edx); /* 0x300035B0: push edx */
  10971     PUSH32(esp, edi); /* 0x300035B1: push edi */
  10972     PUSH32(esp, edi); /* 0x300035B2: push edi */
  10973     ecx = esi; /* 0x300035B3: mov ecx, esi */
  10974     RECOMP_ICALL(0x30012BB0u); /* 0x300035B5: call 0x30012bb0 */ /* not lifted */
  10975     RECOMP_FLAGS_IN();
  10976     eax = MEM32(esi + 0x8); /* 0x300035BA: mov eax, dword ptr [esi + 8] */
  10977     edx = eax; /* 0x300035BD: mov edx, eax */
  10978     ecx = ebp + 0x8; /* 0x300035BF: lea ecx, [ebp + 8] */
  10979     PUSH32(esp, ecx); /* 0x300035C2: push ecx */
  10980     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi);
  10981     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10982     edx = edx - edi; /* 0x300035C3: sub edx, edi */
  10983     _flag_k = FK_CMP;
  10984     if (2u) _cf = (((edx) >> 1) & 1u); /* 0x300035C5: sar edx, 2 */
  10985     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)edx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  10986     edx = (uint32_t)((int32_t)edx >> 2u);
  10987     ecx = 1; /* 0x300035C8: mov ecx, 1 */
  10988     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
  10989     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  10990     ecx = ecx - edx; /* 0x300035CD: sub ecx, edx */
  10991     _flag_k = FK_CMP;
  10992     PUSH32(esp, ecx); /* 0x300035CF: push ecx */
  10993     PUSH32(esp, eax); /* 0x300035D0: push eax */
  10994     ecx = esi; /* 0x300035D1: mov ecx, esi */
  10995     RECOMP_ICALL(0x30005340u); /* 0x300035D3: call 0x30005340 */ /* not lifted */
  10996     RECOMP_FLAGS_IN();
  10997     eax = MEM32(esi + 0x8); /* 0x300035D8: mov eax, dword ptr [esi + 8] */
  10998     /* cmp edi, eax */ /* 0x300035DB: cmp edi, eax */
  10999     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  11000     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11001     _flag_k = FK_CMP;
  11002     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003626; /* 0x300035DD: je 0x30003626 */
  11003 L_300035DF:
  11004     edx = MEM32(ebp + 0x8); /* 0x300035DF: mov edx, dword ptr [ebp + 8] */
  11005     MEM32(edi) = edx; /* 0x300035E2: mov dword ptr [edi], edx */
  11006     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
  11007     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11008     edi = edi + 4; /* 0x300035E4: add edi, 4 */
  11009     _flag_k = FK_ADD;
  11010     /* cmp edi, eax */ /* 0x300035E7: cmp edi, eax */
  11011     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  11012     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11013     _flag_k = FK_CMP;
  11014     RECOMP_BACKEDGE();
  11015     if (CMP_NE(_flag_a, _flag_b)) goto L_300035DF; /* 0x300035E9: jne 0x300035df */
  11016 L_300035EB:
  11017     goto L_30003626; /* 0x300035EB: jmp 0x30003626 */
  11018 L_300035ED:
  11019     PUSH32(esp, edi); /* 0x300035ED: push edi */
  11020     PUSH32(esp, edi); /* 0x300035EE: push edi */
  11021     eax = edi + (-0x4); /* 0x300035EF: lea eax, [edi - 4] */
  11022     PUSH32(esp, eax); /* 0x300035F2: push eax */
  11023     ecx = esi; /* 0x300035F3: mov ecx, esi */
  11024     RECOMP_ICALL(0x30012BB0u); /* 0x300035F5: call 0x30012bb0 */ /* not lifted */
  11025     RECOMP_FLAGS_IN();
  11026     ecx = MEM32(esi + 0x8); /* 0x300035FA: mov ecx, dword ptr [esi + 8] */
  11027     eax = ecx + (-0x4); /* 0x300035FD: lea eax, [ecx - 4] */
  11028     /* cmp edi, eax */ /* 0x30003600: cmp edi, eax */
  11029     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  11030     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11031     _flag_k = FK_CMP;
  11032     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003613; /* 0x30003602: je 0x30003613 */
  11033 L_30003604:
  11034     edx = MEM32(eax + (-0x4)); /* 0x30003604: mov edx, dword ptr [eax - 4] */
  11035     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
  11036     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11037     eax = eax - 4; /* 0x30003607: sub eax, 4 */
  11038     _flag_k = FK_CMP;
  11039     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4);
  11040     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11041     ecx = ecx - 4; /* 0x3000360A: sub ecx, 4 */
  11042     _flag_k = FK_CMP;
  11043     /* cmp eax, edi */ /* 0x3000360D: cmp eax, edi */
  11044     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  11045     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11046     _flag_k = FK_CMP;
  11047     MEM32(ecx) = edx; /* 0x3000360F: mov dword ptr [ecx], edx */
  11048     RECOMP_BACKEDGE();
  11049     if (CMP_NE(_flag_a, _flag_b)) goto L_30003604; /* 0x30003611: jne 0x30003604 */
  11050 L_30003613:
  11051     eax = edi + 0x4; /* 0x30003613: lea eax, [edi + 4] */
  11052     /* cmp edi, eax */ /* 0x30003616: cmp edi, eax */
  11053     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  11054     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11055     _flag_k = FK_CMP;
  11056     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003626; /* 0x30003618: je 0x30003626 */
  11057 L_3000361A:
  11058     ecx = MEM32(ebp + 0x8); /* 0x3000361A: mov ecx, dword ptr [ebp + 8] */
  11059     MEM32(edi) = ecx; /* 0x3000361D: mov dword ptr [edi], ecx */
  11060     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
  11061     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11062     edi = edi + 4; /* 0x3000361F: add edi, 4 */
  11063     _flag_k = FK_ADD;
  11064     /* cmp edi, eax */ /* 0x30003622: cmp edi, eax */
  11065     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  11066     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11067     _flag_k = FK_CMP;
  11068     RECOMP_BACKEDGE();
  11069     if (CMP_NE(_flag_a, _flag_b)) goto L_3000361A; /* 0x30003624: jne 0x3000361a */
  11070 L_30003626:
  11071     eax = MEM32(esi + 0x8); /* 0x30003626: mov eax, dword ptr [esi + 8] */
  11072     ecx = MEM32(ebp + (-0xC)); /* 0x30003629: mov ecx, dword ptr [ebp - 0xc] */
  11073     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
  11074     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11075     eax = eax + 4; /* 0x3000362C: add eax, 4 */
  11076     _flag_k = FK_ADD;
  11077     MEM32(esi + 0x8) = eax; /* 0x3000362F: mov dword ptr [esi + 8], eax */
  11078     edi = POP32_VAL(esp); /* 0x30003632: pop edi */
  11079     esi = POP32_VAL(esp); /* 0x30003633: pop esi */
  11080     eax = ebx; /* 0x30003634: mov eax, ebx */
  11081     ebx = POP32_VAL(esp); /* 0x30003636: pop ebx */
  11082     MEM32(FS_BASE + (0)) = ecx; /* 0x30003637: mov dword ptr fs:[0], ecx */
  11083     esp = ebp; /* 0x3000363E: mov esp, ebp */
  11084     ebp = POP32_VAL(esp); /* 0x30003640: pop ebp */
  11085     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30003641: ret 4 */
  11086     RECOMP_REGS_OUT();
  11087 }
  11088 
  11089 void sub_30003650(void) {
  11090     int _fpu_cmp = 0;
  11091     uint32_t _cf = 0;
  11092     int _df = 1;
  11093     uint32_t _flag_k = FK_NONE;
  11094     uint32_t _flag_a = 0, _flag_b = 0;
  11095     uint32_t _itail_tgt = 0;
  11096     RECOMP_REGS_LOCALS
  11097     RECOMP_ENTER(0x30003650u);
  11098 
  11099 L_30003650:
  11100     PUSH32(esp, ebp); /* 0x30003650: push ebp */
  11101     ebp = esp; /* 0x30003651: mov ebp, esp */
  11102     PUSH32(esp, 0xFFFFFFFFu); /* 0x30003653: push -1 */
  11103     PUSH32(esp, 0x30018614u); /* 0x30003655: push 0x30018614 */
  11104     eax = MEM32(FS_BASE + (0)); /* 0x3000365A: mov eax, dword ptr fs:[0] */
  11105     PUSH32(esp, eax); /* 0x30003660: push eax */
  11106     MEM32(FS_BASE + (0)) = esp; /* 0x30003661: mov dword ptr fs:[0], esp */
  11107     PUSH32(esp, ecx); /* 0x30003668: push ecx */
  11108     PUSH32(esp, esi); /* 0x30003669: push esi */
  11109     esi = ecx; /* 0x3000366A: mov esi, ecx */
  11110     PUSH32(esp, edi); /* 0x3000366C: push edi */
  11111     MEM32(ebp + (-0x10)) = esi; /* 0x3000366D: mov dword ptr [ebp - 0x10], esi */
  11112     MEM32(esi) = 0x30019124u; /* 0x30003670: mov dword ptr [esi], 0x30019124 */
  11113     SET_LO8(eax, MEM8(esi + 0x2C)); /* 0x30003676: mov al, byte ptr [esi + 0x2c] */
  11114     /* test LO8(eax), LO8(eax) */ /* 0x30003679: test al, al */
  11115     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  11116     _cf = 0;
  11117     _flag_k = FK_NARROW(FK_TEST, 24);
  11118     MEM32(ebp + (-0x4)) = 1; /* 0x3000367B: mov dword ptr [ebp - 4], 1 */
  11119     if (TEST_Z(_flag_a, _flag_b)) goto L_300036A2; /* 0x30003682: je 0x300036a2 */
  11120 L_30003684:
  11121     edi = MEM32(esi + 0x8); /* 0x30003684: mov edi, dword ptr [esi + 8] */
  11122     /* cmp edi, MEM32(esi + 0xC) */ /* 0x30003687: cmp edi, dword ptr [esi + 0xc] */
  11123     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(esi + 0xC));
  11124     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11125     _flag_k = FK_CMP;
  11126     if (CMP_EQ(_flag_a, _flag_b)) goto L_300036A2; /* 0x3000368A: je 0x300036a2 */
  11127 L_3000368C:
  11128     ecx = MEM32(edi); /* 0x3000368C: mov ecx, dword ptr [edi] */
  11129     /* test ecx, ecx */ /* 0x3000368E: test ecx, ecx */
  11130     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  11131     _cf = 0;
  11132     _flag_k = FK_TEST;
  11133     if (TEST_Z(_flag_a, _flag_b)) goto L_30003698; /* 0x30003690: je 0x30003698 */
  11134 L_30003692:
  11135     eax = MEM32(ecx); /* 0x30003692: mov eax, dword ptr [ecx] */
  11136     PUSH32(esp, 1); /* 0x30003694: push 1 */
  11137     RECOMP_ICALL(MEM32(eax)); /* 0x30003696: call dword ptr [eax] */
  11138     RECOMP_FLAGS_IN();
  11139 L_30003698:
  11140     eax = MEM32(esi + 0xC); /* 0x30003698: mov eax, dword ptr [esi + 0xc] */
  11141     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(4);
  11142     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11143     edi = edi + 4; /* 0x3000369B: add edi, 4 */
  11144     _flag_k = FK_ADD;
  11145     /* cmp edi, eax */ /* 0x3000369E: cmp edi, eax */
  11146     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  11147     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11148     _flag_k = FK_CMP;
  11149     RECOMP_BACKEDGE();
  11150     if (CMP_NE(_flag_a, _flag_b)) goto L_3000368C; /* 0x300036A0: jne 0x3000368c */
  11151 L_300036A2:
  11152     edx = MEM32(esi + 0xC); /* 0x300036A2: mov edx, dword ptr [esi + 0xc] */
  11153     ecx = MEM32(esi + 0x8); /* 0x300036A5: mov ecx, dword ptr [esi + 8] */
  11154     eax = edx; /* 0x300036A8: mov eax, edx */
  11155     /* cmp eax, edx */ /* 0x300036AA: cmp eax, edx */
  11156     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
  11157     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11158     _flag_k = FK_CMP;
  11159     if (CMP_EQ(_flag_a, _flag_b)) goto L_300036BC; /* 0x300036AC: je 0x300036bc */
  11160 L_300036AE:
  11161     edi = MEM32(eax); /* 0x300036AE: mov edi, dword ptr [eax] */
  11162     MEM32(ecx) = edi; /* 0x300036B0: mov dword ptr [ecx], edi */
  11163     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(4);
  11164     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11165     eax = eax + 4; /* 0x300036B2: add eax, 4 */
  11166     _flag_k = FK_ADD;
  11167     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4);
  11168     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11169     ecx = ecx + 4; /* 0x300036B5: add ecx, 4 */
  11170     _flag_k = FK_ADD;
  11171     /* cmp eax, edx */ /* 0x300036B8: cmp eax, edx */
  11172     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edx);
  11173     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11174     _flag_k = FK_CMP;
  11175     RECOMP_BACKEDGE();
  11176     if (CMP_NE(_flag_a, _flag_b)) goto L_300036AE; /* 0x300036BA: jne 0x300036ae */
  11177 L_300036BC:
  11178     edx = MEM32(esi + 0xC); /* 0x300036BC: mov edx, dword ptr [esi + 0xc] */
  11179     MEM32(esi + 0xC) = ecx; /* 0x300036BF: mov dword ptr [esi + 0xc], ecx */
  11180     eax = MEM32(esi + 0x8); /* 0x300036C2: mov eax, dword ptr [esi + 8] */
  11181     MEM32(ebp + (-0x10)) = edx; /* 0x300036C5: mov dword ptr [ebp - 0x10], edx */
  11182     PUSH32(esp, eax); /* 0x300036C8: push eax */
  11183     MEM32(ebp + (-0x10)) = eax; /* 0x300036C9: mov dword ptr [ebp - 0x10], eax */
  11184     RECOMP_ICALL(0x30018080u); /* 0x300036CC: call 0x30018080 */ /* not lifted */
  11185     RECOMP_FLAGS_IN();
  11186     ecx = MEM32(ebp + (-0xC)); /* 0x300036D1: mov ecx, dword ptr [ebp - 0xc] */
  11187     MEM32(esi + 0x8) = 0; /* 0x300036D4: mov dword ptr [esi + 8], 0 */
  11188     MEM32(esi + 0xC) = 0; /* 0x300036DB: mov dword ptr [esi + 0xc], 0 */
  11189     MEM32(esi + 0x10) = 0; /* 0x300036E2: mov dword ptr [esi + 0x10], 0 */
  11190     eax = MEM32(0x300190F8); /* 0x300036E9: mov eax, dword ptr [0x300190f8] */
  11191     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  11192     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11193     esp = esp + 4; /* 0x300036EE: add esp, 4 */
  11194     _flag_k = FK_ADD;
  11195     MEM32(esi) = eax; /* 0x300036F1: mov dword ptr [esi], eax */
  11196     edi = POP32_VAL(esp); /* 0x300036F3: pop edi */
  11197     esi = POP32_VAL(esp); /* 0x300036F4: pop esi */
  11198     MEM32(FS_BASE + (0)) = ecx; /* 0x300036F5: mov dword ptr fs:[0], ecx */
  11199     esp = ebp; /* 0x300036FC: mov esp, ebp */
  11200     ebp = POP32_VAL(esp); /* 0x300036FE: pop ebp */
  11201     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x300036FF: ret  */
  11202     RECOMP_REGS_OUT();
  11203 }
  11204 
  11205 void sub_30003700(void) {
  11206     int _fpu_cmp = 0;
  11207     uint32_t _cf = 0;
  11208     int _df = 1;
  11209     uint32_t _flag_k = FK_NONE;
  11210     uint32_t _flag_a = 0, _flag_b = 0;
  11211     uint32_t _itail_tgt = 0;
  11212     RECOMP_REGS_LOCALS
  11213     RECOMP_ENTER(0x30003700u);
  11214 
  11215 L_30003700:
  11216     PUSH32(esp, ebp); /* 0x30003700: push ebp */
  11217     ebp = esp; /* 0x30003701: mov ebp, esp */
  11218     eax = MEM32(ecx); /* 0x30003703: mov eax, dword ptr [ecx] */
  11219     PUSH32(esp, esi); /* 0x30003705: push esi */
  11220     esi = MEM32(ebp + 0x8); /* 0x30003706: mov esi, dword ptr [ebp + 8] */
  11221     PUSH32(esp, esi); /* 0x30003709: push esi */
  11222     RECOMP_ICALL(MEM32(eax + 0x28)); /* 0x3000370A: call dword ptr [eax + 0x28] */
  11223     RECOMP_FLAGS_IN();
  11224     /* test eax, eax */ /* 0x3000370D: test eax, eax */
  11225     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11226     _cf = 0;
  11227     _flag_k = FK_TEST;
  11228     if (TEST_Z(_flag_a, _flag_b)) goto L_30003725; /* 0x3000370F: je 0x30003725 */
  11229 L_30003711:
  11230     ecx = MEM32(ebp + 0x10); /* 0x30003711: mov ecx, dword ptr [ebp + 0x10] */
  11231     edx = MEM32(eax); /* 0x30003714: mov edx, dword ptr [eax] */
  11232     PUSH32(esp, 0); /* 0x30003716: push 0 */
  11233     PUSH32(esp, 0); /* 0x30003718: push 0 */
  11234     PUSH32(esp, ecx); /* 0x3000371A: push ecx */
  11235     ecx = MEM32(ebp + 0xC); /* 0x3000371B: mov ecx, dword ptr [ebp + 0xc] */
  11236     PUSH32(esp, ecx); /* 0x3000371E: push ecx */
  11237     PUSH32(esp, esi); /* 0x3000371F: push esi */
  11238     ecx = eax; /* 0x30003720: mov ecx, eax */
  11239     RECOMP_ICALL(MEM32(edx + 0x4)); /* 0x30003722: call dword ptr [edx + 4] */
  11240     RECOMP_FLAGS_IN();
  11241 L_30003725:
  11242     esi = POP32_VAL(esp); /* 0x30003725: pop esi */
  11243     ebp = POP32_VAL(esp); /* 0x30003726: pop ebp */
  11244     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x30003727: ret 0x14 */
  11245     RECOMP_REGS_OUT();
  11246 }
  11247 
  11248 void sub_30003730(void) {
  11249     int _fpu_cmp = 0;
  11250     uint32_t _cf = 0;
  11251     int _df = 1;
  11252     uint32_t _flag_k = FK_NONE;
  11253     uint32_t _flag_a = 0, _flag_b = 0;
  11254     uint32_t _itail_tgt = 0;
  11255     RECOMP_REGS_LOCALS
  11256     RECOMP_ENTER(0x30003730u);
  11257 
  11258 L_30003730:
  11259     PUSH32(esp, ebp); /* 0x30003730: push ebp */
  11260     ebp = esp; /* 0x30003731: mov ebp, esp */
  11261     PUSH32(esp, 0xFFFFFFFFu); /* 0x30003733: push -1 */
  11262     PUSH32(esp, 0x30018628u); /* 0x30003735: push 0x30018628 */
  11263     eax = MEM32(FS_BASE + (0)); /* 0x3000373A: mov eax, dword ptr fs:[0] */
  11264     PUSH32(esp, eax); /* 0x30003740: push eax */
  11265     MEM32(FS_BASE + (0)) = esp; /* 0x30003741: mov dword ptr fs:[0], esp */
  11266     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x24u);
  11267     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11268     esp = esp - 0x24u; /* 0x30003748: sub esp, 0x24 */
  11269     _flag_k = FK_CMP;
  11270     fp_push(*(float*)&MEM32(ecx + 0x24)); /* 0x3000374B: fld dword ptr [ecx + 0x24] */
  11271     eax = MEM32(ecx + 0x14); /* 0x3000374E: mov eax, dword ptr [ecx + 0x14] */
  11272     edx = MEM32(ebp + 0x8); /* 0x30003751: mov edx, dword ptr [ebp + 8] */
  11273     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x14)) = _v; } /* 0x30003754: fstp dword ptr [ebp - 0x14] */
  11274     PUSH32(esp, esi); /* 0x30003757: push esi */
  11275     esi = MEM32(ebp + 0xC); /* 0x30003758: mov esi, dword ptr [ebp + 0xc] */
  11276     PUSH32(esp, edi); /* 0x3000375B: push edi */
  11277     edi = MEM32(ebp + 0x14); /* 0x3000375C: mov edi, dword ptr [ebp + 0x14] */
  11278     MEM32(ebp + (-0x20)) = edi; /* 0x3000375F: mov dword ptr [ebp - 0x20], edi */
  11279     edi = MEM32(ebp + 0x10); /* 0x30003762: mov edi, dword ptr [ebp + 0x10] */
  11280     MEM32(ebp + (-0x2C)) = ecx; /* 0x30003765: mov dword ptr [ebp - 0x2c], ecx */
  11281     MEM32(ebp + (-0x28)) = edx; /* 0x30003768: mov dword ptr [ebp - 0x28], edx */
  11282     MEM32(ebp + (-0x24)) = esi; /* 0x3000376B: mov dword ptr [ebp - 0x24], esi */
  11283     MEM32(ebp + (-0x1C)) = edi; /* 0x3000376E: mov dword ptr [ebp - 0x1c], edi */
  11284     MEM8(ebp + (-0x18)) = (uint8_t)(0); /* 0x30003771: mov byte ptr [ebp - 0x18], 0 */
  11285     MEM32(ebp + (-0x10)) = eax; /* 0x30003775: mov dword ptr [ebp - 0x10], eax */
  11286     MEM32(ebp + (-0x30)) = 0x30019154u; /* 0x30003778: mov dword ptr [ebp - 0x30], 0x30019154 */
  11287     edi = MEM32(ecx + 0x20); /* 0x3000377F: mov edi, dword ptr [ecx + 0x20] */
  11288     PUSH32(esp, edi); /* 0x30003782: push edi */
  11289     edi = MEM32(ecx + 0x1C); /* 0x30003783: mov edi, dword ptr [ecx + 0x1c] */
  11290     ecx = MEM32(ecx + 0x18); /* 0x30003786: mov ecx, dword ptr [ecx + 0x18] */
  11291     PUSH32(esp, edi); /* 0x30003789: push edi */
  11292     PUSH32(esp, ecx); /* 0x3000378A: push ecx */
  11293     PUSH32(esp, eax); /* 0x3000378B: push eax */
  11294     eax = ebp + (-0x30); /* 0x3000378C: lea eax, [ebp - 0x30] */
  11295     PUSH32(esp, eax); /* 0x3000378F: push eax */
  11296     PUSH32(esp, esi); /* 0x30003790: push esi */
  11297     PUSH32(esp, edx); /* 0x30003791: push edx */
  11298     MEM32(ebp + (-0x4)) = 0; /* 0x30003792: mov dword ptr [ebp - 4], 0 */
  11299     RECOMP_ICALL(MEM32(0x300190F4)); /* 0x30003799: call dword ptr [0x300190f4] */
  11300     RECOMP_FLAGS_IN();
  11301     ecx = MEM32(ebp + (-0xC)); /* 0x3000379F: mov ecx, dword ptr [ebp - 0xc] */
  11302     SET_LO8(eax, MEM8(ebp + (-0x18))); /* 0x300037A2: mov al, byte ptr [ebp - 0x18] */
  11303     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu);
  11304     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11305     esp = esp + 0x1Cu; /* 0x300037A5: add esp, 0x1c */
  11306     _flag_k = FK_ADD;
  11307     edi = POP32_VAL(esp); /* 0x300037A8: pop edi */
  11308     esi = POP32_VAL(esp); /* 0x300037A9: pop esi */
  11309     MEM32(FS_BASE + (0)) = ecx; /* 0x300037AA: mov dword ptr fs:[0], ecx */
  11310     esp = ebp; /* 0x300037B1: mov esp, ebp */
  11311     ebp = POP32_VAL(esp); /* 0x300037B3: pop ebp */
  11312     RECOMP_FLAGS_OUT(); esp += 28; { RECOMP_REGS_OUT(); return; } /* 0x300037B4: ret 0x18 */
  11313     RECOMP_REGS_OUT();
  11314 }
  11315 
  11316 void sub_300037C0(void) {
  11317     int _fpu_cmp = 0;
  11318     uint32_t _cf = 0;
  11319     int _df = 1;
  11320     uint32_t _flag_k = FK_NONE;
  11321     uint32_t _flag_a = 0, _flag_b = 0;
  11322     uint32_t _itail_tgt = 0;
  11323     RECOMP_REGS_LOCALS
  11324     RECOMP_ENTER(0x300037C0u);
  11325 
  11326 L_300037C0:
  11327     PUSH32(esp, ebp); /* 0x300037C0: push ebp */
  11328     ebp = esp; /* 0x300037C1: mov ebp, esp */
  11329     PUSH32(esp, ecx); /* 0x300037C3: push ecx */
  11330     PUSH32(esp, ebx); /* 0x300037C4: push ebx */
  11331     PUSH32(esp, esi); /* 0x300037C5: push esi */
  11332     esi = ecx; /* 0x300037C6: mov esi, ecx */
  11333     SET_LO8(eax, MEM8(esi + 0x18)); /* 0x300037C8: mov al, byte ptr [esi + 0x18] */
  11334     /* test LO8(eax), LO8(eax) */ /* 0x300037CB: test al, al */
  11335     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  11336     _cf = 0;
  11337     _flag_k = FK_NARROW(FK_TEST, 24);
  11338     PUSH32(esp, edi); /* 0x300037CD: push edi */
  11339     if (TEST_NZ(_flag_a, _flag_b)) goto L_30003874; /* 0x300037CE: jne 0x30003874 */
  11340 L_300037D4:
  11341     edi = MEM32(ebp + 0x8); /* 0x300037D4: mov edi, dword ptr [ebp + 8] */
  11342     /* cmp edi, 0xFFFFFFFFu */ /* 0x300037D7: cmp edi, -1 */
  11343     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0xFFFFFFFFu);
  11344     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11345     _flag_k = FK_CMP;
  11346     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003874; /* 0x300037DA: je 0x30003874 */
  11347 L_300037E0:
  11348     ecx = MEM32(esi + 0x4); /* 0x300037E0: mov ecx, dword ptr [esi + 4] */
  11349     eax = MEM32(ecx); /* 0x300037E3: mov eax, dword ptr [ecx] */
  11350     PUSH32(esp, edi); /* 0x300037E5: push edi */
  11351     RECOMP_ICALL(MEM32(eax + 0x24)); /* 0x300037E6: call dword ptr [eax + 0x24] */
  11352     RECOMP_FLAGS_IN();
  11353     /* test eax, eax */ /* 0x300037E9: test eax, eax */
  11354     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11355     _cf = 0;
  11356     _flag_k = FK_TEST;
  11357     if (TEST_Z(_flag_a, _flag_b)) goto L_30003874; /* 0x300037EB: je 0x30003874 */
  11358 L_300037F1:
  11359     ecx = MEM32(esi + 0x10); /* 0x300037F1: mov ecx, dword ptr [esi + 0x10] */
  11360     edx = MEM32(eax); /* 0x300037F4: mov edx, dword ptr [eax] */
  11361     PUSH32(esp, 0); /* 0x300037F6: push 0 */
  11362     PUSH32(esp, 0); /* 0x300037F8: push 0 */
  11363     PUSH32(esp, ecx); /* 0x300037FA: push ecx */
  11364     ecx = MEM32(esi + 0x14); /* 0x300037FB: mov ecx, dword ptr [esi + 0x14] */
  11365     PUSH32(esp, ecx); /* 0x300037FE: push ecx */
  11366     ecx = MEM32(esi + 0xC); /* 0x300037FF: mov ecx, dword ptr [esi + 0xc] */
  11367     PUSH32(esp, ecx); /* 0x30003802: push ecx */
  11368     ecx = MEM32(esi + 0x8); /* 0x30003803: mov ecx, dword ptr [esi + 8] */
  11369     PUSH32(esp, ecx); /* 0x30003806: push ecx */
  11370     ecx = eax; /* 0x30003807: mov ecx, eax */
  11371     RECOMP_ICALL(MEM32(edx + 0x10)); /* 0x30003809: call dword ptr [edx + 0x10] */
  11372     RECOMP_FLAGS_IN();
  11373     /* test LO8(eax), LO8(eax) */ /* 0x3000380C: test al, al */
  11374     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  11375     _cf = 0;
  11376     _flag_k = FK_NARROW(FK_TEST, 24);
  11377     if (TEST_Z(_flag_a, _flag_b)) goto L_30003874; /* 0x3000380E: je 0x30003874 */
  11378 L_30003810:
  11379     ecx = MEM32(esi + 0x20); /* 0x30003810: mov ecx, dword ptr [esi + 0x20] */
  11380     eax = edi; /* 0x30003813: mov eax, edi */
  11381     edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x30003815: cdq  */
  11382     { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)ecx; /* 0x30003816: idiv ecx */
  11383       if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); }
  11384       else { eax = 0; edx = 0; } }
  11385     eax = edi; /* 0x30003818: mov eax, edi */
  11386     ebx = edx; /* 0x3000381A: mov ebx, edx */
  11387     edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x3000381C: cdq  */
  11388     { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)ecx; /* 0x3000381D: idiv ecx */
  11389       if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); }
  11390       else { eax = 0; edx = 0; } }
  11391     ecx = MEM32(esi + 0x14); /* 0x3000381F: mov ecx, dword ptr [esi + 0x14] */
  11392     MEM32(ebp + 0x8) = ebx; /* 0x30003822: mov dword ptr [ebp + 8], ebx */
  11393     fp_push((double)(int32_t)MEM32(ebp + 0x8)); /* 0x30003825: fild dword ptr [ebp + 8] */
  11394     _st[0] *= (double)*(float*)ADDR(esi + 0x1C); /* 0x30003828: fmul dword ptr [esi + 0x1c] */
  11395     _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ecx)); /* 0x3000382B: fcomp dword ptr [ecx] */
  11396     fp_pop();
  11397     edx = eax; /* 0x3000382D: mov edx, eax */
  11398     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x3000382F: fnstsw ax */
  11399     MEM32(ebp + (-0x4)) = edx; /* 0x30003831: mov dword ptr [ebp - 4], edx */
  11400     /* test HI8(eax), 0x41u */ /* 0x30003834: test ah, 0x41 */
  11401     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24;
  11402     _cf = 0;
  11403     _flag_k = FK_NARROW(FK_TEST, 24);
  11404     if (TEST_Z(_flag_a, _flag_b)) goto L_30003874; /* 0x30003837: je 0x30003874 */
  11405 L_30003839:
  11406     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(1);
  11407     ebx = ebx + 1; /* 0x30003839: inc ebx */
  11408     _flag_k = FK_INC;
  11409     MEM32(ebp + 0x8) = ebx; /* 0x3000383A: mov dword ptr [ebp + 8], ebx */
  11410     fp_push((double)(int32_t)MEM32(ebp + 0x8)); /* 0x3000383D: fild dword ptr [ebp + 8] */
  11411     _st[0] *= (double)*(float*)ADDR(esi + 0x1C); /* 0x30003840: fmul dword ptr [esi + 0x1c] */
  11412     _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ecx)); /* 0x30003843: fcomp dword ptr [ecx] */
  11413     fp_pop();
  11414     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x30003845: fnstsw ax */
  11415     /* test HI8(eax), 1 */ /* 0x30003847: test ah, 1 */
  11416     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
  11417     _cf = 0;
  11418     _flag_k = FK_NARROW(FK_TEST, 24);
  11419     if (TEST_NZ(_flag_a, _flag_b)) goto L_30003874; /* 0x3000384A: jne 0x30003874 */
  11420 L_3000384C:
  11421     fp_push((double)(int32_t)MEM32(ebp + (-0x4))); /* 0x3000384C: fild dword ptr [ebp - 4] */
  11422     _st[0] *= (double)*(float*)ADDR(esi + 0x1C); /* 0x3000384F: fmul dword ptr [esi + 0x1c] */
  11423     _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ecx + 0x8)); /* 0x30003852: fcomp dword ptr [ecx + 8] */
  11424     fp_pop();
  11425     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x30003855: fnstsw ax */
  11426     /* test HI8(eax), 0x41u */ /* 0x30003857: test ah, 0x41 */
  11427     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(0x41u) << 24;
  11428     _cf = 0;
  11429     _flag_k = FK_NARROW(FK_TEST, 24);
  11430     if (TEST_Z(_flag_a, _flag_b)) goto L_30003874; /* 0x3000385A: je 0x30003874 */
  11431 L_3000385C:
  11432     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(1);
  11433     edx = edx + 1; /* 0x3000385C: inc edx */
  11434     _flag_k = FK_INC;
  11435     MEM32(ebp + 0x8) = edx; /* 0x3000385D: mov dword ptr [ebp + 8], edx */
  11436     fp_push((double)(int32_t)MEM32(ebp + 0x8)); /* 0x30003860: fild dword ptr [ebp + 8] */
  11437     _st[0] *= (double)*(float*)ADDR(esi + 0x1C); /* 0x30003863: fmul dword ptr [esi + 0x1c] */
  11438     _fpu_cmp = FPU_CMP(_st[0], (double)*(float*)ADDR(ecx + 0x8)); /* 0x30003866: fcomp dword ptr [ecx + 8] */
  11439     fp_pop();
  11440     eax = (eax & 0xFFFF0000u) | ((_fpu_cmp >= 0x10000) ? (uint32_t)(_fpu_cmp & 0x4700) : _fpu_cmp == 2 ? 0x4500u : _fpu_cmp < 0 ? 0x0100u : _fpu_cmp == 0 ? 0x4000u : 0x0000u); /* 0x30003869: fnstsw ax */
  11441     /* test HI8(eax), 1 */ /* 0x3000386B: test ah, 1 */
  11442     _flag_a = (uint32_t)(HI8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
  11443     _cf = 0;
  11444     _flag_k = FK_NARROW(FK_TEST, 24);
  11445     if (TEST_NZ(_flag_a, _flag_b)) goto L_30003874; /* 0x3000386E: jne 0x30003874 */
  11446 L_30003870:
  11447     MEM8(esi + 0x18) = (uint8_t)(1); /* 0x30003870: mov byte ptr [esi + 0x18], 1 */
  11448 L_30003874:
  11449     edi = POP32_VAL(esp); /* 0x30003874: pop edi */
  11450     esi = POP32_VAL(esp); /* 0x30003875: pop esi */
  11451     ebx = POP32_VAL(esp); /* 0x30003876: pop ebx */
  11452     esp = ebp; /* 0x30003877: mov esp, ebp */
  11453     ebp = POP32_VAL(esp); /* 0x30003879: pop ebp */
  11454     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3000387A: ret 4 */
  11455     RECOMP_REGS_OUT();
  11456 }
  11457 
  11458 void sub_30003880(void) {
  11459     int _fpu_cmp = 0;
  11460     uint32_t _cf = 0;
  11461     int _df = 1;
  11462     uint32_t _flag_k = FK_NONE;
  11463     uint32_t _flag_a = 0, _flag_b = 0;
  11464     uint32_t _itail_tgt = 0;
  11465     RECOMP_REGS_LOCALS
  11466     RECOMP_ENTER(0x30003880u);
  11467 
  11468 L_30003880:
  11469     PUSH32(esp, ebp); /* 0x30003880: push ebp */
  11470     ebp = esp; /* 0x30003881: mov ebp, esp */
  11471     PUSH32(esp, esi); /* 0x30003883: push esi */
  11472     esi = ecx; /* 0x30003884: mov esi, ecx */
  11473     RECOMP_ICALL(0x30004980u); /* 0x30003886: call 0x30004980 */ /* not lifted */
  11474     RECOMP_FLAGS_IN();
  11475     /* test MEM8(ebp + 0x8), 1 */ /* 0x3000388B: test byte ptr [ebp + 8], 1 */
  11476     _flag_a = (uint32_t)(MEM8(ebp + 0x8)) << 24; _flag_b = (uint32_t)(1) << 24;
  11477     _cf = 0;
  11478     _flag_k = FK_NARROW(FK_TEST, 24);
  11479     if (TEST_Z(_flag_a, _flag_b)) goto L_3000389A; /* 0x3000388F: je 0x3000389a */
  11480 L_30003891:
  11481     PUSH32(esp, esi); /* 0x30003891: push esi */
  11482     RECOMP_ICALL(0x30018080u); /* 0x30003892: call 0x30018080 */ /* not lifted */
  11483     RECOMP_FLAGS_IN();
  11484     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  11485     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11486     esp = esp + 4; /* 0x30003897: add esp, 4 */
  11487     _flag_k = FK_ADD;
  11488 L_3000389A:
  11489     eax = esi; /* 0x3000389A: mov eax, esi */
  11490     esi = POP32_VAL(esp); /* 0x3000389C: pop esi */
  11491     ebp = POP32_VAL(esp); /* 0x3000389D: pop ebp */
  11492     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3000389E: ret 4 */
  11493     RECOMP_REGS_OUT();
  11494 }
  11495 
  11496 void sub_300038B0(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(0x300038B0u);
  11505 
  11506 L_300038B0:
  11507     PUSH32(esp, ebp); /* 0x300038B0: push ebp */
  11508     ebp = esp; /* 0x300038B1: mov ebp, esp */
  11509     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xCu);
  11510     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11511     esp = esp - 0xCu; /* 0x300038B3: sub esp, 0xc */
  11512     _flag_k = FK_CMP;
  11513     edx = MEM32(ebp + 0x18); /* 0x300038B6: mov edx, dword ptr [ebp + 0x18] */
  11514     eax = MEM32(ecx); /* 0x300038B9: mov eax, dword ptr [ecx] */
  11515     PUSH32(esp, edx); /* 0x300038BB: push edx */
  11516     edx = MEM32(ebp + 0x14); /* 0x300038BC: mov edx, dword ptr [ebp + 0x14] */
  11517     PUSH32(esp, edx); /* 0x300038BF: push edx */
  11518     edx = ebp + (-0xC); /* 0x300038C0: lea edx, [ebp - 0xc] */
  11519     PUSH32(esp, edx); /* 0x300038C3: push edx */
  11520     edx = MEM32(ebp + 0x10); /* 0x300038C4: mov edx, dword ptr [ebp + 0x10] */
  11521     PUSH32(esp, edx); /* 0x300038C7: push edx */
  11522     edx = MEM32(ebp + 0xC); /* 0x300038C8: mov edx, dword ptr [ebp + 0xc] */
  11523     PUSH32(esp, edx); /* 0x300038CB: push edx */
  11524     edx = MEM32(ebp + 0x8); /* 0x300038CC: mov edx, dword ptr [ebp + 8] */
  11525     PUSH32(esp, edx); /* 0x300038CF: push edx */
  11526     MEM32(ebp + (-0xC)) = 0; /* 0x300038D0: mov dword ptr [ebp - 0xc], 0 */
  11527     MEM32(ebp + (-0x8)) = 0; /* 0x300038D7: mov dword ptr [ebp - 8], 0 */
  11528     MEM32(ebp + (-0x4)) = 0; /* 0x300038DE: mov dword ptr [ebp - 4], 0 */
  11529     RECOMP_ICALL(MEM32(eax + 0x10)); /* 0x300038E5: call dword ptr [eax + 0x10] */
  11530     RECOMP_FLAGS_IN();
  11531     esp = ebp; /* 0x300038E8: mov esp, ebp */
  11532     ebp = POP32_VAL(esp); /* 0x300038EA: pop ebp */
  11533     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x300038EB: ret 0x14 */
  11534     RECOMP_REGS_OUT();
  11535 }
  11536 
  11537 void sub_300038F0(void) {
  11538     int _fpu_cmp = 0;
  11539     uint32_t _cf = 0;
  11540     int _df = 1;
  11541     uint32_t _flag_k = FK_NONE;
  11542     uint32_t _flag_a = 0, _flag_b = 0;
  11543     uint32_t _itail_tgt = 0;
  11544     RECOMP_REGS_LOCALS
  11545     RECOMP_ENTER(0x300038F0u);
  11546 
  11547 L_300038F0:
  11548     PUSH32(esp, ebp); /* 0x300038F0: push ebp */
  11549     ebp = esp; /* 0x300038F1: mov ebp, esp */
  11550     eax = MEM32(ecx); /* 0x300038F3: mov eax, dword ptr [ecx] */
  11551     PUSH32(esp, esi); /* 0x300038F5: push esi */
  11552     esi = MEM32(ebp + 0x8); /* 0x300038F6: mov esi, dword ptr [ebp + 8] */
  11553     PUSH32(esp, esi); /* 0x300038F9: push esi */
  11554     RECOMP_ICALL(MEM32(eax + 0x28)); /* 0x300038FA: call dword ptr [eax + 0x28] */
  11555     RECOMP_FLAGS_IN();
  11556     /* test eax, eax */ /* 0x300038FD: test eax, eax */
  11557     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11558     _cf = 0;
  11559     _flag_k = FK_TEST;
  11560     if (TEST_NZ(_flag_a, _flag_b)) goto L_30003908; /* 0x300038FF: jne 0x30003908 */
  11561 L_30003901:
  11562     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
  11563     SET_LO8(eax, 0); /* 0x30003901: xor al, al */
  11564     _cf = 0;
  11565     _flag_k = FK_NARROW(FK_TEST, 24);
  11566     esi = POP32_VAL(esp); /* 0x30003903: pop esi */
  11567     ebp = POP32_VAL(esp); /* 0x30003904: pop ebp */
  11568     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x30003905: ret 0x14 */
  11569 L_30003908:
  11570     ecx = MEM32(ebp + 0x18); /* 0x30003908: mov ecx, dword ptr [ebp + 0x18] */
  11571     edx = MEM32(eax); /* 0x3000390B: mov edx, dword ptr [eax] */
  11572     PUSH32(esp, ecx); /* 0x3000390D: push ecx */
  11573     ecx = MEM32(ebp + 0x14); /* 0x3000390E: mov ecx, dword ptr [ebp + 0x14] */
  11574     PUSH32(esp, ecx); /* 0x30003911: push ecx */
  11575     ecx = MEM32(ebp + 0x10); /* 0x30003912: mov ecx, dword ptr [ebp + 0x10] */
  11576     PUSH32(esp, ecx); /* 0x30003915: push ecx */
  11577     ecx = MEM32(ebp + 0xC); /* 0x30003916: mov ecx, dword ptr [ebp + 0xc] */
  11578     PUSH32(esp, ecx); /* 0x30003919: push ecx */
  11579     PUSH32(esp, esi); /* 0x3000391A: push esi */
  11580     ecx = eax; /* 0x3000391B: mov ecx, eax */
  11581     RECOMP_ICALL(MEM32(edx + 0x18)); /* 0x3000391D: call dword ptr [edx + 0x18] */
  11582     RECOMP_FLAGS_IN();
  11583     esi = POP32_VAL(esp); /* 0x30003920: pop esi */
  11584     ebp = POP32_VAL(esp); /* 0x30003921: pop ebp */
  11585     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x30003922: ret 0x14 */
  11586     RECOMP_REGS_OUT();
  11587 }
  11588 
  11589 void sub_30003930(void) {
  11590     int _fpu_cmp = 0;
  11591     uint32_t _cf = 0;
  11592     int _df = 1;
  11593     uint32_t _flag_k = FK_NONE;
  11594     uint32_t _flag_a = 0, _flag_b = 0;
  11595     uint32_t _itail_tgt = 0;
  11596     RECOMP_REGS_LOCALS
  11597     RECOMP_ENTER(0x30003930u);
  11598 
  11599 L_30003930:
  11600     PUSH32(esp, ebp); /* 0x30003930: push ebp */
  11601     ebp = esp; /* 0x30003931: mov ebp, esp */
  11602     PUSH32(esp, ebx); /* 0x30003933: push ebx */
  11603     ebx = MEM32(ebp + 0x8); /* 0x30003934: mov ebx, dword ptr [ebp + 8] */
  11604     fp_push(*(float*)&MEM32(ebx)); /* 0x30003937: fld dword ptr [ebx] */
  11605     PUSH32(esp, esi); /* 0x30003939: push esi */
  11606     esi = ecx; /* 0x3000393A: mov esi, ecx */
  11607     _st[0] /= (double)*(float*)ADDR(esi + 0x24); /* 0x3000393C: fdiv dword ptr [esi + 0x24] */
  11608     PUSH32(esp, edi); /* 0x3000393F: push edi */
  11609     RECOMP_ICALL(0x300181F8u); /* 0x30003940: call 0x300181f8 */ /* not lifted */
  11610     RECOMP_FLAGS_IN();
  11611     fp_push(*(float*)&MEM32(ebx + 0x8)); /* 0x30003945: fld dword ptr [ebx + 8] */
  11612     _st[0] /= (double)*(float*)ADDR(esi + 0x28); /* 0x30003948: fdiv dword ptr [esi + 0x28] */
  11613     edi = eax; /* 0x3000394B: mov edi, eax */
  11614     RECOMP_ICALL(0x300181F8u); /* 0x3000394D: call 0x300181f8 */ /* not lifted */
  11615     RECOMP_FLAGS_IN();
  11616     /* test edi, edi */ /* 0x30003952: test edi, edi */
  11617     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
  11618     _cf = 0;
  11619     _flag_k = FK_TEST;
  11620     if (TEST_S(_flag_a, _flag_b)) goto L_3000397D; /* 0x30003954: jl 0x3000397d */
  11621 L_30003956:
  11622     ecx = MEM32(esi + 0x14); /* 0x30003956: mov ecx, dword ptr [esi + 0x14] */
  11623     /* cmp edi, ecx */ /* 0x30003959: cmp edi, ecx */
  11624     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx);
  11625     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11626     _flag_k = FK_CMP;
  11627     if (CMP_GE(_flag_a, _flag_b)) goto L_3000397D; /* 0x3000395B: jge 0x3000397d */
  11628 L_3000395D:
  11629     /* test eax, eax */ /* 0x3000395D: test eax, eax */
  11630     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11631     _cf = 0;
  11632     _flag_k = FK_TEST;
  11633     if (TEST_S(_flag_a, _flag_b)) goto L_3000397D; /* 0x3000395F: jl 0x3000397d */
  11634 L_30003961:
  11635     /* cmp eax, MEM32(esi + 0x18) */ /* 0x30003961: cmp eax, dword ptr [esi + 0x18] */
  11636     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(esi + 0x18));
  11637     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11638     _flag_k = FK_CMP;
  11639     if (CMP_GE(_flag_a, _flag_b)) goto L_3000397D; /* 0x30003964: jge 0x3000397d */
  11640 L_30003966:
  11641     ecx = (uint32_t)((int32_t)ecx * (int32_t)eax); /* 0x30003966: imul ecx, eax */
  11642     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edi);
  11643     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11644     ecx = ecx + edi; /* 0x30003969: add ecx, edi */
  11645     _flag_k = FK_ADD;
  11646     /* cmp ecx, 0xFFFFFFFFu */ /* 0x3000396B: cmp ecx, -1 */
  11647     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFFFFFFFFu);
  11648     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11649     _flag_k = FK_CMP;
  11650     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000397D; /* 0x3000396E: je 0x3000397d */
  11651 L_30003970:
  11652     eax = MEM32(esi + 0x8); /* 0x30003970: mov eax, dword ptr [esi + 8] */
  11653     eax = MEM32(eax + ecx * 4); /* 0x30003973: mov eax, dword ptr [eax + ecx*4] */
  11654     edi = POP32_VAL(esp); /* 0x30003976: pop edi */
  11655     esi = POP32_VAL(esp); /* 0x30003977: pop esi */
  11656     ebx = POP32_VAL(esp); /* 0x30003978: pop ebx */
  11657     ebp = POP32_VAL(esp); /* 0x30003979: pop ebp */
  11658     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x3000397A: ret 4 */
  11659 L_3000397D:
  11660     ecx = MEM32(esi + 0x8); /* 0x3000397D: mov ecx, dword ptr [esi + 8] */
  11661     eax = MEM32(ecx); /* 0x30003980: mov eax, dword ptr [ecx] */
  11662     edi = POP32_VAL(esp); /* 0x30003982: pop edi */
  11663     esi = POP32_VAL(esp); /* 0x30003983: pop esi */
  11664     ebx = POP32_VAL(esp); /* 0x30003984: pop ebx */
  11665     ebp = POP32_VAL(esp); /* 0x30003985: pop ebp */
  11666     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30003986: ret 4 */
  11667     RECOMP_REGS_OUT();
  11668 }
  11669 
  11670 void sub_30003990(void) {
  11671     int _fpu_cmp = 0;
  11672     uint32_t _cf = 0;
  11673     int _df = 1;
  11674     uint32_t _flag_k = FK_NONE;
  11675     uint32_t _flag_a = 0, _flag_b = 0;
  11676     uint32_t _itail_tgt = 0;
  11677     RECOMP_REGS_LOCALS
  11678     RECOMP_ENTER(0x30003990u);
  11679 
  11680 L_30003990:
  11681     PUSH32(esp, ebp); /* 0x30003990: push ebp */
  11682     ebp = esp; /* 0x30003991: mov ebp, esp */
  11683     PUSH32(esp, ecx); /* 0x30003993: push ecx */
  11684     PUSH32(esp, esi); /* 0x30003994: push esi */
  11685     esi = ecx; /* 0x30003995: mov esi, ecx */
  11686     SET_LO8(ecx, MEM8(0x3001E3B4)); /* 0x30003997: mov cl, byte ptr [0x3001e3b4] */
  11687     SET_LO8(eax, 1); /* 0x3000399D: mov al, 1 */
  11688     /* test LO8(eax), LO8(ecx) */ /* 0x3000399F: test al, cl */
  11689     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ecx)) << 24;
  11690     _cf = 0;
  11691     _flag_k = FK_NARROW(FK_TEST, 24);
  11692     PUSH32(esp, edi); /* 0x300039A1: push edi */
  11693     if (TEST_NZ(_flag_a, _flag_b)) goto L_300039D9; /* 0x300039A2: jne 0x300039d9 */
  11694 L_300039A4:
  11695     SET_LO8(edx, LO8(ecx)); /* 0x300039A4: mov dl, cl */
  11696     _flag_a = (uint32_t)((LO8(edx) | LO8(eax))) << 24; _flag_b = (uint32_t)((LO8(edx) | LO8(eax))) << 24;
  11697     SET_LO8(edx, LO8(edx) | LO8(eax)); /* 0x300039A6: or dl, al */
  11698     _cf = 0;
  11699     _flag_k = FK_NARROW(FK_TEST, 24);
  11700     PUSH32(esp, 0x30003A20u); /* 0x300039A8: push 0x30003a20 */
  11701     MEM8(0x3001E3B4) = (uint8_t)(LO8(edx)); /* 0x300039AD: mov byte ptr [0x3001e3b4], dl */
  11702     MEM32(0x3001E3A8) = 0; /* 0x300039B3: mov dword ptr [0x3001e3a8], 0 */
  11703     MEM32(0x3001E3AC) = 0; /* 0x300039BD: mov dword ptr [0x3001e3ac], 0 */
  11704     MEM32(0x3001E3B0) = 0; /* 0x300039C7: mov dword ptr [0x3001e3b0], 0 */
  11705     RECOMP_ICALL(0x300180ECu); /* 0x300039D1: call 0x300180ec */ /* not lifted */
  11706     RECOMP_FLAGS_IN();
  11707     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  11708     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11709     esp = esp + 4; /* 0x300039D6: add esp, 4 */
  11710     _flag_k = FK_ADD;
  11711 L_300039D9:
  11712     edi = MEM32(ebp + 0x8); /* 0x300039D9: mov edi, dword ptr [ebp + 8] */
  11713     eax = MEM32(esi); /* 0x300039DC: mov eax, dword ptr [esi] */
  11714     PUSH32(esp, edi); /* 0x300039DE: push edi */
  11715     ecx = esi; /* 0x300039DF: mov ecx, esi */
  11716     RECOMP_ICALL(MEM32(eax + 0x28)); /* 0x300039E1: call dword ptr [eax + 0x28] */
  11717     RECOMP_FLAGS_IN();
  11718     /* test eax, eax */ /* 0x300039E4: test eax, eax */
  11719     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11720     _cf = 0;
  11721     _flag_k = FK_TEST;
  11722     if (TEST_NZ(_flag_a, _flag_b)) goto L_300039F2; /* 0x300039E6: jne 0x300039f2 */
  11723 L_300039E8:
  11724     edi = POP32_VAL(esp); /* 0x300039E8: pop edi */
  11725     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
  11726     SET_LO8(eax, 0); /* 0x300039E9: xor al, al */
  11727     _cf = 0;
  11728     _flag_k = FK_NARROW(FK_TEST, 24);
  11729     esi = POP32_VAL(esp); /* 0x300039EB: pop esi */
  11730     esp = ebp; /* 0x300039EC: mov esp, ebp */
  11731     ebp = POP32_VAL(esp); /* 0x300039EE: pop ebp */
  11732     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x300039EF: ret 0xc */
  11733 L_300039F2:
  11734     edx = MEM32(eax); /* 0x300039F2: mov edx, dword ptr [eax] */
  11735     ecx = ebp + (-0x4); /* 0x300039F4: lea ecx, [ebp - 4] */
  11736     PUSH32(esp, ecx); /* 0x300039F7: push ecx */
  11737     ecx = MEM32(ebp + 0x10); /* 0x300039F8: mov ecx, dword ptr [ebp + 0x10] */
  11738     PUSH32(esp, 0x3001E3A8u); /* 0x300039FB: push 0x3001e3a8 */
  11739     PUSH32(esp, ecx); /* 0x30003A00: push ecx */
  11740     ecx = MEM32(ebp + 0xC); /* 0x30003A01: mov ecx, dword ptr [ebp + 0xc] */
  11741     PUSH32(esp, ecx); /* 0x30003A04: push ecx */
  11742     PUSH32(esp, edi); /* 0x30003A05: push edi */
  11743     ecx = eax; /* 0x30003A06: mov ecx, eax */
  11744     RECOMP_ICALL(MEM32(edx + 0x18)); /* 0x30003A08: call dword ptr [edx + 0x18] */
  11745     RECOMP_FLAGS_IN();
  11746     edi = POP32_VAL(esp); /* 0x30003A0B: pop edi */
  11747     esi = POP32_VAL(esp); /* 0x30003A0C: pop esi */
  11748     esp = ebp; /* 0x30003A0D: mov esp, ebp */
  11749     ebp = POP32_VAL(esp); /* 0x30003A0F: pop ebp */
  11750     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30003A10: ret 0xc */
  11751     RECOMP_REGS_OUT();
  11752 }
  11753 
  11754 void sub_30003A20(void) {
  11755     int _fpu_cmp = 0;
  11756     uint32_t _cf = 0;
  11757     int _df = 1;
  11758     uint32_t _flag_k = FK_NONE;
  11759     uint32_t _flag_a = 0, _flag_b = 0;
  11760     uint32_t _itail_tgt = 0;
  11761     RECOMP_REGS_LOCALS
  11762     RECOMP_ENTER(0x30003A20u);
  11763 
  11764 L_30003A20:
  11765     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30003A20: ret  */
  11766     RECOMP_REGS_OUT();
  11767 }
  11768 
  11769 void sub_30003A30(void) {
  11770     int _fpu_cmp = 0;
  11771     uint32_t _cf = 0;
  11772     int _df = 1;
  11773     uint32_t _flag_k = FK_NONE;
  11774     uint32_t _flag_a = 0, _flag_b = 0;
  11775     uint32_t _itail_tgt = 0;
  11776     RECOMP_REGS_LOCALS
  11777     RECOMP_ENTER(0x30003A30u);
  11778 
  11779 L_30003A30:
  11780     PUSH32(esp, ebp); /* 0x30003A30: push ebp */
  11781     ebp = esp; /* 0x30003A31: mov ebp, esp */
  11782     eax = MEM32(ecx); /* 0x30003A33: mov eax, dword ptr [ecx] */
  11783     PUSH32(esp, esi); /* 0x30003A35: push esi */
  11784     esi = MEM32(ebp + 0x8); /* 0x30003A36: mov esi, dword ptr [ebp + 8] */
  11785     PUSH32(esp, esi); /* 0x30003A39: push esi */
  11786     RECOMP_ICALL(MEM32(eax + 0x28)); /* 0x30003A3A: call dword ptr [eax + 0x28] */
  11787     RECOMP_FLAGS_IN();
  11788     /* test eax, eax */ /* 0x30003A3D: test eax, eax */
  11789     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  11790     _cf = 0;
  11791     _flag_k = FK_TEST;
  11792     if (TEST_Z(_flag_a, _flag_b)) goto L_30003A52; /* 0x30003A3F: je 0x30003a52 */
  11793 L_30003A41:
  11794     ecx = MEM32(ebp + 0xC); /* 0x30003A41: mov ecx, dword ptr [ebp + 0xc] */
  11795     edx = MEM32(eax); /* 0x30003A44: mov edx, dword ptr [eax] */
  11796     PUSH32(esp, ecx); /* 0x30003A46: push ecx */
  11797     PUSH32(esp, esi); /* 0x30003A47: push esi */
  11798     ecx = eax; /* 0x30003A48: mov ecx, eax */
  11799     RECOMP_ICALL(MEM32(edx + 0x1C)); /* 0x30003A4A: call dword ptr [edx + 0x1c] */
  11800     RECOMP_FLAGS_IN();
  11801     esi = POP32_VAL(esp); /* 0x30003A4D: pop esi */
  11802     ebp = POP32_VAL(esp); /* 0x30003A4E: pop ebp */
  11803     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x30003A4F: ret 8 */
  11804 L_30003A52:
  11805     _flag_a = (uint32_t)(0) << 24; _flag_b = (uint32_t)(0) << 24;
  11806     SET_LO8(eax, 0); /* 0x30003A52: xor al, al */
  11807     _cf = 0;
  11808     _flag_k = FK_NARROW(FK_TEST, 24);
  11809     esi = POP32_VAL(esp); /* 0x30003A54: pop esi */
  11810     ebp = POP32_VAL(esp); /* 0x30003A55: pop ebp */
  11811     RECOMP_FLAGS_OUT(); esp += 12; { RECOMP_REGS_OUT(); return; } /* 0x30003A56: ret 8 */
  11812     RECOMP_REGS_OUT();
  11813 }
  11814 
  11815 void sub_30003A60(void) {
  11816     int _fpu_cmp = 0;
  11817     uint32_t _cf = 0;
  11818     int _df = 1;
  11819     uint32_t _flag_k = FK_NONE;
  11820     uint32_t _flag_a = 0, _flag_b = 0;
  11821     uint32_t _itail_tgt = 0;
  11822     RECOMP_REGS_LOCALS
  11823     RECOMP_ENTER(0x30003A60u);
  11824 
  11825 L_30003A60:
  11826     PUSH32(esp, ebp); /* 0x30003A60: push ebp */
  11827     ebp = esp; /* 0x30003A61: mov ebp, esp */
  11828     PUSH32(esp, 0xFFFFFFFFu); /* 0x30003A63: push -1 */
  11829     PUSH32(esp, 0x30018668u); /* 0x30003A65: push 0x30018668 */
  11830     eax = MEM32(FS_BASE + (0)); /* 0x30003A6A: mov eax, dword ptr fs:[0] */
  11831     PUSH32(esp, eax); /* 0x30003A70: push eax */
  11832     MEM32(FS_BASE + (0)) = esp; /* 0x30003A71: mov dword ptr fs:[0], esp */
  11833     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x70u);
  11834     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11835     esp = esp - 0x70u; /* 0x30003A78: sub esp, 0x70 */
  11836     _flag_k = FK_CMP;
  11837     SET_LO8(eax, MEM8(ebp + 0xB)); /* 0x30003A7B: mov al, byte ptr [ebp + 0xb] */
  11838     PUSH32(esp, ebx); /* 0x30003A7E: push ebx */
  11839     PUSH32(esp, esi); /* 0x30003A7F: push esi */
  11840     PUSH32(esp, edi); /* 0x30003A80: push edi */
  11841     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  11842     edi = 0; /* 0x30003A81: xor edi, edi */
  11843     _cf = 0;
  11844     _flag_k = FK_TEST;
  11845     esi = ecx; /* 0x30003A83: mov esi, ecx */
  11846     MEM8(ebp + (-0x44)) = (uint8_t)(LO8(eax)); /* 0x30003A85: mov byte ptr [ebp - 0x44], al */
  11847     MEM32(ebp + (-0x40)) = edi; /* 0x30003A88: mov dword ptr [ebp - 0x40], edi */
  11848     MEM32(ebp + (-0x3C)) = edi; /* 0x30003A8B: mov dword ptr [ebp - 0x3c], edi */
  11849     MEM32(ebp + (-0x38)) = edi; /* 0x30003A8E: mov dword ptr [ebp - 0x38], edi */
  11850     eax = MEM32(esi + 0x8); /* 0x30003A91: mov eax, dword ptr [esi + 8] */
  11851     /* cmp eax, edi */ /* 0x30003A94: cmp eax, edi */
  11852     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  11853     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11854     _flag_k = FK_CMP;
  11855     MEM32(ebp + (-0x4)) = edi; /* 0x30003A96: mov dword ptr [ebp - 4], edi */
  11856     if (CMP_NE(_flag_a, _flag_b)) goto L_30003A9F; /* 0x30003A99: jne 0x30003a9f */
  11857 L_30003A9B:
  11858     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  11859     ebx = 0; /* 0x30003A9B: xor ebx, ebx */
  11860     _cf = 0;
  11861     _flag_k = FK_TEST;
  11862     goto L_30003AA7; /* 0x30003A9D: jmp 0x30003aa7 */
  11863 L_30003A9F:
  11864     ebx = MEM32(esi + 0xC); /* 0x30003A9F: mov ebx, dword ptr [esi + 0xc] */
  11865     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  11866     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11867     ebx = ebx - eax; /* 0x30003AA2: sub ebx, eax */
  11868     _flag_k = FK_CMP;
  11869     if (2u) _cf = (((ebx) >> 1) & 1u); /* 0x30003AA4: sar ebx, 2 */
  11870     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ebx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  11871     ebx = (uint32_t)((int32_t)ebx >> 2u);
  11872 L_30003AA7:
  11873     /* cmp ebx, edi */ /* 0x30003AA7: cmp ebx, edi */
  11874     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edi);
  11875     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11876     _flag_k = FK_CMP;
  11877     SET_LO8(ecx, MEM8(ebp + 0xB)); /* 0x30003AA9: mov cl, byte ptr [ebp + 0xb] */
  11878     MEM8(ebp + (-0x54)) = (uint8_t)(LO8(ecx)); /* 0x30003AAC: mov byte ptr [ebp - 0x54], cl */
  11879     eax = ebx; /* 0x30003AAF: mov eax, ebx */
  11880     if (CMP_GE(_flag_a, _flag_b)) goto L_30003AB5; /* 0x30003AB1: jge 0x30003ab5 */
  11881 L_30003AB3:
  11882     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  11883     eax = 0; /* 0x30003AB3: xor eax, eax */
  11884     _cf = 0;
  11885     _flag_k = FK_TEST;
  11886 L_30003AB5:
  11887     if (4u) _cf = (((eax) >> 28) & 1u); /* 0x30003AB5: shl eax, 4 */
  11888     if (4u) { _flag_a = recomp_flags_pack((eax << 4u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  11889     eax = eax << 4u; /* 0x30003AB5: shl eax, 4 */
  11890     PUSH32(esp, eax); /* 0x30003AB8: push eax */
  11891     RECOMP_ICALL(0x300180A8u); /* 0x30003AB9: call 0x300180a8 */ /* not lifted */
  11892     RECOMP_FLAGS_IN();
  11893     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  11894     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11895     esp = esp + 4; /* 0x30003ABE: add esp, 4 */
  11896     _flag_k = FK_ADD;
  11897     edx = ebp + (-0x44); /* 0x30003AC1: lea edx, [ebp - 0x44] */
  11898     PUSH32(esp, edx); /* 0x30003AC4: push edx */
  11899     PUSH32(esp, ebx); /* 0x30003AC5: push ebx */
  11900     PUSH32(esp, eax); /* 0x30003AC6: push eax */
  11901     ecx = ebp + (-0x54); /* 0x30003AC7: lea ecx, [ebp - 0x54] */
  11902     MEM32(ebp + (-0x50)) = eax; /* 0x30003ACA: mov dword ptr [ebp - 0x50], eax */
  11903     RECOMP_ICALL(0x30004590u); /* 0x30003ACD: call 0x30004590 */ /* not lifted */
  11904     RECOMP_FLAGS_IN();
  11905     edx = MEM32(ebp + (-0x50)); /* 0x30003AD2: mov edx, dword ptr [ebp - 0x50] */
  11906     if (4u) _cf = (((ebx) >> 28) & 1u); /* 0x30003AD5: shl ebx, 4 */
  11907     if (4u) { _flag_a = recomp_flags_pack((ebx << 4u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  11908     ebx = ebx << 4u; /* 0x30003AD5: shl ebx, 4 */
  11909     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edx);
  11910     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11911     ebx = ebx + edx; /* 0x30003AD8: add ebx, edx */
  11912     _flag_k = FK_ADD;
  11913     MEM32(ebp + (-0x4C)) = ebx; /* 0x30003ADA: mov dword ptr [ebp - 0x4c], ebx */
  11914     MEM32(ebp + (-0x48)) = ebx; /* 0x30003ADD: mov dword ptr [ebp - 0x48], ebx */
  11915     eax = MEM32(ebp + (-0x3C)); /* 0x30003AE0: mov eax, dword ptr [ebp - 0x3c] */
  11916     ecx = MEM32(ebp + (-0x40)); /* 0x30003AE3: mov ecx, dword ptr [ebp - 0x40] */
  11917     PUSH32(esp, eax); /* 0x30003AE6: push eax */
  11918     PUSH32(esp, ecx); /* 0x30003AE7: push ecx */
  11919     ecx = ebp + (-0x44); /* 0x30003AE8: lea ecx, [ebp - 0x44] */
  11920     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x30003AEB: mov byte ptr [ebp - 4], 2 */
  11921     RECOMP_ICALL(0x300045C0u); /* 0x30003AEF: call 0x300045c0 */ /* not lifted */
  11922     RECOMP_FLAGS_IN();
  11923     edx = MEM32(ebp + (-0x40)); /* 0x30003AF4: mov edx, dword ptr [ebp - 0x40] */
  11924     PUSH32(esp, edx); /* 0x30003AF7: push edx */
  11925     RECOMP_ICALL(0x30018080u); /* 0x30003AF8: call 0x30018080 */ /* not lifted */
  11926     RECOMP_FLAGS_IN();
  11927     eax = MEM32(ebp + 0x8); /* 0x30003AFD: mov eax, dword ptr [ebp + 8] */
  11928     ebx = MEM32(eax + 0x4); /* 0x30003B00: mov ebx, dword ptr [eax + 4] */
  11929     eax = MEM32(eax + 0x8); /* 0x30003B03: mov eax, dword ptr [eax + 8] */
  11930     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  11931     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11932     esp = esp + 4; /* 0x30003B06: add esp, 4 */
  11933     _flag_k = FK_ADD;
  11934     /* cmp ebx, eax */ /* 0x30003B09: cmp ebx, eax */
  11935     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  11936     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11937     _flag_k = FK_CMP;
  11938     MEM32(ebp + (-0x40)) = edi; /* 0x30003B0B: mov dword ptr [ebp - 0x40], edi */
  11939     MEM32(ebp + (-0x3C)) = edi; /* 0x30003B0E: mov dword ptr [ebp - 0x3c], edi */
  11940     MEM32(ebp + (-0x38)) = edi; /* 0x30003B11: mov dword ptr [ebp - 0x38], edi */
  11941     MEM32(ebp + (-0x18)) = ebx; /* 0x30003B14: mov dword ptr [ebp - 0x18], ebx */
  11942     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003C90; /* 0x30003B17: je 0x30003c90 */
  11943 L_30003B1D:
  11944     goto L_30003B21; /* 0x30003B1D: jmp 0x30003b21 */
  11945 L_30003B1F:
  11946     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  11947     edi = 0; /* 0x30003B1F: xor edi, edi */
  11948     _cf = 0;
  11949     _flag_k = FK_TEST;
  11950 L_30003B21:
  11951     eax = ebp + (-0xD); /* 0x30003B21: lea eax, [ebp - 0xd] */
  11952     PUSH32(esp, eax); /* 0x30003B24: push eax */
  11953     PUSH32(esp, edi); /* 0x30003B25: push edi */
  11954     ecx = ebp + (-0xE); /* 0x30003B26: lea ecx, [ebp - 0xe] */
  11955     PUSH32(esp, ecx); /* 0x30003B29: push ecx */
  11956     ecx = ebp + (-0x68); /* 0x30003B2A: lea ecx, [ebp - 0x68] */
  11957     RECOMP_ICALL(0x30004420u); /* 0x30003B2D: call 0x30004420 */ /* not lifted */
  11958     RECOMP_FLAGS_IN();
  11959     edi = MEM32(ebx + 0x4); /* 0x30003B32: mov edi, dword ptr [ebx + 4] */
  11960     /* cmp edi, MEM32(ebx + 0x8) */ /* 0x30003B35: cmp edi, dword ptr [ebx + 8] */
  11961     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ebx + 0x8));
  11962     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11963     _flag_k = FK_CMP;
  11964     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x30003B38: mov byte ptr [ebp - 4], 3 */
  11965     MEM32(ebp + (-0x1C)) = edi; /* 0x30003B3C: mov dword ptr [ebp - 0x1c], edi */
  11966     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003BE1; /* 0x30003B3F: je 0x30003be1 */
  11967 L_30003B45:
  11968     PUSH32(esp, edi); /* 0x30003B45: push edi */
  11969     ecx = ebp + (-0x7C); /* 0x30003B46: lea ecx, [ebp - 0x7c] */
  11970     RECOMP_ICALL(0x30007A50u); /* 0x30003B49: call 0x30007a50 */ /* not lifted */
  11971     RECOMP_FLAGS_IN();
  11972     ebx = MEM32(ebp + (-0x78)); /* 0x30003B4E: mov ebx, dword ptr [ebp - 0x78] */
  11973     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  11974     eax = 0; /* 0x30003B51: xor eax, eax */
  11975     _cf = 0;
  11976     _flag_k = FK_TEST;
  11977     /* cmp ebx, eax */ /* 0x30003B53: cmp ebx, eax */
  11978     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  11979     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  11980     _flag_k = FK_CMP;
  11981     if (CMP_LE(_flag_a, _flag_b)) goto L_30003BBF; /* 0x30003B55: jle 0x30003bbf */
  11982 L_30003B57:
  11983     MEM32(ebp + (-0x14)) = eax; /* 0x30003B57: mov dword ptr [ebp - 0x14], eax */
  11984 L_30003B5A:
  11985     ecx = MEM32(ebp + (-0x7C)); /* 0x30003B5A: mov ecx, dword ptr [ebp - 0x7c] */
  11986     edx = MEM32(ebp + (-0x14)); /* 0x30003B5D: mov edx, dword ptr [ebp - 0x14] */
  11987     edi = eax + 0x1; /* 0x30003B60: lea edi, [eax + 1] */
  11988     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(ecx);
  11989     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  11990     edx = edx + ecx; /* 0x30003B63: add edx, ecx */
  11991     _flag_k = FK_ADD;
  11992     MEM32(ebp + (-0x24)) = edx; /* 0x30003B65: mov dword ptr [ebp - 0x24], edx */
  11993     eax = edi; /* 0x30003B68: mov eax, edi */
  11994     edx = ((int32_t)eax < 0) ? 0xFFFFFFFFu : 0; /* 0x30003B6A: cdq  */
  11995     { int64_t _dividend = ((int64_t)(int32_t)edx << 32) | eax; int32_t _dv = (int32_t)ebx; /* 0x30003B6B: idiv ebx */
  11996       if (_dv && !(_dv == -1 && _dividend == INT64_MIN)) { eax = (uint32_t)((int32_t)(_dividend / _dv)); edx = (uint32_t)((int32_t)(_dividend % _dv)); }
  11997       else { eax = 0; edx = 0; } }
  11998     MEM32(ebp + (-0x34)) = 0x3001916Cu; /* 0x30003B6D: mov dword ptr [ebp - 0x34], 0x3001916c */
  11999     eax = edx + edx * 2; /* 0x30003B74: lea eax, [edx + edx*2] */
  12000     eax = ecx + eax * 4; /* 0x30003B77: lea eax, [ecx + eax*4] */
  12001     ecx = ebp + (-0x68); /* 0x30003B7A: lea ecx, [ebp - 0x68] */
  12002     MEM32(ebp + (-0x30)) = ecx; /* 0x30003B7D: mov dword ptr [ebp - 0x30], ecx */
  12003     edx = MEM32(esi + 0x20); /* 0x30003B80: mov edx, dword ptr [esi + 0x20] */
  12004     ecx = MEM32(esi + 0x1C); /* 0x30003B83: mov ecx, dword ptr [esi + 0x1c] */
  12005     PUSH32(esp, edx); /* 0x30003B86: push edx */
  12006     edx = MEM32(esi + 0x18); /* 0x30003B87: mov edx, dword ptr [esi + 0x18] */
  12007     PUSH32(esp, ecx); /* 0x30003B8A: push ecx */
  12008     ecx = MEM32(esi + 0x14); /* 0x30003B8B: mov ecx, dword ptr [esi + 0x14] */
  12009     PUSH32(esp, edx); /* 0x30003B8E: push edx */
  12010     PUSH32(esp, ecx); /* 0x30003B8F: push ecx */
  12011     edx = ebp + (-0x34); /* 0x30003B90: lea edx, [ebp - 0x34] */
  12012     PUSH32(esp, edx); /* 0x30003B93: push edx */
  12013     PUSH32(esp, eax); /* 0x30003B94: push eax */
  12014     eax = MEM32(ebp + (-0x24)); /* 0x30003B95: mov eax, dword ptr [ebp - 0x24] */
  12015     PUSH32(esp, eax); /* 0x30003B98: push eax */
  12016     MEM8(ebp + (-0x4)) = (uint8_t)(5); /* 0x30003B99: mov byte ptr [ebp - 4], 5 */
  12017     RECOMP_ICALL(MEM32(0x300190F4)); /* 0x30003B9D: call dword ptr [0x300190f4] */
  12018     RECOMP_FLAGS_IN();
  12019     edx = MEM32(ebp + (-0x14)); /* 0x30003BA3: mov edx, dword ptr [ebp - 0x14] */
  12020     eax = edi; /* 0x30003BA6: mov eax, edi */
  12021     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(0xCu);
  12022     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12023     edx = edx + 0xCu; /* 0x30003BA8: add edx, 0xc */
  12024     _flag_k = FK_ADD;
  12025     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x1Cu);
  12026     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12027     esp = esp + 0x1Cu; /* 0x30003BAB: add esp, 0x1c */
  12028     _flag_k = FK_ADD;
  12029     /* cmp eax, ebx */ /* 0x30003BAE: cmp eax, ebx */
  12030     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
  12031     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12032     _flag_k = FK_CMP;
  12033     MEM32(ebp + (-0x34)) = 0x30019160u; /* 0x30003BB0: mov dword ptr [ebp - 0x34], 0x30019160 */
  12034     MEM32(ebp + (-0x14)) = edx; /* 0x30003BB7: mov dword ptr [ebp - 0x14], edx */
  12035     RECOMP_BACKEDGE();
  12036     if (CMP_L(_flag_a, _flag_b)) goto L_30003B5A; /* 0x30003BBA: jl 0x30003b5a */
  12037 L_30003BBC:
  12038     edi = MEM32(ebp + (-0x1C)); /* 0x30003BBC: mov edi, dword ptr [ebp - 0x1c] */
  12039 L_30003BBF:
  12040     ecx = ebp + (-0x7C); /* 0x30003BBF: lea ecx, [ebp - 0x7c] */
  12041     MEM8(ebp + (-0x4)) = (uint8_t)(3); /* 0x30003BC2: mov byte ptr [ebp - 4], 3 */
  12042     RECOMP_ICALL(0x30007AB0u); /* 0x30003BC6: call 0x30007ab0 */ /* not lifted */
  12043     RECOMP_FLAGS_IN();
  12044     ecx = MEM32(ebp + (-0x18)); /* 0x30003BCB: mov ecx, dword ptr [ebp - 0x18] */
  12045     eax = MEM32(ecx + 0x8); /* 0x30003BCE: mov eax, dword ptr [ecx + 8] */
  12046     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x14u);
  12047     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12048     edi = edi + 0x14u; /* 0x30003BD1: add edi, 0x14 */
  12049     _flag_k = FK_ADD;
  12050     /* cmp edi, eax */ /* 0x30003BD4: cmp edi, eax */
  12051     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  12052     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12053     _flag_k = FK_CMP;
  12054     MEM32(ebp + (-0x1C)) = edi; /* 0x30003BD6: mov dword ptr [ebp - 0x1c], edi */
  12055     RECOMP_BACKEDGE();
  12056     if (CMP_NE(_flag_a, _flag_b)) goto L_30003B45; /* 0x30003BD9: jne 0x30003b45 */
  12057 L_30003BDF:
  12058     ebx = ecx; /* 0x30003BDF: mov ebx, ecx */
  12059 L_30003BE1:
  12060     eax = MEM32(ebp + (-0x58)); /* 0x30003BE1: mov eax, dword ptr [ebp - 0x58] */
  12061     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  12062     edi = 0; /* 0x30003BE4: xor edi, edi */
  12063     _cf = 0;
  12064     _flag_k = FK_TEST;
  12065     /* cmp eax, edi */ /* 0x30003BE6: cmp eax, edi */
  12066     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  12067     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12068     _flag_k = FK_CMP;
  12069     eax = MEM32(ebp + (-0x64)); /* 0x30003BE8: mov eax, dword ptr [ebp - 0x64] */
  12070     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003C3C; /* 0x30003BEB: je 0x30003c3c */
  12071 L_30003BED:
  12072     ecx = MEM32(eax); /* 0x30003BED: mov ecx, dword ptr [eax] */
  12073     /* cmp ecx, eax */ /* 0x30003BEF: cmp ecx, eax */
  12074     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
  12075     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12076     _flag_k = FK_CMP;
  12077     MEM32(ebp + (-0x20)) = ecx; /* 0x30003BF1: mov dword ptr [ebp - 0x20], ecx */
  12078     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003C3C; /* 0x30003BF4: je 0x30003c3c */
  12079 L_30003BF6:
  12080     eax = MEM32(ecx + 0xC); /* 0x30003BF6: mov eax, dword ptr [ecx + 0xc] */
  12081     /* cmp eax, edi */ /* 0x30003BF9: cmp eax, edi */
  12082     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  12083     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12084     _flag_k = FK_CMP;
  12085     if (CMP_L(_flag_a, _flag_b)) goto L_30003C2A; /* 0x30003BFB: jl 0x30003c2a */
  12086 L_30003BFD:
  12087     edx = MEM32(esi + 0x8); /* 0x30003BFD: mov edx, dword ptr [esi + 8] */
  12088     /* cmp edx, edi */ /* 0x30003C00: cmp edx, edi */
  12089     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edi);
  12090     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12091     _flag_k = FK_CMP;
  12092     if (CMP_NE(_flag_a, _flag_b)) goto L_30003C08; /* 0x30003C02: jne 0x30003c08 */
  12093 L_30003C04:
  12094     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  12095     ecx = 0; /* 0x30003C04: xor ecx, ecx */
  12096     _cf = 0;
  12097     _flag_k = FK_TEST;
  12098     goto L_30003C10; /* 0x30003C06: jmp 0x30003c10 */
  12099 L_30003C08:
  12100     ecx = MEM32(esi + 0xC); /* 0x30003C08: mov ecx, dword ptr [esi + 0xc] */
  12101     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(edx);
  12102     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12103     ecx = ecx - edx; /* 0x30003C0B: sub ecx, edx */
  12104     _flag_k = FK_CMP;
  12105     if (2u) _cf = (((ecx) >> 1) & 1u); /* 0x30003C0D: sar ecx, 2 */
  12106     if (2u) { _flag_a = recomp_flags_pack(((uint32_t)((int32_t)ecx >> 2u)), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  12107     ecx = (uint32_t)((int32_t)ecx >> 2u);
  12108 L_30003C10:
  12109     /* cmp eax, ecx */ /* 0x30003C10: cmp eax, ecx */
  12110     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  12111     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12112     _flag_k = FK_CMP;
  12113     if (CMP_GE(_flag_a, _flag_b)) goto L_30003C2A; /* 0x30003C12: jge 0x30003c2a */
  12114 L_30003C14:
  12115     ecx = MEM32(ebp + (-0x50)); /* 0x30003C14: mov ecx, dword ptr [ebp - 0x50] */
  12116     if (4u) _cf = (((eax) >> 28) & 1u); /* 0x30003C17: shl eax, 4 */
  12117     if (4u) { _flag_a = recomp_flags_pack((eax << 4u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  12118     eax = eax << 4u; /* 0x30003C17: shl eax, 4 */
  12119     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  12120     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12121     eax = eax + ecx; /* 0x30003C1A: add eax, ecx */
  12122     _flag_k = FK_ADD;
  12123     ecx = MEM32(eax + 0x8); /* 0x30003C1C: mov ecx, dword ptr [eax + 8] */
  12124     PUSH32(esp, ebx); /* 0x30003C1F: push ebx */
  12125     PUSH32(esp, 1); /* 0x30003C20: push 1 */
  12126     PUSH32(esp, ecx); /* 0x30003C22: push ecx */
  12127     ecx = eax; /* 0x30003C23: mov ecx, eax */
  12128     RECOMP_ICALL(0x30005050u); /* 0x30003C25: call 0x30005050 */ /* not lifted */
  12129     RECOMP_FLAGS_IN();
  12130 L_30003C2A:
  12131     ecx = ebp + (-0x20); /* 0x30003C2A: lea ecx, [ebp - 0x20] */
  12132     RECOMP_ICALL(0x30004540u); /* 0x30003C2D: call 0x30004540 */ /* not lifted */
  12133     RECOMP_FLAGS_IN();
  12134     ecx = MEM32(ebp + (-0x20)); /* 0x30003C32: mov ecx, dword ptr [ebp - 0x20] */
  12135     eax = MEM32(ebp + (-0x64)); /* 0x30003C35: mov eax, dword ptr [ebp - 0x64] */
  12136     /* cmp ecx, eax */ /* 0x30003C38: cmp ecx, eax */
  12137     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
  12138     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12139     _flag_k = FK_CMP;
  12140     RECOMP_BACKEDGE();
  12141     if (CMP_NE(_flag_a, _flag_b)) goto L_30003BF6; /* 0x30003C3A: jne 0x30003bf6 */
  12142 L_30003C3C:
  12143     PUSH32(esp, eax); /* 0x30003C3C: push eax */
  12144     edx = ebp + (-0x28); /* 0x30003C3D: lea edx, [ebp - 0x28] */
  12145     PUSH32(esp, edx); /* 0x30003C40: push edx */
  12146     ecx = ebp + (-0x68); /* 0x30003C41: lea ecx, [ebp - 0x68] */
  12147     MEM8(ebp + (-0x4)) = (uint8_t)(2); /* 0x30003C44: mov byte ptr [ebp - 4], 2 */
  12148     RECOMP_ICALL(0x30011670u); /* 0x30003C48: call 0x30011670 */ /* not lifted */
  12149     RECOMP_FLAGS_IN();
  12150     eax = MEM32(eax); /* 0x30003C4D: mov eax, dword ptr [eax] */
  12151     PUSH32(esp, eax); /* 0x30003C4F: push eax */
  12152     ecx = ebp + (-0x2C); /* 0x30003C50: lea ecx, [ebp - 0x2c] */
  12153     PUSH32(esp, ecx); /* 0x30003C53: push ecx */
  12154     ecx = ebp + (-0x68); /* 0x30003C54: lea ecx, [ebp - 0x68] */
  12155     RECOMP_ICALL(0x30004490u); /* 0x30003C57: call 0x30004490 */ /* not lifted */
  12156     RECOMP_FLAGS_IN();
  12157     edx = MEM32(ebp + (-0x64)); /* 0x30003C5C: mov edx, dword ptr [ebp - 0x64] */
  12158     PUSH32(esp, edx); /* 0x30003C5F: push edx */
  12159     RECOMP_ICALL(0x30018080u); /* 0x30003C60: call 0x30018080 */ /* not lifted */
  12160     RECOMP_FLAGS_IN();
  12161     eax = MEM32(ebp + (-0x60)); /* 0x30003C65: mov eax, dword ptr [ebp - 0x60] */
  12162     PUSH32(esp, eax); /* 0x30003C68: push eax */
  12163     MEM32(ebp + (-0x64)) = edi; /* 0x30003C69: mov dword ptr [ebp - 0x64], edi */
  12164     MEM32(ebp + (-0x58)) = edi; /* 0x30003C6C: mov dword ptr [ebp - 0x58], edi */
  12165     RECOMP_ICALL(0x30018080u); /* 0x30003C6F: call 0x30018080 */ /* not lifted */
  12166     RECOMP_FLAGS_IN();
  12167     ecx = MEM32(ebp + 0x8); /* 0x30003C74: mov ecx, dword ptr [ebp + 8] */
  12168     eax = MEM32(ecx + 0x8); /* 0x30003C77: mov eax, dword ptr [ecx + 8] */
  12169     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x30u);
  12170     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12171     ebx = ebx + 0x30u; /* 0x30003C7A: add ebx, 0x30 */
  12172     _flag_k = FK_ADD;
  12173     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  12174     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12175     esp = esp + 8; /* 0x30003C7D: add esp, 8 */
  12176     _flag_k = FK_ADD;
  12177     /* cmp ebx, eax */ /* 0x30003C80: cmp ebx, eax */
  12178     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  12179     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12180     _flag_k = FK_CMP;
  12181     MEM32(ebp + (-0x60)) = edi; /* 0x30003C82: mov dword ptr [ebp - 0x60], edi */
  12182     MEM32(ebp + (-0x18)) = ebx; /* 0x30003C85: mov dword ptr [ebp - 0x18], ebx */
  12183     RECOMP_BACKEDGE();
  12184     if (CMP_NE(_flag_a, _flag_b)) goto L_30003B1F; /* 0x30003C88: jne 0x30003b1f */
  12185 L_30003C8E:
  12186     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  12187     edi = 0; /* 0x30003C8E: xor edi, edi */
  12188     _cf = 0;
  12189     _flag_k = FK_TEST;
  12190 L_30003C90:
  12191     edx = MEM32(ebp + (-0x50)); /* 0x30003C90: mov edx, dword ptr [ebp - 0x50] */
  12192     eax = MEM32(ebp + (-0x4C)); /* 0x30003C93: mov eax, dword ptr [ebp - 0x4c] */
  12193     /* cmp edx, eax */ /* 0x30003C96: cmp edx, eax */
  12194     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
  12195     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12196     _flag_k = FK_CMP;
  12197     MEM32(ebp + 0x8) = edi; /* 0x30003C98: mov dword ptr [ebp + 8], edi */
  12198     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003CF2; /* 0x30003C9B: je 0x30003cf2 */
  12199 L_30003C9D:
  12200     edi = edx + 0x8; /* 0x30003C9D: lea edi, [edx + 8] */
  12201 L_30003CA0:
  12202     ecx = MEM32(ebp + 0x10); /* 0x30003CA0: mov ecx, dword ptr [ebp + 0x10] */
  12203     /* cmp ecx, 0xFFFFFFFFu */ /* 0x30003CA3: cmp ecx, -1 */
  12204     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0xFFFFFFFFu);
  12205     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12206     _flag_k = FK_CMP;
  12207     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003CAD; /* 0x30003CA6: je 0x30003cad */
  12208 L_30003CA8:
  12209     /* cmp MEM32(ebp + 0x8), ecx */ /* 0x30003CA8: cmp dword ptr [ebp + 8], ecx */
  12210     _flag_a = (uint32_t)(MEM32(ebp + 0x8)); _flag_b = (uint32_t)(ecx);
  12211     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12212     _flag_k = FK_CMP;
  12213     if (CMP_NE(_flag_a, _flag_b)) goto L_30003CE1; /* 0x30003CAB: jne 0x30003ce1 */
  12214 L_30003CAD:
  12215     ebx = MEM32(edi + (-0x4)); /* 0x30003CAD: mov ebx, dword ptr [edi - 4] */
  12216     /* cmp ebx, MEM32(edi) */ /* 0x30003CB0: cmp ebx, dword ptr [edi] */
  12217     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(edi));
  12218     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12219     _flag_k = FK_CMP;
  12220     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003CC4; /* 0x30003CB2: je 0x30003cc4 */
  12221 L_30003CB4:
  12222     ecx = ebx; /* 0x30003CB4: mov ecx, ebx */
  12223     RECOMP_ICALL(0x3000A910u); /* 0x30003CB6: call 0x3000a910 */ /* not lifted */
  12224     RECOMP_FLAGS_IN();
  12225     eax = MEM32(edi); /* 0x30003CBB: mov eax, dword ptr [edi] */
  12226     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x30u);
  12227     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12228     ebx = ebx + 0x30u; /* 0x30003CBD: add ebx, 0x30 */
  12229     _flag_k = FK_ADD;
  12230     /* cmp ebx, eax */ /* 0x30003CC0: cmp ebx, eax */
  12231     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(eax);
  12232     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12233     _flag_k = FK_CMP;
  12234     RECOMP_BACKEDGE();
  12235     if (CMP_NE(_flag_a, _flag_b)) goto L_30003CB4; /* 0x30003CC2: jne 0x30003cb4 */
  12236 L_30003CC4:
  12237     ecx = MEM32(ebp + 0xC); /* 0x30003CC4: mov ecx, dword ptr [ebp + 0xc] */
  12238     edx = MEM32(ecx); /* 0x30003CC7: mov edx, dword ptr [ecx] */
  12239     eax = edi + (-0x8); /* 0x30003CC9: lea eax, [edi - 8] */
  12240     PUSH32(esp, eax); /* 0x30003CCC: push eax */
  12241     RECOMP_ICALL(MEM32(edx)); /* 0x30003CCD: call dword ptr [edx] */
  12242     RECOMP_FLAGS_IN();
  12243     ecx = MEM32(ebp + 0x8); /* 0x30003CCF: mov ecx, dword ptr [ebp + 8] */
  12244     PUSH32(esp, eax); /* 0x30003CD2: push eax */
  12245     PUSH32(esp, ecx); /* 0x30003CD3: push ecx */
  12246     ecx = esi; /* 0x30003CD4: mov ecx, esi */
  12247     RECOMP_ICALL(0x300033E0u); /* 0x30003CD6: call 0x300033e0 */ /* not lifted */
  12248     RECOMP_FLAGS_IN();
  12249     eax = MEM32(ebp + (-0x4C)); /* 0x30003CDB: mov eax, dword ptr [ebp - 0x4c] */
  12250     edx = MEM32(ebp + (-0x50)); /* 0x30003CDE: mov edx, dword ptr [ebp - 0x50] */
  12251 L_30003CE1:
  12252     ebx = MEM32(ebp + 0x8); /* 0x30003CE1: mov ebx, dword ptr [ebp + 8] */
  12253     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x10u);
  12254     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12255     edi = edi + 0x10u; /* 0x30003CE4: add edi, 0x10 */
  12256     _flag_k = FK_ADD;
  12257     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(1);
  12258     ebx = ebx + 1; /* 0x30003CE7: inc ebx */
  12259     _flag_k = FK_INC;
  12260     ecx = edi + (-0x8); /* 0x30003CE8: lea ecx, [edi - 8] */
  12261     /* cmp ecx, eax */ /* 0x30003CEB: cmp ecx, eax */
  12262     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(eax);
  12263     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12264     _flag_k = FK_CMP;
  12265     MEM32(ebp + 0x8) = ebx; /* 0x30003CED: mov dword ptr [ebp + 8], ebx */
  12266     RECOMP_BACKEDGE();
  12267     if (CMP_NE(_flag_a, _flag_b)) goto L_30003CA0; /* 0x30003CF0: jne 0x30003ca0 */
  12268 L_30003CF2:
  12269     /* cmp edx, eax */ /* 0x30003CF2: cmp edx, eax */
  12270     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(eax);
  12271     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12272     _flag_k = FK_CMP;
  12273     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x30003CF4: mov dword ptr [ebp - 4], 0xffffffff */
  12274     MEM32(ebp + 0x8) = eax; /* 0x30003CFB: mov dword ptr [ebp + 8], eax */
  12275     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003D41; /* 0x30003CFE: je 0x30003d41 */
  12276 L_30003D00:
  12277     esi = edx + 0x4; /* 0x30003D00: lea esi, [edx + 4] */
  12278 L_30003D03:
  12279     edi = MEM32(esi + 0x4); /* 0x30003D03: mov edi, dword ptr [esi + 4] */
  12280     ebx = MEM32(esi); /* 0x30003D06: mov ebx, dword ptr [esi] */
  12281     /* cmp ebx, edi */ /* 0x30003D08: cmp ebx, edi */
  12282     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edi);
  12283     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12284     _flag_k = FK_CMP;
  12285     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003D1C; /* 0x30003D0A: je 0x30003d1c */
  12286 L_30003D0C:
  12287     PUSH32(esp, ebx); /* 0x30003D0C: push ebx */
  12288     RECOMP_ICALL(0x300054C0u); /* 0x30003D0D: call 0x300054c0 */ /* not lifted */
  12289     RECOMP_FLAGS_IN();
  12290     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(0x30u);
  12291     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12292     ebx = ebx + 0x30u; /* 0x30003D12: add ebx, 0x30 */
  12293     _flag_k = FK_ADD;
  12294     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12295     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12296     esp = esp + 4; /* 0x30003D15: add esp, 4 */
  12297     _flag_k = FK_ADD;
  12298     /* cmp ebx, edi */ /* 0x30003D18: cmp ebx, edi */
  12299     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(edi);
  12300     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12301     _flag_k = FK_CMP;
  12302     RECOMP_BACKEDGE();
  12303     if (CMP_NE(_flag_a, _flag_b)) goto L_30003D0C; /* 0x30003D1A: jne 0x30003d0c */
  12304 L_30003D1C:
  12305     edx = MEM32(esi); /* 0x30003D1C: mov edx, dword ptr [esi] */
  12306     PUSH32(esp, edx); /* 0x30003D1E: push edx */
  12307     RECOMP_ICALL(0x30018080u); /* 0x30003D1F: call 0x30018080 */ /* not lifted */
  12308     RECOMP_FLAGS_IN();
  12309     ecx = MEM32(ebp + 0x8); /* 0x30003D24: mov ecx, dword ptr [ebp + 8] */
  12310     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  12311     eax = 0; /* 0x30003D27: xor eax, eax */
  12312     _cf = 0;
  12313     _flag_k = FK_TEST;
  12314     MEM32(esi) = eax; /* 0x30003D29: mov dword ptr [esi], eax */
  12315     MEM32(esi + 0x4) = eax; /* 0x30003D2B: mov dword ptr [esi + 4], eax */
  12316     MEM32(esi + 0x8) = eax; /* 0x30003D2E: mov dword ptr [esi + 8], eax */
  12317     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x10u);
  12318     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12319     esi = esi + 0x10u; /* 0x30003D31: add esi, 0x10 */
  12320     _flag_k = FK_ADD;
  12321     eax = esi + (-0x4); /* 0x30003D34: lea eax, [esi - 4] */
  12322     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12323     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12324     esp = esp + 4; /* 0x30003D37: add esp, 4 */
  12325     _flag_k = FK_ADD;
  12326     /* cmp eax, ecx */ /* 0x30003D3A: cmp eax, ecx */
  12327     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  12328     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12329     _flag_k = FK_CMP;
  12330     RECOMP_BACKEDGE();
  12331     if (CMP_NE(_flag_a, _flag_b)) goto L_30003D03; /* 0x30003D3C: jne 0x30003d03 */
  12332 L_30003D3E:
  12333     edx = MEM32(ebp + (-0x50)); /* 0x30003D3E: mov edx, dword ptr [ebp - 0x50] */
  12334 L_30003D41:
  12335     PUSH32(esp, edx); /* 0x30003D41: push edx */
  12336     RECOMP_ICALL(0x30018080u); /* 0x30003D42: call 0x30018080 */ /* not lifted */
  12337     RECOMP_FLAGS_IN();
  12338     ecx = MEM32(ebp + (-0xC)); /* 0x30003D47: mov ecx, dword ptr [ebp - 0xc] */
  12339     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12340     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12341     esp = esp + 4; /* 0x30003D4A: add esp, 4 */
  12342     _flag_k = FK_ADD;
  12343     edi = POP32_VAL(esp); /* 0x30003D4D: pop edi */
  12344     esi = POP32_VAL(esp); /* 0x30003D4E: pop esi */
  12345     ebx = POP32_VAL(esp); /* 0x30003D4F: pop ebx */
  12346     MEM32(FS_BASE + (0)) = ecx; /* 0x30003D50: mov dword ptr fs:[0], ecx */
  12347     esp = ebp; /* 0x30003D57: mov esp, ebp */
  12348     ebp = POP32_VAL(esp); /* 0x30003D59: pop ebp */
  12349     RECOMP_FLAGS_OUT(); esp += 16; { RECOMP_REGS_OUT(); return; } /* 0x30003D5A: ret 0xc */
  12350     RECOMP_REGS_OUT();
  12351 }
  12352 
  12353 void sub_30003D60(void) {
  12354     int _fpu_cmp = 0;
  12355     uint32_t _cf = 0;
  12356     int _df = 1;
  12357     uint32_t _flag_k = FK_NONE;
  12358     uint32_t _flag_a = 0, _flag_b = 0;
  12359     uint32_t _itail_tgt = 0;
  12360     RECOMP_REGS_LOCALS
  12361     RECOMP_ENTER(0x30003D60u);
  12362 
  12363 L_30003D60:
  12364     PUSH32(esp, ebp); /* 0x30003D60: push ebp */
  12365     ebp = esp; /* 0x30003D61: mov ebp, esp */
  12366     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0x10u);
  12367     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12368     esp = esp - 0x10u; /* 0x30003D63: sub esp, 0x10 */
  12369     _flag_k = FK_CMP;
  12370     PUSH32(esp, ebx); /* 0x30003D66: push ebx */
  12371     ebx = MEM32(ecx + 0x4); /* 0x30003D67: mov ebx, dword ptr [ecx + 4] */
  12372     ecx = MEM32(ebx + 0x4); /* 0x30003D6A: mov ecx, dword ptr [ebx + 4] */
  12373     edx = MEM32(ebx + 0x8); /* 0x30003D6D: mov edx, dword ptr [ebx + 8] */
  12374     PUSH32(esp, esi); /* 0x30003D70: push esi */
  12375     esi = MEM32(ecx + 0x4); /* 0x30003D71: mov esi, dword ptr [ecx + 4] */
  12376     /* cmp esi, edx */ /* 0x30003D74: cmp esi, edx */
  12377     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx);
  12378     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12379     _flag_k = FK_CMP;
  12380     PUSH32(esp, edi); /* 0x30003D76: push edi */
  12381     edi = ecx; /* 0x30003D77: mov edi, ecx */
  12382     SET_LO8(eax, 1); /* 0x30003D79: mov al, 1 */
  12383     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003D97; /* 0x30003D7B: je 0x30003d97 */
  12384 L_30003D7D:
  12385     eax = MEM32(ebp + 0x8); /* 0x30003D7D: mov eax, dword ptr [ebp + 8] */
  12386     /* cmp eax, MEM32(esi + 0xC) */ /* 0x30003D80: cmp eax, dword ptr [esi + 0xc] */
  12387     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(esi + 0xC));
  12388     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12389     _flag_k = FK_CMP;
  12390     edi = esi; /* 0x30003D83: mov edi, esi */
  12391     SET_LO8(eax, (CMP_L(_flag_a, _flag_b)) ? 1 : 0); /* 0x30003D85: setl al */
  12392     /* test LO8(eax), LO8(eax) */ /* 0x30003D88: test al, al */
  12393     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  12394     _cf = 0;
  12395     _flag_k = FK_NARROW(FK_TEST, 24);
  12396     if (TEST_Z(_flag_a, _flag_b)) goto L_30003D90; /* 0x30003D8A: je 0x30003d90 */
  12397 L_30003D8C:
  12398     esi = MEM32(esi); /* 0x30003D8C: mov esi, dword ptr [esi] */
  12399     goto L_30003D93; /* 0x30003D8E: jmp 0x30003d93 */
  12400 L_30003D90:
  12401     esi = MEM32(esi + 0x8); /* 0x30003D90: mov esi, dword ptr [esi + 8] */
  12402 L_30003D93:
  12403     /* cmp esi, edx */ /* 0x30003D93: cmp esi, edx */
  12404     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx);
  12405     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12406     _flag_k = FK_CMP;
  12407     RECOMP_BACKEDGE();
  12408     if (CMP_NE(_flag_a, _flag_b)) goto L_30003D7D; /* 0x30003D95: jne 0x30003d7d */
  12409 L_30003D97:
  12410     SET_LO8(edx, MEM8(ebx + 0xC)); /* 0x30003D97: mov dl, byte ptr [ebx + 0xc] */
  12411     /* test LO8(edx), LO8(edx) */ /* 0x30003D9A: test dl, dl */
  12412     _flag_a = (uint32_t)(LO8(edx)) << 24; _flag_b = (uint32_t)(LO8(edx)) << 24;
  12413     _cf = 0;
  12414     _flag_k = FK_NARROW(FK_TEST, 24);
  12415     if (TEST_Z(_flag_a, _flag_b)) goto L_30003DB8; /* 0x30003D9C: je 0x30003db8 */
  12416 L_30003D9E:
  12417     ecx = ebp + 0x8; /* 0x30003D9E: lea ecx, [ebp + 8] */
  12418     PUSH32(esp, ecx); /* 0x30003DA1: push ecx */
  12419     PUSH32(esp, edi); /* 0x30003DA2: push edi */
  12420     PUSH32(esp, esi); /* 0x30003DA3: push esi */
  12421     edx = ebp + (-0x8); /* 0x30003DA4: lea edx, [ebp - 8] */
  12422     PUSH32(esp, edx); /* 0x30003DA7: push edx */
  12423     ecx = ebx; /* 0x30003DA8: mov ecx, ebx */
  12424     RECOMP_ICALL(0x30004E10u); /* 0x30003DAA: call 0x30004e10 */ /* not lifted */
  12425     RECOMP_FLAGS_IN();
  12426     edi = POP32_VAL(esp); /* 0x30003DAF: pop edi */
  12427     esi = POP32_VAL(esp); /* 0x30003DB0: pop esi */
  12428     ebx = POP32_VAL(esp); /* 0x30003DB1: pop ebx */
  12429     esp = ebp; /* 0x30003DB2: mov esp, ebp */
  12430     ebp = POP32_VAL(esp); /* 0x30003DB4: pop ebp */
  12431     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30003DB5: ret 4 */
  12432 L_30003DB8:
  12433     /* test LO8(eax), LO8(eax) */ /* 0x30003DB8: test al, al */
  12434     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  12435     _cf = 0;
  12436     _flag_k = FK_NARROW(FK_TEST, 24);
  12437     MEM32(ebp + (-0x4)) = edi; /* 0x30003DBA: mov dword ptr [ebp - 4], edi */
  12438     if (TEST_Z(_flag_a, _flag_b)) goto L_30003DE5; /* 0x30003DBD: je 0x30003de5 */
  12439 L_30003DBF:
  12440     /* cmp edi, MEM32(ecx) */ /* 0x30003DBF: cmp edi, dword ptr [ecx] */
  12441     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(MEM32(ecx));
  12442     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12443     _flag_k = FK_CMP;
  12444     if (CMP_NE(_flag_a, _flag_b)) goto L_30003DDD; /* 0x30003DC1: jne 0x30003ddd */
  12445 L_30003DC3:
  12446     eax = ebp + 0x8; /* 0x30003DC3: lea eax, [ebp + 8] */
  12447     PUSH32(esp, eax); /* 0x30003DC6: push eax */
  12448     PUSH32(esp, edi); /* 0x30003DC7: push edi */
  12449     PUSH32(esp, esi); /* 0x30003DC8: push esi */
  12450     ecx = ebp + (-0xC); /* 0x30003DC9: lea ecx, [ebp - 0xc] */
  12451     PUSH32(esp, ecx); /* 0x30003DCC: push ecx */
  12452     ecx = ebx; /* 0x30003DCD: mov ecx, ebx */
  12453     RECOMP_ICALL(0x30004E10u); /* 0x30003DCF: call 0x30004e10 */ /* not lifted */
  12454     RECOMP_FLAGS_IN();
  12455     edi = POP32_VAL(esp); /* 0x30003DD4: pop edi */
  12456     esi = POP32_VAL(esp); /* 0x30003DD5: pop esi */
  12457     ebx = POP32_VAL(esp); /* 0x30003DD6: pop ebx */
  12458     esp = ebp; /* 0x30003DD7: mov esp, ebp */
  12459     ebp = POP32_VAL(esp); /* 0x30003DD9: pop ebp */
  12460     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30003DDA: ret 4 */
  12461 L_30003DDD:
  12462     ecx = ebp + (-0x4); /* 0x30003DDD: lea ecx, [ebp - 4] */
  12463     RECOMP_ICALL(0x30005370u); /* 0x30003DE0: call 0x30005370 */ /* not lifted */
  12464     RECOMP_FLAGS_IN();
  12465 L_30003DE5:
  12466     edx = MEM32(ebp + (-0x4)); /* 0x30003DE5: mov edx, dword ptr [ebp - 4] */
  12467     eax = MEM32(edx + 0xC); /* 0x30003DE8: mov eax, dword ptr [edx + 0xc] */
  12468     /* cmp eax, MEM32(ebp + 0x8) */ /* 0x30003DEB: cmp eax, dword ptr [ebp + 8] */
  12469     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(MEM32(ebp + 0x8));
  12470     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12471     _flag_k = FK_CMP;
  12472     if (CMP_GE(_flag_a, _flag_b)) goto L_30003E01; /* 0x30003DEE: jge 0x30003e01 */
  12473 L_30003DF0:
  12474     ecx = ebp + 0x8; /* 0x30003DF0: lea ecx, [ebp + 8] */
  12475     PUSH32(esp, ecx); /* 0x30003DF3: push ecx */
  12476     PUSH32(esp, edi); /* 0x30003DF4: push edi */
  12477     PUSH32(esp, esi); /* 0x30003DF5: push esi */
  12478     edx = ebp + (-0x10); /* 0x30003DF6: lea edx, [ebp - 0x10] */
  12479     PUSH32(esp, edx); /* 0x30003DF9: push edx */
  12480     ecx = ebx; /* 0x30003DFA: mov ecx, ebx */
  12481     RECOMP_ICALL(0x30004E10u); /* 0x30003DFC: call 0x30004e10 */ /* not lifted */
  12482     RECOMP_FLAGS_IN();
  12483 L_30003E01:
  12484     edi = POP32_VAL(esp); /* 0x30003E01: pop edi */
  12485     esi = POP32_VAL(esp); /* 0x30003E02: pop esi */
  12486     ebx = POP32_VAL(esp); /* 0x30003E03: pop ebx */
  12487     esp = ebp; /* 0x30003E04: mov esp, ebp */
  12488     ebp = POP32_VAL(esp); /* 0x30003E06: pop ebp */
  12489     RECOMP_FLAGS_OUT(); esp += 8; { RECOMP_REGS_OUT(); return; } /* 0x30003E07: ret 4 */
  12490     RECOMP_REGS_OUT();
  12491 }
  12492 
  12493 void sub_30003E10(void) {
  12494     int _fpu_cmp = 0;
  12495     uint32_t _cf = 0;
  12496     int _df = 1;
  12497     uint32_t _flag_k = FK_NONE;
  12498     uint32_t _flag_a = 0, _flag_b = 0;
  12499     uint32_t _itail_tgt = 0;
  12500     RECOMP_REGS_LOCALS
  12501     RECOMP_ENTER(0x30003E10u);
  12502 
  12503 L_30003E10:
  12504     PUSH32(esp, ebp); /* 0x30003E10: push ebp */
  12505     ebp = esp; /* 0x30003E11: mov ebp, esp */
  12506     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  12507     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12508     esp = esp - 8; /* 0x30003E13: sub esp, 8 */
  12509     _flag_k = FK_CMP;
  12510     PUSH32(esp, ebx); /* 0x30003E16: push ebx */
  12511     PUSH32(esp, esi); /* 0x30003E17: push esi */
  12512     esi = ecx; /* 0x30003E18: mov esi, ecx */
  12513     ecx = MEM32(esi + 0x10); /* 0x30003E1A: mov ecx, dword ptr [esi + 0x10] */
  12514     /* test ecx, ecx */ /* 0x30003E1D: test ecx, ecx */
  12515     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
  12516     _cf = 0;
  12517     _flag_k = FK_TEST;
  12518     PUSH32(esp, edi); /* 0x30003E1F: push edi */
  12519     edi = MEM32(esi + 0x4); /* 0x30003E20: mov edi, dword ptr [esi + 4] */
  12520     eax = MEM32(edi); /* 0x30003E23: mov eax, dword ptr [edi] */
  12521     MEM32(ebp + (-0x4)) = eax; /* 0x30003E25: mov dword ptr [ebp - 4], eax */
  12522     if (TEST_Z(_flag_a, _flag_b)) goto L_30003E85; /* 0x30003E28: je 0x30003e85 */
  12523 L_30003E2A:
  12524     ecx = eax; /* 0x30003E2A: mov ecx, eax */
  12525     /* cmp eax, ecx */ /* 0x30003E2C: cmp eax, ecx */
  12526     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
  12527     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12528     _flag_k = FK_CMP;
  12529     if (CMP_NE(_flag_a, _flag_b)) goto L_30003E85; /* 0x30003E2E: jne 0x30003e85 */
  12530 L_30003E30:
  12531     /* cmp edi, edi */ /* 0x30003E30: cmp edi, edi */
  12532     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
  12533     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12534     _flag_k = FK_CMP;
  12535     if (CMP_NE(_flag_a, _flag_b)) goto L_30003E85; /* 0x30003E32: jne 0x30003e85 */
  12536 L_30003E34:
  12537     ebx = MEM32(edi + 0x4); /* 0x30003E34: mov ebx, dword ptr [edi + 4] */
  12538     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x30003E37: cmp ebx, dword ptr [esi + 8] */
  12539     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
  12540     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12541     _flag_k = FK_CMP;
  12542     edi = ebx; /* 0x30003E3A: mov edi, ebx */
  12543     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003E5D; /* 0x30003E3C: je 0x30003e5d */
  12544 L_30003E3E:
  12545     eax = MEM32(edi + 0x8); /* 0x30003E3E: mov eax, dword ptr [edi + 8] */
  12546     PUSH32(esp, eax); /* 0x30003E41: push eax */
  12547     ecx = esi; /* 0x30003E42: mov ecx, esi */
  12548     RECOMP_ICALL(0x30004DD0u); /* 0x30003E44: call 0x30004dd0 */ /* not lifted */
  12549     RECOMP_FLAGS_IN();
  12550     edi = MEM32(edi); /* 0x30003E49: mov edi, dword ptr [edi] */
  12551     PUSH32(esp, ebx); /* 0x30003E4B: push ebx */
  12552     RECOMP_ICALL(0x30018080u); /* 0x30003E4C: call 0x30018080 */ /* not lifted */
  12553     RECOMP_FLAGS_IN();
  12554     eax = MEM32(esi + 0x8); /* 0x30003E51: mov eax, dword ptr [esi + 8] */
  12555     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  12556     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12557     esp = esp + 4; /* 0x30003E54: add esp, 4 */
  12558     _flag_k = FK_ADD;
  12559     /* cmp edi, eax */ /* 0x30003E57: cmp edi, eax */
  12560     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  12561     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12562     _flag_k = FK_CMP;
  12563     ebx = edi; /* 0x30003E59: mov ebx, edi */
  12564     RECOMP_BACKEDGE();
  12565     if (CMP_NE(_flag_a, _flag_b)) goto L_30003E3E; /* 0x30003E5B: jne 0x30003e3e */
  12566 L_30003E5D:
  12567     ecx = MEM32(esi + 0x4); /* 0x30003E5D: mov ecx, dword ptr [esi + 4] */
  12568     edx = MEM32(esi + 0x8); /* 0x30003E60: mov edx, dword ptr [esi + 8] */
  12569     MEM32(ecx + 0x4) = edx; /* 0x30003E63: mov dword ptr [ecx + 4], edx */
  12570     eax = MEM32(esi + 0x4); /* 0x30003E66: mov eax, dword ptr [esi + 4] */
  12571     MEM32(esi + 0x10) = 0; /* 0x30003E69: mov dword ptr [esi + 0x10], 0 */
  12572     MEM32(eax) = eax; /* 0x30003E70: mov dword ptr [eax], eax */
  12573     eax = MEM32(esi + 0x4); /* 0x30003E72: mov eax, dword ptr [esi + 4] */
  12574     MEM32(eax + 0x8) = eax; /* 0x30003E75: mov dword ptr [eax + 8], eax */
  12575     eax = ebp + (-0x8); /* 0x30003E78: lea eax, [ebp - 8] */
  12576     PUSH32(esp, eax); /* 0x30003E7B: push eax */
  12577     ecx = esi; /* 0x30003E7C: mov ecx, esi */
  12578     RECOMP_ICALL(0x30011670u); /* 0x30003E7E: call 0x30011670 */ /* not lifted */
  12579     RECOMP_FLAGS_IN();
  12580     goto L_30003EA6; /* 0x30003E83: jmp 0x30003ea6 */
  12581 L_30003E85:
  12582     /* cmp eax, edi */ /* 0x30003E85: cmp eax, edi */
  12583     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  12584     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12585     _flag_k = FK_CMP;
  12586     if (CMP_EQ(_flag_a, _flag_b)) goto L_30003EA6; /* 0x30003E87: je 0x30003ea6 */
  12587 L_30003E89:
  12588     ecx = ebp + (-0x4); /* 0x30003E89: lea ecx, [ebp - 4] */
  12589     ebx = eax; /* 0x30003E8C: mov ebx, eax */
  12590     RECOMP_ICALL(0x30004540u); /* 0x30003E8E: call 0x30004540 */ /* not lifted */
  12591     RECOMP_FLAGS_IN();
  12592     PUSH32(esp, ebx); /* 0x30003E93: push ebx */
  12593     ecx = ebp + (-0x8); /* 0x30003E94: lea ecx, [ebp - 8] */
  12594     PUSH32(esp, ecx); /* 0x30003E97: push ecx */
  12595     ecx = esi; /* 0x30003E98: mov ecx, esi */
  12596     RECOMP_ICALL(0x30004A10u); /* 0x30003E9A: call 0x30004a10 */ /* not lifted */
  12597     RECOMP_FLAGS_IN();
  12598     eax = MEM32(ebp + (-0x4)); /* 0x30003E9F: mov eax, dword ptr [ebp - 4] */
  12599     /* cmp eax, edi */ /* 0x30003EA2: cmp eax, edi */
  12600     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
  12601     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12602     _flag_k = FK_CMP;
  12603     RECOMP_BACKEDGE();
  12604     if (CMP_NE(_flag_a, _flag_b)) goto L_30003E89; /* 0x30003EA4: jne 0x30003e89 */
  12605 L_30003EA6:
  12606     edx = MEM32(esi + 0x4); /* 0x30003EA6: mov edx, dword ptr [esi + 4] */
  12607     PUSH32(esp, edx); /* 0x30003EA9: push edx */
  12608     RECOMP_ICALL(0x30018080u); /* 0x30003EAA: call 0x30018080 */ /* not lifted */
  12609     RECOMP_FLAGS_IN();
  12610     eax = MEM32(esi + 0x8); /* 0x30003EAF: mov eax, dword ptr [esi + 8] */
  12611     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  12612     edi = 0; /* 0x30003EB2: xor edi, edi */
  12613     _cf = 0;
  12614     _flag_k = FK_TEST;
  12615     PUSH32(esp, eax); /* 0x30003EB4: push eax */
  12616     MEM32(esi + 0x4) = edi; /* 0x30003EB5: mov dword ptr [esi + 4], edi */
  12617     MEM32(esi + 0x10) = edi; /* 0x30003EB8: mov dword ptr [esi + 0x10], edi */
  12618     RECOMP_ICALL(0x30018080u); /* 0x30003EBB: call 0x30018080 */ /* not lifted */
  12619     RECOMP_FLAGS_IN();
  12620     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  12621     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12622     esp = esp + 8; /* 0x30003EC0: add esp, 8 */
  12623     _flag_k = FK_ADD;
  12624     MEM32(esi + 0x8) = edi; /* 0x30003EC3: mov dword ptr [esi + 8], edi */
  12625     edi = POP32_VAL(esp); /* 0x30003EC6: pop edi */
  12626     esi = POP32_VAL(esp); /* 0x30003EC7: pop esi */
  12627     ebx = POP32_VAL(esp); /* 0x30003EC8: pop ebx */
  12628     esp = ebp; /* 0x30003EC9: mov esp, ebp */
  12629     ebp = POP32_VAL(esp); /* 0x30003ECB: pop ebp */
  12630     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30003ECC: ret  */
  12631     RECOMP_REGS_OUT();
  12632 }
  12633 
  12634 void sub_30003EA6(void) {
  12635     int _fpu_cmp = 0;
  12636     uint32_t _cf = 0;
  12637     int _df = 1;
  12638     uint32_t _flag_k = FK_NONE;
  12639     uint32_t _flag_a = 0, _flag_b = 0;
  12640     uint32_t _itail_tgt = 0;
  12641     RECOMP_REGS_LOCALS
  12642     RECOMP_ENTER(0x30003EA6u);
  12643 
  12644 L_30003EA6:
  12645     edx = MEM32(esi + 0x4); /* 0x30003EA6: mov edx, dword ptr [esi + 4] */
  12646     PUSH32(esp, edx); /* 0x30003EA9: push edx */
  12647     RECOMP_ICALL(0x30018080u); /* 0x30003EAA: call 0x30018080 */ /* not lifted */
  12648     RECOMP_FLAGS_IN();
  12649     eax = MEM32(esi + 0x8); /* 0x30003EAF: mov eax, dword ptr [esi + 8] */
  12650     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  12651     edi = 0; /* 0x30003EB2: xor edi, edi */
  12652     _cf = 0;
  12653     _flag_k = FK_TEST;
  12654     PUSH32(esp, eax); /* 0x30003EB4: push eax */
  12655     MEM32(esi + 0x4) = edi; /* 0x30003EB5: mov dword ptr [esi + 4], edi */
  12656     MEM32(esi + 0x10) = edi; /* 0x30003EB8: mov dword ptr [esi + 0x10], edi */
  12657     RECOMP_ICALL(0x30018080u); /* 0x30003EBB: call 0x30018080 */ /* not lifted */
  12658     RECOMP_FLAGS_IN();
  12659     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  12660     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  12661     esp = esp + 8; /* 0x30003EC0: add esp, 8 */
  12662     _flag_k = FK_ADD;
  12663     MEM32(esi + 0x8) = edi; /* 0x30003EC3: mov dword ptr [esi + 8], edi */
  12664     edi = POP32_VAL(esp); /* 0x30003EC6: pop edi */
  12665     esi = POP32_VAL(esp); /* 0x30003EC7: pop esi */
  12666     ebx = POP32_VAL(esp); /* 0x30003EC8: pop ebx */
  12667     esp = ebp; /* 0x30003EC9: mov esp, ebp */
  12668     ebp = POP32_VAL(esp); /* 0x30003ECB: pop ebp */
  12669     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30003ECC: ret  */
  12670     RECOMP_REGS_OUT();
  12671 }
  12672 
  12673 void sub_30003ED0(void) {
  12674     int _fpu_cmp = 0;
  12675     uint32_t _cf = 0;
  12676     int _df = 1;
  12677     uint32_t _flag_k = FK_NONE;
  12678     uint32_t _flag_a = 0, _flag_b = 0;
  12679     uint32_t _itail_tgt = 0;
  12680     RECOMP_REGS_LOCALS
  12681     RECOMP_ENTER(0x30003ED0u);
  12682 
  12683 L_30003ED0:
  12684     PUSH32(esp, ebp); /* 0x30003ED0: push ebp */
  12685     ebp = esp; /* 0x30003ED1: mov ebp, esp */
  12686     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(0xC0u);
  12687     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  12688     esp = esp - 0xC0u; /* 0x30003ED3: sub esp, 0xc0 */
  12689     _flag_k = FK_CMP;
  12690     eax = MEM32(ebp + 0x8); /* 0x30003ED9: mov eax, dword ptr [ebp + 8] */
  12691     PUSH32(esp, ebx); /* 0x30003EDC: push ebx */
  12692     ebx = ecx; /* 0x30003EDD: mov ebx, ecx */
  12693     ecx = MEM32(eax); /* 0x30003EDF: mov ecx, dword ptr [eax] */
  12694     edx = MEM32(eax + 0x4); /* 0x30003EE1: mov edx, dword ptr [eax + 4] */
  12695     eax = MEM32(eax + 0x8); /* 0x30003EE4: mov eax, dword ptr [eax + 8] */
  12696     MEM32(ebp + (-0x98)) = ecx; /* 0x30003EE7: mov dword ptr [ebp - 0x98], ecx */
  12697     PUSH32(esp, esi); /* 0x30003EED: push esi */
  12698     esi = MEM32(ebp + 0xC); /* 0x30003EEE: mov esi, dword ptr [ebp + 0xc] */
  12699     MEM32(ebp + (-0x94)) = edx; /* 0x30003EF1: mov dword ptr [ebp - 0x94], edx */
  12700     ecx = esi; /* 0x30003EF7: mov ecx, esi */
  12701     edx = MEM32(ecx); /* 0x30003EF9: mov edx, dword ptr [ecx] */
  12702     MEM32(ebp + (-0x90)) = eax; /* 0x30003EFB: mov dword ptr [ebp - 0x90], eax */
  12703     eax = MEM32(ecx + 0x4); /* 0x30003F01: mov eax, dword ptr [ecx + 4] */
  12704     ecx = MEM32(ecx + 0x8); /* 0x30003F04: mov ecx, dword ptr [ecx + 8] */
  12705     MEM32(ebp + (-0x4)) = ecx; /* 0x30003F07: mov dword ptr [ebp - 4], ecx */
  12706     ecx = ebp + (-0xC); /* 0x30003F0A: lea ecx, [ebp - 0xc] */
  12707     MEM32(ebp + (-0x8C)) = ebx; /* 0x30003F0D: mov dword ptr [ebp - 0x8c], ebx */
  12708     MEM32(ebp + (-0xA4)) = 0; /* 0x30003F13: mov dword ptr [ebp - 0xa4], 0 */
  12709     MEM32(ebp + (-0xA0)) = 0; /* 0x30003F1D: mov dword ptr [ebp - 0xa0], 0 */
  12710     MEM32(ebp + (-0x9C)) = 0; /* 0x30003F27: mov dword ptr [ebp - 0x9c], 0 */
  12711     MEM32(ebp + (-0xC)) = edx; /* 0x30003F31: mov dword ptr [ebp - 0xc], edx */
  12712     MEM32(ebp + (-0x8)) = eax; /* 0x30003F34: mov dword ptr [ebp - 8], eax */
  12713     RECOMP_ICALL(MEM32(0x300190E8)); /* 0x30003F37: call dword ptr [0x300190e8] */
  12714     RECOMP_FLAGS_IN();
  12715     _st[0] = sqrt(_st[0]); /* 0x30003F3D: fsqrt  */
  12716     ecx = MEM32(esi + 0x8); /* 0x30003F3F: mov ecx, dword ptr [esi + 8] */
  12717     edx = MEM32(esi); /* 0x30003F42: mov edx, dword ptr [esi] */
  12718     eax = MEM32(esi + 0x4); /* 0x30003F44: mov eax, dword ptr [esi + 4] */
  12719     MEM32(ebp + (-0x2C)) = ecx; /* 0x30003F47: mov dword ptr [ebp - 0x2c], ecx */
  12720     ecx = ebp + (-0x34); /* 0x30003F4A: lea ecx, [ebp - 0x34] */
  12721     MEM32(ebp + (-0x64)) = 0x3F800000u; /* 0x30003F4D: mov dword ptr [ebp - 0x64], 0x3f800000 */
  12722     MEM32(ebp + (-0x60)) = 0; /* 0x30003F54: mov dword ptr [ebp - 0x60], 0 */
  12723     MEM32(ebp + (-0x5C)) = 0; /* 0x30003F5B: mov dword ptr [ebp - 0x5c], 0 */
  12724     MEM32(ebp + (-0x70)) = 0; /* 0x30003F62: mov dword ptr [ebp - 0x70], 0 */
  12725     MEM32(ebp + (-0x6C)) = 0; /* 0x30003F69: mov dword ptr [ebp - 0x6c], 0 */
  12726     MEM32(ebp + (-0x68)) = 0x3F800000u; /* 0x30003F70: mov dword ptr [ebp - 0x68], 0x3f800000 */
  12727     MEM32(ebp + (-0x34)) = edx; /* 0x30003F77: mov dword ptr [ebp - 0x34], edx */
  12728     MEM32(ebp + (-0x30)) = eax; /* 0x30003F7A: mov dword ptr [ebp - 0x30], eax */
  12729     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + 0x8) = _v; } /* 0x30003F7D: fstp dword ptr [ebp + 8] */
  12730     RECOMP_ICALL(MEM32(0x300190CC)); /* 0x30003F80: call dword ptr [0x300190cc] */
  12731     RECOMP_FLAGS_IN();
  12732     PUSH32(esp, ecx); /* 0x30003F86: push ecx */
  12733     { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x30003F87: fstp dword ptr [esp] */
  12734     ecx = ebp + (-0x34); /* 0x30003F8A: lea ecx, [ebp - 0x34] */
  12735     RECOMP_ICALL(MEM32(0x300190D0)); /* 0x30003F8D: call dword ptr [0x300190d0] */
  12736     RECOMP_FLAGS_IN();
  12737     ecx = MEM32(ebp + (-0x2C)); /* 0x30003F93: mov ecx, dword ptr [ebp - 0x2c] */
  12738     edx = MEM32(ebp + (-0x34)); /* 0x30003F96: mov edx, dword ptr [ebp - 0x34] */
  12739     eax = MEM32(ebp + (-0x30)); /* 0x30003F99: mov eax, dword ptr [ebp - 0x30] */
  12740     MEM32(ebp + (-0x50)) = ecx; /* 0x30003F9C: mov dword ptr [ebp - 0x50], ecx */
  12741     ecx = MEM32(ebp + (-0x4)); /* 0x30003F9F: mov ecx, dword ptr [ebp - 4] */
  12742     MEM32(ebp + (-0x58)) = edx; /* 0x30003FA2: mov dword ptr [ebp - 0x58], edx */
  12743     edx = MEM32(ebp + (-0xC)); /* 0x30003FA5: mov edx, dword ptr [ebp - 0xc] */
  12744     MEM32(ebp + (-0x54)) = eax; /* 0x30003FA8: mov dword ptr [ebp - 0x54], eax */
  12745     eax = MEM32(ebp + (-0x8)); /* 0x30003FAB: mov eax, dword ptr [ebp - 8] */
  12746     MEM32(ebp + (-0x44)) = ecx; /* 0x30003FAE: mov dword ptr [ebp - 0x44], ecx */
  12747     ecx = ebp + (-0x4C); /* 0x30003FB1: lea ecx, [ebp - 0x4c] */
  12748     MEM32(ebp + (-0x4C)) = edx; /* 0x30003FB4: mov dword ptr [ebp - 0x4c], edx */
  12749     MEM32(ebp + (-0x48)) = eax; /* 0x30003FB7: mov dword ptr [ebp - 0x48], eax */
  12750     RECOMP_ICALL(MEM32(0x300190CC)); /* 0x30003FBA: call dword ptr [0x300190cc] */
  12751     RECOMP_FLAGS_IN();
  12752     PUSH32(esp, ecx); /* 0x30003FC0: push ecx */
  12753     { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x30003FC1: fstp dword ptr [esp] */
  12754     ecx = ebp + (-0x4C); /* 0x30003FC4: lea ecx, [ebp - 0x4c] */
  12755     RECOMP_ICALL(MEM32(0x300190D0)); /* 0x30003FC7: call dword ptr [0x300190d0] */
  12756     RECOMP_FLAGS_IN();
  12757     edx = MEM32(ebp + (-0x4C)); /* 0x30003FCD: mov edx, dword ptr [ebp - 0x4c] */
  12758     eax = MEM32(ebp + (-0x48)); /* 0x30003FD0: mov eax, dword ptr [ebp - 0x48] */
  12759     ecx = MEM32(ebp + (-0x44)); /* 0x30003FD3: mov ecx, dword ptr [ebp - 0x44] */
  12760     MEM32(ebp + (-0x7C)) = edx; /* 0x30003FD6: mov dword ptr [ebp - 0x7c], edx */
  12761     PUSH32(esp, 0x3F800000u); /* 0x30003FD9: push 0x3f800000 */
  12762     edx = ebp + (-0x7C); /* 0x30003FDE: lea edx, [ebp - 0x7c] */
  12763     MEM32(ebp + (-0x78)) = eax; /* 0x30003FE1: mov dword ptr [ebp - 0x78], eax */
  12764     PUSH32(esp, edx); /* 0x30003FE4: push edx */
  12765     eax = ebp + (-0xC0); /* 0x30003FE5: lea eax, [ebp - 0xc0] */
  12766     MEM32(ebp + (-0x74)) = ecx; /* 0x30003FEB: mov dword ptr [ebp - 0x74], ecx */
  12767     PUSH32(esp, eax); /* 0x30003FEE: push eax */
  12768     ecx = ebp + (-0x28); /* 0x30003FEF: lea ecx, [ebp - 0x28] */
  12769     MEM32(ebp + (-0x28)) = 0; /* 0x30003FF2: mov dword ptr [ebp - 0x28], 0 */
  12770     MEM32(ebp + (-0x24)) = 0; /* 0x30003FF9: mov dword ptr [ebp - 0x24], 0 */
  12771     MEM32(ebp + (-0x20)) = 0x3F800000u; /* 0x30004000: mov dword ptr [ebp - 0x20], 0x3f800000 */
  12772     RECOMP_ICALL(MEM32(0x300190B0)); /* 0x30004007: call dword ptr [0x300190b0] */
  12773     RECOMP_FLAGS_IN();
  12774     ecx = eax; /* 0x3000400D: mov ecx, eax */
  12775     RECOMP_ICALL(MEM32(0x300190C8)); /* 0x3000400F: call dword ptr [0x300190c8] */
  12776     RECOMP_FLAGS_IN();
  12777     ecx = MEM32(eax); /* 0x30004015: mov ecx, dword ptr [eax] */
  12778     edx = MEM32(eax + 0x4); /* 0x30004017: mov edx, dword ptr [eax + 4] */
  12779     eax = MEM32(eax + 0x8); /* 0x3000401A: mov eax, dword ptr [eax + 8] */
  12780     MEM32(ebp + (-0x10)) = eax; /* 0x3000401D: mov dword ptr [ebp - 0x10], eax */
  12781     fp_push(*(float*)&MEM32(ebp + (-0x10))); /* 0x30004020: fld dword ptr [ebp - 0x10] */
  12782     _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x30004023: fmul dword ptr [ebp - 0x24] */
  12783     MEM32(ebp + (-0x14)) = edx; /* 0x30004026: mov dword ptr [ebp - 0x14], edx */
  12784     fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x30004029: fld dword ptr [ebp - 0x20] */
  12785     MEM32(ebp + (-0x18)) = ecx; /* 0x3000402C: mov dword ptr [ebp - 0x18], ecx */
  12786     _st[0] *= (double)*(float*)ADDR(ebp + (-0x14)); /* 0x3000402F: fmul dword ptr [ebp - 0x14] */
  12787     { double _v = fp_pop(); _st[0] -= _v; } /* 0x30004032: fsubp st(1) */
  12788     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xB4)) = _v; } /* 0x30004034: fstp dword ptr [ebp - 0xb4] */
  12789     fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x3000403A: fld dword ptr [ebp - 0x20] */
  12790     _st[0] *= (double)*(float*)ADDR(ebp + (-0x18)); /* 0x3000403D: fmul dword ptr [ebp - 0x18] */
  12791     fp_push(*(float*)&MEM32(ebp + (-0x10))); /* 0x30004040: fld dword ptr [ebp - 0x10] */
  12792     _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x30004043: fmul dword ptr [ebp - 0x28] */
  12793     { double _v = fp_pop(); _st[0] -= _v; } /* 0x30004046: fsubp st(1) */
  12794     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xB0)) = _v; } /* 0x30004048: fstp dword ptr [ebp - 0xb0] */
  12795     fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x3000404E: fld dword ptr [ebp - 0x14] */
  12796     _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x30004051: fmul dword ptr [ebp - 0x28] */
  12797     fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x30004054: fld dword ptr [ebp - 0x18] */
  12798     _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x30004057: fmul dword ptr [ebp - 0x24] */
  12799     { double _v = fp_pop(); _st[0] -= _v; } /* 0x3000405A: fsubp st(1) */
  12800     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xAC)) = _v; } /* 0x3000405C: fstp dword ptr [ebp - 0xac] */
  12801     fp_push(*(float*)&MEM32(ebp + (-0x20))); /* 0x30004062: fld dword ptr [ebp - 0x20] */
  12802     _st[0] *= (double)*(float*)ADDR(ebp + (-0x10)); /* 0x30004065: fmul dword ptr [ebp - 0x10] */
  12803     MEM32(ebp + (-0x10)) = 0; /* 0x30004068: mov dword ptr [ebp - 0x10], 0 */
  12804     fp_push(*(float*)&MEM32(ebp + (-0x14))); /* 0x3000406F: fld dword ptr [ebp - 0x14] */
  12805     eax = MEM32(ebp + (-0x10)); /* 0x30004072: mov eax, dword ptr [ebp - 0x10] */
  12806     _st[0] *= (double)*(float*)ADDR(ebp + (-0x24)); /* 0x30004075: fmul dword ptr [ebp - 0x24] */
  12807     MEM32(ebp + (-0x14)) = 0x3F800000u; /* 0x30004078: mov dword ptr [ebp - 0x14], 0x3f800000 */
  12808     edx = MEM32(ebp + (-0x14)); /* 0x3000407F: mov edx, dword ptr [ebp - 0x14] */
  12809     MEM32(ebp + (-0x3C)) = edx; /* 0x30004082: mov dword ptr [ebp - 0x3c], edx */
  12810     { double _v = fp_pop(); _st[0] += _v; } /* 0x30004085: faddp st(1) */
  12811     MEM32(ebp + (-0x38)) = eax; /* 0x30004087: mov dword ptr [ebp - 0x38], eax */
  12812     fp_push(*(float*)&MEM32(ebp + (-0x18))); /* 0x3000408A: fld dword ptr [ebp - 0x18] */
  12813     MEM32(ebp + (-0x18)) = 0; /* 0x3000408D: mov dword ptr [ebp - 0x18], 0 */
  12814     _st[0] *= (double)*(float*)ADDR(ebp + (-0x28)); /* 0x30004094: fmul dword ptr [ebp - 0x28] */
  12815     ecx = MEM32(ebp + (-0x18)); /* 0x30004097: mov ecx, dword ptr [ebp - 0x18] */
  12816     MEM32(ebp + (-0x40)) = ecx; /* 0x3000409A: mov dword ptr [ebp - 0x40], ecx */
  12817     ecx = ebp + (-0xB4); /* 0x3000409D: lea ecx, [ebp - 0xb4] */
  12818     { double _v = fp_pop(); _st[0] += _v; } /* 0x300040A3: faddp st(1) */
  12819     PUSH32(esp, ecx); /* 0x300040A5: push ecx */
  12820     ecx = ebp + (-0x40); /* 0x300040A6: lea ecx, [ebp - 0x40] */
  12821     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xA8)) = _v; } /* 0x300040A9: fstp dword ptr [ebp - 0xa8] */
  12822     RECOMP_ICALL(MEM32(0x300190EC)); /* 0x300040AF: call dword ptr [0x300190ec] */
  12823     RECOMP_FLAGS_IN();
  12824     edx = MEM32(eax); /* 0x300040B5: mov edx, dword ptr [eax] */
  12825     MEM32(ebp + (-0x70)) = edx; /* 0x300040B7: mov dword ptr [ebp - 0x70], edx */
  12826     ecx = MEM32(eax + 0x4); /* 0x300040BA: mov ecx, dword ptr [eax + 4] */
  12827     MEM32(ebp + (-0x6C)) = ecx; /* 0x300040BD: mov dword ptr [ebp - 0x6c], ecx */
  12828     edx = MEM32(eax + 0x8); /* 0x300040C0: mov edx, dword ptr [eax + 8] */
  12829     eax = MEM32(ebp + (-0xC)); /* 0x300040C3: mov eax, dword ptr [ebp - 0xc] */
  12830     ecx = MEM32(ebp + (-0x8)); /* 0x300040C6: mov ecx, dword ptr [ebp - 8] */
  12831     MEM32(ebp + (-0x40)) = eax; /* 0x300040C9: mov dword ptr [ebp - 0x40], eax */
  12832     MEM32(ebp + (-0x68)) = edx; /* 0x300040CC: mov dword ptr [ebp - 0x68], edx */
  12833     edx = MEM32(ebp + (-0x4)); /* 0x300040CF: mov edx, dword ptr [ebp - 4] */
  12834     eax = ebp + (-0x70); /* 0x300040D2: lea eax, [ebp - 0x70] */
  12835     MEM32(ebp + (-0x3C)) = ecx; /* 0x300040D5: mov dword ptr [ebp - 0x3c], ecx */
  12836     PUSH32(esp, eax); /* 0x300040D8: push eax */
  12837     ecx = ebp + (-0x40); /* 0x300040D9: lea ecx, [ebp - 0x40] */
  12838     MEM32(ebp + (-0x38)) = edx; /* 0x300040DC: mov dword ptr [ebp - 0x38], edx */
  12839     RECOMP_ICALL(MEM32(0x300190D8)); /* 0x300040DF: call dword ptr [0x300190d8] */
  12840     RECOMP_FLAGS_IN();
  12841     ecx = MEM32(eax); /* 0x300040E5: mov ecx, dword ptr [eax] */
  12842     MEM32(ebp + (-0x64)) = ecx; /* 0x300040E7: mov dword ptr [ebp - 0x64], ecx */
  12843     edx = MEM32(eax + 0x4); /* 0x300040EA: mov edx, dword ptr [eax + 4] */
  12844     MEM32(ebp + (-0x60)) = edx; /* 0x300040ED: mov dword ptr [ebp - 0x60], edx */
  12845     eax = MEM32(eax + 0x8); /* 0x300040F0: mov eax, dword ptr [eax + 8] */
  12846     ecx = ebp + (-0x64); /* 0x300040F3: lea ecx, [ebp - 0x64] */
  12847     MEM32(ebp + (-0x5C)) = eax; /* 0x300040F6: mov dword ptr [ebp - 0x5c], eax */
  12848     RECOMP_ICALL(MEM32(0x300190CC)); /* 0x300040F9: call dword ptr [0x300190cc] */
  12849     RECOMP_FLAGS_IN();
  12850     PUSH32(esp, ecx); /* 0x300040FF: push ecx */
  12851     { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x30004100: fstp dword ptr [esp] */
  12852     ecx = ebp + (-0x64); /* 0x30004103: lea ecx, [ebp - 0x64] */
  12853     RECOMP_ICALL(MEM32(0x300190D0)); /* 0x30004106: call dword ptr [0x300190d0] */
  12854     RECOMP_FLAGS_IN();
  12855     fp_push(*(float*)&MEM32(ebp + (-0x34))); /* 0x3000410C: fld dword ptr [ebp - 0x34] */
  12856     _st[0] *= (double)*(float*)ADDR(0x30019180); /* 0x3000410F: fmul dword ptr [0x30019180] */
  12857     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x58)) = _v; } /* 0x30004115: fstp dword ptr [ebp - 0x58] */
  12858     fp_push(*(float*)&MEM32(ebp + (-0x54))); /* 0x30004118: fld dword ptr [ebp - 0x54] */
  12859     _st[0] *= (double)*(float*)ADDR(0x30019180); /* 0x3000411B: fmul dword ptr [0x30019180] */
  12860     eax = MEM32(ebp + 0x14); /* 0x30004121: mov eax, dword ptr [ebp + 0x14] */
  12861     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x54)) = _v; } /* 0x30004124: fstp dword ptr [ebp - 0x54] */
  12862     /* test eax, eax */ /* 0x30004127: test eax, eax */
  12863     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
  12864     _cf = 0;
  12865     _flag_k = FK_TEST;
  12866     fp_push(*(float*)&MEM32(ebp + (-0x50))); /* 0x30004129: fld dword ptr [ebp - 0x50] */
  12867     _st[0] *= (double)*(float*)ADDR(0x30019180); /* 0x3000412C: fmul dword ptr [0x30019180] */
  12868     MEM32(ebp + 0xC) = 0; /* 0x30004132: mov dword ptr [ebp + 0xc], 0 */
  12869     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x50)) = _v; } /* 0x30004139: fstp dword ptr [ebp - 0x50] */
  12870     if (TEST_LE(_flag_a, _flag_b)) goto L_300042CF; /* 0x3000413C: jle 0x300042cf */
  12871 L_30004142:
  12872     edx = MEM32(ebp + 0x10); /* 0x30004142: mov edx, dword ptr [ebp + 0x10] */
  12873     ecx = eax + eax * 2; /* 0x30004145: lea ecx, [eax + eax*2] */
  12874     if (2u) _cf = (((ecx) >> 30) & 1u); /* 0x30004148: shl ecx, 2 */
  12875     if (2u) { _flag_a = recomp_flags_pack((ecx << 2u), _cf, 0, 0); _flag_b = 0; _flag_k = FK_EFLAGS; }
  12876     ecx = ecx << 2u; /* 0x30004148: shl ecx, 2 */
  12877     MEM32(ebp + 0x10) = edx; /* 0x3000414B: mov dword ptr [ebp + 0x10], edx */
  12878     edx = MEM32(ebp + 0x18); /* 0x3000414E: mov edx, dword ptr [ebp + 0x18] */
  12879     PUSH32(esp, edi); /* 0x30004151: push edi */
  12880     MEM32(ebp + (-0x84)) = ecx; /* 0x30004152: mov dword ptr [ebp - 0x84], ecx */
  12881 L_30004158:
  12882     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  12883     edi = 0; /* 0x30004158: xor edi, edi */
  12884     _cf = 0;
  12885     _flag_k = FK_TEST;
  12886     /* test edx, edx */ /* 0x3000415A: test edx, edx */
  12887     _flag_a = (uint32_t)(edx); _flag_b = (uint32_t)(edx);
  12888     _cf = 0;
  12889     _flag_k = FK_TEST;
  12890     MEM32(ebp + (-0x1C)) = edi; /* 0x3000415C: mov dword ptr [ebp - 0x1c], edi */
  12891     if (TEST_LE(_flag_a, _flag_b)) goto L_300042B7; /* 0x3000415F: jle 0x300042b7 */
  12892 L_30004165:
  12893     fp_push((double)(int32_t)MEM32(ebp + 0xC)); /* 0x30004165: fild dword ptr [ebp + 0xc] */
  12894     esi = MEM32(ebp + 0x10); /* 0x30004168: mov esi, dword ptr [ebp + 0x10] */
  12895     _st[0] = _st[0] / (double)(int32_t)MEM32(ebp + 0x14); /* 0x3000416B: fidiv dword ptr [ebp + 0x14] */
  12896     _st[0] -= *(double*)ADDR(0x30019178); /* 0x3000416E: fsub qword ptr [0x30019178] */
  12897     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x80)) = _v; } /* 0x30004174: fstp dword ptr [ebp - 0x80] */
  12898     fp_push((double)(int32_t)MEM32(ebp + 0x18)); /* 0x30004177: fild dword ptr [ebp + 0x18] */
  12899     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x88)) = _v; } /* 0x3000417A: fstp dword ptr [ebp - 0x88] */
  12900 L_30004180:
  12901     eax = MEM32(ebp + (-0x70)); /* 0x30004180: mov eax, dword ptr [ebp - 0x70] */
  12902     ecx = MEM32(ebp + (-0x6C)); /* 0x30004183: mov ecx, dword ptr [ebp - 0x6c] */
  12903     edx = MEM32(ebp + (-0x68)); /* 0x30004186: mov edx, dword ptr [ebp - 0x68] */
  12904     MEM32(ebp + (-0x40)) = eax; /* 0x30004189: mov dword ptr [ebp - 0x40], eax */
  12905     eax = MEM32(ebp + (-0x80)); /* 0x3000418C: mov eax, dword ptr [ebp - 0x80] */
  12906     MEM32(ebp + (-0x3C)) = ecx; /* 0x3000418F: mov dword ptr [ebp - 0x3c], ecx */
  12907     PUSH32(esp, eax); /* 0x30004192: push eax */
  12908     ecx = ebp + (-0x40); /* 0x30004193: lea ecx, [ebp - 0x40] */
  12909     MEM32(ebp + (-0x38)) = edx; /* 0x30004196: mov dword ptr [ebp - 0x38], edx */
  12910     RECOMP_ICALL(MEM32(0x300190D0)); /* 0x30004199: call dword ptr [0x300190d0] */
  12911     RECOMP_FLAGS_IN();
  12912     fp_push((double)(int32_t)MEM32(ebp + (-0x1C))); /* 0x3000419F: fild dword ptr [ebp - 0x1c] */
  12913     ecx = MEM32(eax); /* 0x300041A2: mov ecx, dword ptr [eax] */
  12914     MEM32(ebp + (-0x4C)) = ecx; /* 0x300041A4: mov dword ptr [ebp - 0x4c], ecx */
  12915     _st[0] /= (double)*(float*)ADDR(ebp + (-0x88)); /* 0x300041A7: fdiv dword ptr [ebp - 0x88] */
  12916     edx = MEM32(eax + 0x4); /* 0x300041AD: mov edx, dword ptr [eax + 4] */
  12917     ecx = MEM32(ebp + (-0x64)); /* 0x300041B0: mov ecx, dword ptr [ebp - 0x64] */
  12918     MEM32(ebp + (-0x48)) = edx; /* 0x300041B3: mov dword ptr [ebp - 0x48], edx */
  12919     eax = MEM32(eax + 0x8); /* 0x300041B6: mov eax, dword ptr [eax + 8] */
  12920     edx = MEM32(ebp + (-0x60)); /* 0x300041B9: mov edx, dword ptr [ebp - 0x60] */
  12921     MEM32(ebp + (-0x44)) = eax; /* 0x300041BC: mov dword ptr [ebp - 0x44], eax */
  12922     eax = MEM32(ebp + (-0x5C)); /* 0x300041BF: mov eax, dword ptr [ebp - 0x5c] */
  12923     PUSH32(esp, ecx); /* 0x300041C2: push ecx */
  12924     MEM32(ebp + (-0x7C)) = ecx; /* 0x300041C3: mov dword ptr [ebp - 0x7c], ecx */
  12925     ecx = ebp + (-0x7C); /* 0x300041C6: lea ecx, [ebp - 0x7c] */
  12926     MEM32(ebp + (-0x78)) = edx; /* 0x300041C9: mov dword ptr [ebp - 0x78], edx */
  12927     MEM32(ebp + (-0x74)) = eax; /* 0x300041CC: mov dword ptr [ebp - 0x74], eax */
  12928     _st[0] -= *(double*)ADDR(0x30019178); /* 0x300041CF: fsub qword ptr [0x30019178] */
  12929     { float _v = (float)fp_pop(); *(float*)ADDR(esp) = _v; } /* 0x300041D5: fstp dword ptr [esp] */
  12930     RECOMP_ICALL(MEM32(0x300190D0)); /* 0x300041D8: call dword ptr [0x300190d0] */
  12931     RECOMP_FLAGS_IN();
  12932     ecx = MEM32(eax); /* 0x300041DE: mov ecx, dword ptr [eax] */
  12933     edx = MEM32(eax + 0x4); /* 0x300041E0: mov edx, dword ptr [eax + 4] */
  12934     eax = MEM32(eax + 0x8); /* 0x300041E3: mov eax, dword ptr [eax + 8] */
  12935     MEM32(ebp + (-0x34)) = ecx; /* 0x300041E6: mov dword ptr [ebp - 0x34], ecx */
  12936     ecx = ebp + (-0x4C); /* 0x300041E9: lea ecx, [ebp - 0x4c] */
  12937     PUSH32(esp, ecx); /* 0x300041EC: push ecx */
  12938     ecx = ebp + (-0x34); /* 0x300041ED: lea ecx, [ebp - 0x34] */
  12939     MEM32(ebp + (-0x30)) = edx; /* 0x300041F0: mov dword ptr [ebp - 0x30], edx */
  12940     MEM32(ebp + (-0x2C)) = eax; /* 0x300041F3: mov dword ptr [ebp - 0x2c], eax */
  12941     RECOMP_ICALL(MEM32(0x300190C4)); /* 0x300041F6: call dword ptr [0x300190c4] */
  12942     RECOMP_FLAGS_IN();
  12943     edx = MEM32(eax); /* 0x300041FC: mov edx, dword ptr [eax] */
  12944     MEM32(ebp + (-0xC)) = edx; /* 0x300041FE: mov dword ptr [ebp - 0xc], edx */
  12945     fp_push(*(float*)&MEM32(ebp + (-0xC))); /* 0x30004201: fld dword ptr [ebp - 0xc] */
  12946     _st[0] += (double)*(float*)ADDR(ebp + (-0x58)); /* 0x30004204: fadd dword ptr [ebp - 0x58] */
  12947     ecx = MEM32(eax + 0x4); /* 0x30004207: mov ecx, dword ptr [eax + 4] */
  12948     MEM32(ebp + (-0x8)) = ecx; /* 0x3000420A: mov dword ptr [ebp - 8], ecx */
  12949     fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x3000420D: fld dword ptr [ebp - 8] */
  12950     _st[0] += (double)*(float*)ADDR(ebp + (-0x54)); /* 0x30004210: fadd dword ptr [ebp - 0x54] */
  12951     edx = MEM32(eax + 0x8); /* 0x30004213: mov edx, dword ptr [eax + 8] */
  12952     ebx = MEM32(ebx); /* 0x30004216: mov ebx, dword ptr [ebx] */
  12953     MEM32(ebp + (-0x4)) = edx; /* 0x30004218: mov dword ptr [ebp - 4], edx */
  12954     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x3000421B: fstp dword ptr [ebp - 8] */
  12955     PUSH32(esp, 0); /* 0x3000421E: push 0 */
  12956     fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x30004220: fld dword ptr [ebp - 4] */
  12957     PUSH32(esp, 1); /* 0x30004223: push 1 */
  12958     _st[0] += (double)*(float*)ADDR(ebp + (-0x50)); /* 0x30004225: fadd dword ptr [ebp - 0x50] */
  12959     eax = ebp + (-0xA4); /* 0x30004228: lea eax, [ebp - 0xa4] */
  12960     PUSH32(esp, eax); /* 0x3000422E: push eax */
  12961     PUSH32(esp, esi); /* 0x3000422F: push esi */
  12962     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x30004230: fstp dword ptr [ebp - 4] */
  12963     ecx = ebp + (-0xC); /* 0x30004233: lea ecx, [ebp - 0xc] */
  12964     PUSH32(esp, ecx); /* 0x30004236: push ecx */
  12965     _st[0] *= (double)*(float*)ADDR(ebp + 0x8); /* 0x30004237: fmul dword ptr [ebp + 8] */
  12966     edx = ebp + (-0xC0); /* 0x3000423A: lea edx, [ebp - 0xc0] */
  12967     PUSH32(esp, edx); /* 0x30004240: push edx */
  12968     ecx = ebp + (-0x98); /* 0x30004241: lea ecx, [ebp - 0x98] */
  12969     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0xC)) = _v; } /* 0x30004247: fstp dword ptr [ebp - 0xc] */
  12970     fp_push(*(float*)&MEM32(ebp + (-0x8))); /* 0x3000424A: fld dword ptr [ebp - 8] */
  12971     _st[0] *= (double)*(float*)ADDR(ebp + 0x8); /* 0x3000424D: fmul dword ptr [ebp + 8] */
  12972     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x8)) = _v; } /* 0x30004250: fstp dword ptr [ebp - 8] */
  12973     fp_push(*(float*)&MEM32(ebp + (-0x4))); /* 0x30004253: fld dword ptr [ebp - 4] */
  12974     _st[0] *= (double)*(float*)ADDR(ebp + 0x8); /* 0x30004256: fmul dword ptr [ebp + 8] */
  12975     { float _v = (float)fp_pop(); *(float*)ADDR(ebp + (-0x4)) = _v; } /* 0x30004259: fstp dword ptr [ebp - 4] */
  12976     RECOMP_ICALL(MEM32(0x300190B0)); /* 0x3000425C: call dword ptr [0x300190b0] */
  12977     RECOMP_FLAGS_IN();
  12978     PUSH32(esp, eax); /* 0x30004262: push eax */
  12979     edx = ebx; /* 0x30004263: mov edx, ebx */
  12980     ebx = MEM32(ebp + (-0x8C)); /* 0x30004265: mov ebx, dword ptr [ebp - 0x8c] */
  12981     eax = ebp + (-0x98); /* 0x3000426B: lea eax, [ebp - 0x98] */
  12982     PUSH32(esp, eax); /* 0x30004271: push eax */
  12983     ecx = ebx; /* 0x30004272: mov ecx, ebx */
  12984     RECOMP_ICALL(MEM32(edx + 0x10)); /* 0x30004274: call dword ptr [edx + 0x10] */
  12985     RECOMP_FLAGS_IN();
  12986     /* test LO8(eax), LO8(eax) */ /* 0x30004277: test al, al */
  12987     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(eax)) << 24;
  12988     _cf = 0;
  12989     _flag_k = FK_NARROW(FK_TEST, 24);
  12990     if (TEST_NZ(_flag_a, _flag_b)) goto L_3000429C; /* 0x30004279: jne 0x3000429c */
  12991 L_3000427B:
  12992     PUSH32(esp, 0); /* 0x3000427B: push 0 */
  12993     PUSH32(esp, 0); /* 0x3000427D: push 0 */
  12994     PUSH32(esp, 0); /* 0x3000427F: push 0 */
  12995     ecx = ebp + (-0x18); /* 0x30004281: lea ecx, [ebp - 0x18] */
  12996     RECOMP_ICALL(MEM32(0x300190D4)); /* 0x30004284: call dword ptr [0x300190d4] */
  12997     RECOMP_FLAGS_IN();
  12998     edx = MEM32(eax); /* 0x3000428A: mov edx, dword ptr [eax] */
  12999     ecx = esi; /* 0x3000428C: mov ecx, esi */
  13000     MEM32(ecx) = edx; /* 0x3000428E: mov dword ptr [ecx], edx */
  13001     edx = MEM32(eax + 0x4); /* 0x30004290: mov edx, dword ptr [eax + 4] */
  13002     MEM32(ecx + 0x4) = edx; /* 0x30004293: mov dword ptr [ecx + 4], edx */
  13003     eax = MEM32(eax + 0x8); /* 0x30004296: mov eax, dword ptr [eax + 8] */
  13004     MEM32(ecx + 0x8) = eax; /* 0x30004299: mov dword ptr [ecx + 8], eax */
  13005 L_3000429C:
  13006     edx = MEM32(ebp + 0x18); /* 0x3000429C: mov edx, dword ptr [ebp + 0x18] */
  13007     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(1);
  13008     edi = edi + 1; /* 0x3000429F: inc edi */
  13009     _flag_k = FK_INC;
  13010     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0xCu);
  13011     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13012     esi = esi + 0xCu; /* 0x300042A0: add esi, 0xc */
  13013     _flag_k = FK_ADD;
  13014     /* cmp edi, edx */ /* 0x300042A3: cmp edi, edx */
  13015     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edx);
  13016     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13017     _flag_k = FK_CMP;
  13018     MEM32(ebp + (-0x1C)) = edi; /* 0x300042A5: mov dword ptr [ebp - 0x1c], edi */
  13019     RECOMP_BACKEDGE();
  13020     if (CMP_L(_flag_a, _flag_b)) goto L_30004180; /* 0x300042A8: jl 0x30004180 */
  13021 L_300042AE:
  13022     eax = MEM32(ebp + 0x14); /* 0x300042AE: mov eax, dword ptr [ebp + 0x14] */
  13023     ecx = MEM32(ebp + (-0x84)); /* 0x300042B1: mov ecx, dword ptr [ebp - 0x84] */
  13024 L_300042B7:
  13025     esi = MEM32(ebp + 0xC); /* 0x300042B7: mov esi, dword ptr [ebp + 0xc] */
  13026     edi = MEM32(ebp + 0x10); /* 0x300042BA: mov edi, dword ptr [ebp + 0x10] */
  13027     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(1);
  13028     esi = esi + 1; /* 0x300042BD: inc esi */
  13029     _flag_k = FK_INC;
  13030     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(ecx);
  13031     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13032     edi = edi + ecx; /* 0x300042BE: add edi, ecx */
  13033     _flag_k = FK_ADD;
  13034     /* cmp esi, eax */ /* 0x300042C0: cmp esi, eax */
  13035     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(eax);
  13036     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13037     _flag_k = FK_CMP;
  13038     MEM32(ebp + 0xC) = esi; /* 0x300042C2: mov dword ptr [ebp + 0xc], esi */
  13039     MEM32(ebp + 0x10) = edi; /* 0x300042C5: mov dword ptr [ebp + 0x10], edi */
  13040     RECOMP_BACKEDGE();
  13041     if (CMP_L(_flag_a, _flag_b)) goto L_30004158; /* 0x300042C8: jl 0x30004158 */
  13042 L_300042CE:
  13043     edi = POP32_VAL(esp); /* 0x300042CE: pop edi */
  13044 L_300042CF:
  13045     esi = POP32_VAL(esp); /* 0x300042CF: pop esi */
  13046     ebx = POP32_VAL(esp); /* 0x300042D0: pop ebx */
  13047     esp = ebp; /* 0x300042D1: mov esp, ebp */
  13048     ebp = POP32_VAL(esp); /* 0x300042D3: pop ebp */
  13049     RECOMP_FLAGS_OUT(); esp += 24; { RECOMP_REGS_OUT(); return; } /* 0x300042D4: ret 0x14 */
  13050     RECOMP_REGS_OUT();
  13051 }
  13052 
  13053 void sub_300042E0(void) {
  13054     int _fpu_cmp = 0;
  13055     uint32_t _cf = 0;
  13056     int _df = 1;
  13057     uint32_t _flag_k = FK_NONE;
  13058     uint32_t _flag_a = 0, _flag_b = 0;
  13059     uint32_t _itail_tgt = 0;
  13060     RECOMP_REGS_LOCALS
  13061     RECOMP_ENTER(0x300042E0u);
  13062 
  13063 L_300042E0:
  13064     PUSH32(esp, ebp); /* 0x300042E0: push ebp */
  13065     ebp = esp; /* 0x300042E1: mov ebp, esp */
  13066     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
  13067     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13068     esp = esp - 8; /* 0x300042E3: sub esp, 8 */
  13069     _flag_k = FK_CMP;
  13070     PUSH32(esp, esi); /* 0x300042E6: push esi */
  13071     esi = ecx; /* 0x300042E7: mov esi, ecx */
  13072     eax = MEM32(esi + 0x8); /* 0x300042E9: mov eax, dword ptr [esi + 8] */
  13073     PUSH32(esp, edi); /* 0x300042EC: push edi */
  13074     edi = MEM32(esi + 0x4); /* 0x300042ED: mov edi, dword ptr [esi + 4] */
  13075     /* cmp edi, eax */ /* 0x300042F0: cmp edi, eax */
  13076     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  13077     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13078     _flag_k = FK_CMP;
  13079     MEM32(ebp + (-0x8)) = esi; /* 0x300042F2: mov dword ptr [ebp - 8], esi */
  13080     MEM32(ebp + (-0x4)) = eax; /* 0x300042F5: mov dword ptr [ebp - 4], eax */
  13081     if (CMP_EQ(_flag_a, _flag_b)) goto L_3000433A; /* 0x300042F8: je 0x3000433a */
  13082 L_300042FA:
  13083     PUSH32(esp, ebx); /* 0x300042FA: push ebx */
  13084 L_300042FB:
  13085     ebx = MEM32(edi + 0x8); /* 0x300042FB: mov ebx, dword ptr [edi + 8] */
  13086     esi = MEM32(edi + 0x4); /* 0x300042FE: mov esi, dword ptr [edi + 4] */
  13087     /* cmp esi, ebx */ /* 0x30004301: cmp esi, ebx */
  13088     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
  13089     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13090     _flag_k = FK_CMP;
  13091     if (CMP_EQ(_flag_a, _flag_b)) goto L_30004315; /* 0x30004303: je 0x30004315 */
  13092 L_30004305:
  13093     PUSH32(esp, 0); /* 0x30004305: push 0 */
  13094     ecx = esi; /* 0x30004307: mov ecx, esi */
  13095     RECOMP_ICALL(0x30005520u); /* 0x30004309: call 0x30005520 */ /* not lifted */
  13096     RECOMP_FLAGS_IN();
  13097     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x30u);
  13098     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13099     esi = esi + 0x30u; /* 0x3000430E: add esi, 0x30 */
  13100     _flag_k = FK_ADD;
  13101     /* cmp esi, ebx */ /* 0x30004311: cmp esi, ebx */
  13102     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(ebx);
  13103     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13104     _flag_k = FK_CMP;
  13105     RECOMP_BACKEDGE();
  13106     if (CMP_NE(_flag_a, _flag_b)) goto L_30004305; /* 0x30004313: jne 0x30004305 */
  13107 L_30004315:
  13108     eax = MEM32(edi + 0x4); /* 0x30004315: mov eax, dword ptr [edi + 4] */
  13109     PUSH32(esp, eax); /* 0x30004318: push eax */
  13110     RECOMP_ICALL(0x30018080u); /* 0x30004319: call 0x30018080 */ /* not lifted */
  13111     RECOMP_FLAGS_IN();
  13112     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  13113     eax = 0; /* 0x3000431E: xor eax, eax */
  13114     _cf = 0;
  13115     _flag_k = FK_TEST;
  13116     MEM32(edi + 0x4) = eax; /* 0x30004320: mov dword ptr [edi + 4], eax */
  13117     MEM32(edi + 0x8) = eax; /* 0x30004323: mov dword ptr [edi + 8], eax */
  13118     MEM32(edi + 0xC) = eax; /* 0x30004326: mov dword ptr [edi + 0xc], eax */
  13119     eax = MEM32(ebp + (-0x4)); /* 0x30004329: mov eax, dword ptr [ebp - 4] */
  13120     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(0x10u);
  13121     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13122     edi = edi + 0x10u; /* 0x3000432C: add edi, 0x10 */
  13123     _flag_k = FK_ADD;
  13124     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  13125     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13126     esp = esp + 4; /* 0x3000432F: add esp, 4 */
  13127     _flag_k = FK_ADD;
  13128     /* cmp edi, eax */ /* 0x30004332: cmp edi, eax */
  13129     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
  13130     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
  13131     _flag_k = FK_CMP;
  13132     RECOMP_BACKEDGE();
  13133     if (CMP_NE(_flag_a, _flag_b)) goto L_300042FB; /* 0x30004334: jne 0x300042fb */
  13134 L_30004336:
  13135     esi = MEM32(ebp + (-0x8)); /* 0x30004336: mov esi, dword ptr [ebp - 8] */
  13136     ebx = POP32_VAL(esp); /* 0x30004339: pop ebx */
  13137 L_3000433A:
  13138     ecx = MEM32(esi + 0x4); /* 0x3000433A: mov ecx, dword ptr [esi + 4] */
  13139     PUSH32(esp, ecx); /* 0x3000433D: push ecx */
  13140     RECOMP_ICALL(0x30018080u); /* 0x3000433E: call 0x30018080 */ /* not lifted */
  13141     RECOMP_FLAGS_IN();
  13142     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
  13143     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
  13144     esp = esp + 4; /* 0x30004343: add esp, 4 */
  13145     _flag_k = FK_ADD;
  13146     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
  13147     eax = 0; /* 0x30004346: xor eax, eax */
  13148     _cf = 0;
  13149     _flag_k = FK_TEST;
  13150     edi = POP32_VAL(esp); /* 0x30004348: pop edi */
  13151     MEM32(esi + 0x4) = eax; /* 0x30004349: mov dword ptr [esi + 4], eax */
  13152     MEM32(esi + 0x8) = eax; /* 0x3000434C: mov dword ptr [esi + 8], eax */
  13153     MEM32(esi + 0xC) = eax; /* 0x3000434F: mov dword ptr [esi + 0xc], eax */
  13154     esi = POP32_VAL(esp); /* 0x30004352: pop esi */
  13155     esp = ebp; /* 0x30004353: mov esp, ebp */
  13156     ebp = POP32_VAL(esp); /* 0x30004355: pop ebp */
  13157     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x30004356: ret  */
  13158     RECOMP_REGS_OUT();
  13159 }