// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/tekstat.c
// Function: spewblood
int
spewblood(int sprnum, int hitz, short daang)
{
     int       j,ext=sprptr[sprnum]->extra;

     (void)daang;

     if( option[4] != 0 ) {
          return(0);
     }
     if( !validext(ext) ) {
          return(0);
     }
     if( isanandroid(sprnum) || isahologram(sprnum) ) {
          return(0);
     }

     switch( sprXTptr[ext]->basepic ) {
     case RUBWALKPIC:
     case FRGWALKPIC:
     case COP1WALKPIC:
     case ANTWALKPIC:
     case SARAHWALKPIC:
     case MAWALKPIC:
     case DIWALKPIC:
     case ERWALKPIC:
     case SAMWALKPIC:
          j=jsinsertsprite(sprptr[sprnum]->sectnum, RUNTHRU);
          if( j != -1 ) {
     	     fillsprite(j,sprptr[sprnum]->x,sprptr[sprnum]->y,sprptr[sprnum]->z-(tilesizy[sprptr[sprnum]->picnum]<<6),128,
                          0,0,12,16,16,0,0, BLOODSPLAT,sprptr[sprnum]->ang,
		                sintable[(sprptr[sprnum]->ang+2560)&2047]>>6,sintable[(sprptr[sprnum]->ang+2048)&2047]>>6,
		                30L,sprnum+4096,sprptr[sprnum]->sectnum, RUNTHRU,0,0,0);
               sprptr[j]->z=hitz;
               getpicinfo(BLOODSPLAT);
               sprptr[j]->lotag=picinfoptr->numframes;
               if( sprptr[j]->lotag > MAXFRAMES ) {
                    sprptr[j]->lotag=MAXFRAMES;
               }
               if( sprptr[j]->lotag < 0 ) {
                    sprptr[j]->lotag=0;
               }
               sprptr[j]->hitag=0;
               return(1);
          }
          break;
     default:
          break;
     }

     return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movw %ax, -0xe(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x14b900(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movswl 0x2a(%rax), %eax
movl %eax, -0x18(%rbp)
leaq 0xeb626(%rip), %rax     # 0x119f18
movzbl 0x4(%rax), %eax
cmpl $0x0, %eax
je 0x2e907
movl $0x0, -0x4(%rbp)
jmp 0x2ec6d
movl -0x18(%rbp), %edi
callq 0x2ae90
cmpl $0x0, %eax
jne 0x2e920
movl $0x0, -0x4(%rbp)
jmp 0x2ec6d
movl -0x8(%rbp), %edi
callq 0x2ec80
cmpl $0x0, %eax
jne 0x2e93a
movl -0x8(%rbp), %edi
callq 0x2ed00
cmpl $0x0, %eax
je 0x2e946
movl $0x0, -0x4(%rbp)
jmp 0x2ec6d
movslq -0x18(%rbp), %rcx
leaq 0x1f388f(%rip), %rax    # 0x2221e0
movq (%rax,%rcx,8), %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x24(%rbp)
subl $0x163, %eax            # imm = 0x163
je 0x2e9c9
jmp 0x2e965
movl -0x24(%rbp), %eax
subl $0x45b, %eax            # imm = 0x45B
je 0x2e9c9
jmp 0x2e971
movl -0x24(%rbp), %eax
subl $0x6d7, %eax            # imm = 0x6D7
je 0x2e9c9
jmp 0x2e97d
movl -0x24(%rbp), %eax
subl $0x709, %eax            # imm = 0x709
je 0x2e9c9
jmp 0x2e989
movl -0x24(%rbp), %eax
subl $0x72a, %eax            # imm = 0x72A
je 0x2e9c9
jmp 0x2e995
movl -0x24(%rbp), %eax
subl $0x75f, %eax            # imm = 0x75F
je 0x2e9c9
jmp 0x2e9a1
movl -0x24(%rbp), %eax
subl $0x79e, %eax            # imm = 0x79E
je 0x2e9c9
jmp 0x2e9ad
movl -0x24(%rbp), %eax
subl $0x7d3, %eax            # imm = 0x7D3
je 0x2e9c9
jmp 0x2e9b9
movl -0x24(%rbp), %eax
subl $0x811, %eax            # imm = 0x811
jne 0x2ec64
jmp 0x2e9c9
movslq -0x8(%rbp), %rcx
leaq 0x14b80c(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl $0x197, %esi            # imm = 0x197
movswl 0x18(%rax), %edi
callq 0x2abd0
cwtl
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
je 0x2ec62
movslq -0x14(%rbp), %rcx
leaq 0x4480e1(%rip), %rax    # 0x476ae0
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x14b7cb(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movslq -0x8(%rbp), %rcx
leaq 0x14b7b4(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movslq -0x8(%rbp), %rcx
leaq 0x14b79b(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %ecx
movslq -0x8(%rbp), %rdx
leaq 0x14b789(%rip), %rax    # 0x17a1e0
movq (%rax,%rdx,8), %rax
movswq 0xe(%rax), %rdx
leaq 0x5cada9(%rip), %rax    # 0x5f9810
movswl (%rax,%rdx,2), %eax
shll $0x6, %eax
subl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movw $0x80, 0xc(%rax)
movq -0x20(%rbp), %rax
movb $0x0, 0x10(%rax)
movq -0x20(%rbp), %rax
movb $0x0, 0x11(%rax)
movq -0x20(%rbp), %rax
movb $0xc, 0x12(%rax)
movq -0x20(%rbp), %rax
movb $0x10, 0x14(%rax)
movq -0x20(%rbp), %rax
movb $0x10, 0x15(%rax)
movq -0x20(%rbp), %rax
movb $0x0, 0x16(%rax)
movq -0x20(%rbp), %rax
movb $0x0, 0x17(%rax)
movq -0x20(%rbp), %rax
movw $0x147, 0xe(%rax)       # imm = 0x147
movslq -0x8(%rbp), %rcx
leaq 0x14b712(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw 0x1c(%rax), %cx
movq -0x20(%rbp), %rax
movw %cx, 0x1c(%rax)
movslq -0x8(%rbp), %rcx
leaq 0x14b6f7(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movswl 0x1c(%rax), %eax
addl $0xa00, %eax            # imm = 0xA00
andl $0x7ff, %eax            # imm = 0x7FF
movslq %eax, %rcx
leaq 0x59a07b(%rip), %rax    # 0x5c8b80
movswl (%rax,%rcx,2), %eax
sarl $0x6, %eax
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x20(%rax)
movslq -0x8(%rbp), %rcx
leaq 0x14b6be(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movswl 0x1c(%rax), %eax
addl $0x800, %eax            # imm = 0x800
andl $0x7ff, %eax            # imm = 0x7FF
movslq %eax, %rcx
leaq 0x59a042(%rip), %rax    # 0x5c8b80
movswl (%rax,%rcx,2), %eax
sarl $0x6, %eax
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x22(%rax)
movq -0x20(%rbp), %rax
movw $0x1e, 0x24(%rax)
movl -0x8(%rbp), %eax
addl $0x1000, %eax           # imm = 0x1000
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x1e(%rax)
movq -0x20(%rbp), %rax
movw $0x0, 0x26(%rax)
movq -0x20(%rbp), %rax
movw $0x0, 0x28(%rax)
movq -0x20(%rbp), %rax
movw $0xffff, 0x2a(%rax)     # imm = 0xFFFF
movq -0x20(%rbp), %rdi
movslq -0x14(%rbp), %rax
leaq 0x107086(%rip), %rsi    # 0x135c20
imulq $0xc, %rax, %rax
addq %rax, %rsi
movl $0x3, %edx
callq 0x8c070
movl -0xc(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x14b627(%rip), %rax    # 0x17a1e0
movq (%rax,%rdx,8), %rax
movl %ecx, 0x8(%rax)
movl $0x147, %edi            # imm = 0x147
callq 0x2bce0
movq 0xec1bf(%rip), %rax     # 0x11ad90
movzbl (%rax), %eax
movw %ax, %cx
movslq -0x14(%rbp), %rdx
leaq 0x14b5fe(%rip), %rax    # 0x17a1e0
movq (%rax,%rdx,8), %rax
movw %cx, 0x26(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x14b5eb(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movswl 0x26(%rax), %eax
cmpl $0x8, %eax
jle 0x2ec17
movslq -0x14(%rbp), %rcx
leaq 0x14b5d3(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw $0x8, 0x26(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x14b5be(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movswl 0x26(%rax), %eax
cmpl $0x0, %eax
jge 0x2ec44
movslq -0x14(%rbp), %rcx
leaq 0x14b5a6(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw $0x0, 0x26(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x14b591(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw $0x0, 0x28(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x2ec6d
jmp 0x2ec66
jmp 0x2ec66
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)