LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: sonicIntCreateStream
sonicStream sonicCreateStream(int sampleRate, int numChannels) {
  sonicStream stream =
      (sonicStream)sonicCalloc(1, sizeof(struct sonicStreamStruct));

  sampleRate = CLAMP(sampleRate, SONIC_MIN_SAMPLE_RATE, SONIC_MAX_SAMPLE_RATE);
  numChannels = CLAMP(numChannels, SONIC_MIN_CHANNELS, SONIC_MAX_CHANNELS);
  if (stream == NULL) {
    return NULL;
  }
  if (!allocateStreamBuffers(stream, sampleRate, numChannels)) {
    return NULL;
  }
  stream->speed = 1.0f;
  stream->pitch = 1.0f;
  stream->volume = 1.0f;
  stream->rate = 1.0f;
  stream->oldRatePosition = 0;
  stream->newRatePosition = 0;
  stream->quality = 0;
  return stream;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl $0x1, %edi
movl $0x88, %esi
callq 0x17b0
movq %rax, -0x18(%rbp)
cmpl $0x3e8, -0xc(%rbp)      # imm = 0x3E8
jge 0x16a4
movl $0x3e8, %eax            # imm = 0x3E8
movl %eax, -0x1c(%rbp)
jmp 0x16c3
cmpl $0x7a120, -0xc(%rbp)    # imm = 0x7A120
jle 0x16b7
movl $0x7a120, %eax          # imm = 0x7A120
movl %eax, -0x20(%rbp)
jmp 0x16bd
movl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xc(%rbp)
cmpl $0x1, -0x10(%rbp)
jge 0x16d9
movl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x16f5
cmpl $0x20, -0x10(%rbp)
jle 0x16e9
movl $0x20, %eax
movl %eax, -0x28(%rbp)
jmp 0x16ef
movl -0x10(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x10(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x170f
movq $0x0, -0x8(%rbp)
jmp 0x179a
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x17e0
cmpl $0x0, %eax
jne 0x172d
movq $0x0, -0x8(%rbp)
jmp 0x179a
movq -0x18(%rbp), %rax
movss 0x38d7(%rip), %xmm0     # 0x5010
movss %xmm0, 0x28(%rax)
movq -0x18(%rbp), %rax
movss 0x38c6(%rip), %xmm0     # 0x5010
movss %xmm0, 0x30(%rax)
movq -0x18(%rbp), %rax
movss 0x38b5(%rip), %xmm0     # 0x5010
movss %xmm0, 0x2c(%rax)
movq -0x18(%rbp), %rax
movss 0x38a4(%rip), %xmm0     # 0x5010
movss %xmm0, 0x34(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x44(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x48(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x4c(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: sonicIntReadFloatFromStream
int sonicReadFloatFromStream(sonicStream stream, float* samples,
                             int maxSamples) {
  int numSamples = stream->numOutputSamples;
  int remainingSamples = 0;
  short* buffer;
  int count;

  if (numSamples == 0) {
    return 0;
  }
  if (numSamples > maxSamples) {
    remainingSamples = numSamples - maxSamples;
    numSamples = maxSamples;
  }
  buffer = stream->outputBuffer;
  count = numSamples * stream->numChannels;
  while (count--) {
    *samples++ = (*buffer++) / 32767.0f;
  }
  if (remainingSamples > 0) {
    memmove(stream->outputBuffer,
            stream->outputBuffer + numSamples * stream->numChannels,
            remainingSamples * sizeof(short) * stream->numChannels);
  }
  stream->numOutputSamples = remainingSamples;
  return numSamples;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x1b46
movl $0x0, -0x4(%rbp)
jmp 0x1c0f
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x1b5d
movl -0x20(%rbp), %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x50(%rcx), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x34(%rbp)
cmpl $0x0, %eax
je 0x1bbe
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, -0x30(%rbp)
movswl (%rax), %eax
cvtsi2ss %eax, %xmm0
movss 0x346f(%rip), %xmm1     # 0x5014
divss %xmm1, %xmm0
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x18(%rbp)
movss %xmm0, (%rax)
jmp 0x1b77
cmpl $0x0, -0x24(%rbp)
jle 0x1bff
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x50(%rcx), %eax
cltq
shlq %rax
addq %rax, %rsi
movslq -0x24(%rbp), %rdx
shlq %rdx
movq -0x10(%rbp), %rax
movslq 0x50(%rax), %rax
imulq %rax, %rdx
callq 0x1180
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: sonicIntReadShortFromStream
int sonicReadShortFromStream(sonicStream stream, short* samples,
                             int maxSamples) {
  int numSamples = stream->numOutputSamples;
  int remainingSamples = 0;

  if (numSamples == 0) {
    return 0;
  }
  if (numSamples > maxSamples) {
    remainingSamples = numSamples - maxSamples;
    numSamples = maxSamples;
  }
  memcpy(samples, stream->outputBuffer,
         numSamples * sizeof(short) * stream->numChannels);
  if (remainingSamples > 0) {
    memmove(stream->outputBuffer,
            stream->outputBuffer + numSamples * stream->numChannels,
            remainingSamples * sizeof(short) * stream->numChannels);
  }
  stream->numOutputSamples = remainingSamples;
  return numSamples;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x1c56
movl $0x0, -0x4(%rbp)
jmp 0x1ce2
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x1c6d
movl -0x20(%rbp), %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movslq -0x20(%rbp), %rdx
shlq %rdx
movq -0x10(%rbp), %rax
movslq 0x50(%rax), %rax
imulq %rax, %rdx
callq 0x1120
cmpl $0x0, -0x24(%rbp)
jle 0x1cd2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x50(%rcx), %eax
cltq
shlq %rax
addq %rax, %rsi
movslq -0x24(%rbp), %rdx
shlq %rdx
movq -0x10(%rbp), %rax
movslq 0x50(%rax), %rax
imulq %rax, %rdx
callq 0x1180
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: sonicIntReadUnsignedCharFromStream
int sonicReadUnsignedCharFromStream(sonicStream stream, unsigned char* samples,
                                    int maxSamples) {
  int numSamples = stream->numOutputSamples;
  int remainingSamples = 0;
  short* buffer;
  int count;

  if (numSamples == 0) {
    return 0;
  }
  if (numSamples > maxSamples) {
    remainingSamples = numSamples - maxSamples;
    numSamples = maxSamples;
  }
  buffer = stream->outputBuffer;
  count = numSamples * stream->numChannels;
  while (count--) {
    *samples++ = (char)((*buffer++) >> 8) + 128;
  }
  if (remainingSamples > 0) {
    memmove(stream->outputBuffer,
            stream->outputBuffer + numSamples * stream->numChannels,
            remainingSamples * sizeof(short) * stream->numChannels);
  }
  stream->numOutputSamples = remainingSamples;
  return numSamples;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x1d26
movl $0x0, -0x4(%rbp)
jmp 0x1dea
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x1d3d
movl -0x20(%rbp), %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x50(%rcx), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x34(%rbp)
cmpl $0x0, %eax
je 0x1d99
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, -0x30(%rbp)
movswl (%rax), %eax
sarl $0x8, %eax
movsbl %al, %eax
addl $0x80, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x1d57
cmpl $0x0, -0x24(%rbp)
jle 0x1dda
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x50(%rcx), %eax
cltq
shlq %rax
addq %rax, %rsi
movslq -0x24(%rbp), %rdx
shlq %rdx
movq -0x10(%rbp), %rax
movslq 0x50(%rax), %rax
imulq %rax, %rdx
callq 0x1180
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: enlargeInputBufferIfNeeded
static int enlargeInputBufferIfNeeded(sonicStream stream, int numSamples) {
  int inputBufferSize = stream->inputBufferSize;

  if (stream->numInputSamples + numSamples > inputBufferSize) {
    stream->inputBufferSize += (inputBufferSize >> 1) + numSamples;
    stream->inputBuffer = (short*)sonicRealloc(
        stream->inputBuffer, inputBufferSize, stream->inputBufferSize,
        sizeof(short) * stream->numChannels);
    if (stream->inputBuffer == NULL) {
      return 0;
    }
  }
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x54(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
addl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x1fec
movl -0x18(%rbp), %ecx
sarl %ecx
addl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x54(%rax), %ecx
movl %ecx, 0x54(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x54(%rax), %edx
movq -0x10(%rbp), %rax
movslq 0x50(%rax), %rax
shlq %rax
movl %eax, %ecx
callq 0x2680
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x1fea
movl $0x0, -0x4(%rbp)
jmp 0x1ff3
jmp 0x1fec
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: addFloatSamplesToInputBuffer
static int addFloatSamplesToInputBuffer(sonicStream stream,
                                        const float* samples, int numSamples) {
  short* buffer;
  int count = numSamples * stream->numChannels;

  if (numSamples == 0) {
    return 1;
  }
  if (!enlargeInputBufferIfNeeded(stream, numSamples)) {
    return 0;
  }
  buffer = stream->inputBuffer + stream->numInputSamples * stream->numChannels;
  while (count--) {
    *buffer++ = (*samples++) * 32767.0f;
  }
  updateNumInputSamples(stream, numSamples);
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x50(%rcx), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x20f3
movl $0x1, -0x4(%rbp)
jmp 0x2190
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x1f70
cmpl $0x0, %eax
jne 0x2110
movl $0x0, -0x4(%rbp)
jmp 0x2190
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x60(%rcx), %ecx
movq -0x10(%rbp), %rdx
imull 0x50(%rdx), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x217d
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x18(%rbp)
movss (%rax), %xmm0
movss 0x2eb6(%rip), %xmm1     # 0x5014
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, %cx
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, -0x28(%rbp)
movw %cx, (%rax)
jmp 0x2133
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x26b0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: processStreamInput
static int processStreamInput(sonicStream stream) {
  int originalNumOutputSamples = stream->numOutputSamples;
  float rate = stream->rate * stream->pitch;
  float localSpeed;

  if (stream->numInputSamples == 0) {
    return 1;
  }
  localSpeed =
      stream->numInputSamples * stream->samplePeriod / stream->inputPlayTime;
  if (localSpeed > 1.00001 || localSpeed < 0.99999) {
    changeSpeed(stream, localSpeed);
  } else {
    if (!copyInputToOutput(stream, stream->numInputSamples)) {
      return 0;
    }
  }
  if (rate != 1.0f) {
    if (!adjustRate(stream, rate, originalNumOutputSamples)) {
      return 0;
    }
  }
  if (stream->volume != 1.0f) {
    /* Adjust output volume. */
    scaleSamples(
        stream->outputBuffer + originalNumOutputSamples * stream->numChannels,
        (stream->numOutputSamples - originalNumOutputSamples) *
            stream->numChannels,
        stream->volume);
  }
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movss 0x34(%rax), %xmm0
movq -0x10(%rbp), %rax
mulss 0x30(%rax), %xmm0
movss %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jne 0x21e3
movl $0x1, -0x4(%rbp)
jmp 0x22f7
movq -0x10(%rbp), %rax
cvtsi2ssl 0x60(%rax), %xmm0
movq -0x10(%rbp), %rax
mulss 0x38(%rax), %xmm0
movq -0x10(%rbp), %rax
divss 0x3c(%rax), %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2e1c(%rip), %xmm1     # 0x5030
ucomisd %xmm1, %xmm0
ja 0x2231
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x2e0d(%rip), %xmm0     # 0x5038
ucomisd %xmm1, %xmm0
jbe 0x2241
movq -0x10(%rbp), %rdi
movss -0x1c(%rbp), %xmm0
callq 0x2710
jmp 0x2264
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x60(%rax), %esi
callq 0x29a0
cmpl $0x0, %eax
jne 0x2262
movl $0x0, -0x4(%rbp)
jmp 0x22f7
jmp 0x2264
movss -0x18(%rbp), %xmm0
movss 0x2d9f(%rip), %xmm1     # 0x5010
ucomiss %xmm1, %xmm0
jne 0x227a
jp 0x227a
jmp 0x229b
movq -0x10(%rbp), %rdi
movss -0x18(%rbp), %xmm0
movl -0x14(%rbp), %esi
callq 0x2a30
cmpl $0x0, %eax
jne 0x2299
movl $0x0, -0x4(%rbp)
jmp 0x22f7
jmp 0x229b
movq -0x10(%rbp), %rax
movss 0x2c(%rax), %xmm0
movss 0x2d64(%rip), %xmm1     # 0x5010
ucomiss %xmm1, %xmm0
jne 0x22b5
jp 0x22b5
jmp 0x22f0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x50(%rcx), %eax
cltq
shlq %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movl 0x64(%rax), %esi
subl -0x14(%rbp), %esi
movq -0x10(%rbp), %rax
imull 0x50(%rax), %esi
movq -0x10(%rbp), %rax
movss 0x2c(%rax), %xmm0
callq 0x2c50
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: addShortSamplesToInputBuffer
static int addShortSamplesToInputBuffer(sonicStream stream,
                                        const short* samples, int numSamples) {
  if (numSamples == 0) {
    return 1;
  }
  if (!enlargeInputBufferIfNeeded(stream, numSamples)) {
    return 0;
  }
  memcpy(stream->inputBuffer + stream->numInputSamples * stream->numChannels,
         samples, numSamples * sizeof(short) * stream->numChannels);
  updateNumInputSamples(stream, numSamples);
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x2322
movl $0x1, -0x4(%rbp)
jmp 0x2389
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x1f70
cmpl $0x0, %eax
jne 0x233c
movl $0x0, -0x4(%rbp)
jmp 0x2389
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x50(%rcx), %eax
cltq
shlq %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
shlq %rdx
movq -0x10(%rbp), %rax
movslq 0x50(%rax), %rax
imulq %rax, %rdx
callq 0x1120
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x26b0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: addUnsignedCharSamplesToInputBuffer
static int addUnsignedCharSamplesToInputBuffer(sonicStream stream,
                                               const unsigned char* samples,
                                               int numSamples) {
  short* buffer;
  int count = numSamples * stream->numChannels;

  if (numSamples == 0) {
    return 1;
  }
  if (!enlargeInputBufferIfNeeded(stream, numSamples)) {
    return 0;
  }
  buffer = stream->inputBuffer + stream->numInputSamples * stream->numChannels;
  while (count--) {
    *buffer++ = (*samples++ - 128) << 8;
  }
  updateNumInputSamples(stream, numSamples);
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x50(%rcx), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x2423
movl $0x1, -0x4(%rbp)
jmp 0x24b4
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x1f70
cmpl $0x0, %eax
jne 0x243d
movl $0x0, -0x4(%rbp)
jmp 0x24b4
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x60(%rcx), %ecx
movq -0x10(%rbp), %rdx
imull 0x50(%rdx), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x24a1
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
subl $0x80, %eax
shll $0x8, %eax
movw %ax, %cx
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, -0x28(%rbp)
movw %cx, (%rax)
jmp 0x2460
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x26b0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: sonicIntChangeFloatSpeed
int sonicChangeFloatSpeed(float* samples, int numSamples, float speed,
                          float pitch, float rate, float volume,
                          int useChordPitch, int sampleRate, int numChannels) {
  sonicStream stream = sonicCreateStream(sampleRate, numChannels);

  sonicSetSpeed(stream, speed);
  sonicSetPitch(stream, pitch);
  sonicSetRate(stream, rate);
  sonicSetVolume(stream, volume);
  sonicWriteFloatToStream(stream, samples, numSamples);
  sonicFlushStream(stream);
  numSamples = sonicSamplesAvailable(stream);
  sonicReadFloatFromStream(stream, samples, numSamples);
  sonicDestroyStream(stream);
  return numSamples;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movss %xmm0, -0x10(%rbp)
movss %xmm1, -0x14(%rbp)
movss %xmm2, -0x18(%rbp)
movss %xmm3, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movl -0x24(%rbp), %edi
movl -0x28(%rbp), %esi
callq 0x1150
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movss -0x10(%rbp), %xmm0
callq 0x11c0
movq -0x30(%rbp), %rdi
movss -0x14(%rbp), %xmm0
callq 0x10c0
movq -0x30(%rbp), %rdi
movss -0x18(%rbp), %xmm0
callq 0x1060
movq -0x30(%rbp), %rdi
movss -0x1c(%rbp), %xmm0
callq 0x1030
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl -0xc(%rbp), %edx
callq 0x1050
movq -0x30(%rbp), %rdi
callq 0x1080
movq -0x30(%rbp), %rdi
callq 0x1130
movl %eax, -0xc(%rbp)
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl -0xc(%rbp), %edx
callq 0x1140
movq -0x30(%rbp), %rdi
callq 0x1100
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: computeSkip
static int computeSkip(sonicStream stream, int sampleRate) {
  int skip = 1;
  if (sampleRate > SONIC_AMDF_FREQ && stream->quality == 0) {
    skip = sampleRate / SONIC_AMDF_FREQ;
  }
  return skip;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
cmpl $0xfa0, -0xc(%rbp)      # imm = 0xFA0
jle 0x2673
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
jne 0x2673
movl -0xc(%rbp), %eax
movl $0xfa0, %ecx            # imm = 0xFA0
cltd
idivl %ecx
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: copyInputToOutput
static int copyInputToOutput(sonicStream stream, int numSamples) {
  if (!enlargeOutputBufferIfNeeded(stream, numSamples)) {
    return 0;
  }
  memcpy(stream->outputBuffer + stream->numOutputSamples * stream->numChannels,
         stream->inputBuffer, numSamples * sizeof(short) * stream->numChannels);
  stream->numOutputSamples += numSamples;
  removeInputSamples(stream, numSamples);
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3300
cmpl $0x0, %eax
jne 0x29c9
movl $0x0, -0x4(%rbp)
jmp 0x2a27
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x50(%rcx), %eax
cltq
shlq %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movslq -0x14(%rbp), %rdx
shlq %rdx
movq -0x10(%rbp), %rax
movslq 0x50(%rax), %rax
imulq %rax, %rdx
callq 0x1120
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x64(%rax), %ecx
movl %ecx, 0x64(%rax)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x31d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: scaleSamples
static void scaleSamples(short* samples, int numSamples, float volume) {
  /* This is 24-bit integer and 8-bit fraction fixed-point representation. */
  int fixedPointVolume = volume * 256.0f;
  int value;

  while (numSamples--) {
    value = (*samples * fixedPointVolume) >> 8;
    if (value > 32767) {
      value = 32767;
    } else if (value < -32767) {
      value = -32767;
    }
    *samples++ = value;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movss %xmm0, -0x10(%rbp)
movss 0x23b8(%rip), %xmm0     # 0x5020
mulss -0x10(%rbp), %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x2cd3
movq -0x8(%rbp), %rax
movswl (%rax), %eax
imull -0x14(%rbp), %eax
sarl $0x8, %eax
movl %eax, -0x18(%rbp)
cmpl $0x7fff, -0x18(%rbp)    # imm = 0x7FFF
jle 0x2ca7
movl $0x7fff, -0x18(%rbp)    # imm = 0x7FFF
jmp 0x2cb9
cmpl $0xffff8001, -0x18(%rbp) # imm = 0xFFFF8001
jge 0x2cb7
movl $0xffff8001, -0x18(%rbp) # imm = 0xFFFF8001
jmp 0x2cb9
movl -0x18(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, -0x8(%rbp)
movw %cx, (%rax)
jmp 0x2c74
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: copyUnmodifiedSamples
static int copyUnmodifiedSamples(sonicStream stream, short* samples,
                                 float speed, int position, int* newSamples) {
  int availableSamples = stream->numInputSamples - position;
  float inputToCopyFloat =
      1 - stream->timeError * speed / (stream->samplePeriod * (speed - 1.0));

  *newSamples = inputToCopyFloat > availableSamples ? availableSamples
                                                    : (int)inputToCopyFloat;
  if (!copyToOutput(stream, samples, *newSamples)) {
    return 0;
  }
  stream->timeError +=
      *newSamples * stream->samplePeriod * (speed - 1.0) / speed;
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
subl -0x20(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movss 0x40(%rax), %xmm0
mulss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movq -0x10(%rbp), %rax
movss 0x38(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x1c(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
movsd 0x22ef(%rip), %xmm3     # 0x5028
subsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
divsd %xmm0, %xmm1
movsd 0x22db(%rip), %xmm0     # 0x5028
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x30(%rbp), %xmm0
cvtsi2ssl -0x2c(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x2d71
movl -0x2c(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x2d79
cvttss2si -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
movl (%rax), %edx
callq 0x3270
cmpl $0x0, %eax
jne 0x2da3
movl $0x0, -0x4(%rbp)
jmp 0x2dff
movq -0x28(%rbp), %rax
cvtsi2ssl (%rax), %xmm0
movq -0x10(%rbp), %rax
mulss 0x38(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x225f(%rip), %xmm2     # 0x5028
subsd %xmm2, %xmm0
mulsd %xmm0, %xmm1
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
divsd %xmm0, %xmm1
movq -0x10(%rbp), %rax
movss 0x40(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x40(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: skipPitchPeriod
static int skipPitchPeriod(sonicStream stream, short* samples, float speed,
                           int period) {
  long newSamples;
  int numChannels = stream->numChannels;

  if (speed >= 2.0f) {
    /* For speeds >= 2.0, we skip over a portion of each pitch period rather
       than dropping whole pitch periods. */
    newSamples = period / (speed - 1.0f);
  } else {
    newSamples = period;
  }
  if (!enlargeOutputBufferIfNeeded(stream, newSamples)) {
    return 0;
  }
  overlapAdd(newSamples, numChannels,
             stream->outputBuffer + stream->numOutputSamples * numChannels,
             samples, samples + period * numChannels);
  stream->numOutputSamples += newSamples;
  return newSamples;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x2c(%rbp)
movss -0x1c(%rbp), %xmm0
movss 0x202d(%rip), %xmm1     # 0x501c
ucomiss %xmm1, %xmm0
jb 0x3019
cvtsi2ssl -0x20(%rbp), %xmm0
movss -0x1c(%rbp), %xmm1
movss 0x200a(%rip), %xmm2     # 0x5010
subss %xmm2, %xmm1
divss %xmm1, %xmm0
cvttss2si %xmm0, %rax
movq %rax, -0x28(%rbp)
jmp 0x3021
movslq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %esi
callq 0x3300
cmpl $0x0, %eax
jne 0x303e
movl $0x0, -0x4(%rbp)
jmp 0x3097
movq -0x28(%rbp), %rax
movl %eax, %edi
movl -0x2c(%rbp), %esi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
imull -0x2c(%rbp), %eax
cltq
shlq %rax
addq %rax, %rdx
movq -0x18(%rbp), %rcx
movq -0x18(%rbp), %r8
movl -0x20(%rbp), %eax
imull -0x2c(%rbp), %eax
cltq
shlq %rax
addq %rax, %r8
callq 0x3660
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq 0x64(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x64(%rax)
movq -0x28(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: insertPitchPeriod
static int insertPitchPeriod(sonicStream stream, short* samples, float speed,
                             int period) {
  long newSamples;
  short* out;
  int numChannels = stream->numChannels;

  if (speed <= 0.5f) {
    newSamples = period * speed / (1.0f - speed);
  } else {
    newSamples = period;
  }
  if (!enlargeOutputBufferIfNeeded(stream, period + newSamples)) {
    return 0;
  }
  out = stream->outputBuffer + stream->numOutputSamples * numChannels;
  memcpy(out, samples, period * sizeof(short) * numChannels);
  out =
      stream->outputBuffer + (stream->numOutputSamples + period) * numChannels;
  overlapAdd(newSamples, numChannels, out, samples + period * numChannels,
             samples);
  stream->numOutputSamples += period + newSamples;
  return newSamples;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x34(%rbp)
movss 0x1f4e(%rip), %xmm0     # 0x5018
ucomiss -0x1c(%rbp), %xmm0
jb 0x30f6
cvtsi2ssl -0x20(%rbp), %xmm0
mulss -0x1c(%rbp), %xmm0
movss 0x1f2e(%rip), %xmm1     # 0x5010
subss -0x1c(%rbp), %xmm1
divss %xmm1, %xmm0
cvttss2si %xmm0, %rax
movq %rax, -0x28(%rbp)
jmp 0x30fe
movslq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movl %eax, %esi
callq 0x3300
cmpl $0x0, %eax
jne 0x3122
movl $0x0, -0x4(%rbp)
jmp 0x31c7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x64(%rcx), %ecx
imull -0x34(%rbp), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x20(%rbp), %rdx
shlq %rdx
movslq -0x34(%rbp), %rax
imulq %rax, %rdx
callq 0x1120
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x64(%rcx), %ecx
addl -0x20(%rbp), %ecx
imull -0x34(%rbp), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movl %eax, %edi
movl -0x34(%rbp), %esi
movq -0x30(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl -0x20(%rbp), %eax
imull -0x34(%rbp), %eax
cltq
shlq %rax
addq %rax, %rcx
movq -0x18(%rbp), %r8
callq 0x3660
movslq -0x20(%rbp), %rdx
addq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq 0x64(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x64(%rax)
movq -0x28(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: removeInputSamples
static void removeInputSamples(sonicStream stream, int position) {
  int remainingSamples = stream->numInputSamples - position;

  if (remainingSamples > 0) {
    memmove(stream->inputBuffer,
            stream->inputBuffer + position * stream->numChannels,
            remainingSamples * sizeof(short) * stream->numChannels);
  }
  /* If we play 3/4ths of the samples, then the expected play time of the
     remaining samples is 1/4th of the original expected play time. */
  stream->inputPlayTime =
      (stream->inputPlayTime * remainingSamples) / stream->numInputSamples;
  stream->numInputSamples = remainingSamples;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x60(%rax), %eax
subl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jle 0x322b
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x50(%rcx), %eax
cltq
shlq %rax
addq %rax, %rsi
movslq -0x10(%rbp), %rdx
shlq %rdx
movq -0x8(%rbp), %rax
movslq 0x50(%rax), %rax
imulq %rax, %rdx
callq 0x1180
movq -0x8(%rbp), %rax
movss 0x3c(%rax), %xmm0
cvtsi2ssl -0x10(%rbp), %xmm1
mulss %xmm1, %xmm0
movq -0x8(%rbp), %rax
cvtsi2ssl 0x60(%rax), %xmm1
divss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x3c(%rax)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x60(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: copyToOutput
static int copyToOutput(sonicStream stream, short* samples, int numSamples) {
  if (!enlargeOutputBufferIfNeeded(stream, numSamples)) {
    return 0;
  }
  memcpy(stream->outputBuffer + stream->numOutputSamples * stream->numChannels,
         samples, numSamples * sizeof(short) * stream->numChannels);
  stream->numOutputSamples += numSamples;
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x3300
cmpl $0x0, %eax
jne 0x329d
movl $0x0, -0x4(%rbp)
jmp 0x32ec
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x50(%rcx), %eax
cltq
shlq %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
shlq %rdx
movq -0x10(%rbp), %rax
movslq 0x50(%rax), %rax
imulq %rax, %rdx
callq 0x1120
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x64(%rax), %ecx
movl %ecx, 0x64(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: enlargeOutputBufferIfNeeded
static int enlargeOutputBufferIfNeeded(sonicStream stream, int numSamples) {
  int outputBufferSize = stream->outputBufferSize;

  if (stream->numOutputSamples + numSamples > outputBufferSize) {
    stream->outputBufferSize += (outputBufferSize >> 1) + numSamples;
    stream->outputBuffer = (short*)sonicRealloc(
        stream->outputBuffer, outputBufferSize, stream->outputBufferSize,
        sizeof(short) * stream->numChannels);
    if (stream->outputBuffer == NULL) {
      return 0;
    }
  }
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
addl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x337f
movl -0x18(%rbp), %ecx
sarl %ecx
addl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x5c(%rax), %ecx
movl %ecx, 0x5c(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %edx
movq -0x10(%rbp), %rax
movslq 0x50(%rax), %rax
shlq %rax
movl %eax, %ecx
callq 0x2680
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x337d
movl $0x0, -0x4(%rbp)
jmp 0x3386
jmp 0x337f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: downSampleInput
static void downSampleInput(sonicStream stream, short* samples, int skip) {
  int numSamples = stream->maxRequired / skip;
  int samplesPerValue = stream->numChannels * skip;
  int i, j;
  int value;
  short* downSamples = stream->downSampleBuffer;

  for (i = 0; i < numSamples; i++) {
    value = 0;
    for (j = 0; j < samplesPerValue; j++) {
      value += *samples++;
    }
    value /= samplesPerValue;
    *downSamples++ = value;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x74(%rax), %eax
cltd
idivl -0x14(%rbp)
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x50(%rax), %eax
imull -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x35ce
movl $0x0, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x359f
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, -0x10(%rbp)
movswl (%rax), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3574
movl -0x1c(%rbp), %ecx
movl -0x28(%rbp), %eax
cltd
idivl %ecx
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movw %ax, %cx
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, -0x30(%rbp)
movw %cx, (%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x355e
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: prevPeriodBetter
static int prevPeriodBetter(sonicStream stream, int minDiff, int maxDiff,
                            int preferNewPeriod) {
  if (minDiff == 0 || stream->prevPeriod == 0) {
    return 0;
  }
  if (preferNewPeriod) {
    if (maxDiff > minDiff * 3) {
      /* Got a reasonable match this period */
      return 0;
    }
    if (minDiff * 2 <= stream->prevMinDiff * 3) {
      /* Mismatch is not that much greater this period */
      return 0;
    }
  } else {
    if (minDiff <= stream->prevMinDiff) {
      return 0;
    }
  }
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x35f4
movq -0x10(%rbp), %rax
cmpl $0x0, 0x80(%rax)
jne 0x35fd
movl $0x0, -0x4(%rbp)
jmp 0x3657
cmpl $0x0, -0x1c(%rbp)
je 0x3636
movl -0x18(%rbp), %eax
imull $0x3, -0x14(%rbp), %ecx
cmpl %ecx, %eax
jle 0x3617
movl $0x0, -0x4(%rbp)
jmp 0x3657
movl -0x14(%rbp), %eax
shll %eax
movq -0x10(%rbp), %rcx
imull $0x3, 0x84(%rcx), %ecx
cmpl %ecx, %eax
jg 0x3634
movl $0x0, -0x4(%rbp)
jmp 0x3657
jmp 0x3650
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x84(%rcx), %eax
jg 0x364e
movl $0x0, -0x4(%rbp)
jmp 0x3657
jmp 0x3650
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: overlapAdd
static void overlapAdd(int numSamples, int numChannels, short* out,
                       short* rampDown, short* rampUp) {
  short* o;
  short* u;
  short* d;
  int i, t;

  for (i = 0; i < numChannels; i++) {
    o = out + i;
    u = rampUp + i;
    d = rampDown + i;
    for (t = 0; t < numSamples; t++) {
#ifdef SONIC_USE_SIN
      float ratio = sin(t * M_PI / (2 * numSamples));
      *o = *d * (1.0f - ratio) + *u * ratio;
#else
      *o = (*d * (numSamples - t) + *u * t) / numSamples;
#endif
      o += numChannels;
      d += numChannels;
      u += numChannels;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x3750
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movslq -0x3c(%rbp), %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x3740
movq -0x38(%rbp), %rax
movswl (%rax), %eax
movl -0x4(%rbp), %ecx
subl -0x40(%rbp), %ecx
imull %ecx, %eax
movq -0x30(%rbp), %rcx
movswl (%rcx), %ecx
imull -0x40(%rbp), %ecx
addl %ecx, %eax
cltd
idivl -0x4(%rbp)
movw %ax, %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
movl -0x8(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x8(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl -0x8(%rbp), %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x36c6
jmp 0x3742
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x367d
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: moveNewSamplesToPitchBuffer
static int moveNewSamplesToPitchBuffer(sonicStream stream,
                                       int originalNumOutputSamples) {
  int numSamples = stream->numOutputSamples - originalNumOutputSamples;
  int numChannels = stream->numChannels;
  int pitchBufferSize = stream->pitchBufferSize;

  if (stream->numPitchSamples + numSamples > pitchBufferSize) {
    stream->pitchBufferSize += (pitchBufferSize >> 1) + numSamples;
    stream->pitchBuffer = (short*)sonicRealloc(
        stream->pitchBuffer, pitchBufferSize, stream->pitchBufferSize,
        sizeof(short) * numChannels);
  }
  memcpy(stream->pitchBuffer + stream->numPitchSamples * numChannels,
         stream->outputBuffer + originalNumOutputSamples * numChannels,
         numSamples * sizeof(short) * numChannels);
  stream->numOutputSamples = originalNumOutputSamples;
  stream->numPitchSamples += numSamples;
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x64(%rax), %eax
subl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x68(%rax), %eax
addl -0x10(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x37dc
movl -0x18(%rbp), %ecx
sarl %ecx
addl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x58(%rax), %ecx
movl %ecx, 0x58(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x18(%rbp), %esi
movq -0x8(%rbp), %rax
movl 0x58(%rax), %edx
movslq -0x14(%rbp), %rax
shlq %rax
movl %eax, %ecx
callq 0x2680
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x68(%rax), %eax
imull -0x14(%rbp), %eax
cltq
shlq %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0xc(%rbp), %eax
imull -0x14(%rbp), %eax
cltq
shlq %rax
addq %rax, %rsi
movslq -0x10(%rbp), %rdx
shlq %rdx
movslq -0x14(%rbp), %rax
imulq %rax, %rdx
callq 0x1120
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x64(%rax)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x68(%rax), %ecx
movl %ecx, 0x68(%rax)
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: interpolate
static short interpolate(sonicStream stream, short* in, int oldSampleRate,
                         int newSampleRate) {
  /* Compute N-point sinc FIR-filter here.  Clip rather than overflow. */
  int i;
  int total = 0;
  int position = stream->newRatePosition * oldSampleRate;
  int leftPosition = stream->oldRatePosition * newSampleRate;
  int rightPosition = (stream->oldRatePosition + 1) * newSampleRate;
  int ratio = rightPosition - position - 1;
  int width = rightPosition - leftPosition;
  int weight, value;
  int oldSign;
  int overflowCount = 0;

  for (i = 0; i < SINC_FILTER_POINTS; i++) {
    weight = findSincCoefficient(i, ratio, width);
    value = in[i * stream->numChannels] * weight;
    oldSign = getSign(total);
    total += value;
    if (oldSign != getSign(total) && getSign(value) == oldSign) {
      /* We must have overflowed.  This can happen with a sinc filter. */
      overflowCount += oldSign;
    }
  }
  /* It is better to clip than to wrap if there was a overflow. */
  if (overflowCount > 0) {
    return SHRT_MAX;
  } else if (overflowCount < 0) {
    return SHRT_MIN;
  }
  return total >> 16;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x48(%rax), %eax
imull -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x44(%rax), %eax
imull -0x20(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x44(%rax), %eax
addl $0x1, %eax
imull -0x20(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
subl -0x2c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
subl -0x30(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0xc, -0x24(%rbp)
jge 0x3942
movl -0x24(%rbp), %edi
movl -0x38(%rbp), %esi
movl -0x3c(%rbp), %edx
callq 0x3a10
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rdx
imull 0x50(%rdx), %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %eax
imull -0x40(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x28(%rbp), %edi
callq 0x3ab0
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x28(%rbp), %edi
callq 0x3ab0
movl %eax, %ecx
movl -0x50(%rbp), %eax
cmpl %ecx, %eax
je 0x3932
movl -0x44(%rbp), %edi
callq 0x3ab0
cmpl -0x48(%rbp), %eax
jne 0x3932
movl -0x48(%rbp), %eax
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x3934
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x38bd
cmpl $0x0, -0x4c(%rbp)
jle 0x3950
movw $0x7fff, -0x2(%rbp)     # imm = 0x7FFF
jmp 0x396a
cmpl $0x0, -0x4c(%rbp)
jge 0x395e
movw $0x8000, -0x2(%rbp)     # imm = 0x8000
jmp 0x396a
jmp 0x3960
movl -0x28(%rbp), %eax
sarl $0x10, %eax
movw %ax, -0x2(%rbp)
movw -0x2(%rbp), %ax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: removePitchSamples
static void removePitchSamples(sonicStream stream, int numSamples) {
  int numChannels = stream->numChannels;
  short* source = stream->pitchBuffer + numSamples * numChannels;

  if (numSamples == 0) {
    return;
  }
  if (numSamples != stream->numPitchSamples) {
    memmove(
        stream->pitchBuffer, source,
        (stream->numPitchSamples - numSamples) * sizeof(short) * numChannels);
  }
  stream->numPitchSamples -= numSamples;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x39bd
jmp 0x3a01
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x68(%rcx), %eax
je 0x39f2
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0x68(%rax), %eax
subl -0xc(%rbp), %eax
movslq %eax, %rdx
shlq %rdx
movslq -0x10(%rbp), %rax
imulq %rax, %rdx
callq 0x1180
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x68(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x68(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/waywardgeek[P]sonic/sonic.c
// Function: findSincCoefficient
static int findSincCoefficient(int i, int ratio, int width) {
  int lobePoints = (SINC_TABLE_SIZE - 1) / SINC_FILTER_POINTS;
  int left = i * lobePoints + (ratio * lobePoints) / width;
  int right = left + 1;
  int position = i * lobePoints * width + ratio * lobePoints - left * width;
  int leftVal = sincTable[left];
  int rightVal = sincTable[right];

  return ((leftVal * (width - position) + rightVal * position) << 1) / width;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl $0x32, -0x10(%rbp)
movl -0x4(%rbp), %eax
imull -0x10(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x8(%rbp), %eax
imull -0x10(%rbp), %eax
cltd
idivl -0xc(%rbp)
movl %eax, %ecx
movl -0x28(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %eax
imull -0x10(%rbp), %eax
imull -0xc(%rbp), %eax
movl -0x8(%rbp), %ecx
imull -0x10(%rbp), %ecx
addl %ecx, %eax
movl -0x14(%rbp), %ecx
imull -0xc(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x4689(%rip), %rax      # 0x8100
movswl (%rax,%rcx,2), %eax
movl %eax, -0x20(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x4677(%rip), %rax      # 0x8100
movswl (%rax,%rcx,2), %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
movl -0xc(%rbp), %ecx
subl -0x1c(%rbp), %ecx
imull %ecx, %eax
movl -0x24(%rbp), %ecx
imull -0x1c(%rbp), %ecx
addl %ecx, %eax
shll %eax
cltd
idivl -0xc(%rbp)
popq %rbp
retq
nopl (%rax)