// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekgun.c
// Function: killscore
void
killscore(short hs, short snum, char guntype)
{
     int       ext=sprptr[hs]->extra;
     short     score;

     if( !validplayer(snum) ) {
          return;
     }
     if( !validext(ext) ) {
          return;
     }

     if( isanandroid(hs) ) {
          score=200;
     }
     else if( isahologram(hs) ) {
          score=100;
     }
     else {
          switch( sprXTptr[ext]->class ) {
          case CLASS_NULL:
               return;
          case CLASS_FCIAGENT:
               score=-500;
               break;
          case CLASS_CIVILLIAN:
               score=-500;
               break;
          case CLASS_SPIDERDROID:
               score=50;
               break;
          case CLASS_COP:
               score=-500;
               break;
          case CLASS_MECHCOP:
               score=-50;
               break;
          case CLASS_TEKBURNOUT:
               score=100;
               break;
          case CLASS_TEKGOON:
               score=200;
               break;
          case CLASS_ASSASSINDROID:
               score=300;
               break;
          case CLASS_SECURITYDROID:
               score=100;
               break;
          case CLASS_TEKBOSS:
               score=300;
               break;
          case CLASS_TEKLORD:
               score=500;
               break;
          }
          switch( guntype ) {
          case 0:
          case 1:
               if( score < 0 ) {
                    score=0;
               }
               else {
                    score+=(score<<1);
               }
               break;
          }
     }

     if( option[4] != 0 ) {
          score>>=4;
     }
     changescore(snum, score);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x7936b4(%rip), %rax    # 0x7a2b10
movl (%rax), %eax
testl %eax, %eax
js 0xf4fd
movl %edx, %ebp
movl %esi, %ebx
movl %edi, %r15d
movslq %edi, %rcx
leaq 0x11ed99(%rip), %rdx    # 0x12e210
movq (%rdx,%rcx,8), %rcx
movswl 0x2a(%rcx), %r14d
leaq 0x793699(%rip), %rcx    # 0x7a2b20
cmpl %ebx, %eax
je 0xf496
movl %eax, %eax
movl (%rcx,%rax,4), %eax
testl %eax, %eax
jns 0xf487
jmp 0xf4fd
movl %r14d, %edi
callq 0x1e9f9
testl %eax, %eax
je 0xf4fd
movswl %r15w, %r15d
movl %r15d, %edi
callq 0x20c18
movw $0xc8, %cx
testl %eax, %eax
jne 0xf53b
movl %r15d, %edi
callq 0x20c64
movw $0x64, %cx
testl %eax, %eax
jne 0xf53b
movslq %r14d, %rax
leaq 0x1c6d3c(%rip), %rcx    # 0x1d6210
movq (%rcx,%rax,8), %rax
movzbl (%rax), %edx
xorl %eax, %eax
movw $0x32, %cx
cmpq $0xb, %rdx
ja 0xf528
leaq 0x7ce62(%rip), %rsi     # 0x8c350
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movw $0xfe0c, %cx            # imm = 0xFE0C
jmp 0xf51e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movw $0x64, %cx
jmp 0xf526
movw $0x12c, %cx             # imm = 0x12C
jmp 0xf526
movw $0x1f4, %cx             # imm = 0x1F4
jmp 0xf526
movw $0xffce, %cx            # imm = 0xFFCE
movb $0x1, %al
jmp 0xf528
movw $0xc8, %cx
xorl %eax, %eax
cmpb $0x1, %bpl
ja 0xf53b
movswl %cx, %ecx
leal (%rcx,%rcx,2), %edx
xorl %ecx, %ecx
testb %al, %al
cmovel %edx, %ecx
leaq 0xbf436(%rip), %rax     # 0xce978
movswl %cx, %ecx
movl %ecx, %edx
sarl $0x4, %edx
cmpb $0x0, 0x4(%rax)
cmovnel %edx, %ecx
movswl %cx, %esi
movswl %bx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa70f