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

     if( !fxstarted )
          return;

     for( i=0; i< MAXSOUNDS; i++ ) {
          if( dsound[i].handle == NULL_HANDLE )
               continue;
          FX_StopSound(dsound[i].handle);
          sbuf[dsound[i].sndnum].users--;
          if( sbuf[dsound[i].sndnum].users < 0 )
              sbuf[dsound[i].sndnum].users=0;
          if( sbuf[dsound[i].sndnum].users == 0 ) {
               sbuf[dsound[i].sndnum].cache_lock=199;
          }
          dsound[i].handle=NULL_HANDLE;
          dsound[i].plevel=0;
          dsound[i].sndnum=-1;
     }

//clear variables that track looping sounds
     loopinsound=-1;
     baydoorloop=-1;
     ambsubloop=-1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpl $0x0, 0x24acd1(%rip)    # 0x272220
jne 0x27556
jmp 0x276ea
movl $0x0, -0x4(%rbp)
cmpl $0x10, -0x4(%rbp)
jge 0x276c3
movslq -0x4(%rbp), %rcx
leaq 0x24acbe(%rip), %rax    # 0x272230
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, (%rax)
jne 0x27583
jmp 0x276b5
movslq -0x4(%rbp), %rcx
leaq 0x24aca2(%rip), %rax    # 0x272230
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %edi
callq 0xccc50
movslq -0x4(%rbp), %rcx
leaq 0x24ac89(%rip), %rax    # 0x272230
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x4(%rax), %rcx
leaq 0x24adf7(%rip), %rax    # 0x2723b0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movslq -0x4(%rbp), %rcx
leaq 0x24ac5e(%rip), %rax    # 0x272230
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x4(%rax), %rcx
leaq 0x24adcc(%rip), %rax    # 0x2723b0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jge 0x2761a
movslq -0x4(%rbp), %rcx
leaq 0x24ac35(%rip), %rax    # 0x272230
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x4(%rax), %rcx
leaq 0x24ada3(%rip), %rax    # 0x2723b0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0x0, (%rax)
movslq -0x4(%rbp), %rcx
leaq 0x24ac0b(%rip), %rax    # 0x272230
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x4(%rax), %rcx
leaq 0x24ad79(%rip), %rax    # 0x2723b0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x2766b
movslq -0x4(%rbp), %rcx
leaq 0x24abe2(%rip), %rax    # 0x272230
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x4(%rax), %rcx
leaq 0x24ad50(%rip), %rax    # 0x2723b0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movb $-0x39, 0x14(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x24abba(%rip), %rax    # 0x272230
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movslq -0x4(%rbp), %rcx
leaq 0x24aba2(%rip), %rax    # 0x272230
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x24ab89(%rip), %rax    # 0x272230
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x2755d
leaq 0xf3856(%rip), %rax     # 0x11af20
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0xf384d(%rip), %rax     # 0x11af24
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0xf3844(%rip), %rax     # 0x11af28
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq