// File: /workspace/github_c_makefile_star2_O1/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 0x5a0b12(%rip), %r13    # 0x5b5e4c
movl (%r13), %eax
xorl %ebx, %ebx
cmpl $0x169, %eax            # imm = 0x169
setge %bl
orl $0x15c, %ebx            # imm = 0x15C
leaq 0xcd84d(%rip), %rcx     # 0xe2ba2
movswl (%rcx), %ecx
cmpl %ecx, %eax
jl 0x15379
leaq 0xcc0fb(%rip), %rbp     # 0xe145e
movswq (%rbp), %rcx
leaq 0xcd551(%rip), %rdx     # 0xe28c0
cmpb $0x2, (%rdx,%rcx)
jne 0x153f9
leaq 0xb96e0(%rip), %rax     # 0xcea60
cmpl $0x0, 0x8(%rax)
je 0x153e0
leaq 0xcc0d1(%rip), %rax     # 0xe145e
movswq (%rax), %rax
leaq 0x1152e8(%rip), %rcx    # 0x12a680
movl (%rcx,%rax,4), %edx
xorl %eax, %eax
cmpl $0x1, %edx
cmovel %eax, %edx
leaq 0x118ab6(%rip), %r14    # 0x12de60
leaq 0x7752a(%rip), %rsi     # 0x8c8db
movq %r14, %rdi
xorl %eax, %eax
callq 0x8f20
movl $0xffffff60, %edi       # imm = 0xFFFFFF60
addl (%r13), %edi
leaq 0x5a0a85(%rip), %rax    # 0x5b5e50
movl (%rax), %esi
addl $-0xc, %esi
movq %r14, %rdx
movl %ebx, %ecx
movl $0xff, %r8d
callq 0xa13f
movl $0x0, 0x118b7e(%rip)    # 0x12df68
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb9660(%rip), %r12     # 0xcea60
cmpl $0x0, 0x8(%r12)
je 0x154e6
leaq 0x11526d(%rip), %rdx    # 0x12a680
movl (%rdx,%rcx,4), %ecx
testl %ecx, %ecx
je 0x15426
cmpl %ecx, 0x118b48(%rip)    # 0x12df68
je 0x154d6
movl $0xffffff60, %r14d      # imm = 0xFFFFFF60
leal (%rax,%r14), %edi
leaq 0x5a0a19(%rip), %rcx    # 0x5b5e50
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 0x9efc
addq $0x20, %rsp
movswq (%rbp), %rax
leaq 0x11520f(%rip), %rcx    # 0x12a680
movl (%rcx,%rax,4), %edx
cmpl $0x1, %edx
cmovel %r15d, %edx
leaq 0x1189de(%rip), %r15    # 0x12de60
leaq 0x77452(%rip), %rsi     # 0x8c8db
movq %r15, %rdi
xorl %eax, %eax
callq 0x8f20
addl (%r13), %r14d
leaq 0x5a09b2(%rip), %rax    # 0x5b5e50
movl (%rax), %esi
addl $-0xc, %esi
movl %r14d, %edi
movq %r15, %rdx
movl %ebx, %ecx
movl $0xff, %r8d
callq 0xa13f
leaq 0x1151c3(%rip), %rdx    # 0x12a680
movswq (%rbp), %rax
movl (%rdx,%rax,4), %ecx
movl %ecx, 0x118a9d(%rip)    # 0x12df68
testl %ecx, %ecx
jne 0x154d6
movl $0x1, (%rdx,%rax,4)
movb 0x8(%r12), %al
movb %al, 0x118a8b(%rip)     # 0x12df6c
jmp 0x153ea
cmpb $0x0, 0x118a7f(%rip)    # 0x12df6c
je 0x15527
leal -0xa0(%rax), %edi
leaq 0x5a0954(%rip), %rcx    # 0x5b5e50
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 0x9efc
addq $0x20, %rsp
movb 0x8(%r12), %al
movb %al, 0x118a3a(%rip)     # 0x12df6c
jmp 0x153e0