// File: /workspace/github_c_makefile_star2_O0/jonof[P]jfaudiolib/src/multivoc.c
// Function: MV_GetNextVOCBlock
static playbackstatus MV_GetNextVOCBlock
   (
   VoiceNode *voice
   )

   {
   unsigned char *ptr;
   int            blocktype;
   int            lastblocktype;
   unsigned int   blocklength = 0;
   unsigned int   samplespeed = 0;
   unsigned int   tc = 0;
   int            packtype;
   int            voicemode;
   int            done;
   unsigned       BitsPerSample;
   unsigned       Channels;
   unsigned       Format;

   if ( voice->BlockLength > 0 )
      {
      voice->position    -= voice->length;
      voice->sound       += (voice->length >> 16) * (voice->channels * voice->bits / 8);
      voice->length       = min( voice->BlockLength, 0x8000 );
      voice->BlockLength -= voice->length;
      voice->length     <<= 16;
      return( KeepPlaying );
      }

   if ( ( voice->length > 0 ) && ( voice->LoopEnd != NULL ) &&
      ( voice->LoopStart != NULL ) )
      {
      voice->BlockLength  = voice->LoopSize;
      voice->sound        = voice->LoopStart;
      voice->position     = 0;
      voice->length       = min( voice->BlockLength, 0x8000 );
      voice->BlockLength -= voice->length;
      voice->length     <<= 16;
      return( KeepPlaying );
      }

   ptr = ( unsigned char * )voice->NextBlock;

   voice->Playing = TRUE;

   voicemode = 0;
   lastblocktype = 0;
   packtype = VOC_8BIT;

   done = FALSE;
   while( !done )
      {
      // Stop playing if we get a NULL pointer
      if ( ptr == NULL )
         {
         voice->Playing = FALSE;
         done = TRUE;
         break;
         }

      blocktype = ( int )*ptr;
      blocklength = LITTLE32( *( unsigned int * )( ptr + 1 ) ) & 0x00ffffff;
      ptr += 4;

      switch( blocktype )
         {
         case 0 :
            // End of data
            if ( ( voice->LoopStart == NULL ) ||
               ( voice->LoopStart >= (char *)( ptr - 4 ) ) )
               {
               voice->Playing = FALSE;
               done = TRUE;
               }
            else
               {
               voice->BlockLength  = (unsigned int)((char *)( ptr - 4 ) - voice->LoopStart);
               voice->sound        = voice->LoopStart;
               voice->position     = 0;
               voice->length       = min( voice->BlockLength, 0x8000 );
               voice->BlockLength -= voice->length;
               voice->length     <<= 16;
               return( KeepPlaying );
               }
            break;

         case 1 :
            // Sound data block
            voice->bits  = 8;
            voice->channels = voicemode + 1;
            if ( lastblocktype != 8 )
               {
               tc = ( unsigned int )*ptr << 8;
               packtype = *( ptr + 1 );
               }

            ptr += 2;
            blocklength -= 2;

            samplespeed = 256000000L / ( voice->channels * ( 65536 - tc ) );

            // Skip packed data
            if ( packtype != VOC_8BIT )
               {
               ptr += blocklength;
               }
            else
               {
               done = TRUE;
               }
            voicemode = 0;
            break;

         case 2 :
            // Sound continuation block
            samplespeed = voice->SamplingRate;
            done = TRUE;
            break;

         case 3 :
            // Silence
            // Not implimented.
            ptr += blocklength;
            break;

         case 4 :
            // Marker
            // Not implimented.
            ptr += blocklength;
            break;

         case 5 :
            // ASCII string
            // Not implimented.
            ptr += blocklength;
            break;

         case 6 :
            // Repeat begin
            if ( voice->LoopEnd == NULL )
               {
               voice->LoopCount = LITTLE16(*( unsigned short * )ptr);
               voice->LoopStart = (char *)ptr + blocklength;
               }
            ptr += blocklength;
            break;

         case 7 :
            // Repeat end
            ptr += blocklength;
            if ( lastblocktype == 6 )
               {
               voice->LoopCount = 0;
               }
            else
               {
               if ( ( voice->LoopCount > 0 ) && ( voice->LoopStart != NULL ) )
                  {
                  ptr = (unsigned char *)voice->LoopStart;
                  if ( voice->LoopCount < 0xffff )
                     {
                     voice->LoopCount--;
                     if ( voice->LoopCount == 0 )
                        {
                        voice->LoopStart = NULL;
                        }
                     }
                  }
               }
            break;

         case 8 :
            // Extended block
            voice->bits  = 8;
            voice->channels = 1;
            tc = LITTLE16( *( unsigned short * )ptr );
            packtype = *( ptr + 2 );
            voicemode = *( ptr + 3 );
            ptr += blocklength;
            break;

         case 9 :
            // New sound data block
            samplespeed = LITTLE32( *( unsigned int * )ptr );
            BitsPerSample = ( unsigned )*( ptr + 4 );
            Channels = ( unsigned )*( ptr + 5 );
            Format = ( unsigned )LITTLE16( *( unsigned short * )( ptr + 6 ) );

            if ( ( BitsPerSample == 8 ) && ( Channels == 1 || Channels == 2 ) &&
               ( Format == VOC_8BIT ) )
               {
               ptr         += 12;
               blocklength -= 12;
               voice->bits  = 8;
               voice->channels = Channels;
               done         = TRUE;
               }
            else if ( ( BitsPerSample == 16 ) && ( Channels == 1 || Channels == 2 ) &&
               ( Format == VOC_16BIT ) )
               {
               ptr         += 12;
               blocklength -= 12;
               voice->bits  = 16;
               voice->channels = Channels;
               done         = TRUE;
               }
            else
               {
               ptr += blocklength;
               }
            break;

         default :
            // Unknown data.  Probably not a VOC file.
            voice->Playing = FALSE;
            done = TRUE;
            break;
         }

      lastblocktype = blocktype;
      }

   if ( voice->Playing )
      {
      voice->NextBlock    = (char *)ptr + blocklength;
      voice->sound        = (char *)ptr;

      voice->SamplingRate = samplespeed;
      voice->RateScale    = ( voice->SamplingRate * voice->PitchScale ) / MV_MixRate;

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

      if ( voice->LoopEnd != NULL )
         {
         if ( blocklength > (unsigned int)(intptr_t)voice->LoopEnd )
            {
            blocklength = (unsigned int)(intptr_t)voice->LoopEnd;
            }
         else
            {
            voice->LoopEnd = (char *)(intptr_t)blocklength;
            }

         voice->LoopStart = voice->sound + (intptr_t)voice->LoopStart;
         voice->LoopEnd   = voice->sound + (intptr_t)voice->LoopEnd;
         voice->LoopSize  = (unsigned int)(voice->LoopEnd - voice->LoopStart);
         }

      if ( voice->bits == 16 )
         {
         blocklength /= 2;
         }
      if ( voice->channels == 2 )
         {
         blocklength /= 2;
         }

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

      MV_SetVoiceMixMode( voice );

      return( KeepPlaying );
      }

   return( NoMoreData );
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jbe 0x722a
movq -0x10(%rbp), %rax
movl 0x60(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x6c(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x6c(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
shrl $0x10, %eax
movl %eax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x15(%rax), %eax
movq -0x10(%rbp), %rcx
movsbl 0x14(%rcx), %ecx
imull %ecx, %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl -0x48(%rbp), %edx
imull %eax, %edx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rax
cmpl $0x8000, 0x48(%rax)     # imm = 0x8000
jae 0x71ea
movq -0x10(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x4c(%rbp)
jmp 0x71f4
movl $0x8000, %eax           # imm = 0x8000
movl %eax, -0x4c(%rbp)
jmp 0x71f4
movl -0x4c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x48(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x48(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
shll $0x10, %ecx
movl %ecx, 0x60(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x78b7
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jbe 0x72d8
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x72d8
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x72d8
movq -0x10(%rbp), %rax
movl 0x44(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x6c(%rax)
movq -0x10(%rbp), %rax
cmpl $0x8000, 0x48(%rax)     # imm = 0x8000
jae 0x7298
movq -0x10(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x50(%rbp)
jmp 0x72a2
movl $0x8000, %eax           # imm = 0x8000
movl %eax, -0x50(%rbp)
jmp 0x72a2
movl -0x50(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x48(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x48(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
shll $0x10, %ecx
movl %ecx, 0x60(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x78b7
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x70(%rax)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x731d
jmp 0x7732
cmpq $0x0, -0x18(%rbp)
jne 0x733b
movq -0x10(%rbp), %rax
movl $0x0, 0x70(%rax)
movl $0x1, -0x38(%rbp)
jmp 0x7732
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl 0x1(%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
movq %rax, -0x58(%rbp)
subq $0x9, %rax
ja 0x7715
movq -0x58(%rbp), %rax
leaq 0x818c(%rip), %rcx      # 0xf508
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x73a5
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x18(%rbp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
jb 0x73bc
movq -0x10(%rbp), %rax
movl $0x0, 0x70(%rax)
movl $0x1, -0x38(%rbp)
jmp 0x744c
movq -0x18(%rbp), %rax
addq $-0x4, %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x6c(%rax)
movq -0x10(%rbp), %rax
cmpl $0x8000, 0x48(%rax)     # imm = 0x8000
jae 0x740c
movq -0x10(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x5c(%rbp)
jmp 0x7416
movl $0x8000, %eax           # imm = 0x8000
movl %eax, -0x5c(%rbp)
jmp 0x7416
movl -0x5c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x48(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x48(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
shll $0x10, %ecx
movl %ecx, 0x60(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x78b7
jmp 0x7727
movq -0x10(%rbp), %rax
movb $0x8, 0x14(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x15(%rax)
cmpl $0x8, -0x20(%rbp)
je 0x7486
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movl -0x24(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x15(%rax), %eax
movl $0x10000, %ecx          # imm = 0x10000
subl -0x2c(%rbp), %ecx
imull %ecx, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0xf424000, %eax        # imm = 0xF424000
cqto
idivq %rcx
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x74d7
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x74de
movl $0x1, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
jmp 0x7727
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
movl %eax, -0x28(%rbp)
movl $0x1, -0x38(%rbp)
jmp 0x7727
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x7727
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x7727
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x7727
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x756a
movq -0x18(%rbp), %rax
movzwl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x18(%rbp), %rcx
movl -0x24(%rbp), %eax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x7727
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
cmpl $0x6, -0x20(%rbp)
jne 0x75a2
movq -0x10(%rbp), %rax
movl $0x0, 0x40(%rax)
jmp 0x75f9
movq -0x10(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jbe 0x75f7
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x75f7
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0xffff, 0x40(%rax)     # imm = 0xFFFF
jae 0x75f5
movq -0x10(%rbp), %rax
movl 0x40(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x40(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jne 0x75f3
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
jmp 0x75f5
jmp 0x75f7
jmp 0x75f9
jmp 0x7727
movq -0x10(%rbp), %rax
movb $0x8, 0x14(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x15(%rax)
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, -0x34(%rbp)
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x7727
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x5(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x6(%rax), %eax
movl %eax, -0x44(%rbp)
cmpl $0x8, -0x3c(%rbp)
jne 0x76b7
cmpl $0x1, -0x40(%rbp)
je 0x767f
cmpl $0x2, -0x40(%rbp)
jne 0x76b7
cmpl $0x0, -0x44(%rbp)
jne 0x76b7
movq -0x18(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x18(%rbp)
movl -0x24(%rbp), %eax
subl $0xc, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movb $0x8, 0x14(%rax)
movl -0x40(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x15(%rax)
movl $0x1, -0x38(%rbp)
jmp 0x7713
cmpl $0x10, -0x3c(%rbp)
jne 0x7701
cmpl $0x1, -0x40(%rbp)
je 0x76c9
cmpl $0x2, -0x40(%rbp)
jne 0x7701
cmpl $0x4, -0x44(%rbp)
jne 0x7701
movq -0x18(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x18(%rbp)
movl -0x24(%rbp), %eax
subl $0xc, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movb $0x10, 0x14(%rax)
movl -0x40(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x15(%rax)
movl $0x1, -0x38(%rbp)
jmp 0x7711
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x7713
jmp 0x7727
movq -0x10(%rbp), %rax
movl $0x0, 0x70(%rax)
movl $0x1, -0x38(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x730b
movq -0x10(%rbp), %rax
cmpl $0x0, 0x70(%rax)
je 0x78b0
movq -0x18(%rbp), %rcx
movl -0x24(%rbp), %eax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x4c(%rcx), %eax
xorl %edx, %edx
divl 0x177b5(%rip)           # 0x1ef34
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x68(%rax)
movq -0x10(%rbp), %rax
movl 0x68(%rax), %ecx
shll $0x8, %ecx
movq -0x10(%rbp), %rax
subl 0x68(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x7826
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rcx
cmpl %ecx, %eax
jbe 0x77c7
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl %eax, -0x24(%rbp)
jmp 0x77d4
movl -0x24(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x44(%rax)
movq -0x10(%rbp), %rax
movsbl 0x14(%rax), %eax
cmpl $0x10, %eax
jne 0x783b
movl -0x24(%rbp), %eax
shrl %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x15(%rax), %eax
cmpl $0x2, %eax
jne 0x7850
movl -0x24(%rbp), %eax
shrl %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x6c(%rax)
cmpl $0x8000, -0x24(%rbp)    # imm = 0x8000
jae 0x786c
movl -0x24(%rbp), %eax
movl %eax, -0x60(%rbp)
jmp 0x7876
movl $0x8000, %eax           # imm = 0x8000
movl %eax, -0x60(%rbp)
jmp 0x7876
movl -0x60(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
subl 0x60(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x48(%rax)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
shll $0x10, %ecx
movl %ecx, 0x60(%rax)
movq -0x10(%rbp), %rdi
callq 0x4f40
movl $0x1, -0x4(%rbp)
jmp 0x78b7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq