// File: /workspace/github_c_makefile_star2_O2/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, 0x10e3b8(%rip)    # 0x1254fa
je 0x17146
popq %rax
retq
leaq 0x30dfd3(%rip), %rdi    # 0x325120
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x8440
leaq 0x597d0c(%rip), %rax    # 0x5aee6c
movl (%rax), %edx
cmpl $0x140, %edx            # imm = 0x140
je 0x171f7
cmpl $0x280, %edx            # imm = 0x280
jne 0x17251
leaq 0x597cef(%rip), %rax    # 0x5aee70
movl (%rax), %ecx
decl %ecx
xorl %edi, %edi
xorl %esi, %esi
movl $0x27f, %edx            # imm = 0x27F
callq 0x41e1e
movl $0x13d, %edi            # imm = 0x13D
callq 0x3d94a
xorl %edi, %edi
xorl %esi, %esi
movl $0x13d, %edx            # imm = 0x13D
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x94b6
movl $0x13e, %edi            # imm = 0x13E
callq 0x3d94a
xorl %edi, %edi
movl $0xef, %esi
movl $0x13e, %edx            # imm = 0x13E
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x94b6
callq 0x422ff
movb $0x0, 0x10e316(%rip)    # 0x1254f8
leaq 0x30df37(%rip), %rdi    # 0x325120
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x8440
jmp 0x171f5
leaq 0x597c72(%rip), %rax    # 0x5aee70
movl (%rax), %ecx
decl %ecx
xorl %edi, %edi
xorl %esi, %esi
movl $0x13f, %edx            # imm = 0x13F
callq 0x41e1e
movl $0x141, %edi            # imm = 0x141
callq 0x3d94a
xorl %edi, %edi
xorl %esi, %esi
movl $0x141, %edx            # imm = 0x141
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x94b6
callq 0x422ff
movb $0x0, 0x10e2bc(%rip)    # 0x1254f8
leaq 0x30dedd(%rip), %rdi    # 0x325120
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x8440
jmp 0x1724f
decl %edx
leaq 0x597c16(%rip), %rax    # 0x5aee70
movl (%rax), %ecx
decl %ecx
xorl %edi, %edi
xorl %esi, %esi
callq 0x41e1e
movl $0x141, %edi            # imm = 0x141
callq 0x3d94a
pushq $0x2
popq %r8
xorl %edi, %edi
xorl %esi, %esi
movl $0x141, %edx            # imm = 0x141
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x94b6
callq 0x422ff
movb $0x0, 0x10e264(%rip)    # 0x1254f8
leaq 0x30de85(%rip), %rdi    # 0x325120
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x8440
jmp 0x172a7