// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/tekstat.c
// Function: genexplosion2
void
genexplosion2(int i)
{
     int       j;

    #ifdef PLRSPRDEBUG
     if( isaplayersprite(i) ) {
          crashgame("messing w plrsprite at 31");
     }
    #endif

     sectorflash(sprptr[i]->sectnum);
     checkblastarea(i);

     j=jsinsertsprite(sprptr[i]->sectnum, 5);
     if( j != -1 ) {
          fillsprite(j,sprptr[i]->x,sprptr[i]->y,sprptr[i]->z-(tilesizy[sprptr[i]->picnum]<<3),0,
                     -16,0,0,64,64,0,0,GENEXP2PIC,sprptr[i]->ang,
	                sintable[(sprptr[i]->ang+2560)&2047]>>6,sintable[(sprptr[i]->ang+2048)&2047]>>6,
	                30L,i+4096,sprptr[i]->sectnum, 5,32,0,-1);
          playsound(S_EXPLODE1+RMOD2("STAT4559"), sprptr[i]->x,sprptr[i]->y,0,ST_NOUPDATE);
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
callq 0x2aec0
cmpl $0x0, %eax
je 0x30786
leaq 0xa9feb(%rip), %rdi     # 0xda76a
movb $0x0, %al
callq 0x44240
movslq -0x4(%rbp), %rcx
leaq 0x149a4f(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movswl 0x18(%rax), %edi
callq 0x39470
movl -0x4(%rbp), %edi
callq 0x39160
movslq -0x4(%rbp), %rcx
leaq 0x149a2f(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl $0x5, %esi
movswl 0x18(%rax), %edi
callq 0x2abd0
cwtl
movl %eax, -0x8(%rbp)
cmpl $-0x1, -0x8(%rbp)
je 0x309d4
movslq -0x8(%rbp), %rcx
leaq 0x446304(%rip), %rax    # 0x476ae0
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x1499ee(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movslq -0x4(%rbp), %rcx
leaq 0x1499d7(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x1499be(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %ecx
movslq -0x4(%rbp), %rdx
leaq 0x1499ac(%rip), %rax    # 0x17a1e0
movq (%rax,%rdx,8), %rax
movswq 0xe(%rax), %rdx
leaq 0x5c8fcc(%rip), %rax    # 0x5f9810
movswl (%rax,%rdx,2), %eax
shll $0x3, %eax
subl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
movb $-0x10, 0x10(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x11(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x12(%rax)
movq -0x10(%rbp), %rax
movb $0x40, 0x14(%rax)
movq -0x10(%rbp), %rax
movb $0x40, 0x15(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x16(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x17(%rax)
movq -0x10(%rbp), %rax
movw $0x3c5, 0xe(%rax)       # imm = 0x3C5
movslq -0x4(%rbp), %rcx
leaq 0x149935(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movw 0x1c(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x1c(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x14991a(%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 0x59829e(%rip), %rax    # 0x5c8b80
movswl (%rax,%rcx,2), %eax
sarl $0x6, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x20(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x1498e1(%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 0x598265(%rip), %rax    # 0x5c8b80
movswl (%rax,%rcx,2), %eax
sarl $0x6, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x22(%rax)
movq -0x10(%rbp), %rax
movw $0x1e, 0x24(%rax)
movl -0x4(%rbp), %eax
addl $0x1000, %eax           # imm = 0x1000
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x1e(%rax)
movq -0x10(%rbp), %rax
movw $0x20, 0x26(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movw $0xffff, 0x2a(%rax)     # imm = 0xFFFF
movq -0x10(%rbp), %rdi
movslq -0x8(%rbp), %rax
leaq 0x1052a9(%rip), %rsi    # 0x135c20
imulq $0xc, %rax, %rax
addq %rax, %rsi
movl $0x3, %edx
callq 0x8c070
leaq 0xa9df5(%rip), %rdi     # 0xda784
callq 0x41510
cmpl $0x8000, %eax           # imm = 0x8000
setg %al
andb $0x1, %al
movzbl %al, %edi
addl $0x72, %edi
movslq -0x4(%rbp), %rcx
leaq 0x149831(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl (%rax), %esi
movslq -0x4(%rbp), %rcx
leaq 0x149820(%rip), %rax    # 0x17a1e0
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %edx
xorl %ecx, %ecx
movl $0x4, %r8d
callq 0x26af0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)