// File: /workspace/github_c_makefile_star2_O3/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 0x7966b8(%rip), %rax    # 0x7a5b30
movl (%rax), %eax
testl %eax, %eax
js 0xf519
movl %edx, %ebp
movl %esi, %ebx
movl %edi, %r15d
movslq %edi, %rcx
leaq 0x121d9d(%rip), %rdx    # 0x131230
movq (%rdx,%rcx,8), %rcx
movswl 0x2a(%rcx), %r14d
leaq 0x79669d(%rip), %rcx    # 0x7a5b40
cmpl %ebx, %eax
je 0xf4b2
movl %eax, %eax
movl (%rcx,%rax,4), %eax
testl %eax, %eax
jns 0xf4a3
jmp 0xf519
movl %r14d, %edi
callq 0x1eb75
testl %eax, %eax
je 0xf519
movswl %r15w, %r15d
movl %r15d, %edi
callq 0x20e82
movw $0xc8, %cx
testl %eax, %eax
jne 0xf557
movl %r15d, %edi
callq 0x20ece
movw $0x64, %cx
testl %eax, %eax
jne 0xf557
movslq %r14d, %rax
leaq 0x1c9d40(%rip), %rcx    # 0x1d9230
movq (%rcx,%rax,8), %rax
movzbl (%rax), %edx
xorl %eax, %eax
movw $0x32, %cx
cmpq $0xb, %rdx
ja 0xf544
leaq 0x7fe5a(%rip), %rsi     # 0x8f364
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movw $0xfe0c, %cx            # imm = 0xFE0C
jmp 0xf53a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movw $0x64, %cx
jmp 0xf542
movw $0x12c, %cx             # imm = 0x12C
jmp 0xf542
movw $0x1f4, %cx             # imm = 0x1F4
jmp 0xf542
movw $0xffce, %cx            # imm = 0xFFCE
movb $0x1, %al
jmp 0xf544
movw $0xc8, %cx
xorl %eax, %eax
cmpb $0x1, %bpl
ja 0xf557
movswl %cx, %ecx
leal (%rcx,%rcx,2), %edx
xorl %ecx, %ecx
testb %al, %al
cmovel %edx, %ecx
leaq 0xc241a(%rip), %rax     # 0xd1978
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 0xa723