// File: /workspace/github_c_makefile_star2_O1/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 %rbx
cmpb $0x0, 0x113fad(%rip)    # 0x12c4fa
je 0x18551
popq %rbx
retq
leaq 0x313ba8(%rip), %rbx    # 0x32c100
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8440
leaq 0x59d8de(%rip), %rax    # 0x5b5e4c
movl (%rax), %edx
cmpl $0x140, %edx            # imm = 0x140
je 0x1861f
cmpl $0x280, %edx            # imm = 0x280
jne 0x18693
leaq 0x59d8c1(%rip), %rax    # 0x5b5e50
movl (%rax), %ecx
decl %ecx
xorl %edi, %edi
xorl %esi, %esi
movl $0x27f, %edx            # imm = 0x27F
callq 0x44922
movl $0x13d, %edi            # imm = 0x13D
callq 0x404a2
xorl %edi, %edi
xorl %esi, %esi
movl $0x13d, %edx            # imm = 0x13D
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa09d
movl $0x13e, %edi            # imm = 0x13E
callq 0x404a2
xorl %edi, %edi
movl $0xef, %esi
movl $0x13e, %edx            # imm = 0x13E
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa09d
callq 0x44e75
movb $0x0, 0x113f08(%rip)    # 0x12c4f8
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8440
cmpb $0x0, 0x1(%rbx)
jne 0x18707
cmpb $0x0, 0x39(%rbx)
jne 0x18707
cmpb $0x0, 0x1c(%rbx)
jne 0x18707
jmp 0x1861d
leaq 0x59d82a(%rip), %rax    # 0x5b5e50
movl (%rax), %ecx
decl %ecx
xorl %edi, %edi
xorl %esi, %esi
movl $0x13f, %edx            # imm = 0x13F
callq 0x44922
movl $0x141, %edi            # imm = 0x141
callq 0x404a2
xorl %edi, %edi
xorl %esi, %esi
movl $0x141, %edx            # imm = 0x141
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa09d
callq 0x44e75
movb $0x0, 0x113e94(%rip)    # 0x12c4f8
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8440
cmpb $0x0, 0x1(%rbx)
jne 0x1877e
cmpb $0x0, 0x39(%rbx)
jne 0x1877e
cmpb $0x0, 0x1c(%rbx)
jne 0x1877e
jmp 0x18691
decl %edx
leaq 0x59d7b4(%rip), %rax    # 0x5b5e50
movl (%rax), %ecx
decl %ecx
xorl %edi, %edi
xorl %esi, %esi
callq 0x44922
movl $0x141, %edi            # imm = 0x141
callq 0x404a2
xorl %edi, %edi
xorl %esi, %esi
movl $0x141, %edx            # imm = 0x141
xorl %ecx, %ecx
movl $0x2, %r8d
xorl %r9d, %r9d
callq 0xa09d
callq 0x44e75
movb $0x0, 0x113e20(%rip)    # 0x12c4f8
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8440
cmpb $0x0, 0x1(%rbx)
jne 0x187d2
cmpb $0x0, 0x39(%rbx)
jne 0x187d2
cmpb $0x0, 0x1c(%rbx)
jne 0x187d2
jmp 0x18705
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8440
movl $0x13f, %edi            # imm = 0x13F
callq 0x404a2
xorl %edi, %edi
xorl %esi, %esi
movl $0x13f, %edx            # imm = 0x13F
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa09d
movl $0x140, %edi            # imm = 0x140
callq 0x404a2
xorl %edi, %edi
movl $0xef, %esi
movl $0x140, %edx            # imm = 0x140
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa09d
callq 0x44e75
cmpb $0x0, 0x1(%rbx)
jne 0x1854f
cmpb $0x0, 0x39(%rbx)
jne 0x1854f
cmpb $0x0, 0x1c(%rbx)
jne 0x1854f
jmp 0x1877c
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8440
movl $0x142, %edi            # imm = 0x142
callq 0x404a2
xorl %edi, %edi
xorl %esi, %esi
movl $0x142, %edx            # imm = 0x142
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa09d
callq 0x44e75
cmpb $0x0, 0x1(%rbx)
jne 0x1854f
cmpb $0x0, 0x39(%rbx)
jne 0x1854f
cmpb $0x0, 0x1c(%rbx)
jne 0x1854f
jmp 0x187d0
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8440
movl $0x142, %edi            # imm = 0x142
callq 0x404a2
xorl %edi, %edi
xorl %esi, %esi
movl $0x142, %edx            # imm = 0x142
xorl %ecx, %ecx
movl $0x2, %r8d
xorl %r9d, %r9d
callq 0xa09d
callq 0x44e75
cmpb $0x0, 0x1(%rbx)
jne 0x1854f
cmpb $0x0, 0x39(%rbx)
jne 0x1854f
cmpb $0x0, 0x1c(%rbx)
jne 0x1854f
jmp 0x18827