// File: /workspace/github_c_makefile_star2_O2/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
movl %edx, %ebp
movl %esi, %ebx
movl %edi, %r15d
movslq %edi, %rax
leaq 0x118d1e(%rip), %rcx    # 0x127230
movq (%rcx,%rax,8), %rax
movswl 0x2a(%rax), %r14d
movl %esi, %edi
callq 0xe2e0
testl %eax, %eax
je 0xe58d
movl %r14d, %edi
callq 0x1cfb8
testl %eax, %eax
je 0xe58d
movswl %r15w, %r15d
movl %r15d, %edi
callq 0x1f051
movw $0xc8, %cx
testl %eax, %eax
jne 0xe5cb
movl %r15d, %edi
callq 0x1f09c
movw $0x64, %cx
testl %eax, %eax
jne 0xe5cb
movslq %r14d, %rax
leaq 0x1c0ccc(%rip), %rcx    # 0x1cf230
movq (%rcx,%rax,8), %rax
movzbl (%rax), %edx
xorl %eax, %eax
movw $0x32, %cx
cmpq $0xb, %rdx
ja 0xe5b8
leaq 0x72de6(%rip), %rsi     # 0x81364
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movw $0xfe0c, %cx            # imm = 0xFE0C
jmp 0xe5ae
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movw $0x64, %cx
jmp 0xe5b6
movw $0x12c, %cx             # imm = 0x12C
jmp 0xe5b6
movw $0x1f4, %cx             # imm = 0x1F4
jmp 0xe5b6
movw $0xffce, %cx            # imm = 0xFFCE
movb $0x1, %al
jmp 0xe5b8
movw $0xc8, %cx
xorl %eax, %eax
cmpb $0x1, %bpl
ja 0xe5cb
movswl %cx, %ecx
leal (%rcx,%rcx,2), %edx
xorl %ecx, %ecx
testb %al, %al
cmovel %edx, %ecx
leaq 0xb93a6(%rip), %rax     # 0xc7978
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 0x9adc