// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/tektag.c
// Function: tektagload
void
tektagload(int fil)
{
     int  i;

     read(fil,&numanimates,sizeof(int));
     for (i=0 ; i < numanimates ; i++) {
          read(fil,&animpic[i],sizeof(struct animpic));
     }
     read(fil,&numdelayfuncs,sizeof(short));
     for (i=0 ; i < numdelayfuncs ; i++) {
          read(fil,&delayfunc[i],sizeof(struct delayfunc));
     }
     read(fil,onelev,MAXPLAYERS);
     read(fil,&secnt,sizeof(int));
     for (i=0 ; i < secnt ; i++) {
          read(fil,&sectoreffect[i],sizeof(struct sectoreffect));
     }
     read(fil,sexref,MAXSECTORS*sizeof(int));
     read(fil,&numdoors,sizeof(int));
     for (i=0 ; i < numdoors ; i++) {
          read(fil,&doortype[i],sizeof(struct doortype));
     }
     read(fil,&numfloordoors,sizeof(int));
     for (i=0 ; i < numfloordoors ; i++) {
          read(fil,&floordoor[i],sizeof(struct floordoor));
     }
     read(fil,fdxref,MAXSECTORS*sizeof(int));
     read(fil,&numvehicles,sizeof(int));
     for (i=0 ; i < numvehicles ; i++) {
          read(fil,&sectorvehicle[i],sizeof(struct sectorvehicle));
     }

     // must reinvoke vehicle sounds since all sounds were stopped
     // else updatevehiclesounds will update whatever is using
     // dsoundptr[vptr->soundindex]
     clearvehiclesoundindexes();

     read(fil,elevator,MAXSECTORS*sizeof(struct elevatortype));
     read(fil,&sprelevcnt,sizeof(int));
     for (i=0 ; i < sprelevcnt ; i++) {
          read(fil,&spriteelev[i],sizeof(struct spriteelev));
     }
     read(fil,&totalmapsndfx,sizeof(int));
     for (i=0 ; i < totalmapsndfx ; i++) {
          read(fil,&mapsndfx[i],sizeof(struct mapsndfxtype));
          // did we leave with a TOGGLED sound playong ?
          if( (mapsndfx[i].type == MAP_SFX_TOGGLED) && (mapsndfx[i].id != -1) ) {
               mapsndfxptr[i]->id=playsound(mapsndfxptr[i]->snum, mapsndfxptr[i]->x,mapsndfxptr[i]->y, mapsndfxptr[i]->loops, ST_UNIQUE);
          }
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
leaq 0x3338bf(%rip), %rsi    # 0x3773d4
movl $0x4, %edx
callq 0x8a70
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x3338a5(%rip), %eax    # 0x3773d4
jge 0x43b5b
movl -0x4(%rbp), %edi
movslq -0x8(%rbp), %rax
leaq 0x3338a1(%rip), %rsi    # 0x3773e0
imulq $0x18, %rax, %rax
addq %rax, %rsi
movl $0x18, %edx
callq 0x8a70
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x43b26
movl -0x4(%rbp), %edi
leaq 0x333c7b(%rip), %rsi    # 0x3777e0
movl $0x2, %edx
callq 0x8a70
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movswl 0x333c60(%rip), %ecx    # 0x3777e0
cmpl %ecx, %eax
jge 0x43bae
movl -0x4(%rbp), %edi
movslq -0x8(%rbp), %rax
leaq 0x333c5e(%rip), %rsi    # 0x3777f0
shlq $0x4, %rax
addq %rax, %rsi
movl $0x10, %edx
callq 0x8a70
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x43b76
movl -0x4(%rbp), %edi
leaq 0x333f48(%rip), %rsi    # 0x377b00
movl $0x10, %edx
callq 0x8a70
movl -0x4(%rbp), %edi
leaq 0x2c58d8(%rip), %rsi    # 0x3094a4
movl $0x4, %edx
callq 0x8a70
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x2c58be(%rip), %eax    # 0x3094a4
jge 0x43c12
movl -0x4(%rbp), %edi
movslq -0x8(%rbp), %rax
leaq 0x2c98ba(%rip), %rsi    # 0x30d4b0
imulq $0x3c, %rax, %rax
addq %rax, %rsi
movl $0x3c, %edx
callq 0x8a70
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x43bdd
movl -0x4(%rbp), %edi
leaq 0x2c5894(%rip), %rsi    # 0x3094b0
movl $0x4000, %edx           # imm = 0x4000
callq 0x8a70
movl -0x4(%rbp), %edi
leaq 0x327790(%rip), %rsi    # 0x36b3c0
movl $0x4, %edx
callq 0x8a70
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x327776(%rip), %eax    # 0x36b3c0
jge 0x43c76
movl -0x4(%rbp), %edi
movslq -0x8(%rbp), %rax
leaq 0x315856(%rip), %rsi    # 0x3594b0
imulq $0x64, %rax, %rax
addq %rax, %rsi
movl $0x64, %edx
callq 0x8a70
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x43c41
movl -0x4(%rbp), %edi
leaq 0x31ac90(%rip), %rsi    # 0x35e910
movl $0x4, %edx
callq 0x8a70
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x31ac76(%rip), %eax    # 0x35e910
jge 0x43cc6
movl -0x4(%rbp), %edi
movslq -0x8(%rbp), %rax
leaq 0x31ec76(%rip), %rsi    # 0x362920
imulq $0x1c, %rax, %rax
addq %rax, %rsi
movl $0x1c, %edx
callq 0x8a70
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x43c91
movl -0x4(%rbp), %edi
leaq 0x31ac50(%rip), %rsi    # 0x35e920
movl $0x4000, %edx           # imm = 0x4000
callq 0x8a70
movl -0x4(%rbp), %edi
leaq 0x3211ac(%rip), %rsi    # 0x364e90
movl $0x4, %edx
callq 0x8a70
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x321192(%rip), %eax    # 0x364e90
jge 0x43d2d
movl -0x4(%rbp), %edi
movslq -0x8(%rbp), %rax
leaq 0x321192(%rip), %rsi    # 0x364ea0
imulq $0xa14, %rax, %rax      # imm = 0xA14
addq %rax, %rsi
movl $0xa14, %edx            # imm = 0xA14
callq 0x8a70
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x43cf5
callq 0x43510
movl -0x4(%rbp), %edi
leaq 0x327694(%rip), %rsi    # 0x36b3d0
movl $0x8000, %edx           # imm = 0x8000
callq 0x8a70
movl -0x4(%rbp), %edi
leaq 0x333680(%rip), %rsi    # 0x3773d0
movl $0x4, %edx
callq 0x8a70
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x333666(%rip), %eax    # 0x3773d0
jge 0x43d99
movl -0x4(%rbp), %edi
movslq -0x8(%rbp), %rax
leaq 0x31ef36(%rip), %rsi    # 0x362cb0
imulq $0x124, %rax, %rax      # imm = 0x124
addq %rax, %rsi
movl $0x124, %edx            # imm = 0x124
callq 0x8a70
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x43d61
movl -0x4(%rbp), %edi
leaq 0x2c56fd(%rip), %rsi    # 0x3094a0
movl $0x4, %edx
callq 0x8a70
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x2c56e3(%rip), %eax    # 0x3094a0
jge 0x43e88
movl -0x4(%rbp), %edi
movslq -0x8(%rbp), %rax
leaq 0x320c3f(%rip), %rsi    # 0x364a10
imulq $0x1c, %rax, %rax
addq %rax, %rsi
movl $0x1c, %edx
callq 0x8a70
movslq -0x8(%rbp), %rcx
leaq 0x320c23(%rip), %rax    # 0x364a10
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x2, 0x14(%rax)
jne 0x43e78
movslq -0x8(%rbp), %rcx
leaq 0x320c0b(%rip), %rax    # 0x364a10
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x18(%rax)
je 0x43e78
movslq -0x8(%rbp), %rcx
leaq 0x320f73(%rip), %rax    # 0x364d90
movq (%rax,%rcx,8), %rax
movl 0xc(%rax), %edi
movslq -0x8(%rbp), %rcx
leaq 0x320f61(%rip), %rax    # 0x364d90
movq (%rax,%rcx,8), %rax
movl (%rax), %esi
movslq -0x8(%rbp), %rcx
leaq 0x320f50(%rip), %rax    # 0x364d90
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %edx
movslq -0x8(%rbp), %rcx
leaq 0x320f3e(%rip), %rax    # 0x364d90
movq (%rax,%rcx,8), %rax
movl 0x10(%rax), %ecx
movl $0x8, %r8d
callq 0x26af0
movl %eax, %ecx
movslq -0x8(%rbp), %rdx
leaq 0x320f1f(%rip), %rax    # 0x364d90
movq (%rax,%rdx,8), %rax
movl %ecx, 0x18(%rax)
jmp 0x43e7a
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x43db4
addq $0x10, %rsp
popq %rbp
retq
nop