LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Leeheng86[P]word2vec/word2phrase.c
// Function: ReduceVocab()
void ReduceVocab() {
  int a, b = 0;
  unsigned int hash;
  for (a = 0; a < vocab_size; a++) if (vocab[a].cn > min_reduce) {
    vocab[b].cn = vocab[a].cn;
    vocab[b].word = vocab[a].word;
    b++;
  } else free(vocab[a].word);
  vocab_size = b;
  for (a = 0; a < vocab_hash_size; a++) vocab_hash[a] = -1;
  for (a = 0; a < vocab_size; a++) {
    // Hash will be re-computed, as it is not actual
    hash = GetWordHash(vocab[a].word);
    while (vocab_hash[hash] != -1) hash = (hash + 1) % vocab_hash_size;
    vocab_hash[hash] = a;
  }
  fflush(stdout);
  min_reduce++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %r14d, %r14d
pushq $0x8
popq %r15
xorl %ebx, %ebx
movslq %ebx, %rax
cmpq %r14, 0x2bed(%rip)      # 0x41a0
jle 0x15f4
movq 0x2bd4(%rip), %rcx      # 0x4190
movq -0x8(%rcx,%r15), %rdx
movslq 0x2b18(%rip), %rsi      # 0x40e0
cmpq %rsi, %rdx
jle 0x15e2
shlq $0x4, %rax
movq %rdx, (%rcx,%rax)
movq (%rcx,%r15), %rdx
movq %rdx, 0x8(%rcx,%rax)
incl %ebx
jmp 0x15eb
movq (%rcx,%r15), %rdi
callq 0x10d0
incq %r14
addq $0x10, %r15
jmp 0x15a9
movq %rax, 0x2ba5(%rip)      # 0x41a0
movq 0x2b96(%rip), %rax      # 0x4198
xorl %ecx, %ecx
cmpq $0x1dcd6500, %rcx       # imm = 0x1DCD6500
je 0x1616
orl $-0x1, (%rax,%rcx,4)
incq %rcx
jmp 0x1604
movq 0x2b73(%rip), %r14      # 0x4190
movq 0x2b74(%rip), %r15      # 0x4198
xorl %r12d, %r12d
testl %ebx, %ebx
cmovlel %r12d, %ebx
xorl %r13d, %r13d
cmpq %rbx, %r13
je 0x1665
movq %r13, %rax
shlq $0x4, %rax
movq 0x8(%r14,%rax), %rdi
callq 0x1310
movl %eax, %eax
cmpl $-0x1, (%r15,%rax,4)
je 0x165c
incl %eax
cmpl $0x1dcd6500, %eax       # imm = 0x1DCD6500
cmovel %r12d, %eax
jmp 0x1646
movl %r13d, (%r15,%rax,4)
incq %r13
jmp 0x1630
movq 0x2964(%rip), %rax      # 0x3fd0
movq (%rax), %rdi
callq 0x10b0
incl 0x2a66(%rip)            # 0x40e0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Leeheng86[P]word2vec/word2phrase.c
// Function: ArgPos(char*, int, char**)
int ArgPos(char *str, int argc, char **argv) {
  int a;
  for (a = 1; a < argc; a++) if (!strcmp(str, argv[a])) {
    if (a == argc - 1) {
      printf("Argument missing for %s\n", str);
      exit(1);
    }
    return a;
  }
  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movslq %esi, %r12
leal -0x2(%r12), %r13d
pushq $0x1
popq %r15
pushq $-0x1
popq %rbp
cmpq %r12, %r15
jge 0x1b86
movq (%r14,%r15,8), %rsi
movq %rbx, %rdi
callq 0x1110
testl %eax, %eax
je 0x1b7e
incq %r15
decl %r13d
jmp 0x1b61
testl %r13d, %r13d
je 0x1b97
movl %r15d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x527(%rip), %rdi       # 0x20c5
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
pushq $0x1
popq %rdi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O2/motet-a[P]libforks/tests/socket_creation_fork_error.c
// Function: main
int main() {
  struct rlimit l;
  l.rlim_cur = l.rlim_max = 10;
  check(setrlimit(RLIMIT_NOFILE, &l) == 0);

  libforks_ServerConn conn;
  check(libforks_start(&conn) == libforks_OK);

  while (true) {
    libforks_Result r = libforks_fork(
      conn,
      NULL, // pid_ptr
      NULL, // socket_fd_ptr
      NULL, // exit_fd_ptr
      child_main
    );
    if (r != libforks_OK) {
      check(r == libforks_SOCKET_CREATION_ERROR);
      check(errno == EMFILE);
      break;
    }
    check(r == libforks_OK);
  }

  check(libforks_stop(conn) == libforks_OK);

  return 0;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
pushq $0xa
popq %rax
leaq 0x10(%rsp), %rsi
movq %rax, 0x8(%rsi)
movq %rax, (%rsi)
pushq $0x7
popq %rdi
callq 0x1170
testl %eax, %eax
jne 0x138c
leaq 0x8(%rsp), %rdi
callq 0x1742
testl %eax, %eax
jne 0x1397
leaq 0xa2(%rip), %rbx        # 0x13e3
movq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x203e
testl %eax, %eax
je 0x1341
cmpl $-0x3, %eax
jne 0x137d
callq 0x1050
cmpl $0x18, (%rax)
jne 0x13a2
movq 0x8(%rsp), %rdi
callq 0x21e2
testl %eax, %eax
jne 0x13ad
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x1cea(%rip), %rdi      # 0x306e
pushq $0x1e
popq %rsi
callq 0x13b8
leaq 0x1c71(%rip), %rdi      # 0x3004
pushq $0x10
jmp 0x1386
leaq 0x1cab(%rip), %rdi      # 0x3049
pushq $0x13
jmp 0x1386
leaq 0x1ce9(%rip), %rdi      # 0x3092
pushq $0x1f
jmp 0x1386
leaq 0x1cee(%rip), %rdi      # 0x30a2
pushq $0x25
jmp 0x1386
// File: /workspace/github_c_makefile_star2_O2/mvermeulen[P]wspy/cpu_info.c
// Function: main
int main(void){
  int i;
  inventory_cpu();

  printf("CPU information:\n");
  switch(cpu_info->vendor){
  case VENDOR_AMD:
    printf("\tAMD family %x model %x\n",cpu_info->family,cpu_info->model);
    break;
  case VENDOR_INTEL:
    printf("\tIntel family %x model %x\n",cpu_info->family,cpu_info->model);
    break;
  default:
    printf("Unknown CPU\n");
    return 0;
  }

  for (i=0;i<cpu_info->num_cores;i++){
    printf("\t   ");
    printf("%c %d ",(cpu_info->coreinfo[i].is_available)?'*':' ',i);
    switch(cpu_info->coreinfo[i].vendor){
    case CORE_AMD_ZEN:
      printf("Zen");
      break;
    case CORE_AMD_ZEN5:
      printf("Zen5");
      break;
    case CORE_INTEL_ATOM:
      printf("Atom");
      break;
    case CORE_INTEL_CORE:
      printf("Core");
      break;
    case CORE_AMD_UNKNOWN:
      printf("AMD?");
      break;
    case CORE_INTEL_UNKNOWN:
      printf("Intel?");
      break;
    default:
      printf("??");
      break;
    }
    printf("\n");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x122c
leaq 0xaee(%rip), %rdi       # 0x2146
callq 0x1050
movq 0x2a54(%rip), %rax      # 0x40b8
movl (%rax), %ecx
cmpl $0x1, %ecx
je 0x167d
cmpl $0x2, %ecx
jne 0x172c
leaq 0xa82(%rip), %rdi       # 0x20fd
jmp 0x1684
leaq 0xa60(%rip), %rdi       # 0x20e4
movl 0x4(%rax), %esi
movl 0x8(%rax), %edx
xorl %eax, %eax
callq 0x1080
leaq 0xa85(%rip), %r14       # 0x211d
leaq 0xaa4(%rip), %rbx       # 0x2143
leaq 0xabe(%rip), %r12       # 0x2164
pushq $0xa
popq %rbp
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x2a02(%rip), %rax      # 0x40b8
movl 0xc(%rax), %eax
cmpq %rax, %r15
jae 0x1738
leaq 0xa53(%rip), %rdi       # 0x2118
xorl %eax, %eax
callq 0x1080
movq 0x29e5(%rip), %rax      # 0x40b8
movq 0x18(%rax), %rax
testb $0x1, 0x4(%rax,%r13)
pushq $0x2a
popq %rsi
pushq $0x20
popq %rax
cmovel %eax, %esi
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x1080
movq 0x29be(%rip), %rax      # 0x40b8
movq 0x18(%rax), %rax
movl (%rax,%r13), %eax
decl %eax
movq %rbx, %rdi
cmpl $0x5, %eax
ja 0x1715
movl %eax, %eax
movslq (%r12,%rax,4), %rdi
addq %r12, %rdi
xorl %eax, %eax
callq 0x1080
movl %ebp, %edi
callq 0x1030
incq %r15
addq $0x60, %r13
jmp 0x16af
leaq 0xa24(%rip), %rdi       # 0x2157
callq 0x1050
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/test.c
// Function: listdevs
void listdevs(void)
{
    int dev;
    #define YESNO(x) ((x) ? "Yes" : "No ")

    for (dev = 0; dev < ASS_NumSoundCards; dev++) {
        printf("%d) %-15s PCM %s  CD %s  MIDI %s \n",
            dev, SoundDriver_GetName(dev),
            YESNO(SoundDriver_IsPCMSupported(dev)),
            YESNO(SoundDriver_IsCDSupported(dev)),
            YESNO(SoundDriver_IsMIDISupported(dev))
        );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x6aaf(%rip), %r13      # 0x92f4
leaq 0x6aa4(%rip), %rbx      # 0x92f0
xorl %ebp, %ebp
cmpl $0x7, %ebp
je 0x28aa
movl %ebp, %edi
callq 0x2b07
movq %rax, %r14
movl %ebp, %edi
callq 0x2ad4
testl %eax, %eax
movq %rbx, %r15
cmoveq %r13, %r15
movl %ebp, %edi
callq 0x2ae5
testl %eax, %eax
movq %rbx, %r12
cmoveq %r13, %r12
movl %ebp, %edi
callq 0x2af6
testl %eax, %eax
movq %rbx, %r9
cmoveq %r13, %r9
leaq 0x6a39(%rip), %rdi      # 0x92cd
movl %ebp, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x2050
incl %ebp
jmp 0x284e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/fx_man.c
// Function: FX_Init
int FX_Init
   (
   int SoundCard,
   int numvoices,
   int * numchannels,
   int * samplebits,
   int * mixrate,
   void * initdata
   )

   {
   int devicestatus;
   int mincard, maxcard, card;

   if ( FX_Installed )
      {
      FX_Shutdown();
      }

   if (SoundCard == ASS_AutoDetect)
      {
      mincard = ASS_NoSound + 1;
      maxcard = ASS_NumSoundCards - 1;
      }
   else if (SoundCard < 0 || SoundCard >= ASS_NumSoundCards)
      {
      FX_SetErrorCode( FX_InvalidCard );
      return FX_Error;
      }
   else
      {
      mincard = SoundCard;
      maxcard = SoundCard;
      }

   for (card = mincard; card <= maxcard; card++)
      {
      if (!SoundDriver_IsPCMSupported(card))
         {
         continue;
         }
      else if (SoundCard == ASS_AutoDetect)
         {
         ASS_Message("FX_Init: trying %s\n", SoundDriver_GetName(card));
         }

      devicestatus = MV_Init( card, mixrate, numvoices, numchannels, samplebits, initdata );
      if (devicestatus == MV_Ok)
         {
         FX_Installed = TRUE;
         return FX_Ok;
         }
      }

   if (SoundCard == ASS_AutoDetect)
      {
      // A failure to autodetect falls back to no sound.
      card = ASS_NoSound;

      devicestatus = MV_Init( card, mixrate, numvoices, numchannels, samplebits, initdata );
      if ( devicestatus == MV_Ok )
         {
         FX_Installed = TRUE;
         return FX_Ok;
         }
      }

   FX_SetErrorCode( FX_MultiVocError );
   return FX_Error;
   }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %r12
movq %rcx, 0x8(%rsp)
movq %rdx, %r15
movl %esi, %ebp
movl %edi, %r14d
cmpl $0x0, 0xc41c(%rip)      # 0xf2d8
je 0x2ec3
callq 0x2f9d
cmpl $-0x2, %r14d
jne 0x2ed2
pushq $0x6
popq %rbx
pushq $0x1
popq %r13
jmp 0x2eed
movl %r14d, %r13d
movl %r14d, %ebx
cmpl $0x7, %r14d
jb 0x2eed
movl $0x3, 0xc3ec(%rip)      # 0xf2d4
jmp 0x2f6f
cmpl %ebx, %r13d
ja 0x2f40
movl %r13d, %edi
callq 0x2ad4
testl %eax, %eax
je 0x2f3b
cmpl $-0x2, %r14d
jne 0x2f1d
movl %r13d, %edi
callq 0x2b07
leaq 0x652c(%rip), %rdi      # 0x943f
movq %rax, %rsi
xorl %eax, %eax
callq 0x813d
movl %r13d, %edi
movq %r12, %rsi
movl %ebp, %edx
movq %r15, %rcx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
callq 0x508f
testl %eax, %eax
je 0x2f74
incl %r13d
jmp 0x2eed
cmpl $-0x2, %r14d
jne 0x2f65
xorl %ebx, %ebx
xorl %edi, %edi
movq %r12, %rsi
movl %ebp, %edx
movq %r15, %rcx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
callq 0x508f
testl %eax, %eax
je 0x2f82
movl $0x4, 0xc365(%rip)      # 0xf2d4
pushq $-0x1
popq %rbx
jmp 0x2f8c
movl $0x1, 0xc35a(%rip)      # 0xf2d8
xorl %ebx, %ebx
jmp 0x2f8c
movl $0x1, 0xc34c(%rip)      # 0xf2d8
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/fx_man.c
// Function: FX_PlayAuto
int FX_PlayAuto( char *ptr, unsigned int length, 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_PlayVOC(ptr, length, pitchoffset, vol, left, right, priority, callbackval);
   } else if (!memcmp("RIFF", ptr, 4) && !memcmp("WAVE", ptr + 8, 4)) {
      handle = MV_PlayWAV(ptr, length, pitchoffset, vol, left, right, priority, callbackval);
   #ifdef HAVE_VORBIS
   } else if (!memcmp("OggS", ptr, 4)) {
      handle = MV_PlayVorbis(ptr, length, pitchoffset, vol, left, right, priority, callbackval);
   #endif
   }
   
   if ( handle < MV_Ok )
   {
      FX_SetErrorCode( FX_MultiVocError );
      handle = FX_Warning;
   }
   
   return handle;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r13
leaq 0x612c(%rip), %rdi      # 0x945a
pushq $0x14
popq %rdx
movq %r13, %rsi
callq 0x2200
testl %eax, %eax
je 0x3380
movl 0x48(%rsp), %r10d
movl 0x40(%rsp), %eax
cmpl $0x46464952, (%r13)     # imm = 0x46464952
jne 0x335a
cmpl $0x45564157, 0x8(%r13)  # imm = 0x45564157
je 0x33c5
cmpl $0x5367674f, (%r13)     # imm = 0x5367674F
jne 0x33a9
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
pushq %r10
pushq %rax
callq 0x60db
jmp 0x33a1
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
movl 0x48(%rsp), %eax
pushq %rax
movl 0x48(%rsp), %eax
pushq %rax
callq 0x4a80
addq $0x10, %rsp
testl %eax, %eax
jns 0x33b6
movl $0x4, 0xbf21(%rip)      # 0xf2d4
pushq $-0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
pushq %r10
pushq %rax
callq 0x45e7
jmp 0x33a1
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r13
leaq 0x6055(%rip), %rdi      # 0x945a
pushq $0x14
popq %rdx
movq %r13, %rsi
callq 0x2200
testl %eax, %eax
je 0x3463
movl 0x50(%rsp), %r11d
movl 0x48(%rsp), %r10d
movl 0x40(%rsp), %eax
cmpl $0x46464952, (%r13)     # imm = 0x46464952
jne 0x3436
cmpl $0x45564157, 0x8(%r13)  # imm = 0x45564157
je 0x34b2
cmpl $0x5367674f, (%r13)     # imm = 0x5367674F
jne 0x3496
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
movl 0x58(%rsp), %ebx
pushq %rbx
pushq %r11
pushq %r10
pushq %rax
callq 0x6105
jmp 0x348e
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
movl 0x58(%rsp), %eax
pushq %rax
movl 0x58(%rsp), %eax
pushq %rax
movl 0x58(%rsp), %eax
pushq %rax
movl 0x58(%rsp), %eax
pushq %rax
callq 0x4aad
addq $0x20, %rsp
testl %eax, %eax
jns 0x34a3
movl $0x4, 0xbe34(%rip)      # 0xf2d4
pushq $-0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
movl 0x58(%rsp), %ebx
pushq %rbx
pushq %r11
pushq %r10
pushq %rax
callq 0x4614
jmp 0x348e
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/fx_man.c
// Function: FX_PlayAuto3D
int FX_PlayAuto3D( char *ptr, unsigned int length, int pitchoffset, int angle,
                   int distance, int priority, unsigned int callbackval )
{
   int handle = -1;
   
   if (!memcmp("Creative Voice File\x1a", ptr, 20)) {
      handle = MV_PlayVOC3D(ptr, length, pitchoffset, angle, distance, priority, callbackval);
   } else if (!memcmp("RIFF", ptr, 4) && !memcmp("WAVE", ptr + 8, 4)) {
      handle = MV_PlayWAV3D(ptr, length, pitchoffset, angle, distance, priority, callbackval);
   #ifdef HAVE_VORBIS
   } else if (!memcmp("OggS", ptr, 4)) {
      handle = MV_PlayVorbis3D(ptr, length, pitchoffset, angle, distance, priority, callbackval);
   #endif
   }
   
   if ( handle < MV_Ok )
   {
      FX_SetErrorCode( FX_MultiVocError );
      handle = FX_Warning;
   }
   
   return handle;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %ebx
movq %rdi, %r13
leaq 0x5f62(%rip), %rdi      # 0x945a
pushq $0x14
popq %rdx
movq %r13, %rsi
callq 0x2200
testl %eax, %eax
je 0x3544
movl 0x40(%rsp), %eax
cmpl $0x46464952, (%r13)     # imm = 0x46464952
jne 0x351f
cmpl $0x45564157, 0x8(%r13)  # imm = 0x45564157
je 0x3581
cmpl $0x5367674f, (%r13)     # imm = 0x5367674F
jne 0x3565
movl %eax, (%rsp)
movq %r13, %rdi
movl %ebx, %esi
movl %r12d, %edx
movl %r15d, %ecx
movl %r14d, %r8d
movl %ebp, %r9d
callq 0x6048
jmp 0x3561
movl 0x40(%rsp), %eax
movl %eax, (%rsp)
movq %r13, %rdi
movl %ebx, %esi
movl %r12d, %edx
movl %r15d, %ecx
movl %r14d, %r8d
movl %ebp, %r9d
callq 0x49f3
testl %eax, %eax
jns 0x3572
movl $0x4, 0xbd65(%rip)      # 0xf2d4
pushq $-0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, (%rsp)
movq %r13, %rdi
movl %ebx, %esi
movl %r12d, %edx
movl %r15d, %ecx
movl %r14d, %r8d
movl %ebp, %r9d
callq 0x485b
jmp 0x3561
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_PlayVoice
void MV_PlayVoice
   (
   VoiceNode *voice
   )

   {
   int flags;

   flags = DisableInterrupts();
   LL_SortedInsertion( &VoiceList, voice, prev, next, VoiceNode, priority );

   RestoreInterrupts( flags );
   }

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3668
movq 0xbcb6(%rip), %rax      # 0xf2f0
leaq 0xbca7(%rip), %rcx      # 0xf2e8
cmpq %rcx, %rax
je 0x3654
movl 0x7c(%rbx), %edx
cmpl 0x7c(%rax), %edx
jle 0x3654
movq 0x8(%rax), %rax
jmp 0x3641
movq %rax, 0x8(%rbx)
movq (%rax), %rcx
movq %rcx, (%rbx)
movq %rbx, 0x8(%rcx)
movq %rbx, (%rax)
popq %rbx
jmp 0x3680
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_StopVoice
static void MV_StopVoice
   (
   VoiceNode *voice
   )

   {
   int flags;

   flags = DisableInterrupts();

   // move the voice from the play list to the free list
   LL_Remove( voice, next, prev );
   LL_Add( (VoiceNode*) &VoicePool, voice, next, prev );

   RestoreInterrupts( flags );

   #ifdef HAVE_VORBIS
   if (voice->wavetype == Vorbis)
      {
      MV_ReleaseVorbisVoice(voice);
      }
   #endif
   }

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3668
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movq %rbx, 0x8(%rbx)
leaq 0xbb73(%rip), %rax      # 0xf398
movq %rax, (%rbx)
movq 0xbb71(%rip), %rax      # 0xf3a0
movq %rax, 0x8(%rbx)
movq %rbx, (%rax)
movq %rbx, 0xbb63(%rip)      # 0xf3a0
callq 0x3680
cmpl $0x4, 0x10(%rbx)
jne 0x3851
movq %rbx, %rdi
popq %rbx
jmp 0x64ac
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_VoiceAvailable
int MV_VoiceAvailable
   (
   int priority
   )

   {
   VoiceNode   *voice;
   VoiceNode   *node;
   int          flags;

   // Check if we have any free voices
   if ( !LL_Empty( &VoicePool, next, prev ) )
      {
      return( TRUE );
      }

   flags = DisableInterrupts();

   // check if we have a higher priority than a voice that is playing.
   voice = VoiceList.next;
   for( node = VoiceList.next; node != &VoiceList; node = node->next )
      {
      if ( node->priority < voice->priority )
         {
         voice = node;
         }
      }

   RestoreInterrupts( flags );

   if ( ( voice != &VoiceList ) && ( priority >= voice->priority ) )
      {
      return( TRUE );
      }

   return( FALSE );
   }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xb9d4(%rip), %rax      # 0xf398
movq 0xb9cd(%rip), %rcx      # 0xf398
pushq $0x1
popq %rbx
cmpq %rax, %rcx
jne 0x3a22
movq 0xb9c6(%rip), %rcx      # 0xf3a0
cmpq %rax, %rcx
jne 0x3a22
movl %edi, %ebp
callq 0x3668
movq 0xb8fb(%rip), %r14      # 0xf2e8
movq 0xb8f4(%rip), %rax      # 0xf2e8
leaq 0xb8ed(%rip), %r15      # 0xf2e8
cmpq %r15, %rax
je 0x3a10
movl 0x7c(%rax), %ecx
cmpl 0x7c(%r14), %ecx
cmovlq %rax, %r14
movq (%rax), %rax
jmp 0x39fb
callq 0x3680
cmpq %r15, %r14
je 0x3a20
cmpl %ebp, 0x7c(%r14)
jle 0x3a22
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_SetVoicePitch
static void MV_SetVoicePitch
   (
   VoiceNode *voice,
   unsigned int rate,
   int pitchoffset
   )

   {
   voice->SamplingRate = rate;
   voice->PitchScale   = PITCH_GetScale( pitchoffset );
   voice->RateScale    = ( rate * voice->PitchScale ) / MV_MixRate;

   // Multiply by MixBufferSize - 1
   voice->FixedPointBufferSize = ( voice->RateScale * MixBufferSize ) -
      voice->RateScale;
   }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, 0x64(%rdi)
movl %edx, %edi
callq 0x5fe8
movl %eax, 0x4c(%r14)
imull %ebx, %eax
xorl %edx, %edx
divl 0x14a7b(%rip)           # 0x18510
movl %eax, 0x68(%r14)
imull $0xff, %eax, %eax
movl %eax, 0x50(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_SetFrequency
int MV_SetFrequency
   (
   int handle,
   int frequency
   )

   {
   VoiceNode *voice;

   if ( !MV_Installed )
      {
      MV_SetErrorCode( MV_NotInstalled );
      return( MV_Error );
      }

   voice = MV_GetVoice( handle );
   if ( voice == NULL )
      {
      MV_SetErrorCode( MV_VoiceNotFound );
      return( MV_Error );
      }

   MV_SetVoicePitch( voice, frequency, 0 );

   return( MV_Ok );
   }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpl $0x0, 0xb82b(%rip)      # 0xf2e0
je 0x3ad3
movl %esi, %ebx
callq 0x36c5
testq %rax, %rax
je 0x3adf
xorl %ebp, %ebp
movq %rax, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x3a73
jmp 0x3aec
movl $0x2, 0xb807(%rip)      # 0xf2e4
jmp 0x3ae9
movl $0x6, 0xb7fb(%rip)      # 0xf2e4
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_GetFrequency
int MV_GetFrequency
   (
   int handle,
   int *frequency
   )

   {
   VoiceNode *voice;

   if ( !MV_Installed )
      {
      MV_SetErrorCode( MV_NotInstalled );
      return( MV_Error );
      }

   voice = MV_GetVoice( handle );
   if ( voice == NULL )
      {
      MV_SetErrorCode( MV_VoiceNotFound );
      return( MV_Error );
      }

    if ( voice->SamplingRate == 0 )
      {
      voice->GetSound( voice );
      }

   *frequency = voice->SamplingRate;

   return( MV_Ok );
   }

// Assembly:
cmpl $0x0, 0xb7e4(%rip)      # 0xf2e0
je 0x3b2a
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x36c5
testq %rax, %rax
je 0x3b38
movq %rax, %r14
movl 0x64(%rax), %eax
testl %eax, %eax
jne 0x3b24
movq %r14, %rdi
callq *0x18(%r14)
movl 0x64(%r14), %eax
movl %eax, (%rbx)
xorl %eax, %eax
jmp 0x3b45
movl $0x2, 0xb7b0(%rip)      # 0xf2e4
pushq $-0x1
popq %rax
retq
movl $0x6, 0xb7a2(%rip)      # 0xf2e4
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_SetPan
int MV_SetPan
   (
   int handle,
   int vol,
   int left,
   int right
   )

   {
   VoiceNode *voice;

   if ( !MV_Installed )
      {
      MV_SetErrorCode( MV_NotInstalled );
      return( MV_Error );
      }

   voice = MV_GetVoice( handle );
   if ( voice == NULL )
      {
      MV_SetErrorCode( MV_VoiceNotFound );
      return( MV_Warning );
      }

   MV_SetVoiceVolume( voice, vol, left, right );

   return( MV_Ok );
   }

// Assembly:
cmpl $0x0, 0xb56a(%rip)      # 0xf2e0
je 0x3da0
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
callq 0x36c5
testq %rax, %rax
je 0x3dae
movq %rax, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x3c9d
xorl %eax, %eax
jmp 0x3dbb
movl $0x2, 0xb53a(%rip)      # 0xf2e4
pushq $-0x1
popq %rax
retq
movl $0x6, 0xb52c(%rip)      # 0xf2e4
pushq $-0x2
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_StartDemandFeedPlayback
int MV_StartDemandFeedPlayback
   (
   void ( *function )( char **ptr, unsigned int *length ),
   int rate,
   int pitchoffset,
   int vol,
   int left,
   int right,
   int priority,
   unsigned int callbackval
   )

   {
   VoiceNode *voice;

   if ( !MV_Installed )
      {
      MV_SetErrorCode( MV_NotInstalled );
      return( MV_Error );
      }

   // Request a voice from the voice pool
   voice = MV_AllocVoice( priority );
   if ( voice == NULL )
      {
      MV_SetErrorCode( MV_NoVoices );
      return( MV_Error );
      }

   voice->wavetype    = DemandFeed;
   voice->bits        = 8;
   voice->channels    = 1;
   voice->GetSound    = MV_GetNextDemandFeedBlock;
   voice->NextBlock   = NULL;
   voice->DemandFeed  = function;
   voice->LoopStart   = NULL;
   voice->LoopCount   = 0;
   voice->BlockLength = 0;
   voice->position    = 0;
   voice->sound       = NULL;
   voice->length      = 0;
   voice->BlockLength = 0;
   voice->Playing     = TRUE;
   voice->Paused      = FALSE;
   voice->next        = NULL;
   voice->prev        = NULL;
   voice->priority    = priority;
   voice->callbackval = callbackval;

   MV_SetVoicePitch( voice, rate, pitchoffset );
   MV_SetVoiceVolume( voice, vol, left, right );
   MV_PlayVoice( voice );

   return( voice->handle );
   }

// Assembly:
cmpl $0x0, 0xb011(%rip)      # 0xf2e0
je 0x4395
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
movl %r9d, 0x4(%rsp)
movl 0x40(%rsp), %edi
callq 0x38e9
testq %rax, %rax
je 0x43a3
movq %rax, %r15
movl $0x2, 0x10(%rax)
movw $0x108, 0x14(%rax)      # imm = 0x108
leaq 0xa2(%rip), %rax        # 0x43bf
movq %rax, 0x18(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r15)
movq %rbx, 0x80(%r15)
andl $0x0, 0x40(%r15)
andl $0x0, 0x6c(%r15)
andq $0x0, 0x58(%r15)
andl $0x0, 0x60(%r15)
movl 0x48(%rsp), %eax
andl $0x0, 0x48(%r15)
movq $0x1, 0x70(%r15)
movups %xmm0, (%r15)
movl 0x40(%rsp), %ecx
movl %ecx, 0x7c(%r15)
movl %eax, 0xa0(%r15)
movq %r15, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x3a73
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl 0x4(%rsp), %ecx
callq 0x3c9d
movq %r15, %rdi
callq 0x362a
movl 0x78(%r15), %eax
jmp 0x43b0
movl $0x2, 0xaf45(%rip)      # 0xf2e4
pushq $-0x1
popq %rax
retq
movl $0x4, 0xaf37(%rip)      # 0xf2e4
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_GetNextDemandFeedBlock
static playbackstatus MV_GetNextDemandFeedBlock
   (
   VoiceNode *voice
   )

   {
   if ( voice->BlockLength > 0 )
      {
      voice->position    -= voice->length;
      voice->sound       += voice->length >> 16;
      voice->length       = min( voice->BlockLength, 0x8000 );
      voice->BlockLength -= voice->length;
      voice->length     <<= 16;

      return( KeepPlaying );
      }

   if ( voice->DemandFeed == NULL )
      {
      return( NoMoreData );
      }

   voice->position     = 0;
   ( voice->DemandFeed )( &voice->sound, &voice->BlockLength );
   voice->length       = min( voice->BlockLength, 0x8000 );
   voice->BlockLength -= voice->length;
   voice->length     <<= 16;

   if ( ( voice->length > 0 ) && ( voice->sound != NULL ) )
      {
      return( KeepPlaying );
      }
   return( NoMoreData );
   }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x48(%rdi), %eax
testl %eax, %eax
je 0x43f9
movl 0x60(%rbx), %ecx
subl %ecx, 0x6c(%rbx)
shrl $0x10, %ecx
addq %rcx, 0x58(%rbx)
movl $0x8000, %ecx           # imm = 0x8000
cmpl %ecx, %eax
cmovbl %eax, %ecx
subl %ecx, %eax
movl %eax, 0x48(%rbx)
shll $0x10, %ecx
movl %ecx, 0x60(%rbx)
pushq $0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x80(%rbx), %rax
xorl %ebp, %ebp
testq %rax, %rax
je 0x43f2
leaq 0x48(%rbx), %rsi
andl $0x0, 0x6c(%rbx)
leaq 0x58(%rbx), %r14
movq %r14, %rdi
callq *%rax
movl 0x48(%rbx), %eax
movl $0x8000, %ecx           # imm = 0x8000
cmpl %ecx, %eax
cmovbl %eax, %ecx
movl %eax, %edx
subl %ecx, %edx
movl %edx, 0x48(%rbx)
shll $0x10, %ecx
movl %ecx, 0x60(%rbx)
testl %eax, %eax
je 0x43f2
cmpq $0x0, (%r14)
jne 0x43ef
jmp 0x43f2
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_PlayLoopedRaw
int MV_PlayLoopedRaw
   (
   char *ptr,
   unsigned int length,
   char *loopstart,
   char *loopend,
   unsigned rate,
   int   pitchoffset,
   int   vol,
   int   left,
   int   right,
   int   priority,
   unsigned int callbackval
   )

   {
   VoiceNode *voice;

   if ( !MV_Installed )
      {
      MV_SetErrorCode( MV_NotInstalled );
      return( MV_Error );
      }

   // Request a voice from the voice pool
   voice = MV_AllocVoice( priority );
   if ( voice == NULL )
      {
      MV_SetErrorCode( MV_NoVoices );
      return( MV_Error );
      }

   voice->wavetype    = Raw;
   voice->bits        = 8;
   voice->channels    = 1;
   voice->GetSound    = MV_GetNextRawBlock;
   voice->Playing     = TRUE;
   voice->Paused      = FALSE;
   voice->NextBlock   = ptr;
   voice->position    = 0;
   voice->BlockLength = length;
   voice->length      = 0;
   voice->next        = NULL;
   voice->prev        = NULL;
   voice->priority    = priority;
   voice->callbackval = callbackval;
   voice->LoopStart   = loopstart;
   voice->LoopEnd     = loopend;
   voice->LoopSize    = (unsigned int)( voice->LoopEnd - voice->LoopStart ) + 1;

   MV_SetVoicePitch( voice, rate, pitchoffset );
   MV_SetVoiceVolume( voice, vol, left, right );
   MV_PlayVoice( voice );

   return( voice->handle );
   }

// Assembly:
cmpl $0x0, 0xae60(%rip)      # 0xf2e0
je 0x454d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %rbx
movl %r9d, 0x4(%rsp)
movl 0x58(%rsp), %edi
callq 0x38e9
testq %rax, %rax
je 0x455b
movq %rax, %r14
movl 0x60(%rsp), %eax
andl $0x0, 0x10(%r14)
movw $0x108, 0x14(%r14)      # imm = 0x108
leaq 0xa6(%rip), %rcx        # 0x4577
movq %rcx, 0x18(%r14)
andl $0x0, 0x74(%r14)
movq %rbx, 0x28(%r14)
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0x6c(%r14)
movl %r13d, 0x48(%r14)
andl $0x0, 0x60(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movl 0x58(%rsp), %ecx
movl %ecx, 0x7c(%r14)
movl %eax, 0xa0(%r14)
movq %r12, 0x30(%r14)
movq %r15, 0x38(%r14)
subl %r12d, %r15d
incl %r15d
movl %r15d, 0x44(%r14)
movq %r14, %rdi
movl %ebp, %esi
movl 0x4(%rsp), %edx
callq 0x3a73
movq %r14, %rdi
movl 0x40(%rsp), %esi
movl 0x48(%rsp), %edx
movl 0x50(%rsp), %ecx
callq 0x3c9d
movq %r14, %rdi
callq 0x362a
movl 0x78(%r14), %eax
jmp 0x4568
movl $0x2, 0xad8d(%rip)      # 0xf2e4
pushq $-0x1
popq %rax
retq
movl $0x4, 0xad7f(%rip)      # 0xf2e4
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_GetNextRawBlock
static playbackstatus MV_GetNextRawBlock
   (
   VoiceNode *voice
   )

   {
   if ( voice->BlockLength <= 0 )
      {
      if ( voice->LoopStart == NULL )
         {
         voice->Playing = FALSE;
         return( NoMoreData );
         }

      voice->BlockLength = voice->LoopSize;
      voice->NextBlock   = voice->LoopStart;
      voice->length = 0;
      voice->position = 0;
      }

   voice->sound        = voice->NextBlock;
   voice->position    -= voice->length;
   voice->length       = min( voice->BlockLength, 0x8000 );
   voice->NextBlock   += voice->length * (voice->channels * voice->bits / 8);
   voice->BlockLength -= voice->length;
   voice->length     <<= 16;

   return( KeepPlaying );
   }

// Assembly:
movl 0x48(%rdi), %ecx
testl %ecx, %ecx
je 0x458a
movq 0x28(%rdi), %rsi
movl 0x6c(%rdi), %eax
subl 0x60(%rdi), %eax
jmp 0x4598
movq 0x30(%rdi), %rsi
testq %rsi, %rsi
je 0x45e0
movl 0x44(%rdi), %ecx
xorl %eax, %eax
movq %rsi, 0x58(%rdi)
movl %eax, 0x6c(%rdi)
movl $0x8000, %r8d           # imm = 0x8000
cmpl %r8d, %ecx
cmovbl %ecx, %r8d
movsbl 0x15(%rdi), %edx
movsbl 0x14(%rdi), %eax
imull %edx, %eax
cwtd
movw $0x8, %r9w
idivw %r9w
cwtl
imull %r8d, %eax
addq %rsi, %rax
movq %rax, 0x28(%rdi)
subl %r8d, %ecx
movl %ecx, 0x48(%rdi)
shll $0x10, %r8d
movl %r8d, 0x60(%rdi)
pushq $0x1
popq %rax
retq
andl $0x0, 0x70(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_GetNextWAVBlock
static playbackstatus MV_GetNextWAVBlock
   (
   VoiceNode *voice
   )

   {
   if ( voice->BlockLength <= 0 )
      {
      if ( voice->LoopStart == NULL )
         {
         voice->Playing = FALSE;
         return( NoMoreData );
         }

      voice->BlockLength = voice->LoopSize;
      voice->NextBlock   = voice->LoopStart;
      voice->length      = 0;
      voice->position    = 0;
      }

   voice->sound        = voice->NextBlock;
   voice->position    -= voice->length;
   voice->length       = min( voice->BlockLength, 0x8000 );
   voice->NextBlock   += voice->length * (voice->channels * voice->bits / 8);
   voice->BlockLength -= voice->length;
   voice->length     <<= 16;

   return( KeepPlaying );
   }

// Assembly:
movl 0x48(%rdi), %ecx
testl %ecx, %ecx
je 0x4996
movq 0x28(%rdi), %rsi
movl 0x6c(%rdi), %eax
subl 0x60(%rdi), %eax
jmp 0x49a4
movq 0x30(%rdi), %rsi
testq %rsi, %rsi
je 0x49ec
movl 0x44(%rdi), %ecx
xorl %eax, %eax
movq %rsi, 0x58(%rdi)
movl %eax, 0x6c(%rdi)
movl $0x8000, %r8d           # imm = 0x8000
cmpl %r8d, %ecx
cmovbl %ecx, %r8d
movsbl 0x15(%rdi), %edx
movsbl 0x14(%rdi), %eax
imull %edx, %eax
cwtd
movw $0x8, %r9w
idivw %r9w
cwtl
imull %r8d, %eax
addq %rsi, %rax
movq %rax, 0x28(%rdi)
subl %r8d, %ecx
movl %ecx, 0x48(%rdi)
shll $0x10, %r8d
movl %r8d, 0x60(%rdi)
pushq $0x1
popq %rax
retq
andl $0x0, 0x70(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_CreateVolumeTable
void MV_CreateVolumeTable
   (
   int index,
   int volume,
   int MaxVolume
   )

   {
   int val;
   int level;
   int i;

   level = ( volume * MaxVolume ) / MV_MaxTotalVolume;
   if ( MV_Bits == 16 )
      {
      for( i = 0; i < 65536; i += 256 )
         {
         val   = i - 0x8000;
         val  *= level;
         val  /= MV_MaxVolume;
         MV_VolumeTable[ index ][ i / 256 ] = val;
         }
      }
   else
      {
      for( i = 0; i < 256; i++ )
         {
         val   = i - 0x80;
         val  *= level;
         val  /= MV_MaxVolume;
         MV_VolumeTable[ volume ][ i ] = val;
         }
      }
   }

// Assembly:
movl %edx, %eax
imull %esi, %eax
movl $0xff, %ecx
cltd
idivl %ecx
movl %eax, %ecx
cmpl $0x10, 0xa2b6(%rip)     # 0xf228
movl 0xa2a3(%rip), %r8d      # 0xf21c
jne 0x4fba
movslq %edi, %rax
movl %ecx, %esi
shll $0xf, %esi
negl %esi
shll $0x8, %ecx
shlq $0x9, %rax
leaq 0xa4ad(%rip), %rdi      # 0xf440
addq %rax, %rdi
xorl %r9d, %r9d
cmpq $0xffff, %r9            # imm = 0xFFFF
ja 0x4ff1
movl %esi, %eax
cltd
idivl %r8d
movw %ax, (%rdi)
addq $0x100, %r9             # imm = 0x100
addl %ecx, %esi
addq $0x2, %rdi
jmp 0x4f99
movslq %esi, %rdi
movl %ecx, %esi
shll $0x7, %esi
negl %esi
shlq $0x9, %rdi
xorl %r9d, %r9d
leaq 0xa46e(%rip), %r10      # 0xf440
cmpq $0x100, %r9             # imm = 0x100
je 0x4ff1
movl %esi, %eax
cltd
idivl %r8d
leaq (%rdi,%r9,2), %rdx
movw %ax, (%r10,%rdx)
incq %r9
addl %ecx, %esi
jmp 0x4fd2
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_SetVolume
void MV_SetVolume
   (
   int volume
   )

   {
   volume = max( 0, volume );
   volume = min( volume, MV_MaxTotalVolume );

   MV_TotalVolume = volume;

   // Calculate volume table
   MV_CalcVolume( volume );
   }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %eax, %eax
testl %edi, %edi
cmovlel %eax, %ebx
movl $0xff, %ecx
cmpl %ecx, %ebx
cmovgel %ecx, %ebx
movl %ebx, 0xa22a(%rip)      # 0xf238
cmpq $0x80, %rax
je 0x5035
movq 0x13503(%rip), %rcx     # 0x18520
movb $0x0, (%rcx,%rax)
movq 0x134f8(%rip), %rcx     # 0x18520
movb $-0x1, 0x180(%rcx,%rax)
incq %rax
jmp 0x500e
xorl %eax, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0x5052
movq 0x134da(%rip), %rcx     # 0x18520
movb %al, 0x80(%rcx,%rax)
incq %rax
jmp 0x5037
xorl %ebp, %ebp
cmpl 0xa1c2(%rip), %ebp      # 0xf21c
jg 0x506b
movl %ebp, %edi
movl %ebp, %esi
movl %ebx, %edx
callq 0x4f5c
incl %ebp
jmp 0x5054
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/mix.c
// Function: MV_Mix8BitMono
void MV_Mix8BitMono( unsigned int position, unsigned int rate,
                    char *start, unsigned int length )
{
    unsigned char *source = (unsigned char *) start;
    unsigned char *dest = (unsigned char *) MV_MixDestination;
    int sample0;
    
    while (length--) {
        sample0 = source[position >> 16];
        position += rate;
        
        sample0 = MV_LeftVolume[sample0] + *dest;
        sample0 = MV_HarshClipTable[sample0 + 128];
        
        *dest = sample0 & 255;
        
        dest += MV_SampleSize;
    }
    
    MV_MixPosition = position;
    MV_MixDestination = (char *) dest;
}

// Assembly:
pushq %r14
pushq %rbx
leaq 0x13161(%rip), %rax     # 0x18528
movq (%rax), %r8
leaq 0x12077(%rip), %r9      # 0x17448
leaq 0x13148(%rip), %r10     # 0x18520
leaq 0x9e41(%rip), %r11      # 0xf220
subl $0x1, %ecx
jb 0x5411
movl %edi, %ebx
shrl $0x10, %ebx
movzbl (%rdx,%rbx), %ebx
addl %esi, %edi
movq (%r9), %r14
movswq (%r14,%rbx,2), %rbx
movzbl (%r8), %r14d
addq (%r10), %rbx
movb 0x80(%r14,%rbx), %bl
movb %bl, (%r8)
movslq (%r11), %rbx
addq %rbx, %r8
jmp 0x53df
leaq 0x13118(%rip), %rcx     # 0x18530
movl %edi, (%rcx)
movq %r8, (%rax)
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/mix.c
// Function: MV_Mix8BitStereo
void MV_Mix8BitStereo( unsigned int position, unsigned int rate,
                      char *start, unsigned int length )
{
    unsigned char *source = (unsigned char *) start;
    unsigned char *dest = (unsigned char *) MV_MixDestination;
    int sample0, sample1;
    
    while (length--) {
        sample0 = source[position >> 16];
        sample1 = sample0;
        position += rate;
        
        sample0 = MV_LeftVolume[sample0] + *dest;
        sample1 = MV_RightVolume[sample1] + *(dest + MV_RightChannelOffset);
        sample0 = MV_HarshClipTable[sample0 + 128];
        sample1 = MV_HarshClipTable[sample1 + 128];
        
        *dest = sample0 & 255;
        *(dest + MV_RightChannelOffset) = sample1 & 255;
        
        dest += MV_SampleSize;
    }
    
    MV_MixPosition = position;
    MV_MixDestination = (char *) dest;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x130f6(%rip), %rax     # 0x18528
movq (%rax), %r8
leaq 0x1200c(%rip), %r9      # 0x17448
leaq 0x11ffd(%rip), %r10     # 0x17440
leaq 0x13032(%rip), %r11     # 0x1847c
leaq 0x130cf(%rip), %rbx     # 0x18520
leaq 0x9dc8(%rip), %r14      # 0xf220
subl $0x1, %ecx
jb 0x54b6
movl %edi, %r15d
shrl $0x10, %r15d
movzbl (%rdx,%r15), %r15d
addl %esi, %edi
movq (%r9), %r12
addl %r15d, %r15d
movswq (%r12,%r15), %r12
movzbl (%r8), %r13d
movq (%r10), %rbp
movswq (%rbp,%r15), %r15
movslq (%r11), %rbp
movzbl (%r8,%rbp), %ebp
movq (%rbx), %rax
addq %rax, %r12
movb 0x80(%r13,%r12), %r12b
addq %rax, %r15
movb 0x80(%rbp,%r15), %al
movb %r12b, (%r8)
movslq (%r11), %r15
movb %al, (%r8,%r15)
movslq (%r14), %rax
addq %rax, %r8
jmp 0x5458
leaq 0x13073(%rip), %rax     # 0x18530
movl %edi, (%rax)
leaq 0x13062(%rip), %rax     # 0x18528
movq %r8, (%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/mix.c
// Function: MV_Mix16BitMono
void MV_Mix16BitMono( unsigned int position, unsigned int rate,
                     char *start, unsigned int length )
{
    unsigned char *source = (unsigned char *) start;
    short *dest = (short *) MV_MixDestination;
    int sample0;
    
    while (length--) {
        sample0 = source[position >> 16];
        position += rate;
        
        sample0 = MV_LeftVolume[sample0] + *dest;
        if (sample0 < -32768) sample0 = -32768;
        else if (sample0 > 32767) sample0 = 32767;
        
        *dest = (short) sample0;
        
        dest += MV_SampleSize / 2;
    }
    
    MV_MixPosition = position;
    MV_MixDestination = (char *) dest;
}

// Assembly:
pushq %rbp
pushq %rbx
movq %rdx, %r8
leaq 0x13048(%rip), %r9      # 0x18528
movq (%r9), %r10
leaq 0x11f5e(%rip), %rax     # 0x17448
movq (%rax), %r11
leaq 0x9d2c(%rip), %rax      # 0xf220
movl (%rax), %eax
movl $0x2, %ebx
cltd
idivl %ebx
cltq
addq %rax, %rax
subl $0x1, %ecx
jb 0x553b
movl %edi, %edx
shrl $0x10, %edx
movzbl (%r8,%rdx), %edx
movzwl (%r11,%rdx,2), %edx
movzwl (%r10), %ebx
leal (%rdx,%rbx), %ebp
movswl %bp, %ebp
sarl $0xf, %ebp
xorl $0xffff8000, %ebp       # imm = 0xFFFF8000
addw %bx, %dx
cmovol %ebp, %edx
addl %esi, %edi
movw %dx, (%r10)
addq %rax, %r10
jmp 0x5503
leaq 0x12fee(%rip), %rax     # 0x18530
movl %edi, (%rax)
movq %r10, (%r9)
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/mix.c
// Function: MV_Mix16BitStereo
void MV_Mix16BitStereo( unsigned int position, unsigned int rate,
                       char *start, unsigned int length )
{
    unsigned char *source = (unsigned char *) start;
    short *dest = (short *) MV_MixDestination;
    int sample0, sample1;
    
    while (length--) {
        sample0 = source[position >> 16];
        sample1 = sample0;
        position += rate;
        
        sample0 = MV_LeftVolume[sample0] + *dest;
        sample1 = MV_RightVolume[sample1] + *(dest + MV_RightChannelOffset / 2);
        if (sample0 < -32768) sample0 = -32768;
        else if (sample0 > 32767) sample0 = 32767;
        if (sample1 < -32768) sample1 = -32768;
        else if (sample1 > 32767) sample1 = 32767;
        
        *dest = (short) sample0;
        *(dest + MV_RightChannelOffset/2) = (short) sample1;
        
        dest += MV_SampleSize / 2;
    }
    
    MV_MixPosition = position;
    MV_MixDestination = (char *) dest;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r8
leaq 0x12fca(%rip), %r9      # 0x18528
movq (%r9), %r10
leaq 0x11ee0(%rip), %rax     # 0x17448
movq (%rax), %r11
leaq 0x11ece(%rip), %rax     # 0x17440
movq (%rax), %rbx
leaq 0x12f00(%rip), %rax     # 0x1847c
movl (%rax), %eax
movl $0x2, %ebp
cltd
idivl %ebp
movslq %eax, %r14
leaq 0x9c90(%rip), %rax      # 0xf220
movl (%rax), %eax
cltd
idivl %ebp
cltq
addq %rax, %rax
movl $0xffff8000, %edx       # imm = 0xFFFF8000
subl $0x1, %ecx
jb 0x55fe
movl %edi, %r15d
shrl $0x10, %r15d
movzbl (%r8,%r15), %r12d
addl %r12d, %r12d
movzwl (%rbx,%r12), %r15d
movzwl (%r10,%r14,2), %r13d
leal (%r15,%r13), %ebp
movswl %bp, %ebp
sarl $0xf, %ebp
xorl %edx, %ebp
addw %r13w, %r15w
movzwl (%r11,%r12), %r12d
cmovol %ebp, %r15d
movzwl (%r10), %r13d
leal (%r12,%r13), %ebp
movswl %bp, %ebp
sarl $0xf, %ebp
xorl %edx, %ebp
addw %r13w, %r12w
cmovol %ebp, %r12d
addl %esi, %edi
movw %r12w, (%r10)
movw %r15w, (%r10,%r14,2)
addq %rax, %r10
jmp 0x559f
leaq 0x12f2b(%rip), %rax     # 0x18530
movl %edi, (%rax)
movq %r10, (%r9)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/mix.c
// Function: MV_Mix16BitMono16
void MV_Mix16BitMono16( unsigned int position, unsigned int rate,
                       char *start, unsigned int length )
{
    unsigned short *source = (unsigned short *) start;
    short *dest = (short *) MV_MixDestination;
    int sample0l, sample0h, sample0;
    
    while (length--) {
        sample0 = source[position >> 16];
#ifdef BIGENDIAN
        sample0l = sample0 >> 8;
        sample0h = (sample0 & 255) ^ 128;
#else
        sample0l = sample0 & 255;
        sample0h = (sample0 >> 8) ^ 128;
#endif
        position += rate;
        
        sample0l = MV_LeftVolume[sample0l] >> 8;
        sample0h = MV_LeftVolume[sample0h];
        sample0 = sample0l + sample0h + 128 + *dest;
        if (sample0 < -32768) sample0 = -32768;
        else if (sample0 > 32767) sample0 = 32767;
        
        *dest = (short) sample0;
        
        dest += MV_SampleSize / 2;
    }
    
    MV_MixPosition = position;
    MV_MixDestination = (char *) dest;
}

// Assembly:
pushq %rbx
movq %rdx, %r8
leaq 0x12f08(%rip), %r9      # 0x18528
movq (%r9), %r10
leaq 0x11e1e(%rip), %rax     # 0x17448
movq (%rax), %r11
leaq 0x9bec(%rip), %rax      # 0xf220
movl (%rax), %eax
movl $0x2, %ebx
cltd
idivl %ebx
cltq
addq %rax, %rax
subl $0x1, %ecx
jb 0x56a0
movl %edi, %edx
shrl $0x10, %edx
movzwl (%r8,%rdx,2), %edx
movzbl %dl, %ebx
movsbl 0x1(%r11,%rbx,2), %ebx
shrl $0x7, %edx
andl $-0x2, %edx
xorl $0x100, %edx            # imm = 0x100
movswl (%r11,%rdx), %edx
addl %ebx, %edx
movswl (%r10), %ebx
addl %ebx, %edx
addl $0x80, %edx
movl $0x7fff, %ebx           # imm = 0x7FFF
cmpl %ebx, %edx
jl 0x5688
movl $0x7fff, %edx           # imm = 0x7FFF
cmpl $0xffff8001, %edx       # imm = 0xFFFF8001
jge 0x5695
movl $0xffff8000, %edx       # imm = 0xFFFF8000
addl %esi, %edi
movw %dx, (%r10)
addq %rax, %r10
jmp 0x5643
leaq 0x12e89(%rip), %rax     # 0x18530
movl %edi, (%rax)
movq %r10, (%r9)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jfaudiolib/src/mix.c
// Function: MV_Mix8BitMono16
void MV_Mix8BitMono16( unsigned int position, unsigned int rate,
                      char *start, unsigned int length )
{
    signed char *source = (signed char *) start + 1;
    unsigned char *dest = (unsigned char *) MV_MixDestination;
    int sample0;
    
    while (length--) {
        sample0 = source[(position >> 16) << 1];
        position += rate;
        
        sample0 = MV_LeftVolume[sample0 + 128] + *dest;
        sample0 = MV_HarshClipTable[sample0 + 128];
        
        *dest = sample0 & 255;
        
        dest += MV_SampleSize;
    }
    
    MV_MixPosition = position;
    MV_MixDestination = (char *) dest;
}

// Assembly:
pushq %r14
pushq %rbx
leaq 0x12e70(%rip), %rax     # 0x18528
movq (%rax), %r8
leaq 0x11d86(%rip), %r9      # 0x17448
leaq 0x12e57(%rip), %r10     # 0x18520
leaq 0x9b50(%rip), %r11      # 0xf220
subl $0x1, %ecx
jb 0x5708
movl %edi, %ebx
shrl $0x10, %ebx
movsbq 0x1(%rdx,%rbx,2), %rbx
addl %esi, %edi
movq (%r9), %r14
movswq 0x100(%r14,%rbx,2), %rbx
movzbl (%r8), %r14d
addq (%r10), %rbx
movb 0x80(%r14,%rbx), %bl
movb %bl, (%r8)
movslq (%r11), %rbx
addq %rbx, %r8
jmp 0x56d0
leaq 0x12e21(%rip), %rcx     # 0x18530
movl %edi, (%rcx)
movq %r8, (%rax)
popq %rbx
popq %r14
retq