// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/fx_man.c
// Function: FX_PlayLoopedAuto
int FX_PlayLoopedAuto( char *ptr, unsigned int length, int loopstart, int loopend,
                       int pitchoffset, int vol, int left, int right, int priority,
                       unsigned int callbackval )
{
   int handle = -1;
   
   if (!memcmp("Creative Voice File\x1a", ptr, 20)) {
      handle = MV_PlayLoopedVOC(ptr, length, loopstart, loopend, pitchoffset,
                              vol, left, right, priority, callbackval);
   } else if (!memcmp("RIFF", ptr, 4) && !memcmp("WAVE", ptr + 8, 4)) {
      handle = MV_PlayLoopedWAV(ptr, length, loopstart, loopend, pitchoffset,
                              vol, left, right, priority, callbackval);
   #ifdef HAVE_VORBIS
   } else if (!memcmp("OggS", ptr, 4)) {
      handle = MV_PlayLoopedVorbis(ptr, length, loopstart, loopend, pitchoffset,
                              vol, left, right, priority, callbackval);
   #endif
   }
   
   if ( handle < MV_Ok )
   {
      FX_SetErrorCode( FX_MultiVocError );
      handle = FX_Warning;
   }
   
   return handle;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rsi
leaq 0xb1e6(%rip), %rdi      # 0xf412
movl $0x14, %edx
callq 0x20e0
cmpl $0x0, %eax
jne 0x427c
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
movl -0x24(%rbp), %r9d
movl 0x10(%rbp), %ebx
movl 0x18(%rbp), %r11d
movl 0x20(%rbp), %r10d
movl 0x28(%rbp), %eax
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x6f70
movl %eax, -0x28(%rbp)
jmp 0x4340
movq -0x10(%rbp), %rax
movl (%rax), %eax
subl $0x46464952, %eax       # imm = 0x46464952
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x42ea
movq -0x10(%rbp), %rax
addq $0x8, %rax
movl (%rax), %eax
subl $0x45564157, %eax       # imm = 0x45564157
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x42ea
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
movl -0x24(%rbp), %r9d
movl 0x10(%rbp), %ebx
movl 0x18(%rbp), %r11d
movl 0x20(%rbp), %r10d
movl 0x28(%rbp), %eax
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x6560
movl %eax, -0x28(%rbp)
jmp 0x433e
movq -0x10(%rbp), %rax
movl (%rax), %eax
subl $0x5367674f, %eax       # imm = 0x5367674F
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x433c
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
movl -0x24(%rbp), %r9d
movl 0x10(%rbp), %ebx
movl 0x18(%rbp), %r11d
movl 0x20(%rbp), %r10d
movl 0x28(%rbp), %eax
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x9c60
movl %eax, -0x28(%rbp)
jmp 0x433e
jmp 0x4340
cmpl $0x0, -0x28(%rbp)
jge 0x4357
movl $0x4, 0x11934(%rip)     # 0x15c84
movl $0xfffffffe, -0x28(%rbp) # imm = 0xFFFFFFFE
movl -0x28(%rbp), %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)