// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/tekstat.c
// Function: bloodonwall
void
bloodonwall(int wn, int x,int y,int z, short sect, short daang, int hitx, int hity, int hitz)
{
     int  j;

     if( wallptr[wn]->lotag != 0 ) {
          return;
     }

     switch( wallptr[wn]->picnum ) {
     case 15:
     case 71:
     case 72:
     case 87:
     case 93:
     case 92:
     case 95:
     case 97:
     case 98:
     case 99:
     case 124:
     case 126:
     case 147:
     case 152:
     case 214:
     case 215:
     case 235:
     case 236:
     case 636:
     case 855:
     case 1457:
          return;
     default:
          break;
     }

     if( wallptr[wn]->lotag == 0 ) {
          wallptr[wn]->lotag=1;
		neartag(x,y,z,sect,daang,
                  &neartagsector,&neartagwall,&neartagsprite,&neartaghitdist,512L,1);
          if( neartagwall != -1 ) {
               j=jsinsertsprite(sect, BLOODFLOW);
               if( j != -1 ) {
                    sprptr[j]->picnum=WALLBLOOD;
                    sprptr[j]->x=hitx;
                    sprptr[j]->y=hity;
                    sprptr[j]->z=hitz+2048;
                    if( sprptr[j]->z > sectptr[sect]->floorz )
                         sprptr[j]->z=sectptr[sect]->floorz-2048;
                    sprptr[j]->xrepeat=16;
                    sprptr[j]->yrepeat=16;
                    sprptr[j]->xvel=0;
                    sprptr[j]->yvel=0;
                    sprptr[j]->zvel=0;
                    sprptr[j]->cstat=0x0090;
                    sprptr[j]->ang=wallnormal(wn);
                    sprptr[j]->shade=0;
                    sprptr[j]->extra=-1;
                    sprptr[j]->lotag=0;
                    sprptr[j]->hitag=0;
               }
          }
          wallptr[wn]->lotag=0;
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %r8d, -0x28(%rbp)
movl %ecx, %eax
movl -0x28(%rbp), %ecx
movl %eax, -0x24(%rbp)
movl %edx, %eax
movl -0x24(%rbp), %edx
movl %eax, -0x20(%rbp)
movl %esi, %eax
movl -0x20(%rbp), %esi
movl %eax, -0x1c(%rbp)
movl %edi, %r8d
movl -0x1c(%rbp), %edi
movw %r9w, %ax
movl 0x20(%rbp), %r9d
movl 0x18(%rbp), %r9d
movl 0x10(%rbp), %r9d
movl %r8d, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movw %cx, -0x12(%rbp)
movw %ax, -0x14(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x21bc76(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movswl 0x1a(%rax), %eax
cmpl $0x0, %eax
je 0x2e57c
jmp 0x2e8b9
movslq -0x4(%rbp), %rcx
leaq 0x21bc59(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movswl 0x10(%rax), %eax
movl %eax, -0x2c(%rbp)
subl $0xf, %eax
je 0x2e652
jmp 0x2e59d
movl -0x2c(%rbp), %eax
addl $-0x47, %eax
subl $0x2, %eax
jb 0x2e652
jmp 0x2e5ae
movl -0x2c(%rbp), %eax
subl $0x57, %eax
je 0x2e652
jmp 0x2e5bc
movl -0x2c(%rbp), %eax
addl $-0x5c, %eax
subl $0x2, %eax
jb 0x2e652
jmp 0x2e5cd
movl -0x2c(%rbp), %eax
subl $0x5f, %eax
je 0x2e652
jmp 0x2e5d7
movl -0x2c(%rbp), %eax
addl $-0x61, %eax
subl $0x3, %eax
jb 0x2e652
jmp 0x2e5e4
movl -0x2c(%rbp), %eax
subl $0x7c, %eax
je 0x2e652
jmp 0x2e5ee
movl -0x2c(%rbp), %eax
subl $0x7e, %eax
je 0x2e652
jmp 0x2e5f8
movl -0x2c(%rbp), %eax
subl $0x93, %eax
je 0x2e652
jmp 0x2e604
movl -0x2c(%rbp), %eax
subl $0x98, %eax
je 0x2e652
jmp 0x2e610
movl -0x2c(%rbp), %eax
addl $0xffffff2a, %eax       # imm = 0xFFFFFF2A
subl $0x2, %eax
jb 0x2e652
jmp 0x2e61f
movl -0x2c(%rbp), %eax
addl $0xffffff15, %eax       # imm = 0xFFFFFF15
subl $0x2, %eax
jb 0x2e652
jmp 0x2e62e
movl -0x2c(%rbp), %eax
subl $0x27c, %eax            # imm = 0x27C
je 0x2e652
jmp 0x2e63a
movl -0x2c(%rbp), %eax
subl $0x357, %eax            # imm = 0x357
je 0x2e652
jmp 0x2e646
movl -0x2c(%rbp), %eax
subl $0x5b1, %eax            # imm = 0x5B1
jne 0x2e657
jmp 0x2e652
jmp 0x2e8b9
jmp 0x2e659
movslq -0x4(%rbp), %rcx
leaq 0x21bb7c(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movswl 0x1a(%rax), %eax
cmpl $0x0, %eax
jne 0x2e8b9
movslq -0x4(%rbp), %rcx
leaq 0x21bb60(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movw $0x1, 0x1a(%rax)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movw -0x12(%rbp), %cx
leaq 0x100254(%rip), %r9     # 0x12e8f2
leaq 0x10024b(%rip), %r11    # 0x12e8f0
leaq 0x100248(%rip), %r10    # 0x12e8f4
leaq 0x100245(%rip), %rax    # 0x12e8f8
movswl %cx, %ecx
movswl -0x14(%rbp), %r8d
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movl $0x200, 0x18(%rsp)      # imm = 0x200
movl $0x1, 0x20(%rsp)
callq 0x6c6a0
leaq 0x10020b(%rip), %rax    # 0x12e8f0
movswl (%rax), %eax
cmpl $-0x1, %eax
je 0x2e8a4
movl $0x198, %esi            # imm = 0x198
movswl -0x12(%rbp), %edi
callq 0x2abd0
cwtl
movl %eax, -0x18(%rbp)
cmpl $-0x1, -0x18(%rbp)
je 0x2e8a2
movslq -0x18(%rbp), %rcx
leaq 0x14bac8(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw $0x154, 0xe(%rax)       # imm = 0x154
movl 0x10(%rbp), %ecx
movslq -0x18(%rbp), %rdx
leaq 0x14bab0(%rip), %rax    # 0x17a1e0
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movl 0x18(%rbp), %ecx
movslq -0x18(%rbp), %rdx
leaq 0x14ba9c(%rip), %rax    # 0x17a1e0
movq (%rax,%rdx,8), %rax
movl %ecx, 0x4(%rax)
movl 0x20(%rbp), %ecx
addl $0x800, %ecx            # imm = 0x800
movslq -0x18(%rbp), %rdx
leaq 0x14ba81(%rip), %rax    # 0x17a1e0
movq (%rax,%rdx,8), %rax
movl %ecx, 0x8(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x14ba6f(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %eax
movswq -0x12(%rbp), %rdx
leaq 0x213a5c(%rip), %rcx    # 0x2421e0
movq (%rcx,%rdx,8), %rcx
cmpl 0x8(%rcx), %eax
jle 0x2e7b8
movswq -0x12(%rbp), %rcx
leaq 0x213a47(%rip), %rax    # 0x2421e0
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %ecx
subl $0x800, %ecx            # imm = 0x800
movslq -0x18(%rbp), %rdx
leaq 0x14ba2f(%rip), %rax    # 0x17a1e0
movq (%rax,%rdx,8), %rax
movl %ecx, 0x8(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x14ba1d(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movb $0x10, 0x14(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x14ba0a(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movb $0x10, 0x15(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x14b9f7(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw $0x0, 0x20(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x14b9e2(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw $0x0, 0x22(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x14b9cd(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw $0x0, 0x24(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x14b9b8(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw $0x90, 0xc(%rax)
movl -0x4(%rbp), %edi
callq 0x2be90
movw %ax, %cx
movslq -0x18(%rbp), %rdx
leaq 0x14b998(%rip), %rax    # 0x17a1e0
movq (%rax,%rdx,8), %rax
movw %cx, 0x1c(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x14b985(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movb $0x0, 0x10(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x14b972(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw $0xffff, 0x2a(%rax)     # imm = 0xFFFF
movslq -0x18(%rbp), %rcx
leaq 0x14b95d(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw $0x0, 0x26(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x14b948(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw $0x0, 0x28(%rax)
jmp 0x2e8a4
movslq -0x4(%rbp), %rcx
leaq 0x21b931(%rip), %rax    # 0x24a1e0
movq (%rax,%rcx,8), %rax
movw $0x0, 0x1a(%rax)
addq $0x60, %rsp
popq %rbp
retq
nop