// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/tekmsc.c
// Function: tekendscreen
void
tekendscreen()
{
     if( demowon )
         return;

     memset(keystatus, 0, sizeof(keystatus));
     if( xdim == 640 ) {
          setview(0L,0L,xdim-1,ydim-1);
          loadtile(ES1A_SVGA);
          overwritesprite(0L,0L,ES1A_SVGA,0,0,0);
          loadtile(ES1B_SVGA);
          overwritesprite(0L,239L,ES1B_SVGA,0,0,0);
          nextpage();
          fadein(0,255,50);
          while( (keystatus[1] == 0) && (keystatus[57] == 0) && (keystatus[28] == 0) ) {
          }
          memset(keystatus, 0, sizeof(keystatus));
          loadtile(ES2A_SVGA);
          overwritesprite(0L,0L,ES2A_SVGA,0,0,0);
          loadtile(ES2B_SVGA);
          overwritesprite(0L,239L,ES2B_SVGA,0,0,0);
          nextpage();
          while( (keystatus[1] == 0) && (keystatus[57] == 0) && (keystatus[28] == 0) ) {
          }
     }
     else if( xdim == 320 ) {
          setview(0L,0L,xdim-1,ydim-1);
          loadtile(ES1_VGA);
          overwritesprite(0L,0L,ES1_VGA,0,0,0);
          nextpage();
          fadein(0,255,50);
          while( (keystatus[1] == 0) && (keystatus[57] == 0) && (keystatus[28] == 0) ) {
          }
          memset(keystatus, 0, sizeof(keystatus));
          loadtile(ES2_VGA);
          overwritesprite(0L,0L,ES2_VGA,0,0,0);
          nextpage();
          while( (keystatus[1] == 0) && (keystatus[57] == 0) && (keystatus[28] == 0) ) {
          }
     }
     else {
          setview(0L,0L,xdim-1,ydim-1);
          loadtile(ES1_VGA);
          overwritesprite(0,0,ES1_VGA,0,0x02,0);
          nextpage();
          fadein(0,255,50);
          while( (keystatus[1] == 0) && (keystatus[57] == 0) && (keystatus[28] == 0) ) {
          }
          memset(keystatus, 0, sizeof(keystatus));
          loadtile(ES2_VGA);
          overwritesprite(0,0,ES2_VGA,0,0x02,0);
          nextpage();
          while( (keystatus[1] == 0) && (keystatus[57] == 0) && (keystatus[28] == 0) ) {
          }
     }
}

// Assembly:
pushq %rax
cmpb $0x0, 0x116ed6(%rip)    # 0x12f4fa
je 0x18628
popq %rax
retq
leaq 0x316af1(%rip), %rdi    # 0x32f120
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x8440
leaq 0x5a082a(%rip), %rax    # 0x5b8e6c
movl (%rax), %edx
cmpl $0x140, %edx            # imm = 0x140
je 0x186d9
cmpl $0x280, %edx            # imm = 0x280
jne 0x18733
leaq 0x5a080d(%rip), %rax    # 0x5b8e70
movl (%rax), %ecx
decl %ecx
xorl %edi, %edi
xorl %esi, %esi
movl $0x27f, %edx            # imm = 0x27F
callq 0x4624e
movl $0x13d, %edi            # imm = 0x13D
callq 0x41d2e
xorl %edi, %edi
xorl %esi, %esi
movl $0x13d, %edx            # imm = 0x13D
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa0bd
movl $0x13e, %edi            # imm = 0x13E
callq 0x41d2e
xorl %edi, %edi
movl $0xef, %esi
movl $0x13e, %edx            # imm = 0x13E
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa0bd
callq 0x46cdb
movb $0x0, 0x116e34(%rip)    # 0x12f4f8
leaq 0x316a55(%rip), %rdi    # 0x32f120
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x8440
jmp 0x186d7
leaq 0x5a0790(%rip), %rax    # 0x5b8e70
movl (%rax), %ecx
decl %ecx
xorl %edi, %edi
xorl %esi, %esi
movl $0x13f, %edx            # imm = 0x13F
callq 0x4624e
movl $0x141, %edi            # imm = 0x141
callq 0x41d2e
xorl %edi, %edi
xorl %esi, %esi
movl $0x141, %edx            # imm = 0x141
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa0bd
callq 0x46cdb
movb $0x0, 0x116dda(%rip)    # 0x12f4f8
leaq 0x3169fb(%rip), %rdi    # 0x32f120
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x8440
jmp 0x18731
decl %edx
leaq 0x5a0734(%rip), %rax    # 0x5b8e70
movl (%rax), %ecx
decl %ecx
xorl %edi, %edi
xorl %esi, %esi
callq 0x4624e
movl $0x141, %edi            # imm = 0x141
callq 0x41d2e
xorl %edi, %edi
xorl %esi, %esi
movl $0x141, %edx            # imm = 0x141
xorl %ecx, %ecx
movl $0x2, %r8d
xorl %r9d, %r9d
callq 0xa0bd
callq 0x46cdb
movb $0x0, 0x116d80(%rip)    # 0x12f4f8
leaq 0x3169a1(%rip), %rdi    # 0x32f120
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x8440
jmp 0x1878b