LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/songlib.c
// Function: interp1
int
interp1(int *data,int length,double t)
    {
    int lo = (int) t;
    int hi = lo + 1;
    double fraction;
    double result;

    if (lo >= length-1) return data[length-1];

    fraction = t - lo;

    result = data[lo] + fraction * (data[hi] - data[lo]);

    return (int) result;
    }

// Assembly:
cvttsd2si %xmm0, %eax
decl %esi
cmpl %eax, %esi
jle 0x56ba
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
cltq
movl (%rdi,%rax,4), %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
movl 0x4(%rdi,%rax,4), %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm2
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %eax
retq
movslq %esi, %rax
movl (%rdi,%rax,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/songlib.c
// Function: interp3
int
interp3(int *data,int length,double t)
    {
    int x;
    double mu,mu2;
    int y0,y1,y2,y3;
    int a0,a1,a2,a3;

    if (t >= length) return data[length - 1];

    x = (int) t;
    mu = t - x;
    mu2 = mu * mu;

    y1 = data[x];
    if (x == 0)
        {
        y2 = data[x + 1];
        y3 = data[x + 2];
        y0 = y1 + y1 - y2;
        }
    else if (x == length - 2)
        {
        y0 = data[x - 1];
        y2 = data[x + 1];
        y3 = y2 + y2 - y1;
        }
    else if (x == length - 1)
        {
        y0 = data[x - 1];
        y2 = y1 + y1 - y0;
        y3 = y2 + y2 - y1;
        }
    else
        {
        y0 = data[x - 1];
        y2 = data[x + 1];
        y3 = data[x + 2];
        }
        
    a0 = y3 - y2 - y0 + y1;
    a1 = y0 - y1 - a0;
    a2 = y2 - y0;
    a3 = y1;

    return (int) (a0*mu*mu2+a1*mu2+a2*mu+a3);
    }

// Assembly:
cvtsi2sd %esi, %xmm1
ucomisd %xmm1, %xmm0
jae 0x5702
cvttsd2si %xmm0, %ecx
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm0
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movslq %ecx, %r8
movl (%rdi,%r8,4), %eax
testl %r8d, %r8d
je 0x570a
leal -0x2(%rsi), %edx
cmpl %ecx, %edx
jne 0x5717
movl -0x4(%rdi,%r8,4), %edx
movl 0x4(%rdi,%r8,4), %ecx
jmp 0x5727
movslq %esi, %rax
movl -0x4(%rdi,%rax,4), %eax
retq
movl 0x4(%rdi), %ecx
movl 0x8(%rdi), %esi
leal (%rax,%rax), %edx
subl %ecx, %edx
jmp 0x5738
decl %esi
movl -0x4(%rdi,%r8,4), %edx
cmpl %ecx, %esi
jne 0x572e
leal (%rax,%rax), %ecx
subl %edx, %ecx
leal (%rcx,%rcx), %esi
subl %eax, %esi
jmp 0x5738
movl 0x4(%rdi,%r8,4), %ecx
movl 0x8(%rdi,%r8,4), %esi
addl %eax, %esi
subl %ecx, %esi
subl %edx, %esi
subl %edx, %ecx
cvtsi2sd %esi, %xmm2
subl %eax, %edx
subl %esi, %edx
mulsd %xmm0, %xmm2
cvtsi2sd %edx, %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
addsd %xmm3, %xmm2
mulsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
addsd %xmm2, %xmm1
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/songlib.c
// Function: setStyle
void
setStyle(char *mode,double info)
    {
    if (strcasecmp(mode,"SWING") == 0)
        {
        style = SWING;
        swingBeat = info;
        swingDown = 1;
        }
    else if (strcasecmp(mode,"PLAIN") == 0)
        style = PLAIN;
    else
        Fatal("Style %s not understood\n",mode);
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
leaq 0x4776(%rip), %rsi      # 0xa4be
callq 0x2050
testl %eax, %eax
je 0x5d7a
leaq 0x476c(%rip), %rsi      # 0xa4c4
movq %rbx, %rdi
callq 0x2050
testl %eax, %eax
je 0x5d9b
leaq 0x475f(%rip), %rdi      # 0xa4ca
movq %rbx, %rsi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
jmp 0x6b88
movl $0x1, %eax
movl %eax, 0x97bf(%rip)      # 0xf544
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x967d(%rip)     # 0xf410
movl %eax, 0x967f(%rip)      # 0xf418
jmp 0x5da5
movl $0x0, 0x979f(%rip)      # 0xf544
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/songlib.c
// Function: resample
RRA *
resample(RRA *note,double factor)
    {
    int i;
    double t;
    RRA *h;

    //printf("in resample...\n");

    h = newRRA(note->sampleRate,note->bitsPerSample,1,note->samples);

    dDebug("dresample: samples in original note is %d\n",length);
    dDebug("dresample: factor is %f\n",factor);
    //printf("samples in original note is %d\n",note->samples);
    //printf("factor is %f\n",factor);

    i = 0;
    t = 0;
    while (t < note->samples)
        {
        if (i >= h->samples)
            {
            //printf("%d samples\n",h->samples);
            //printf("t is %f\n",t);
            growRRA(h);
            }

        h->data[0][i] = interp(note->data[0],note->samples,t);
        t += factor;
        ++i;
        }

    /* remove the excess capacity in the rra object */

    shrinkRRA(h,i);

    dDebug("leaving\n");

    return h;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %r14
movl 0x4(%rdi), %edi
movl 0x8(%r14), %esi
movl 0xc(%r14), %ecx
movl $0x1, %edx
callq 0x6e00
movq %rax, %rbx
cmpl $0x0, 0xc(%r14)
jle 0x602c
xorps %xmm0, %xmm0
xorl %r15d, %r15d
movslq 0xc(%rbx), %rax
cmpq %rax, %r15
movsd %xmm0, (%rsp)
jl 0x5fe1
movq %rbx, %rdi
callq 0x7c1f
movq 0x18(%r14), %rax
movq (%rax), %rdi
movl 0xc(%r14), %esi
movsd (%rsp), %xmm0
callq *0x18cf9(%rip)          # 0x1ecf0
movq 0x18(%rbx), %rcx
movq (%rcx), %rcx
movl %eax, (%rcx,%r15,4)
movsd (%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsp)
incq %r15
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%r14), %xmm0
ucomisd (%rsp), %xmm0
movsd (%rsp), %xmm0
ja 0x5fcb
jmp 0x602f
xorl %r15d, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x7c29
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/songlib.c
// Function: measure
void
measure(const char *file,const char *function,const int line)
    {
    static int last = 0;

    if (file == 0)
        {
        last = location;
        //printf("location is %d\n",last);
        //printf("last is %f\n",samplesToBeats(last));
        //getchar();
        }
    else
        {
        int span = location - last;
        //printf("span is %d\n",span);
        printf("!%s: %s: %4d: %f measures (%f total)\n",
                file,function,line,samplesToMeasures(span),
                samplesToMeasures(location - spaces - measuredLocation)
		    + previousMeasures);
        }
    }

// Assembly:
movsd 0x18c39(%rip), %xmm1    # 0x1ed08
testq %rdi, %rdi
je 0x6165
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %rsi
cvtsi2sdl 0x18fbc(%rip), %xmm0 # 0x1f0a4
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
cvttpd2dq %xmm2, %xmm0
cvtdq2pd %xmm0, %xmm0
xorps %xmm2, %xmm2
cvtsi2sdl 0x932d(%rip), %xmm2 # 0xf430
divsd %xmm2, %xmm0
movsd 0x4171(%rip), %xmm3     # 0xa280
divsd %xmm3, %xmm0
movsd 0x9395(%rip), %xmm4     # 0xf4b0
mulsd %xmm4, %xmm0
cvtsi2sdl 0x9329(%rip), %xmm5 # 0xf450
subsd 0x18f29(%rip), %xmm1    # 0x1f058
cvtsi2sdl 0x18f45(%rip), %xmm6 # 0x1f07c
divsd %xmm5, %xmm0
subsd %xmm6, %xmm1
divsd %xmm2, %xmm1
divsd %xmm3, %xmm1
mulsd %xmm4, %xmm1
divsd %xmm5, %xmm1
addsd 0x18f29(%rip), %xmm1    # 0x1f080
leaq 0x43aa(%rip), %rdi      # 0xa508
movb $0x2, %al
jmp 0x20f0
cvttsd2si %xmm1, %eax
movl %eax, 0x18f35(%rip)     # 0x1f0a4
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/songlib.c
// Function: addComment
void
addComment(char *drumComment)
    {
    COMMENT *temp, *temp1;
    int commentSamples = getLocation();
    commentBuffer = (COMMENT *)New(sizeof(COMMENT));

    if(tail == NULL)
        {
        head = commentBuffer;
        tail = commentBuffer;
        commentBuffer->location = commentSamples;
        strcpy(commentBuffer->comment,drumComment);
        return;
        }

    if(commentSamples > tail->location) 
	{
	tail->next = commentBuffer;
	commentBuffer->location = commentSamples;
	strcpy(commentBuffer->comment,drumComment);
	//fprintf(stderr,"%s at %d \n",commentBuffer->comment, commentBuffer->location);
	commentBuffer->next = NULL;
	tail = commentBuffer;
	}
    else /* insert in between */
	{
	/* check from head to current
	 * tail, the most suitable
	 * location to place the comment */

	temp1 = (COMMENT *)New(sizeof(COMMENT));
	temp1->location = 0;

	temp = head;
	while(temp != tail)
	    {
	    if(temp->location > commentSamples)
		{
		temp1->next = temp->next;		
		temp->next = commentBuffer;
		commentBuffer->location = commentSamples;
		strcpy(commentBuffer->comment,drumComment);
		fprintf(stderr,"%s at %f \n",commentBuffer->comment, commentBuffer->location);
		commentBuffer->next = temp1->next;
		break;
		}
	    temp = temp->next;	    
	    }
	}
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cvttsd2si 0x18b4c(%rip), %ebp # 0x1ed08
movl $0x210, %edi            # imm = 0x210
callq 0x6cb5
movq %rax, %r14
movq %rax, 0x18ed8(%rip)     # 0x1f0a8
movq 0x18ed9(%rip), %rax     # 0x1f0b0
testq %rax, %rax
je 0x6215
cvtsi2sd %ebp, %xmm0
ucomisd (%rax), %xmm0
jbe 0x6245
movq %r14, 0x208(%rax)
movsd %xmm0, (%r14)
movq %r14, %rdi
addq $0x8, %rdi
movq %rbx, %rsi
callq 0x2080
movq $0x0, 0x208(%r14)
movq %r14, 0x18e9d(%rip)     # 0x1f0b0
jmp 0x628f
movq %r14, 0x18e9c(%rip)     # 0x1f0b8
movq %r14, 0x18e8d(%rip)     # 0x1f0b0
cvtsi2sd %ebp, %xmm0
movsd %xmm0, (%r14)
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2080
movl $0x210, %edi            # imm = 0x210
movsd %xmm0, (%rsp)
callq 0x6cb5
movsd (%rsp), %xmm1
movq %rax, %r14
movq $0x0, (%rax)
movq 0x18e46(%rip), %rax     # 0x1f0b0
movq 0x18e47(%rip), %rcx     # 0x1f0b8
cmpq %rax, %rcx
je 0x628f
movsd (%rcx), %xmm0
ucomisd %xmm1, %xmm0
movq 0x208(%rcx), %rdx
ja 0x629a
movq %rdx, %rcx
cmpq %rax, %rdx
jne 0x6276
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, 0x208(%r14)
movq 0x18e00(%rip), %r15     # 0x1f0a8
movq %r15, 0x208(%rcx)
movsd %xmm1, (%r15)
addq $0x8, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2080
movq 0x8d2e(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x425a(%rip), %rsi      # 0xa52e
movq %r15, %rdx
movsd (%rsp), %xmm0
movb $0x1, %al
callq 0x21d0
movq 0x208(%r14), %rax
movq 0x18db7(%rip), %rcx     # 0x1f0a8
movq %rax, 0x208(%rcx)
jmp 0x628f
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/songlib.c
// Function: closeComments
void 
closeComments()    
    {
    COMMENT *temp;
    temp = head;

    while(temp)
	{
	head = temp->next;
	free(temp);
	temp = head;
	}
    }

// Assembly:
movq 0x18db7(%rip), %rdi     # 0x1f0b8
testq %rdi, %rdi
je 0x6323
pushq %rbx
movq 0x208(%rdi), %rbx
movq %rbx, 0x18da3(%rip)     # 0x1f0b8
callq 0x2040
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x6307
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/songlib.c
// Function: addSampleToSampleSet
static SAMPLE_SET *
addSampleToSampleSet(RRA *h, SAMPLE_SET *ss)
    {
    int i;
    RRA **oldSamples = ss->samples;
    ss->samples = (RRA **) New(sizeof(RRA *) * (ss->count+1));
    for (i=0;i<ss->count;++i)
        {
        ss->samples[i] = oldSamples[i];
        }
    ss->samples[ss->count] = h;
    ++(ss->count);
    return ss;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
movl 0x8(%rsi), %eax
leal 0x8(,%rax,8), %edi
callq 0x6cb5
movq %rax, (%rbx)
movslq 0x8(%rbx), %rax
testq %rax, %rax
jle 0x678f
xorl %ecx, %ecx
movq (%r15,%rcx,8), %rdx
movq (%rbx), %rsi
movq %rdx, (%rsi,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x677c
movq (%rbx), %rcx
movq %r14, (%rcx,%rax,8)
incl %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: newDelay
delay *
newDelay(int delta)
    {
    int i;
    delay *d = New(sizeof(delay));
    d->index = 0;
    d->length = delta;
    d->store = New(sizeof(int) * delta);
    for (i = 0; i < delta; ++i) d->store[i] = 0;
    return d;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r14d
movl $0x10, %edi
callq 0x6cb5
movq %rax, %rbx
movl $0x0, (%rax)
movl %r14d, 0x4(%rax)
leal (,%r14,4), %edi
callq 0x6cb5
movq %rax, 0x8(%rbx)
testl %r14d, %r14d
jle 0x84c9
movl %r14d, %edx
shlq $0x2, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2130
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: updateDelay
int
updateDelay(delay *d,int in)
    {
    int old = getDelay(d);
    //printf("setting %d at index %d\n",in,d->index);
    d->store[d->index] = in;
    d->index = (d->index + 1) % d->length;
    return old;
    }

// Assembly:
movslq (%rdi), %r8
leal 0x1(%r8), %eax
cltd
idivl 0x4(%rdi)
movq 0x8(%rdi), %rax
movslq %edx, %rcx
movl (%rax,%rcx,4), %ecx
movl %esi, (%rax,%r8,4)
movl (%rdi), %eax
incl %eax
cltd
idivl 0x4(%rdi)
movl %edx, (%rdi)
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: getVarDelay
int
getVarDelay(delay *d,double back)
    {
    //printf("length is %d, back is %f\n",d->length,back);
    int hi = (int) back;
    int lo = hi + 1;
    int vhi = d->store[(d->index + (d->length - hi)) % d->length];
    int vlo = d->store[(d->index + (d->length - lo)) % d->length];
    //printf("lo is %d (value is %d), vhi is %d (value is %d)\n",
    //   lo,vlo,hi,vhi);
    //getchar();
    return (int)(vlo + (lo - back) * (vhi - vlo));
    }

// Assembly:
cvttsd2si %xmm0, %esi
leal 0x1(%rsi), %r8d
movq 0x8(%rdi), %r9
movl (%rdi), %ecx
movl 0x4(%rdi), %edi
movl %ecx, %eax
subl %esi, %eax
addl %edi, %eax
cltd
idivl %edi
movslq %edx, %rax
movl (%r9,%rax,4), %r10d
notl %esi
addl %edi, %ecx
addl %esi, %ecx
movl %ecx, %eax
cltd
idivl %edi
movslq %edx, %rax
movl (%r9,%rax,4), %eax
cvtsi2sd %eax, %xmm1
cvtsi2sd %r8d, %xmm2
subsd %xmm0, %xmm2
subl %eax, %r10d
xorps %xmm0, %xmm0
cvtsi2sd %r10d, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: newFOF
fof *
newFOF(double freq,int style)
    {
    double theta,gamma;
    fof *f;
    
    f = New(sizeof(fof));

    f->freq = freq;
    theta = 2 * M_PI * freq / SampleRate;
    if (style == LOWPASS)
        {
        gamma = 2 - cos(theta);
        f->b1 = pow(gamma * gamma - 1,0.5) - gamma;
        f->a0 = 1 + f->b1;
        }
    else
        {
        gamma = 2 + cos(theta);
        f->b1 = gamma - pow(gamma * gamma - 1,0.5);
        f->a0 = 1 - f->b1;
        }
    f->sdelay = newDelay(1);
    return f;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebp
movsd %xmm0, 0x8(%rsp)
movl $0x20, %edi
callq 0x6cb5
movq %rax, %rbx
movsd 0x8(%rsp), %xmm1
movsd %xmm1, (%rax)
mulsd 0x21c4(%rip), %xmm1     # 0xa758
leaq 0x6e95(%rip), %rax      # 0xf430
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x2170
testl %ebp, %ebp
je 0x85f7
addsd 0x259d(%rip), %xmm0     # 0xab58
movsd %xmm0, 0x8(%rsp)
mulsd %xmm0, %xmm0
addsd 0x1ce3(%rip), %xmm0     # 0xa2b0
movsd 0x1c93(%rip), %xmm1     # 0xa268
callq 0x20b0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rbx)
movsd 0x1c6f(%rip), %xmm0     # 0xa260
subsd %xmm1, %xmm0
jmp 0x8639
movsd 0x2559(%rip), %xmm1     # 0xab58
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movapd %xmm1, %xmm0
mulsd %xmm1, %xmm0
addsd 0x1c97(%rip), %xmm0     # 0xa2b0
movsd 0x1c47(%rip), %xmm1     # 0xa268
callq 0x20b0
subsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rbx)
addsd 0x1c27(%rip), %xmm0     # 0xa260
movsd %xmm0, 0x8(%rbx)
movl $0x10, %edi
callq 0x6cb5
movq %rax, %r14
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, (%r14)
movl $0x4, %edi
callq 0x6cb5
movq %rax, 0x8(%r14)
movl $0x0, (%rax)
movq %r14, 0x18(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: newBiquad
biquad *
newBiquad(double a0,double a1,double a2,double b1,double b2)
    {
    biquad *f = New(sizeof(biquad));
    f->a0 = a0;
    f->a1 = a1;
    f->a2 = a2;
    f->b1 = b1;
    f->b2 = b2;
    f->ldelay = newDelay(2);
    f->rdelay = newDelay(2);
    return f;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm4, 0x20(%rsp)
movsd %xmm3, 0x18(%rsp)
movsd %xmm2, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movl $0x38, %edi
callq 0x6cb5
movq %rax, %rbx
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rax)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x20(%rax)
movl $0x10, %edi
callq 0x6cb5
movq %rax, %r14
movabsq $0x200000000, %r15      # imm = 0x200000000
movq %r15, (%rax)
movl $0x8, %edi
callq 0x6cb5
movq %rax, 0x8(%r14)
xorl %r12d, %r12d
movq %r12, (%rax)
movq %r14, 0x28(%rbx)
movl $0x10, %edi
callq 0x6cb5
movq %rax, %r14
movq %r15, (%rax)
movl $0x8, %edi
callq 0x6cb5
movq %rax, 0x8(%r14)
movq %r12, (%rax)
movq %r14, 0x30(%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: getBiquad
int
getBiquad(biquad *f,int in)
    {
    double result;
    //printf("getting %d from ldelay\n",getVarDelay(f->ldelay,1));
    //printf("getting %d from ldelay\n",getVarDelay(f->ldelay,2));
    //printf("getting %d from rdelay\n",getVarDelay(f->rdelay,1));
    //printf("getting %d from rdelay\n",getVarDelay(f->rdelay,2));
    //result = f->a0 * in;
    //printf("result is %f\n",result);
    //printf("%f\n",f->a1 * getVarDelay(f->ldelay,1));
    //result += f->a1 * getVarDelay(f->ldelay,1);
    //printf("result is %f\n",result);
    //printf("%f\n",f->a2 * getVarDelay(f->ldelay,2));
    //result += f->a2 * getVarDelay(f->ldelay,2);
    //printf("result is %f\n",result);
    //printf("-%f\n",f->b1 * getVarDelay(f->rdelay,1));
    //result -= f->b1 * getVarDelay(f->rdelay,1);
    //printf("result is %f\n",result);
    //printf("-%f\n",f->b2 * getVarDelay(f->rdelay,2));
    //result -= f->b2 * getVarDelay(f->rdelay,2);
    //printf("result is %f\n",result);
    result = f->a0 * in
         + f->a1 * getVarDelay(f->ldelay,1)
         + f->a2 * getVarDelay(f->ldelay,2)
         - f->b1 * getVarDelay(f->rdelay,1)
         - f->b2 * getVarDelay(f->rdelay,2)
         ;
    //printf("result is %f\n",result);
    return (int) result;
    }

// Assembly:
cvtsi2sd %esi, %xmm0
movq 0x28(%rdi), %rax
movq 0x30(%rdi), %rcx
movq 0x8(%rax), %rsi
movl (%rax), %r8d
movl 0x4(%rax), %r9d
leal (%r9,%r8), %eax
decl %eax
cltd
idivl %r9d
movslq %edx, %rax
cvtsi2sdl (%rsi,%rax,4), %xmm2
mulsd 0x8(%rdi), %xmm2
mulsd (%rdi), %xmm0
leal (%r9,%r8), %eax
addl $-0x2, %eax
cltd
idivl %r9d
movslq %edx, %rax
cvtsi2sdl (%rsi,%rax,4), %xmm1
addsd %xmm2, %xmm0
mulsd 0x10(%rdi), %xmm1
movq 0x8(%rcx), %rsi
movl (%rcx), %r8d
movl 0x4(%rcx), %ecx
leal (%rcx,%r8), %eax
decl %eax
cltd
idivl %ecx
movslq %edx, %rax
xorps %xmm2, %xmm2
cvtsi2sdl (%rsi,%rax,4), %xmm2
mulsd 0x18(%rdi), %xmm2
addsd %xmm0, %xmm1
subsd %xmm2, %xmm1
leal (%rcx,%r8), %eax
addl $-0x2, %eax
cltd
idivl %ecx
movslq %edx, %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rsi,%rax,4), %xmm0
mulsd 0x20(%rdi), %xmm0
subsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: updateBiquad
int
updateBiquad(biquad *f,int in)
    {
    int out = getBiquad(f,in);
    //printf("in is %d\n",in);
    //printf("out is %d\n",out);
    //printf("pushing %d to ldelay\n",in);
    updateDelay(f->ldelay,in);
    //printf("pushing %d to rdelay\n",out);
    updateDelay(f->rdelay,out);
    //getchar();
    return out;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x87bd
movl %eax, %ecx
movq 0x28(%r14), %rsi
movslq (%rsi), %rax
movq 0x8(%rsi), %rdx
movl %ebx, (%rdx,%rax,4)
movl (%rsi), %eax
incl %eax
cltd
idivl 0x4(%rsi)
movl %edx, (%rsi)
movq 0x30(%r14), %rsi
movslq (%rsi), %rax
movq 0x8(%rsi), %rdx
movl %ecx, (%rdx,%rax,4)
movl (%rsi), %eax
incl %eax
cltd
idivl 0x4(%rsi)
movl %edx, (%rsi)
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: newModBiquad
modbiquad *
newModBiquad(double a0,double a1,double a2,double b1,double b2,double wet,double dry)
    {
    modbiquad *f = New(sizeof(modbiquad));

    f->bq = newBiquad(a0,a1,a2,b1,b2);
    f->wet = wet;
    f->dry = dry;
    return f;
    }

// Assembly:
pushq %rbx
subq $0x40, %rsp
movsd %xmm6, 0x38(%rsp)
movsd %xmm5, 0x30(%rsp)
movsd %xmm4, 0x28(%rsp)
movsd %xmm3, 0x20(%rsp)
movsd %xmm2, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movl $0x18, %edi
callq 0x6cb5
movq %rax, %rbx
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
movsd 0x20(%rsp), %xmm3
movsd 0x28(%rsp), %xmm4
callq 0x86ed
movq %rax, 0x10(%rbx)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rbx)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x8(%rbx)
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: setModBiquad
int
setModBiquad(modbiquad *f,int in)
    {
    int out = getModBiquad(f,in);
    //printf("in is %d\n",in);
    //printf("out is %d\n",out);
    //printf("pushing %d to ldelay\n",in);
    updateBiquad(f->bq,in);
    //getchar();
    return out;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
cvtsi2sd %esi, %xmm0
movsd (%rdi), %xmm1
movsd %xmm1, 0x8(%rsp)
movq 0x10(%rdi), %r14
mulsd 0x8(%rdi), %xmm0
movsd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x87bd
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x8(%rsp), %xmm0
addsd (%rsp), %xmm0
cvttsd2si %xmm0, %ebp
movq %r14, %rdi
movl %ebx, %esi
callq 0x8859
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: newDDL
ddl *
newDDL(int length,double wet,double fb)
    {
    ddl *d = New(sizeof(ddl));
    d->fb = fb > 1? 1 : (fb < 0? 0: fb);
    d->wet = wet > 1? 1 : (wet < 0? 0: wet);
    d->dry = 1 - wet;
    d->length = length;
    d->sdelay = newDelay(length);
    return d;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
movl %edi, %ebx
movl $0x28, %edi
callq 0x6cb5
movq %rax, %r14
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movsd 0x8(%rsp), %xmm4
maxsd %xmm4, %xmm1
movsd 0x1862(%rip), %xmm2     # 0xa260
movapd %xmm2, %xmm3
cmpltsd %xmm4, %xmm3
movapd %xmm3, %xmm4
andnpd %xmm1, %xmm4
andpd %xmm2, %xmm3
orpd %xmm4, %xmm3
movlpd %xmm3, 0x10(%rax)
movsd 0x10(%rsp), %xmm3
maxsd %xmm3, %xmm0
movapd %xmm2, %xmm1
cmpltsd %xmm3, %xmm1
movapd %xmm3, %xmm4
movapd %xmm1, %xmm3
andnpd %xmm0, %xmm3
andpd %xmm2, %xmm1
orpd %xmm3, %xmm1
movlpd %xmm1, (%rax)
subsd %xmm4, %xmm2
movsd %xmm2, 0x8(%rax)
movl %ebx, 0x18(%rax)
movl %ebx, %edi
callq 0x8484
movq %rax, 0x20(%r14)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: newLFO
lfo *
newLFO(double freq)
    {
    lfo *o = New(sizeof(lfo));
    o->start = 0;
    o->freq = freq;
    o->step = 2 * M_PI / (SampleRate / freq);
    return o;
    }

// Assembly:
pushq %rax
movsd %xmm0, (%rsp)
movl $0x18, %edi
callq 0x6cb5
movq $0x0, 0x8(%rax)
movsd (%rsp), %xmm1
movsd %xmm1, (%rax)
leaq 0x690a(%rip), %rcx      # 0xf430
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx), %xmm0
divsd %xmm1, %xmm0
movsd 0x1c1f(%rip), %xmm1     # 0xa758
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: newMDE
mde *
newMDE(double wet,double fb,int dsamples,double freq,int lo,int hi)
    {
    mde *m = New(sizeof(mde));
    m->dry = 1 - wet;
    m->wet = wet;
    m->fb = fb;
    m->sdelay = newDelay(dsamples);
    m->osc = newLFO(freq);
    m->lo = lo;
    m->hi = hi;
    return m;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movl %esi, %ebp
movsd %xmm2, 0x10(%rsp)
movl %edi, %r15d
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movl $0x30, %edi
callq 0x6cb5
movq %rax, %r14
movsd 0x16bc(%rip), %xmm0     # 0xa260
movsd (%rsp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rax)
movsd %xmm1, 0x18(%rax)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x20(%rax)
movl %r15d, %edi
callq 0x8484
movq %rax, (%r14)
movl $0x18, %edi
callq 0x6cb5
movq $0x0, 0x8(%rax)
movsd 0x10(%rsp), %xmm1
movsd %xmm1, (%rax)
leaq 0x6840(%rip), %rcx      # 0xf430
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx), %xmm0
divsd %xmm1, %xmm0
movsd 0x1b55(%rip), %xmm1     # 0xa758
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rax)
movq %rax, 0x8(%r14)
movl %ebp, 0x28(%r14)
movl %ebx, 0x2c(%r14)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: updateMDE
int
updateMDE(mde *m,int in)
    {
    int out = getMDE(m,in);
    int recirc = getMDEDelay(m);
    
    updateLFO(m->osc);
    updateDelay(m->sdelay,in + m->fb * recirc);

    return out;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x8c26
movl %eax, %ebx
movq 0x8(%r14), %rax
movsd 0x8(%rax), %xmm0
callq 0x2290
movl 0x28(%r14), %eax
movl 0x2c(%r14), %ecx
leal (%rcx,%rax), %edx
cvtsi2sd %edx, %xmm1
subl %eax, %ecx
cvtsi2sd %ecx, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
mulsd 0x1582(%rip), %xmm0     # 0xa268
movq (%r14), %rdi
callq 0x850d
movl %eax, %r15d
movq 0x8(%r14), %r12
movsd 0x8(%r12), %xmm0
callq 0x2290
movsd 0x10(%r12), %xmm0
addsd 0x8(%r12), %xmm0
movsd %xmm0, 0x8(%r12)
movq (%r14), %rcx
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
mulsd 0x20(%r14), %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
movslq (%rcx), %rdx
movq 0x8(%rcx), %rsi
movl %eax, (%rsi,%rdx,4)
movl (%rcx), %eax
incl %eax
cltd
idivl 0x4(%rcx)
movl %edx, (%rcx)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: newCombF
combf *
newCombF(int samplesDelayed,double fb)
    {
    combf *c = New(sizeof(combf));
    c->sdelay = newDelay(samplesDelayed);
    c->fb = fb;
    c->length = samplesDelayed;
    return c;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movl %edi, %ebx
movl $0x18, %edi
callq 0x6cb5
movq %rax, %r14
movl %ebx, %edi
callq 0x8484
movq %rax, 0x10(%r14)
movsd (%rsp), %xmm0
movsd %xmm0, (%r14)
movl %ebx, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: newLPC
lpc *
newLPC(int samplesDelayed,double gc,double glp)
    {
    lpc *f = New(sizeof(lpc));
    f->idelay = newDelay(samplesDelayed+1);
    f->odelay = newDelay(samplesDelayed);
    f->gc = gc;
    f->glp = glp;
    f->length = samplesDelayed;
    return f;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movl %edi, %ebx
movl $0x30, %edi
callq 0x6cb5
movq %rax, %r14
leal 0x1(%rbx), %edi
callq 0x8484
movq %rax, 0x10(%r14)
movl %ebx, %edi
callq 0x8484
movq %rax, 0x18(%r14)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x20(%r14)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x28(%r14)
movl %ebx, 0x8(%r14)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: getLPC
int 
getLPC(lpc *f,int in)
    {
    return getVarDelay(f->idelay,f->length)
        - f->glp * getDelay(f->idelay)
        + f->glp * getVarDelay(f->odelay,1)
        + f->gc  * getDelay(f->odelay)
        ;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
cvtsi2sdl 0x8(%rdi), %xmm0
movq %r14, %rdi
callq 0x850d
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x28(%rbx), %xmm1
movl (%r14), %eax
incl %eax
cltd
idivl 0x4(%r14)
movq 0x8(%r14), %rax
movslq %edx, %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm2
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm0
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rsi
movl (%rax), %ecx
movl 0x4(%rax), %edi
leal (%rdi,%rcx), %eax
decl %eax
cltd
idivl %edi
movslq %edx, %rax
xorps %xmm2, %xmm2
cvtsi2sdl (%rsi,%rax,4), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
incl %ecx
movl %ecx, %eax
cltd
idivl %edi
movslq %edx, %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rsi,%rax,4), %xmm0
mulsd 0x20(%rbx), %xmm0
addsd %xmm2, %xmm0
cvttsd2si %xmm0, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: updateLPC
int
updateLPC(lpc *f,int in)
    {
    int out = getLPC(f,in);
    updateDelay(f->idelay,in);
    updateDelay(f->odelay,out);
    return out;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x8e56
movl %eax, %ecx
movq 0x10(%r14), %rsi
movslq (%rsi), %rax
movq 0x8(%rsi), %rdx
movl %ebx, (%rdx,%rax,4)
movl (%rsi), %eax
incl %eax
cltd
idivl 0x4(%rsi)
movl %edx, (%rsi)
movq 0x18(%r14), %rsi
movslq (%rsi), %rax
movq 0x8(%rsi), %rdx
movl %ecx, (%rdx,%rax,4)
movl (%rsi), %eax
incl %eax
cltd
idivl 0x4(%rsi)
movl %edx, (%rsi)
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/filters.c
// Function: newDAP
dap *
newDAP(int samplesDelayed,double g)
    {
    dap *f = New(sizeof(dap));
    f->xdelay = newDelay(samplesDelayed);
    f->ydelay = newDelay(samplesDelayed);
    f->g = g;
    f->length = samplesDelayed;
    return f;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movl %edi, %ebx
movl $0x28, %edi
callq 0x6cb5
movq %rax, %r14
movl %ebx, %edi
callq 0x8484
movq %rax, 0x10(%r14)
movl %ebx, %edi
callq 0x8484
movq %rax, 0x18(%r14)
movsd (%rsp), %xmm0
movsd %xmm0, 0x20(%r14)
movl %ebx, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/include/labelQueue.h
// Function: registerLabel
static void registerLabel(jump_t jump) {
    for (uint32_t i = 0; i < labelCount; i++) {
        if (labels[i].length != jump.label.length) {
            continue;
        }
        if (memcmp(labels[i].start, jump.label.start, jump.label.length)) {
            continue;
        }
        fprintf(stderr, "Duplicate label at %s\n", jump.label.start);
        assert(0); // duplicate label
    }
    labelLocations[labelCount] = jump.programCounter;
    dataSizes[labelCount] = jump.dataSize;
    labels[labelCount++] = jump.label;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x4fbd(%rip), %r12d     # 0x7860
testq %r12, %r12
je 0x28e9
leaq 0x40(%rsp), %rax
movq 0x10(%rax), %rbx
movq 0x18(%rax), %r14
movq %r12, %r13
shlq $0x4, %r13
xorl %ebp, %ebp
leaq 0x4fab(%rip), %r15      # 0x7870
cmpq %r14, 0x8(%rbp,%r15)
jne 0x28e0
movq (%rbp,%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2070
testl %eax, %eax
je 0x2929
addq $0x10, %rbp
cmpq %rbp, %r13
jne 0x28c5
leaq 0x40(%rsp), %rdx
movl (%rdx), %eax
leaq 0x8f79(%rip), %rcx      # 0xb870
movl %eax, (%rcx,%r12,4)
leal 0x1(%r12), %eax
movl %eax, 0x4f5a(%rip)      # 0x7860
shlq $0x4, %r12
leaq 0x4f5f(%rip), %rax      # 0x7870
movups 0x10(%rdx), %xmm0
movups %xmm0, (%r12,%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2090
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/include/labelQueue.h
// Function: incrementLabelLocations
static uint32_t firstLabelAfter(uint32_t pc) {
    // inclusive
    uint32_t begin = 0; 
    // exclusive
    uint32_t end = labelCount;
    while (begin < end) {
        uint32_t mid = (begin + end) / 2;
        if (labelLocations[mid] <= pc) {
            begin = mid + 1;
        } else {
            end = mid;
        }
    }
    return begin;
}

// Assembly:
movl 0x4f29(%rip), %eax      # 0x7860
testq %rax, %rax
je 0x296c
xorl %edx, %edx
leaq 0x8f2b(%rip), %rcx      # 0xb870
movl %eax, %r9d
leal (%r9,%rdx), %r10d
shrl %r10d
cmpl %edi, (%rcx,%r10,4)
leal 0x1(%r10), %r8d
cmovbel %r9d, %r10d
cmoval %edx, %r8d
movl %r8d, %edx
movl %r10d, %r9d
cmpl %r10d, %r8d
jb 0x2948
jmp 0x296f
xorl %r8d, %r8d
cmpl %eax, %r8d
jae 0x2997
movl %r8d, %ecx
subq %rcx, %rax
shlq $0x2, %rcx
xorl %edx, %edx
leaq 0x8ee9(%rip), %rdi      # 0xb870
leaq (%rcx,%rdx,4), %r8
addl %esi, (%rdi,%r8)
incq %rdx
cmpq %rdx, %rax
jne 0x2987
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/bgzip.c
// Function: confirm_overwrite
static int confirm_overwrite(const char *fn)
{
    int save_errno = errno;
    int ret = 0;

    if (isatty(STDIN_FILENO)) {
        fprintf(stderr, "[bgzip] %s already exists; do you wish to overwrite (y or n)? ", fn);
        if (ask_yn()) ret = 1;
    }

    errno = save_errno;
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
callq 0x4050
movq %rax, %rbx
movl (%rax), %r12d
xorl %ebp, %ebp
xorl %edi, %edi
callq 0x48f0
testl %eax, %eax
jne 0x7c21
movl %r12d, (%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4d70
movl (%r15), %ebp
jmp 0x7c0f
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/bgzip.c
// Function: setfilespec
static int setfilespec(const char *path, const struct stat *status)
{
    if (!path || !status) {     //invalid
        return -1;
    }
    if (!strcmp(path, "-")) {   //cant get / set for stdin/out, return success
        return 0;
    }

#ifdef _WIN32
    struct _utimbuf tval;
    //time upto sec - access & modification time
    tval.actime = status->st_atime;
    tval.modtime = status->st_mtime;
    if (_utime(path, &tval) < 0) {
        fprintf(stderr, "[bgzip] Failed to set file specifications.\n");
        return -1;
    }
#else
    struct timeval tval[2];
    memset(&tval[0], 0, sizeof(tval));
    //time upto sec - access time
    tval[0].tv_sec = status->st_atime;
    //time upto sec - modification time
    tval[1].tv_sec = status->st_mtime;
    if (utimes(path, &tval[0]) < 0) {
        fprintf(stderr, "[bgzip] Failed to set file specifications.\n");
        return -1;
    }
#endif //_WIN32
    return 0;
}

// Assembly:
testq %rsi, %rsi
je 0x7d73
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8f515(%rip), %rsi     # 0x97247
callq 0x46e0
testl %eax, %eax
je 0x7d79
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq 0x48(%r14), %rax
movq %rax, (%rsi)
movq 0x58(%r14), %rax
movq %rax, 0x10(%rsi)
movq %rbx, %rdi
callq 0x4320
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jns 0x7d7b
callq 0x4dd6
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x7d7b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/nmmmnu[P]HM2/test_hm_dir.c
// Function: main
int main(int argc, char **argv)
{
	if (argc > 2){

		if (argc == 4 && strcmp("find", argv[1]) == 0)
			return find_in_dir(argv[2], argv[3]);

		if (argc == 3 && strcmp("dump", argv[1]) == 0)
			return dump_dir(argv[2]);

		if (argc == 3 && strcmp("list", argv[1]) == 0)
			return list_dir(argv[2]);
	}

	printf("Usage:\n");
	printf("\t%s list [directory] - list files in the database\n", argv[0]);
	printf("\t%s find [directory] [key] - find in the database\n", argv[0]);
	printf("\t%s dump [directory] - dump the database\n", argv[0]);
	printf("\t\tDo not forget about quotes around the directory\n");

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x3, %edi
jl 0x133f
je 0x1311
movl %edi, %ebp
cmpl $0x4, %edi
jne 0x133f
movq 0x8(%rbx), %rsi
leaq 0x1d05(%rip), %rdi      # 0x3004
callq 0x10c0
testl %eax, %eax
je 0x13e8
cmpl $0x3, %ebp
jne 0x133f
movq 0x8(%rbx), %r14
leaq 0x1ced(%rip), %rdi      # 0x3009
movq %r14, %rsi
callq 0x10c0
testl %eax, %eax
je 0x139a
leaq 0x1cdf(%rip), %rdi      # 0x300e
movq %r14, %rsi
callq 0x10c0
testl %eax, %eax
je 0x1412
leaq 0x1d5d(%rip), %rdi      # 0x30a3
callq 0x1040
movq (%rbx), %rsi
leaq 0x1cbe(%rip), %rdi      # 0x3013
xorl %eax, %eax
callq 0x1090
movq (%rbx), %rsi
leaq 0x1ce0(%rip), %rdi      # 0x3046
xorl %eax, %eax
callq 0x1090
movq (%rbx), %rsi
leaq 0x1d02(%rip), %rdi      # 0x3079
xorl %eax, %eax
callq 0x1090
leaq 0x1d25(%rip), %rdi      # 0x30aa
callq 0x1040
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %rdi
callq 0x16a9
movq %rax, %rbx
movq %rax, %rdi
callq 0x175d
movq %rax, %r14
movq %rax, %rdi
callq 0x1785
testq %rax, %rax
je 0x13de
movl $0x1e, %r15d
movq %rax, %rdi
callq 0x1b13
decq %r15
je 0x13de
movq %r14, %rdi
callq 0x17e4
testq %rax, %rax
jne 0x13c4
movq %r14, %rdi
callq 0x1780
jmp 0x1434
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %r14
callq 0x16a9
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1708
testq %rax, %rax
je 0x1428
movq %rax, %rdi
callq 0x1b13
jmp 0x1434
movq 0x10(%rbx), %rdi
callq 0x16a9
movq %rax, %rbx
movq %rax, %rdi
callq 0x18ad
jmp 0x1434
leaq 0x1cad(%rip), %rdi      # 0x30dc
callq 0x1040
movq %rbx, %rdi
callq 0x165a
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
jmp 0x138f
nop
// File: /workspace/github_c_makefile_star2_O1/nmmmnu[P]HM2/hm_glob.c
// Function: hm_glob_open
const char **hm_glob_open(glob_t *globresults, const char *path)
{
	int result = glob(path, 0, NULL, globresults);

	if (result == GLOB_NOMATCH)
		return _hm_glob_emptyresult();

	if (result)
		return NULL;

	// size is at least 1
	size_t size = globresults->gl_pathc;

	const char **files = malloc( (size + 1) * sizeof(char *));
	if (files == NULL)
		return NULL;

	// check if there is something else than file / symlink in the directory
	size_t j = 0;
	size_t i;
	for (i = 0; i < globresults->gl_pathc; ++i){
		const char *filename = globresults->gl_pathv[i];

		if (_hm_glob_check_file( filename ))
			files[j++] = filename;
	}

	files[j] = NULL;

	return files;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %r14
xorl %ebx, %ebx
movq %rsi, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
callq 0x10f0
testl %eax, %eax
je 0x148e
cmpl $0x3, %eax
jne 0x14f6
movl $0x8, %edi
callq 0x1130
movq %rax, %rbx
testq %rax, %rax
jne 0x14ef
jmp 0x14e4
movq (%r14), %rax
leaq 0x8(,%rax,8), %rdi
callq 0x1130
testq %rax, %rax
je 0x14e4
movq %rax, %rbx
cmpq $0x0, (%r14)
je 0x14e8
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
xorl %r13d, %r13d
movq 0x8(%r14), %rax
movq (%rax,%rbp,8), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x1080
testl $0xa000, 0x20(%rsp)     # imm = 0xA000
je 0x14da
movq %r12, (%rbx,%r13,8)
incq %r13
incq %rbp
cmpq (%r14), %rbp
jb 0x14b6
jmp 0x14eb
xorl %ebx, %ebx
jmp 0x14f6
xorl %r13d, %r13d
leaq (%rbx,%r13,8), %rax
movq $0x0, (%rax)
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nmmmnu[P]HM2/hm_glob.c
// Function: hm_glob_size
size_t hm_glob_size(const char **files)
{
	size_t count = 0;
	while(*files){
		++files;
		++count;
	}

	return count;
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x1523
xorl %ecx, %ecx
leaq 0x1(%rcx), %rax
cmpq $0x0, 0x8(%rdi,%rcx,8)
movq %rax, %rcx
jne 0x1513
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/nmmmnu[P]HM2/hm_dir.c
// Function: hm_dir_open
hm_dir_t *hm_dir_open(hm_dir_t *dir, const char *path)
{
	dir->path = path;

	glob_t globresults;

	const char **files = hm_glob_open(& globresults, dir->path);

	if (files == NULL)
		return NULL;

	size_t count = hm_glob_size(files);

	if (count == 0){
		hm_glob_close(& globresults, files);

		dir->count = 0;
		dir->files = NULL;

		// success
		return dir;
	}

	// dir->count is at least 1

	dir->files = malloc(count * sizeof(hm_disktable_t));
	if (dir->files == NULL){
		hm_glob_close(& globresults, files);

		return NULL;
	}

	dir->count = 0;

	size_t i;
	for(i = 0; i < count; ++i){
		const char *filename = files[i];
		// open the file
		hm_disktable_t *file = hm_disktable_open( & dir->files[i], filename);

		if (file == NULL){
			// this is really problematic...
			// some files are open, some are not.
			// close / free everything

			hm_glob_close(& globresults, files);

			// dir->count is not increased,
			// so no reason for this not to work...
			hm_dir_close(dir);

			return NULL;
		}

		// I don't like this,
		// because file->filename is "private property",
		// but it seems to be best way.
		// if fail, will produce NULL, so no checks need
		file->filename = strdup(filename);

		++(dir->count);
	}

	hm_glob_close(& globresults, files);

	return dir;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, (%rsp)
movq %rsi, (%rdi)
leaq 0x10(%rsp), %rdi
callq 0x144c
testq %rax, %rax
je 0x1649
movq %rax, %rbp
movq %rax, %rdi
callq 0x150b
testq %rax, %rax
je 0x1618
movq %rax, %rbx
leaq (,%rax,8), %rax
leaq (%rax,%rax,4), %rdi
callq 0x1130
movq (%rsp), %r14
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x1637
movq $0x0, 0x8(%r14)
xorl %r12d, %r12d
xorl %r15d, %r15d
movq %rbx, 0x8(%rsp)
movq %rbp, %rbx
movq (%rbp,%r15,8), %rbp
movq 0x10(%r14), %rdi
addq %r12, %rdi
movq %rbp, %rsi
callq 0x1b50
movq %rax, %r13
testq %rax, %rax
je 0x15cd
movq %rbp, %rdi
callq 0x1180
movq %rax, (%r13)
incq 0x8(%r14)
jmp 0x15e7
movq %rbx, %rdi
callq 0x1030
leaq 0x10(%rsp), %rdi
callq 0x1060
movq %r14, %rdi
callq 0x165a
movq %rbx, %rbp
testq %r13, %r13
je 0x1649
incq %r15
addq $0x28, %r12
movq 0x8(%rsp), %rbx
cmpq %r15, %rbx
jne 0x159c
movq %rbp, %rdi
callq 0x1030
leaq 0x10(%rsp), %rdi
callq 0x1060
movq (%rsp), %rax
jmp 0x164b
movq %rbp, %rdi
callq 0x1030
leaq 0x10(%rsp), %rdi
callq 0x1060
xorps %xmm0, %xmm0
movq (%rsp), %rax
movups %xmm0, 0x8(%rax)
jmp 0x164b
movq %rbp, %rdi
callq 0x1030
leaq 0x10(%rsp), %rdi
callq 0x1060
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nmmmnu[P]HM2/hm_dir.c
// Function: hm_dir_close
void hm_dir_close(hm_dir_t *dir)
{
	size_t i;
	for(i = 0; i < dir->count; ++i){
		hm_disktable_t *file = & dir->files[i];

		hm_disktable_close(file);

		// cast because file->filename is declared const
		free( (void *) file->filename );
	}

	free(dir->files);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x1695
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %r12
leaq (%r12,%r14), %rdi
callq 0x1c29
movq (%r12,%r14), %rdi
callq 0x1030
incq %r15
addq $0x28, %r14
cmpq 0x8(%rbx), %r15
jb 0x1672
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/nmmmnu[P]HM2/hm_dir.c
// Function: hm_dir_opena
hm_dir_t *hm_dir_opena(const char *path)
{
	hm_dir_t *dir = malloc(sizeof(hm_dir_t));

	if (dir == NULL)
		return NULL;

	if (hm_dir_open(dir, path))
		return dir;

	free(dir);

	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x18, %edi
callq 0x1130
testq %rax, %rax
je 0x16da
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1528
testq %rax, %rax
jne 0x16dc
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nmmmnu[P]HM2/hm_dir.c
// Function: hm_dir_get
const void *hm_dir_get(const hm_dir_t *dir, const char *key)
{
	size_t i;
	for(i = dir->count; i > 0; --i){
		hm_disktable_t *file = & dir->files[i - 1];

		const void *data = hm_disktable_get(file, key);

		if (data)
			return data;

		++file;
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x8(%rdi), %r12
testq %r12, %r12
je 0x174d
movq %rsi, %rbx
movq %rdi, %r15
leaq (%r12,%r12,4), %rax
leaq -0x28(,%rax,8), %r13
movq 0x10(%r15), %rdi
addq %r13, %rdi
movq %rbx, %rsi
callq 0x1c49
testq %rax, %rax
cmovneq %rax, %r14
jne 0x1750
addq $-0x28, %r13
decq %r12
jne 0x172c
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nmmmnu[P]HM2/hm_dir.c
// Function: hm_dir_it_first
const hm_pair_t *hm_dir_it_first(hm_dir_it_t *it)
{
	size_t i;
	for(i = 0; i < it->dir->count; ++i){
		const hm_disktable_t *file = & it->dir->files[i];

		it->p[i].pos  = 0;
		it->p[i].pair = hm_disktable_getat(file, 0);
	}

	return hm_dir_it_next(it);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
cmpq $0x0, 0x8(%rax)
je 0x17d1
leaq 0x10(%rbx), %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%rax), %rdi
addq %r15, %rdi
movq $0x0, -0x8(%r14)
xorl %esi, %esi
callq 0x1ce4
movq %rax, (%r14)
incq %r12
movq (%rbx), %rax
addq $0x10, %r14
addq $0x28, %r15
cmpq 0x8(%rax), %r12
jb 0x17a4
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x17e4
// File: /workspace/github_c_makefile_star2_O1/nmmmnu[P]HM2/hm_dir.c
// Function: hm_dir_it_next
const hm_pair_t *hm_dir_it_next(hm_dir_it_t *it)
{
	const hm_pair_t *pair = NULL;

	size_t i;

	// step 1: find minimal in reverse order to find most recent.
	for(i = it->dir->count; i > 0; --i){
		const hm_pair_t *pair2 = it->p[i - 1].pair;

		// skip pair
		if (pair2 == NULL)
			continue;

		// initialize pair
		if (pair == NULL){
			pair = pair2;
			continue;
		}

		// compare and swap pair
		if (hm_pair_cmppair(pair, pair2) > 0)
			pair = pair2;
	}

	if (pair == NULL)
		return NULL;

	// step 2: increase all duplicates
	for(i = 0; i < it->dir->count; ++i){
		const hm_pair_t *pair2 = it->p[i].pair;

		if (pair2 && hm_pair_cmppair(pair, pair2) == 0){
			const hm_disktable_t *file = & it->dir->files[i];

			it->p[i].pair = hm_disktable_getat(file, ++it->p[i].pos);
		}
	}

	return pair;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rax), %r12
testq %r12, %r12
je 0x183a
movq %r12, %r13
shlq $0x4, %r13
addq %rbx, %r13
xorl %r14d, %r14d
movq (%r13), %r15
testq %r15, %r15
je 0x182c
testq %r14, %r14
je 0x1829
movq %r14, %rdi
movq %r15, %rsi
callq 0x1aa3
testl %eax, %eax
jg 0x1829
movq %r14, %r15
movq %r15, %r14
decq %r12
addq $-0x10, %r13
testq %r12, %r12
jne 0x1809
jmp 0x183d
xorl %r14d, %r14d
testq %r14, %r14
je 0x189d
movq (%rbx), %rax
cmpq $0x0, 0x8(%rax)
je 0x18a0
leaq 0x10(%rbx), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movq (%r15), %rsi
testq %rsi, %rsi
je 0x1887
movq %r14, %rdi
callq 0x1aa3
testl %eax, %eax
jne 0x1887
movq (%rbx), %rax
movq 0x10(%rax), %rdi
addq %r12, %rdi
movq -0x8(%r15), %rsi
incq %rsi
movq %rsi, -0x8(%r15)
callq 0x1ce4
movq %rax, (%r15)
incq %r13
movq (%rbx), %rax
addq $0x28, %r12
addq $0x10, %r15
cmpq 0x8(%rax), %r13
jb 0x1856
jmp 0x18a0
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nmmmnu[P]HM2/hm_dir.c
// Function: hm_dir_printf
void hm_dir_printf(const hm_dir_t *dir)
{
	size_t i;
	for(i = 0; i < dir->count; ++i){
		hm_disktable_t *file = & dir->files[i];

		printf("%5zu : %s\n", i, file->filename);
	}
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x18f9
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1820(%rip), %r14      # 0x30e6
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r12), %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1090
incq %r15
addq $0x28, %r12
cmpq 0x8(%rbx), %r15
jb 0x18cc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop