// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/tekprep.c
// Function: tekrestoreplayer
void
tekrestoreplayer(short snum)
{
     setsprite(playersprite[snum],posx[snum],posy[snum],posz[snum]+(KENSPLAYERHEIGHT<<8));
     sprite[playersprite[snum]].ang = ang[snum];
     sprite[playersprite[snum]].xrepeat = 24;
     sprite[playersprite[snum]].yrepeat = 24;
     horiz[snum] = 100;
     health[snum]=MAXHEALTH;
     fireseq[snum]=0;
     restockammo(snum);
     stun[snum]=MAXSTUN;
     fallz[snum]=0;
     drawweap[snum]=0;
     invredcards[snum]=0;
     invbluecards[snum]=0;
     invaccutrak[snum]=0;
     dieframe[snum]=0;
     if( option[4] != 0 ) {
          weapons[snum]=0;
          weapons[snum]=flags32[GUN2FLAG]|flags32[GUN3FLAG];
     }
     else {
          weapons[snum]=0;
          weapons[snum]=flags32[GUN1FLAG]|flags32[GUN2FLAG]|flags32[GUN3FLAG];
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movswq -0x2(%rbp), %rcx
leaq 0x1099a5(%rip), %rax    # 0x12e710
movw (%rax,%rcx,2), %ax
movswq -0x2(%rbp), %rdx
leaq 0x108ad5(%rip), %rcx    # 0x12d850
movl (%rcx,%rdx,4), %esi
movswq -0x2(%rbp), %rdx
leaq 0x108b06(%rip), %rcx    # 0x12d890
movl (%rcx,%rdx,4), %edx
movswq -0x2(%rbp), %rdi
leaq 0x108b37(%rip), %rcx    # 0x12d8d0
movl (%rcx,%rdi,4), %ecx
addl $0x2200, %ecx           # imm = 0x2200
movswl %ax, %edi
callq 0x69af0
movswq -0x2(%rbp), %rcx
leaq 0x108a7a(%rip), %rax    # 0x12d830
movw (%rax,%rcx,2), %cx
movswq -0x2(%rbp), %rdx
leaq 0x10994a(%rip), %rax    # 0x12e710
movswq (%rax,%rdx,2), %rdx
leaq 0x451d0e(%rip), %rax    # 0x476ae0
imulq $0x2c, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0x1c(%rax)
movswq -0x2(%rbp), %rcx
leaq 0x109927(%rip), %rax    # 0x12e710
movswq (%rax,%rcx,2), %rcx
leaq 0x451ceb(%rip), %rax    # 0x476ae0
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movb $0x18, 0x14(%rax)
movswq -0x2(%rbp), %rcx
leaq 0x109904(%rip), %rax    # 0x12e710
movswq (%rax,%rcx,2), %rcx
leaq 0x451cc8(%rip), %rax    # 0x476ae0
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movb $0x18, 0x15(%rax)
movswq -0x2(%rbp), %rcx
leaq 0x1099f1(%rip), %rax    # 0x12e820
movl $0x64, (%rax,%rcx,4)
movswq -0x2(%rbp), %rcx
leaq 0x108ace(%rip), %rax    # 0x12d910
movl $0x3e8, (%rax,%rcx,4)   # imm = 0x3E8
movswq -0x2(%rbp), %rcx
leaq 0x15344b(%rip), %rax    # 0x1782a0
movl $0x0, (%rax,%rcx,4)
movswl -0x2(%rbp), %edi
callq 0x11ca0
movswq -0x2(%rbp), %rcx
leaq 0x10889f(%rip), %rax    # 0x12d710
movl $0x3e8, (%rax,%rcx,4)   # imm = 0x3E8
movswq -0x2(%rbp), %rcx
leaq 0x10890c(%rip), %rax    # 0x12d790
movl $0x0, (%rax,%rcx,4)
movswq -0x2(%rbp), %rcx
leaq 0x153559(%rip), %rax    # 0x1783f0
movl $0x0, (%rax,%rcx,4)
movswq -0x2(%rbp), %rcx
leaq 0x154e96(%rip), %rax    # 0x179d40
movl $0x0, (%rax,%rcx,4)
movswq -0x2(%rbp), %rcx
leaq 0x154ec3(%rip), %rax    # 0x179d80
movl $0x0, (%rax,%rcx,4)
movswq -0x2(%rbp), %rcx
leaq 0x154ef0(%rip), %rax    # 0x179dc0
movl $0x0, (%rax,%rcx,4)
movswq -0x2(%rbp), %rcx
leaq 0x15344d(%rip), %rax    # 0x178330
movw $0x0, (%rax,%rcx,2)
leaq 0xf5028(%rip), %rax     # 0x119f18
movzbl 0x4(%rax), %eax
cmpl $0x0, %eax
je 0x24f31
movswq -0x2(%rbp), %rcx
leaq 0x15353b(%rip), %rax    # 0x178440
movl $0x0, (%rax,%rcx,4)
leaq 0xf5f7d(%rip), %rax     # 0x11ae90
movl 0x8(%rax), %edx
leaq 0xf5f73(%rip), %rax     # 0x11ae90
orl 0xc(%rax), %edx
movswq -0x2(%rbp), %rcx
leaq 0x153514(%rip), %rax    # 0x178440
movl %edx, (%rax,%rcx,4)
jmp 0x24f71
movswq -0x2(%rbp), %rcx
leaq 0x153503(%rip), %rax    # 0x178440
movl $0x0, (%rax,%rcx,4)
leaq 0xf5f45(%rip), %rax     # 0x11ae90
movl 0x4(%rax), %edx
leaq 0xf5f3b(%rip), %rax     # 0x11ae90
orl 0x8(%rax), %edx
leaq 0xf5f31(%rip), %rax     # 0x11ae90
orl 0xc(%rax), %edx
movswq -0x2(%rbp), %rcx
leaq 0x1534d2(%rip), %rax    # 0x178440
movl %edx, (%rax,%rcx,4)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)