// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: showscore
void
showscore()
{
     int   alphabet=ALPHABET+(xdim > 360);

     if( (screensize > xdim) || (dimensionmode[screenpeek] == 2) ) {
          if( toggles[TOGGLE_SCORE] ) {
               if( score[screenpeek] == 1 ) {
                    sprintf(tektempbuf,"%08d", 0);
               }
               else {
                    sprintf(tektempbuf,"%08d", score[screenpeek]);
               }
               printext(xdim-160,ydim-12,tektempbuf,alphabet,255);
          }
          lastscore=0;
     }
     else {
          if( toggles[TOGGLE_SCORE] == 0 ) {
               if( (lastscoretoggle != toggles[TOGGLE_SCORE]) ) {
                    permanentwritesprite(xdim-160,ydim-12,SCORERESTORE,
                                         0,xdim-160,ydim-12,xdim-1,ydim-1,0);
               }
               lastscoretoggle=toggles[TOGGLE_SCORE];
               lastscore=0;
          }
          else {
               if( (score[screenpeek]==0) || (lastscore != score[screenpeek]) ) {
                    permanentwritesprite(xdim-160,ydim-12,SCORERESTORE,
                                         0,xdim-160,ydim-12,xdim-1,ydim-1,0);
                    if( score[screenpeek] == 1 ) {
                         sprintf(tektempbuf,"%08d", 0);
                    }
                    else {
                         sprintf(tektempbuf,"%08d", score[screenpeek]);
                    }
                    printext(xdim-160,ydim-12,tektempbuf,alphabet,255);
                    lastscore=score[screenpeek];
                    if( score[screenpeek]==0 )
                         score[screenpeek]=1;
               }
               lastscoretoggle=toggles[TOGGLE_SCORE];
          }
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x59af70(%rip), %r13    # 0x5aee6c
movl (%r13), %eax
xorl %ebx, %ebx
cmpl $0x169, %eax            # imm = 0x169
setge %bl
orl $0x15c, %ebx            # imm = 0x15C
leaq 0xc7c8b(%rip), %rcx     # 0xdbba2
movswl (%rcx), %ecx
cmpl %ecx, %eax
jl 0x13f37
leaq 0xc6539(%rip), %rbp     # 0xda45e
movswq (%rbp), %rcx
leaq 0xc798f(%rip), %rdx     # 0xdb8c0
cmpb $0x2, (%rdx,%rcx)
jne 0x13fb4
leaq 0xb3b22(%rip), %rax     # 0xc7a60
cmpl $0x0, 0x8(%rax)
je 0x13f9e
leaq 0xc6513(%rip), %rax     # 0xda45e
movswq (%rax), %rax
leaq 0x10f72a(%rip), %rcx    # 0x123680
movl (%rcx,%rax,4), %edx
xorl %eax, %eax
cmpl $0x1, %edx
cmovel %eax, %edx
leaq 0x112f08(%rip), %r14    # 0x126e70
leaq 0x6d9f0(%rip), %rsi     # 0x8195f
movq %r14, %rdi
xorl %eax, %eax
callq 0x8f20
movl $0xffffff60, %edi       # imm = 0xFFFFFF60
addl (%r13), %edi
leaq 0x59aee7(%rip), %rax    # 0x5aee70
movl (%rax), %esi
addl $-0xc, %esi
movq %r14, %rdx
movl %ebx, %ecx
movl $0xff, %r8d
callq 0x9558
andl $0x0, 0x112fd3(%rip)    # 0x126f78
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb3aa5(%rip), %r12     # 0xc7a60
cmpl $0x0, 0x8(%r12)
je 0x1409d
leaq 0x10f6b2(%rip), %rdx    # 0x123680
movl (%rdx,%rcx,4), %ecx
testl %ecx, %ecx
je 0x13fe1
cmpl %ecx, 0x112f9d(%rip)    # 0x126f78
je 0x1408d
movl $0xffffff60, %r14d      # imm = 0xFFFFFF60
leal (%rax,%r14), %edi
leaq 0x59ae7e(%rip), %rcx    # 0x5aee70
movl (%rcx), %ecx
leal -0xc(%rcx), %esi
decl %eax
decl %ecx
movl %ecx, 0x8(%rsp)
andl $0x0, 0x10(%rsp)
movl %eax, (%rsp)
xorl %r15d, %r15d
movl $0x101, %edx            # imm = 0x101
xorl %ecx, %ecx
movl %edi, %r8d
movl %esi, %r9d
callq 0x935c
movswq (%rbp), %rax
leaq 0x10f658(%rip), %rcx    # 0x123680
movl (%rcx,%rax,4), %edx
cmpl $0x1, %edx
cmovel %r15d, %edx
leaq 0x112e37(%rip), %r15    # 0x126e70
leaq 0x6d91f(%rip), %rsi     # 0x8195f
movq %r15, %rdi
xorl %eax, %eax
callq 0x8f20
addl (%r13), %r14d
leaq 0x59ae1b(%rip), %rax    # 0x5aee70
movl (%rax), %esi
addl $-0xc, %esi
movl %r14d, %edi
movq %r15, %rdx
movl %ebx, %ecx
movl $0xff, %r8d
callq 0x9558
leaq 0x10f60c(%rip), %rdx    # 0x123680
movswq (%rbp), %rax
movl (%rdx,%rax,4), %ecx
movl %ecx, 0x112ef6(%rip)    # 0x126f78
testl %ecx, %ecx
jne 0x1408d
movl $0x1, (%rdx,%rax,4)
movb 0x8(%r12), %al
movb %al, 0x112ee4(%rip)     # 0x126f7c
jmp 0x13fa5
cmpb $0x0, 0x112ed8(%rip)    # 0x126f7c
je 0x140e1
leal -0xa0(%rax), %edi
leaq 0x59adbd(%rip), %rcx    # 0x5aee70
movl (%rcx), %ecx
leal -0xc(%rcx), %esi
decl %eax
decl %ecx
andl $0x0, 0x10(%rsp)
movl %ecx, 0x8(%rsp)
movl %eax, (%rsp)
movl $0x101, %edx            # imm = 0x101
xorl %ecx, %ecx
movl %edi, %r8d
movl %esi, %r9d
callq 0x935c
movb 0x8(%r12), %al
jmp 0x140e3
xorl %eax, %eax
movb %al, 0x112e93(%rip)     # 0x126f7c
jmp 0x13f9e