// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: tekscreenfx
int
tekscreenfx(void)
{
     int  ammo,n;
     static short hcpic,rvpic,wppic;

     updatepaletteshifts();
     updatesounds(screenpeek);

    //#define COMMITTEE
    #ifdef  COMMITTEE
     printext((xdim>>1)-25,windowy1+24,"THURS 6PM",ALPHABET,255);
    #endif

    #ifdef MATRIXTIMELIMIT
     if( mission == 7 ) {
          switch( minutes ) {
          case 1:
               if( (seconds == 0) && (fortieth < 10) ) {
                    showmessage("1 MINUTE LEFT");
                    playsound(S_BEEP,0,0,0,ST_IMMEDIATE);
               }
               break;
          case 2:
               if( (seconds == 0) && (fortieth < 10) ) {
                    showmessage("MATRIX TIMED OUT"); break;
                    playsound(S_ALARM3,0,0,0,ST_IMMEDIATE);
               }
               else if( seconds == 3 ) {
                    gameover=1;
               }
               break;
          }
     }
    #endif

     if( (messageon == 0) && notininventory ) {
          showmessage("NOT IN INVENTORY");
          notininventory=0;
     }
     if( otoggles[TOGGLE_REARVIEW] ) {
          if (rvpos < 0) {
               rvpos+=(TICSPERFRAME<<2);
               if (rvpos >= 0) {
                    rvpos=0;
                    rvpic=RVDEVICEON;
               }
               else {
                    n=tilesizx[RVDEVICE]/(RVDEVICEON-RVDEVICE);
                    n=(tilesizx[RVDEVICE]-abs(rvpos))/n;
                    rvpic=RVDEVICE+n;
               }
          }
          rotatesprite(rvpos<<16, 0<<16, 65536l, 0, rvpic,
               0, 0, 8+16, 0, 0, xdim-1, ydim-1);
          if (rvpos == 0) {
               rearview(screenpeek);
          }
     }
     else if (abs(rvpos) < tilesizx[RVDEVICE]) {
          rvpos-=(TICSPERFRAME<<2);
          if (abs(rvpos) > tilesizx[RVDEVICE]) {
               rvpos=-tilesizx[RVDEVICE];
               rvpic=RVDEVICE;
          }
          else {
               n=tilesizx[RVDEVICE]/(RVDEVICEON-RVDEVICE);
               n=(tilesizx[RVDEVICE]-abs(rvpos))/n;
               rvpic=RVDEVICE+n;
          }
          rotatesprite(rvpos<<16, 0<<16, 65536l, 0, rvpic,
               0, 0, 8+16, 0, 0, xdim-1, ydim-1);
     }
     if( otoggles[TOGGLE_UPRT] ) {
          if (wppos < 0) {
               wppos+=(TICSPERFRAME<<2);
               if (wppos >= 0) {
                    wppos=0;
                    wppic=WPDEVICEON;
               }
               else {
                    n=tilesizx[WPDEVICE]/(WPDEVICEON-WPDEVICE);
                    n=(tilesizx[WPDEVICE]-abs(wppos))/n;
                    wppic=WPDEVICE+n;
               }
          }
          if (wppos == 0) {
               switch (locselectedgun+1) {
              #ifdef GUNINWPDEV
               case GUN1FLAG:
                    wppic=WPDEVICEGUN2;
                    break;
               case GUN2FLAG:
                    wppic=WPDEVICEGUN4;
                    break;
               case GUN3FLAG:
                    wppic=WPDEVICEGUN6;
                    break;
              #endif
               default:
                    wppic=WPDEVICEON;
                    break;
               }
          }
          rotatesprite((xdim-1-(tilesizx[WPDEVICE]+wppos))<<16, 0<<16, 65536l, 0, WPDEVICE,
               0, 0, 8+16, 0, 0, xdim-1, ydim-1);
     }
     else if (abs(wppos) < tilesizx[WPDEVICE]) {
          wppos-=(TICSPERFRAME<<2);
          if (abs(wppos) > tilesizx[WPDEVICE]) {
               wppos=-tilesizx[WPDEVICE];
               wppic=WPDEVICE;
          }
          else {
               n=tilesizx[WPDEVICE]/(WPDEVICEON-WPDEVICE);
               n=(tilesizx[WPDEVICE]-abs(wppos))/n;
               wppic=WPDEVICE+n;
          }
          //overwritesprite(wppos,0,wppic,0,0,0);
          rotatesprite((xdim-1-(tilesizx[WPDEVICE]+wppos))<<16, 0<<16, 65536l, 0, WPDEVICE,
               0, 0, 8+16, 0, 0, xdim-1, ydim-1);
     }
    #define  SCOREANDTIMEONWPDEVICE
    #ifdef   SCOREANDTIMEONWPDEVICE
     if( (wppic == WPDEVICEON) && (activemenu == 0) ) {
          sprintf(tektempbuf,"%02d:%02d:%02d", hours,minutes,seconds);
          printext(xdim-74,8,tektempbuf,ALPHABET,255);
          sprintf(tektempbuf,"%08d", score[screenpeek]);
          printext(xdim-74,18,tektempbuf,ALPHABET,255);
     }
    #endif
    #ifdef SCOREANDTIMEATBOTTOM
     if ((activemenu == 0) && !(biasthreshholdon)) {
          showtime();
          showscore();
     }
    #endif
     if( activemenu == 0 ) {
          showinv(screenpeek);
     }
     if( toggles[TOGGLE_GODMODE] && (screensize > xdim) ) {
           printext((xdim>>1)-16,4,"HOLY",ALPHABET2,255);
     }
     if (otoggles[TOGGLE_HEALTH]) {
          if (hcpos < 0) {
               hcpos+=(TICSPERFRAME<<2);
               if (hcpos >= 0) {
                    hcpos=0;
                    hcpic=HCDEVICEON;
               }
               else {
                    n=tilesizx[HCDEVICE]/(HCDEVICEON-HCDEVICE);
                    n=(tilesizx[HCDEVICE]-abs(hcpos))/n;
                    hcpic=HCDEVICE+n;
               }
          }
          rotatesprite(hcpos<<16, (ydim-tilesizy[hcpic])<<16, 65536l, 0, hcpic,
               0, 0, 8+16, 0, 0, xdim-1, ydim-1);
          if (hcpic == HCDEVICEON) {
               for (n=0 ; n < health[screenpeek]/HCSCALE ; n++) {
                    rotatesprite((hcpos+34+(n*5))<<16, (ydim-tilesizy[hcpic]+7)<<16, 65536l, 0, GREENLIGHTPIC,
                         (health[screenpeek]/HCSCALE)-n, 0, 8+16, 0, 0, xdim-1, ydim-1);
               }
               for (n=0 ; n < stun[screenpeek]/HCSCALE ; n++) {
                    rotatesprite((hcpos+34+(n*5))<<16, (ydim-tilesizy[hcpic]+13)<<16, 65536l, 0, YELLOWLIGHTPIC,
                         (stun[screenpeek]/HCSCALE)-n, 0, 8+16, 0, 0, xdim-1, ydim-1);
               }
               switch (locselectedgun) {
               case 0:
                    ammo=ammo1[screenpeek];
                    break;
               case 1:
                    ammo=ammo2[screenpeek];
                    break;
               case 2:
                    ammo=ammo3[screenpeek];
                    break;
               case 3:
                    ammo=ammo4[screenpeek];
                    break;
               case 4:
                    ammo=ammo5[screenpeek];
                    break;
               case 5:
                    ammo=ammo6[screenpeek];
                    break;
               case 6:
                    ammo=ammo7[screenpeek];
                    break;
               case 7:
                    ammo=ammo8[screenpeek];
                    break;
               default:
                    ammo=MAXAMMO;
                    break;
               }
               if( ammo > MAXAMMO ) {
                    ammo =MAXAMMO-1;
               }
               for (n=0 ; n < ammo/AMMOSCALE ; n++) {
                    rotatesprite((hcpos+34+(n*5))<<16, (ydim-tilesizy[hcpic]+19)<<16, 65536l, 0, BLUELIGHTPIC,
                         (ammo/AMMOSCALE)-n, 0, 8+16, 0, 0, xdim-1, ydim-1);
               }
          }
     }
     else if (abs(hcpos) < tilesizx[HCDEVICE]) {
          hcpos-=(TICSPERFRAME<<2);
          if (abs(hcpos) > tilesizx[HCDEVICE]) {
               hcpos=-tilesizx[HCDEVICE];
               hcpic=HCDEVICE;
          }
          else {
               n=tilesizx[HCDEVICE]/(HCDEVICEON-HCDEVICE);
               n=(tilesizx[HCDEVICE]-abs(hcpos))/n;
               hcpic=HCDEVICE+n;
          }
          rotatesprite(hcpos<<16, (ydim-tilesizy[hcpic])<<16, 65536l, 0, hcpic,
               0, 0, 8+16, 0, 0, xdim-1, ydim-1);
     }

    #ifdef FRAMECNT
     i=totalclock;
     if (i != frameval[framecnt]) {
          sprintf(tempbuf,"%ld",(CLKIPS*AVERAGEFRAMES)/(i-frameval[framecnt]));
          printext256(windowx1,windowy1,31,-1,tempbuf,1);
          frameval[framecnt]=i;
     }
     framecnt=((framecnt+1)&(AVERAGEFRAMES-1));
    #endif

     if( (activemenu == 0) && (option[4] != 0) ) {
          netstats();
     }

     if( biasthreshholdon ) {
          sprintf((char *)tempbuf,"SET BIAS THRESHHOLD %3d", biasthreshhold);
          printext((xdim>>1)-96,windowy2-10,(char *)tempbuf,ALPHABET2,255);
     }
     else if( (activemenu == 0) && messageon ) {
          if( messagex > windowx1 )
                printext(messagex,windowy2-32,messagebuf,ALPHABET2,255);
     }
     if( (activemenu == 0) && (toggles[TOGGLE_HEALTH] == 0) && (hcpos == -tilesizx[HCDEVICE]) && (screensize > 140) ) {
          if (!(biasthreshholdon)) {
               if( health[screenpeek] < 0 ) {
                    sprintf(tektempbuf,"%4d", 0);
               }
               else if( health[screenpeek] > MAXHEALTH ) {
                    sprintf(tektempbuf,"%4d", 1000);
               }
               else {
                    sprintf(tektempbuf,"%4d", health[screenpeek]);
               }
               printext(windowx1+6,windowy2-10,tektempbuf,ALPHABET2,255);
          }
     }
     if (activemenu) {
          domenu();
     }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x133bb
leaq 0xc5a25(%rip), %rax     # 0xda45e
movswl (%rax), %edi
callq 0x1aec6
cmpl $0x0, 0x110ac0(%rip)    # 0x125508
jne 0x14a68
cmpb $0x0, 0x11254b(%rip)    # 0x126f9c
je 0x14a68
leaq 0x6cfa4(%rip), %rdi     # 0x819fe
xorl %eax, %eax
callq 0x1373a
movb $0x0, 0x112534(%rip)    # 0x126f9c
cmpb $0x0, 0x1123f6(%rip)    # 0x126e65
movzwl 0x1122fa(%rip), %edi    # 0x126d70
je 0x14a89
testw %di, %di
js 0x14add
movzwl 0x112514(%rip), %eax    # 0x126f98
jmp 0x14b42
movl %edi, %eax
negw %ax
cmovsw %di, %ax
movzwl %ax, %eax
leaq 0x5a2404(%rip), %rcx    # 0x5b6ea0
movswl 0xc24(%rcx), %ecx
cmpl %ecx, %eax
jge 0x14c1d
addl $-0xc, %edi
movw %di, 0x1122bb(%rip)     # 0x126d70
movl %edi, %edx
negw %dx
cmovsw %di, %dx
movzwl %dx, %eax
cmpl %ecx, %eax
jbe 0x14bb1
negl %ecx
movw %cx, 0x11229e(%rip)     # 0x126d70
movw $0x612, %ax             # imm = 0x612
movl %ecx, %edi
jmp 0x14bc2
leal 0xc(%rdi), %esi
movw %si, 0x112289(%rip)     # 0x126d70
cmpw $-0xc, %di
jb 0x14b06
andw $0x0, 0x11227b(%rip)    # 0x126d70
movw $0x616, 0x11249a(%rip)  # imm = 0x616
movw $0x616, %ax             # imm = 0x616
xorl %edi, %edi
jmp 0x14b42
movzwl %di, %edi
leaq 0x5a2390(%rip), %rax    # 0x5b6ea0
movswl 0xc24(%rax), %ecx
movl %ecx, %eax
cwtd
movw $0x4, %r8w
idivw %r8w
movswl %ax, %r8d
leal (%rdi,%rcx), %eax
addl $0xffff000c, %eax       # imm = 0xFFFF000C
cltd
idivl %r8d
addl $0x612, %eax            # imm = 0x612
movw %ax, 0x112458(%rip)     # 0x126f98
movl %esi, %edi
shll $0x10, %edi
leaq 0x59a320(%rip), %rcx    # 0x5aee6c
movl (%rcx), %ecx
decl %ecx
leaq 0x59a319(%rip), %rdx    # 0x5aee70
movl (%rdx), %edx
decl %edx
subq $0x30, %rsp
andl $0x0, 0x18(%rsp)
movl %edx, 0x28(%rsp)
andl $0x0, 0x10(%rsp)
movl %ecx, 0x20(%rsp)
andl $0x0, (%rsp)
movl $0x18, 0x8(%rsp)
movswl %ax, %r8d
xorl %esi, %esi
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x48ebe
addq $0x30, %rsp
cmpw $0x0, 0x1121d2(%rip)    # 0x126d70
jne 0x14c1d
leaq 0xc58b7(%rip), %rax     # 0xda45e
movswl (%rax), %edi
callq 0x15417
jmp 0x14c1d
movl %ecx, %eax
subl %edx, %eax
cwtd
shrl $0x2, %ecx
idivw %cx
addl $0x612, %eax            # imm = 0x612
movw %ax, 0x1123cf(%rip)     # 0x126f98
shll $0x10, %edi
leaq 0x59a299(%rip), %rcx    # 0x5aee6c
movl (%rcx), %ecx
decl %ecx
leaq 0x59a292(%rip), %rdx    # 0x5aee70
movl (%rdx), %edx
decl %edx
subq $0x30, %rsp
andl $0x0, 0x18(%rsp)
movl %edx, 0x28(%rsp)
andl $0x0, 0x10(%rsp)
movl %ecx, 0x20(%rsp)
andl $0x0, (%rsp)
movl $0x18, 0x8(%rsp)
movswl %ax, %r8d
xorl %esi, %esi
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x48ebe
addq $0x30, %rsp
cmpb $0x0, 0x112242(%rip)    # 0x126e66
movzwl 0x112143(%rip), %ecx    # 0x126d6e
je 0x14c3a
testw %cx, %cx
js 0x14c91
jne 0x14ced
jmp 0x14ca9
movl %ecx, %eax
negw %ax
cmovsw %cx, %ax
movzwl %ax, %eax
leaq 0x5a2253(%rip), %rdx    # 0x5b6ea0
movswl 0xc2e(%rdx), %edi
cmpl %edi, %eax
jge 0x14d88
movzwl %di, %esi
addl $-0xc, %ecx
movw %cx, 0x112105(%rip)     # 0x126d6e
movl %ecx, %edx
negw %dx
cmovsw %cx, %dx
movzwl %dx, %eax
cmpl %edi, %eax
jbe 0x14d11
movl %esi, %ecx
negl %ecx
movw %cx, 0x1120e6(%rip)     # 0x126d6e
movw $0x617, %ax             # imm = 0x617
jmp 0x14d22
leal 0xc(%rcx), %esi
movw %si, 0x1120d3(%rip)     # 0x126d6e
cmpw $-0xc, %cx
jb 0x14cb1
andw $0x0, 0x1120c5(%rip)    # 0x126d6e
movw $0x61b, %ax             # imm = 0x61B
xorl %esi, %esi
jmp 0x14ce4
movzwl %cx, %edi
leaq 0x5a21e5(%rip), %rax    # 0x5b6ea0
movswl 0xc2e(%rax), %ecx
movw $0x4, %r8w
movl %ecx, %eax
cwtd
idivw %r8w
movswl %ax, %r8d
leal (%rdi,%rcx), %eax
addl $0xffff000c, %eax       # imm = 0xFFFF000C
cltd
idivl %r8d
addl $0x617, %eax            # imm = 0x617
movw %ax, 0x1122af(%rip)     # 0x126f9a
movl %esi, %ecx
leaq 0x59a178(%rip), %rax    # 0x5aee6c
movl (%rax), %eax
decl %eax
leaq 0x5a21a1(%rip), %rdx    # 0x5b6ea0
movzwl 0xc2e(%rdx), %edx
movzwl %cx, %ecx
addl %edx, %ecx
movl %eax, %edi
subl %ecx, %edi
jmp 0x14d3d
movl %esi, %eax
subl %edx, %eax
cwtd
shrl $0x2, %edi
idivw %di
addl $0x617, %eax            # imm = 0x617
movw %ax, 0x112271(%rip)     # 0x126f9a
leaq 0x59a13c(%rip), %rax    # 0x5aee6c
movl (%rax), %eax
decl %eax
movzwl %cx, %ecx
addl %ecx, %esi
movl %eax, %edi
subl %esi, %edi
shll $0x10, %edi
leaq 0x59a129(%rip), %rcx    # 0x5aee70
movl (%rcx), %ecx
decl %ecx
subq $0x30, %rsp
andl $0x0, 0x18(%rsp)
andl $0x0, 0x10(%rsp)
movl %ecx, 0x28(%rsp)
andl $0x0, (%rsp)
movl %eax, 0x20(%rsp)
movl $0x18, 0x8(%rsp)
xorl %esi, %esi
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x617, %r8d            # imm = 0x617
xorl %r9d, %r9d
callq 0x48ebe
addq $0x30, %rsp
cmpw $0x61b, 0x112209(%rip)  # imm = 0x61B
sete %cl
movl 0x11075a(%rip), %eax    # 0x1254f4
testl %eax, %eax
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x14e40
movl 0x110754(%rip), %edx    # 0x125504
movl 0x11074a(%rip), %ecx    # 0x125500
movl 0x11073f(%rip), %r8d    # 0x1254fc
leaq 0x1120ac(%rip), %rbx    # 0x126e70
leaq 0x6cb85(%rip), %rsi     # 0x81950
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8f20
leaq 0x59a090(%rip), %r14    # 0x5aee6c
movl (%r14), %edi
addl $-0x4a, %edi
pushq $0x8
popq %rsi
movq %rbx, %rdx
movl $0x15c, %ecx            # imm = 0x15C
movl $0xff, %r8d
callq 0x9558
leaq 0xc565f(%rip), %rax     # 0xda45e
movswq (%rax), %rax
leaq 0x10e876(%rip), %rcx    # 0x123680
movl (%rcx,%rax,4), %edx
leaq 0x6cb4b(%rip), %rsi     # 0x8195f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8f20
movl (%r14), %edi
addl $-0x4a, %edi
pushq $0x12
popq %rsi
movq %rbx, %rdx
movl $0x15c, %ecx            # imm = 0x15C
movl $0xff, %r8d
callq 0x9558
movl 0x1106b4(%rip), %eax    # 0x1254f4
testl %eax, %eax
jne 0x14e53
leaq 0xc5613(%rip), %rax     # 0xda45e
movswl (%rax), %edi
callq 0x140ee
leaq 0xb2c06(%rip), %r12     # 0xc7a60
cmpl $0x0, 0x1c(%r12)
je 0x14e98
leaq 0xc6d39(%rip), %rax     # 0xdbba2
movswl (%rax), %eax
leaq 0x599ff9(%rip), %rcx    # 0x5aee6c
movl (%rcx), %edi
cmpl %eax, %edi
jge 0x14e98
sarl %edi
addl $-0x10, %edi
leaq 0x6cac6(%rip), %rdx     # 0x8194b
pushq $0x4
popq %rsi
movl $0x15d, %ecx            # imm = 0x15D
movl $0xff, %r8d
callq 0x9558
cmpb $0x0, 0x111fc9(%rip)    # 0x126e68
movzwl 0x111ec6(%rip), %edi    # 0x126d6c
je 0x14eb9
testw %di, %di
js 0x14f0d
movzwl 0x1120e2(%rip), %eax    # 0x126f96
jmp 0x14f72
movl %edi, %eax
negw %ax
cmovsw %di, %ax
movzwl %ax, %eax
leaq 0x5a1fd4(%rip), %rcx    # 0x5b6ea0
movswl 0xc38(%rcx), %ecx
cmpl %ecx, %eax
jge 0x15288
addl $-0xc, %edi
movw %di, 0x111e87(%rip)     # 0x126d6c
movl %edi, %edx
negw %dx
cmovsw %di, %dx
movzwl %dx, %eax
cmpl %ecx, %eax
jbe 0x15208
negl %ecx
movw %cx, 0x111e6a(%rip)     # 0x126d6c
movw $0x61c, %ax             # imm = 0x61C
movl %ecx, %edi
jmp 0x15219
leal 0xc(%rdi), %esi
movw %si, 0x111e55(%rip)     # 0x126d6c
cmpw $-0xc, %di
jb 0x14f36
andw $0x0, 0x111e47(%rip)    # 0x126d6c
movw $0x620, 0x112068(%rip)  # imm = 0x620
movw $0x620, %ax             # imm = 0x620
xorl %edi, %edi
jmp 0x14f72
movzwl %di, %edi
leaq 0x5a1f60(%rip), %rax    # 0x5b6ea0
movswl 0xc38(%rax), %ecx
movl %ecx, %eax
cwtd
movw $0x4, %r8w
idivw %r8w
movswl %ax, %r8d
leal (%rdi,%rcx), %eax
addl $0xffff000c, %eax       # imm = 0xFFFF000C
cltd
idivl %r8d
addl $0x61c, %eax            # imm = 0x61C
movw %ax, 0x112026(%rip)     # 0x126f96
movl %esi, %edi
shll $0x10, %edi
leaq 0x599ef4(%rip), %rcx    # 0x5aee70
movl (%rcx), %ecx
movswq %ax, %rax
leaq 0x5936d7(%rip), %rdx    # 0x5a8660
movzwl (%rdx,%rax,2), %edx
movl %ecx, %esi
subl %edx, %esi
shll $0x10, %esi
leaq 0x599ed1(%rip), %rbp    # 0x5aee6c
movl (%rbp), %edx
decl %edx
decl %ecx
subq $0x30, %rsp
movl %ecx, 0x28(%rsp)
andl $0x0, 0x18(%rsp)
movl %edx, 0x20(%rsp)
andl $0x0, 0x10(%rsp)
movl $0x18, 0x8(%rsp)
andl $0x0, (%rsp)
movswl %ax, %r8d
xorl %r15d, %r15d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x48ebe
addq $0x30, %rsp
cmpw $0x620, 0x111faf(%rip)  # imm = 0x620
jne 0x15288
pushq $0x22
popq %r14
leaq 0xc5598(%rip), %r12     # 0xda590
pushq $0x64
popq %rbx
xorl %r13d, %r13d
leaq 0xc5459(%rip), %rax     # 0xda45e
movswq (%rax), %rcx
movl (%r12,%rcx,4), %eax
cltd
idivl %ebx
cmpl %eax, %r15d
jge 0x1508f
movzwl 0x111d50(%rip), %edi    # 0x126d6c
addl %r14d, %edi
shll $0x10, %edi
leaq 0x599e47(%rip), %rcx    # 0x5aee70
movl (%rcx), %r10d
movswq 0x111f62(%rip), %rcx    # 0x126f96
leaq 0x593625(%rip), %rdx    # 0x5a8660
movzwl (%rdx,%rcx,2), %ecx
movl %r10d, %esi
subl %ecx, %esi
shll $0x10, %esi
addl $0x70000, %esi          # imm = 0x70000
addb %r13b, %al
movl (%rbp), %r11d
decl %r11d
decl %r10d
movsbl %al, %r9d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x622, %r8d            # imm = 0x622
pushq %r10
pushq %r11
pushq $0x0
pushq $0x0
pushq $0x18
pushq $0x0
callq 0x48ebe
addq $0x30, %rsp
incl %r15d
addl $0x5, %r14d
decb %r13b
jmp 0x14ffe
xorl %r15d, %r15d
pushq $0x22
popq %r14
leaq 0xc52f3(%rip), %r12     # 0xda390
xorl %r13d, %r13d
movswq %cx, %rcx
movl (%r12,%rcx,4), %eax
cltd
idivl %ebx
cmpl %eax, %r13d
jge 0x15138
movzwl 0x111cb1(%rip), %edi    # 0x126d6c
addl %r14d, %edi
shll $0x10, %edi
leaq 0x599da8(%rip), %rcx    # 0x5aee70
movl (%rcx), %r10d
movswq 0x111ec3(%rip), %rcx    # 0x126f96
leaq 0x593586(%rip), %rdx    # 0x5a8660
movzwl (%rdx,%rcx,2), %ecx
movl %r10d, %esi
subl %ecx, %esi
shll $0x10, %esi
addl $0xd0000, %esi          # imm = 0xD0000
addb %r15b, %al
movl (%rbp), %r11d
decl %r11d
decl %r10d
movsbl %al, %r9d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x624, %r8d            # imm = 0x624
pushq %r10
pushq %r11
pushq $0x0
pushq $0x0
pushq $0x18
pushq $0x0
callq 0x48ebe
addq $0x30, %rsp
incl %r13d
leaq 0xc5335(%rip), %rax     # 0xda45e
movzwl (%rax), %ecx
addl $0x5, %r14d
decb %r15b
jmp 0x150a0
leaq 0x10bb21(%rip), %rax    # 0x120c60
movl (%rax), %eax
cmpq $0x7, %rax
ja 0x15170
leaq 0xb1172(%rip), %rdx     # 0xc62c0
movq (%rdx,%rax,8), %rax
movzwl (%rax,%rcx,2), %ecx
movl %ecx, %eax
cwtd
movw $0xa, %si
idivw %si
cmpw $0x65, %cx
pushq $0x9
popq %rcx
cmovll %eax, %ecx
movswl %cx, %ebx
jmp 0x15173
pushq $0xa
popq %rbx
leaq 0xb28e6(%rip), %r12     # 0xc7a60
xorl %r14d, %r14d
testl %ebx, %ebx
movl $0x0, %eax
cmovgl %ebx, %eax
leal (%rax,%rax,4), %r15d
cmpl %r14d, %r15d
je 0x15288
movzwl 0x111bd1(%rip), %edi    # 0x126d6c
addl %r14d, %edi
shll $0x10, %edi
addl $0x220000, %edi         # imm = 0x220000
leaq 0x599cc2(%rip), %rax    # 0x5aee70
movl (%rax), %eax
movswq 0x111dde(%rip), %rcx    # 0x126f96
leaq 0x5934a1(%rip), %rdx    # 0x5a8660
movzwl (%rdx,%rcx,2), %ecx
movl %eax, %esi
subl %ecx, %esi
shll $0x10, %esi
addl $0x130000, %esi         # imm = 0x130000
movl (%rbp), %r10d
decl %r10d
decl %eax
movsbl %bl, %ebx
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x625, %r8d            # imm = 0x625
movl %ebx, %r9d
pushq %rax
pushq %r10
pushq $0x0
pushq $0x0
pushq $0x18
pushq $0x0
callq 0x48ebe
addq $0x30, %rsp
addl $0x5, %r14d
decb %bl
jmp 0x1518b
movl %ecx, %eax
subl %edx, %eax
cwtd
shrl $0x2, %ecx
idivw %cx
addl $0x61c, %eax            # imm = 0x61C
movw %ax, 0x111d76(%rip)     # 0x126f96
shll $0x10, %edi
leaq 0x599c46(%rip), %rcx    # 0x5aee70
movl (%rcx), %ecx
movswq %ax, %rax
leaq 0x593429(%rip), %rdx    # 0x5a8660
movzwl (%rdx,%rax,2), %edx
movl %ecx, %esi
subl %edx, %esi
shll $0x10, %esi
leaq 0x599c23(%rip), %rdx    # 0x5aee6c
movl (%rdx), %edx
decl %edx
decl %ecx
subq $0x30, %rsp
andl $0x0, 0x18(%rsp)
movl %ecx, 0x28(%rsp)
andl $0x0, 0x10(%rsp)
movl %edx, 0x20(%rsp)
andl $0x0, (%rsp)
movl $0x18, 0x8(%rsp)
movswl %ax, %r8d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x48ebe
addq $0x30, %rsp
cmpl $0x0, 0x110265(%rip)    # 0x1254f4
jne 0x152a3
leaq 0xb26e0(%rip), %rax     # 0xc7978
cmpb $0x0, 0x4(%rax)
je 0x152a3
callq 0x1495d
leaq 0xc51a6(%rip), %r15     # 0xda450
cmpb $0x0, (%r15)
je 0x153d0
leaq 0xb26a7(%rip), %rax     # 0xc7962
movswl (%rax), %edx
leaq 0xc532b(%rip), %rbx     # 0xda5f0
leaq 0x6c743(%rip), %rsi     # 0x81a0f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8f20
leaq 0x599b8f(%rip), %rax    # 0x5aee6c
movl (%rax), %edi
sarl %edi
addl $-0x60, %edi
leaq 0x599b79(%rip), %rax    # 0x5aee64
movl (%rax), %esi
addl $-0xa, %esi
movq %rbx, %rdx
movl $0x15d, %ecx            # imm = 0x15D
movl $0xff, %r8d
callq 0x9558
movl 0x1101eb(%rip), %eax    # 0x1254f4
movl 0x20(%r12), %ecx
orl %eax, %ecx
jne 0x153b6
movswl 0x111a4f(%rip), %eax    # 0x126d6c
leaq 0x5a1b7c(%rip), %rcx    # 0x5b6ea0
movswl 0xc38(%rcx), %ecx
addl %eax, %ecx
jne 0x153bf
leaq 0xc6868(%rip), %rax     # 0xdbba2
cmpw $0x8d, (%rax)
jl 0x153bf
cmpb $0x0, (%r15)
jne 0x153bf
leaq 0xc5110(%rip), %rax     # 0xda45e
movswq (%rax), %rax
leaq 0xc5237(%rip), %rcx     # 0xda590
movl (%rcx,%rax,4), %eax
movl $0x3e8, %edx            # imm = 0x3E8
cmpl %edx, %eax
cmovbl %eax, %edx
xorl %ecx, %ecx
testl %eax, %eax
cmovsl %ecx, %edx
leaq 0x111afc(%rip), %rbx    # 0x126e70
leaq 0x6c6ac(%rip), %rsi     # 0x81a27
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8f20
leaq 0x563864(%rip), %rax    # 0x578bf0
movl (%rax), %edi
addl $0x6, %edi
leaq 0x599acc(%rip), %rax    # 0x5aee64
movl (%rax), %esi
addl $-0xa, %esi
movq %rbx, %rdx
movl $0x15d, %ecx            # imm = 0x15D
movl $0xff, %r8d
callq 0x9558
movl 0x11013e(%rip), %eax    # 0x1254f4
testl %eax, %eax
je 0x153bf
callq 0x1558d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x11011d(%rip)    # 0x1254f4
jne 0x15303
cmpl $0x0, 0x110124(%rip)    # 0x125508
je 0x15303
movl 0x111978(%rip), %edi    # 0x126d68
leaq 0x5637f9(%rip), %rax    # 0x578bf0
cmpl (%rax), %edi
jle 0x15303
leaq 0x599a5e(%rip), %rax    # 0x5aee64
movl (%rax), %esi
addl $-0x20, %esi
leaq 0x11192e(%rip), %rdx    # 0x126d40
jmp 0x152f3