LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/mixst.c
// Function: MV_Mix16BitMono8Stereo
void MV_Mix16BitMono8Stereo( 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) << 1];
        sample1 = source[((position >> 16) << 1) + 1];
        position += rate;
        
        sample0 = (MV_LeftVolume[sample0] + MV_LeftVolume[sample1]) / 2 + *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
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x15ee8(%rip), %rax     # 0x1ef58
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x14(%rbp)
cmpl $0x0, %eax
je 0x9155
movq -0x20(%rbp), %rax
movl -0x4(%rbp), %ecx
shrl $0x10, %ecx
shll %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movl -0x4(%rbp), %ecx
shrl $0x10, %ecx
shll %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
movl %eax, -0x30(%rbp)
movl -0x8(%rbp), %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq 0x14d40(%rip), %rax     # 0x1de08
movq (%rax), %rax
movslq -0x2c(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
leaq 0x14d2e(%rip), %rcx     # 0x1de08
movq (%rcx), %rcx
movslq -0x30(%rbp), %rdx
movswl (%rcx,%rdx,2), %ecx
addl %ecx, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq -0x28(%rbp), %rcx
movswl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
cmpl $0xffff8000, -0x2c(%rbp) # imm = 0xFFFF8000
jge 0x910d
movl $0xffff8000, -0x2c(%rbp) # imm = 0xFFFF8000
jmp 0x911f
cmpl $0x7fff, -0x2c(%rbp)    # imm = 0x7FFF
jle 0x911d
movl $0x7fff, -0x2c(%rbp)    # imm = 0x7FFF
jmp 0x911f
movl -0x2c(%rbp), %eax
movw %ax, %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
leaq 0xc5e9(%rip), %rax      # 0x1571c
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x9077
movl -0x4(%rbp), %ecx
leaq 0x15e01(%rip), %rax     # 0x1ef60
movl %ecx, (%rax)
movq -0x28(%rbp), %rcx
leaq 0x15dec(%rip), %rax     # 0x1ef58
movq %rcx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/mixst.c
// Function: MV_Mix8BitMono16Stereo
void MV_Mix8BitMono16Stereo( 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, sample1;
    
    while (length--) {
        sample0 = source[(position >> 16) << 2];
        sample1 = source[((position >> 16) << 2) + 2];
        position += rate;
        
        sample0 = MV_LeftVolume[sample0 + 128];
        sample1 = MV_LeftVolume[sample1 + 128];
        sample0 = (sample0 + sample1) / 2 + *dest;
        sample0 = MV_HarshClipTable[sample0 + 128];
        
        *dest = sample0 & 255;
        
        dest += MV_SampleSize;
    }
    
    MV_MixPosition = position;
    MV_MixDestination = (char *) dest;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
leaq 0x15a64(%rip), %rax     # 0x1ef58
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x14(%rbp)
cmpl $0x0, %eax
je 0x95e4
movq -0x20(%rbp), %rax
movl -0x4(%rbp), %ecx
shrl $0x10, %ecx
shll $0x2, %ecx
movl %ecx, %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movl -0x4(%rbp), %ecx
shrl $0x10, %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0x30(%rbp)
movl -0x8(%rbp), %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq 0x148ba(%rip), %rax     # 0x1de08
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
addl $0x80, %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
leaq 0x1489d(%rip), %rax     # 0x1de08
movq (%rax), %rax
movl -0x30(%rbp), %ecx
addl $0x80, %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq -0x28(%rbp), %rcx
movzbl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
leaq 0x159a6(%rip), %rax     # 0x1ef48
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
addl $0x80, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
leaq 0xc14d(%rip), %rax      # 0x1571c
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x94fb
movl -0x4(%rbp), %ecx
leaq 0x15972(%rip), %rax     # 0x1ef60
movl %ecx, (%rax)
movq -0x28(%rbp), %rcx
leaq 0x1595d(%rip), %rax     # 0x1ef58
movq %rcx, (%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/mixst.c
// Function: MV_Mix8BitStereo16Stereo
void MV_Mix8BitStereo16Stereo( 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, sample1;
    
    while (length--) {
        sample0 = source[(position >> 16) << 2];
        sample1 = source[((position >> 16) << 2) + 2];
        position += rate;
        
        sample0 = MV_LeftVolume[sample0 + 128] + *dest;
        sample1 = MV_RightVolume[sample1 + 128] + *(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
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
leaq 0x15934(%rip), %rax     # 0x1ef58
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x14(%rbp)
cmpl $0x0, %eax
je 0x974f
movq -0x20(%rbp), %rax
movl -0x4(%rbp), %ecx
shrl $0x10, %ecx
shll $0x2, %ecx
movl %ecx, %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movl -0x4(%rbp), %ecx
shrl $0x10, %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0x30(%rbp)
movl -0x8(%rbp), %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq 0x1478a(%rip), %rax     # 0x1de08
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
addl $0x80, %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %eax
movq -0x28(%rbp), %rcx
movzbl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
leaq 0x1475c(%rip), %rax     # 0x1de00
movq (%rax), %rax
movl -0x30(%rbp), %ecx
addl $0x80, %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %eax
movq -0x28(%rbp), %rcx
leaq 0x1577e(%rip), %rdx     # 0x1ee40
movslq (%rdx), %rdx
movzbl (%rcx,%rdx), %ecx
addl %ecx, %eax
movl %eax, -0x30(%rbp)
leaq 0x15873(%rip), %rax     # 0x1ef48
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
addl $0x80, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x2c(%rbp)
leaq 0x15856(%rip), %rax     # 0x1ef48
movq (%rax), %rax
movl -0x30(%rbp), %ecx
addl $0x80, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movl -0x30(%rbp), %eax
andl $0xff, %eax
movb %al, %dl
movq -0x28(%rbp), %rax
leaq 0x15713(%rip), %rcx     # 0x1ee40
movslq (%rcx), %rcx
movb %dl, (%rax,%rcx)
leaq 0xbfe2(%rip), %rax      # 0x1571c
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x962b
movl -0x4(%rbp), %ecx
leaq 0x15807(%rip), %rax     # 0x1ef60
movl %ecx, (%rax)
movq -0x28(%rbp), %rcx
leaq 0x157f2(%rip), %rax     # 0x1ef58
movq %rcx, (%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/pitch.c
// Function: PITCH_GetScale
unsigned int PITCH_GetScale
   (
   int pitchoffset
   )

   {
   unsigned int scale;
   int octaveshift;
   int noteshift;
   int note;
   int detune;

//   if ( !PITCH_Installed )
//      {
//      PITCH_Init();
//      }

   if ( pitchoffset == 0 )
      {
      return( PitchTable[ 0 ][ 0 ] );
      }

   noteshift = pitchoffset % 1200;
   if ( noteshift < 0 )
      {
      noteshift += 1200;
      }

   note   = noteshift / 100;
   detune = ( noteshift % 100 ) / ( 100 / MAXDETUNE );
   octaveshift = ( pitchoffset - noteshift ) / 1200;

   if ( detune < 0 )
      {
      detune += ( 100 / MAXDETUNE );
      note--;
      if ( note < 0 )
         {
         note += 12;
         octaveshift--;
         }
      }

   scale = PitchTable[ note ][ detune ];

   if ( octaveshift < 0 )
      {
      scale >>= -octaveshift;
      }
   else
      {
      scale <<= octaveshift;
      }

   return( scale );
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x99ab
movl 0xbd9d(%rip), %eax      # 0x15740
movl %eax, -0x4(%rbp)
jmp 0x9a75
movl -0x8(%rbp), %eax
movl $0x4b0, %ecx            # imm = 0x4B0
cltd
idivl %ecx
movl %edx, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x99ca
movl -0x14(%rbp), %eax
addl $0x4b0, %eax            # imm = 0x4B0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
movl -0x8(%rbp), %eax
subl -0x14(%rbp), %eax
movl $0x4b0, %ecx            # imm = 0x4B0
cltd
idivl %ecx
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x9a33
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x9a31
movl -0x18(%rbp), %eax
addl $0xc, %eax
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x9a33
movslq -0x18(%rbp), %rcx
leaq 0xbd02(%rip), %rax      # 0x15740
imulq $0x64, %rcx, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0x10(%rbp)
jge 0x9a64
xorl %ecx, %ecx
subl -0x10(%rbp), %ecx
movl -0xc(%rbp), %eax
shrl %cl, %eax
movl %eax, -0xc(%rbp)
jmp 0x9a6f
movl -0x10(%rbp), %ecx
movl -0xc(%rbp), %eax
shll %cl, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/vorbis.c
// Function: MV_PlayVorbis3D
int MV_PlayVorbis3D
(
 char *ptr,
 unsigned int ptrlength,
 int  pitchoffset,
 int  angle,
 int  distance,
 int  priority,
 unsigned int callbackval
 )

{
   int left;
   int right;
   int mid;
   int volume;
   int status;
   
   if ( !MV_Installed )
   {
      MV_SetErrorCode( MV_NotInstalled );
      return( MV_Error );
   }
   
   if ( distance < 0 )
   {
      distance  = -distance;
      angle    += MV_NumPanPositions / 2;
   }
   
   volume = MIX_VOLUME( distance );
   
   // Ensure angle is within 0 - 31
   angle &= MV_MaxPanPosition;
   
   left  = MV_PanTable[ angle ][ volume ].left;
   right = MV_PanTable[ angle ][ volume ].right;
   mid   = max( 0, 255 - distance );
   
   status = MV_PlayVorbis( ptr, ptrlength, pitchoffset, mid, left, right, priority,
                           callbackval );
   
   return( status );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
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)
leaq 0xc1e9(%rip), %rax      # 0x15c90
cmpl $0x0, (%rax)
jne 0x9ac5
leaq 0xc1e1(%rip), %rax      # 0x15c94
movl $0x2, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9bdc
cmpl $0x0, -0x20(%rbp)
jge 0x9adc
xorl %eax, %eax
subl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x1c(%rbp)
cmpl $0xff, -0x20(%rbp)
jge 0x9aed
movl -0x20(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x9af7
movl $0xff, %eax
movl %eax, -0x3c(%rbp)
jmp 0x9af7
movl -0x3c(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x9b07
xorl %eax, %eax
movl %eax, -0x40(%rbp)
jmp 0x9b28
cmpl $0xff, -0x20(%rbp)
jge 0x9b18
movl -0x20(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0x9b22
movl $0xff, %eax
movl %eax, -0x44(%rbp)
jmp 0x9b22
movl -0x44(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
leaq 0xbbe6(%rip), %rcx      # 0x15718
movl (%rcx), %ecx
addl $0x1, %ecx
imull %ecx, %eax
sarl $0x8, %eax
movl %eax, -0x34(%rbp)
movl -0x1c(%rbp), %eax
andl $0x1f, %eax
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0x142cc(%rip), %rax     # 0x1de20
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0x34(%rbp), %rcx
movzbl (%rax,%rcx,2), %eax
movl %eax, -0x28(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0x142af(%rip), %rax     # 0x1de20
shlq $0x7, %rcx
addq %rcx, %rax
movslq -0x34(%rbp), %rcx
movzbl 0x1(%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
movl $0xff, %ecx
subl -0x20(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x9b99
xorl %eax, %eax
movl %eax, -0x48(%rbp)
jmp 0x9ba4
movl $0xff, %eax
subl -0x20(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x28(%rbp), %r8d
movl -0x2c(%rbp), %r9d
movl -0x24(%rbp), %r10d
movl 0x10(%rbp), %eax
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x9bf0
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/vorbis.c
// Function: MV_ReleaseVorbisVoice
void MV_ReleaseVorbisVoice( VoiceNode * voice )
{
   vorbis_data * vd = (vorbis_data *) voice->extra;
   
   if (voice->wavetype != Vorbis) {
      return;
   }
   
   ov_clear(&vd->vf);
   free(vd);
   
   voice->extra = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x4, 0x10(%rax)
je 0xa2b7
jmp 0xa2dc
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x2110
movq -0x10(%rbp), %rdi
callq 0x2270
movq -0x8(%rbp), %rax
movq $0x0, 0x88(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/vorbis.c
// Function: read_vorbis
static size_t read_vorbis(void * ptr, size_t size, size_t nmemb, void * datasource)
{
   vorbis_data * vorb = (vorbis_data *) datasource;
   size_t nread = 0;
   size_t bytes, woffset = 0;

   errno = 0;

   if (vorb->length == vorb->pos) {
      return 0;
   }
   
   for (; nmemb > 0; nmemb--, nread++) {
      bytes = vorb->length - vorb->pos;
      if (size < bytes) {
         bytes = size;
      }

      memcpy((char *)ptr + woffset, vorb->ptr + vorb->pos, bytes);
      vorb->pos += bytes;
      woffset += bytes;

      if (vorb->length == vorb->pos) {
         nread++;
         break;
      }
   }
   
   return nread;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
callq 0x2040
movl $0x0, (%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0xa34a
movq $0x0, -0x8(%rbp)
jmp 0xa400
jmp 0xa34c
cmpq $0x0, -0x20(%rbp)
jbe 0xa3f8
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
subq 0x10(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0xa37d
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
addq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x30(%rbp), %rax
addq 0x10(%rax), %rsi
movq -0x40(%rbp), %rdx
callq 0x2180
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0xa3d9
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xa3f8
jmp 0xa3db
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xa34c
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/vorbis.c
// Function: seek_vorbis
static int seek_vorbis(void * datasource, ogg_int64_t offset, int whence)
{
   vorbis_data * vorb = (vorbis_data *) datasource;
   
   switch (whence) {
      case SEEK_SET: vorb->pos = 0; break;
      case SEEK_CUR: break;
      case SEEK_END: vorb->pos = vorb->length; break;
   }
   
   vorb->pos += offset;
   if (vorb->pos < 0) {
      vorb->pos = 0;
   } else if (vorb->pos > vorb->length) {
      vorb->pos = vorb->length;
   }
   
   return (int)vorb->pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
testl %eax, %eax
je 0xa447
jmp 0xa433
movl -0x24(%rbp), %eax
subl $0x1, %eax
je 0xa455
jmp 0xa43d
movl -0x24(%rbp), %eax
subl $0x2, %eax
je 0xa457
jmp 0xa467
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0xa467
jmp 0xa467
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jae 0xa490
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0xa4b4
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0xa4b2
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0xa4b4
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/music.c
// Function: MUSIC_ErrorString
const char *MUSIC_ErrorString
   (
   int ErrorNumber
   )

   {
   const char *ErrorString;

   switch( ErrorNumber )
      {
      case MUSIC_Warning :
      case MUSIC_Error :
         ErrorString = MUSIC_ErrorString( MUSIC_ErrorCode );
         break;

      case MUSIC_Ok :
         ErrorString = "Music ok.";
         break;

      case MUSIC_DriverError :
         ErrorString = SoundDriver_MIDI_ErrorString(SoundDriver_MIDI_GetError());
         break;

      case MUSIC_InvalidCard :
         ErrorString = "Invalid Music device.";
         break;

      case MUSIC_MidiError :
         ErrorString = "Error playing MIDI file.";
         break;

      default :
         ErrorString = "Unknown Music error code.";
         break;
      }

   return( ErrorString );
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
addl $0x2, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x5, %eax
ja 0xa56a
movq -0x18(%rbp), %rax
leaq 0x525d(%rip), %rcx      # 0xf774
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x14a42(%rip), %edi     # 0x1ef68
callq 0xa4f0
movq %rax, -0x10(%rbp)
jmp 0xa575
leaq 0x5254(%rip), %rax      # 0xf78c
movq %rax, -0x10(%rbp)
jmp 0xa575
callq 0x2fd0
movl %eax, %edi
callq 0x3020
movq %rax, -0x10(%rbp)
jmp 0xa575
leaq 0x523f(%rip), %rax      # 0xf796
movq %rax, -0x10(%rbp)
jmp 0xa575
leaq 0x5248(%rip), %rax      # 0xf7ac
movq %rax, -0x10(%rbp)
jmp 0xa575
leaq 0x5254(%rip), %rax      # 0xf7c5
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/music.c
// Function: MUSIC_SetVolume
void MUSIC_SetVolume
   (
   int volume
   )

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

   /*if ( MUSIC_SoundDevice != -1 )
      {
      MIDI_SetVolume( volume );
      }*/
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
xorl %eax, %eax
cmpl -0x4(%rbp), %eax
jle 0xa765
xorl %eax, %eax
movl %eax, -0x8(%rbp)
jmp 0xa76b
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
cmpl $0xff, -0x4(%rbp)
jge 0xa782
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0xa78c
movl $0xff, %eax
movl %eax, -0xc(%rbp)
jmp 0xa78c
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/music.c
// Function: MUSIC_PlaySong
int MUSIC_PlaySong
   (
   void *song,
   unsigned int length,
   int loopflag
   )

   {
   int status;

   (void)length;

   MIDI_StopSong();
   status = MIDI_PlaySong( song, loopflag );
   if ( status != MIDI_Ok )
      {
      MUSIC_SetErrorCode( MUSIC_MidiError );
      return( MUSIC_Warning );
      }

   return( MUSIC_Ok );
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
callq 0xb1b0
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0xb390
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0xa89f
movl $0x3, 0x146d2(%rip)     # 0x1ef68
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0xa8a6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_AllNotesOff
int MIDI_AllNotesOff
   (
   void
   )

   {
   int channel;

   SoundDriver_MIDI_Lock();

   for( channel = 0; channel < NUM_MIDI_CHANNELS; channel++ )
      {
      _MIDI_SendControlChange( channel, MIDI_HOLD1, 0 );
      _MIDI_SendControlChange( channel, MIDI_SOSTENUTO, 0 );   // TURRICAN's recommendation
      _MIDI_SendControlChange( channel, MIDI_ALL_NOTES_OFF, 0 );
      _MIDI_SendControlChange( channel, MIDI_ALL_SOUNDS_OFF, 0 );
      }

   SoundDriver_MIDI_Unlock();

   return( MIDI_Ok );
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x34a0
movl $0x0, -0x4(%rbp)
cmpl $0x10, -0x4(%rbp)
jge 0xaa91
movl -0x4(%rbp), %edi
movl $0x40, %esi
xorl %edx, %edx
callq 0xaaa0
movl -0x4(%rbp), %edi
movl $0x42, %esi
xorl %edx, %edx
callq 0xaaa0
movl -0x4(%rbp), %edi
movl $0x7b, %esi
xorl %edx, %edx
callq 0xaaa0
movl -0x4(%rbp), %edi
movl $0x78, %esi
xorl %edx, %edx
callq 0xaaa0
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xaa44
callq 0x34d0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_SendControlChange
static int _MIDI_SendControlChange
   (
   int channel,
   int c1,
   int c2
   )

   {
   int status;

   if ( _MIDI_RerouteFunctions[ channel ] != NULL )
      {
      status = _MIDI_RerouteFunctions[ channel ]( 0xB0 + channel,
         c1, c2 );
      if ( status == MIDI_DONT_PLAY )
         {
         return( MIDI_Ok );
         }
      }

   if ( _MIDI_Funcs == NULL )
      {
      return( MIDI_Error );
      }

   if ( _MIDI_Funcs->ControlChange == NULL )
      {
      return( MIDI_Error );
      }

   _MIDI_Funcs->ControlChange( channel, c1, c2 );

   return( MIDI_Ok );
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x14524(%rip), %rax     # 0x1efe0
cmpq $0x0, (%rax,%rcx,8)
je 0xaaf7
movslq -0x8(%rbp), %rcx
leaq 0x14512(%rip), %rax     # 0x1efe0
movq (%rax,%rcx,8), %rax
movl -0x8(%rbp), %edi
addl $0xb0, %edi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq *%rax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0xaaf5
movl $0x0, -0x4(%rbp)
jmp 0xab3e
jmp 0xaaf7
cmpq $0x0, 0x145a9(%rip)     # 0x1f0a8
jne 0xab0a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xab3e
movq 0x14597(%rip), %rax     # 0x1f0a8
cmpq $0x0, 0x18(%rax)
jne 0xab21
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xab3e
movq 0x14580(%rip), %rax     # 0x1f0a8
movq 0x18(%rax), %rax
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq *%rax
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_SetUserChannelVolume
void MIDI_SetUserChannelVolume
   (
   int channel,
   int volume
   )

   {
   // Convert channel from 1-16 to 0-15
   channel--;

   volume = max( 0, volume );
   volume = min( volume, 256 );

   if ( ( channel >= 0 ) && ( channel < NUM_MIDI_CHANNELS ) )
      {
      _MIDI_UserChannelVolume[ channel ] = volume;

      SoundDriver_MIDI_Lock();
      _MIDI_SetChannelVolume( channel, _MIDI_ChannelVolume[ channel ] );
      SoundDriver_MIDI_Unlock();
      }
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
xorl %eax, %eax
cmpl -0x8(%rbp), %eax
jle 0xab75
xorl %eax, %eax
movl %eax, -0xc(%rbp)
jmp 0xab7b
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x8(%rbp)
cmpl $0x100, -0x8(%rbp)      # imm = 0x100
jge 0xab92
movl -0x8(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0xab9c
movl $0x100, %eax            # imm = 0x100
movl %eax, -0x10(%rbp)
jmp 0xab9c
movl -0x10(%rbp), %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0xabdf
cmpl $0x10, -0x4(%rbp)
jge 0xabdf
movl -0x8(%rbp), %edx
movslq -0x4(%rbp), %rcx
leaq 0xb064(%rip), %rax      # 0x15c20
movl %edx, (%rax,%rcx,4)
callq 0x34a0
movl -0x4(%rbp), %edi
movslq -0x4(%rbp), %rcx
leaq 0x1448e(%rip), %rax     # 0x1f060
movl (%rax,%rcx,4), %esi
callq 0xabf0
callq 0x34d0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_SetChannelVolume
static void _MIDI_SetChannelVolume
   (
   int channel,
   int volume
   )

   {
   int status;
   int remotevolume;

   _MIDI_ChannelVolume[ channel ] = volume;

   if ( _MIDI_RerouteFunctions[ channel ] != NULL )
      {
      remotevolume = volume * _MIDI_TotalVolume;
      remotevolume *= _MIDI_UserChannelVolume[ channel ];
      remotevolume /= MIDI_MaxVolume;
      remotevolume >>= 8;

      status = _MIDI_RerouteFunctions[ channel ]( 0xB0 + channel,
         MIDI_VOLUME, remotevolume );
      if ( status == MIDI_DONT_PLAY )
         {
         return;
         }
      }

   if ( _MIDI_Funcs == NULL )
      {
      return;
      }

   if ( _MIDI_Funcs->ControlChange == NULL )
      {
      return;
      }

   // For user volume
   volume *= _MIDI_UserChannelVolume[ channel ];

   if ( _MIDI_Funcs->SetVolume == NULL )
      {
      volume *= _MIDI_TotalVolume;
      volume /= MIDI_MaxVolume;
      }

   // For user volume
   volume >>= 8;

   _MIDI_Funcs->ControlChange( channel, MIDI_VOLUME, volume );
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x8(%rbp), %edx
movslq -0x4(%rbp), %rcx
leaq 0x14454(%rip), %rax     # 0x1f060
movl %edx, (%rax,%rcx,4)
movslq -0x4(%rbp), %rcx
leaq 0x143c6(%rip), %rax     # 0x1efe0
cmpq $0x0, (%rax,%rcx,8)
je 0xac89
movl -0x8(%rbp), %eax
imull 0xb035(%rip), %eax      # 0x15c60
movl %eax, -0x10(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0xafe7(%rip), %rax      # 0x15c20
movl (%rax,%rcx,4), %eax
imull -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl $0xff, %ecx
cltd
idivl %ecx
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
sarl $0x8, %eax
movl %eax, -0x10(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x1437b(%rip), %rax     # 0x1efe0
movq (%rax,%rcx,8), %rax
movl -0x4(%rbp), %edi
addl $0xb0, %edi
movl -0x10(%rbp), %edx
movl $0x7, %esi
callq *%rax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0xac87
jmp 0xad04
jmp 0xac89
cmpq $0x0, 0x14417(%rip)     # 0x1f0a8
jne 0xac95
jmp 0xad04
movq 0x1440c(%rip), %rax     # 0x1f0a8
cmpq $0x0, 0x18(%rax)
jne 0xaca5
jmp 0xad04
movslq -0x4(%rbp), %rcx
leaq 0xaf70(%rip), %rax      # 0x15c20
movl (%rax,%rcx,4), %eax
imull -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movq 0x143e7(%rip), %rax     # 0x1f0a8
cmpq $0x0, 0x48(%rax)
jne 0xace3
movl 0xaf92(%rip), %eax      # 0x15c60
imull -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl $0xff, %ecx
cltd
idivl %ecx
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
sarl $0x8, %eax
movl %eax, -0x8(%rbp)
movq 0x143b5(%rip), %rax     # 0x1f0a8
movq 0x18(%rax), %rax
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %edx
movl $0x7, %esi
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_ResetUserChannelVolume
void MIDI_ResetUserChannelVolume
   (
   void
   )

   {
   int channel;

   for( channel = 0; channel < NUM_MIDI_CHANNELS; channel++ )
      {
      _MIDI_UserChannelVolume[ channel ] = 256;
      }

   SoundDriver_MIDI_Lock();
   _MIDI_SendChannelVolumes();
   SoundDriver_MIDI_Unlock();
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x10, -0x4(%rbp)
jge 0xad42
movslq -0x4(%rbp), %rcx
leaq 0xaef0(%rip), %rax      # 0x15c20
movl $0x100, (%rax,%rcx,4)   # imm = 0x100
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xad1f
callq 0x34a0
callq 0xad60
callq 0x34d0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_Reset
int MIDI_Reset
   (
   void
   )

   {
   int channel;

   MIDI_AllNotesOff();

   ASS_Sleep(50);
   
   SoundDriver_MIDI_Lock();

   for( channel = 0; channel < NUM_MIDI_CHANNELS; channel++ )
      {
      _MIDI_SendControlChange( channel, MIDI_RESET_ALL_CONTROLLERS, 0 );
      _MIDI_SendControlChange( channel, MIDI_RPN_MSB, MIDI_PITCHBEND_MSB );
      _MIDI_SendControlChange( channel, MIDI_RPN_LSB, MIDI_PITCHBEND_LSB );
      _MIDI_SendControlChange( channel, MIDI_DATAENTRY_MSB, 2 ); /* Pitch Bend Sensitivity MSB */
      _MIDI_SendControlChange( channel, MIDI_DATAENTRY_LSB, 0 ); /* Pitch Bend Sensitivity LSB */
      _MIDI_ChannelVolume[ channel ] = GENMIDI_DefaultVolume;
      _MIDI_SendControlChange( channel, MIDI_PAN, 64 );  // begin TURRICAN's recommendation
      _MIDI_SendControlChange( channel, MIDI_REVERB, 40 );
      _MIDI_SendControlChange( channel, MIDI_CHORUS, 0 );
      _MIDI_SendControlChange( channel, MIDI_BANK_SELECT_MSB, 0 );
      _MIDI_SendControlChange( channel, MIDI_BANK_SELECT_LSB, 0 );
      _MIDI_SendProgramChange( channel, 0 ); // end TURRICAN's recommendation
      }

   _MIDI_SendGSReset();
   _MIDI_SendChannelVolumes();

   SoundDriver_MIDI_Unlock();

   Reset = TRUE;

   return( MIDI_Ok );
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0xaa30
movl $0x32, %edi
callq 0xd5f0
callq 0x34a0
movl $0x0, -0x4(%rbp)
cmpl $0x10, -0x4(%rbp)
jge 0xae93
movl -0x4(%rbp), %edi
movl $0x79, %esi
xorl %edx, %edx
callq 0xaaa0
movl -0x4(%rbp), %edi
movl $0x64, %esi
xorl %edx, %edx
callq 0xaaa0
movl -0x4(%rbp), %edi
movl $0x65, %esi
xorl %edx, %edx
callq 0xaaa0
movl -0x4(%rbp), %edi
movl $0x6, %esi
movl $0x2, %edx
callq 0xaaa0
movl -0x4(%rbp), %edi
movl $0x26, %esi
xorl %edx, %edx
callq 0xaaa0
movslq -0x4(%rbp), %rcx
leaq 0x1423a(%rip), %rax     # 0x1f060
movl $0x64, (%rax,%rcx,4)
movl -0x4(%rbp), %edi
movl $0xa, %esi
movl $0x40, %edx
callq 0xaaa0
movl -0x4(%rbp), %edi
movl $0x5b, %esi
movl $0x28, %edx
callq 0xaaa0
movl -0x4(%rbp), %edi
movl $0x5d, %esi
xorl %edx, %edx
callq 0xaaa0
movl -0x4(%rbp), %edi
xorl %edx, %edx
movl %edx, %esi
callq 0xaaa0
movl -0x4(%rbp), %edi
movl $0x20, %esi
xorl %edx, %edx
callq 0xaaa0
movl -0x4(%rbp), %edi
xorl %esi, %esi
callq 0xaec0
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xadc3
callq 0xaf60
callq 0xad60
callq 0x34d0
movl $0x1, 0x141f4(%rip)     # 0x1f0a0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_SendProgramChange
static int _MIDI_SendProgramChange
   (
   int channel,
   int c1
   )

   {
   int status;

   if ( _MIDI_RerouteFunctions[ channel ] != NULL )
      {
      status = _MIDI_RerouteFunctions[ channel ]( 0xC0 + channel,
         c1, 0 );
      if ( status == MIDI_DONT_PLAY )
         {
         return( MIDI_Ok );
         }
      }

   if ( _MIDI_Funcs == NULL )
      {
      return( MIDI_Error );
      }

   if ( _MIDI_Funcs->ProgramChange == NULL )
      {
      return( MIDI_Error );
      }

   _MIDI_Funcs->ProgramChange( channel, c1 );

   return( MIDI_Ok );
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x14107(%rip), %rax     # 0x1efe0
cmpq $0x0, (%rax,%rcx,8)
je 0xaf13
movslq -0x8(%rbp), %rcx
leaq 0x140f5(%rip), %rax     # 0x1efe0
movq (%rax,%rcx,8), %rax
movl -0x8(%rbp), %edi
addl $0xc0, %edi
movl -0xc(%rbp), %esi
xorl %edx, %edx
callq *%rax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0xaf11
movl $0x0, -0x4(%rbp)
jmp 0xaf57
jmp 0xaf13
cmpq $0x0, 0x1418d(%rip)     # 0x1f0a8
jne 0xaf26
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xaf57
movq 0x1417b(%rip), %rax     # 0x1f0a8
cmpq $0x0, 0x20(%rax)
jne 0xaf3d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xaf57
movq 0x14164(%rip), %rax     # 0x1f0a8
movq 0x20(%rax), %rax
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
callq *%rax
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_SetVolume
int MIDI_SetVolume
   (
   int volume
   )

   {
   int i;

   if ( _MIDI_Funcs == NULL )
      {
      return( MIDI_NullMidiModule );
      }

   volume = min( MIDI_MaxVolume, volume );
   volume = max( 0, volume );

   _MIDI_TotalVolume = volume;

   SoundDriver_MIDI_Lock();

   if ( _MIDI_Funcs->SetVolume )
      {
      _MIDI_Funcs->SetVolume( volume );

      for( i = 0; i < NUM_MIDI_CHANNELS; i++ )
         {
         if ( _MIDI_RerouteFunctions[ i ] != NULL )
            {
            _MIDI_SetChannelVolume( i, _MIDI_ChannelVolume[ i ] );
            }
         }
      }
   else
      {
      _MIDI_SendChannelVolumes();
      }

   SoundDriver_MIDI_Unlock();

   return( MIDI_Ok );
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
cmpq $0x0, 0x140f5(%rip)     # 0x1f0a8
jne 0xafc1
movl $0x1, -0x4(%rbp)
jmp 0xb07c
movl $0xff, %eax
cmpl -0x8(%rbp), %eax
jge 0xafd5
movl $0xff, %eax
movl %eax, -0x10(%rbp)
jmp 0xafdb
movl -0x8(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x8(%rbp)
xorl %eax, %eax
cmpl -0x8(%rbp), %eax
jle 0xafef
xorl %eax, %eax
movl %eax, -0x14(%rbp)
jmp 0xaff5
movl -0x8(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, 0xac5c(%rip)      # 0x15c60
callq 0x34a0
movq 0x14098(%rip), %rax     # 0x1f0a8
cmpq $0x0, 0x48(%rax)
je 0xb06b
movq 0x1408a(%rip), %rax     # 0x1f0a8
movq 0x48(%rax), %rax
movl -0x8(%rbp), %edi
callq *%rax
movl $0x0, -0xc(%rbp)
cmpl $0x10, -0xc(%rbp)
jge 0xb069
movslq -0xc(%rbp), %rcx
leaq 0x13fa1(%rip), %rax     # 0x1efe0
cmpq $0x0, (%rax,%rcx,8)
je 0xb05c
movl -0xc(%rbp), %edi
movslq -0xc(%rbp), %rcx
leaq 0x1400c(%rip), %rax     # 0x1f060
movl (%rax,%rcx,4), %esi
callq 0xabf0
jmp 0xb05e
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xb02e
jmp 0xb070
callq 0xad60
callq 0x34d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_ResetTracks
static void _MIDI_ResetTracks
   (
   void
   )

   {
   int    i;
   track *ptr;

   _MIDI_Tick = 0;
   _MIDI_Beat = 1;
   _MIDI_Measure = 1;
   _MIDI_Time = 0;
   _MIDI_BeatsPerMeasure = 4;
   _MIDI_TicksPerBeat = _MIDI_Division;
   _MIDI_TimeBase = 4;

   _MIDI_PositionInTicks = 0;
   _MIDI_ActiveTracks    = 0;
   _MIDI_Context         = 0;

   ptr = _MIDI_TrackPtr;
   for( i = 0; i < _MIDI_NumTracks; i++ )
      {
      ptr->pos                    = ptr->start;
      ptr->delay                  = _MIDI_ReadDelta( ptr );
      ptr->active                 = ptr->EMIDI_IncludeTrack;
      ptr->RunningStatus          = 0;
      ptr->currentcontext         = 0;
      ptr->context[ 0 ].loopstart = ptr->start;
      ptr->context[ 0 ].loopcount = 0;

      if ( ptr->active )
         {
         _MIDI_ActiveTracks++;
         }

      ptr++;
      }
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, 0x13e82(%rip)     # 0x1f0f4
movl $0x1, 0xa9e8(%rip)      # 0x15c64
movl $0x1, 0xa9e2(%rip)      # 0x15c68
movl $0x0, 0x13e60(%rip)     # 0x1f0f0
movl $0x4, 0x13ee6(%rip)     # 0x1f180
movl 0x13e40(%rip), %eax     # 0x1f0e0
movl %eax, 0x13ede(%rip)     # 0x1f184
movl $0x4, 0x13ed8(%rip)     # 0x1f188
movl $0x0, 0x13e2e(%rip)     # 0x1f0e8
movl $0x0, 0x13e28(%rip)     # 0x1f0ec
movl $0x0, 0x13de2(%rip)     # 0x1f0b0
movq 0x13deb(%rip), %rax     # 0x1f0c0
movq %rax, -0x10(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x13ddf(%rip), %eax     # 0x1f0c8
jge 0xb389
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0xcaf0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movsbl 0x170(%rax), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x14(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0x16(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpw $0x0, 0x14(%rax)
je 0xb36d
movl 0x13d88(%rip), %eax     # 0x1f0ec
addl $0x1, %eax
movl %eax, 0x13d7f(%rip)     # 0x1f0ec
movq -0x10(%rbp), %rax
addq $0x178, %rax            # imm = 0x178
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xb2e0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_ReadNumber
static int _MIDI_ReadNumber
   (
   void *from,
   size_t size
   )

   {
   unsigned char *FromPtr;
   int           value;

   if ( size > 4 )
      {
      size = 4;
      }

   FromPtr = ( unsigned char * )from;

   value = 0;
   while( size-- )
      {
      value <<= 8;
      value += *FromPtr++;
      }

   return( value );
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x4, -0x10(%rbp)
jbe 0xb63b
movq $0x4, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, %rax
je 0xb682
movl -0x1c(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0xb64a
movl -0x1c(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_SetTempo
void MIDI_SetTempo
   (
   int tempo
   )

   {
   int tickspersecond;

   MIDI_Tempo = tempo;
   SoundDriver_MIDI_SetTempo(tempo, _MIDI_Division);

   tickspersecond = ( tempo * _MIDI_Division ) / 60;
   _MIDI_FPSecondsPerTick = ( 1 << TIME_PRECISION ) / tickspersecond;
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, 0x9bdc(%rip)      # 0x15c10
movl -0x4(%rbp), %edi
movl 0x130a3(%rip), %esi     # 0x1f0e0
callq 0x3460
movl -0x4(%rbp), %eax
imull 0x13094(%rip), %eax     # 0x1f0e0
movl $0x3c, %ecx
cltd
idivl %ecx
movl %eax, -0x8(%rbp)
movl $0x10000, %eax          # imm = 0x10000
cltd
idivl -0x8(%rbp)
movl %eax, 0x1307e(%rip)     # 0x1f0e4
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_SetSongTime
void MIDI_SetSongTime
   (
   unsigned int milliseconds
   )

   {
   unsigned int mil;
   unsigned int sec;
   unsigned int newtime;

   if ( !_MIDI_SongLoaded )
      {
      return;
      }

   MIDI_PauseSong();

   mil = ( ( milliseconds % 1000 ) << TIME_PRECISION ) / 1000;
   sec = ( milliseconds / 1000 ) << TIME_PRECISION;
   newtime = sec + mil;

   if ( newtime < _MIDI_Time )
      {
      SoundDriver_MIDI_Lock();
      _MIDI_ResetTracks();
      SoundDriver_MIDI_Unlock();

      MIDI_Reset();
      }

   SoundDriver_MIDI_Lock();
   while( _MIDI_Time < newtime )
      {
      if ( _MIDI_ProcessNextTick() )
         {
         break;
         }
      if ( _MIDI_ActiveTracks == 0 )
         {
         _MIDI_ResetTracks();
         if ( !_MIDI_Loop )
            {
            SoundDriver_MIDI_Unlock();
            return;
            }
         break;
         }
      }
   SoundDriver_MIDI_Unlock();

   MIDI_SetVolume( _MIDI_TotalVolume );
   MIDI_ContinueSong();
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x0, 0x12866(%rip)     # 0x1f0b8
jne 0xc859
jmp 0xc908
callq 0xb160
movl -0x4(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divl %ecx
movl %edx, %eax
shll $0x10, %eax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divl %ecx
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divl %ecx
shll $0x10, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl -0x8(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl 0x12851(%rip), %eax     # 0x1f0f0
jae 0xc8b5
callq 0x34a0
callq 0xb260
callq 0x34d0
callq 0xada0
callq 0x34a0
movl 0x12830(%rip), %eax     # 0x1f0f0
cmpl -0x10(%rbp), %eax
jae 0xc8f3
callq 0xc4f0
cmpl $0x0, %eax
je 0xc8d1
jmp 0xc8f3
cmpl $0x0, 0x12814(%rip)     # 0x1f0ec
jne 0xc8f1
callq 0xb260
cmpl $0x0, 0x127ce(%rip)     # 0x1f0b4
jne 0xc8ef
callq 0x34d0
jmp 0xc908
jmp 0xc8f3
jmp 0xc8ba
callq 0x34d0
movl 0x9362(%rip), %edi      # 0x15c60
callq 0xafa0
callq 0xb140
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_SetSongPosition
void MIDI_SetSongPosition
   (
   int measure,
   int beat,
   int tick
   )

   {
   unsigned int pos;

   if ( !_MIDI_SongLoaded )
      {
      return;
      }

   MIDI_PauseSong();

   pos = RELATIVE_BEAT( measure, beat, tick );

   if ( pos < RELATIVE_BEAT( _MIDI_Measure, _MIDI_Beat, _MIDI_Tick ) )
      {
      SoundDriver_MIDI_Lock();
      _MIDI_ResetTracks();
      SoundDriver_MIDI_Unlock();

      MIDI_Reset();
      }

   SoundDriver_MIDI_Lock();
   while( RELATIVE_BEAT( _MIDI_Measure, _MIDI_Beat, _MIDI_Tick ) < pos )
      {
      if ( _MIDI_ProcessNextTick() )
         {
         break;
         }
      if ( _MIDI_ActiveTracks == 0 )
         {
         _MIDI_ResetTracks();
         if ( !_MIDI_Loop )
            {
            SoundDriver_MIDI_Unlock();
            return;
            }
         break;
         }
      }
   SoundDriver_MIDI_Unlock();

   MIDI_SetVolume( _MIDI_TotalVolume );
   MIDI_ContinueSong();
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
cmpl $0x0, 0x12790(%rip)     # 0x1f0b8
jne 0xc92f
jmp 0xc9ea
callq 0xb160
movl -0xc(%rbp), %eax
movl -0x8(%rbp), %ecx
shll $0x9, %ecx
addl %ecx, %eax
movl -0x4(%rbp), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl 0x127a1(%rip), %ecx     # 0x1f0f4
movl 0x930b(%rip), %edx      # 0x15c64
shll $0x9, %edx
addl %edx, %ecx
movl 0x9304(%rip), %edx      # 0x15c68
shll $0x10, %edx
addl %edx, %ecx
cmpl %ecx, %eax
jae 0xc981
callq 0x34a0
callq 0xb260
callq 0x34d0
callq 0xada0
callq 0x34a0
movl 0x12768(%rip), %eax     # 0x1f0f4
movl 0x92d2(%rip), %ecx      # 0x15c64
shll $0x9, %ecx
addl %ecx, %eax
movl 0x92cb(%rip), %ecx      # 0x15c68
shll $0x10, %ecx
addl %ecx, %eax
cmpl -0x10(%rbp), %eax
jae 0xc9d5
callq 0xc4f0
cmpl $0x0, %eax
je 0xc9b3
jmp 0xc9d5
cmpl $0x0, 0x12732(%rip)     # 0x1f0ec
jne 0xc9d3
callq 0xb260
cmpl $0x0, 0x126ec(%rip)     # 0x1f0b4
jne 0xc9d1
callq 0x34d0
jmp 0xc9ea
jmp 0xc9d5
jmp 0xc986
callq 0x34d0
movl 0x9280(%rip), %edi      # 0x15c60
callq 0xafa0
callq 0xb140
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_GetSongPosition
void MIDI_GetSongPosition
   (
   songposition *pos
   )

   {
   unsigned int mil;
   unsigned int sec;

   mil = ( _MIDI_Time & ( ( 1 << TIME_PRECISION ) - 1 ) ) * 1000;
   sec = _MIDI_Time >> TIME_PRECISION;
   pos->milliseconds = ( mil >> TIME_PRECISION ) + ( sec * 1000 );
   pos->tickposition = _MIDI_PositionInTicks;
   pos->measure      = _MIDI_Measure;
   pos->beat         = _MIDI_Beat;
   pos->tick         = _MIDI_Tick;
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl 0x126f2(%rip), %eax     # 0x1f0f0
andl $0xffff, %eax           # imm = 0xFFFF
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movl %eax, -0xc(%rbp)
movl 0x126de(%rip), %eax     # 0x1f0f0
shrl $0x10, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %ecx
shrl $0x10, %ecx
imull $0x3e8, -0x10(%rbp), %eax # imm = 0x3E8
addl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl 0x126b4(%rip), %ecx     # 0x1f0e8
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl 0x9228(%rip), %ecx      # 0x15c68
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movl 0x9217(%rip), %ecx      # 0x15c64
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movl 0x1269a(%rip), %ecx     # 0x1f0f4
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_GetSongLength
void MIDI_GetSongLength
   (
   songposition *pos
   )

   {
   unsigned int mil;
   unsigned int sec;

   mil = ( _MIDI_TotalTime & ( ( 1 << TIME_PRECISION ) - 1 ) ) * 1000;
   sec = _MIDI_TotalTime >> TIME_PRECISION;

   pos->milliseconds = ( mil >> TIME_PRECISION ) + ( sec * 1000 );
   pos->measure      = _MIDI_TotalMeasures;
   pos->beat         = _MIDI_TotalBeats;
   pos->tick         = _MIDI_TotalTicks;
   pos->tickposition = 0;
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl 0x12652(%rip), %eax     # 0x1f0d0
andl $0xffff, %eax           # imm = 0xFFFF
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movl %eax, -0xc(%rbp)
movl 0x1263e(%rip), %eax     # 0x1f0d0
shrl $0x10, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %ecx
shrl $0x10, %ecx
imull $0x3e8, -0x10(%rbp), %eax # imm = 0x3E8
addl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl 0x12628(%rip), %ecx     # 0x1f0dc
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movl 0x12617(%rip), %ecx     # 0x1f0d8
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movl 0x12606(%rip), %ecx     # 0x1f0d4
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/midi.c
// Function: MIDI_ReadDelta
static int _MIDI_ReadDelta
   (
   track *ptr
   )

   {
   int           value;
   unsigned char c;

   GET_NEXT_EVENT( ptr, value );

   if ( value & 0x80 )
      {
      value &= 0x7f;
      do
         {
         GET_NEXT_EVENT( ptr, c );
         value = ( value << 7 ) + ( c & 0x7f );
         }
      while ( c & 0x80 );
      }

   return( value );
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movl -0xc(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xcb6b
movl -0xc(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movb (%rax), %al
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movl -0xc(%rbp), %eax
shll $0x7, %eax
movzbl -0xd(%rbp), %ecx
andl $0x7f, %ecx
addl %ecx, %eax
movl %eax, -0xc(%rbp)
movzbl -0xd(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0xcb2c
jmp 0xcb6b
movl -0xc(%rbp), %eax
popq %rbp
retq