// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
leaq 0x5a3aa0(%rip), %r13    # 0x5b8e6c
movl (%r13), %eax
xorl %ebx, %ebx
cmpl $0x169, %eax            # imm = 0x169
setge %bl
orl $0x15c, %ebx            # imm = 0x15C
leaq 0xd07bb(%rip), %rcx     # 0xe5ba2
movswl (%rcx), %ecx
cmpl %ecx, %eax
jl 0x1540b
leaq 0xcf069(%rip), %rbp     # 0xe445e
movswq (%rbp), %rcx
leaq 0xd04bf(%rip), %rdx     # 0xe58c0
cmpb $0x2, (%rdx,%rcx)
jne 0x1548b
leaq 0xbc64e(%rip), %rax     # 0xd1a60
cmpl $0x0, 0x8(%rax)
je 0x15472
leaq 0xcf03f(%rip), %rax     # 0xe445e
movswq (%rax), %rax
leaq 0x118256(%rip), %rcx    # 0x12d680
movl (%rcx,%rax,4), %edx
xorl %eax, %eax
cmpl $0x1, %edx
cmovel %eax, %edx
leaq 0x11ba34(%rip), %r14    # 0x130e70
leaq 0x7a51c(%rip), %rsi     # 0x8f95f
movq %r14, %rdi
xorl %eax, %eax
callq 0x8f20
movl $0xffffff60, %edi       # imm = 0xFFFFFF60
addl (%r13), %edi
leaq 0x5a3a13(%rip), %rax    # 0x5b8e70
movl (%rax), %esi
addl $-0xc, %esi
movq %r14, %rdx
movl %ebx, %ecx
movl $0xff, %r8d
callq 0xa15f
movl $0x0, 0x11bafc(%rip)    # 0x130f78
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbc5ce(%rip), %r12     # 0xd1a60
cmpl $0x0, 0x8(%r12)
je 0x15578
leaq 0x1181db(%rip), %rdx    # 0x12d680
movl (%rdx,%rcx,4), %ecx
testl %ecx, %ecx
je 0x154b8
cmpl %ecx, 0x11bac6(%rip)    # 0x130f78
je 0x15568
movl $0xffffff60, %r14d      # imm = 0xFFFFFF60
leal (%rax,%r14), %edi
leaq 0x5a39a7(%rip), %rcx    # 0x5b8e70
movl (%rcx), %r10d
leal -0xc(%r10), %esi
decl %eax
decl %r10d
subq $0x8, %rsp
xorl %r15d, %r15d
movl $0x101, %edx            # imm = 0x101
xorl %ecx, %ecx
movl %edi, %r8d
movl %esi, %r9d
pushq %r15
pushq %r10
pushq %rax
callq 0x9f1c
addq $0x20, %rsp
movswq (%rbp), %rax
leaq 0x11817d(%rip), %rcx    # 0x12d680
movl (%rcx,%rax,4), %edx
cmpl $0x1, %edx
cmovel %r15d, %edx
leaq 0x11b95c(%rip), %r15    # 0x130e70
leaq 0x7a444(%rip), %rsi     # 0x8f95f
movq %r15, %rdi
xorl %eax, %eax
callq 0x8f20
addl (%r13), %r14d
leaq 0x5a3940(%rip), %rax    # 0x5b8e70
movl (%rax), %esi
addl $-0xc, %esi
movl %r14d, %edi
movq %r15, %rdx
movl %ebx, %ecx
movl $0xff, %r8d
callq 0xa15f
leaq 0x118131(%rip), %rdx    # 0x12d680
movswq (%rbp), %rax
movl (%rdx,%rax,4), %ecx
movl %ecx, 0x11ba1b(%rip)    # 0x130f78
testl %ecx, %ecx
jne 0x15568
movl $0x1, (%rdx,%rax,4)
movb 0x8(%r12), %al
movb %al, 0x11ba09(%rip)     # 0x130f7c
jmp 0x1547c
cmpb $0x0, 0x11b9fd(%rip)    # 0x130f7c
je 0x155c0
leal -0xa0(%rax), %edi
leaq 0x5a38e2(%rip), %rcx    # 0x5b8e70
movl (%rcx), %r10d
leal -0xc(%r10), %esi
decl %eax
decl %r10d
subq $0x8, %rsp
movl $0x101, %edx            # imm = 0x101
xorl %ecx, %ecx
movl %edi, %r8d
movl %esi, %r9d
pushq $0x0
pushq %r10
pushq %rax
callq 0x9f1c
addq $0x20, %rsp
movb 0x8(%r12), %al
jmp 0x155c2
xorl %eax, %eax
movb %al, 0x11b9b4(%rip)     # 0x130f7c
jmp 0x15472