// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekmsc.c
// Function: showinv
void
showinv(int snum)
{
     char      ti=toggles[TOGGLE_INVENTORY];
     char      shade;

     if( (screensize < xdim) || (toggles[TOGGLE_INVENTORY] == 0) ) {
          goto skipsyms;
     }
     if( symbols[0] ) {
          shade=0;
          if( symbolsdeposited[0] )
               shade=32;
          rotatesprite((windowx2-(30*8))<<16, (windowy2-32)<<16, 65536l, 0, SYMBOL1PIC,
               shade, 0, 8+16, windowx1, windowy1, windowx2, windowy2);
     }
     if( symbols[1] ) {
          shade=0;
          if( symbolsdeposited[1] )
               shade=32;
          rotatesprite((windowx2-(30*7))<<16, (windowy2-32)<<16, 65536l, 0, SYMBOL2PIC,
               shade, 0, 8+16, windowx1, windowy1, windowx2, windowy2);
     }
     if( symbols[2] ) {
          shade=0;
          if( symbolsdeposited[2] )
               shade=32;
          rotatesprite((windowx2-(30*6))<<16, (windowy2-32)<<16, 65536l, 0, SYMBOL3PIC,
               shade, 0, 8+16, windowx1, windowy1, windowx2, windowy2);
     }
     if( symbols[3] ) {
          shade=0;
          if( symbolsdeposited[3] )
               shade=32;
          rotatesprite((windowx2-(30*5))<<16, (windowy2-32)<<16, 65536l, 0, SYMBOL4PIC,
               shade, 0, 8+16, windowx1, windowy1, windowx2, windowy2);
     }
     if( symbols[4] ) {
          shade=0;
          if( symbolsdeposited[4] )
               shade=32;
          rotatesprite((windowx2-(30*4))<<16, (windowy2-32)<<16, 65536l, 0, SYMBOL5PIC,
               shade, 0, 8+16, windowx1, windowy1, windowx2, windowy2);
     }
     if( symbols[5] ) {
          shade=0;
          if( symbolsdeposited[5] )
               shade=32;
          rotatesprite((windowx2-(30*3))<<16, (windowy2-32)<<16, 65536l, 0, SYMBOL6PIC,
               shade, 0, 8+16, windowx1, windowy1, windowx2, windowy2);
     }
     if( symbols[6] ) {
          shade=0;
          if( symbolsdeposited[6] )
               shade=32;
          rotatesprite((windowx2-(30*2))<<16, (windowy2-32)<<16, 65536l, 0, SYMBOL7PIC,
               shade, 0, 8+16, windowx1, windowy1, windowx2, windowy2);
     }

skipsyms:

     if( ti ) {
          timedinv--;
          if( timedinv == 0 )
               toggles[TOGGLE_INVENTORY]=0;
     }

     if( (windowx2 >= (xdim-24)) && ti ) {
          if( invbluecards[snum] != 0 ) {
               rotatesprite((xdim-24)<<16, ((ydim>>1)-14)<<16, 65536l, 0, 483,
                    0, 0, 8+16, 0, 0, xdim-1, ydim-1);
          }
          if( invredcards[snum] != 0 ) {
               rotatesprite((xdim-24)<<16, ((ydim>>1)-2)<<16, 65536l, 0, 484,
                    0, 0, 8+16, 0, 0, xdim-1, ydim-1);
          }
          if( invaccutrak[snum] != 0 ) {
               rotatesprite((xdim-24)<<16, ((ydim>>1)+10)<<16, 65536l, 0, 485,
                    0, 0, 8+16, 0, 0, xdim-1, ydim-1);
          }
          lastinvtoggle=1;
          return;
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
leaq 0xb9518(%rip), %r15     # 0xcea60
movl 0x28(%r15), %ebp
leaq 0xcd64f(%rip), %rax     # 0xe2ba2
movswl (%rax), %eax
leaq 0x5a08ef(%rip), %r14    # 0x5b5e4c
cmpl %eax, (%r14)
setg %al
testl %ebp, %ebp
sete %cl
orb %al, %cl
jne 0x158d4
cmpw $0x0, 0x1187fa(%rip)    # 0x12dd72
je 0x155ec
xorl %r9d, %r9d
cmpw $0x0, 0x1189e9(%rip)    # 0x12df6e
setne %r9b
leaq 0x5a08b0(%rip), %rax    # 0x5b5e40
movl (%rax), %eax
movl %eax, %edi
shll $0x10, %edi
addl $0xff100000, %edi       # imm = 0xFF100000
leaq 0x5a08a0(%rip), %rcx    # 0x5b5e44
movl (%rcx), %r10d
movl %r10d, %esi
shll $0x10, %esi
addl $0xffe00000, %esi       # imm = 0xFFE00000
leaq 0x56a616(%rip), %rcx    # 0x57fbd0
movl (%rcx), %r11d
leaq 0x56c41c(%rip), %rcx    # 0x5819e0
movl (%rcx), %r12d
shll $0x5, %r9d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x1eb, %r8d            # imm = 0x1EB
pushq %r10
pushq %rax
pushq %r12
pushq %r11
pushq $0x18
pushq $0x0
callq 0x4bca3
addq $0x30, %rsp
cmpw $0x0, 0x118780(%rip)    # 0x12dd74
je 0x15668
xorl %r9d, %r9d
cmpw $0x0, 0x11896f(%rip)    # 0x12df70
setne %r9b
leaq 0x5a0834(%rip), %rax    # 0x5b5e40
movl (%rax), %eax
movl %eax, %edi
shll $0x10, %edi
addl $0xff2e0000, %edi       # imm = 0xFF2E0000
leaq 0x5a0824(%rip), %rcx    # 0x5b5e44
movl (%rcx), %r10d
movl %r10d, %esi
shll $0x10, %esi
addl $0xffe00000, %esi       # imm = 0xFFE00000
leaq 0x56a59a(%rip), %rcx    # 0x57fbd0
movl (%rcx), %r11d
leaq 0x56c3a0(%rip), %rcx    # 0x5819e0
movl (%rcx), %r12d
shll $0x5, %r9d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x1ec, %r8d            # imm = 0x1EC
pushq %r10
pushq %rax
pushq %r12
pushq %r11
pushq $0x18
pushq $0x0
callq 0x4bca3
addq $0x30, %rsp
cmpw $0x0, 0x118706(%rip)    # 0x12dd76
je 0x156e4
xorl %r9d, %r9d
cmpw $0x0, 0x1188f5(%rip)    # 0x12df72
setne %r9b
leaq 0x5a07b8(%rip), %rax    # 0x5b5e40
movl (%rax), %eax
movl %eax, %edi
shll $0x10, %edi
addl $0xff4c0000, %edi       # imm = 0xFF4C0000
leaq 0x5a07a8(%rip), %rcx    # 0x5b5e44
movl (%rcx), %r10d
movl %r10d, %esi
shll $0x10, %esi
addl $0xffe00000, %esi       # imm = 0xFFE00000
leaq 0x56a51e(%rip), %rcx    # 0x57fbd0
movl (%rcx), %r11d
leaq 0x56c324(%rip), %rcx    # 0x5819e0
movl (%rcx), %r12d
shll $0x5, %r9d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x1ed, %r8d            # imm = 0x1ED
pushq %r10
pushq %rax
pushq %r12
pushq %r11
pushq $0x18
pushq $0x0
callq 0x4bca3
addq $0x30, %rsp
cmpw $0x0, 0x11868c(%rip)    # 0x12dd78
je 0x15760
xorl %r9d, %r9d
cmpw $0x0, 0x11887b(%rip)    # 0x12df74
setne %r9b
leaq 0x5a073c(%rip), %rax    # 0x5b5e40
movl (%rax), %eax
movl %eax, %edi
shll $0x10, %edi
addl $0xff6a0000, %edi       # imm = 0xFF6A0000
leaq 0x5a072c(%rip), %rcx    # 0x5b5e44
movl (%rcx), %r10d
movl %r10d, %esi
shll $0x10, %esi
addl $0xffe00000, %esi       # imm = 0xFFE00000
leaq 0x56a4a2(%rip), %rcx    # 0x57fbd0
movl (%rcx), %r11d
leaq 0x56c2a8(%rip), %rcx    # 0x5819e0
movl (%rcx), %r12d
shll $0x5, %r9d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x1ee, %r8d            # imm = 0x1EE
pushq %r10
pushq %rax
pushq %r12
pushq %r11
pushq $0x18
pushq $0x0
callq 0x4bca3
addq $0x30, %rsp
cmpw $0x0, 0x118612(%rip)    # 0x12dd7a
je 0x157dc
xorl %r9d, %r9d
cmpw $0x0, 0x118801(%rip)    # 0x12df76
setne %r9b
leaq 0x5a06c0(%rip), %rax    # 0x5b5e40
movl (%rax), %eax
movl %eax, %edi
shll $0x10, %edi
addl $0xff880000, %edi       # imm = 0xFF880000
leaq 0x5a06b0(%rip), %rcx    # 0x5b5e44
movl (%rcx), %r10d
movl %r10d, %esi
shll $0x10, %esi
addl $0xffe00000, %esi       # imm = 0xFFE00000
leaq 0x56a426(%rip), %rcx    # 0x57fbd0
movl (%rcx), %r11d
leaq 0x56c22c(%rip), %rcx    # 0x5819e0
movl (%rcx), %r12d
shll $0x5, %r9d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x1ef, %r8d            # imm = 0x1EF
pushq %r10
pushq %rax
pushq %r12
pushq %r11
pushq $0x18
pushq $0x0
callq 0x4bca3
addq $0x30, %rsp
cmpw $0x0, 0x118598(%rip)    # 0x12dd7c
je 0x15858
xorl %r9d, %r9d
cmpw $0x0, 0x118787(%rip)    # 0x12df78
setne %r9b
leaq 0x5a0644(%rip), %rax    # 0x5b5e40
movl (%rax), %eax
movl %eax, %edi
shll $0x10, %edi
addl $0xffa60000, %edi       # imm = 0xFFA60000
leaq 0x5a0634(%rip), %rcx    # 0x5b5e44
movl (%rcx), %r10d
movl %r10d, %esi
shll $0x10, %esi
addl $0xffe00000, %esi       # imm = 0xFFE00000
leaq 0x56a3aa(%rip), %rcx    # 0x57fbd0
movl (%rcx), %r11d
leaq 0x56c1b0(%rip), %rcx    # 0x5819e0
movl (%rcx), %r12d
shll $0x5, %r9d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x1f0, %r8d            # imm = 0x1F0
pushq %r10
pushq %rax
pushq %r12
pushq %r11
pushq $0x18
pushq $0x0
callq 0x4bca3
addq $0x30, %rsp
cmpw $0x0, 0x11851e(%rip)    # 0x12dd7e
je 0x158d4
xorl %r9d, %r9d
cmpw $0x0, 0x11870d(%rip)    # 0x12df7a
setne %r9b
leaq 0x5a05c8(%rip), %rax    # 0x5b5e40
movl (%rax), %eax
movl %eax, %edi
shll $0x10, %edi
addl $0xffc40000, %edi       # imm = 0xFFC40000
leaq 0x5a05b8(%rip), %rcx    # 0x5b5e44
movl (%rcx), %r10d
movl %r10d, %esi
shll $0x10, %esi
addl $0xffe00000, %esi       # imm = 0xFFE00000
leaq 0x56a32e(%rip), %rcx    # 0x57fbd0
movl (%rcx), %r11d
leaq 0x56c134(%rip), %rcx    # 0x5819e0
movl (%rcx), %r12d
shll $0x5, %r9d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x1f1, %r8d            # imm = 0x1F1
pushq %r10
pushq %rax
pushq %r12
pushq %r11
pushq $0x18
pushq $0x0
callq 0x4bca3
addq $0x30, %rsp
testb %bpl, %bpl
je 0x158e9
decl 0x11869d(%rip)          # 0x12df7c
jne 0x158e9
movl $0x0, 0x28(%r15)
testb %bpl, %bpl
je 0x15a26
leaq 0x5a0547(%rip), %rcx    # 0x5b5e40
movl (%r14), %eax
leal -0x18(%rax), %edi
cmpl %edi, (%rcx)
jl 0x15a26
movslq %ebx, %rbx
leaq 0x1184af(%rip), %rcx    # 0x12ddc0
cmpl $0x0, (%rcx,%rbx,4)
je 0x1595f
shll $0x10, %edi
leaq 0x5a052f(%rip), %rcx    # 0x5b5e50
movl (%rcx), %r10d
movl %r10d, %esi
andl $-0x2, %esi
shll $0xf, %esi
addl $0xfff20000, %esi       # imm = 0xFFF20000
decl %eax
decl %r10d
xorl %r11d, %r11d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x1e3, %r8d            # imm = 0x1E3
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq %r11
pushq %r11
pushq $0x18
pushq %r11
callq 0x4bca3
addq $0x30, %rsp
leaq 0x11841a(%rip), %rax    # 0x12dd80
cmpl $0x0, (%rax,%rbx,4)
je 0x159bf
movl (%r14), %eax
movl %eax, %edi
shll $0x10, %edi
addl $0xffe80000, %edi       # imm = 0xFFE80000
leaq 0x5a04cf(%rip), %rcx    # 0x5b5e50
movl (%rcx), %r10d
movl %r10d, %esi
andl $-0x2, %esi
shll $0xf, %esi
addl $0xfffe0000, %esi       # imm = 0xFFFE0000
decl %eax
decl %r10d
xorl %r11d, %r11d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x1e4, %r8d            # imm = 0x1E4
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq %r11
pushq %r11
pushq $0x18
pushq %r11
callq 0x4bca3
addq $0x30, %rsp
leaq 0x11843a(%rip), %rax    # 0x12de00
cmpl $0x0, (%rax,%rbx,4)
je 0x15a1f
movl (%r14), %eax
movl %eax, %edi
shll $0x10, %edi
addl $0xffe80000, %edi       # imm = 0xFFE80000
leaq 0x5a046f(%rip), %rcx    # 0x5b5e50
movl (%rcx), %r10d
movl %r10d, %esi
andl $-0x2, %esi
shll $0xf, %esi
addl $0xa0000, %esi          # imm = 0xA0000
decl %eax
decl %r10d
xorl %r11d, %r11d
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x1e5, %r8d            # imm = 0x1E5
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq %r11
pushq %r11
pushq $0x18
pushq %r11
callq 0x4bca3
addq $0x30, %rsp
movb $0x1, 0x11855a(%rip)    # 0x12df80
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq