aorecomp

Anarchy Online classic in the browser

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


client/game/hhr.dll/lifted-0026.c (350906B)


      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_31047509(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(0x31047509u);
     17 
     18     goto L_31047509;
     19 L_3100B790:
     20     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
     21     ebp = esp; /* 0x3100B791: mov ebp, esp */
     22     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
     23     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
     24     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
     25     _flag_k = FK_CMP;
     26     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
     27     PUSH32(esp, esi); /* 0x3100B797: push esi */
     28     esi = ecx; /* 0x3100B798: mov esi, ecx */
     29     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
     30     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
     31     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
     32     _cf = 0;
     33     _flag_k = FK_TEST;
     34     PUSH32(esp, edi); /* 0x3100B79F: push edi */
     35     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
     36     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
     37     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
     38     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
     39 L_3100B7AA:
     40     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
     41     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
     42     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
     43     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
     44     _flag_k = FK_CMP;
     45     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
     46 L_3100B7B0:
     47     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
     48     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
     49     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
     50     _flag_k = FK_CMP;
     51     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
     52 L_3100B7B4:
     53     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
     54     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
     55     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
     56     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
     57     _flag_k = FK_CMP;
     58     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
     59     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
     60 L_3100B7BE:
     61     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
     62     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
     63     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
     64     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
     65     RECOMP_FLAGS_IN();
     66     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
     67     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
     68     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
     69     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
     70     RECOMP_FLAGS_IN();
     71     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
     72     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
     73     RECOMP_FLAGS_IN();
     74     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
     75     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
     76     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
     77     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
     78     _flag_k = FK_ADD;
     79     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
     80     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
     81     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
     82     _flag_k = FK_CMP;
     83     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
     84     RECOMP_BACKEDGE();
     85     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
     86 L_3100B7E7:
     87     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
     88     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
     89     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
     90     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
     91     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
     92     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
     93     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
     94     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
     95     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
     96     PUSH32(esp, eax); /* 0x3100B805: push eax */
     97     ecx = esi; /* 0x3100B806: mov ecx, esi */
     98     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
     99     RECOMP_FLAGS_IN();
    100     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
    101 L_3100B80F:
    102     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
    103     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
    104     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    105     _flag_k = FK_CMP;
    106     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
    107 L_3100B813:
    108     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
    109     ebx = eax; /* 0x3100B816: mov ebx, eax */
    110     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
    111     RECOMP_FLAGS_IN();
    112     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
    113     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
    114     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
    115     ecx = esi; /* 0x3100B822: mov ecx, esi */
    116     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
    117     RECOMP_FLAGS_IN();
    118     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
    119     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
    120     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
    121     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    122     _flag_k = FK_CMP;
    123     RECOMP_BACKEDGE();
    124     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
    125 L_3100B830:
    126     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
    127     PUSH32(esp, edx); /* 0x3100B833: push edx */
    128     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
    129     RECOMP_FLAGS_IN();
    130     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
    131     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    132     edi = 0; /* 0x3100B83C: xor edi, edi */
    133     _cf = 0;
    134     _flag_k = FK_TEST;
    135     PUSH32(esp, eax); /* 0x3100B83E: push eax */
    136     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
    137     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
    138     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
    139     RECOMP_FLAGS_IN();
    140     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
    141     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    142     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
    143     _flag_k = FK_ADD;
    144     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
    145     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
    146     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
    147     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
    148     esp = ebp; /* 0x3100B853: mov esp, ebp */
    149     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
    150     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
    151 L_31047509:
    152     ecx = ebp + (-0x90); /* 0x31047509: lea ecx, [ebp - 0x90] */
    153     RECOMP_BACKEDGE();
    154     goto L_3100B790; /* 0x3104750F: jmp 0x3100b790 */
    155     { RECOMP_REGS_OUT(); return; } /* end of function */
    156     RECOMP_REGS_OUT();
    157 }
    158 
    159 void sub_31047514(void) {
    160     int _fpu_cmp = 0;
    161     uint32_t _cf = 0;
    162     int _df = 1;
    163     uint32_t _flag_k = FK_NONE;
    164     uint32_t _flag_a = 0, _flag_b = 0;
    165     uint32_t _itail_tgt = 0;
    166     RECOMP_REGS_LOCALS
    167     RECOMP_ENTER(0x31047514u);
    168 
    169     goto L_31047514;
    170 L_31004880:
    171     PUSH32(esp, ebp); /* 0x31004880: push ebp */
    172     ebp = esp; /* 0x31004881: mov ebp, esp */
    173     PUSH32(esp, ecx); /* 0x31004883: push ecx */
    174     PUSH32(esp, esi); /* 0x31004884: push esi */
    175     esi = ecx; /* 0x31004885: mov esi, ecx */
    176     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
    177     PUSH32(esp, eax); /* 0x3100488A: push eax */
    178     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
    179     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
    180     RECOMP_FLAGS_IN();
    181     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    182     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    183     esp = esp + 4; /* 0x31004893: add esp, 4 */
    184     _flag_k = FK_ADD;
    185     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    186     eax = 0; /* 0x31004896: xor eax, eax */
    187     _cf = 0;
    188     _flag_k = FK_TEST;
    189     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
    190     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
    191     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
    192     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
    193     esp = ebp; /* 0x310048A2: mov esp, ebp */
    194     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
    195     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
    196 L_31047514:
    197     ecx = ebp + (-0x64); /* 0x31047514: lea ecx, [ebp - 0x64] */
    198     RECOMP_BACKEDGE();
    199     goto L_31004880; /* 0x31047517: jmp 0x31004880 */
    200     { RECOMP_REGS_OUT(); return; } /* end of function */
    201     RECOMP_REGS_OUT();
    202 }
    203 
    204 void sub_3104751C(void) {
    205     int _fpu_cmp = 0;
    206     uint32_t _cf = 0;
    207     int _df = 1;
    208     uint32_t _flag_k = FK_NONE;
    209     uint32_t _flag_a = 0, _flag_b = 0;
    210     uint32_t _itail_tgt = 0;
    211     RECOMP_REGS_LOCALS
    212     RECOMP_ENTER(0x3104751Cu);
    213 
    214     goto L_3104751C;
    215 L_31046870:
    216     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
    217 L_3104751C:
    218     eax = 0x31049860u; /* 0x3104751C: mov eax, 0x31049860 */
    219 L_31047521:
    220     RECOMP_BACKEDGE();
    221     goto L_31046870; /* 0x31047521: jmp 0x31046870 */
    222     { RECOMP_REGS_OUT(); return; } /* end of function */
    223   _ljump:
    224     switch (_itail_tgt) {
    225       case 0x31046870u: goto L_31046870;
    226       case 0x3104751Cu: goto L_3104751C;
    227       case 0x31047521u: goto L_31047521;
    228       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
    229     }
    230     RECOMP_REGS_OUT();
    231 }
    232 
    233 void sub_31047530(void) {
    234     int _fpu_cmp = 0;
    235     uint32_t _cf = 0;
    236     int _df = 1;
    237     uint32_t _flag_k = FK_NONE;
    238     uint32_t _flag_a = 0, _flag_b = 0;
    239     uint32_t _itail_tgt = 0;
    240     RECOMP_REGS_LOCALS
    241     RECOMP_ENTER(0x31047530u);
    242 
    243     goto L_31047530;
    244 L_3100B790:
    245     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
    246     ebp = esp; /* 0x3100B791: mov ebp, esp */
    247     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
    248     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    249     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
    250     _flag_k = FK_CMP;
    251     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
    252     PUSH32(esp, esi); /* 0x3100B797: push esi */
    253     esi = ecx; /* 0x3100B798: mov esi, ecx */
    254     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
    255     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
    256     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
    257     _cf = 0;
    258     _flag_k = FK_TEST;
    259     PUSH32(esp, edi); /* 0x3100B79F: push edi */
    260     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
    261     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
    262     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
    263     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
    264 L_3100B7AA:
    265     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
    266     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
    267     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
    268     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    269     _flag_k = FK_CMP;
    270     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
    271 L_3100B7B0:
    272     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
    273     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
    274     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    275     _flag_k = FK_CMP;
    276     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
    277 L_3100B7B4:
    278     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
    279     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
    280     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
    281     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    282     _flag_k = FK_CMP;
    283     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
    284     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
    285 L_3100B7BE:
    286     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
    287     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
    288     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
    289     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
    290     RECOMP_FLAGS_IN();
    291     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
    292     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
    293     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
    294     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
    295     RECOMP_FLAGS_IN();
    296     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
    297     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
    298     RECOMP_FLAGS_IN();
    299     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
    300     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    301     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    302     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
    303     _flag_k = FK_ADD;
    304     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
    305     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
    306     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    307     _flag_k = FK_CMP;
    308     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
    309     RECOMP_BACKEDGE();
    310     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
    311 L_3100B7E7:
    312     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
    313     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
    314     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
    315     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
    316     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
    317     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
    318     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
    319     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
    320     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
    321     PUSH32(esp, eax); /* 0x3100B805: push eax */
    322     ecx = esi; /* 0x3100B806: mov ecx, esi */
    323     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
    324     RECOMP_FLAGS_IN();
    325     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
    326 L_3100B80F:
    327     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
    328     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
    329     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    330     _flag_k = FK_CMP;
    331     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
    332 L_3100B813:
    333     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
    334     ebx = eax; /* 0x3100B816: mov ebx, eax */
    335     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
    336     RECOMP_FLAGS_IN();
    337     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
    338     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
    339     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
    340     ecx = esi; /* 0x3100B822: mov ecx, esi */
    341     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
    342     RECOMP_FLAGS_IN();
    343     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
    344     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
    345     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
    346     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    347     _flag_k = FK_CMP;
    348     RECOMP_BACKEDGE();
    349     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
    350 L_3100B830:
    351     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
    352     PUSH32(esp, edx); /* 0x3100B833: push edx */
    353     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
    354     RECOMP_FLAGS_IN();
    355     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
    356     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    357     edi = 0; /* 0x3100B83C: xor edi, edi */
    358     _cf = 0;
    359     _flag_k = FK_TEST;
    360     PUSH32(esp, eax); /* 0x3100B83E: push eax */
    361     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
    362     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
    363     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
    364     RECOMP_FLAGS_IN();
    365     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
    366     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    367     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
    368     _flag_k = FK_ADD;
    369     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
    370     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
    371     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
    372     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
    373     esp = ebp; /* 0x3100B853: mov esp, ebp */
    374     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
    375     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
    376 L_31047530:
    377     ecx = MEM32(ebp + (-0x10)); /* 0x31047530: mov ecx, dword ptr [ebp - 0x10] */
    378     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(4);
    379     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    380     ecx = ecx + 4; /* 0x31047533: add ecx, 4 */
    381     _flag_k = FK_ADD;
    382     RECOMP_BACKEDGE();
    383     goto L_3100B790; /* 0x31047536: jmp 0x3100b790 */
    384     { RECOMP_REGS_OUT(); return; } /* end of function */
    385     RECOMP_REGS_OUT();
    386 }
    387 
    388 void sub_3104753B(void) {
    389     int _fpu_cmp = 0;
    390     uint32_t _cf = 0;
    391     int _df = 1;
    392     uint32_t _flag_k = FK_NONE;
    393     uint32_t _flag_a = 0, _flag_b = 0;
    394     uint32_t _itail_tgt = 0;
    395     RECOMP_REGS_LOCALS
    396     RECOMP_ENTER(0x3104753Bu);
    397 
    398     goto L_3104753B;
    399 L_31004880:
    400     PUSH32(esp, ebp); /* 0x31004880: push ebp */
    401     ebp = esp; /* 0x31004881: mov ebp, esp */
    402     PUSH32(esp, ecx); /* 0x31004883: push ecx */
    403     PUSH32(esp, esi); /* 0x31004884: push esi */
    404     esi = ecx; /* 0x31004885: mov esi, ecx */
    405     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
    406     PUSH32(esp, eax); /* 0x3100488A: push eax */
    407     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
    408     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
    409     RECOMP_FLAGS_IN();
    410     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    411     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    412     esp = esp + 4; /* 0x31004893: add esp, 4 */
    413     _flag_k = FK_ADD;
    414     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    415     eax = 0; /* 0x31004896: xor eax, eax */
    416     _cf = 0;
    417     _flag_k = FK_TEST;
    418     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
    419     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
    420     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
    421     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
    422     esp = ebp; /* 0x310048A2: mov esp, ebp */
    423     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
    424     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
    425 L_3104753B:
    426     ecx = MEM32(ebp + (-0x10)); /* 0x3104753B: mov ecx, dword ptr [ebp - 0x10] */
    427     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(0x30u);
    428     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    429     ecx = ecx + 0x30u; /* 0x3104753E: add ecx, 0x30 */
    430     _flag_k = FK_ADD;
    431     RECOMP_BACKEDGE();
    432     goto L_31004880; /* 0x31047541: jmp 0x31004880 */
    433     { RECOMP_REGS_OUT(); return; } /* end of function */
    434     RECOMP_REGS_OUT();
    435 }
    436 
    437 void sub_31047546(void) {
    438     int _fpu_cmp = 0;
    439     uint32_t _cf = 0;
    440     int _df = 1;
    441     uint32_t _flag_k = FK_NONE;
    442     uint32_t _flag_a = 0, _flag_b = 0;
    443     uint32_t _itail_tgt = 0;
    444     RECOMP_REGS_LOCALS
    445     RECOMP_ENTER(0x31047546u);
    446 
    447     goto L_31047546;
    448 L_31046870:
    449     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
    450 L_31047546:
    451     eax = 0x310498D8u; /* 0x31047546: mov eax, 0x310498d8 */
    452 L_3104754B:
    453     RECOMP_BACKEDGE();
    454     goto L_31046870; /* 0x3104754B: jmp 0x31046870 */
    455     { RECOMP_REGS_OUT(); return; } /* end of function */
    456   _ljump:
    457     switch (_itail_tgt) {
    458       case 0x31046870u: goto L_31046870;
    459       case 0x31047546u: goto L_31047546;
    460       case 0x3104754Bu: goto L_3104754B;
    461       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
    462     }
    463     RECOMP_REGS_OUT();
    464 }
    465 
    466 void sub_31047550(void) {
    467     int _fpu_cmp = 0;
    468     uint32_t _cf = 0;
    469     int _df = 1;
    470     uint32_t _flag_k = FK_NONE;
    471     uint32_t _flag_a = 0, _flag_b = 0;
    472     uint32_t _itail_tgt = 0;
    473     RECOMP_REGS_LOCALS
    474     RECOMP_ENTER(0x31047550u);
    475 
    476     goto L_31047550;
    477 L_3100B670:
    478     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
    479     ebp = esp; /* 0x3100B671: mov ebp, esp */
    480     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
    481     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
    482     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
    483     PUSH32(esp, eax); /* 0x3100B680: push eax */
    484     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
    485     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
    486     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    487     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
    488     _flag_k = FK_CMP;
    489     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
    490     PUSH32(esp, esi); /* 0x3100B68C: push esi */
    491     esi = ecx; /* 0x3100B68D: mov esi, ecx */
    492     PUSH32(esp, edi); /* 0x3100B68F: push edi */
    493     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
    494     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
    495     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
    496     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
    497     RECOMP_FLAGS_IN();
    498     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
    499     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
    500     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
    501     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
    502     RECOMP_FLAGS_IN();
    503     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    504     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
    505     _cf = 0;
    506     _flag_k = FK_TEST;
    507     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
    508     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
    509     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
    510     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
    511     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
    512     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
    513     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
    514     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    515     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
    516     _flag_k = FK_ADD;
    517     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    518     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    519     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
    520     _flag_k = FK_ADD;
    521     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
    522     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
    523     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    524     _flag_k = FK_CMP;
    525     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
    526     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
    527     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
    528 L_3100B6D9:
    529     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
    530     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
    531     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
    532     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    533     _flag_k = FK_CMP;
    534     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
    535 L_3100B6DF:
    536     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
    537     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
    538     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    539     _flag_k = FK_CMP;
    540     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
    541 L_3100B6E3:
    542     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
    543     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
    544     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
    545     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
    546     RECOMP_FLAGS_IN();
    547     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
    548     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
    549     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
    550     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
    551     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
    552     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
    553     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
    554     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
    555     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
    556 L_3100B707:
    557     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
    558     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
    559     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    560     _flag_k = FK_CMP;
    561     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
    562 L_3100B70B:
    563     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
    564     ebx = eax; /* 0x3100B70E: mov ebx, eax */
    565     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
    566     RECOMP_FLAGS_IN();
    567     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
    568     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
    569     PUSH32(esp, eax); /* 0x3100B719: push eax */
    570     ecx = esi; /* 0x3100B71A: mov ecx, esi */
    571     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
    572     RECOMP_FLAGS_IN();
    573     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
    574     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
    575     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
    576     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    577     _flag_k = FK_CMP;
    578     RECOMP_BACKEDGE();
    579     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
    580 L_3100B728:
    581     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    582     ebx = 0; /* 0x3100B728: xor ebx, ebx */
    583     _cf = 0;
    584     _flag_k = FK_TEST;
    585 L_3100B72A:
    586     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
    587     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
    588     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
    589     RECOMP_FLAGS_IN();
    590     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
    591     PUSH32(esp, edx); /* 0x3100B736: push edx */
    592     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
    593     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
    594     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
    595     RECOMP_FLAGS_IN();
    596     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
    597     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
    598     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    599     esp = esp + 8; /* 0x3100B745: add esp, 8 */
    600     _flag_k = FK_ADD;
    601     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
    602     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
    603     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
    604     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
    605     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
    606     esp = ebp; /* 0x3100B755: mov esp, ebp */
    607     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
    608     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
    609 L_31047550:
    610     ecx = ebp + (-0x60); /* 0x31047550: lea ecx, [ebp - 0x60] */
    611     RECOMP_BACKEDGE();
    612     goto L_3100B670; /* 0x31047553: jmp 0x3100b670 */
    613     { RECOMP_REGS_OUT(); return; } /* end of function */
    614     RECOMP_REGS_OUT();
    615 }
    616 
    617 void sub_31047558(void) {
    618     int _fpu_cmp = 0;
    619     uint32_t _cf = 0;
    620     int _df = 1;
    621     uint32_t _flag_k = FK_NONE;
    622     uint32_t _flag_a = 0, _flag_b = 0;
    623     uint32_t _itail_tgt = 0;
    624     RECOMP_REGS_LOCALS
    625     RECOMP_ENTER(0x31047558u);
    626 
    627     goto L_31047558;
    628 L_31004760:
    629     PUSH32(esp, esi); /* 0x31004760: push esi */
    630     esi = ecx; /* 0x31004761: mov esi, ecx */
    631     eax = MEM32(esi); /* 0x31004763: mov eax, dword ptr [esi] */
    632     PUSH32(esp, eax); /* 0x31004765: push eax */
    633     RECOMP_ICALL(0x31004740u); /* 0x31004766: call 0x31004740 */ /* not lifted */
    634     RECOMP_FLAGS_IN();
    635     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x3FFFFFFFu);
    636     eax = eax & 0x3FFFFFFFu; /* 0x3100476B: and eax, 0x3fffffff */
    637     _cf = 0;
    638     _flag_k = FK_TEST;
    639     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    640     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    641     esp = esp + 4; /* 0x31004770: add esp, 4 */
    642     _flag_k = FK_ADD;
    643     /* cmp eax, 1 */ /* 0x31004773: cmp eax, 1 */
    644     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
    645     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    646     _flag_k = FK_CMP;
    647     if (CMP_NE(_flag_a, _flag_b)) goto L_31004799; /* 0x31004776: jne 0x31004799 */
    648 L_31004778:
    649     eax = MEM32(esi); /* 0x31004778: mov eax, dword ptr [esi] */
    650     /* cmp MEM32(eax), 0x80000000u */ /* 0x3100477A: cmp dword ptr [eax], 0x80000000 */
    651     _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u);
    652     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    653     _flag_k = FK_CMP;
    654     if (CMP_NE(_flag_a, _flag_b)) goto L_3100478E; /* 0x31004780: jne 0x3100478e */
    655 L_31004782:
    656     ecx = MEM32(eax + 0x8); /* 0x31004782: mov ecx, dword ptr [eax + 8] */
    657     PUSH32(esp, ecx); /* 0x31004785: push ecx */
    658     RECOMP_ICALL(0x31046858u); /* 0x31004786: call 0x31046858 */ /* not lifted */
    659     RECOMP_FLAGS_IN();
    660     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    661     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    662     esp = esp + 4; /* 0x3100478B: add esp, 4 */
    663     _flag_k = FK_ADD;
    664 L_3100478E:
    665     edx = MEM32(esi); /* 0x3100478E: mov edx, dword ptr [esi] */
    666     PUSH32(esp, edx); /* 0x31004790: push edx */
    667     RECOMP_ICALL(0x31046858u); /* 0x31004791: call 0x31046858 */ /* not lifted */
    668     RECOMP_FLAGS_IN();
    669     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    670     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    671     esp = esp + 4; /* 0x31004796: add esp, 4 */
    672     _flag_k = FK_ADD;
    673 L_31004799:
    674     esi = POP32_VAL(esp); /* 0x31004799: pop esi */
    675     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100479A: ret  */
    676 L_31047558:
    677     ecx = ebp + (-0x10); /* 0x31047558: lea ecx, [ebp - 0x10] */
    678     RECOMP_BACKEDGE();
    679     goto L_31004760; /* 0x3104755B: jmp 0x31004760 */
    680     { RECOMP_REGS_OUT(); return; } /* end of function */
    681     RECOMP_REGS_OUT();
    682 }
    683 
    684 void sub_31047560(void) {
    685     int _fpu_cmp = 0;
    686     uint32_t _cf = 0;
    687     int _df = 1;
    688     uint32_t _flag_k = FK_NONE;
    689     uint32_t _flag_a = 0, _flag_b = 0;
    690     uint32_t _itail_tgt = 0;
    691     RECOMP_REGS_LOCALS
    692     RECOMP_ENTER(0x31047560u);
    693 
    694     goto L_31047560;
    695 L_31004760:
    696     PUSH32(esp, esi); /* 0x31004760: push esi */
    697     esi = ecx; /* 0x31004761: mov esi, ecx */
    698     eax = MEM32(esi); /* 0x31004763: mov eax, dword ptr [esi] */
    699     PUSH32(esp, eax); /* 0x31004765: push eax */
    700     RECOMP_ICALL(0x31004740u); /* 0x31004766: call 0x31004740 */ /* not lifted */
    701     RECOMP_FLAGS_IN();
    702     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x3FFFFFFFu);
    703     eax = eax & 0x3FFFFFFFu; /* 0x3100476B: and eax, 0x3fffffff */
    704     _cf = 0;
    705     _flag_k = FK_TEST;
    706     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    707     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    708     esp = esp + 4; /* 0x31004770: add esp, 4 */
    709     _flag_k = FK_ADD;
    710     /* cmp eax, 1 */ /* 0x31004773: cmp eax, 1 */
    711     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
    712     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    713     _flag_k = FK_CMP;
    714     if (CMP_NE(_flag_a, _flag_b)) goto L_31004799; /* 0x31004776: jne 0x31004799 */
    715 L_31004778:
    716     eax = MEM32(esi); /* 0x31004778: mov eax, dword ptr [esi] */
    717     /* cmp MEM32(eax), 0x80000000u */ /* 0x3100477A: cmp dword ptr [eax], 0x80000000 */
    718     _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u);
    719     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    720     _flag_k = FK_CMP;
    721     if (CMP_NE(_flag_a, _flag_b)) goto L_3100478E; /* 0x31004780: jne 0x3100478e */
    722 L_31004782:
    723     ecx = MEM32(eax + 0x8); /* 0x31004782: mov ecx, dword ptr [eax + 8] */
    724     PUSH32(esp, ecx); /* 0x31004785: push ecx */
    725     RECOMP_ICALL(0x31046858u); /* 0x31004786: call 0x31046858 */ /* not lifted */
    726     RECOMP_FLAGS_IN();
    727     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    728     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    729     esp = esp + 4; /* 0x3100478B: add esp, 4 */
    730     _flag_k = FK_ADD;
    731 L_3100478E:
    732     edx = MEM32(esi); /* 0x3100478E: mov edx, dword ptr [esi] */
    733     PUSH32(esp, edx); /* 0x31004790: push edx */
    734     RECOMP_ICALL(0x31046858u); /* 0x31004791: call 0x31046858 */ /* not lifted */
    735     RECOMP_FLAGS_IN();
    736     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    737     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    738     esp = esp + 4; /* 0x31004796: add esp, 4 */
    739     _flag_k = FK_ADD;
    740 L_31004799:
    741     esi = POP32_VAL(esp); /* 0x31004799: pop esi */
    742     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100479A: ret  */
    743 L_31047560:
    744     ecx = ebp + (-0x1C); /* 0x31047560: lea ecx, [ebp - 0x1c] */
    745     RECOMP_BACKEDGE();
    746     goto L_31004760; /* 0x31047563: jmp 0x31004760 */
    747     { RECOMP_REGS_OUT(); return; } /* end of function */
    748     RECOMP_REGS_OUT();
    749 }
    750 
    751 void sub_31047568(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(0x31047568u);
    760 
    761     goto L_31047568;
    762 L_31004760:
    763     PUSH32(esp, esi); /* 0x31004760: push esi */
    764     esi = ecx; /* 0x31004761: mov esi, ecx */
    765     eax = MEM32(esi); /* 0x31004763: mov eax, dword ptr [esi] */
    766     PUSH32(esp, eax); /* 0x31004765: push eax */
    767     RECOMP_ICALL(0x31004740u); /* 0x31004766: call 0x31004740 */ /* not lifted */
    768     RECOMP_FLAGS_IN();
    769     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x3FFFFFFFu);
    770     eax = eax & 0x3FFFFFFFu; /* 0x3100476B: and eax, 0x3fffffff */
    771     _cf = 0;
    772     _flag_k = FK_TEST;
    773     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    774     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    775     esp = esp + 4; /* 0x31004770: add esp, 4 */
    776     _flag_k = FK_ADD;
    777     /* cmp eax, 1 */ /* 0x31004773: cmp eax, 1 */
    778     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
    779     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    780     _flag_k = FK_CMP;
    781     if (CMP_NE(_flag_a, _flag_b)) goto L_31004799; /* 0x31004776: jne 0x31004799 */
    782 L_31004778:
    783     eax = MEM32(esi); /* 0x31004778: mov eax, dword ptr [esi] */
    784     /* cmp MEM32(eax), 0x80000000u */ /* 0x3100477A: cmp dword ptr [eax], 0x80000000 */
    785     _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u);
    786     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    787     _flag_k = FK_CMP;
    788     if (CMP_NE(_flag_a, _flag_b)) goto L_3100478E; /* 0x31004780: jne 0x3100478e */
    789 L_31004782:
    790     ecx = MEM32(eax + 0x8); /* 0x31004782: mov ecx, dword ptr [eax + 8] */
    791     PUSH32(esp, ecx); /* 0x31004785: push ecx */
    792     RECOMP_ICALL(0x31046858u); /* 0x31004786: call 0x31046858 */ /* not lifted */
    793     RECOMP_FLAGS_IN();
    794     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    795     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    796     esp = esp + 4; /* 0x3100478B: add esp, 4 */
    797     _flag_k = FK_ADD;
    798 L_3100478E:
    799     edx = MEM32(esi); /* 0x3100478E: mov edx, dword ptr [esi] */
    800     PUSH32(esp, edx); /* 0x31004790: push edx */
    801     RECOMP_ICALL(0x31046858u); /* 0x31004791: call 0x31046858 */ /* not lifted */
    802     RECOMP_FLAGS_IN();
    803     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    804     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    805     esp = esp + 4; /* 0x31004796: add esp, 4 */
    806     _flag_k = FK_ADD;
    807 L_31004799:
    808     esi = POP32_VAL(esp); /* 0x31004799: pop esi */
    809     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100479A: ret  */
    810 L_31047568:
    811     eax = MEM32(ebp + (-0x20)); /* 0x31047568: mov eax, dword ptr [ebp - 0x20] */
    812     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
    813     eax = eax & 1; /* 0x3104756B: and eax, 1 */
    814     _cf = 0;
    815     _flag_k = FK_TEST;
    816     /* test eax, eax */ /* 0x3104756E: test eax, eax */
    817     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
    818     _cf = 0;
    819     _flag_k = FK_TEST;
    820     if (TEST_Z(_flag_a, _flag_b)) goto L_3104757E; /* 0x31047570: je 0x3104757e */
    821 L_31047576:
    822     ecx = MEM32(ebp + 0x8); /* 0x31047576: mov ecx, dword ptr [ebp + 8] */
    823     RECOMP_BACKEDGE();
    824     goto L_31004760; /* 0x31047579: jmp 0x31004760 */
    825 L_3104757E:
    826     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3104757E: ret  */
    827     RECOMP_REGS_OUT();
    828 }
    829 
    830 void sub_3104757F(void) {
    831     int _fpu_cmp = 0;
    832     uint32_t _cf = 0;
    833     int _df = 1;
    834     uint32_t _flag_k = FK_NONE;
    835     uint32_t _flag_a = 0, _flag_b = 0;
    836     uint32_t _itail_tgt = 0;
    837     RECOMP_REGS_LOCALS
    838     RECOMP_ENTER(0x3104757Fu);
    839 
    840     goto L_3104757F;
    841 L_3100B790:
    842     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
    843     ebp = esp; /* 0x3100B791: mov ebp, esp */
    844     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
    845     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    846     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
    847     _flag_k = FK_CMP;
    848     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
    849     PUSH32(esp, esi); /* 0x3100B797: push esi */
    850     esi = ecx; /* 0x3100B798: mov esi, ecx */
    851     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
    852     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
    853     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
    854     _cf = 0;
    855     _flag_k = FK_TEST;
    856     PUSH32(esp, edi); /* 0x3100B79F: push edi */
    857     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
    858     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
    859     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
    860     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
    861 L_3100B7AA:
    862     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
    863     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
    864     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
    865     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    866     _flag_k = FK_CMP;
    867     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
    868 L_3100B7B0:
    869     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
    870     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
    871     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    872     _flag_k = FK_CMP;
    873     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
    874 L_3100B7B4:
    875     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
    876     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
    877     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
    878     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    879     _flag_k = FK_CMP;
    880     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
    881     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
    882 L_3100B7BE:
    883     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
    884     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
    885     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
    886     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
    887     RECOMP_FLAGS_IN();
    888     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
    889     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
    890     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
    891     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
    892     RECOMP_FLAGS_IN();
    893     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
    894     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
    895     RECOMP_FLAGS_IN();
    896     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
    897     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
    898     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    899     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
    900     _flag_k = FK_ADD;
    901     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
    902     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
    903     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    904     _flag_k = FK_CMP;
    905     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
    906     RECOMP_BACKEDGE();
    907     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
    908 L_3100B7E7:
    909     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
    910     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
    911     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
    912     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
    913     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
    914     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
    915     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
    916     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
    917     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
    918     PUSH32(esp, eax); /* 0x3100B805: push eax */
    919     ecx = esi; /* 0x3100B806: mov ecx, esi */
    920     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
    921     RECOMP_FLAGS_IN();
    922     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
    923 L_3100B80F:
    924     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
    925     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
    926     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    927     _flag_k = FK_CMP;
    928     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
    929 L_3100B813:
    930     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
    931     ebx = eax; /* 0x3100B816: mov ebx, eax */
    932     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
    933     RECOMP_FLAGS_IN();
    934     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
    935     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
    936     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
    937     ecx = esi; /* 0x3100B822: mov ecx, esi */
    938     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
    939     RECOMP_FLAGS_IN();
    940     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
    941     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
    942     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
    943     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
    944     _flag_k = FK_CMP;
    945     RECOMP_BACKEDGE();
    946     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
    947 L_3100B830:
    948     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
    949     PUSH32(esp, edx); /* 0x3100B833: push edx */
    950     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
    951     RECOMP_FLAGS_IN();
    952     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
    953     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
    954     edi = 0; /* 0x3100B83C: xor edi, edi */
    955     _cf = 0;
    956     _flag_k = FK_TEST;
    957     PUSH32(esp, eax); /* 0x3100B83E: push eax */
    958     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
    959     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
    960     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
    961     RECOMP_FLAGS_IN();
    962     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
    963     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
    964     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
    965     _flag_k = FK_ADD;
    966     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
    967     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
    968     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
    969     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
    970     esp = ebp; /* 0x3100B853: mov esp, ebp */
    971     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
    972     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
    973 L_3104757F:
    974     ecx = ebp + (-0x5C); /* 0x3104757F: lea ecx, [ebp - 0x5c] */
    975     RECOMP_BACKEDGE();
    976     goto L_3100B790; /* 0x31047582: jmp 0x3100b790 */
    977     { RECOMP_REGS_OUT(); return; } /* end of function */
    978     RECOMP_REGS_OUT();
    979 }
    980 
    981 void sub_31047587(void) {
    982     int _fpu_cmp = 0;
    983     uint32_t _cf = 0;
    984     int _df = 1;
    985     uint32_t _flag_k = FK_NONE;
    986     uint32_t _flag_a = 0, _flag_b = 0;
    987     uint32_t _itail_tgt = 0;
    988     RECOMP_REGS_LOCALS
    989     RECOMP_ENTER(0x31047587u);
    990 
    991     goto L_31047587;
    992 L_31004880:
    993     PUSH32(esp, ebp); /* 0x31004880: push ebp */
    994     ebp = esp; /* 0x31004881: mov ebp, esp */
    995     PUSH32(esp, ecx); /* 0x31004883: push ecx */
    996     PUSH32(esp, esi); /* 0x31004884: push esi */
    997     esi = ecx; /* 0x31004885: mov esi, ecx */
    998     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
    999     PUSH32(esp, eax); /* 0x3100488A: push eax */
   1000     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   1001     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   1002     RECOMP_FLAGS_IN();
   1003     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1004     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1005     esp = esp + 4; /* 0x31004893: add esp, 4 */
   1006     _flag_k = FK_ADD;
   1007     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1008     eax = 0; /* 0x31004896: xor eax, eax */
   1009     _cf = 0;
   1010     _flag_k = FK_TEST;
   1011     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   1012     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   1013     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   1014     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   1015     esp = ebp; /* 0x310048A2: mov esp, ebp */
   1016     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   1017     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   1018 L_31047587:
   1019     ecx = ebp + (-0x30); /* 0x31047587: lea ecx, [ebp - 0x30] */
   1020     RECOMP_BACKEDGE();
   1021     goto L_31004880; /* 0x3104758A: jmp 0x31004880 */
   1022     { RECOMP_REGS_OUT(); return; } /* end of function */
   1023     RECOMP_REGS_OUT();
   1024 }
   1025 
   1026 void sub_3104758F(void) {
   1027     int _fpu_cmp = 0;
   1028     uint32_t _cf = 0;
   1029     int _df = 1;
   1030     uint32_t _flag_k = FK_NONE;
   1031     uint32_t _flag_a = 0, _flag_b = 0;
   1032     uint32_t _itail_tgt = 0;
   1033     RECOMP_REGS_LOCALS
   1034     RECOMP_ENTER(0x3104758Fu);
   1035 
   1036     goto L_3104758F;
   1037 L_31046870:
   1038     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   1039 L_3104758F:
   1040     eax = 0x31049908u; /* 0x3104758F: mov eax, 0x31049908 */
   1041 L_31047594:
   1042     RECOMP_BACKEDGE();
   1043     goto L_31046870; /* 0x31047594: jmp 0x31046870 */
   1044     { RECOMP_REGS_OUT(); return; } /* end of function */
   1045   _ljump:
   1046     switch (_itail_tgt) {
   1047       case 0x31046870u: goto L_31046870;
   1048       case 0x3104758Fu: goto L_3104758F;
   1049       case 0x31047594u: goto L_31047594;
   1050       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   1051     }
   1052     RECOMP_REGS_OUT();
   1053 }
   1054 
   1055 void sub_310475A0(void) {
   1056     int _fpu_cmp = 0;
   1057     uint32_t _cf = 0;
   1058     int _df = 1;
   1059     uint32_t _flag_k = FK_NONE;
   1060     uint32_t _flag_a = 0, _flag_b = 0;
   1061     uint32_t _itail_tgt = 0;
   1062     RECOMP_REGS_LOCALS
   1063     RECOMP_ENTER(0x310475A0u);
   1064 
   1065     goto L_310475A0;
   1066 L_3100B670:
   1067     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   1068     ebp = esp; /* 0x3100B671: mov ebp, esp */
   1069     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   1070     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   1071     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   1072     PUSH32(esp, eax); /* 0x3100B680: push eax */
   1073     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   1074     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1075     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1076     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   1077     _flag_k = FK_CMP;
   1078     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   1079     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   1080     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   1081     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   1082     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   1083     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   1084     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   1085     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   1086     RECOMP_FLAGS_IN();
   1087     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   1088     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   1089     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   1090     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   1091     RECOMP_FLAGS_IN();
   1092     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1093     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   1094     _cf = 0;
   1095     _flag_k = FK_TEST;
   1096     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   1097     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   1098     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   1099     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   1100     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   1101     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   1102     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   1103     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1104     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   1105     _flag_k = FK_ADD;
   1106     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1107     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1108     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   1109     _flag_k = FK_ADD;
   1110     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   1111     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   1112     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1113     _flag_k = FK_CMP;
   1114     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   1115     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   1116     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   1117 L_3100B6D9:
   1118     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   1119     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   1120     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   1121     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1122     _flag_k = FK_CMP;
   1123     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   1124 L_3100B6DF:
   1125     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   1126     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   1127     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1128     _flag_k = FK_CMP;
   1129     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   1130 L_3100B6E3:
   1131     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   1132     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   1133     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   1134     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   1135     RECOMP_FLAGS_IN();
   1136     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   1137     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   1138     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   1139     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   1140     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   1141     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   1142     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   1143     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   1144     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   1145 L_3100B707:
   1146     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   1147     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1148     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1149     _flag_k = FK_CMP;
   1150     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   1151 L_3100B70B:
   1152     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   1153     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   1154     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   1155     RECOMP_FLAGS_IN();
   1156     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   1157     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   1158     PUSH32(esp, eax); /* 0x3100B719: push eax */
   1159     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   1160     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   1161     RECOMP_FLAGS_IN();
   1162     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   1163     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   1164     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1165     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1166     _flag_k = FK_CMP;
   1167     RECOMP_BACKEDGE();
   1168     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   1169 L_3100B728:
   1170     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1171     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   1172     _cf = 0;
   1173     _flag_k = FK_TEST;
   1174 L_3100B72A:
   1175     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   1176     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   1177     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   1178     RECOMP_FLAGS_IN();
   1179     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   1180     PUSH32(esp, edx); /* 0x3100B736: push edx */
   1181     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   1182     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   1183     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   1184     RECOMP_FLAGS_IN();
   1185     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   1186     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1187     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1188     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   1189     _flag_k = FK_ADD;
   1190     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   1191     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   1192     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   1193     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   1194     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   1195     esp = ebp; /* 0x3100B755: mov esp, ebp */
   1196     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   1197     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   1198 L_310475A0:
   1199     ecx = ebp + (-0x6C); /* 0x310475A0: lea ecx, [ebp - 0x6c] */
   1200     RECOMP_BACKEDGE();
   1201     goto L_3100B670; /* 0x310475A3: jmp 0x3100b670 */
   1202     { RECOMP_REGS_OUT(); return; } /* end of function */
   1203     RECOMP_REGS_OUT();
   1204 }
   1205 
   1206 void sub_310475A8(void) {
   1207     int _fpu_cmp = 0;
   1208     uint32_t _cf = 0;
   1209     int _df = 1;
   1210     uint32_t _flag_k = FK_NONE;
   1211     uint32_t _flag_a = 0, _flag_b = 0;
   1212     uint32_t _itail_tgt = 0;
   1213     RECOMP_REGS_LOCALS
   1214     RECOMP_ENTER(0x310475A8u);
   1215 
   1216     goto L_310475A8;
   1217 L_31004760:
   1218     PUSH32(esp, esi); /* 0x31004760: push esi */
   1219     esi = ecx; /* 0x31004761: mov esi, ecx */
   1220     eax = MEM32(esi); /* 0x31004763: mov eax, dword ptr [esi] */
   1221     PUSH32(esp, eax); /* 0x31004765: push eax */
   1222     RECOMP_ICALL(0x31004740u); /* 0x31004766: call 0x31004740 */ /* not lifted */
   1223     RECOMP_FLAGS_IN();
   1224     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x3FFFFFFFu);
   1225     eax = eax & 0x3FFFFFFFu; /* 0x3100476B: and eax, 0x3fffffff */
   1226     _cf = 0;
   1227     _flag_k = FK_TEST;
   1228     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1229     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1230     esp = esp + 4; /* 0x31004770: add esp, 4 */
   1231     _flag_k = FK_ADD;
   1232     /* cmp eax, 1 */ /* 0x31004773: cmp eax, 1 */
   1233     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   1234     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1235     _flag_k = FK_CMP;
   1236     if (CMP_NE(_flag_a, _flag_b)) goto L_31004799; /* 0x31004776: jne 0x31004799 */
   1237 L_31004778:
   1238     eax = MEM32(esi); /* 0x31004778: mov eax, dword ptr [esi] */
   1239     /* cmp MEM32(eax), 0x80000000u */ /* 0x3100477A: cmp dword ptr [eax], 0x80000000 */
   1240     _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u);
   1241     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1242     _flag_k = FK_CMP;
   1243     if (CMP_NE(_flag_a, _flag_b)) goto L_3100478E; /* 0x31004780: jne 0x3100478e */
   1244 L_31004782:
   1245     ecx = MEM32(eax + 0x8); /* 0x31004782: mov ecx, dword ptr [eax + 8] */
   1246     PUSH32(esp, ecx); /* 0x31004785: push ecx */
   1247     RECOMP_ICALL(0x31046858u); /* 0x31004786: call 0x31046858 */ /* not lifted */
   1248     RECOMP_FLAGS_IN();
   1249     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1250     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1251     esp = esp + 4; /* 0x3100478B: add esp, 4 */
   1252     _flag_k = FK_ADD;
   1253 L_3100478E:
   1254     edx = MEM32(esi); /* 0x3100478E: mov edx, dword ptr [esi] */
   1255     PUSH32(esp, edx); /* 0x31004790: push edx */
   1256     RECOMP_ICALL(0x31046858u); /* 0x31004791: call 0x31046858 */ /* not lifted */
   1257     RECOMP_FLAGS_IN();
   1258     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1259     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1260     esp = esp + 4; /* 0x31004796: add esp, 4 */
   1261     _flag_k = FK_ADD;
   1262 L_31004799:
   1263     esi = POP32_VAL(esp); /* 0x31004799: pop esi */
   1264     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100479A: ret  */
   1265 L_310475A8:
   1266     ecx = ebp + 0x10; /* 0x310475A8: lea ecx, [ebp + 0x10] */
   1267     RECOMP_BACKEDGE();
   1268     goto L_31004760; /* 0x310475AB: jmp 0x31004760 */
   1269     { RECOMP_REGS_OUT(); return; } /* end of function */
   1270     RECOMP_REGS_OUT();
   1271 }
   1272 
   1273 void sub_310475B0(void) {
   1274     int _fpu_cmp = 0;
   1275     uint32_t _cf = 0;
   1276     int _df = 1;
   1277     uint32_t _flag_k = FK_NONE;
   1278     uint32_t _flag_a = 0, _flag_b = 0;
   1279     uint32_t _itail_tgt = 0;
   1280     RECOMP_REGS_LOCALS
   1281     RECOMP_ENTER(0x310475B0u);
   1282 
   1283     goto L_310475B0;
   1284 L_31004760:
   1285     PUSH32(esp, esi); /* 0x31004760: push esi */
   1286     esi = ecx; /* 0x31004761: mov esi, ecx */
   1287     eax = MEM32(esi); /* 0x31004763: mov eax, dword ptr [esi] */
   1288     PUSH32(esp, eax); /* 0x31004765: push eax */
   1289     RECOMP_ICALL(0x31004740u); /* 0x31004766: call 0x31004740 */ /* not lifted */
   1290     RECOMP_FLAGS_IN();
   1291     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x3FFFFFFFu);
   1292     eax = eax & 0x3FFFFFFFu; /* 0x3100476B: and eax, 0x3fffffff */
   1293     _cf = 0;
   1294     _flag_k = FK_TEST;
   1295     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1296     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1297     esp = esp + 4; /* 0x31004770: add esp, 4 */
   1298     _flag_k = FK_ADD;
   1299     /* cmp eax, 1 */ /* 0x31004773: cmp eax, 1 */
   1300     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   1301     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1302     _flag_k = FK_CMP;
   1303     if (CMP_NE(_flag_a, _flag_b)) goto L_31004799; /* 0x31004776: jne 0x31004799 */
   1304 L_31004778:
   1305     eax = MEM32(esi); /* 0x31004778: mov eax, dword ptr [esi] */
   1306     /* cmp MEM32(eax), 0x80000000u */ /* 0x3100477A: cmp dword ptr [eax], 0x80000000 */
   1307     _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u);
   1308     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1309     _flag_k = FK_CMP;
   1310     if (CMP_NE(_flag_a, _flag_b)) goto L_3100478E; /* 0x31004780: jne 0x3100478e */
   1311 L_31004782:
   1312     ecx = MEM32(eax + 0x8); /* 0x31004782: mov ecx, dword ptr [eax + 8] */
   1313     PUSH32(esp, ecx); /* 0x31004785: push ecx */
   1314     RECOMP_ICALL(0x31046858u); /* 0x31004786: call 0x31046858 */ /* not lifted */
   1315     RECOMP_FLAGS_IN();
   1316     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1317     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1318     esp = esp + 4; /* 0x3100478B: add esp, 4 */
   1319     _flag_k = FK_ADD;
   1320 L_3100478E:
   1321     edx = MEM32(esi); /* 0x3100478E: mov edx, dword ptr [esi] */
   1322     PUSH32(esp, edx); /* 0x31004790: push edx */
   1323     RECOMP_ICALL(0x31046858u); /* 0x31004791: call 0x31046858 */ /* not lifted */
   1324     RECOMP_FLAGS_IN();
   1325     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1326     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1327     esp = esp + 4; /* 0x31004796: add esp, 4 */
   1328     _flag_k = FK_ADD;
   1329 L_31004799:
   1330     esi = POP32_VAL(esp); /* 0x31004799: pop esi */
   1331     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100479A: ret  */
   1332 L_310475B0:
   1333     ecx = ebp + 0x10; /* 0x310475B0: lea ecx, [ebp + 0x10] */
   1334     RECOMP_BACKEDGE();
   1335     goto L_31004760; /* 0x310475B3: jmp 0x31004760 */
   1336     { RECOMP_REGS_OUT(); return; } /* end of function */
   1337     RECOMP_REGS_OUT();
   1338 }
   1339 
   1340 void sub_310475B8(void) {
   1341     int _fpu_cmp = 0;
   1342     uint32_t _cf = 0;
   1343     int _df = 1;
   1344     uint32_t _flag_k = FK_NONE;
   1345     uint32_t _flag_a = 0, _flag_b = 0;
   1346     uint32_t _itail_tgt = 0;
   1347     RECOMP_REGS_LOCALS
   1348     RECOMP_ENTER(0x310475B8u);
   1349 
   1350     goto L_310475B8;
   1351 L_3100B790:
   1352     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   1353     ebp = esp; /* 0x3100B791: mov ebp, esp */
   1354     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1355     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1356     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   1357     _flag_k = FK_CMP;
   1358     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   1359     PUSH32(esp, esi); /* 0x3100B797: push esi */
   1360     esi = ecx; /* 0x3100B798: mov esi, ecx */
   1361     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   1362     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   1363     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   1364     _cf = 0;
   1365     _flag_k = FK_TEST;
   1366     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   1367     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   1368     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   1369     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   1370     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   1371 L_3100B7AA:
   1372     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   1373     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   1374     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   1375     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1376     _flag_k = FK_CMP;
   1377     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   1378 L_3100B7B0:
   1379     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   1380     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   1381     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1382     _flag_k = FK_CMP;
   1383     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   1384 L_3100B7B4:
   1385     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   1386     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   1387     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   1388     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1389     _flag_k = FK_CMP;
   1390     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   1391     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   1392 L_3100B7BE:
   1393     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   1394     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   1395     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   1396     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   1397     RECOMP_FLAGS_IN();
   1398     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   1399     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   1400     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   1401     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   1402     RECOMP_FLAGS_IN();
   1403     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   1404     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   1405     RECOMP_FLAGS_IN();
   1406     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   1407     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1408     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1409     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   1410     _flag_k = FK_ADD;
   1411     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   1412     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   1413     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1414     _flag_k = FK_CMP;
   1415     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   1416     RECOMP_BACKEDGE();
   1417     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   1418 L_3100B7E7:
   1419     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   1420     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   1421     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   1422     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   1423     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   1424     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   1425     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   1426     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   1427     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   1428     PUSH32(esp, eax); /* 0x3100B805: push eax */
   1429     ecx = esi; /* 0x3100B806: mov ecx, esi */
   1430     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   1431     RECOMP_FLAGS_IN();
   1432     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   1433 L_3100B80F:
   1434     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   1435     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1436     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1437     _flag_k = FK_CMP;
   1438     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   1439 L_3100B813:
   1440     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   1441     ebx = eax; /* 0x3100B816: mov ebx, eax */
   1442     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   1443     RECOMP_FLAGS_IN();
   1444     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   1445     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   1446     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   1447     ecx = esi; /* 0x3100B822: mov ecx, esi */
   1448     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   1449     RECOMP_FLAGS_IN();
   1450     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   1451     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   1452     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1453     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1454     _flag_k = FK_CMP;
   1455     RECOMP_BACKEDGE();
   1456     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   1457 L_3100B830:
   1458     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   1459     PUSH32(esp, edx); /* 0x3100B833: push edx */
   1460     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   1461     RECOMP_FLAGS_IN();
   1462     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   1463     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1464     edi = 0; /* 0x3100B83C: xor edi, edi */
   1465     _cf = 0;
   1466     _flag_k = FK_TEST;
   1467     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   1468     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   1469     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   1470     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   1471     RECOMP_FLAGS_IN();
   1472     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1473     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1474     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   1475     _flag_k = FK_ADD;
   1476     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   1477     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   1478     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   1479     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   1480     esp = ebp; /* 0x3100B853: mov esp, ebp */
   1481     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   1482     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   1483 L_310475B8:
   1484     ecx = ebp + (-0x68); /* 0x310475B8: lea ecx, [ebp - 0x68] */
   1485     RECOMP_BACKEDGE();
   1486     goto L_3100B790; /* 0x310475BB: jmp 0x3100b790 */
   1487     { RECOMP_REGS_OUT(); return; } /* end of function */
   1488     RECOMP_REGS_OUT();
   1489 }
   1490 
   1491 void sub_310475C0(void) {
   1492     int _fpu_cmp = 0;
   1493     uint32_t _cf = 0;
   1494     int _df = 1;
   1495     uint32_t _flag_k = FK_NONE;
   1496     uint32_t _flag_a = 0, _flag_b = 0;
   1497     uint32_t _itail_tgt = 0;
   1498     RECOMP_REGS_LOCALS
   1499     RECOMP_ENTER(0x310475C0u);
   1500 
   1501     goto L_310475C0;
   1502 L_31004880:
   1503     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   1504     ebp = esp; /* 0x31004881: mov ebp, esp */
   1505     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   1506     PUSH32(esp, esi); /* 0x31004884: push esi */
   1507     esi = ecx; /* 0x31004885: mov esi, ecx */
   1508     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   1509     PUSH32(esp, eax); /* 0x3100488A: push eax */
   1510     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   1511     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   1512     RECOMP_FLAGS_IN();
   1513     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1514     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1515     esp = esp + 4; /* 0x31004893: add esp, 4 */
   1516     _flag_k = FK_ADD;
   1517     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1518     eax = 0; /* 0x31004896: xor eax, eax */
   1519     _cf = 0;
   1520     _flag_k = FK_TEST;
   1521     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   1522     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   1523     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   1524     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   1525     esp = ebp; /* 0x310048A2: mov esp, ebp */
   1526     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   1527     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   1528 L_310475C0:
   1529     ecx = ebp + (-0x3C); /* 0x310475C0: lea ecx, [ebp - 0x3c] */
   1530     RECOMP_BACKEDGE();
   1531     goto L_31004880; /* 0x310475C3: jmp 0x31004880 */
   1532     { RECOMP_REGS_OUT(); return; } /* end of function */
   1533     RECOMP_REGS_OUT();
   1534 }
   1535 
   1536 void sub_310475C8(void) {
   1537     int _fpu_cmp = 0;
   1538     uint32_t _cf = 0;
   1539     int _df = 1;
   1540     uint32_t _flag_k = FK_NONE;
   1541     uint32_t _flag_a = 0, _flag_b = 0;
   1542     uint32_t _itail_tgt = 0;
   1543     RECOMP_REGS_LOCALS
   1544     RECOMP_ENTER(0x310475C8u);
   1545 
   1546     goto L_310475C8;
   1547 L_31046870:
   1548     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   1549 L_310475C8:
   1550     eax = 0x31049958u; /* 0x310475C8: mov eax, 0x31049958 */
   1551 L_310475CD:
   1552     RECOMP_BACKEDGE();
   1553     goto L_31046870; /* 0x310475CD: jmp 0x31046870 */
   1554     { RECOMP_REGS_OUT(); return; } /* end of function */
   1555   _ljump:
   1556     switch (_itail_tgt) {
   1557       case 0x31046870u: goto L_31046870;
   1558       case 0x310475C8u: goto L_310475C8;
   1559       case 0x310475CDu: goto L_310475CD;
   1560       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   1561     }
   1562     RECOMP_REGS_OUT();
   1563 }
   1564 
   1565 void sub_310475E0(void) {
   1566     int _fpu_cmp = 0;
   1567     uint32_t _cf = 0;
   1568     int _df = 1;
   1569     uint32_t _flag_k = FK_NONE;
   1570     uint32_t _flag_a = 0, _flag_b = 0;
   1571     uint32_t _itail_tgt = 0;
   1572     RECOMP_REGS_LOCALS
   1573     RECOMP_ENTER(0x310475E0u);
   1574 
   1575     goto L_310475E0;
   1576 L_3100B670:
   1577     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   1578     ebp = esp; /* 0x3100B671: mov ebp, esp */
   1579     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   1580     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   1581     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   1582     PUSH32(esp, eax); /* 0x3100B680: push eax */
   1583     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   1584     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1585     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1586     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   1587     _flag_k = FK_CMP;
   1588     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   1589     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   1590     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   1591     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   1592     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   1593     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   1594     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   1595     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   1596     RECOMP_FLAGS_IN();
   1597     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   1598     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   1599     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   1600     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   1601     RECOMP_FLAGS_IN();
   1602     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1603     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   1604     _cf = 0;
   1605     _flag_k = FK_TEST;
   1606     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   1607     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   1608     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   1609     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   1610     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   1611     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   1612     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   1613     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1614     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   1615     _flag_k = FK_ADD;
   1616     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1617     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1618     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   1619     _flag_k = FK_ADD;
   1620     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   1621     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   1622     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1623     _flag_k = FK_CMP;
   1624     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   1625     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   1626     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   1627 L_3100B6D9:
   1628     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   1629     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   1630     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   1631     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1632     _flag_k = FK_CMP;
   1633     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   1634 L_3100B6DF:
   1635     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   1636     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   1637     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1638     _flag_k = FK_CMP;
   1639     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   1640 L_3100B6E3:
   1641     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   1642     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   1643     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   1644     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   1645     RECOMP_FLAGS_IN();
   1646     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   1647     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   1648     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   1649     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   1650     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   1651     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   1652     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   1653     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   1654     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   1655 L_3100B707:
   1656     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   1657     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1658     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1659     _flag_k = FK_CMP;
   1660     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   1661 L_3100B70B:
   1662     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   1663     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   1664     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   1665     RECOMP_FLAGS_IN();
   1666     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   1667     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   1668     PUSH32(esp, eax); /* 0x3100B719: push eax */
   1669     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   1670     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   1671     RECOMP_FLAGS_IN();
   1672     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   1673     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   1674     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1675     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1676     _flag_k = FK_CMP;
   1677     RECOMP_BACKEDGE();
   1678     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   1679 L_3100B728:
   1680     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1681     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   1682     _cf = 0;
   1683     _flag_k = FK_TEST;
   1684 L_3100B72A:
   1685     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   1686     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   1687     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   1688     RECOMP_FLAGS_IN();
   1689     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   1690     PUSH32(esp, edx); /* 0x3100B736: push edx */
   1691     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   1692     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   1693     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   1694     RECOMP_FLAGS_IN();
   1695     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   1696     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1697     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1698     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   1699     _flag_k = FK_ADD;
   1700     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   1701     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   1702     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   1703     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   1704     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   1705     esp = ebp; /* 0x3100B755: mov esp, ebp */
   1706     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   1707     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   1708 L_310475E0:
   1709     ecx = ebp + (-0x58); /* 0x310475E0: lea ecx, [ebp - 0x58] */
   1710     RECOMP_BACKEDGE();
   1711     goto L_3100B670; /* 0x310475E3: jmp 0x3100b670 */
   1712     { RECOMP_REGS_OUT(); return; } /* end of function */
   1713     RECOMP_REGS_OUT();
   1714 }
   1715 
   1716 void sub_310475E8(void) {
   1717     int _fpu_cmp = 0;
   1718     uint32_t _cf = 0;
   1719     int _df = 1;
   1720     uint32_t _flag_k = FK_NONE;
   1721     uint32_t _flag_a = 0, _flag_b = 0;
   1722     uint32_t _itail_tgt = 0;
   1723     RECOMP_REGS_LOCALS
   1724     RECOMP_ENTER(0x310475E8u);
   1725 
   1726     goto L_310475E8;
   1727 L_3100B790:
   1728     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   1729     ebp = esp; /* 0x3100B791: mov ebp, esp */
   1730     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1731     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1732     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   1733     _flag_k = FK_CMP;
   1734     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   1735     PUSH32(esp, esi); /* 0x3100B797: push esi */
   1736     esi = ecx; /* 0x3100B798: mov esi, ecx */
   1737     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   1738     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   1739     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   1740     _cf = 0;
   1741     _flag_k = FK_TEST;
   1742     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   1743     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   1744     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   1745     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   1746     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   1747 L_3100B7AA:
   1748     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   1749     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   1750     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   1751     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1752     _flag_k = FK_CMP;
   1753     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   1754 L_3100B7B0:
   1755     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   1756     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   1757     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1758     _flag_k = FK_CMP;
   1759     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   1760 L_3100B7B4:
   1761     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   1762     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   1763     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   1764     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1765     _flag_k = FK_CMP;
   1766     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   1767     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   1768 L_3100B7BE:
   1769     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   1770     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   1771     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   1772     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   1773     RECOMP_FLAGS_IN();
   1774     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   1775     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   1776     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   1777     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   1778     RECOMP_FLAGS_IN();
   1779     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   1780     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   1781     RECOMP_FLAGS_IN();
   1782     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   1783     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1784     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1785     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   1786     _flag_k = FK_ADD;
   1787     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   1788     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   1789     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1790     _flag_k = FK_CMP;
   1791     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   1792     RECOMP_BACKEDGE();
   1793     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   1794 L_3100B7E7:
   1795     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   1796     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   1797     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   1798     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   1799     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   1800     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   1801     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   1802     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   1803     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   1804     PUSH32(esp, eax); /* 0x3100B805: push eax */
   1805     ecx = esi; /* 0x3100B806: mov ecx, esi */
   1806     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   1807     RECOMP_FLAGS_IN();
   1808     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   1809 L_3100B80F:
   1810     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   1811     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1812     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1813     _flag_k = FK_CMP;
   1814     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   1815 L_3100B813:
   1816     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   1817     ebx = eax; /* 0x3100B816: mov ebx, eax */
   1818     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   1819     RECOMP_FLAGS_IN();
   1820     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   1821     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   1822     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   1823     ecx = esi; /* 0x3100B822: mov ecx, esi */
   1824     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   1825     RECOMP_FLAGS_IN();
   1826     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   1827     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   1828     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   1829     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1830     _flag_k = FK_CMP;
   1831     RECOMP_BACKEDGE();
   1832     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   1833 L_3100B830:
   1834     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   1835     PUSH32(esp, edx); /* 0x3100B833: push edx */
   1836     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   1837     RECOMP_FLAGS_IN();
   1838     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   1839     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1840     edi = 0; /* 0x3100B83C: xor edi, edi */
   1841     _cf = 0;
   1842     _flag_k = FK_TEST;
   1843     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   1844     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   1845     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   1846     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   1847     RECOMP_FLAGS_IN();
   1848     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1849     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1850     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   1851     _flag_k = FK_ADD;
   1852     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   1853     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   1854     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   1855     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   1856     esp = ebp; /* 0x3100B853: mov esp, ebp */
   1857     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   1858     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   1859 L_310475E8:
   1860     ecx = ebp + (-0x54); /* 0x310475E8: lea ecx, [ebp - 0x54] */
   1861     RECOMP_BACKEDGE();
   1862     goto L_3100B790; /* 0x310475EB: jmp 0x3100b790 */
   1863     { RECOMP_REGS_OUT(); return; } /* end of function */
   1864     RECOMP_REGS_OUT();
   1865 }
   1866 
   1867 void sub_310475F0(void) {
   1868     int _fpu_cmp = 0;
   1869     uint32_t _cf = 0;
   1870     int _df = 1;
   1871     uint32_t _flag_k = FK_NONE;
   1872     uint32_t _flag_a = 0, _flag_b = 0;
   1873     uint32_t _itail_tgt = 0;
   1874     RECOMP_REGS_LOCALS
   1875     RECOMP_ENTER(0x310475F0u);
   1876 
   1877     goto L_310475F0;
   1878 L_31004880:
   1879     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   1880     ebp = esp; /* 0x31004881: mov ebp, esp */
   1881     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   1882     PUSH32(esp, esi); /* 0x31004884: push esi */
   1883     esi = ecx; /* 0x31004885: mov esi, ecx */
   1884     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   1885     PUSH32(esp, eax); /* 0x3100488A: push eax */
   1886     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   1887     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   1888     RECOMP_FLAGS_IN();
   1889     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1890     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1891     esp = esp + 4; /* 0x31004893: add esp, 4 */
   1892     _flag_k = FK_ADD;
   1893     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1894     eax = 0; /* 0x31004896: xor eax, eax */
   1895     _cf = 0;
   1896     _flag_k = FK_TEST;
   1897     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   1898     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   1899     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   1900     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   1901     esp = ebp; /* 0x310048A2: mov esp, ebp */
   1902     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   1903     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   1904 L_310475F0:
   1905     ecx = ebp + (-0x28); /* 0x310475F0: lea ecx, [ebp - 0x28] */
   1906     RECOMP_BACKEDGE();
   1907     goto L_31004880; /* 0x310475F3: jmp 0x31004880 */
   1908     { RECOMP_REGS_OUT(); return; } /* end of function */
   1909     RECOMP_REGS_OUT();
   1910 }
   1911 
   1912 void sub_310475F8(void) {
   1913     int _fpu_cmp = 0;
   1914     uint32_t _cf = 0;
   1915     int _df = 1;
   1916     uint32_t _flag_k = FK_NONE;
   1917     uint32_t _flag_a = 0, _flag_b = 0;
   1918     uint32_t _itail_tgt = 0;
   1919     RECOMP_REGS_LOCALS
   1920     RECOMP_ENTER(0x310475F8u);
   1921 
   1922     goto L_310475F8;
   1923 L_31046870:
   1924     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   1925 L_310475F8:
   1926     eax = 0x310499A0u; /* 0x310475F8: mov eax, 0x310499a0 */
   1927 L_310475FD:
   1928     RECOMP_BACKEDGE();
   1929     goto L_31046870; /* 0x310475FD: jmp 0x31046870 */
   1930     { RECOMP_REGS_OUT(); return; } /* end of function */
   1931   _ljump:
   1932     switch (_itail_tgt) {
   1933       case 0x31046870u: goto L_31046870;
   1934       case 0x310475F8u: goto L_310475F8;
   1935       case 0x310475FDu: goto L_310475FD;
   1936       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   1937     }
   1938     RECOMP_REGS_OUT();
   1939 }
   1940 
   1941 void sub_31047610(void) {
   1942     int _fpu_cmp = 0;
   1943     uint32_t _cf = 0;
   1944     int _df = 1;
   1945     uint32_t _flag_k = FK_NONE;
   1946     uint32_t _flag_a = 0, _flag_b = 0;
   1947     uint32_t _itail_tgt = 0;
   1948     RECOMP_REGS_LOCALS
   1949     RECOMP_ENTER(0x31047610u);
   1950 
   1951     goto L_31047610;
   1952 L_3100B670:
   1953     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   1954     ebp = esp; /* 0x3100B671: mov ebp, esp */
   1955     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   1956     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   1957     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   1958     PUSH32(esp, eax); /* 0x3100B680: push eax */
   1959     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   1960     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   1961     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1962     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   1963     _flag_k = FK_CMP;
   1964     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   1965     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   1966     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   1967     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   1968     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   1969     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   1970     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   1971     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   1972     RECOMP_FLAGS_IN();
   1973     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   1974     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   1975     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   1976     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   1977     RECOMP_FLAGS_IN();
   1978     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   1979     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   1980     _cf = 0;
   1981     _flag_k = FK_TEST;
   1982     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   1983     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   1984     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   1985     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   1986     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   1987     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   1988     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   1989     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1990     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   1991     _flag_k = FK_ADD;
   1992     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   1993     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   1994     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   1995     _flag_k = FK_ADD;
   1996     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   1997     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   1998     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   1999     _flag_k = FK_CMP;
   2000     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   2001     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   2002     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   2003 L_3100B6D9:
   2004     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   2005     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   2006     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   2007     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2008     _flag_k = FK_CMP;
   2009     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   2010 L_3100B6DF:
   2011     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   2012     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   2013     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2014     _flag_k = FK_CMP;
   2015     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   2016 L_3100B6E3:
   2017     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   2018     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   2019     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   2020     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   2021     RECOMP_FLAGS_IN();
   2022     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   2023     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   2024     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   2025     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   2026     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   2027     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   2028     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   2029     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   2030     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   2031 L_3100B707:
   2032     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   2033     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   2034     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2035     _flag_k = FK_CMP;
   2036     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   2037 L_3100B70B:
   2038     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   2039     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   2040     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   2041     RECOMP_FLAGS_IN();
   2042     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   2043     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   2044     PUSH32(esp, eax); /* 0x3100B719: push eax */
   2045     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   2046     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   2047     RECOMP_FLAGS_IN();
   2048     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   2049     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   2050     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   2051     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2052     _flag_k = FK_CMP;
   2053     RECOMP_BACKEDGE();
   2054     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   2055 L_3100B728:
   2056     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2057     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   2058     _cf = 0;
   2059     _flag_k = FK_TEST;
   2060 L_3100B72A:
   2061     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   2062     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   2063     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   2064     RECOMP_FLAGS_IN();
   2065     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   2066     PUSH32(esp, edx); /* 0x3100B736: push edx */
   2067     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   2068     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   2069     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   2070     RECOMP_FLAGS_IN();
   2071     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   2072     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2073     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2074     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   2075     _flag_k = FK_ADD;
   2076     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   2077     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   2078     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   2079     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   2080     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   2081     esp = ebp; /* 0x3100B755: mov esp, ebp */
   2082     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   2083     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   2084 L_31047610:
   2085     ecx = ebp + (-0x68); /* 0x31047610: lea ecx, [ebp - 0x68] */
   2086     RECOMP_BACKEDGE();
   2087     goto L_3100B670; /* 0x31047613: jmp 0x3100b670 */
   2088     { RECOMP_REGS_OUT(); return; } /* end of function */
   2089     RECOMP_REGS_OUT();
   2090 }
   2091 
   2092 void sub_31047618(void) {
   2093     int _fpu_cmp = 0;
   2094     uint32_t _cf = 0;
   2095     int _df = 1;
   2096     uint32_t _flag_k = FK_NONE;
   2097     uint32_t _flag_a = 0, _flag_b = 0;
   2098     uint32_t _itail_tgt = 0;
   2099     RECOMP_REGS_LOCALS
   2100     RECOMP_ENTER(0x31047618u);
   2101 
   2102     goto L_31047618;
   2103 L_3100B670:
   2104     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   2105     ebp = esp; /* 0x3100B671: mov ebp, esp */
   2106     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   2107     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   2108     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   2109     PUSH32(esp, eax); /* 0x3100B680: push eax */
   2110     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   2111     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2112     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2113     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   2114     _flag_k = FK_CMP;
   2115     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   2116     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   2117     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   2118     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   2119     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   2120     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   2121     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   2122     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   2123     RECOMP_FLAGS_IN();
   2124     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   2125     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   2126     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   2127     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   2128     RECOMP_FLAGS_IN();
   2129     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2130     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   2131     _cf = 0;
   2132     _flag_k = FK_TEST;
   2133     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   2134     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   2135     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   2136     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   2137     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   2138     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   2139     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   2140     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2141     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   2142     _flag_k = FK_ADD;
   2143     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2144     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2145     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   2146     _flag_k = FK_ADD;
   2147     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   2148     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   2149     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2150     _flag_k = FK_CMP;
   2151     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   2152     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   2153     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   2154 L_3100B6D9:
   2155     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   2156     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   2157     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   2158     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2159     _flag_k = FK_CMP;
   2160     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   2161 L_3100B6DF:
   2162     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   2163     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   2164     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2165     _flag_k = FK_CMP;
   2166     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   2167 L_3100B6E3:
   2168     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   2169     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   2170     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   2171     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   2172     RECOMP_FLAGS_IN();
   2173     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   2174     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   2175     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   2176     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   2177     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   2178     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   2179     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   2180     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   2181     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   2182 L_3100B707:
   2183     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   2184     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   2185     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2186     _flag_k = FK_CMP;
   2187     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   2188 L_3100B70B:
   2189     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   2190     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   2191     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   2192     RECOMP_FLAGS_IN();
   2193     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   2194     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   2195     PUSH32(esp, eax); /* 0x3100B719: push eax */
   2196     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   2197     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   2198     RECOMP_FLAGS_IN();
   2199     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   2200     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   2201     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   2202     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2203     _flag_k = FK_CMP;
   2204     RECOMP_BACKEDGE();
   2205     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   2206 L_3100B728:
   2207     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2208     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   2209     _cf = 0;
   2210     _flag_k = FK_TEST;
   2211 L_3100B72A:
   2212     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   2213     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   2214     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   2215     RECOMP_FLAGS_IN();
   2216     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   2217     PUSH32(esp, edx); /* 0x3100B736: push edx */
   2218     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   2219     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   2220     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   2221     RECOMP_FLAGS_IN();
   2222     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   2223     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2224     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2225     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   2226     _flag_k = FK_ADD;
   2227     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   2228     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   2229     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   2230     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   2231     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   2232     esp = ebp; /* 0x3100B755: mov esp, ebp */
   2233     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   2234     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   2235 L_31047618:
   2236     ecx = ebp + (-0xA8); /* 0x31047618: lea ecx, [ebp - 0xa8] */
   2237     RECOMP_BACKEDGE();
   2238     goto L_3100B670; /* 0x3104761E: jmp 0x3100b670 */
   2239     { RECOMP_REGS_OUT(); return; } /* end of function */
   2240     RECOMP_REGS_OUT();
   2241 }
   2242 
   2243 void sub_31047623(void) {
   2244     int _fpu_cmp = 0;
   2245     uint32_t _cf = 0;
   2246     int _df = 1;
   2247     uint32_t _flag_k = FK_NONE;
   2248     uint32_t _flag_a = 0, _flag_b = 0;
   2249     uint32_t _itail_tgt = 0;
   2250     RECOMP_REGS_LOCALS
   2251     RECOMP_ENTER(0x31047623u);
   2252 
   2253 L_31047623:
   2254     ecx = ebp + (-0x24); /* 0x31047623: lea ecx, [ebp - 0x24] */
   2255 L_31047626:
   2256     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   2257     { RECOMP_REGS_OUT(); return; } /* end of function */
   2258   _ljump:
   2259     switch (_itail_tgt) {
   2260       case 0x31047623u: goto L_31047623;
   2261       case 0x31047626u: goto L_31047626;
   2262       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   2263     }
   2264     RECOMP_REGS_OUT();
   2265 }
   2266 
   2267 void sub_3104762C(void) {
   2268     int _fpu_cmp = 0;
   2269     uint32_t _cf = 0;
   2270     int _df = 1;
   2271     uint32_t _flag_k = FK_NONE;
   2272     uint32_t _flag_a = 0, _flag_b = 0;
   2273     uint32_t _itail_tgt = 0;
   2274     RECOMP_REGS_LOCALS
   2275     RECOMP_ENTER(0x3104762Cu);
   2276 
   2277     goto L_3104762C;
   2278 L_3100B790:
   2279     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   2280     ebp = esp; /* 0x3100B791: mov ebp, esp */
   2281     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2282     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2283     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   2284     _flag_k = FK_CMP;
   2285     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   2286     PUSH32(esp, esi); /* 0x3100B797: push esi */
   2287     esi = ecx; /* 0x3100B798: mov esi, ecx */
   2288     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   2289     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   2290     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   2291     _cf = 0;
   2292     _flag_k = FK_TEST;
   2293     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   2294     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   2295     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   2296     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   2297     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   2298 L_3100B7AA:
   2299     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   2300     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   2301     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   2302     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2303     _flag_k = FK_CMP;
   2304     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   2305 L_3100B7B0:
   2306     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   2307     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   2308     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2309     _flag_k = FK_CMP;
   2310     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   2311 L_3100B7B4:
   2312     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   2313     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   2314     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   2315     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2316     _flag_k = FK_CMP;
   2317     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   2318     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   2319 L_3100B7BE:
   2320     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   2321     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   2322     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   2323     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   2324     RECOMP_FLAGS_IN();
   2325     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   2326     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   2327     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   2328     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   2329     RECOMP_FLAGS_IN();
   2330     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   2331     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   2332     RECOMP_FLAGS_IN();
   2333     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   2334     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2335     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2336     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   2337     _flag_k = FK_ADD;
   2338     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   2339     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   2340     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2341     _flag_k = FK_CMP;
   2342     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   2343     RECOMP_BACKEDGE();
   2344     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   2345 L_3100B7E7:
   2346     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   2347     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   2348     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   2349     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   2350     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   2351     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   2352     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   2353     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   2354     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   2355     PUSH32(esp, eax); /* 0x3100B805: push eax */
   2356     ecx = esi; /* 0x3100B806: mov ecx, esi */
   2357     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   2358     RECOMP_FLAGS_IN();
   2359     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   2360 L_3100B80F:
   2361     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   2362     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   2363     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2364     _flag_k = FK_CMP;
   2365     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   2366 L_3100B813:
   2367     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   2368     ebx = eax; /* 0x3100B816: mov ebx, eax */
   2369     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   2370     RECOMP_FLAGS_IN();
   2371     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   2372     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   2373     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   2374     ecx = esi; /* 0x3100B822: mov ecx, esi */
   2375     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   2376     RECOMP_FLAGS_IN();
   2377     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   2378     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   2379     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   2380     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2381     _flag_k = FK_CMP;
   2382     RECOMP_BACKEDGE();
   2383     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   2384 L_3100B830:
   2385     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   2386     PUSH32(esp, edx); /* 0x3100B833: push edx */
   2387     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   2388     RECOMP_FLAGS_IN();
   2389     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   2390     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2391     edi = 0; /* 0x3100B83C: xor edi, edi */
   2392     _cf = 0;
   2393     _flag_k = FK_TEST;
   2394     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   2395     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   2396     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   2397     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   2398     RECOMP_FLAGS_IN();
   2399     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2400     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2401     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   2402     _flag_k = FK_ADD;
   2403     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   2404     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   2405     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   2406     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   2407     esp = ebp; /* 0x3100B853: mov esp, ebp */
   2408     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   2409     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   2410 L_3104762C:
   2411     ecx = ebp + (-0xA4); /* 0x3104762C: lea ecx, [ebp - 0xa4] */
   2412     RECOMP_BACKEDGE();
   2413     goto L_3100B790; /* 0x31047632: jmp 0x3100b790 */
   2414     { RECOMP_REGS_OUT(); return; } /* end of function */
   2415     RECOMP_REGS_OUT();
   2416 }
   2417 
   2418 void sub_31047637(void) {
   2419     int _fpu_cmp = 0;
   2420     uint32_t _cf = 0;
   2421     int _df = 1;
   2422     uint32_t _flag_k = FK_NONE;
   2423     uint32_t _flag_a = 0, _flag_b = 0;
   2424     uint32_t _itail_tgt = 0;
   2425     RECOMP_REGS_LOCALS
   2426     RECOMP_ENTER(0x31047637u);
   2427 
   2428     goto L_31047637;
   2429 L_31004880:
   2430     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   2431     ebp = esp; /* 0x31004881: mov ebp, esp */
   2432     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   2433     PUSH32(esp, esi); /* 0x31004884: push esi */
   2434     esi = ecx; /* 0x31004885: mov esi, ecx */
   2435     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   2436     PUSH32(esp, eax); /* 0x3100488A: push eax */
   2437     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   2438     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   2439     RECOMP_FLAGS_IN();
   2440     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2441     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2442     esp = esp + 4; /* 0x31004893: add esp, 4 */
   2443     _flag_k = FK_ADD;
   2444     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2445     eax = 0; /* 0x31004896: xor eax, eax */
   2446     _cf = 0;
   2447     _flag_k = FK_TEST;
   2448     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   2449     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   2450     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   2451     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   2452     esp = ebp; /* 0x310048A2: mov esp, ebp */
   2453     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   2454     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   2455 L_31047637:
   2456     ecx = ebp + (-0x78); /* 0x31047637: lea ecx, [ebp - 0x78] */
   2457     RECOMP_BACKEDGE();
   2458     goto L_31004880; /* 0x3104763A: jmp 0x31004880 */
   2459     { RECOMP_REGS_OUT(); return; } /* end of function */
   2460     RECOMP_REGS_OUT();
   2461 }
   2462 
   2463 void sub_3104763F(void) {
   2464     int _fpu_cmp = 0;
   2465     uint32_t _cf = 0;
   2466     int _df = 1;
   2467     uint32_t _flag_k = FK_NONE;
   2468     uint32_t _flag_a = 0, _flag_b = 0;
   2469     uint32_t _itail_tgt = 0;
   2470     RECOMP_REGS_LOCALS
   2471     RECOMP_ENTER(0x3104763Fu);
   2472 
   2473     goto L_3104763F;
   2474 L_3100B790:
   2475     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   2476     ebp = esp; /* 0x3100B791: mov ebp, esp */
   2477     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2478     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2479     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   2480     _flag_k = FK_CMP;
   2481     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   2482     PUSH32(esp, esi); /* 0x3100B797: push esi */
   2483     esi = ecx; /* 0x3100B798: mov esi, ecx */
   2484     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   2485     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   2486     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   2487     _cf = 0;
   2488     _flag_k = FK_TEST;
   2489     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   2490     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   2491     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   2492     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   2493     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   2494 L_3100B7AA:
   2495     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   2496     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   2497     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   2498     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2499     _flag_k = FK_CMP;
   2500     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   2501 L_3100B7B0:
   2502     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   2503     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   2504     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2505     _flag_k = FK_CMP;
   2506     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   2507 L_3100B7B4:
   2508     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   2509     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   2510     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   2511     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2512     _flag_k = FK_CMP;
   2513     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   2514     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   2515 L_3100B7BE:
   2516     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   2517     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   2518     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   2519     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   2520     RECOMP_FLAGS_IN();
   2521     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   2522     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   2523     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   2524     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   2525     RECOMP_FLAGS_IN();
   2526     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   2527     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   2528     RECOMP_FLAGS_IN();
   2529     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   2530     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2531     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2532     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   2533     _flag_k = FK_ADD;
   2534     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   2535     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   2536     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2537     _flag_k = FK_CMP;
   2538     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   2539     RECOMP_BACKEDGE();
   2540     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   2541 L_3100B7E7:
   2542     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   2543     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   2544     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   2545     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   2546     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   2547     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   2548     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   2549     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   2550     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   2551     PUSH32(esp, eax); /* 0x3100B805: push eax */
   2552     ecx = esi; /* 0x3100B806: mov ecx, esi */
   2553     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   2554     RECOMP_FLAGS_IN();
   2555     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   2556 L_3100B80F:
   2557     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   2558     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   2559     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2560     _flag_k = FK_CMP;
   2561     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   2562 L_3100B813:
   2563     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   2564     ebx = eax; /* 0x3100B816: mov ebx, eax */
   2565     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   2566     RECOMP_FLAGS_IN();
   2567     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   2568     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   2569     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   2570     ecx = esi; /* 0x3100B822: mov ecx, esi */
   2571     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   2572     RECOMP_FLAGS_IN();
   2573     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   2574     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   2575     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   2576     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2577     _flag_k = FK_CMP;
   2578     RECOMP_BACKEDGE();
   2579     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   2580 L_3100B830:
   2581     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   2582     PUSH32(esp, edx); /* 0x3100B833: push edx */
   2583     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   2584     RECOMP_FLAGS_IN();
   2585     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   2586     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2587     edi = 0; /* 0x3100B83C: xor edi, edi */
   2588     _cf = 0;
   2589     _flag_k = FK_TEST;
   2590     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   2591     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   2592     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   2593     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   2594     RECOMP_FLAGS_IN();
   2595     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2596     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2597     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   2598     _flag_k = FK_ADD;
   2599     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   2600     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   2601     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   2602     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   2603     esp = ebp; /* 0x3100B853: mov esp, ebp */
   2604     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   2605     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   2606 L_3104763F:
   2607     ecx = ebp + (-0x64); /* 0x3104763F: lea ecx, [ebp - 0x64] */
   2608     RECOMP_BACKEDGE();
   2609     goto L_3100B790; /* 0x31047642: jmp 0x3100b790 */
   2610     { RECOMP_REGS_OUT(); return; } /* end of function */
   2611     RECOMP_REGS_OUT();
   2612 }
   2613 
   2614 void sub_31047647(void) {
   2615     int _fpu_cmp = 0;
   2616     uint32_t _cf = 0;
   2617     int _df = 1;
   2618     uint32_t _flag_k = FK_NONE;
   2619     uint32_t _flag_a = 0, _flag_b = 0;
   2620     uint32_t _itail_tgt = 0;
   2621     RECOMP_REGS_LOCALS
   2622     RECOMP_ENTER(0x31047647u);
   2623 
   2624     goto L_31047647;
   2625 L_31004880:
   2626     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   2627     ebp = esp; /* 0x31004881: mov ebp, esp */
   2628     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   2629     PUSH32(esp, esi); /* 0x31004884: push esi */
   2630     esi = ecx; /* 0x31004885: mov esi, ecx */
   2631     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   2632     PUSH32(esp, eax); /* 0x3100488A: push eax */
   2633     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   2634     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   2635     RECOMP_FLAGS_IN();
   2636     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2637     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2638     esp = esp + 4; /* 0x31004893: add esp, 4 */
   2639     _flag_k = FK_ADD;
   2640     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2641     eax = 0; /* 0x31004896: xor eax, eax */
   2642     _cf = 0;
   2643     _flag_k = FK_TEST;
   2644     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   2645     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   2646     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   2647     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   2648     esp = ebp; /* 0x310048A2: mov esp, ebp */
   2649     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   2650     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   2651 L_31047647:
   2652     ecx = ebp + (-0x38); /* 0x31047647: lea ecx, [ebp - 0x38] */
   2653     RECOMP_BACKEDGE();
   2654     goto L_31004880; /* 0x3104764A: jmp 0x31004880 */
   2655     { RECOMP_REGS_OUT(); return; } /* end of function */
   2656     RECOMP_REGS_OUT();
   2657 }
   2658 
   2659 void sub_3104764F(void) {
   2660     int _fpu_cmp = 0;
   2661     uint32_t _cf = 0;
   2662     int _df = 1;
   2663     uint32_t _flag_k = FK_NONE;
   2664     uint32_t _flag_a = 0, _flag_b = 0;
   2665     uint32_t _itail_tgt = 0;
   2666     RECOMP_REGS_LOCALS
   2667     RECOMP_ENTER(0x3104764Fu);
   2668 
   2669     goto L_3104764F;
   2670 L_31046870:
   2671     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   2672 L_3104764F:
   2673     eax = 0x310499D8u; /* 0x3104764F: mov eax, 0x310499d8 */
   2674 L_31047654:
   2675     RECOMP_BACKEDGE();
   2676     goto L_31046870; /* 0x31047654: jmp 0x31046870 */
   2677     { RECOMP_REGS_OUT(); return; } /* end of function */
   2678   _ljump:
   2679     switch (_itail_tgt) {
   2680       case 0x31046870u: goto L_31046870;
   2681       case 0x3104764Fu: goto L_3104764F;
   2682       case 0x31047654u: goto L_31047654;
   2683       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   2684     }
   2685     RECOMP_REGS_OUT();
   2686 }
   2687 
   2688 void sub_31047660(void) {
   2689     int _fpu_cmp = 0;
   2690     uint32_t _cf = 0;
   2691     int _df = 1;
   2692     uint32_t _flag_k = FK_NONE;
   2693     uint32_t _flag_a = 0, _flag_b = 0;
   2694     uint32_t _itail_tgt = 0;
   2695     RECOMP_REGS_LOCALS
   2696     RECOMP_ENTER(0x31047660u);
   2697 
   2698     goto L_31047660;
   2699 L_3100B670:
   2700     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   2701     ebp = esp; /* 0x3100B671: mov ebp, esp */
   2702     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   2703     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   2704     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   2705     PUSH32(esp, eax); /* 0x3100B680: push eax */
   2706     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   2707     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2708     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2709     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   2710     _flag_k = FK_CMP;
   2711     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   2712     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   2713     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   2714     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   2715     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   2716     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   2717     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   2718     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   2719     RECOMP_FLAGS_IN();
   2720     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   2721     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   2722     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   2723     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   2724     RECOMP_FLAGS_IN();
   2725     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2726     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   2727     _cf = 0;
   2728     _flag_k = FK_TEST;
   2729     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   2730     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   2731     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   2732     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   2733     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   2734     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   2735     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   2736     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2737     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   2738     _flag_k = FK_ADD;
   2739     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2740     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2741     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   2742     _flag_k = FK_ADD;
   2743     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   2744     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   2745     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2746     _flag_k = FK_CMP;
   2747     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   2748     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   2749     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   2750 L_3100B6D9:
   2751     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   2752     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   2753     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   2754     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2755     _flag_k = FK_CMP;
   2756     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   2757 L_3100B6DF:
   2758     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   2759     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   2760     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2761     _flag_k = FK_CMP;
   2762     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   2763 L_3100B6E3:
   2764     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   2765     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   2766     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   2767     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   2768     RECOMP_FLAGS_IN();
   2769     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   2770     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   2771     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   2772     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   2773     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   2774     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   2775     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   2776     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   2777     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   2778 L_3100B707:
   2779     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   2780     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   2781     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2782     _flag_k = FK_CMP;
   2783     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   2784 L_3100B70B:
   2785     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   2786     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   2787     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   2788     RECOMP_FLAGS_IN();
   2789     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   2790     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   2791     PUSH32(esp, eax); /* 0x3100B719: push eax */
   2792     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   2793     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   2794     RECOMP_FLAGS_IN();
   2795     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   2796     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   2797     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   2798     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2799     _flag_k = FK_CMP;
   2800     RECOMP_BACKEDGE();
   2801     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   2802 L_3100B728:
   2803     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2804     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   2805     _cf = 0;
   2806     _flag_k = FK_TEST;
   2807 L_3100B72A:
   2808     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   2809     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   2810     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   2811     RECOMP_FLAGS_IN();
   2812     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   2813     PUSH32(esp, edx); /* 0x3100B736: push edx */
   2814     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   2815     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   2816     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   2817     RECOMP_FLAGS_IN();
   2818     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   2819     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2820     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2821     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   2822     _flag_k = FK_ADD;
   2823     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   2824     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   2825     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   2826     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   2827     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   2828     esp = ebp; /* 0x3100B755: mov esp, ebp */
   2829     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   2830     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   2831 L_31047660:
   2832     ecx = ebp + (-0x5C); /* 0x31047660: lea ecx, [ebp - 0x5c] */
   2833     RECOMP_BACKEDGE();
   2834     goto L_3100B670; /* 0x31047663: jmp 0x3100b670 */
   2835     { RECOMP_REGS_OUT(); return; } /* end of function */
   2836     RECOMP_REGS_OUT();
   2837 }
   2838 
   2839 void sub_31047668(void) {
   2840     int _fpu_cmp = 0;
   2841     uint32_t _cf = 0;
   2842     int _df = 1;
   2843     uint32_t _flag_k = FK_NONE;
   2844     uint32_t _flag_a = 0, _flag_b = 0;
   2845     uint32_t _itail_tgt = 0;
   2846     RECOMP_REGS_LOCALS
   2847     RECOMP_ENTER(0x31047668u);
   2848 
   2849     goto L_31047668;
   2850 L_3100B790:
   2851     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   2852     ebp = esp; /* 0x3100B791: mov ebp, esp */
   2853     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2854     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2855     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   2856     _flag_k = FK_CMP;
   2857     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   2858     PUSH32(esp, esi); /* 0x3100B797: push esi */
   2859     esi = ecx; /* 0x3100B798: mov esi, ecx */
   2860     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   2861     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   2862     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   2863     _cf = 0;
   2864     _flag_k = FK_TEST;
   2865     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   2866     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   2867     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   2868     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   2869     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   2870 L_3100B7AA:
   2871     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   2872     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   2873     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   2874     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2875     _flag_k = FK_CMP;
   2876     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   2877 L_3100B7B0:
   2878     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   2879     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   2880     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2881     _flag_k = FK_CMP;
   2882     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   2883 L_3100B7B4:
   2884     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   2885     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   2886     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   2887     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2888     _flag_k = FK_CMP;
   2889     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   2890     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   2891 L_3100B7BE:
   2892     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   2893     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   2894     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   2895     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   2896     RECOMP_FLAGS_IN();
   2897     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   2898     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   2899     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   2900     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   2901     RECOMP_FLAGS_IN();
   2902     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   2903     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   2904     RECOMP_FLAGS_IN();
   2905     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   2906     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   2907     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2908     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   2909     _flag_k = FK_ADD;
   2910     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   2911     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   2912     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2913     _flag_k = FK_CMP;
   2914     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   2915     RECOMP_BACKEDGE();
   2916     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   2917 L_3100B7E7:
   2918     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   2919     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   2920     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   2921     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   2922     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   2923     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   2924     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   2925     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   2926     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   2927     PUSH32(esp, eax); /* 0x3100B805: push eax */
   2928     ecx = esi; /* 0x3100B806: mov ecx, esi */
   2929     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   2930     RECOMP_FLAGS_IN();
   2931     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   2932 L_3100B80F:
   2933     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   2934     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   2935     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2936     _flag_k = FK_CMP;
   2937     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   2938 L_3100B813:
   2939     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   2940     ebx = eax; /* 0x3100B816: mov ebx, eax */
   2941     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   2942     RECOMP_FLAGS_IN();
   2943     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   2944     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   2945     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   2946     ecx = esi; /* 0x3100B822: mov ecx, esi */
   2947     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   2948     RECOMP_FLAGS_IN();
   2949     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   2950     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   2951     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   2952     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   2953     _flag_k = FK_CMP;
   2954     RECOMP_BACKEDGE();
   2955     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   2956 L_3100B830:
   2957     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   2958     PUSH32(esp, edx); /* 0x3100B833: push edx */
   2959     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   2960     RECOMP_FLAGS_IN();
   2961     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   2962     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   2963     edi = 0; /* 0x3100B83C: xor edi, edi */
   2964     _cf = 0;
   2965     _flag_k = FK_TEST;
   2966     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   2967     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   2968     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   2969     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   2970     RECOMP_FLAGS_IN();
   2971     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   2972     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   2973     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   2974     _flag_k = FK_ADD;
   2975     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   2976     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   2977     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   2978     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   2979     esp = ebp; /* 0x3100B853: mov esp, ebp */
   2980     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   2981     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   2982 L_31047668:
   2983     ecx = ebp + (-0x58); /* 0x31047668: lea ecx, [ebp - 0x58] */
   2984     RECOMP_BACKEDGE();
   2985     goto L_3100B790; /* 0x3104766B: jmp 0x3100b790 */
   2986     { RECOMP_REGS_OUT(); return; } /* end of function */
   2987     RECOMP_REGS_OUT();
   2988 }
   2989 
   2990 void sub_31047670(void) {
   2991     int _fpu_cmp = 0;
   2992     uint32_t _cf = 0;
   2993     int _df = 1;
   2994     uint32_t _flag_k = FK_NONE;
   2995     uint32_t _flag_a = 0, _flag_b = 0;
   2996     uint32_t _itail_tgt = 0;
   2997     RECOMP_REGS_LOCALS
   2998     RECOMP_ENTER(0x31047670u);
   2999 
   3000     goto L_31047670;
   3001 L_31004880:
   3002     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   3003     ebp = esp; /* 0x31004881: mov ebp, esp */
   3004     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   3005     PUSH32(esp, esi); /* 0x31004884: push esi */
   3006     esi = ecx; /* 0x31004885: mov esi, ecx */
   3007     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   3008     PUSH32(esp, eax); /* 0x3100488A: push eax */
   3009     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   3010     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   3011     RECOMP_FLAGS_IN();
   3012     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3013     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3014     esp = esp + 4; /* 0x31004893: add esp, 4 */
   3015     _flag_k = FK_ADD;
   3016     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3017     eax = 0; /* 0x31004896: xor eax, eax */
   3018     _cf = 0;
   3019     _flag_k = FK_TEST;
   3020     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   3021     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   3022     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   3023     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   3024     esp = ebp; /* 0x310048A2: mov esp, ebp */
   3025     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   3026     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   3027 L_31047670:
   3028     ecx = ebp + (-0x2C); /* 0x31047670: lea ecx, [ebp - 0x2c] */
   3029     RECOMP_BACKEDGE();
   3030     goto L_31004880; /* 0x31047673: jmp 0x31004880 */
   3031     { RECOMP_REGS_OUT(); return; } /* end of function */
   3032     RECOMP_REGS_OUT();
   3033 }
   3034 
   3035 void sub_31047678(void) {
   3036     int _fpu_cmp = 0;
   3037     uint32_t _cf = 0;
   3038     int _df = 1;
   3039     uint32_t _flag_k = FK_NONE;
   3040     uint32_t _flag_a = 0, _flag_b = 0;
   3041     uint32_t _itail_tgt = 0;
   3042     RECOMP_REGS_LOCALS
   3043     RECOMP_ENTER(0x31047678u);
   3044 
   3045     goto L_31047678;
   3046 L_31046870:
   3047     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   3048 L_31047678:
   3049     eax = 0x31049A30u; /* 0x31047678: mov eax, 0x31049a30 */
   3050 L_3104767D:
   3051     RECOMP_BACKEDGE();
   3052     goto L_31046870; /* 0x3104767D: jmp 0x31046870 */
   3053     { RECOMP_REGS_OUT(); return; } /* end of function */
   3054   _ljump:
   3055     switch (_itail_tgt) {
   3056       case 0x31046870u: goto L_31046870;
   3057       case 0x31047678u: goto L_31047678;
   3058       case 0x3104767Du: goto L_3104767D;
   3059       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   3060     }
   3061     RECOMP_REGS_OUT();
   3062 }
   3063 
   3064 void sub_31047690(void) {
   3065     int _fpu_cmp = 0;
   3066     uint32_t _cf = 0;
   3067     int _df = 1;
   3068     uint32_t _flag_k = FK_NONE;
   3069     uint32_t _flag_a = 0, _flag_b = 0;
   3070     uint32_t _itail_tgt = 0;
   3071     RECOMP_REGS_LOCALS
   3072     RECOMP_ENTER(0x31047690u);
   3073 
   3074 L_31047690:
   3075     eax = MEM32(ebp + (-0x20)); /* 0x31047690: mov eax, dword ptr [ebp - 0x20] */
   3076     PUSH32(esp, eax); /* 0x31047693: push eax */
   3077     RECOMP_ICALL(0x31046858u); /* 0x31047694: call 0x31046858 */ /* not lifted */
   3078     RECOMP_FLAGS_IN();
   3079     ecx = POP32_VAL(esp); /* 0x31047699: pop ecx */
   3080     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3104769A: ret  */
   3081     RECOMP_REGS_OUT();
   3082 }
   3083 
   3084 void sub_3104769B(void) {
   3085     int _fpu_cmp = 0;
   3086     uint32_t _cf = 0;
   3087     int _df = 1;
   3088     uint32_t _flag_k = FK_NONE;
   3089     uint32_t _flag_a = 0, _flag_b = 0;
   3090     uint32_t _itail_tgt = 0;
   3091     RECOMP_REGS_LOCALS
   3092     RECOMP_ENTER(0x3104769Bu);
   3093 
   3094     goto L_3104769B;
   3095 L_3100B670:
   3096     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   3097     ebp = esp; /* 0x3100B671: mov ebp, esp */
   3098     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   3099     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   3100     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   3101     PUSH32(esp, eax); /* 0x3100B680: push eax */
   3102     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   3103     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3104     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3105     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   3106     _flag_k = FK_CMP;
   3107     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   3108     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   3109     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   3110     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   3111     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   3112     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   3113     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   3114     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   3115     RECOMP_FLAGS_IN();
   3116     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   3117     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   3118     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   3119     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   3120     RECOMP_FLAGS_IN();
   3121     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3122     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   3123     _cf = 0;
   3124     _flag_k = FK_TEST;
   3125     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   3126     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   3127     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   3128     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   3129     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   3130     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   3131     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   3132     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3133     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   3134     _flag_k = FK_ADD;
   3135     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3136     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3137     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   3138     _flag_k = FK_ADD;
   3139     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   3140     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   3141     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3142     _flag_k = FK_CMP;
   3143     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   3144     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   3145     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   3146 L_3100B6D9:
   3147     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   3148     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   3149     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3150     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3151     _flag_k = FK_CMP;
   3152     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   3153 L_3100B6DF:
   3154     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   3155     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   3156     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3157     _flag_k = FK_CMP;
   3158     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   3159 L_3100B6E3:
   3160     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   3161     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   3162     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   3163     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   3164     RECOMP_FLAGS_IN();
   3165     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   3166     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   3167     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   3168     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   3169     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   3170     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   3171     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   3172     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   3173     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   3174 L_3100B707:
   3175     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   3176     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   3177     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3178     _flag_k = FK_CMP;
   3179     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   3180 L_3100B70B:
   3181     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   3182     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   3183     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   3184     RECOMP_FLAGS_IN();
   3185     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   3186     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   3187     PUSH32(esp, eax); /* 0x3100B719: push eax */
   3188     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   3189     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   3190     RECOMP_FLAGS_IN();
   3191     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   3192     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   3193     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   3194     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3195     _flag_k = FK_CMP;
   3196     RECOMP_BACKEDGE();
   3197     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   3198 L_3100B728:
   3199     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3200     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   3201     _cf = 0;
   3202     _flag_k = FK_TEST;
   3203 L_3100B72A:
   3204     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   3205     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   3206     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   3207     RECOMP_FLAGS_IN();
   3208     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   3209     PUSH32(esp, edx); /* 0x3100B736: push edx */
   3210     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   3211     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   3212     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   3213     RECOMP_FLAGS_IN();
   3214     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   3215     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3216     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3217     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   3218     _flag_k = FK_ADD;
   3219     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   3220     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   3221     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   3222     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   3223     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   3224     esp = ebp; /* 0x3100B755: mov esp, ebp */
   3225     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   3226     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   3227 L_3104769B:
   3228     ecx = ebp + (-0x68); /* 0x3104769B: lea ecx, [ebp - 0x68] */
   3229     RECOMP_BACKEDGE();
   3230     goto L_3100B670; /* 0x3104769E: jmp 0x3100b670 */
   3231     { RECOMP_REGS_OUT(); return; } /* end of function */
   3232     RECOMP_REGS_OUT();
   3233 }
   3234 
   3235 void sub_310476A3(void) {
   3236     int _fpu_cmp = 0;
   3237     uint32_t _cf = 0;
   3238     int _df = 1;
   3239     uint32_t _flag_k = FK_NONE;
   3240     uint32_t _flag_a = 0, _flag_b = 0;
   3241     uint32_t _itail_tgt = 0;
   3242     RECOMP_REGS_LOCALS
   3243     RECOMP_ENTER(0x310476A3u);
   3244 
   3245     goto L_310476A3;
   3246 L_31004760:
   3247     PUSH32(esp, esi); /* 0x31004760: push esi */
   3248     esi = ecx; /* 0x31004761: mov esi, ecx */
   3249     eax = MEM32(esi); /* 0x31004763: mov eax, dword ptr [esi] */
   3250     PUSH32(esp, eax); /* 0x31004765: push eax */
   3251     RECOMP_ICALL(0x31004740u); /* 0x31004766: call 0x31004740 */ /* not lifted */
   3252     RECOMP_FLAGS_IN();
   3253     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(0x3FFFFFFFu);
   3254     eax = eax & 0x3FFFFFFFu; /* 0x3100476B: and eax, 0x3fffffff */
   3255     _cf = 0;
   3256     _flag_k = FK_TEST;
   3257     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3258     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3259     esp = esp + 4; /* 0x31004770: add esp, 4 */
   3260     _flag_k = FK_ADD;
   3261     /* cmp eax, 1 */ /* 0x31004773: cmp eax, 1 */
   3262     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   3263     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3264     _flag_k = FK_CMP;
   3265     if (CMP_NE(_flag_a, _flag_b)) goto L_31004799; /* 0x31004776: jne 0x31004799 */
   3266 L_31004778:
   3267     eax = MEM32(esi); /* 0x31004778: mov eax, dword ptr [esi] */
   3268     /* cmp MEM32(eax), 0x80000000u */ /* 0x3100477A: cmp dword ptr [eax], 0x80000000 */
   3269     _flag_a = (uint32_t)(MEM32(eax)); _flag_b = (uint32_t)(0x80000000u);
   3270     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3271     _flag_k = FK_CMP;
   3272     if (CMP_NE(_flag_a, _flag_b)) goto L_3100478E; /* 0x31004780: jne 0x3100478e */
   3273 L_31004782:
   3274     ecx = MEM32(eax + 0x8); /* 0x31004782: mov ecx, dword ptr [eax + 8] */
   3275     PUSH32(esp, ecx); /* 0x31004785: push ecx */
   3276     RECOMP_ICALL(0x31046858u); /* 0x31004786: call 0x31046858 */ /* not lifted */
   3277     RECOMP_FLAGS_IN();
   3278     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3279     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3280     esp = esp + 4; /* 0x3100478B: add esp, 4 */
   3281     _flag_k = FK_ADD;
   3282 L_3100478E:
   3283     edx = MEM32(esi); /* 0x3100478E: mov edx, dword ptr [esi] */
   3284     PUSH32(esp, edx); /* 0x31004790: push edx */
   3285     RECOMP_ICALL(0x31046858u); /* 0x31004791: call 0x31046858 */ /* not lifted */
   3286     RECOMP_FLAGS_IN();
   3287     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3288     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3289     esp = esp + 4; /* 0x31004796: add esp, 4 */
   3290     _flag_k = FK_ADD;
   3291 L_31004799:
   3292     esi = POP32_VAL(esp); /* 0x31004799: pop esi */
   3293     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100479A: ret  */
   3294 L_310476A3:
   3295     ecx = ebp + (-0x18); /* 0x310476A3: lea ecx, [ebp - 0x18] */
   3296     RECOMP_BACKEDGE();
   3297     goto L_31004760; /* 0x310476A6: jmp 0x31004760 */
   3298     { RECOMP_REGS_OUT(); return; } /* end of function */
   3299     RECOMP_REGS_OUT();
   3300 }
   3301 
   3302 void sub_310476AB(void) {
   3303     int _fpu_cmp = 0;
   3304     uint32_t _cf = 0;
   3305     int _df = 1;
   3306     uint32_t _flag_k = FK_NONE;
   3307     uint32_t _flag_a = 0, _flag_b = 0;
   3308     uint32_t _itail_tgt = 0;
   3309     RECOMP_REGS_LOCALS
   3310     RECOMP_ENTER(0x310476ABu);
   3311 
   3312     goto L_310476AB;
   3313 L_3100B790:
   3314     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   3315     ebp = esp; /* 0x3100B791: mov ebp, esp */
   3316     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3317     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3318     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   3319     _flag_k = FK_CMP;
   3320     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   3321     PUSH32(esp, esi); /* 0x3100B797: push esi */
   3322     esi = ecx; /* 0x3100B798: mov esi, ecx */
   3323     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   3324     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   3325     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   3326     _cf = 0;
   3327     _flag_k = FK_TEST;
   3328     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   3329     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   3330     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   3331     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   3332     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   3333 L_3100B7AA:
   3334     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   3335     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   3336     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3337     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3338     _flag_k = FK_CMP;
   3339     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   3340 L_3100B7B0:
   3341     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   3342     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   3343     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3344     _flag_k = FK_CMP;
   3345     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   3346 L_3100B7B4:
   3347     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   3348     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   3349     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   3350     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3351     _flag_k = FK_CMP;
   3352     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   3353     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   3354 L_3100B7BE:
   3355     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   3356     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   3357     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   3358     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   3359     RECOMP_FLAGS_IN();
   3360     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   3361     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   3362     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   3363     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   3364     RECOMP_FLAGS_IN();
   3365     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   3366     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   3367     RECOMP_FLAGS_IN();
   3368     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   3369     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3370     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3371     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   3372     _flag_k = FK_ADD;
   3373     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   3374     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   3375     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3376     _flag_k = FK_CMP;
   3377     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   3378     RECOMP_BACKEDGE();
   3379     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   3380 L_3100B7E7:
   3381     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   3382     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   3383     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   3384     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   3385     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   3386     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   3387     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   3388     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   3389     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   3390     PUSH32(esp, eax); /* 0x3100B805: push eax */
   3391     ecx = esi; /* 0x3100B806: mov ecx, esi */
   3392     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   3393     RECOMP_FLAGS_IN();
   3394     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   3395 L_3100B80F:
   3396     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   3397     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   3398     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3399     _flag_k = FK_CMP;
   3400     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   3401 L_3100B813:
   3402     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   3403     ebx = eax; /* 0x3100B816: mov ebx, eax */
   3404     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   3405     RECOMP_FLAGS_IN();
   3406     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   3407     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   3408     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   3409     ecx = esi; /* 0x3100B822: mov ecx, esi */
   3410     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   3411     RECOMP_FLAGS_IN();
   3412     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   3413     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   3414     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   3415     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3416     _flag_k = FK_CMP;
   3417     RECOMP_BACKEDGE();
   3418     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   3419 L_3100B830:
   3420     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   3421     PUSH32(esp, edx); /* 0x3100B833: push edx */
   3422     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   3423     RECOMP_FLAGS_IN();
   3424     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   3425     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3426     edi = 0; /* 0x3100B83C: xor edi, edi */
   3427     _cf = 0;
   3428     _flag_k = FK_TEST;
   3429     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   3430     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   3431     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   3432     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   3433     RECOMP_FLAGS_IN();
   3434     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3435     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3436     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   3437     _flag_k = FK_ADD;
   3438     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   3439     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   3440     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   3441     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   3442     esp = ebp; /* 0x3100B853: mov esp, ebp */
   3443     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   3444     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   3445 L_310476AB:
   3446     ecx = ebp + (-0x64); /* 0x310476AB: lea ecx, [ebp - 0x64] */
   3447     RECOMP_BACKEDGE();
   3448     goto L_3100B790; /* 0x310476AE: jmp 0x3100b790 */
   3449     { RECOMP_REGS_OUT(); return; } /* end of function */
   3450     RECOMP_REGS_OUT();
   3451 }
   3452 
   3453 void sub_310476B3(void) {
   3454     int _fpu_cmp = 0;
   3455     uint32_t _cf = 0;
   3456     int _df = 1;
   3457     uint32_t _flag_k = FK_NONE;
   3458     uint32_t _flag_a = 0, _flag_b = 0;
   3459     uint32_t _itail_tgt = 0;
   3460     RECOMP_REGS_LOCALS
   3461     RECOMP_ENTER(0x310476B3u);
   3462 
   3463     goto L_310476B3;
   3464 L_31004880:
   3465     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   3466     ebp = esp; /* 0x31004881: mov ebp, esp */
   3467     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   3468     PUSH32(esp, esi); /* 0x31004884: push esi */
   3469     esi = ecx; /* 0x31004885: mov esi, ecx */
   3470     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   3471     PUSH32(esp, eax); /* 0x3100488A: push eax */
   3472     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   3473     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   3474     RECOMP_FLAGS_IN();
   3475     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3476     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3477     esp = esp + 4; /* 0x31004893: add esp, 4 */
   3478     _flag_k = FK_ADD;
   3479     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3480     eax = 0; /* 0x31004896: xor eax, eax */
   3481     _cf = 0;
   3482     _flag_k = FK_TEST;
   3483     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   3484     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   3485     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   3486     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   3487     esp = ebp; /* 0x310048A2: mov esp, ebp */
   3488     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   3489     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   3490 L_310476B3:
   3491     ecx = ebp + (-0x38); /* 0x310476B3: lea ecx, [ebp - 0x38] */
   3492     RECOMP_BACKEDGE();
   3493     goto L_31004880; /* 0x310476B6: jmp 0x31004880 */
   3494     { RECOMP_REGS_OUT(); return; } /* end of function */
   3495     RECOMP_REGS_OUT();
   3496 }
   3497 
   3498 void sub_310476BB(void) {
   3499     int _fpu_cmp = 0;
   3500     uint32_t _cf = 0;
   3501     int _df = 1;
   3502     uint32_t _flag_k = FK_NONE;
   3503     uint32_t _flag_a = 0, _flag_b = 0;
   3504     uint32_t _itail_tgt = 0;
   3505     RECOMP_REGS_LOCALS
   3506     RECOMP_ENTER(0x310476BBu);
   3507 
   3508     goto L_310476BB;
   3509 L_31046870:
   3510     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   3511 L_310476BB:
   3512     eax = 0x31049A68u; /* 0x310476BB: mov eax, 0x31049a68 */
   3513 L_310476C0:
   3514     RECOMP_BACKEDGE();
   3515     goto L_31046870; /* 0x310476C0: jmp 0x31046870 */
   3516     { RECOMP_REGS_OUT(); return; } /* end of function */
   3517   _ljump:
   3518     switch (_itail_tgt) {
   3519       case 0x31046870u: goto L_31046870;
   3520       case 0x310476BBu: goto L_310476BB;
   3521       case 0x310476C0u: goto L_310476C0;
   3522       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   3523     }
   3524     RECOMP_REGS_OUT();
   3525 }
   3526 
   3527 void sub_310476D0(void) {
   3528     int _fpu_cmp = 0;
   3529     uint32_t _cf = 0;
   3530     int _df = 1;
   3531     uint32_t _flag_k = FK_NONE;
   3532     uint32_t _flag_a = 0, _flag_b = 0;
   3533     uint32_t _itail_tgt = 0;
   3534     RECOMP_REGS_LOCALS
   3535     RECOMP_ENTER(0x310476D0u);
   3536 
   3537     goto L_310476D0;
   3538 L_3100B670:
   3539     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   3540     ebp = esp; /* 0x3100B671: mov ebp, esp */
   3541     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   3542     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   3543     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   3544     PUSH32(esp, eax); /* 0x3100B680: push eax */
   3545     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   3546     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3547     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3548     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   3549     _flag_k = FK_CMP;
   3550     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   3551     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   3552     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   3553     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   3554     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   3555     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   3556     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   3557     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   3558     RECOMP_FLAGS_IN();
   3559     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   3560     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   3561     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   3562     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   3563     RECOMP_FLAGS_IN();
   3564     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3565     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   3566     _cf = 0;
   3567     _flag_k = FK_TEST;
   3568     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   3569     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   3570     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   3571     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   3572     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   3573     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   3574     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   3575     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3576     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   3577     _flag_k = FK_ADD;
   3578     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3579     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3580     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   3581     _flag_k = FK_ADD;
   3582     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   3583     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   3584     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3585     _flag_k = FK_CMP;
   3586     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   3587     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   3588     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   3589 L_3100B6D9:
   3590     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   3591     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   3592     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3593     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3594     _flag_k = FK_CMP;
   3595     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   3596 L_3100B6DF:
   3597     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   3598     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   3599     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3600     _flag_k = FK_CMP;
   3601     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   3602 L_3100B6E3:
   3603     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   3604     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   3605     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   3606     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   3607     RECOMP_FLAGS_IN();
   3608     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   3609     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   3610     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   3611     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   3612     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   3613     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   3614     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   3615     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   3616     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   3617 L_3100B707:
   3618     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   3619     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   3620     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3621     _flag_k = FK_CMP;
   3622     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   3623 L_3100B70B:
   3624     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   3625     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   3626     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   3627     RECOMP_FLAGS_IN();
   3628     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   3629     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   3630     PUSH32(esp, eax); /* 0x3100B719: push eax */
   3631     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   3632     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   3633     RECOMP_FLAGS_IN();
   3634     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   3635     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   3636     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   3637     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3638     _flag_k = FK_CMP;
   3639     RECOMP_BACKEDGE();
   3640     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   3641 L_3100B728:
   3642     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3643     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   3644     _cf = 0;
   3645     _flag_k = FK_TEST;
   3646 L_3100B72A:
   3647     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   3648     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   3649     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   3650     RECOMP_FLAGS_IN();
   3651     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   3652     PUSH32(esp, edx); /* 0x3100B736: push edx */
   3653     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   3654     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   3655     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   3656     RECOMP_FLAGS_IN();
   3657     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   3658     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3659     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3660     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   3661     _flag_k = FK_ADD;
   3662     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   3663     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   3664     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   3665     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   3666     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   3667     esp = ebp; /* 0x3100B755: mov esp, ebp */
   3668     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   3669     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   3670 L_310476D0:
   3671     ecx = ebp + (-0x78); /* 0x310476D0: lea ecx, [ebp - 0x78] */
   3672     RECOMP_BACKEDGE();
   3673     goto L_3100B670; /* 0x310476D3: jmp 0x3100b670 */
   3674     { RECOMP_REGS_OUT(); return; } /* end of function */
   3675     RECOMP_REGS_OUT();
   3676 }
   3677 
   3678 void sub_310476D8(void) {
   3679     int _fpu_cmp = 0;
   3680     uint32_t _cf = 0;
   3681     int _df = 1;
   3682     uint32_t _flag_k = FK_NONE;
   3683     uint32_t _flag_a = 0, _flag_b = 0;
   3684     uint32_t _itail_tgt = 0;
   3685     RECOMP_REGS_LOCALS
   3686     RECOMP_ENTER(0x310476D8u);
   3687 
   3688     goto L_310476D8;
   3689 L_3100B670:
   3690     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   3691     ebp = esp; /* 0x3100B671: mov ebp, esp */
   3692     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   3693     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   3694     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   3695     PUSH32(esp, eax); /* 0x3100B680: push eax */
   3696     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   3697     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3698     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3699     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   3700     _flag_k = FK_CMP;
   3701     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   3702     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   3703     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   3704     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   3705     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   3706     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   3707     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   3708     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   3709     RECOMP_FLAGS_IN();
   3710     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   3711     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   3712     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   3713     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   3714     RECOMP_FLAGS_IN();
   3715     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3716     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   3717     _cf = 0;
   3718     _flag_k = FK_TEST;
   3719     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   3720     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   3721     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   3722     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   3723     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   3724     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   3725     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   3726     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3727     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   3728     _flag_k = FK_ADD;
   3729     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3730     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3731     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   3732     _flag_k = FK_ADD;
   3733     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   3734     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   3735     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3736     _flag_k = FK_CMP;
   3737     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   3738     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   3739     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   3740 L_3100B6D9:
   3741     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   3742     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   3743     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3744     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3745     _flag_k = FK_CMP;
   3746     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   3747 L_3100B6DF:
   3748     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   3749     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   3750     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3751     _flag_k = FK_CMP;
   3752     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   3753 L_3100B6E3:
   3754     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   3755     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   3756     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   3757     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   3758     RECOMP_FLAGS_IN();
   3759     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   3760     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   3761     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   3762     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   3763     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   3764     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   3765     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   3766     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   3767     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   3768 L_3100B707:
   3769     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   3770     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   3771     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3772     _flag_k = FK_CMP;
   3773     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   3774 L_3100B70B:
   3775     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   3776     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   3777     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   3778     RECOMP_FLAGS_IN();
   3779     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   3780     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   3781     PUSH32(esp, eax); /* 0x3100B719: push eax */
   3782     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   3783     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   3784     RECOMP_FLAGS_IN();
   3785     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   3786     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   3787     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   3788     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3789     _flag_k = FK_CMP;
   3790     RECOMP_BACKEDGE();
   3791     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   3792 L_3100B728:
   3793     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   3794     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   3795     _cf = 0;
   3796     _flag_k = FK_TEST;
   3797 L_3100B72A:
   3798     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   3799     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   3800     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   3801     RECOMP_FLAGS_IN();
   3802     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   3803     PUSH32(esp, edx); /* 0x3100B736: push edx */
   3804     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   3805     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   3806     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   3807     RECOMP_FLAGS_IN();
   3808     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   3809     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3810     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3811     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   3812     _flag_k = FK_ADD;
   3813     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   3814     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   3815     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   3816     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   3817     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   3818     esp = ebp; /* 0x3100B755: mov esp, ebp */
   3819     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   3820     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   3821 L_310476D8:
   3822     ecx = ebp + (-0xB8); /* 0x310476D8: lea ecx, [ebp - 0xb8] */
   3823     RECOMP_BACKEDGE();
   3824     goto L_3100B670; /* 0x310476DE: jmp 0x3100b670 */
   3825     { RECOMP_REGS_OUT(); return; } /* end of function */
   3826     RECOMP_REGS_OUT();
   3827 }
   3828 
   3829 void sub_310476E3(void) {
   3830     int _fpu_cmp = 0;
   3831     uint32_t _cf = 0;
   3832     int _df = 1;
   3833     uint32_t _flag_k = FK_NONE;
   3834     uint32_t _flag_a = 0, _flag_b = 0;
   3835     uint32_t _itail_tgt = 0;
   3836     RECOMP_REGS_LOCALS
   3837     RECOMP_ENTER(0x310476E3u);
   3838 
   3839 L_310476E3:
   3840     ecx = ebp + (-0x30); /* 0x310476E3: lea ecx, [ebp - 0x30] */
   3841 L_310476E6:
   3842     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   3843     { RECOMP_REGS_OUT(); return; } /* end of function */
   3844   _ljump:
   3845     switch (_itail_tgt) {
   3846       case 0x310476E3u: goto L_310476E3;
   3847       case 0x310476E6u: goto L_310476E6;
   3848       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   3849     }
   3850     RECOMP_REGS_OUT();
   3851 }
   3852 
   3853 void sub_310476EC(void) {
   3854     int _fpu_cmp = 0;
   3855     uint32_t _cf = 0;
   3856     int _df = 1;
   3857     uint32_t _flag_k = FK_NONE;
   3858     uint32_t _flag_a = 0, _flag_b = 0;
   3859     uint32_t _itail_tgt = 0;
   3860     RECOMP_REGS_LOCALS
   3861     RECOMP_ENTER(0x310476ECu);
   3862 
   3863 L_310476EC:
   3864     ecx = ebp + (-0x20); /* 0x310476EC: lea ecx, [ebp - 0x20] */
   3865 L_310476EF:
   3866     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   3867     { RECOMP_REGS_OUT(); return; } /* end of function */
   3868   _ljump:
   3869     switch (_itail_tgt) {
   3870       case 0x310476ECu: goto L_310476EC;
   3871       case 0x310476EFu: goto L_310476EF;
   3872       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   3873     }
   3874     RECOMP_REGS_OUT();
   3875 }
   3876 
   3877 void sub_310476F5(void) {
   3878     int _fpu_cmp = 0;
   3879     uint32_t _cf = 0;
   3880     int _df = 1;
   3881     uint32_t _flag_k = FK_NONE;
   3882     uint32_t _flag_a = 0, _flag_b = 0;
   3883     uint32_t _itail_tgt = 0;
   3884     RECOMP_REGS_LOCALS
   3885     RECOMP_ENTER(0x310476F5u);
   3886 
   3887 L_310476F5:
   3888     eax = MEM32(ebp + (-0x34)); /* 0x310476F5: mov eax, dword ptr [ebp - 0x34] */
   3889 L_310476F8:
   3890     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   3891     eax = eax & 1; /* 0x310476F8: and eax, 1 */
   3892     _cf = 0;
   3893     _flag_k = FK_TEST;
   3894 L_310476FB:
   3895     /* test eax, eax */ /* 0x310476FB: test eax, eax */
   3896     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   3897     _cf = 0;
   3898     _flag_k = FK_TEST;
   3899 L_310476FD:
   3900     if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_3104770C; /* 0x310476FD: je 0x3104770c */
   3901 L_31047703:
   3902     ecx = MEM32(ebp + 0x8); /* 0x31047703: mov ecx, dword ptr [ebp + 8] */
   3903 L_31047706:
   3904     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   3905 L_3104770C:
   3906     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3104770C: ret  */
   3907   _ljump:
   3908     switch (_itail_tgt) {
   3909       case 0x310476F5u: goto L_310476F5;
   3910       case 0x310476F8u: goto L_310476F8;
   3911       case 0x310476FBu: goto L_310476FB;
   3912       case 0x310476FDu: goto L_310476FD;
   3913       case 0x31047703u: goto L_31047703;
   3914       case 0x31047706u: goto L_31047706;
   3915       case 0x3104770Cu: goto L_3104770C;
   3916       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   3917     }
   3918     RECOMP_REGS_OUT();
   3919 }
   3920 
   3921 void sub_3104770D(void) {
   3922     int _fpu_cmp = 0;
   3923     uint32_t _cf = 0;
   3924     int _df = 1;
   3925     uint32_t _flag_k = FK_NONE;
   3926     uint32_t _flag_a = 0, _flag_b = 0;
   3927     uint32_t _itail_tgt = 0;
   3928     RECOMP_REGS_LOCALS
   3929     RECOMP_ENTER(0x3104770Du);
   3930 
   3931     goto L_3104770D;
   3932 L_3100B790:
   3933     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   3934     ebp = esp; /* 0x3100B791: mov ebp, esp */
   3935     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   3936     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3937     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   3938     _flag_k = FK_CMP;
   3939     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   3940     PUSH32(esp, esi); /* 0x3100B797: push esi */
   3941     esi = ecx; /* 0x3100B798: mov esi, ecx */
   3942     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   3943     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   3944     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   3945     _cf = 0;
   3946     _flag_k = FK_TEST;
   3947     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   3948     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   3949     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   3950     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   3951     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   3952 L_3100B7AA:
   3953     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   3954     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   3955     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   3956     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3957     _flag_k = FK_CMP;
   3958     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   3959 L_3100B7B0:
   3960     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   3961     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   3962     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3963     _flag_k = FK_CMP;
   3964     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   3965 L_3100B7B4:
   3966     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   3967     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   3968     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   3969     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3970     _flag_k = FK_CMP;
   3971     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   3972     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   3973 L_3100B7BE:
   3974     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   3975     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   3976     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   3977     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   3978     RECOMP_FLAGS_IN();
   3979     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   3980     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   3981     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   3982     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   3983     RECOMP_FLAGS_IN();
   3984     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   3985     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   3986     RECOMP_FLAGS_IN();
   3987     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   3988     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   3989     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   3990     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   3991     _flag_k = FK_ADD;
   3992     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   3993     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   3994     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   3995     _flag_k = FK_CMP;
   3996     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   3997     RECOMP_BACKEDGE();
   3998     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   3999 L_3100B7E7:
   4000     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   4001     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   4002     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   4003     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   4004     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   4005     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   4006     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   4007     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   4008     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   4009     PUSH32(esp, eax); /* 0x3100B805: push eax */
   4010     ecx = esi; /* 0x3100B806: mov ecx, esi */
   4011     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   4012     RECOMP_FLAGS_IN();
   4013     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   4014 L_3100B80F:
   4015     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   4016     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4017     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4018     _flag_k = FK_CMP;
   4019     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   4020 L_3100B813:
   4021     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   4022     ebx = eax; /* 0x3100B816: mov ebx, eax */
   4023     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   4024     RECOMP_FLAGS_IN();
   4025     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   4026     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   4027     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   4028     ecx = esi; /* 0x3100B822: mov ecx, esi */
   4029     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   4030     RECOMP_FLAGS_IN();
   4031     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   4032     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   4033     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4034     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4035     _flag_k = FK_CMP;
   4036     RECOMP_BACKEDGE();
   4037     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   4038 L_3100B830:
   4039     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   4040     PUSH32(esp, edx); /* 0x3100B833: push edx */
   4041     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   4042     RECOMP_FLAGS_IN();
   4043     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   4044     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4045     edi = 0; /* 0x3100B83C: xor edi, edi */
   4046     _cf = 0;
   4047     _flag_k = FK_TEST;
   4048     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   4049     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   4050     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   4051     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   4052     RECOMP_FLAGS_IN();
   4053     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4054     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4055     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   4056     _flag_k = FK_ADD;
   4057     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   4058     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   4059     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   4060     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   4061     esp = ebp; /* 0x3100B853: mov esp, ebp */
   4062     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   4063     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   4064 L_3104770D:
   4065     ecx = ebp + (-0xB4); /* 0x3104770D: lea ecx, [ebp - 0xb4] */
   4066     RECOMP_BACKEDGE();
   4067     goto L_3100B790; /* 0x31047713: jmp 0x3100b790 */
   4068     { RECOMP_REGS_OUT(); return; } /* end of function */
   4069     RECOMP_REGS_OUT();
   4070 }
   4071 
   4072 void sub_31047718(void) {
   4073     int _fpu_cmp = 0;
   4074     uint32_t _cf = 0;
   4075     int _df = 1;
   4076     uint32_t _flag_k = FK_NONE;
   4077     uint32_t _flag_a = 0, _flag_b = 0;
   4078     uint32_t _itail_tgt = 0;
   4079     RECOMP_REGS_LOCALS
   4080     RECOMP_ENTER(0x31047718u);
   4081 
   4082     goto L_31047718;
   4083 L_31004880:
   4084     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   4085     ebp = esp; /* 0x31004881: mov ebp, esp */
   4086     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   4087     PUSH32(esp, esi); /* 0x31004884: push esi */
   4088     esi = ecx; /* 0x31004885: mov esi, ecx */
   4089     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   4090     PUSH32(esp, eax); /* 0x3100488A: push eax */
   4091     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   4092     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   4093     RECOMP_FLAGS_IN();
   4094     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4095     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4096     esp = esp + 4; /* 0x31004893: add esp, 4 */
   4097     _flag_k = FK_ADD;
   4098     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4099     eax = 0; /* 0x31004896: xor eax, eax */
   4100     _cf = 0;
   4101     _flag_k = FK_TEST;
   4102     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   4103     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   4104     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   4105     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   4106     esp = ebp; /* 0x310048A2: mov esp, ebp */
   4107     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   4108     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   4109 L_31047718:
   4110     ecx = ebp + (-0x88); /* 0x31047718: lea ecx, [ebp - 0x88] */
   4111     RECOMP_BACKEDGE();
   4112     goto L_31004880; /* 0x3104771E: jmp 0x31004880 */
   4113     { RECOMP_REGS_OUT(); return; } /* end of function */
   4114     RECOMP_REGS_OUT();
   4115 }
   4116 
   4117 void sub_31047723(void) {
   4118     int _fpu_cmp = 0;
   4119     uint32_t _cf = 0;
   4120     int _df = 1;
   4121     uint32_t _flag_k = FK_NONE;
   4122     uint32_t _flag_a = 0, _flag_b = 0;
   4123     uint32_t _itail_tgt = 0;
   4124     RECOMP_REGS_LOCALS
   4125     RECOMP_ENTER(0x31047723u);
   4126 
   4127     goto L_31047723;
   4128 L_3100B790:
   4129     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   4130     ebp = esp; /* 0x3100B791: mov ebp, esp */
   4131     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4132     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4133     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   4134     _flag_k = FK_CMP;
   4135     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   4136     PUSH32(esp, esi); /* 0x3100B797: push esi */
   4137     esi = ecx; /* 0x3100B798: mov esi, ecx */
   4138     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   4139     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   4140     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   4141     _cf = 0;
   4142     _flag_k = FK_TEST;
   4143     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   4144     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   4145     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   4146     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   4147     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   4148 L_3100B7AA:
   4149     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   4150     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   4151     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   4152     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4153     _flag_k = FK_CMP;
   4154     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   4155 L_3100B7B0:
   4156     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   4157     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   4158     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4159     _flag_k = FK_CMP;
   4160     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   4161 L_3100B7B4:
   4162     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   4163     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   4164     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   4165     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4166     _flag_k = FK_CMP;
   4167     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   4168     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   4169 L_3100B7BE:
   4170     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   4171     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   4172     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   4173     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   4174     RECOMP_FLAGS_IN();
   4175     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   4176     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   4177     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   4178     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   4179     RECOMP_FLAGS_IN();
   4180     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   4181     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   4182     RECOMP_FLAGS_IN();
   4183     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   4184     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4185     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4186     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   4187     _flag_k = FK_ADD;
   4188     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   4189     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   4190     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4191     _flag_k = FK_CMP;
   4192     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   4193     RECOMP_BACKEDGE();
   4194     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   4195 L_3100B7E7:
   4196     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   4197     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   4198     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   4199     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   4200     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   4201     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   4202     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   4203     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   4204     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   4205     PUSH32(esp, eax); /* 0x3100B805: push eax */
   4206     ecx = esi; /* 0x3100B806: mov ecx, esi */
   4207     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   4208     RECOMP_FLAGS_IN();
   4209     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   4210 L_3100B80F:
   4211     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   4212     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4213     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4214     _flag_k = FK_CMP;
   4215     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   4216 L_3100B813:
   4217     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   4218     ebx = eax; /* 0x3100B816: mov ebx, eax */
   4219     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   4220     RECOMP_FLAGS_IN();
   4221     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   4222     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   4223     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   4224     ecx = esi; /* 0x3100B822: mov ecx, esi */
   4225     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   4226     RECOMP_FLAGS_IN();
   4227     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   4228     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   4229     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4230     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4231     _flag_k = FK_CMP;
   4232     RECOMP_BACKEDGE();
   4233     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   4234 L_3100B830:
   4235     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   4236     PUSH32(esp, edx); /* 0x3100B833: push edx */
   4237     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   4238     RECOMP_FLAGS_IN();
   4239     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   4240     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4241     edi = 0; /* 0x3100B83C: xor edi, edi */
   4242     _cf = 0;
   4243     _flag_k = FK_TEST;
   4244     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   4245     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   4246     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   4247     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   4248     RECOMP_FLAGS_IN();
   4249     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4250     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4251     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   4252     _flag_k = FK_ADD;
   4253     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   4254     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   4255     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   4256     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   4257     esp = ebp; /* 0x3100B853: mov esp, ebp */
   4258     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   4259     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   4260 L_31047723:
   4261     ecx = ebp + (-0x74); /* 0x31047723: lea ecx, [ebp - 0x74] */
   4262     RECOMP_BACKEDGE();
   4263     goto L_3100B790; /* 0x31047726: jmp 0x3100b790 */
   4264     { RECOMP_REGS_OUT(); return; } /* end of function */
   4265     RECOMP_REGS_OUT();
   4266 }
   4267 
   4268 void sub_3104772B(void) {
   4269     int _fpu_cmp = 0;
   4270     uint32_t _cf = 0;
   4271     int _df = 1;
   4272     uint32_t _flag_k = FK_NONE;
   4273     uint32_t _flag_a = 0, _flag_b = 0;
   4274     uint32_t _itail_tgt = 0;
   4275     RECOMP_REGS_LOCALS
   4276     RECOMP_ENTER(0x3104772Bu);
   4277 
   4278     goto L_3104772B;
   4279 L_31004880:
   4280     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   4281     ebp = esp; /* 0x31004881: mov ebp, esp */
   4282     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   4283     PUSH32(esp, esi); /* 0x31004884: push esi */
   4284     esi = ecx; /* 0x31004885: mov esi, ecx */
   4285     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   4286     PUSH32(esp, eax); /* 0x3100488A: push eax */
   4287     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   4288     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   4289     RECOMP_FLAGS_IN();
   4290     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4291     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4292     esp = esp + 4; /* 0x31004893: add esp, 4 */
   4293     _flag_k = FK_ADD;
   4294     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4295     eax = 0; /* 0x31004896: xor eax, eax */
   4296     _cf = 0;
   4297     _flag_k = FK_TEST;
   4298     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   4299     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   4300     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   4301     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   4302     esp = ebp; /* 0x310048A2: mov esp, ebp */
   4303     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   4304     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   4305 L_3104772B:
   4306     ecx = ebp + (-0x48); /* 0x3104772B: lea ecx, [ebp - 0x48] */
   4307     RECOMP_BACKEDGE();
   4308     goto L_31004880; /* 0x3104772E: jmp 0x31004880 */
   4309     { RECOMP_REGS_OUT(); return; } /* end of function */
   4310     RECOMP_REGS_OUT();
   4311 }
   4312 
   4313 void sub_31047733(void) {
   4314     int _fpu_cmp = 0;
   4315     uint32_t _cf = 0;
   4316     int _df = 1;
   4317     uint32_t _flag_k = FK_NONE;
   4318     uint32_t _flag_a = 0, _flag_b = 0;
   4319     uint32_t _itail_tgt = 0;
   4320     RECOMP_REGS_LOCALS
   4321     RECOMP_ENTER(0x31047733u);
   4322 
   4323     goto L_31047733;
   4324 L_31046870:
   4325     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   4326 L_31047733:
   4327     eax = 0x31049AB0u; /* 0x31047733: mov eax, 0x31049ab0 */
   4328 L_31047738:
   4329     RECOMP_BACKEDGE();
   4330     goto L_31046870; /* 0x31047738: jmp 0x31046870 */
   4331     { RECOMP_REGS_OUT(); return; } /* end of function */
   4332   _ljump:
   4333     switch (_itail_tgt) {
   4334       case 0x31046870u: goto L_31046870;
   4335       case 0x31047733u: goto L_31047733;
   4336       case 0x31047738u: goto L_31047738;
   4337       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   4338     }
   4339     RECOMP_REGS_OUT();
   4340 }
   4341 
   4342 void sub_31047740(void) {
   4343     int _fpu_cmp = 0;
   4344     uint32_t _cf = 0;
   4345     int _df = 1;
   4346     uint32_t _flag_k = FK_NONE;
   4347     uint32_t _flag_a = 0, _flag_b = 0;
   4348     uint32_t _itail_tgt = 0;
   4349     RECOMP_REGS_LOCALS
   4350     RECOMP_ENTER(0x31047740u);
   4351 
   4352     goto L_31047740;
   4353 L_3100B670:
   4354     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   4355     ebp = esp; /* 0x3100B671: mov ebp, esp */
   4356     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   4357     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   4358     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   4359     PUSH32(esp, eax); /* 0x3100B680: push eax */
   4360     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   4361     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4362     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4363     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   4364     _flag_k = FK_CMP;
   4365     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   4366     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   4367     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   4368     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   4369     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   4370     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   4371     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   4372     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   4373     RECOMP_FLAGS_IN();
   4374     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   4375     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   4376     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   4377     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   4378     RECOMP_FLAGS_IN();
   4379     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4380     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   4381     _cf = 0;
   4382     _flag_k = FK_TEST;
   4383     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   4384     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   4385     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   4386     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   4387     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   4388     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   4389     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   4390     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4391     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   4392     _flag_k = FK_ADD;
   4393     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4394     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4395     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   4396     _flag_k = FK_ADD;
   4397     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   4398     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   4399     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4400     _flag_k = FK_CMP;
   4401     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   4402     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   4403     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   4404 L_3100B6D9:
   4405     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   4406     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   4407     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   4408     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4409     _flag_k = FK_CMP;
   4410     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   4411 L_3100B6DF:
   4412     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   4413     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   4414     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4415     _flag_k = FK_CMP;
   4416     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   4417 L_3100B6E3:
   4418     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   4419     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   4420     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   4421     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   4422     RECOMP_FLAGS_IN();
   4423     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   4424     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   4425     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   4426     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   4427     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   4428     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   4429     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   4430     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   4431     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   4432 L_3100B707:
   4433     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   4434     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4435     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4436     _flag_k = FK_CMP;
   4437     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   4438 L_3100B70B:
   4439     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   4440     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   4441     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   4442     RECOMP_FLAGS_IN();
   4443     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   4444     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   4445     PUSH32(esp, eax); /* 0x3100B719: push eax */
   4446     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   4447     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   4448     RECOMP_FLAGS_IN();
   4449     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   4450     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   4451     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4452     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4453     _flag_k = FK_CMP;
   4454     RECOMP_BACKEDGE();
   4455     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   4456 L_3100B728:
   4457     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4458     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   4459     _cf = 0;
   4460     _flag_k = FK_TEST;
   4461 L_3100B72A:
   4462     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   4463     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   4464     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   4465     RECOMP_FLAGS_IN();
   4466     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   4467     PUSH32(esp, edx); /* 0x3100B736: push edx */
   4468     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   4469     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   4470     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   4471     RECOMP_FLAGS_IN();
   4472     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   4473     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4474     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4475     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   4476     _flag_k = FK_ADD;
   4477     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   4478     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   4479     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   4480     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   4481     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   4482     esp = ebp; /* 0x3100B755: mov esp, ebp */
   4483     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   4484     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   4485 L_31047740:
   4486     ecx = ebp + (-0x74); /* 0x31047740: lea ecx, [ebp - 0x74] */
   4487     RECOMP_BACKEDGE();
   4488     goto L_3100B670; /* 0x31047743: jmp 0x3100b670 */
   4489     { RECOMP_REGS_OUT(); return; } /* end of function */
   4490     RECOMP_REGS_OUT();
   4491 }
   4492 
   4493 void sub_31047748(void) {
   4494     int _fpu_cmp = 0;
   4495     uint32_t _cf = 0;
   4496     int _df = 1;
   4497     uint32_t _flag_k = FK_NONE;
   4498     uint32_t _flag_a = 0, _flag_b = 0;
   4499     uint32_t _itail_tgt = 0;
   4500     RECOMP_REGS_LOCALS
   4501     RECOMP_ENTER(0x31047748u);
   4502 
   4503 L_31047748:
   4504     ecx = ebp + (-0x2C); /* 0x31047748: lea ecx, [ebp - 0x2c] */
   4505 L_3104774B:
   4506     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   4507     { RECOMP_REGS_OUT(); return; } /* end of function */
   4508   _ljump:
   4509     switch (_itail_tgt) {
   4510       case 0x31047748u: goto L_31047748;
   4511       case 0x3104774Bu: goto L_3104774B;
   4512       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   4513     }
   4514     RECOMP_REGS_OUT();
   4515 }
   4516 
   4517 void sub_31047751(void) {
   4518     int _fpu_cmp = 0;
   4519     uint32_t _cf = 0;
   4520     int _df = 1;
   4521     uint32_t _flag_k = FK_NONE;
   4522     uint32_t _flag_a = 0, _flag_b = 0;
   4523     uint32_t _itail_tgt = 0;
   4524     RECOMP_REGS_LOCALS
   4525     RECOMP_ENTER(0x31047751u);
   4526 
   4527 L_31047751:
   4528     ecx = ebp + (-0x1C); /* 0x31047751: lea ecx, [ebp - 0x1c] */
   4529 L_31047754:
   4530     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   4531     { RECOMP_REGS_OUT(); return; } /* end of function */
   4532   _ljump:
   4533     switch (_itail_tgt) {
   4534       case 0x31047751u: goto L_31047751;
   4535       case 0x31047754u: goto L_31047754;
   4536       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   4537     }
   4538     RECOMP_REGS_OUT();
   4539 }
   4540 
   4541 void sub_3104775A(void) {
   4542     int _fpu_cmp = 0;
   4543     uint32_t _cf = 0;
   4544     int _df = 1;
   4545     uint32_t _flag_k = FK_NONE;
   4546     uint32_t _flag_a = 0, _flag_b = 0;
   4547     uint32_t _itail_tgt = 0;
   4548     RECOMP_REGS_LOCALS
   4549     RECOMP_ENTER(0x3104775Au);
   4550 
   4551 L_3104775A:
   4552     eax = MEM32(ebp + (-0x30)); /* 0x3104775A: mov eax, dword ptr [ebp - 0x30] */
   4553 L_3104775D:
   4554     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   4555     eax = eax & 1; /* 0x3104775D: and eax, 1 */
   4556     _cf = 0;
   4557     _flag_k = FK_TEST;
   4558 L_31047760:
   4559     /* test eax, eax */ /* 0x31047760: test eax, eax */
   4560     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4561     _cf = 0;
   4562     _flag_k = FK_TEST;
   4563 L_31047762:
   4564     if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_31047771; /* 0x31047762: je 0x31047771 */
   4565 L_31047768:
   4566     ecx = MEM32(ebp + 0x8); /* 0x31047768: mov ecx, dword ptr [ebp + 8] */
   4567 L_3104776B:
   4568     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   4569 L_31047771:
   4570     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31047771: ret  */
   4571   _ljump:
   4572     switch (_itail_tgt) {
   4573       case 0x3104775Au: goto L_3104775A;
   4574       case 0x3104775Du: goto L_3104775D;
   4575       case 0x31047760u: goto L_31047760;
   4576       case 0x31047762u: goto L_31047762;
   4577       case 0x31047768u: goto L_31047768;
   4578       case 0x3104776Bu: goto L_3104776B;
   4579       case 0x31047771u: goto L_31047771;
   4580       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   4581     }
   4582     RECOMP_REGS_OUT();
   4583 }
   4584 
   4585 void sub_31047772(void) {
   4586     int _fpu_cmp = 0;
   4587     uint32_t _cf = 0;
   4588     int _df = 1;
   4589     uint32_t _flag_k = FK_NONE;
   4590     uint32_t _flag_a = 0, _flag_b = 0;
   4591     uint32_t _itail_tgt = 0;
   4592     RECOMP_REGS_LOCALS
   4593     RECOMP_ENTER(0x31047772u);
   4594 
   4595     goto L_31047772;
   4596 L_3100B790:
   4597     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   4598     ebp = esp; /* 0x3100B791: mov ebp, esp */
   4599     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4600     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4601     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   4602     _flag_k = FK_CMP;
   4603     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   4604     PUSH32(esp, esi); /* 0x3100B797: push esi */
   4605     esi = ecx; /* 0x3100B798: mov esi, ecx */
   4606     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   4607     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   4608     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   4609     _cf = 0;
   4610     _flag_k = FK_TEST;
   4611     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   4612     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   4613     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   4614     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   4615     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   4616 L_3100B7AA:
   4617     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   4618     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   4619     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   4620     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4621     _flag_k = FK_CMP;
   4622     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   4623 L_3100B7B0:
   4624     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   4625     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   4626     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4627     _flag_k = FK_CMP;
   4628     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   4629 L_3100B7B4:
   4630     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   4631     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   4632     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   4633     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4634     _flag_k = FK_CMP;
   4635     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   4636     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   4637 L_3100B7BE:
   4638     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   4639     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   4640     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   4641     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   4642     RECOMP_FLAGS_IN();
   4643     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   4644     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   4645     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   4646     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   4647     RECOMP_FLAGS_IN();
   4648     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   4649     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   4650     RECOMP_FLAGS_IN();
   4651     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   4652     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4653     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4654     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   4655     _flag_k = FK_ADD;
   4656     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   4657     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   4658     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4659     _flag_k = FK_CMP;
   4660     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   4661     RECOMP_BACKEDGE();
   4662     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   4663 L_3100B7E7:
   4664     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   4665     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   4666     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   4667     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   4668     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   4669     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   4670     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   4671     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   4672     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   4673     PUSH32(esp, eax); /* 0x3100B805: push eax */
   4674     ecx = esi; /* 0x3100B806: mov ecx, esi */
   4675     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   4676     RECOMP_FLAGS_IN();
   4677     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   4678 L_3100B80F:
   4679     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   4680     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4681     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4682     _flag_k = FK_CMP;
   4683     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   4684 L_3100B813:
   4685     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   4686     ebx = eax; /* 0x3100B816: mov ebx, eax */
   4687     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   4688     RECOMP_FLAGS_IN();
   4689     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   4690     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   4691     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   4692     ecx = esi; /* 0x3100B822: mov ecx, esi */
   4693     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   4694     RECOMP_FLAGS_IN();
   4695     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   4696     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   4697     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4698     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4699     _flag_k = FK_CMP;
   4700     RECOMP_BACKEDGE();
   4701     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   4702 L_3100B830:
   4703     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   4704     PUSH32(esp, edx); /* 0x3100B833: push edx */
   4705     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   4706     RECOMP_FLAGS_IN();
   4707     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   4708     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4709     edi = 0; /* 0x3100B83C: xor edi, edi */
   4710     _cf = 0;
   4711     _flag_k = FK_TEST;
   4712     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   4713     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   4714     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   4715     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   4716     RECOMP_FLAGS_IN();
   4717     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4718     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4719     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   4720     _flag_k = FK_ADD;
   4721     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   4722     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   4723     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   4724     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   4725     esp = ebp; /* 0x3100B853: mov esp, ebp */
   4726     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   4727     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   4728 L_31047772:
   4729     ecx = ebp + (-0x70); /* 0x31047772: lea ecx, [ebp - 0x70] */
   4730     RECOMP_BACKEDGE();
   4731     goto L_3100B790; /* 0x31047775: jmp 0x3100b790 */
   4732     { RECOMP_REGS_OUT(); return; } /* end of function */
   4733     RECOMP_REGS_OUT();
   4734 }
   4735 
   4736 void sub_3104777A(void) {
   4737     int _fpu_cmp = 0;
   4738     uint32_t _cf = 0;
   4739     int _df = 1;
   4740     uint32_t _flag_k = FK_NONE;
   4741     uint32_t _flag_a = 0, _flag_b = 0;
   4742     uint32_t _itail_tgt = 0;
   4743     RECOMP_REGS_LOCALS
   4744     RECOMP_ENTER(0x3104777Au);
   4745 
   4746     goto L_3104777A;
   4747 L_31004880:
   4748     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   4749     ebp = esp; /* 0x31004881: mov ebp, esp */
   4750     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   4751     PUSH32(esp, esi); /* 0x31004884: push esi */
   4752     esi = ecx; /* 0x31004885: mov esi, ecx */
   4753     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   4754     PUSH32(esp, eax); /* 0x3100488A: push eax */
   4755     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   4756     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   4757     RECOMP_FLAGS_IN();
   4758     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4759     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4760     esp = esp + 4; /* 0x31004893: add esp, 4 */
   4761     _flag_k = FK_ADD;
   4762     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4763     eax = 0; /* 0x31004896: xor eax, eax */
   4764     _cf = 0;
   4765     _flag_k = FK_TEST;
   4766     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   4767     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   4768     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   4769     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   4770     esp = ebp; /* 0x310048A2: mov esp, ebp */
   4771     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   4772     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   4773 L_3104777A:
   4774     ecx = ebp + (-0x44); /* 0x3104777A: lea ecx, [ebp - 0x44] */
   4775     RECOMP_BACKEDGE();
   4776     goto L_31004880; /* 0x3104777D: jmp 0x31004880 */
   4777     { RECOMP_REGS_OUT(); return; } /* end of function */
   4778     RECOMP_REGS_OUT();
   4779 }
   4780 
   4781 void sub_31047782(void) {
   4782     int _fpu_cmp = 0;
   4783     uint32_t _cf = 0;
   4784     int _df = 1;
   4785     uint32_t _flag_k = FK_NONE;
   4786     uint32_t _flag_a = 0, _flag_b = 0;
   4787     uint32_t _itail_tgt = 0;
   4788     RECOMP_REGS_LOCALS
   4789     RECOMP_ENTER(0x31047782u);
   4790 
   4791     goto L_31047782;
   4792 L_31046870:
   4793     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   4794 L_31047782:
   4795     eax = 0x31049B18u; /* 0x31047782: mov eax, 0x31049b18 */
   4796 L_31047787:
   4797     RECOMP_BACKEDGE();
   4798     goto L_31046870; /* 0x31047787: jmp 0x31046870 */
   4799     { RECOMP_REGS_OUT(); return; } /* end of function */
   4800   _ljump:
   4801     switch (_itail_tgt) {
   4802       case 0x31046870u: goto L_31046870;
   4803       case 0x31047782u: goto L_31047782;
   4804       case 0x31047787u: goto L_31047787;
   4805       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   4806     }
   4807     RECOMP_REGS_OUT();
   4808 }
   4809 
   4810 void sub_31047790(void) {
   4811     int _fpu_cmp = 0;
   4812     uint32_t _cf = 0;
   4813     int _df = 1;
   4814     uint32_t _flag_k = FK_NONE;
   4815     uint32_t _flag_a = 0, _flag_b = 0;
   4816     uint32_t _itail_tgt = 0;
   4817     RECOMP_REGS_LOCALS
   4818     RECOMP_ENTER(0x31047790u);
   4819 
   4820 L_31047790:
   4821     eax = MEM32(ebp + (-0x14)); /* 0x31047790: mov eax, dword ptr [ebp - 0x14] */
   4822 L_31047793:
   4823     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   4824     eax = eax & 1; /* 0x31047793: and eax, 1 */
   4825     _cf = 0;
   4826     _flag_k = FK_TEST;
   4827 L_31047796:
   4828     /* test eax, eax */ /* 0x31047796: test eax, eax */
   4829     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   4830     _cf = 0;
   4831     _flag_k = FK_TEST;
   4832 L_31047798:
   4833     if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_310477A7; /* 0x31047798: je 0x310477a7 */
   4834 L_3104779E:
   4835     ecx = MEM32(ebp + 0x8); /* 0x3104779E: mov ecx, dword ptr [ebp + 8] */
   4836 L_310477A1:
   4837     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   4838 L_310477A7:
   4839     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310477A7: ret  */
   4840   _ljump:
   4841     switch (_itail_tgt) {
   4842       case 0x31047790u: goto L_31047790;
   4843       case 0x31047793u: goto L_31047793;
   4844       case 0x31047796u: goto L_31047796;
   4845       case 0x31047798u: goto L_31047798;
   4846       case 0x3104779Eu: goto L_3104779E;
   4847       case 0x310477A1u: goto L_310477A1;
   4848       case 0x310477A7u: goto L_310477A7;
   4849       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   4850     }
   4851     RECOMP_REGS_OUT();
   4852 }
   4853 
   4854 void sub_310477A8(void) {
   4855     int _fpu_cmp = 0;
   4856     uint32_t _cf = 0;
   4857     int _df = 1;
   4858     uint32_t _flag_k = FK_NONE;
   4859     uint32_t _flag_a = 0, _flag_b = 0;
   4860     uint32_t _itail_tgt = 0;
   4861     RECOMP_REGS_LOCALS
   4862     RECOMP_ENTER(0x310477A8u);
   4863 
   4864     goto L_310477A8;
   4865 L_3100B670:
   4866     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   4867     ebp = esp; /* 0x3100B671: mov ebp, esp */
   4868     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   4869     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   4870     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   4871     PUSH32(esp, eax); /* 0x3100B680: push eax */
   4872     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   4873     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4874     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4875     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   4876     _flag_k = FK_CMP;
   4877     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   4878     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   4879     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   4880     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   4881     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   4882     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   4883     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   4884     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   4885     RECOMP_FLAGS_IN();
   4886     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   4887     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   4888     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   4889     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   4890     RECOMP_FLAGS_IN();
   4891     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4892     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   4893     _cf = 0;
   4894     _flag_k = FK_TEST;
   4895     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   4896     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   4897     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   4898     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   4899     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   4900     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   4901     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   4902     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4903     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   4904     _flag_k = FK_ADD;
   4905     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   4906     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4907     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   4908     _flag_k = FK_ADD;
   4909     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   4910     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   4911     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4912     _flag_k = FK_CMP;
   4913     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   4914     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   4915     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   4916 L_3100B6D9:
   4917     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   4918     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   4919     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   4920     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4921     _flag_k = FK_CMP;
   4922     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   4923 L_3100B6DF:
   4924     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   4925     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   4926     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4927     _flag_k = FK_CMP;
   4928     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   4929 L_3100B6E3:
   4930     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   4931     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   4932     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   4933     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   4934     RECOMP_FLAGS_IN();
   4935     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   4936     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   4937     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   4938     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   4939     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   4940     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   4941     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   4942     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   4943     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   4944 L_3100B707:
   4945     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   4946     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4947     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4948     _flag_k = FK_CMP;
   4949     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   4950 L_3100B70B:
   4951     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   4952     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   4953     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   4954     RECOMP_FLAGS_IN();
   4955     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   4956     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   4957     PUSH32(esp, eax); /* 0x3100B719: push eax */
   4958     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   4959     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   4960     RECOMP_FLAGS_IN();
   4961     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   4962     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   4963     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   4964     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   4965     _flag_k = FK_CMP;
   4966     RECOMP_BACKEDGE();
   4967     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   4968 L_3100B728:
   4969     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   4970     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   4971     _cf = 0;
   4972     _flag_k = FK_TEST;
   4973 L_3100B72A:
   4974     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   4975     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   4976     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   4977     RECOMP_FLAGS_IN();
   4978     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   4979     PUSH32(esp, edx); /* 0x3100B736: push edx */
   4980     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   4981     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   4982     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   4983     RECOMP_FLAGS_IN();
   4984     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   4985     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   4986     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   4987     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   4988     _flag_k = FK_ADD;
   4989     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   4990     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   4991     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   4992     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   4993     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   4994     esp = ebp; /* 0x3100B755: mov esp, ebp */
   4995     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   4996     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   4997 L_310477A8:
   4998     ecx = ebp + (-0x74); /* 0x310477A8: lea ecx, [ebp - 0x74] */
   4999     RECOMP_BACKEDGE();
   5000     goto L_3100B670; /* 0x310477AB: jmp 0x3100b670 */
   5001     { RECOMP_REGS_OUT(); return; } /* end of function */
   5002     RECOMP_REGS_OUT();
   5003 }
   5004 
   5005 void sub_310477B0(void) {
   5006     int _fpu_cmp = 0;
   5007     uint32_t _cf = 0;
   5008     int _df = 1;
   5009     uint32_t _flag_k = FK_NONE;
   5010     uint32_t _flag_a = 0, _flag_b = 0;
   5011     uint32_t _itail_tgt = 0;
   5012     RECOMP_REGS_LOCALS
   5013     RECOMP_ENTER(0x310477B0u);
   5014 
   5015 L_310477B0:
   5016     ecx = ebp + (-0x34); /* 0x310477B0: lea ecx, [ebp - 0x34] */
   5017 L_310477B3:
   5018     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   5019     { RECOMP_REGS_OUT(); return; } /* end of function */
   5020   _ljump:
   5021     switch (_itail_tgt) {
   5022       case 0x310477B0u: goto L_310477B0;
   5023       case 0x310477B3u: goto L_310477B3;
   5024       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   5025     }
   5026     RECOMP_REGS_OUT();
   5027 }
   5028 
   5029 void sub_310477B9(void) {
   5030     int _fpu_cmp = 0;
   5031     uint32_t _cf = 0;
   5032     int _df = 1;
   5033     uint32_t _flag_k = FK_NONE;
   5034     uint32_t _flag_a = 0, _flag_b = 0;
   5035     uint32_t _itail_tgt = 0;
   5036     RECOMP_REGS_LOCALS
   5037     RECOMP_ENTER(0x310477B9u);
   5038 
   5039 L_310477B9:
   5040     ecx = ebp + (-0x24); /* 0x310477B9: lea ecx, [ebp - 0x24] */
   5041 L_310477BC:
   5042     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   5043     { RECOMP_REGS_OUT(); return; } /* end of function */
   5044   _ljump:
   5045     switch (_itail_tgt) {
   5046       case 0x310477B9u: goto L_310477B9;
   5047       case 0x310477BCu: goto L_310477BC;
   5048       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   5049     }
   5050     RECOMP_REGS_OUT();
   5051 }
   5052 
   5053 void sub_310477C2(void) {
   5054     int _fpu_cmp = 0;
   5055     uint32_t _cf = 0;
   5056     int _df = 1;
   5057     uint32_t _flag_k = FK_NONE;
   5058     uint32_t _flag_a = 0, _flag_b = 0;
   5059     uint32_t _itail_tgt = 0;
   5060     RECOMP_REGS_LOCALS
   5061     RECOMP_ENTER(0x310477C2u);
   5062 
   5063     goto L_310477C2;
   5064 L_3100B790:
   5065     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   5066     ebp = esp; /* 0x3100B791: mov ebp, esp */
   5067     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5068     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5069     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   5070     _flag_k = FK_CMP;
   5071     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   5072     PUSH32(esp, esi); /* 0x3100B797: push esi */
   5073     esi = ecx; /* 0x3100B798: mov esi, ecx */
   5074     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   5075     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   5076     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   5077     _cf = 0;
   5078     _flag_k = FK_TEST;
   5079     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   5080     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   5081     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   5082     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   5083     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   5084 L_3100B7AA:
   5085     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   5086     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   5087     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   5088     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5089     _flag_k = FK_CMP;
   5090     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   5091 L_3100B7B0:
   5092     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   5093     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   5094     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5095     _flag_k = FK_CMP;
   5096     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   5097 L_3100B7B4:
   5098     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   5099     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   5100     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   5101     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5102     _flag_k = FK_CMP;
   5103     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   5104     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   5105 L_3100B7BE:
   5106     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   5107     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   5108     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   5109     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   5110     RECOMP_FLAGS_IN();
   5111     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   5112     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   5113     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   5114     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   5115     RECOMP_FLAGS_IN();
   5116     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   5117     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   5118     RECOMP_FLAGS_IN();
   5119     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   5120     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5121     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5122     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   5123     _flag_k = FK_ADD;
   5124     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   5125     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   5126     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5127     _flag_k = FK_CMP;
   5128     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   5129     RECOMP_BACKEDGE();
   5130     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   5131 L_3100B7E7:
   5132     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   5133     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   5134     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   5135     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   5136     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   5137     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   5138     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   5139     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   5140     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   5141     PUSH32(esp, eax); /* 0x3100B805: push eax */
   5142     ecx = esi; /* 0x3100B806: mov ecx, esi */
   5143     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   5144     RECOMP_FLAGS_IN();
   5145     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   5146 L_3100B80F:
   5147     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   5148     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5149     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5150     _flag_k = FK_CMP;
   5151     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   5152 L_3100B813:
   5153     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   5154     ebx = eax; /* 0x3100B816: mov ebx, eax */
   5155     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   5156     RECOMP_FLAGS_IN();
   5157     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   5158     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   5159     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   5160     ecx = esi; /* 0x3100B822: mov ecx, esi */
   5161     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   5162     RECOMP_FLAGS_IN();
   5163     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   5164     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   5165     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5166     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5167     _flag_k = FK_CMP;
   5168     RECOMP_BACKEDGE();
   5169     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   5170 L_3100B830:
   5171     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   5172     PUSH32(esp, edx); /* 0x3100B833: push edx */
   5173     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   5174     RECOMP_FLAGS_IN();
   5175     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   5176     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5177     edi = 0; /* 0x3100B83C: xor edi, edi */
   5178     _cf = 0;
   5179     _flag_k = FK_TEST;
   5180     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   5181     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   5182     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   5183     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   5184     RECOMP_FLAGS_IN();
   5185     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5186     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5187     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   5188     _flag_k = FK_ADD;
   5189     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   5190     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   5191     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   5192     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   5193     esp = ebp; /* 0x3100B853: mov esp, ebp */
   5194     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   5195     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   5196 L_310477C2:
   5197     ecx = ebp + (-0x70); /* 0x310477C2: lea ecx, [ebp - 0x70] */
   5198     RECOMP_BACKEDGE();
   5199     goto L_3100B790; /* 0x310477C5: jmp 0x3100b790 */
   5200     { RECOMP_REGS_OUT(); return; } /* end of function */
   5201     RECOMP_REGS_OUT();
   5202 }
   5203 
   5204 void sub_310477CA(void) {
   5205     int _fpu_cmp = 0;
   5206     uint32_t _cf = 0;
   5207     int _df = 1;
   5208     uint32_t _flag_k = FK_NONE;
   5209     uint32_t _flag_a = 0, _flag_b = 0;
   5210     uint32_t _itail_tgt = 0;
   5211     RECOMP_REGS_LOCALS
   5212     RECOMP_ENTER(0x310477CAu);
   5213 
   5214     goto L_310477CA;
   5215 L_31004880:
   5216     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   5217     ebp = esp; /* 0x31004881: mov ebp, esp */
   5218     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   5219     PUSH32(esp, esi); /* 0x31004884: push esi */
   5220     esi = ecx; /* 0x31004885: mov esi, ecx */
   5221     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   5222     PUSH32(esp, eax); /* 0x3100488A: push eax */
   5223     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   5224     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   5225     RECOMP_FLAGS_IN();
   5226     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5227     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5228     esp = esp + 4; /* 0x31004893: add esp, 4 */
   5229     _flag_k = FK_ADD;
   5230     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5231     eax = 0; /* 0x31004896: xor eax, eax */
   5232     _cf = 0;
   5233     _flag_k = FK_TEST;
   5234     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   5235     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   5236     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   5237     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   5238     esp = ebp; /* 0x310048A2: mov esp, ebp */
   5239     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   5240     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   5241 L_310477CA:
   5242     ecx = ebp + (-0x44); /* 0x310477CA: lea ecx, [ebp - 0x44] */
   5243     RECOMP_BACKEDGE();
   5244     goto L_31004880; /* 0x310477CD: jmp 0x31004880 */
   5245     { RECOMP_REGS_OUT(); return; } /* end of function */
   5246     RECOMP_REGS_OUT();
   5247 }
   5248 
   5249 void sub_310477D2(void) {
   5250     int _fpu_cmp = 0;
   5251     uint32_t _cf = 0;
   5252     int _df = 1;
   5253     uint32_t _flag_k = FK_NONE;
   5254     uint32_t _flag_a = 0, _flag_b = 0;
   5255     uint32_t _itail_tgt = 0;
   5256     RECOMP_REGS_LOCALS
   5257     RECOMP_ENTER(0x310477D2u);
   5258 
   5259     goto L_310477D2;
   5260 L_31046870:
   5261     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   5262 L_310477D2:
   5263     eax = 0x31049B68u; /* 0x310477D2: mov eax, 0x31049b68 */
   5264 L_310477D7:
   5265     RECOMP_BACKEDGE();
   5266     goto L_31046870; /* 0x310477D7: jmp 0x31046870 */
   5267     { RECOMP_REGS_OUT(); return; } /* end of function */
   5268   _ljump:
   5269     switch (_itail_tgt) {
   5270       case 0x31046870u: goto L_31046870;
   5271       case 0x310477D2u: goto L_310477D2;
   5272       case 0x310477D7u: goto L_310477D7;
   5273       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   5274     }
   5275     RECOMP_REGS_OUT();
   5276 }
   5277 
   5278 void sub_310477E0(void) {
   5279     int _fpu_cmp = 0;
   5280     uint32_t _cf = 0;
   5281     int _df = 1;
   5282     uint32_t _flag_k = FK_NONE;
   5283     uint32_t _flag_a = 0, _flag_b = 0;
   5284     uint32_t _itail_tgt = 0;
   5285     RECOMP_REGS_LOCALS
   5286     RECOMP_ENTER(0x310477E0u);
   5287 
   5288     goto L_310477E0;
   5289 L_3100B670:
   5290     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   5291     ebp = esp; /* 0x3100B671: mov ebp, esp */
   5292     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   5293     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   5294     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   5295     PUSH32(esp, eax); /* 0x3100B680: push eax */
   5296     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   5297     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5298     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5299     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   5300     _flag_k = FK_CMP;
   5301     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   5302     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   5303     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   5304     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   5305     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   5306     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   5307     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   5308     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   5309     RECOMP_FLAGS_IN();
   5310     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   5311     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   5312     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   5313     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   5314     RECOMP_FLAGS_IN();
   5315     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5316     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   5317     _cf = 0;
   5318     _flag_k = FK_TEST;
   5319     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   5320     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   5321     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   5322     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   5323     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   5324     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   5325     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   5326     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5327     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   5328     _flag_k = FK_ADD;
   5329     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5330     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5331     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   5332     _flag_k = FK_ADD;
   5333     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   5334     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   5335     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5336     _flag_k = FK_CMP;
   5337     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   5338     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   5339     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   5340 L_3100B6D9:
   5341     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   5342     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   5343     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   5344     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5345     _flag_k = FK_CMP;
   5346     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   5347 L_3100B6DF:
   5348     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   5349     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   5350     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5351     _flag_k = FK_CMP;
   5352     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   5353 L_3100B6E3:
   5354     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   5355     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   5356     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   5357     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   5358     RECOMP_FLAGS_IN();
   5359     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   5360     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   5361     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   5362     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   5363     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   5364     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   5365     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   5366     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   5367     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   5368 L_3100B707:
   5369     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   5370     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5371     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5372     _flag_k = FK_CMP;
   5373     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   5374 L_3100B70B:
   5375     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   5376     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   5377     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   5378     RECOMP_FLAGS_IN();
   5379     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   5380     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   5381     PUSH32(esp, eax); /* 0x3100B719: push eax */
   5382     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   5383     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   5384     RECOMP_FLAGS_IN();
   5385     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   5386     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   5387     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5388     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5389     _flag_k = FK_CMP;
   5390     RECOMP_BACKEDGE();
   5391     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   5392 L_3100B728:
   5393     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5394     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   5395     _cf = 0;
   5396     _flag_k = FK_TEST;
   5397 L_3100B72A:
   5398     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   5399     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   5400     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   5401     RECOMP_FLAGS_IN();
   5402     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   5403     PUSH32(esp, edx); /* 0x3100B736: push edx */
   5404     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   5405     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   5406     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   5407     RECOMP_FLAGS_IN();
   5408     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   5409     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5410     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5411     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   5412     _flag_k = FK_ADD;
   5413     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   5414     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   5415     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   5416     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   5417     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   5418     esp = ebp; /* 0x3100B755: mov esp, ebp */
   5419     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   5420     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   5421 L_310477E0:
   5422     ecx = ebp + (-0x70); /* 0x310477E0: lea ecx, [ebp - 0x70] */
   5423     RECOMP_BACKEDGE();
   5424     goto L_3100B670; /* 0x310477E3: jmp 0x3100b670 */
   5425     { RECOMP_REGS_OUT(); return; } /* end of function */
   5426     RECOMP_REGS_OUT();
   5427 }
   5428 
   5429 void sub_310477E8(void) {
   5430     int _fpu_cmp = 0;
   5431     uint32_t _cf = 0;
   5432     int _df = 1;
   5433     uint32_t _flag_k = FK_NONE;
   5434     uint32_t _flag_a = 0, _flag_b = 0;
   5435     uint32_t _itail_tgt = 0;
   5436     RECOMP_REGS_LOCALS
   5437     RECOMP_ENTER(0x310477E8u);
   5438 
   5439 L_310477E8:
   5440     ecx = ebp + (-0x30); /* 0x310477E8: lea ecx, [ebp - 0x30] */
   5441 L_310477EB:
   5442     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   5443     { RECOMP_REGS_OUT(); return; } /* end of function */
   5444   _ljump:
   5445     switch (_itail_tgt) {
   5446       case 0x310477E8u: goto L_310477E8;
   5447       case 0x310477EBu: goto L_310477EB;
   5448       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   5449     }
   5450     RECOMP_REGS_OUT();
   5451 }
   5452 
   5453 void sub_310477F1(void) {
   5454     int _fpu_cmp = 0;
   5455     uint32_t _cf = 0;
   5456     int _df = 1;
   5457     uint32_t _flag_k = FK_NONE;
   5458     uint32_t _flag_a = 0, _flag_b = 0;
   5459     uint32_t _itail_tgt = 0;
   5460     RECOMP_REGS_LOCALS
   5461     RECOMP_ENTER(0x310477F1u);
   5462 
   5463 L_310477F1:
   5464     ecx = ebp + (-0x20); /* 0x310477F1: lea ecx, [ebp - 0x20] */
   5465 L_310477F4:
   5466     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   5467     { RECOMP_REGS_OUT(); return; } /* end of function */
   5468   _ljump:
   5469     switch (_itail_tgt) {
   5470       case 0x310477F1u: goto L_310477F1;
   5471       case 0x310477F4u: goto L_310477F4;
   5472       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   5473     }
   5474     RECOMP_REGS_OUT();
   5475 }
   5476 
   5477 void sub_310477FA(void) {
   5478     int _fpu_cmp = 0;
   5479     uint32_t _cf = 0;
   5480     int _df = 1;
   5481     uint32_t _flag_k = FK_NONE;
   5482     uint32_t _flag_a = 0, _flag_b = 0;
   5483     uint32_t _itail_tgt = 0;
   5484     RECOMP_REGS_LOCALS
   5485     RECOMP_ENTER(0x310477FAu);
   5486 
   5487 L_310477FA:
   5488     eax = MEM32(ebp + (-0x10)); /* 0x310477FA: mov eax, dword ptr [ebp - 0x10] */
   5489 L_310477FD:
   5490     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   5491     eax = eax & 1; /* 0x310477FD: and eax, 1 */
   5492     _cf = 0;
   5493     _flag_k = FK_TEST;
   5494 L_31047800:
   5495     /* test eax, eax */ /* 0x31047800: test eax, eax */
   5496     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5497     _cf = 0;
   5498     _flag_k = FK_TEST;
   5499 L_31047802:
   5500     if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_31047811; /* 0x31047802: je 0x31047811 */
   5501 L_31047808:
   5502     ecx = MEM32(ebp + 0x8); /* 0x31047808: mov ecx, dword ptr [ebp + 8] */
   5503 L_3104780B:
   5504     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   5505 L_31047811:
   5506     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31047811: ret  */
   5507   _ljump:
   5508     switch (_itail_tgt) {
   5509       case 0x310477FAu: goto L_310477FA;
   5510       case 0x310477FDu: goto L_310477FD;
   5511       case 0x31047800u: goto L_31047800;
   5512       case 0x31047802u: goto L_31047802;
   5513       case 0x31047808u: goto L_31047808;
   5514       case 0x3104780Bu: goto L_3104780B;
   5515       case 0x31047811u: goto L_31047811;
   5516       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   5517     }
   5518     RECOMP_REGS_OUT();
   5519 }
   5520 
   5521 void sub_31047812(void) {
   5522     int _fpu_cmp = 0;
   5523     uint32_t _cf = 0;
   5524     int _df = 1;
   5525     uint32_t _flag_k = FK_NONE;
   5526     uint32_t _flag_a = 0, _flag_b = 0;
   5527     uint32_t _itail_tgt = 0;
   5528     RECOMP_REGS_LOCALS
   5529     RECOMP_ENTER(0x31047812u);
   5530 
   5531     goto L_31047812;
   5532 L_3100B790:
   5533     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   5534     ebp = esp; /* 0x3100B791: mov ebp, esp */
   5535     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5536     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5537     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   5538     _flag_k = FK_CMP;
   5539     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   5540     PUSH32(esp, esi); /* 0x3100B797: push esi */
   5541     esi = ecx; /* 0x3100B798: mov esi, ecx */
   5542     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   5543     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   5544     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   5545     _cf = 0;
   5546     _flag_k = FK_TEST;
   5547     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   5548     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   5549     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   5550     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   5551     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   5552 L_3100B7AA:
   5553     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   5554     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   5555     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   5556     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5557     _flag_k = FK_CMP;
   5558     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   5559 L_3100B7B0:
   5560     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   5561     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   5562     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5563     _flag_k = FK_CMP;
   5564     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   5565 L_3100B7B4:
   5566     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   5567     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   5568     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   5569     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5570     _flag_k = FK_CMP;
   5571     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   5572     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   5573 L_3100B7BE:
   5574     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   5575     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   5576     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   5577     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   5578     RECOMP_FLAGS_IN();
   5579     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   5580     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   5581     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   5582     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   5583     RECOMP_FLAGS_IN();
   5584     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   5585     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   5586     RECOMP_FLAGS_IN();
   5587     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   5588     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5589     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5590     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   5591     _flag_k = FK_ADD;
   5592     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   5593     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   5594     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5595     _flag_k = FK_CMP;
   5596     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   5597     RECOMP_BACKEDGE();
   5598     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   5599 L_3100B7E7:
   5600     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   5601     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   5602     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   5603     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   5604     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   5605     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   5606     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   5607     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   5608     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   5609     PUSH32(esp, eax); /* 0x3100B805: push eax */
   5610     ecx = esi; /* 0x3100B806: mov ecx, esi */
   5611     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   5612     RECOMP_FLAGS_IN();
   5613     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   5614 L_3100B80F:
   5615     /* cmp eax, edi */ /* 0x3100B80F: 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     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   5620 L_3100B813:
   5621     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   5622     ebx = eax; /* 0x3100B816: mov ebx, eax */
   5623     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   5624     RECOMP_FLAGS_IN();
   5625     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   5626     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   5627     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   5628     ecx = esi; /* 0x3100B822: mov ecx, esi */
   5629     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   5630     RECOMP_FLAGS_IN();
   5631     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   5632     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   5633     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5634     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5635     _flag_k = FK_CMP;
   5636     RECOMP_BACKEDGE();
   5637     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   5638 L_3100B830:
   5639     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   5640     PUSH32(esp, edx); /* 0x3100B833: push edx */
   5641     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   5642     RECOMP_FLAGS_IN();
   5643     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   5644     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5645     edi = 0; /* 0x3100B83C: xor edi, edi */
   5646     _cf = 0;
   5647     _flag_k = FK_TEST;
   5648     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   5649     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   5650     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   5651     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   5652     RECOMP_FLAGS_IN();
   5653     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5654     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5655     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   5656     _flag_k = FK_ADD;
   5657     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   5658     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   5659     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   5660     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   5661     esp = ebp; /* 0x3100B853: mov esp, ebp */
   5662     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   5663     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   5664 L_31047812:
   5665     ecx = ebp + (-0x6C); /* 0x31047812: lea ecx, [ebp - 0x6c] */
   5666     RECOMP_BACKEDGE();
   5667     goto L_3100B790; /* 0x31047815: jmp 0x3100b790 */
   5668     { RECOMP_REGS_OUT(); return; } /* end of function */
   5669     RECOMP_REGS_OUT();
   5670 }
   5671 
   5672 void sub_3104781A(void) {
   5673     int _fpu_cmp = 0;
   5674     uint32_t _cf = 0;
   5675     int _df = 1;
   5676     uint32_t _flag_k = FK_NONE;
   5677     uint32_t _flag_a = 0, _flag_b = 0;
   5678     uint32_t _itail_tgt = 0;
   5679     RECOMP_REGS_LOCALS
   5680     RECOMP_ENTER(0x3104781Au);
   5681 
   5682     goto L_3104781A;
   5683 L_31004880:
   5684     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   5685     ebp = esp; /* 0x31004881: mov ebp, esp */
   5686     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   5687     PUSH32(esp, esi); /* 0x31004884: push esi */
   5688     esi = ecx; /* 0x31004885: mov esi, ecx */
   5689     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   5690     PUSH32(esp, eax); /* 0x3100488A: push eax */
   5691     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   5692     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   5693     RECOMP_FLAGS_IN();
   5694     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5695     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5696     esp = esp + 4; /* 0x31004893: add esp, 4 */
   5697     _flag_k = FK_ADD;
   5698     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5699     eax = 0; /* 0x31004896: xor eax, eax */
   5700     _cf = 0;
   5701     _flag_k = FK_TEST;
   5702     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   5703     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   5704     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   5705     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   5706     esp = ebp; /* 0x310048A2: mov esp, ebp */
   5707     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   5708     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   5709 L_3104781A:
   5710     ecx = ebp + (-0x40); /* 0x3104781A: lea ecx, [ebp - 0x40] */
   5711     RECOMP_BACKEDGE();
   5712     goto L_31004880; /* 0x3104781D: jmp 0x31004880 */
   5713     { RECOMP_REGS_OUT(); return; } /* end of function */
   5714     RECOMP_REGS_OUT();
   5715 }
   5716 
   5717 void sub_31047822(void) {
   5718     int _fpu_cmp = 0;
   5719     uint32_t _cf = 0;
   5720     int _df = 1;
   5721     uint32_t _flag_k = FK_NONE;
   5722     uint32_t _flag_a = 0, _flag_b = 0;
   5723     uint32_t _itail_tgt = 0;
   5724     RECOMP_REGS_LOCALS
   5725     RECOMP_ENTER(0x31047822u);
   5726 
   5727     goto L_31047822;
   5728 L_31046870:
   5729     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   5730 L_31047822:
   5731     eax = 0x31049BB8u; /* 0x31047822: mov eax, 0x31049bb8 */
   5732 L_31047827:
   5733     RECOMP_BACKEDGE();
   5734     goto L_31046870; /* 0x31047827: jmp 0x31046870 */
   5735     { RECOMP_REGS_OUT(); return; } /* end of function */
   5736   _ljump:
   5737     switch (_itail_tgt) {
   5738       case 0x31046870u: goto L_31046870;
   5739       case 0x31047822u: goto L_31047822;
   5740       case 0x31047827u: goto L_31047827;
   5741       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   5742     }
   5743     RECOMP_REGS_OUT();
   5744 }
   5745 
   5746 void sub_31047830(void) {
   5747     int _fpu_cmp = 0;
   5748     uint32_t _cf = 0;
   5749     int _df = 1;
   5750     uint32_t _flag_k = FK_NONE;
   5751     uint32_t _flag_a = 0, _flag_b = 0;
   5752     uint32_t _itail_tgt = 0;
   5753     RECOMP_REGS_LOCALS
   5754     RECOMP_ENTER(0x31047830u);
   5755 
   5756 L_31047830:
   5757     eax = MEM32(ebp + (-0x14)); /* 0x31047830: mov eax, dword ptr [ebp - 0x14] */
   5758 L_31047833:
   5759     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   5760     eax = eax & 1; /* 0x31047833: and eax, 1 */
   5761     _cf = 0;
   5762     _flag_k = FK_TEST;
   5763 L_31047836:
   5764     /* test eax, eax */ /* 0x31047836: test eax, eax */
   5765     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   5766     _cf = 0;
   5767     _flag_k = FK_TEST;
   5768 L_31047838:
   5769     if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_31047847; /* 0x31047838: je 0x31047847 */
   5770 L_3104783E:
   5771     ecx = MEM32(ebp + 0x8); /* 0x3104783E: mov ecx, dword ptr [ebp + 8] */
   5772 L_31047841:
   5773     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   5774 L_31047847:
   5775     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31047847: ret  */
   5776   _ljump:
   5777     switch (_itail_tgt) {
   5778       case 0x31047830u: goto L_31047830;
   5779       case 0x31047833u: goto L_31047833;
   5780       case 0x31047836u: goto L_31047836;
   5781       case 0x31047838u: goto L_31047838;
   5782       case 0x3104783Eu: goto L_3104783E;
   5783       case 0x31047841u: goto L_31047841;
   5784       case 0x31047847u: goto L_31047847;
   5785       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   5786     }
   5787     RECOMP_REGS_OUT();
   5788 }
   5789 
   5790 void sub_31047848(void) {
   5791     int _fpu_cmp = 0;
   5792     uint32_t _cf = 0;
   5793     int _df = 1;
   5794     uint32_t _flag_k = FK_NONE;
   5795     uint32_t _flag_a = 0, _flag_b = 0;
   5796     uint32_t _itail_tgt = 0;
   5797     RECOMP_REGS_LOCALS
   5798     RECOMP_ENTER(0x31047848u);
   5799 
   5800     goto L_31047848;
   5801 L_3100B670:
   5802     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   5803     ebp = esp; /* 0x3100B671: mov ebp, esp */
   5804     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   5805     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   5806     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   5807     PUSH32(esp, eax); /* 0x3100B680: push eax */
   5808     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   5809     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5810     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5811     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   5812     _flag_k = FK_CMP;
   5813     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   5814     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   5815     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   5816     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   5817     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   5818     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   5819     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   5820     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   5821     RECOMP_FLAGS_IN();
   5822     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   5823     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   5824     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   5825     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   5826     RECOMP_FLAGS_IN();
   5827     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5828     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   5829     _cf = 0;
   5830     _flag_k = FK_TEST;
   5831     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   5832     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   5833     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   5834     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   5835     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   5836     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   5837     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   5838     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5839     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   5840     _flag_k = FK_ADD;
   5841     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   5842     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5843     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   5844     _flag_k = FK_ADD;
   5845     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   5846     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   5847     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5848     _flag_k = FK_CMP;
   5849     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   5850     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   5851     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   5852 L_3100B6D9:
   5853     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   5854     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   5855     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   5856     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5857     _flag_k = FK_CMP;
   5858     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   5859 L_3100B6DF:
   5860     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   5861     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   5862     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5863     _flag_k = FK_CMP;
   5864     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   5865 L_3100B6E3:
   5866     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   5867     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   5868     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   5869     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   5870     RECOMP_FLAGS_IN();
   5871     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   5872     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   5873     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   5874     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   5875     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   5876     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   5877     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   5878     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   5879     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   5880 L_3100B707:
   5881     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   5882     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5883     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5884     _flag_k = FK_CMP;
   5885     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   5886 L_3100B70B:
   5887     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   5888     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   5889     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   5890     RECOMP_FLAGS_IN();
   5891     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   5892     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   5893     PUSH32(esp, eax); /* 0x3100B719: push eax */
   5894     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   5895     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   5896     RECOMP_FLAGS_IN();
   5897     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   5898     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   5899     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   5900     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   5901     _flag_k = FK_CMP;
   5902     RECOMP_BACKEDGE();
   5903     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   5904 L_3100B728:
   5905     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   5906     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   5907     _cf = 0;
   5908     _flag_k = FK_TEST;
   5909 L_3100B72A:
   5910     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   5911     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   5912     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   5913     RECOMP_FLAGS_IN();
   5914     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   5915     PUSH32(esp, edx); /* 0x3100B736: push edx */
   5916     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   5917     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   5918     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   5919     RECOMP_FLAGS_IN();
   5920     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   5921     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   5922     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   5923     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   5924     _flag_k = FK_ADD;
   5925     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   5926     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   5927     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   5928     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   5929     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   5930     esp = ebp; /* 0x3100B755: mov esp, ebp */
   5931     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   5932     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   5933 L_31047848:
   5934     ecx = ebp + (-0x74); /* 0x31047848: lea ecx, [ebp - 0x74] */
   5935     RECOMP_BACKEDGE();
   5936     goto L_3100B670; /* 0x3104784B: jmp 0x3100b670 */
   5937     { RECOMP_REGS_OUT(); return; } /* end of function */
   5938     RECOMP_REGS_OUT();
   5939 }
   5940 
   5941 void sub_31047850(void) {
   5942     int _fpu_cmp = 0;
   5943     uint32_t _cf = 0;
   5944     int _df = 1;
   5945     uint32_t _flag_k = FK_NONE;
   5946     uint32_t _flag_a = 0, _flag_b = 0;
   5947     uint32_t _itail_tgt = 0;
   5948     RECOMP_REGS_LOCALS
   5949     RECOMP_ENTER(0x31047850u);
   5950 
   5951 L_31047850:
   5952     ecx = ebp + (-0x34); /* 0x31047850: lea ecx, [ebp - 0x34] */
   5953 L_31047853:
   5954     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   5955     { RECOMP_REGS_OUT(); return; } /* end of function */
   5956   _ljump:
   5957     switch (_itail_tgt) {
   5958       case 0x31047850u: goto L_31047850;
   5959       case 0x31047853u: goto L_31047853;
   5960       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   5961     }
   5962     RECOMP_REGS_OUT();
   5963 }
   5964 
   5965 void sub_31047859(void) {
   5966     int _fpu_cmp = 0;
   5967     uint32_t _cf = 0;
   5968     int _df = 1;
   5969     uint32_t _flag_k = FK_NONE;
   5970     uint32_t _flag_a = 0, _flag_b = 0;
   5971     uint32_t _itail_tgt = 0;
   5972     RECOMP_REGS_LOCALS
   5973     RECOMP_ENTER(0x31047859u);
   5974 
   5975 L_31047859:
   5976     ecx = ebp + (-0x24); /* 0x31047859: lea ecx, [ebp - 0x24] */
   5977 L_3104785C:
   5978     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   5979     { RECOMP_REGS_OUT(); return; } /* end of function */
   5980   _ljump:
   5981     switch (_itail_tgt) {
   5982       case 0x31047859u: goto L_31047859;
   5983       case 0x3104785Cu: goto L_3104785C;
   5984       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   5985     }
   5986     RECOMP_REGS_OUT();
   5987 }
   5988 
   5989 void sub_31047862(void) {
   5990     int _fpu_cmp = 0;
   5991     uint32_t _cf = 0;
   5992     int _df = 1;
   5993     uint32_t _flag_k = FK_NONE;
   5994     uint32_t _flag_a = 0, _flag_b = 0;
   5995     uint32_t _itail_tgt = 0;
   5996     RECOMP_REGS_LOCALS
   5997     RECOMP_ENTER(0x31047862u);
   5998 
   5999     goto L_31047862;
   6000 L_3100B790:
   6001     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   6002     ebp = esp; /* 0x3100B791: mov ebp, esp */
   6003     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   6004     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6005     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   6006     _flag_k = FK_CMP;
   6007     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   6008     PUSH32(esp, esi); /* 0x3100B797: push esi */
   6009     esi = ecx; /* 0x3100B798: mov esi, ecx */
   6010     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   6011     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   6012     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   6013     _cf = 0;
   6014     _flag_k = FK_TEST;
   6015     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   6016     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   6017     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   6018     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   6019     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   6020 L_3100B7AA:
   6021     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   6022     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   6023     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   6024     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6025     _flag_k = FK_CMP;
   6026     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   6027 L_3100B7B0:
   6028     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   6029     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   6030     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6031     _flag_k = FK_CMP;
   6032     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   6033 L_3100B7B4:
   6034     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   6035     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   6036     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   6037     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6038     _flag_k = FK_CMP;
   6039     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   6040     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   6041 L_3100B7BE:
   6042     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   6043     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   6044     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   6045     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   6046     RECOMP_FLAGS_IN();
   6047     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   6048     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   6049     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   6050     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   6051     RECOMP_FLAGS_IN();
   6052     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   6053     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   6054     RECOMP_FLAGS_IN();
   6055     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   6056     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6057     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6058     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   6059     _flag_k = FK_ADD;
   6060     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   6061     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   6062     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6063     _flag_k = FK_CMP;
   6064     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   6065     RECOMP_BACKEDGE();
   6066     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   6067 L_3100B7E7:
   6068     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   6069     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   6070     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   6071     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   6072     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   6073     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   6074     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   6075     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   6076     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   6077     PUSH32(esp, eax); /* 0x3100B805: push eax */
   6078     ecx = esi; /* 0x3100B806: mov ecx, esi */
   6079     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   6080     RECOMP_FLAGS_IN();
   6081     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   6082 L_3100B80F:
   6083     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   6084     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   6085     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6086     _flag_k = FK_CMP;
   6087     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   6088 L_3100B813:
   6089     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   6090     ebx = eax; /* 0x3100B816: mov ebx, eax */
   6091     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   6092     RECOMP_FLAGS_IN();
   6093     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   6094     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   6095     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   6096     ecx = esi; /* 0x3100B822: mov ecx, esi */
   6097     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   6098     RECOMP_FLAGS_IN();
   6099     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   6100     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   6101     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   6102     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6103     _flag_k = FK_CMP;
   6104     RECOMP_BACKEDGE();
   6105     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   6106 L_3100B830:
   6107     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   6108     PUSH32(esp, edx); /* 0x3100B833: push edx */
   6109     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   6110     RECOMP_FLAGS_IN();
   6111     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   6112     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6113     edi = 0; /* 0x3100B83C: xor edi, edi */
   6114     _cf = 0;
   6115     _flag_k = FK_TEST;
   6116     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   6117     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   6118     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   6119     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   6120     RECOMP_FLAGS_IN();
   6121     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   6122     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6123     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   6124     _flag_k = FK_ADD;
   6125     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   6126     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   6127     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   6128     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   6129     esp = ebp; /* 0x3100B853: mov esp, ebp */
   6130     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   6131     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   6132 L_31047862:
   6133     ecx = ebp + (-0x70); /* 0x31047862: lea ecx, [ebp - 0x70] */
   6134     RECOMP_BACKEDGE();
   6135     goto L_3100B790; /* 0x31047865: jmp 0x3100b790 */
   6136     { RECOMP_REGS_OUT(); return; } /* end of function */
   6137     RECOMP_REGS_OUT();
   6138 }
   6139 
   6140 void sub_3104786A(void) {
   6141     int _fpu_cmp = 0;
   6142     uint32_t _cf = 0;
   6143     int _df = 1;
   6144     uint32_t _flag_k = FK_NONE;
   6145     uint32_t _flag_a = 0, _flag_b = 0;
   6146     uint32_t _itail_tgt = 0;
   6147     RECOMP_REGS_LOCALS
   6148     RECOMP_ENTER(0x3104786Au);
   6149 
   6150     goto L_3104786A;
   6151 L_31004880:
   6152     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   6153     ebp = esp; /* 0x31004881: mov ebp, esp */
   6154     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   6155     PUSH32(esp, esi); /* 0x31004884: push esi */
   6156     esi = ecx; /* 0x31004885: mov esi, ecx */
   6157     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   6158     PUSH32(esp, eax); /* 0x3100488A: push eax */
   6159     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   6160     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   6161     RECOMP_FLAGS_IN();
   6162     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6163     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6164     esp = esp + 4; /* 0x31004893: add esp, 4 */
   6165     _flag_k = FK_ADD;
   6166     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6167     eax = 0; /* 0x31004896: xor eax, eax */
   6168     _cf = 0;
   6169     _flag_k = FK_TEST;
   6170     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   6171     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   6172     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   6173     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   6174     esp = ebp; /* 0x310048A2: mov esp, ebp */
   6175     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   6176     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   6177 L_3104786A:
   6178     ecx = ebp + (-0x44); /* 0x3104786A: lea ecx, [ebp - 0x44] */
   6179     RECOMP_BACKEDGE();
   6180     goto L_31004880; /* 0x3104786D: jmp 0x31004880 */
   6181     { RECOMP_REGS_OUT(); return; } /* end of function */
   6182     RECOMP_REGS_OUT();
   6183 }
   6184 
   6185 void sub_31047872(void) {
   6186     int _fpu_cmp = 0;
   6187     uint32_t _cf = 0;
   6188     int _df = 1;
   6189     uint32_t _flag_k = FK_NONE;
   6190     uint32_t _flag_a = 0, _flag_b = 0;
   6191     uint32_t _itail_tgt = 0;
   6192     RECOMP_REGS_LOCALS
   6193     RECOMP_ENTER(0x31047872u);
   6194 
   6195     goto L_31047872;
   6196 L_31046870:
   6197     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   6198 L_31047872:
   6199     eax = 0x31049C08u; /* 0x31047872: mov eax, 0x31049c08 */
   6200 L_31047877:
   6201     RECOMP_BACKEDGE();
   6202     goto L_31046870; /* 0x31047877: jmp 0x31046870 */
   6203     { RECOMP_REGS_OUT(); return; } /* end of function */
   6204   _ljump:
   6205     switch (_itail_tgt) {
   6206       case 0x31046870u: goto L_31046870;
   6207       case 0x31047872u: goto L_31047872;
   6208       case 0x31047877u: goto L_31047877;
   6209       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   6210     }
   6211     RECOMP_REGS_OUT();
   6212 }
   6213 
   6214 void sub_31047880(void) {
   6215     int _fpu_cmp = 0;
   6216     uint32_t _cf = 0;
   6217     int _df = 1;
   6218     uint32_t _flag_k = FK_NONE;
   6219     uint32_t _flag_a = 0, _flag_b = 0;
   6220     uint32_t _itail_tgt = 0;
   6221     RECOMP_REGS_LOCALS
   6222     RECOMP_ENTER(0x31047880u);
   6223 
   6224     goto L_31047880;
   6225 L_3100B670:
   6226     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   6227     ebp = esp; /* 0x3100B671: mov ebp, esp */
   6228     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   6229     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   6230     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   6231     PUSH32(esp, eax); /* 0x3100B680: push eax */
   6232     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   6233     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   6234     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6235     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   6236     _flag_k = FK_CMP;
   6237     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   6238     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   6239     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   6240     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   6241     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   6242     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   6243     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   6244     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   6245     RECOMP_FLAGS_IN();
   6246     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   6247     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   6248     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   6249     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   6250     RECOMP_FLAGS_IN();
   6251     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6252     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   6253     _cf = 0;
   6254     _flag_k = FK_TEST;
   6255     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   6256     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   6257     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   6258     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   6259     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   6260     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   6261     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   6262     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6263     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   6264     _flag_k = FK_ADD;
   6265     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6266     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6267     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   6268     _flag_k = FK_ADD;
   6269     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   6270     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   6271     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6272     _flag_k = FK_CMP;
   6273     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   6274     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   6275     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   6276 L_3100B6D9:
   6277     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   6278     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   6279     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   6280     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6281     _flag_k = FK_CMP;
   6282     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   6283 L_3100B6DF:
   6284     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   6285     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   6286     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6287     _flag_k = FK_CMP;
   6288     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   6289 L_3100B6E3:
   6290     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   6291     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   6292     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   6293     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   6294     RECOMP_FLAGS_IN();
   6295     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   6296     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   6297     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   6298     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   6299     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   6300     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   6301     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   6302     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   6303     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   6304 L_3100B707:
   6305     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   6306     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   6307     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6308     _flag_k = FK_CMP;
   6309     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   6310 L_3100B70B:
   6311     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   6312     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   6313     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   6314     RECOMP_FLAGS_IN();
   6315     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   6316     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   6317     PUSH32(esp, eax); /* 0x3100B719: push eax */
   6318     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   6319     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   6320     RECOMP_FLAGS_IN();
   6321     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   6322     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   6323     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   6324     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6325     _flag_k = FK_CMP;
   6326     RECOMP_BACKEDGE();
   6327     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   6328 L_3100B728:
   6329     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6330     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   6331     _cf = 0;
   6332     _flag_k = FK_TEST;
   6333 L_3100B72A:
   6334     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   6335     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   6336     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   6337     RECOMP_FLAGS_IN();
   6338     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   6339     PUSH32(esp, edx); /* 0x3100B736: push edx */
   6340     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   6341     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   6342     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   6343     RECOMP_FLAGS_IN();
   6344     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   6345     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   6346     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6347     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   6348     _flag_k = FK_ADD;
   6349     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   6350     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   6351     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   6352     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   6353     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   6354     esp = ebp; /* 0x3100B755: mov esp, ebp */
   6355     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   6356     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   6357 L_31047880:
   6358     ecx = ebp + (-0x84); /* 0x31047880: lea ecx, [ebp - 0x84] */
   6359     RECOMP_BACKEDGE();
   6360     goto L_3100B670; /* 0x31047886: jmp 0x3100b670 */
   6361     { RECOMP_REGS_OUT(); return; } /* end of function */
   6362     RECOMP_REGS_OUT();
   6363 }
   6364 
   6365 void sub_3104788B(void) {
   6366     int _fpu_cmp = 0;
   6367     uint32_t _cf = 0;
   6368     int _df = 1;
   6369     uint32_t _flag_k = FK_NONE;
   6370     uint32_t _flag_a = 0, _flag_b = 0;
   6371     uint32_t _itail_tgt = 0;
   6372     RECOMP_REGS_LOCALS
   6373     RECOMP_ENTER(0x3104788Bu);
   6374 
   6375 L_3104788B:
   6376     ecx = ebp + (-0x44); /* 0x3104788B: lea ecx, [ebp - 0x44] */
   6377 L_3104788E:
   6378     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   6379     { RECOMP_REGS_OUT(); return; } /* end of function */
   6380   _ljump:
   6381     switch (_itail_tgt) {
   6382       case 0x3104788Bu: goto L_3104788B;
   6383       case 0x3104788Eu: goto L_3104788E;
   6384       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   6385     }
   6386     RECOMP_REGS_OUT();
   6387 }
   6388 
   6389 void sub_31047894(void) {
   6390     int _fpu_cmp = 0;
   6391     uint32_t _cf = 0;
   6392     int _df = 1;
   6393     uint32_t _flag_k = FK_NONE;
   6394     uint32_t _flag_a = 0, _flag_b = 0;
   6395     uint32_t _itail_tgt = 0;
   6396     RECOMP_REGS_LOCALS
   6397     RECOMP_ENTER(0x31047894u);
   6398 
   6399 L_31047894:
   6400     ecx = ebp + (-0x34); /* 0x31047894: lea ecx, [ebp - 0x34] */
   6401 L_31047897:
   6402     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   6403     { RECOMP_REGS_OUT(); return; } /* end of function */
   6404   _ljump:
   6405     switch (_itail_tgt) {
   6406       case 0x31047894u: goto L_31047894;
   6407       case 0x31047897u: goto L_31047897;
   6408       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   6409     }
   6410     RECOMP_REGS_OUT();
   6411 }
   6412 
   6413 void sub_3104789D(void) {
   6414     int _fpu_cmp = 0;
   6415     uint32_t _cf = 0;
   6416     int _df = 1;
   6417     uint32_t _flag_k = FK_NONE;
   6418     uint32_t _flag_a = 0, _flag_b = 0;
   6419     uint32_t _itail_tgt = 0;
   6420     RECOMP_REGS_LOCALS
   6421     RECOMP_ENTER(0x3104789Du);
   6422 
   6423     goto L_3104789D;
   6424 L_31009E70:
   6425     PUSH32(esp, ebp); /* 0x31009E70: push ebp */
   6426     ebp = esp; /* 0x31009E71: mov ebp, esp */
   6427     PUSH32(esp, ecx); /* 0x31009E73: push ecx */
   6428     PUSH32(esp, ebx); /* 0x31009E74: push ebx */
   6429     PUSH32(esp, esi); /* 0x31009E75: push esi */
   6430     PUSH32(esp, edi); /* 0x31009E76: push edi */
   6431     edi = ecx; /* 0x31009E77: mov edi, ecx */
   6432     edx = MEM32(edi + 0x8); /* 0x31009E79: mov edx, dword ptr [edi + 8] */
   6433     esi = MEM32(edi + 0x4); /* 0x31009E7C: mov esi, dword ptr [edi + 4] */
   6434     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6435     ebx = 0; /* 0x31009E7F: xor ebx, ebx */
   6436     _cf = 0;
   6437     _flag_k = FK_TEST;
   6438     /* cmp esi, edx */ /* 0x31009E81: cmp esi, edx */
   6439     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx);
   6440     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6441     _flag_k = FK_CMP;
   6442     MEM32(ebp + (-0x4)) = edx; /* 0x31009E83: mov dword ptr [ebp - 4], edx */
   6443     if (CMP_EQ(_flag_a, _flag_b)) goto L_31009EBE; /* 0x31009E86: je 0x31009ebe */
   6444 L_31009E88:
   6445     eax = MEM32(esi + 0x4); /* 0x31009E88: mov eax, dword ptr [esi + 4] */
   6446     /* cmp eax, ebx */ /* 0x31009E8B: cmp eax, ebx */
   6447     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   6448     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6449     _flag_k = FK_CMP;
   6450     if (CMP_EQ(_flag_a, _flag_b)) goto L_31009EAE; /* 0x31009E8D: je 0x31009eae */
   6451 L_31009E8F:
   6452     ecx = eax + (-0x1); /* 0x31009E8F: lea ecx, [eax - 1] */
   6453     SET_LO8(eax, MEM8(ecx)); /* 0x31009E92: mov al, byte ptr [ecx] */
   6454     /* cmp LO8(eax), LO8(ebx) */ /* 0x31009E94: cmp al, bl */
   6455     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
   6456     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6457     _flag_k = FK_NARROW(FK_CMP, 24);
   6458     if (CMP_EQ(_flag_a, _flag_b)) goto L_31009EA2; /* 0x31009E96: je 0x31009ea2 */
   6459 L_31009E98:
   6460     /* cmp LO8(eax), 0xFFu */ /* 0x31009E98: cmp al, 0xff */
   6461     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
   6462     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6463     _flag_k = FK_NARROW(FK_CMP, 24);
   6464     if (CMP_EQ(_flag_a, _flag_b)) goto L_31009EA2; /* 0x31009E9A: je 0x31009ea2 */
   6465 L_31009E9C:
   6466     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
   6467     SET_LO8(eax, LO8(eax) - 1); /* 0x31009E9C: dec al */
   6468     _flag_k = FK_NARROW(FK_DEC, 24);
   6469     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x31009E9E: mov byte ptr [ecx], al */
   6470     goto L_31009EAE; /* 0x31009EA0: jmp 0x31009eae */
   6471 L_31009EA2:
   6472     PUSH32(esp, ecx); /* 0x31009EA2: push ecx */
   6473     RECOMP_ICALL(0x31046858u); /* 0x31009EA3: call 0x31046858 */ /* not lifted */
   6474     RECOMP_FLAGS_IN();
   6475     edx = MEM32(ebp + (-0x4)); /* 0x31009EA8: mov edx, dword ptr [ebp - 4] */
   6476     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6477     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6478     esp = esp + 4; /* 0x31009EAB: add esp, 4 */
   6479     _flag_k = FK_ADD;
   6480 L_31009EAE:
   6481     MEM32(esi + 0x4) = ebx; /* 0x31009EAE: mov dword ptr [esi + 4], ebx */
   6482     MEM32(esi + 0x8) = ebx; /* 0x31009EB1: mov dword ptr [esi + 8], ebx */
   6483     MEM32(esi + 0xC) = ebx; /* 0x31009EB4: mov dword ptr [esi + 0xc], ebx */
   6484     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x10u);
   6485     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6486     esi = esi + 0x10u; /* 0x31009EB7: add esi, 0x10 */
   6487     _flag_k = FK_ADD;
   6488     /* cmp esi, edx */ /* 0x31009EBA: cmp esi, edx */
   6489     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx);
   6490     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6491     _flag_k = FK_CMP;
   6492     RECOMP_BACKEDGE();
   6493     if (CMP_NE(_flag_a, _flag_b)) goto L_31009E88; /* 0x31009EBC: jne 0x31009e88 */
   6494 L_31009EBE:
   6495     eax = MEM32(edi + 0x4); /* 0x31009EBE: mov eax, dword ptr [edi + 4] */
   6496     PUSH32(esp, eax); /* 0x31009EC1: push eax */
   6497     RECOMP_ICALL(0x31046858u); /* 0x31009EC2: call 0x31046858 */ /* not lifted */
   6498     RECOMP_FLAGS_IN();
   6499     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6500     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6501     esp = esp + 4; /* 0x31009EC7: add esp, 4 */
   6502     _flag_k = FK_ADD;
   6503     MEM32(edi + 0x4) = ebx; /* 0x31009ECA: mov dword ptr [edi + 4], ebx */
   6504     MEM32(edi + 0x8) = ebx; /* 0x31009ECD: mov dword ptr [edi + 8], ebx */
   6505     MEM32(edi + 0xC) = ebx; /* 0x31009ED0: mov dword ptr [edi + 0xc], ebx */
   6506     edi = POP32_VAL(esp); /* 0x31009ED3: pop edi */
   6507     esi = POP32_VAL(esp); /* 0x31009ED4: pop esi */
   6508     ebx = POP32_VAL(esp); /* 0x31009ED5: pop ebx */
   6509     esp = ebp; /* 0x31009ED6: mov esp, ebp */
   6510     ebp = POP32_VAL(esp); /* 0x31009ED8: pop ebp */
   6511     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31009ED9: ret  */
   6512 L_3104789D:
   6513     ecx = ebp + (-0x24); /* 0x3104789D: lea ecx, [ebp - 0x24] */
   6514     RECOMP_BACKEDGE();
   6515     goto L_31009E70; /* 0x310478A0: jmp 0x31009e70 */
   6516     { RECOMP_REGS_OUT(); return; } /* end of function */
   6517     RECOMP_REGS_OUT();
   6518 }
   6519 
   6520 void sub_310478A5(void) {
   6521     int _fpu_cmp = 0;
   6522     uint32_t _cf = 0;
   6523     int _df = 1;
   6524     uint32_t _flag_k = FK_NONE;
   6525     uint32_t _flag_a = 0, _flag_b = 0;
   6526     uint32_t _itail_tgt = 0;
   6527     RECOMP_REGS_LOCALS
   6528     RECOMP_ENTER(0x310478A5u);
   6529 
   6530     goto L_310478A5;
   6531 L_31009E70:
   6532     PUSH32(esp, ebp); /* 0x31009E70: push ebp */
   6533     ebp = esp; /* 0x31009E71: mov ebp, esp */
   6534     PUSH32(esp, ecx); /* 0x31009E73: push ecx */
   6535     PUSH32(esp, ebx); /* 0x31009E74: push ebx */
   6536     PUSH32(esp, esi); /* 0x31009E75: push esi */
   6537     PUSH32(esp, edi); /* 0x31009E76: push edi */
   6538     edi = ecx; /* 0x31009E77: mov edi, ecx */
   6539     edx = MEM32(edi + 0x8); /* 0x31009E79: mov edx, dword ptr [edi + 8] */
   6540     esi = MEM32(edi + 0x4); /* 0x31009E7C: mov esi, dword ptr [edi + 4] */
   6541     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6542     ebx = 0; /* 0x31009E7F: xor ebx, ebx */
   6543     _cf = 0;
   6544     _flag_k = FK_TEST;
   6545     /* cmp esi, edx */ /* 0x31009E81: cmp esi, edx */
   6546     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx);
   6547     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6548     _flag_k = FK_CMP;
   6549     MEM32(ebp + (-0x4)) = edx; /* 0x31009E83: mov dword ptr [ebp - 4], edx */
   6550     if (CMP_EQ(_flag_a, _flag_b)) goto L_31009EBE; /* 0x31009E86: je 0x31009ebe */
   6551 L_31009E88:
   6552     eax = MEM32(esi + 0x4); /* 0x31009E88: mov eax, dword ptr [esi + 4] */
   6553     /* cmp eax, ebx */ /* 0x31009E8B: cmp eax, ebx */
   6554     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ebx);
   6555     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6556     _flag_k = FK_CMP;
   6557     if (CMP_EQ(_flag_a, _flag_b)) goto L_31009EAE; /* 0x31009E8D: je 0x31009eae */
   6558 L_31009E8F:
   6559     ecx = eax + (-0x1); /* 0x31009E8F: lea ecx, [eax - 1] */
   6560     SET_LO8(eax, MEM8(ecx)); /* 0x31009E92: mov al, byte ptr [ecx] */
   6561     /* cmp LO8(eax), LO8(ebx) */ /* 0x31009E94: cmp al, bl */
   6562     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(LO8(ebx)) << 24;
   6563     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6564     _flag_k = FK_NARROW(FK_CMP, 24);
   6565     if (CMP_EQ(_flag_a, _flag_b)) goto L_31009EA2; /* 0x31009E96: je 0x31009ea2 */
   6566 L_31009E98:
   6567     /* cmp LO8(eax), 0xFFu */ /* 0x31009E98: cmp al, 0xff */
   6568     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(0xFFu) << 24;
   6569     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6570     _flag_k = FK_NARROW(FK_CMP, 24);
   6571     if (CMP_EQ(_flag_a, _flag_b)) goto L_31009EA2; /* 0x31009E9A: je 0x31009ea2 */
   6572 L_31009E9C:
   6573     _flag_a = (uint32_t)(LO8(eax)) << 24; _flag_b = (uint32_t)(1) << 24;
   6574     SET_LO8(eax, LO8(eax) - 1); /* 0x31009E9C: dec al */
   6575     _flag_k = FK_NARROW(FK_DEC, 24);
   6576     MEM8(ecx) = (uint8_t)(LO8(eax)); /* 0x31009E9E: mov byte ptr [ecx], al */
   6577     goto L_31009EAE; /* 0x31009EA0: jmp 0x31009eae */
   6578 L_31009EA2:
   6579     PUSH32(esp, ecx); /* 0x31009EA2: push ecx */
   6580     RECOMP_ICALL(0x31046858u); /* 0x31009EA3: call 0x31046858 */ /* not lifted */
   6581     RECOMP_FLAGS_IN();
   6582     edx = MEM32(ebp + (-0x4)); /* 0x31009EA8: mov edx, dword ptr [ebp - 4] */
   6583     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6584     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6585     esp = esp + 4; /* 0x31009EAB: add esp, 4 */
   6586     _flag_k = FK_ADD;
   6587 L_31009EAE:
   6588     MEM32(esi + 0x4) = ebx; /* 0x31009EAE: mov dword ptr [esi + 4], ebx */
   6589     MEM32(esi + 0x8) = ebx; /* 0x31009EB1: mov dword ptr [esi + 8], ebx */
   6590     MEM32(esi + 0xC) = ebx; /* 0x31009EB4: mov dword ptr [esi + 0xc], ebx */
   6591     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(0x10u);
   6592     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6593     esi = esi + 0x10u; /* 0x31009EB7: add esi, 0x10 */
   6594     _flag_k = FK_ADD;
   6595     /* cmp esi, edx */ /* 0x31009EBA: cmp esi, edx */
   6596     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(edx);
   6597     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6598     _flag_k = FK_CMP;
   6599     RECOMP_BACKEDGE();
   6600     if (CMP_NE(_flag_a, _flag_b)) goto L_31009E88; /* 0x31009EBC: jne 0x31009e88 */
   6601 L_31009EBE:
   6602     eax = MEM32(edi + 0x4); /* 0x31009EBE: mov eax, dword ptr [edi + 4] */
   6603     PUSH32(esp, eax); /* 0x31009EC1: push eax */
   6604     RECOMP_ICALL(0x31046858u); /* 0x31009EC2: call 0x31046858 */ /* not lifted */
   6605     RECOMP_FLAGS_IN();
   6606     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6607     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6608     esp = esp + 4; /* 0x31009EC7: add esp, 4 */
   6609     _flag_k = FK_ADD;
   6610     MEM32(edi + 0x4) = ebx; /* 0x31009ECA: mov dword ptr [edi + 4], ebx */
   6611     MEM32(edi + 0x8) = ebx; /* 0x31009ECD: mov dword ptr [edi + 8], ebx */
   6612     MEM32(edi + 0xC) = ebx; /* 0x31009ED0: mov dword ptr [edi + 0xc], ebx */
   6613     edi = POP32_VAL(esp); /* 0x31009ED3: pop edi */
   6614     esi = POP32_VAL(esp); /* 0x31009ED4: pop esi */
   6615     ebx = POP32_VAL(esp); /* 0x31009ED5: pop ebx */
   6616     esp = ebp; /* 0x31009ED6: mov esp, ebp */
   6617     ebp = POP32_VAL(esp); /* 0x31009ED8: pop ebp */
   6618     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31009ED9: ret  */
   6619 L_310478A5:
   6620     eax = MEM32(ebp + (-0x14)); /* 0x310478A5: mov eax, dword ptr [ebp - 0x14] */
   6621     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   6622     eax = eax & 1; /* 0x310478A8: and eax, 1 */
   6623     _cf = 0;
   6624     _flag_k = FK_TEST;
   6625     /* test eax, eax */ /* 0x310478AB: test eax, eax */
   6626     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   6627     _cf = 0;
   6628     _flag_k = FK_TEST;
   6629     if (TEST_Z(_flag_a, _flag_b)) goto L_310478BB; /* 0x310478AD: je 0x310478bb */
   6630 L_310478B3:
   6631     ecx = MEM32(ebp + 0x8); /* 0x310478B3: mov ecx, dword ptr [ebp + 8] */
   6632     RECOMP_BACKEDGE();
   6633     goto L_31009E70; /* 0x310478B6: jmp 0x31009e70 */
   6634 L_310478BB:
   6635     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310478BB: ret  */
   6636     RECOMP_REGS_OUT();
   6637 }
   6638 
   6639 void sub_310478BC(void) {
   6640     int _fpu_cmp = 0;
   6641     uint32_t _cf = 0;
   6642     int _df = 1;
   6643     uint32_t _flag_k = FK_NONE;
   6644     uint32_t _flag_a = 0, _flag_b = 0;
   6645     uint32_t _itail_tgt = 0;
   6646     RECOMP_REGS_LOCALS
   6647     RECOMP_ENTER(0x310478BCu);
   6648 
   6649     goto L_310478BC;
   6650 L_3100B790:
   6651     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   6652     ebp = esp; /* 0x3100B791: mov ebp, esp */
   6653     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   6654     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6655     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   6656     _flag_k = FK_CMP;
   6657     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   6658     PUSH32(esp, esi); /* 0x3100B797: push esi */
   6659     esi = ecx; /* 0x3100B798: mov esi, ecx */
   6660     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   6661     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   6662     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   6663     _cf = 0;
   6664     _flag_k = FK_TEST;
   6665     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   6666     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   6667     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   6668     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   6669     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   6670 L_3100B7AA:
   6671     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   6672     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   6673     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   6674     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6675     _flag_k = FK_CMP;
   6676     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   6677 L_3100B7B0:
   6678     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   6679     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   6680     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6681     _flag_k = FK_CMP;
   6682     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   6683 L_3100B7B4:
   6684     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   6685     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   6686     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   6687     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6688     _flag_k = FK_CMP;
   6689     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   6690     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   6691 L_3100B7BE:
   6692     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   6693     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   6694     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   6695     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   6696     RECOMP_FLAGS_IN();
   6697     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   6698     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   6699     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   6700     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   6701     RECOMP_FLAGS_IN();
   6702     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   6703     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   6704     RECOMP_FLAGS_IN();
   6705     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   6706     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6707     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6708     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   6709     _flag_k = FK_ADD;
   6710     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   6711     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   6712     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6713     _flag_k = FK_CMP;
   6714     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   6715     RECOMP_BACKEDGE();
   6716     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   6717 L_3100B7E7:
   6718     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   6719     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   6720     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   6721     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   6722     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   6723     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   6724     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   6725     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   6726     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   6727     PUSH32(esp, eax); /* 0x3100B805: push eax */
   6728     ecx = esi; /* 0x3100B806: mov ecx, esi */
   6729     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   6730     RECOMP_FLAGS_IN();
   6731     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   6732 L_3100B80F:
   6733     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   6734     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   6735     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6736     _flag_k = FK_CMP;
   6737     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   6738 L_3100B813:
   6739     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   6740     ebx = eax; /* 0x3100B816: mov ebx, eax */
   6741     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   6742     RECOMP_FLAGS_IN();
   6743     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   6744     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   6745     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   6746     ecx = esi; /* 0x3100B822: mov ecx, esi */
   6747     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   6748     RECOMP_FLAGS_IN();
   6749     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   6750     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   6751     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   6752     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6753     _flag_k = FK_CMP;
   6754     RECOMP_BACKEDGE();
   6755     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   6756 L_3100B830:
   6757     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   6758     PUSH32(esp, edx); /* 0x3100B833: push edx */
   6759     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   6760     RECOMP_FLAGS_IN();
   6761     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   6762     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6763     edi = 0; /* 0x3100B83C: xor edi, edi */
   6764     _cf = 0;
   6765     _flag_k = FK_TEST;
   6766     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   6767     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   6768     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   6769     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   6770     RECOMP_FLAGS_IN();
   6771     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   6772     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6773     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   6774     _flag_k = FK_ADD;
   6775     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   6776     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   6777     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   6778     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   6779     esp = ebp; /* 0x3100B853: mov esp, ebp */
   6780     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   6781     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   6782 L_310478BC:
   6783     ecx = ebp + (-0x80); /* 0x310478BC: lea ecx, [ebp - 0x80] */
   6784     RECOMP_BACKEDGE();
   6785     goto L_3100B790; /* 0x310478BF: jmp 0x3100b790 */
   6786     { RECOMP_REGS_OUT(); return; } /* end of function */
   6787     RECOMP_REGS_OUT();
   6788 }
   6789 
   6790 void sub_310478C4(void) {
   6791     int _fpu_cmp = 0;
   6792     uint32_t _cf = 0;
   6793     int _df = 1;
   6794     uint32_t _flag_k = FK_NONE;
   6795     uint32_t _flag_a = 0, _flag_b = 0;
   6796     uint32_t _itail_tgt = 0;
   6797     RECOMP_REGS_LOCALS
   6798     RECOMP_ENTER(0x310478C4u);
   6799 
   6800     goto L_310478C4;
   6801 L_31004880:
   6802     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   6803     ebp = esp; /* 0x31004881: mov ebp, esp */
   6804     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   6805     PUSH32(esp, esi); /* 0x31004884: push esi */
   6806     esi = ecx; /* 0x31004885: mov esi, ecx */
   6807     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   6808     PUSH32(esp, eax); /* 0x3100488A: push eax */
   6809     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   6810     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   6811     RECOMP_FLAGS_IN();
   6812     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6813     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6814     esp = esp + 4; /* 0x31004893: add esp, 4 */
   6815     _flag_k = FK_ADD;
   6816     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6817     eax = 0; /* 0x31004896: xor eax, eax */
   6818     _cf = 0;
   6819     _flag_k = FK_TEST;
   6820     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   6821     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   6822     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   6823     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   6824     esp = ebp; /* 0x310048A2: mov esp, ebp */
   6825     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   6826     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   6827 L_310478C4:
   6828     ecx = ebp + (-0x54); /* 0x310478C4: lea ecx, [ebp - 0x54] */
   6829     RECOMP_BACKEDGE();
   6830     goto L_31004880; /* 0x310478C7: jmp 0x31004880 */
   6831     { RECOMP_REGS_OUT(); return; } /* end of function */
   6832     RECOMP_REGS_OUT();
   6833 }
   6834 
   6835 void sub_310478CC(void) {
   6836     int _fpu_cmp = 0;
   6837     uint32_t _cf = 0;
   6838     int _df = 1;
   6839     uint32_t _flag_k = FK_NONE;
   6840     uint32_t _flag_a = 0, _flag_b = 0;
   6841     uint32_t _itail_tgt = 0;
   6842     RECOMP_REGS_LOCALS
   6843     RECOMP_ENTER(0x310478CCu);
   6844 
   6845     goto L_310478CC;
   6846 L_31046870:
   6847     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   6848 L_310478CC:
   6849     eax = 0x31049C58u; /* 0x310478CC: mov eax, 0x31049c58 */
   6850 L_310478D1:
   6851     RECOMP_BACKEDGE();
   6852     goto L_31046870; /* 0x310478D1: jmp 0x31046870 */
   6853     { RECOMP_REGS_OUT(); return; } /* end of function */
   6854   _ljump:
   6855     switch (_itail_tgt) {
   6856       case 0x31046870u: goto L_31046870;
   6857       case 0x310478CCu: goto L_310478CC;
   6858       case 0x310478D1u: goto L_310478D1;
   6859       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   6860     }
   6861     RECOMP_REGS_OUT();
   6862 }
   6863 
   6864 void sub_310478E0(void) {
   6865     int _fpu_cmp = 0;
   6866     uint32_t _cf = 0;
   6867     int _df = 1;
   6868     uint32_t _flag_k = FK_NONE;
   6869     uint32_t _flag_a = 0, _flag_b = 0;
   6870     uint32_t _itail_tgt = 0;
   6871     RECOMP_REGS_LOCALS
   6872     RECOMP_ENTER(0x310478E0u);
   6873 
   6874     goto L_310478E0;
   6875 L_3100B670:
   6876     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   6877     ebp = esp; /* 0x3100B671: mov ebp, esp */
   6878     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   6879     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   6880     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   6881     PUSH32(esp, eax); /* 0x3100B680: push eax */
   6882     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   6883     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   6884     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6885     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   6886     _flag_k = FK_CMP;
   6887     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   6888     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   6889     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   6890     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   6891     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   6892     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   6893     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   6894     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   6895     RECOMP_FLAGS_IN();
   6896     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   6897     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   6898     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   6899     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   6900     RECOMP_FLAGS_IN();
   6901     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6902     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   6903     _cf = 0;
   6904     _flag_k = FK_TEST;
   6905     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   6906     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   6907     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   6908     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   6909     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   6910     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   6911     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   6912     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6913     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   6914     _flag_k = FK_ADD;
   6915     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   6916     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6917     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   6918     _flag_k = FK_ADD;
   6919     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   6920     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   6921     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6922     _flag_k = FK_CMP;
   6923     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   6924     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   6925     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   6926 L_3100B6D9:
   6927     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   6928     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   6929     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   6930     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6931     _flag_k = FK_CMP;
   6932     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   6933 L_3100B6DF:
   6934     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   6935     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   6936     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6937     _flag_k = FK_CMP;
   6938     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   6939 L_3100B6E3:
   6940     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   6941     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   6942     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   6943     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   6944     RECOMP_FLAGS_IN();
   6945     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   6946     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   6947     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   6948     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   6949     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   6950     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   6951     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   6952     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   6953     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   6954 L_3100B707:
   6955     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   6956     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   6957     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6958     _flag_k = FK_CMP;
   6959     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   6960 L_3100B70B:
   6961     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   6962     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   6963     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   6964     RECOMP_FLAGS_IN();
   6965     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   6966     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   6967     PUSH32(esp, eax); /* 0x3100B719: push eax */
   6968     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   6969     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   6970     RECOMP_FLAGS_IN();
   6971     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   6972     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   6973     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   6974     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   6975     _flag_k = FK_CMP;
   6976     RECOMP_BACKEDGE();
   6977     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   6978 L_3100B728:
   6979     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   6980     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   6981     _cf = 0;
   6982     _flag_k = FK_TEST;
   6983 L_3100B72A:
   6984     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   6985     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   6986     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   6987     RECOMP_FLAGS_IN();
   6988     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   6989     PUSH32(esp, edx); /* 0x3100B736: push edx */
   6990     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   6991     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   6992     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   6993     RECOMP_FLAGS_IN();
   6994     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   6995     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   6996     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   6997     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   6998     _flag_k = FK_ADD;
   6999     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   7000     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   7001     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   7002     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   7003     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   7004     esp = ebp; /* 0x3100B755: mov esp, ebp */
   7005     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   7006     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   7007 L_310478E0:
   7008     ecx = ebp + (-0x70); /* 0x310478E0: lea ecx, [ebp - 0x70] */
   7009     RECOMP_BACKEDGE();
   7010     goto L_3100B670; /* 0x310478E3: jmp 0x3100b670 */
   7011     { RECOMP_REGS_OUT(); return; } /* end of function */
   7012     RECOMP_REGS_OUT();
   7013 }
   7014 
   7015 void sub_310478E8(void) {
   7016     int _fpu_cmp = 0;
   7017     uint32_t _cf = 0;
   7018     int _df = 1;
   7019     uint32_t _flag_k = FK_NONE;
   7020     uint32_t _flag_a = 0, _flag_b = 0;
   7021     uint32_t _itail_tgt = 0;
   7022     RECOMP_REGS_LOCALS
   7023     RECOMP_ENTER(0x310478E8u);
   7024 
   7025 L_310478E8:
   7026     ecx = ebp + (-0x30); /* 0x310478E8: lea ecx, [ebp - 0x30] */
   7027 L_310478EB:
   7028     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   7029     { RECOMP_REGS_OUT(); return; } /* end of function */
   7030   _ljump:
   7031     switch (_itail_tgt) {
   7032       case 0x310478E8u: goto L_310478E8;
   7033       case 0x310478EBu: goto L_310478EB;
   7034       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   7035     }
   7036     RECOMP_REGS_OUT();
   7037 }
   7038 
   7039 void sub_310478F1(void) {
   7040     int _fpu_cmp = 0;
   7041     uint32_t _cf = 0;
   7042     int _df = 1;
   7043     uint32_t _flag_k = FK_NONE;
   7044     uint32_t _flag_a = 0, _flag_b = 0;
   7045     uint32_t _itail_tgt = 0;
   7046     RECOMP_REGS_LOCALS
   7047     RECOMP_ENTER(0x310478F1u);
   7048 
   7049 L_310478F1:
   7050     ecx = ebp + (-0x20); /* 0x310478F1: lea ecx, [ebp - 0x20] */
   7051 L_310478F4:
   7052     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   7053     { RECOMP_REGS_OUT(); return; } /* end of function */
   7054   _ljump:
   7055     switch (_itail_tgt) {
   7056       case 0x310478F1u: goto L_310478F1;
   7057       case 0x310478F4u: goto L_310478F4;
   7058       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   7059     }
   7060     RECOMP_REGS_OUT();
   7061 }
   7062 
   7063 void sub_310478FA(void) {
   7064     int _fpu_cmp = 0;
   7065     uint32_t _cf = 0;
   7066     int _df = 1;
   7067     uint32_t _flag_k = FK_NONE;
   7068     uint32_t _flag_a = 0, _flag_b = 0;
   7069     uint32_t _itail_tgt = 0;
   7070     RECOMP_REGS_LOCALS
   7071     RECOMP_ENTER(0x310478FAu);
   7072 
   7073 L_310478FA:
   7074     eax = MEM32(ebp + (-0x10)); /* 0x310478FA: mov eax, dword ptr [ebp - 0x10] */
   7075 L_310478FD:
   7076     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   7077     eax = eax & 1; /* 0x310478FD: and eax, 1 */
   7078     _cf = 0;
   7079     _flag_k = FK_TEST;
   7080 L_31047900:
   7081     /* test eax, eax */ /* 0x31047900: test eax, eax */
   7082     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   7083     _cf = 0;
   7084     _flag_k = FK_TEST;
   7085 L_31047902:
   7086     if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_31047911; /* 0x31047902: je 0x31047911 */
   7087 L_31047908:
   7088     ecx = MEM32(ebp + 0x8); /* 0x31047908: mov ecx, dword ptr [ebp + 8] */
   7089 L_3104790B:
   7090     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   7091 L_31047911:
   7092     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31047911: ret  */
   7093   _ljump:
   7094     switch (_itail_tgt) {
   7095       case 0x310478FAu: goto L_310478FA;
   7096       case 0x310478FDu: goto L_310478FD;
   7097       case 0x31047900u: goto L_31047900;
   7098       case 0x31047902u: goto L_31047902;
   7099       case 0x31047908u: goto L_31047908;
   7100       case 0x3104790Bu: goto L_3104790B;
   7101       case 0x31047911u: goto L_31047911;
   7102       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   7103     }
   7104     RECOMP_REGS_OUT();
   7105 }
   7106 
   7107 void sub_31047912(void) {
   7108     int _fpu_cmp = 0;
   7109     uint32_t _cf = 0;
   7110     int _df = 1;
   7111     uint32_t _flag_k = FK_NONE;
   7112     uint32_t _flag_a = 0, _flag_b = 0;
   7113     uint32_t _itail_tgt = 0;
   7114     RECOMP_REGS_LOCALS
   7115     RECOMP_ENTER(0x31047912u);
   7116 
   7117     goto L_31047912;
   7118 L_3100B790:
   7119     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   7120     ebp = esp; /* 0x3100B791: mov ebp, esp */
   7121     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   7122     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7123     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   7124     _flag_k = FK_CMP;
   7125     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   7126     PUSH32(esp, esi); /* 0x3100B797: push esi */
   7127     esi = ecx; /* 0x3100B798: mov esi, ecx */
   7128     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   7129     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   7130     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   7131     _cf = 0;
   7132     _flag_k = FK_TEST;
   7133     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   7134     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   7135     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   7136     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   7137     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   7138 L_3100B7AA:
   7139     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   7140     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   7141     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   7142     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7143     _flag_k = FK_CMP;
   7144     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   7145 L_3100B7B0:
   7146     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   7147     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   7148     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7149     _flag_k = FK_CMP;
   7150     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   7151 L_3100B7B4:
   7152     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   7153     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   7154     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   7155     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7156     _flag_k = FK_CMP;
   7157     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   7158     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   7159 L_3100B7BE:
   7160     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   7161     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   7162     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   7163     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   7164     RECOMP_FLAGS_IN();
   7165     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   7166     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   7167     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   7168     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   7169     RECOMP_FLAGS_IN();
   7170     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   7171     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   7172     RECOMP_FLAGS_IN();
   7173     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   7174     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7175     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7176     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   7177     _flag_k = FK_ADD;
   7178     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   7179     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   7180     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7181     _flag_k = FK_CMP;
   7182     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   7183     RECOMP_BACKEDGE();
   7184     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   7185 L_3100B7E7:
   7186     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   7187     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   7188     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   7189     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   7190     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   7191     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   7192     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   7193     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   7194     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   7195     PUSH32(esp, eax); /* 0x3100B805: push eax */
   7196     ecx = esi; /* 0x3100B806: mov ecx, esi */
   7197     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   7198     RECOMP_FLAGS_IN();
   7199     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   7200 L_3100B80F:
   7201     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   7202     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   7203     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7204     _flag_k = FK_CMP;
   7205     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   7206 L_3100B813:
   7207     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   7208     ebx = eax; /* 0x3100B816: mov ebx, eax */
   7209     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   7210     RECOMP_FLAGS_IN();
   7211     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   7212     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   7213     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   7214     ecx = esi; /* 0x3100B822: mov ecx, esi */
   7215     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   7216     RECOMP_FLAGS_IN();
   7217     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   7218     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   7219     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   7220     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7221     _flag_k = FK_CMP;
   7222     RECOMP_BACKEDGE();
   7223     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   7224 L_3100B830:
   7225     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   7226     PUSH32(esp, edx); /* 0x3100B833: push edx */
   7227     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   7228     RECOMP_FLAGS_IN();
   7229     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   7230     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7231     edi = 0; /* 0x3100B83C: xor edi, edi */
   7232     _cf = 0;
   7233     _flag_k = FK_TEST;
   7234     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   7235     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   7236     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   7237     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   7238     RECOMP_FLAGS_IN();
   7239     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   7240     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7241     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   7242     _flag_k = FK_ADD;
   7243     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   7244     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   7245     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   7246     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   7247     esp = ebp; /* 0x3100B853: mov esp, ebp */
   7248     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   7249     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   7250 L_31047912:
   7251     ecx = ebp + (-0x6C); /* 0x31047912: lea ecx, [ebp - 0x6c] */
   7252     RECOMP_BACKEDGE();
   7253     goto L_3100B790; /* 0x31047915: jmp 0x3100b790 */
   7254     { RECOMP_REGS_OUT(); return; } /* end of function */
   7255     RECOMP_REGS_OUT();
   7256 }
   7257 
   7258 void sub_3104791A(void) {
   7259     int _fpu_cmp = 0;
   7260     uint32_t _cf = 0;
   7261     int _df = 1;
   7262     uint32_t _flag_k = FK_NONE;
   7263     uint32_t _flag_a = 0, _flag_b = 0;
   7264     uint32_t _itail_tgt = 0;
   7265     RECOMP_REGS_LOCALS
   7266     RECOMP_ENTER(0x3104791Au);
   7267 
   7268     goto L_3104791A;
   7269 L_31004880:
   7270     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   7271     ebp = esp; /* 0x31004881: mov ebp, esp */
   7272     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   7273     PUSH32(esp, esi); /* 0x31004884: push esi */
   7274     esi = ecx; /* 0x31004885: mov esi, ecx */
   7275     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   7276     PUSH32(esp, eax); /* 0x3100488A: push eax */
   7277     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   7278     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   7279     RECOMP_FLAGS_IN();
   7280     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7281     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7282     esp = esp + 4; /* 0x31004893: add esp, 4 */
   7283     _flag_k = FK_ADD;
   7284     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7285     eax = 0; /* 0x31004896: xor eax, eax */
   7286     _cf = 0;
   7287     _flag_k = FK_TEST;
   7288     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   7289     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   7290     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   7291     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   7292     esp = ebp; /* 0x310048A2: mov esp, ebp */
   7293     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   7294     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   7295 L_3104791A:
   7296     ecx = ebp + (-0x40); /* 0x3104791A: lea ecx, [ebp - 0x40] */
   7297     RECOMP_BACKEDGE();
   7298     goto L_31004880; /* 0x3104791D: jmp 0x31004880 */
   7299     { RECOMP_REGS_OUT(); return; } /* end of function */
   7300     RECOMP_REGS_OUT();
   7301 }
   7302 
   7303 void sub_31047922(void) {
   7304     int _fpu_cmp = 0;
   7305     uint32_t _cf = 0;
   7306     int _df = 1;
   7307     uint32_t _flag_k = FK_NONE;
   7308     uint32_t _flag_a = 0, _flag_b = 0;
   7309     uint32_t _itail_tgt = 0;
   7310     RECOMP_REGS_LOCALS
   7311     RECOMP_ENTER(0x31047922u);
   7312 
   7313     goto L_31047922;
   7314 L_31046870:
   7315     { _itail_tgt = (uint32_t)(MEM32(0x31048200)); goto _ljump; }
   7316 L_31047922:
   7317     eax = 0x31049CB0u; /* 0x31047922: mov eax, 0x31049cb0 */
   7318 L_31047927:
   7319     RECOMP_BACKEDGE();
   7320     goto L_31046870; /* 0x31047927: jmp 0x31046870 */
   7321     { RECOMP_REGS_OUT(); return; } /* end of function */
   7322   _ljump:
   7323     switch (_itail_tgt) {
   7324       case 0x31046870u: goto L_31046870;
   7325       case 0x31047922u: goto L_31047922;
   7326       case 0x31047927u: goto L_31047927;
   7327       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   7328     }
   7329     RECOMP_REGS_OUT();
   7330 }
   7331 
   7332 void sub_31047930(void) {
   7333     int _fpu_cmp = 0;
   7334     uint32_t _cf = 0;
   7335     int _df = 1;
   7336     uint32_t _flag_k = FK_NONE;
   7337     uint32_t _flag_a = 0, _flag_b = 0;
   7338     uint32_t _itail_tgt = 0;
   7339     RECOMP_REGS_LOCALS
   7340     RECOMP_ENTER(0x31047930u);
   7341 
   7342     goto L_31047930;
   7343 L_3100B670:
   7344     PUSH32(esp, ebp); /* 0x3100B670: push ebp */
   7345     ebp = esp; /* 0x3100B671: mov ebp, esp */
   7346     PUSH32(esp, 0xFFFFFFFFu); /* 0x3100B673: push -1 */
   7347     PUSH32(esp, 0x31047546u); /* 0x3100B675: push 0x31047546 */
   7348     eax = MEM32(FS_BASE + (0)); /* 0x3100B67A: mov eax, dword ptr fs:[0] */
   7349     PUSH32(esp, eax); /* 0x3100B680: push eax */
   7350     MEM32(FS_BASE + (0)) = esp; /* 0x3100B681: mov dword ptr fs:[0], esp */
   7351     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   7352     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7353     esp = esp - 8; /* 0x3100B688: sub esp, 8 */
   7354     _flag_k = FK_CMP;
   7355     PUSH32(esp, ebx); /* 0x3100B68B: push ebx */
   7356     PUSH32(esp, esi); /* 0x3100B68C: push esi */
   7357     esi = ecx; /* 0x3100B68D: mov esi, ecx */
   7358     PUSH32(esp, edi); /* 0x3100B68F: push edi */
   7359     MEM32(ebp + (-0x10)) = esi; /* 0x3100B690: mov dword ptr [ebp - 0x10], esi */
   7360     MEM32(esi) = 0x3104876Cu; /* 0x3100B693: mov dword ptr [esi], 0x3104876c */
   7361     MEM32(ebp + (-0x4)) = 1; /* 0x3100B699: mov dword ptr [ebp - 4], 1 */
   7362     RECOMP_ICALL(MEM32(0x310482F8)); /* 0x3100B6A0: call dword ptr [0x310482f8] */
   7363     RECOMP_FLAGS_IN();
   7364     eax = MEM32(esi + 0x34); /* 0x3100B6A6: mov eax, dword ptr [esi + 0x34] */
   7365     PUSH32(esp, eax); /* 0x3100B6A9: push eax */
   7366     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6AA: mov dword ptr [ebp - 0x10], eax */
   7367     RECOMP_ICALL(0x31046858u); /* 0x3100B6AD: call 0x31046858 */ /* not lifted */
   7368     RECOMP_FLAGS_IN();
   7369     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7370     ebx = 0; /* 0x3100B6B2: xor ebx, ebx */
   7371     _cf = 0;
   7372     _flag_k = FK_TEST;
   7373     MEM32(esi + 0x34) = ebx; /* 0x3100B6B4: mov dword ptr [esi + 0x34], ebx */
   7374     MEM32(esi + 0x38) = ebx; /* 0x3100B6B7: mov dword ptr [esi + 0x38], ebx */
   7375     MEM32(esi + 0x3C) = ebx; /* 0x3100B6BA: mov dword ptr [esi + 0x3c], ebx */
   7376     edi = MEM32(esi + 0x8); /* 0x3100B6BD: mov edi, dword ptr [esi + 8] */
   7377     ecx = MEM32(esi + 0x14); /* 0x3100B6C0: mov ecx, dword ptr [esi + 0x14] */
   7378     eax = MEM32(edi); /* 0x3100B6C3: mov eax, dword ptr [edi] */
   7379     _flag_a = (uint32_t)(esi); _flag_b = (uint32_t)(4);
   7380     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7381     esi = esi + 4; /* 0x3100B6C5: add esi, 4 */
   7382     _flag_k = FK_ADD;
   7383     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7384     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7385     esp = esp + 4; /* 0x3100B6C8: add esp, 4 */
   7386     _flag_k = FK_ADD;
   7387     /* cmp ecx, ebx */ /* 0x3100B6CB: cmp ecx, ebx */
   7388     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ebx);
   7389     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7390     _flag_k = FK_CMP;
   7391     MEM32(ebp + (-0x4)) = 0xFFFFFFFFu; /* 0x3100B6CD: mov dword ptr [ebp - 4], 0xffffffff */
   7392     MEM32(ebp + (-0x10)) = eax; /* 0x3100B6D4: mov dword ptr [ebp - 0x10], eax */
   7393     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6D7: je 0x3100b707 */
   7394 L_3100B6D9:
   7395     ecx = eax; /* 0x3100B6D9: mov ecx, eax */
   7396     /* cmp eax, ecx */ /* 0x3100B6DB: cmp eax, ecx */
   7397     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   7398     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7399     _flag_k = FK_CMP;
   7400     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6DD: jne 0x3100b707 */
   7401 L_3100B6DF:
   7402     /* cmp edi, edi */ /* 0x3100B6DF: cmp edi, edi */
   7403     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   7404     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7405     _flag_k = FK_CMP;
   7406     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B707; /* 0x3100B6E1: jne 0x3100b707 */
   7407 L_3100B6E3:
   7408     eax = MEM32(edi + 0x4); /* 0x3100B6E3: mov eax, dword ptr [edi + 4] */
   7409     PUSH32(esp, eax); /* 0x3100B6E6: push eax */
   7410     ecx = esi; /* 0x3100B6E7: mov ecx, esi */
   7411     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B6E9: call 0x3100e8b0 */ /* not lifted */
   7412     RECOMP_FLAGS_IN();
   7413     ecx = MEM32(esi + 0x4); /* 0x3100B6EE: mov ecx, dword ptr [esi + 4] */
   7414     edx = MEM32(esi + 0x8); /* 0x3100B6F1: mov edx, dword ptr [esi + 8] */
   7415     MEM32(ecx + 0x4) = edx; /* 0x3100B6F4: mov dword ptr [ecx + 4], edx */
   7416     eax = MEM32(esi + 0x4); /* 0x3100B6F7: mov eax, dword ptr [esi + 4] */
   7417     MEM32(esi + 0x10) = ebx; /* 0x3100B6FA: mov dword ptr [esi + 0x10], ebx */
   7418     MEM32(eax) = eax; /* 0x3100B6FD: mov dword ptr [eax], eax */
   7419     eax = MEM32(esi + 0x4); /* 0x3100B6FF: mov eax, dword ptr [esi + 4] */
   7420     MEM32(eax + 0x8) = eax; /* 0x3100B702: mov dword ptr [eax + 8], eax */
   7421     goto L_3100B72A; /* 0x3100B705: jmp 0x3100b72a */
   7422 L_3100B707:
   7423     /* cmp eax, edi */ /* 0x3100B707: cmp eax, edi */
   7424     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   7425     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7426     _flag_k = FK_CMP;
   7427     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B72A; /* 0x3100B709: je 0x3100b72a */
   7428 L_3100B70B:
   7429     ecx = ebp + (-0x10); /* 0x3100B70B: lea ecx, [ebp - 0x10] */
   7430     ebx = eax; /* 0x3100B70E: mov ebx, eax */
   7431     RECOMP_ICALL(0x3100EC20u); /* 0x3100B710: call 0x3100ec20 */ /* not lifted */
   7432     RECOMP_FLAGS_IN();
   7433     PUSH32(esp, ebx); /* 0x3100B715: push ebx */
   7434     eax = ebp + (-0x14); /* 0x3100B716: lea eax, [ebp - 0x14] */
   7435     PUSH32(esp, eax); /* 0x3100B719: push eax */
   7436     ecx = esi; /* 0x3100B71A: mov ecx, esi */
   7437     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B71C: call 0x3100e4e0 */ /* not lifted */
   7438     RECOMP_FLAGS_IN();
   7439     eax = MEM32(ebp + (-0x10)); /* 0x3100B721: mov eax, dword ptr [ebp - 0x10] */
   7440     /* cmp eax, edi */ /* 0x3100B724: cmp eax, edi */
   7441     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   7442     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7443     _flag_k = FK_CMP;
   7444     RECOMP_BACKEDGE();
   7445     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B70B; /* 0x3100B726: jne 0x3100b70b */
   7446 L_3100B728:
   7447     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7448     ebx = 0; /* 0x3100B728: xor ebx, ebx */
   7449     _cf = 0;
   7450     _flag_k = FK_TEST;
   7451 L_3100B72A:
   7452     ecx = MEM32(esi + 0x4); /* 0x3100B72A: mov ecx, dword ptr [esi + 4] */
   7453     PUSH32(esp, ecx); /* 0x3100B72D: push ecx */
   7454     RECOMP_ICALL(0x31046858u); /* 0x3100B72E: call 0x31046858 */ /* not lifted */
   7455     RECOMP_FLAGS_IN();
   7456     edx = MEM32(esi + 0x8); /* 0x3100B733: mov edx, dword ptr [esi + 8] */
   7457     PUSH32(esp, edx); /* 0x3100B736: push edx */
   7458     MEM32(esi + 0x4) = ebx; /* 0x3100B737: mov dword ptr [esi + 4], ebx */
   7459     MEM32(esi + 0x10) = ebx; /* 0x3100B73A: mov dword ptr [esi + 0x10], ebx */
   7460     RECOMP_ICALL(0x31046858u); /* 0x3100B73D: call 0x31046858 */ /* not lifted */
   7461     RECOMP_FLAGS_IN();
   7462     ecx = MEM32(ebp + (-0xC)); /* 0x3100B742: mov ecx, dword ptr [ebp - 0xc] */
   7463     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   7464     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7465     esp = esp + 8; /* 0x3100B745: add esp, 8 */
   7466     _flag_k = FK_ADD;
   7467     MEM32(esi + 0x8) = ebx; /* 0x3100B748: mov dword ptr [esi + 8], ebx */
   7468     edi = POP32_VAL(esp); /* 0x3100B74B: pop edi */
   7469     esi = POP32_VAL(esp); /* 0x3100B74C: pop esi */
   7470     ebx = POP32_VAL(esp); /* 0x3100B74D: pop ebx */
   7471     MEM32(FS_BASE + (0)) = ecx; /* 0x3100B74E: mov dword ptr fs:[0], ecx */
   7472     esp = ebp; /* 0x3100B755: mov esp, ebp */
   7473     ebp = POP32_VAL(esp); /* 0x3100B757: pop ebp */
   7474     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B758: ret  */
   7475 L_31047930:
   7476     ecx = ebp + (-0x70); /* 0x31047930: lea ecx, [ebp - 0x70] */
   7477     RECOMP_BACKEDGE();
   7478     goto L_3100B670; /* 0x31047933: jmp 0x3100b670 */
   7479     { RECOMP_REGS_OUT(); return; } /* end of function */
   7480     RECOMP_REGS_OUT();
   7481 }
   7482 
   7483 void sub_31047938(void) {
   7484     int _fpu_cmp = 0;
   7485     uint32_t _cf = 0;
   7486     int _df = 1;
   7487     uint32_t _flag_k = FK_NONE;
   7488     uint32_t _flag_a = 0, _flag_b = 0;
   7489     uint32_t _itail_tgt = 0;
   7490     RECOMP_REGS_LOCALS
   7491     RECOMP_ENTER(0x31047938u);
   7492 
   7493 L_31047938:
   7494     ecx = ebp + (-0x30); /* 0x31047938: lea ecx, [ebp - 0x30] */
   7495 L_3104793B:
   7496     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   7497     { RECOMP_REGS_OUT(); return; } /* end of function */
   7498   _ljump:
   7499     switch (_itail_tgt) {
   7500       case 0x31047938u: goto L_31047938;
   7501       case 0x3104793Bu: goto L_3104793B;
   7502       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   7503     }
   7504     RECOMP_REGS_OUT();
   7505 }
   7506 
   7507 void sub_31047941(void) {
   7508     int _fpu_cmp = 0;
   7509     uint32_t _cf = 0;
   7510     int _df = 1;
   7511     uint32_t _flag_k = FK_NONE;
   7512     uint32_t _flag_a = 0, _flag_b = 0;
   7513     uint32_t _itail_tgt = 0;
   7514     RECOMP_REGS_LOCALS
   7515     RECOMP_ENTER(0x31047941u);
   7516 
   7517 L_31047941:
   7518     ecx = ebp + (-0x20); /* 0x31047941: lea ecx, [ebp - 0x20] */
   7519 L_31047944:
   7520     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   7521     { RECOMP_REGS_OUT(); return; } /* end of function */
   7522   _ljump:
   7523     switch (_itail_tgt) {
   7524       case 0x31047941u: goto L_31047941;
   7525       case 0x31047944u: goto L_31047944;
   7526       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   7527     }
   7528     RECOMP_REGS_OUT();
   7529 }
   7530 
   7531 void sub_3104794A(void) {
   7532     int _fpu_cmp = 0;
   7533     uint32_t _cf = 0;
   7534     int _df = 1;
   7535     uint32_t _flag_k = FK_NONE;
   7536     uint32_t _flag_a = 0, _flag_b = 0;
   7537     uint32_t _itail_tgt = 0;
   7538     RECOMP_REGS_LOCALS
   7539     RECOMP_ENTER(0x3104794Au);
   7540 
   7541 L_3104794A:
   7542     eax = MEM32(ebp + (-0x10)); /* 0x3104794A: mov eax, dword ptr [ebp - 0x10] */
   7543 L_3104794D:
   7544     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(1);
   7545     eax = eax & 1; /* 0x3104794D: and eax, 1 */
   7546     _cf = 0;
   7547     _flag_k = FK_TEST;
   7548 L_31047950:
   7549     /* test eax, eax */ /* 0x31047950: test eax, eax */
   7550     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(eax);
   7551     _cf = 0;
   7552     _flag_k = FK_TEST;
   7553 L_31047952:
   7554     if (recomp_cond_cf(_flag_k, _flag_a, _flag_b, CC_E, _cf)) goto L_31047961; /* 0x31047952: je 0x31047961 */
   7555 L_31047958:
   7556     ecx = MEM32(ebp + 0x8); /* 0x31047958: mov ecx, dword ptr [ebp + 8] */
   7557 L_3104795B:
   7558     { _itail_tgt = (uint32_t)(MEM32(0x310480C8)); goto _ljump; }
   7559 L_31047961:
   7560     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x31047961: ret  */
   7561   _ljump:
   7562     switch (_itail_tgt) {
   7563       case 0x3104794Au: goto L_3104794A;
   7564       case 0x3104794Du: goto L_3104794D;
   7565       case 0x31047950u: goto L_31047950;
   7566       case 0x31047952u: goto L_31047952;
   7567       case 0x31047958u: goto L_31047958;
   7568       case 0x3104795Bu: goto L_3104795B;
   7569       case 0x31047961u: goto L_31047961;
   7570       default: RECOMP_ITAIL(_itail_tgt); { RECOMP_REGS_OUT(); return; }
   7571     }
   7572     RECOMP_REGS_OUT();
   7573 }
   7574 
   7575 void sub_31047962(void) {
   7576     int _fpu_cmp = 0;
   7577     uint32_t _cf = 0;
   7578     int _df = 1;
   7579     uint32_t _flag_k = FK_NONE;
   7580     uint32_t _flag_a = 0, _flag_b = 0;
   7581     uint32_t _itail_tgt = 0;
   7582     RECOMP_REGS_LOCALS
   7583     RECOMP_ENTER(0x31047962u);
   7584 
   7585     goto L_31047962;
   7586 L_3100B790:
   7587     PUSH32(esp, ebp); /* 0x3100B790: push ebp */
   7588     ebp = esp; /* 0x3100B791: mov ebp, esp */
   7589     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   7590     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7591     esp = esp - 8; /* 0x3100B793: sub esp, 8 */
   7592     _flag_k = FK_CMP;
   7593     PUSH32(esp, ebx); /* 0x3100B796: push ebx */
   7594     PUSH32(esp, esi); /* 0x3100B797: push esi */
   7595     esi = ecx; /* 0x3100B798: mov esi, ecx */
   7596     ecx = MEM32(esi + 0x10); /* 0x3100B79A: mov ecx, dword ptr [esi + 0x10] */
   7597     /* test ecx, ecx */ /* 0x3100B79D: test ecx, ecx */
   7598     _flag_a = (uint32_t)(ecx); _flag_b = (uint32_t)(ecx);
   7599     _cf = 0;
   7600     _flag_k = FK_TEST;
   7601     PUSH32(esp, edi); /* 0x3100B79F: push edi */
   7602     edi = MEM32(esi + 0x4); /* 0x3100B7A0: mov edi, dword ptr [esi + 4] */
   7603     eax = MEM32(edi); /* 0x3100B7A3: mov eax, dword ptr [edi] */
   7604     MEM32(ebp + (-0x4)) = eax; /* 0x3100B7A5: mov dword ptr [ebp - 4], eax */
   7605     if (TEST_Z(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7A8: je 0x3100b80f */
   7606 L_3100B7AA:
   7607     ecx = eax; /* 0x3100B7AA: mov ecx, eax */
   7608     /* cmp eax, ecx */ /* 0x3100B7AC: cmp eax, ecx */
   7609     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(ecx);
   7610     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7611     _flag_k = FK_CMP;
   7612     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7AE: jne 0x3100b80f */
   7613 L_3100B7B0:
   7614     /* cmp edi, edi */ /* 0x3100B7B0: cmp edi, edi */
   7615     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(edi);
   7616     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7617     _flag_k = FK_CMP;
   7618     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B80F; /* 0x3100B7B2: jne 0x3100b80f */
   7619 L_3100B7B4:
   7620     ebx = MEM32(edi + 0x4); /* 0x3100B7B4: mov ebx, dword ptr [edi + 4] */
   7621     /* cmp ebx, MEM32(esi + 0x8) */ /* 0x3100B7B7: cmp ebx, dword ptr [esi + 8] */
   7622     _flag_a = (uint32_t)(ebx); _flag_b = (uint32_t)(MEM32(esi + 0x8));
   7623     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7624     _flag_k = FK_CMP;
   7625     edi = ebx; /* 0x3100B7BA: mov edi, ebx */
   7626     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B7E7; /* 0x3100B7BC: je 0x3100b7e7 */
   7627 L_3100B7BE:
   7628     eax = MEM32(edi + 0x8); /* 0x3100B7BE: mov eax, dword ptr [edi + 8] */
   7629     PUSH32(esp, eax); /* 0x3100B7C1: push eax */
   7630     ecx = esi; /* 0x3100B7C2: mov ecx, esi */
   7631     RECOMP_ICALL(0x3100E8B0u); /* 0x3100B7C4: call 0x3100e8b0 */ /* not lifted */
   7632     RECOMP_FLAGS_IN();
   7633     edi = MEM32(edi); /* 0x3100B7C9: mov edi, dword ptr [edi] */
   7634     PUSH32(esp, 0); /* 0x3100B7CB: push 0 */
   7635     ecx = ebx + 0xC; /* 0x3100B7CD: lea ecx, [ebx + 0xc] */
   7636     RECOMP_ICALL(0x3100EE50u); /* 0x3100B7D0: call 0x3100ee50 */ /* not lifted */
   7637     RECOMP_FLAGS_IN();
   7638     PUSH32(esp, ebx); /* 0x3100B7D5: push ebx */
   7639     RECOMP_ICALL(0x31046858u); /* 0x3100B7D6: call 0x31046858 */ /* not lifted */
   7640     RECOMP_FLAGS_IN();
   7641     eax = MEM32(esi + 0x8); /* 0x3100B7DB: mov eax, dword ptr [esi + 8] */
   7642     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7643     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7644     esp = esp + 4; /* 0x3100B7DE: add esp, 4 */
   7645     _flag_k = FK_ADD;
   7646     /* cmp edi, eax */ /* 0x3100B7E1: cmp edi, eax */
   7647     _flag_a = (uint32_t)(edi); _flag_b = (uint32_t)(eax);
   7648     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7649     _flag_k = FK_CMP;
   7650     ebx = edi; /* 0x3100B7E3: mov ebx, edi */
   7651     RECOMP_BACKEDGE();
   7652     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B7BE; /* 0x3100B7E5: jne 0x3100b7be */
   7653 L_3100B7E7:
   7654     ecx = MEM32(esi + 0x4); /* 0x3100B7E7: mov ecx, dword ptr [esi + 4] */
   7655     edx = MEM32(esi + 0x8); /* 0x3100B7EA: mov edx, dword ptr [esi + 8] */
   7656     MEM32(ecx + 0x4) = edx; /* 0x3100B7ED: mov dword ptr [ecx + 4], edx */
   7657     eax = MEM32(esi + 0x4); /* 0x3100B7F0: mov eax, dword ptr [esi + 4] */
   7658     MEM32(esi + 0x10) = 0; /* 0x3100B7F3: mov dword ptr [esi + 0x10], 0 */
   7659     MEM32(eax) = eax; /* 0x3100B7FA: mov dword ptr [eax], eax */
   7660     eax = MEM32(esi + 0x4); /* 0x3100B7FC: mov eax, dword ptr [esi + 4] */
   7661     MEM32(eax + 0x8) = eax; /* 0x3100B7FF: mov dword ptr [eax + 8], eax */
   7662     eax = ebp + (-0x8); /* 0x3100B802: lea eax, [ebp - 8] */
   7663     PUSH32(esp, eax); /* 0x3100B805: push eax */
   7664     ecx = esi; /* 0x3100B806: mov ecx, esi */
   7665     RECOMP_ICALL(0x3100E400u); /* 0x3100B808: call 0x3100e400 */ /* not lifted */
   7666     RECOMP_FLAGS_IN();
   7667     goto L_3100B830; /* 0x3100B80D: jmp 0x3100b830 */
   7668 L_3100B80F:
   7669     /* cmp eax, edi */ /* 0x3100B80F: cmp eax, edi */
   7670     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   7671     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7672     _flag_k = FK_CMP;
   7673     if (CMP_EQ(_flag_a, _flag_b)) goto L_3100B830; /* 0x3100B811: je 0x3100b830 */
   7674 L_3100B813:
   7675     ecx = ebp + (-0x4); /* 0x3100B813: lea ecx, [ebp - 4] */
   7676     ebx = eax; /* 0x3100B816: mov ebx, eax */
   7677     RECOMP_ICALL(0x3100EC20u); /* 0x3100B818: call 0x3100ec20 */ /* not lifted */
   7678     RECOMP_FLAGS_IN();
   7679     PUSH32(esp, ebx); /* 0x3100B81D: push ebx */
   7680     ecx = ebp + (-0x8); /* 0x3100B81E: lea ecx, [ebp - 8] */
   7681     PUSH32(esp, ecx); /* 0x3100B821: push ecx */
   7682     ecx = esi; /* 0x3100B822: mov ecx, esi */
   7683     RECOMP_ICALL(0x3100E4E0u); /* 0x3100B824: call 0x3100e4e0 */ /* not lifted */
   7684     RECOMP_FLAGS_IN();
   7685     eax = MEM32(ebp + (-0x4)); /* 0x3100B829: mov eax, dword ptr [ebp - 4] */
   7686     /* cmp eax, edi */ /* 0x3100B82C: cmp eax, edi */
   7687     _flag_a = (uint32_t)(eax); _flag_b = (uint32_t)(edi);
   7688     _cf = (uint32_t)CMP_B(_flag_a, _flag_b);
   7689     _flag_k = FK_CMP;
   7690     RECOMP_BACKEDGE();
   7691     if (CMP_NE(_flag_a, _flag_b)) goto L_3100B813; /* 0x3100B82E: jne 0x3100b813 */
   7692 L_3100B830:
   7693     edx = MEM32(esi + 0x4); /* 0x3100B830: mov edx, dword ptr [esi + 4] */
   7694     PUSH32(esp, edx); /* 0x3100B833: push edx */
   7695     RECOMP_ICALL(0x31046858u); /* 0x3100B834: call 0x31046858 */ /* not lifted */
   7696     RECOMP_FLAGS_IN();
   7697     eax = MEM32(esi + 0x8); /* 0x3100B839: mov eax, dword ptr [esi + 8] */
   7698     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7699     edi = 0; /* 0x3100B83C: xor edi, edi */
   7700     _cf = 0;
   7701     _flag_k = FK_TEST;
   7702     PUSH32(esp, eax); /* 0x3100B83E: push eax */
   7703     MEM32(esi + 0x4) = edi; /* 0x3100B83F: mov dword ptr [esi + 4], edi */
   7704     MEM32(esi + 0x10) = edi; /* 0x3100B842: mov dword ptr [esi + 0x10], edi */
   7705     RECOMP_ICALL(0x31046858u); /* 0x3100B845: call 0x31046858 */ /* not lifted */
   7706     RECOMP_FLAGS_IN();
   7707     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(8);
   7708     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7709     esp = esp + 8; /* 0x3100B84A: add esp, 8 */
   7710     _flag_k = FK_ADD;
   7711     MEM32(esi + 0x8) = edi; /* 0x3100B84D: mov dword ptr [esi + 8], edi */
   7712     edi = POP32_VAL(esp); /* 0x3100B850: pop edi */
   7713     esi = POP32_VAL(esp); /* 0x3100B851: pop esi */
   7714     ebx = POP32_VAL(esp); /* 0x3100B852: pop ebx */
   7715     esp = ebp; /* 0x3100B853: mov esp, ebp */
   7716     ebp = POP32_VAL(esp); /* 0x3100B855: pop ebp */
   7717     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x3100B856: ret  */
   7718 L_31047962:
   7719     ecx = ebp + (-0x6C); /* 0x31047962: lea ecx, [ebp - 0x6c] */
   7720     RECOMP_BACKEDGE();
   7721     goto L_3100B790; /* 0x31047965: jmp 0x3100b790 */
   7722     { RECOMP_REGS_OUT(); return; } /* end of function */
   7723     RECOMP_REGS_OUT();
   7724 }
   7725 
   7726 void sub_3104796A(void) {
   7727     int _fpu_cmp = 0;
   7728     uint32_t _cf = 0;
   7729     int _df = 1;
   7730     uint32_t _flag_k = FK_NONE;
   7731     uint32_t _flag_a = 0, _flag_b = 0;
   7732     uint32_t _itail_tgt = 0;
   7733     RECOMP_REGS_LOCALS
   7734     RECOMP_ENTER(0x3104796Au);
   7735 
   7736     goto L_3104796A;
   7737 L_31004880:
   7738     PUSH32(esp, ebp); /* 0x31004880: push ebp */
   7739     ebp = esp; /* 0x31004881: mov ebp, esp */
   7740     PUSH32(esp, ecx); /* 0x31004883: push ecx */
   7741     PUSH32(esp, esi); /* 0x31004884: push esi */
   7742     esi = ecx; /* 0x31004885: mov esi, ecx */
   7743     eax = MEM32(esi + 0x4); /* 0x31004887: mov eax, dword ptr [esi + 4] */
   7744     PUSH32(esp, eax); /* 0x3100488A: push eax */
   7745     MEM32(ebp + (-0x4)) = eax; /* 0x3100488B: mov dword ptr [ebp - 4], eax */
   7746     RECOMP_ICALL(0x31046858u); /* 0x3100488E: call 0x31046858 */ /* not lifted */
   7747     RECOMP_FLAGS_IN();
   7748     _flag_a = (uint32_t)(esp); _flag_b = (uint32_t)(4);
   7749     _cf = (uint32_t)((uint32_t)(_flag_a + _flag_b) < (uint32_t)_flag_a);
   7750     esp = esp + 4; /* 0x31004893: add esp, 4 */
   7751     _flag_k = FK_ADD;
   7752     _flag_a = (uint32_t)(0); _flag_b = (uint32_t)(0);
   7753     eax = 0; /* 0x31004896: xor eax, eax */
   7754     _cf = 0;
   7755     _flag_k = FK_TEST;
   7756     MEM32(esi + 0x4) = eax; /* 0x31004898: mov dword ptr [esi + 4], eax */
   7757     MEM32(esi + 0x8) = eax; /* 0x3100489B: mov dword ptr [esi + 8], eax */
   7758     MEM32(esi + 0xC) = eax; /* 0x3100489E: mov dword ptr [esi + 0xc], eax */
   7759     esi = POP32_VAL(esp); /* 0x310048A1: pop esi */
   7760     esp = ebp; /* 0x310048A2: mov esp, ebp */
   7761     ebp = POP32_VAL(esp); /* 0x310048A4: pop ebp */
   7762     RECOMP_FLAGS_OUT(); esp += 4; { RECOMP_REGS_OUT(); return; } /* 0x310048A5: ret  */
   7763 L_3104796A:
   7764     ecx = ebp + (-0x40); /* 0x3104796A: lea ecx, [ebp - 0x40] */
   7765     RECOMP_BACKEDGE();
   7766     goto L_31004880; /* 0x3104796D: jmp 0x31004880 */
   7767     { RECOMP_REGS_OUT(); return; } /* end of function */
   7768     RECOMP_REGS_OUT();
   7769 }