// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/tekmsc.c
// Function: missionaccomplished
void
missionaccomplished(int  sn)
{
     int       ext;

     if( option[4] != 0 ) {
          return;
     }

     ext=sprptr[sn]->extra;
     if( !validext(ext) ) {
          return;
     }

     if( sprXTptr[ext]->class == CLASS_CIVILLIAN ) {
          civillianskilled++;
     }
     if( sprXTptr[ext]->class != CLASS_TEKLORD ) {
          return;
     }

     switch( sprXTptr[ext]->deathpic ) {
     case WINGDEATHPIC:
          symbols[0]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case DIDEATHPIC:
          symbols[1]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case SFRODEATHPIC:
          symbols[2]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case ANTDEATHPIC:
          symbols[3]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case SGOLDEATHPIC:
          symbols[4]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case SUNGDEATHPIC:
          symbols[5]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case REDHDEATHPIC:
          symbols[6]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case SSALDEATHPIC:
          killedsonny=1;
          mission_accomplished=1;
          gameover=1;
          break;
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0xf8356(%rip), %rax     # 0x119f18
movzbl 0x4(%rax), %eax
cmpl $0x0, %eax
je 0x21bd0
jmp 0x21d8d
movslq -0x4(%rbp), %rcx
leaq 0x158605(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movswl 0x2a(%rax), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %edi
callq 0x2ae90
cmpl $0x0, %eax
jne 0x21bf8
jmp 0x21d8d
movslq -0x8(%rbp), %rcx
leaq 0x2005dd(%rip), %rax    # 0x2221e0
movq (%rax,%rcx,8), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
jne 0x21c1e
movl 0x1568c3(%rip), %eax    # 0x1784d8
addl $0x1, %eax
movl %eax, 0x1568ba(%rip)    # 0x1784d8
movslq -0x8(%rbp), %rcx
leaq 0x2005b7(%rip), %rax    # 0x2221e0
movq (%rax,%rcx,8), %rax
movzbl (%rax), %eax
cmpl $0xb, %eax
je 0x21c3a
jmp 0x21d8d
movslq -0x8(%rbp), %rcx
leaq 0x20059b(%rip), %rax    # 0x2221e0
movq (%rax,%rcx,8), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0xc(%rbp)
subl $0x6ff, %eax            # imm = 0x6FF
je 0x21d11
jmp 0x21c5d
movl -0xc(%rbp), %eax
subl $0x78d, %eax            # imm = 0x78D
je 0x21cdc
jmp 0x21c69
movl -0xc(%rbp), %eax
subl $0x875, %eax            # imm = 0x875
je 0x21d43
jmp 0x21c79
movl -0xc(%rbp), %eax
subl $0x9f6, %eax            # imm = 0x9F6
je 0x21cc0
jmp 0x21c85
movl -0xc(%rbp), %eax
subl $0xa66, %eax            # imm = 0xA66
je 0x21d5c
jmp 0x21c95
movl -0xc(%rbp), %eax
subl $0xb22, %eax            # imm = 0xB22
je 0x21cf8
jmp 0x21ca1
movl -0xc(%rbp), %eax
subl $0xb5e, %eax            # imm = 0xB5E
je 0x21d75
jmp 0x21cb1
movl -0xc(%rbp), %eax
subl $0xba2, %eax            # imm = 0xBA2
je 0x21d2a
jmp 0x21d8d
movw $0x1, 0x158069(%rip)    # 0x179d32
movb $0x1, 0x156805(%rip)    # 0x1784d5
movb $0x1, 0x1567e2(%rip)    # 0x1784b9
jmp 0x21d8d
movw $0x1, 0x15804f(%rip)    # 0x179d34
movb $0x1, 0x1567e9(%rip)    # 0x1784d5
movb $0x1, 0x1567c6(%rip)    # 0x1784b9
jmp 0x21d8d
movw $0x1, 0x158035(%rip)    # 0x179d36
movb $0x1, 0x1567cd(%rip)    # 0x1784d5
movb $0x1, 0x1567aa(%rip)    # 0x1784b9
jmp 0x21d8d
movw $0x1, 0x15801e(%rip)    # 0x179d38
movb $0x1, 0x1567b4(%rip)    # 0x1784d5
movb $0x1, 0x156791(%rip)    # 0x1784b9
jmp 0x21d8d
movw $0x1, 0x158007(%rip)    # 0x179d3a
movb $0x1, 0x15679b(%rip)    # 0x1784d5
movb $0x1, 0x156778(%rip)    # 0x1784b9
jmp 0x21d8d
movw $0x1, 0x157ff0(%rip)    # 0x179d3c
movb $0x1, 0x156782(%rip)    # 0x1784d5
movb $0x1, 0x15675f(%rip)    # 0x1784b9
jmp 0x21d8d
movw $0x1, 0x157fd9(%rip)    # 0x179d3e
movb $0x1, 0x156769(%rip)    # 0x1784d5
movb $0x1, 0x156746(%rip)    # 0x1784b9
jmp 0x21d8d
movl $0x1, 0x156769(%rip)    # 0x1784e8
movb $0x1, 0x15674f(%rip)    # 0x1784d5
movb $0x1, 0x15672c(%rip)    # 0x1784b9
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)