LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Mikejmoffitt[P]romtools/bscoop/bscoop.c
// Function: main
int main(int argc, char **argv)
{
	if (argc < 5)
	{
		printf("usage: %s in_fname offset bytes out_fname\n", argv[0]);
		return 0;
	}

	const char *in_fname_arg = argv[1];
	const char *offset_arg = argv[2];
	const char *bytes_arg = argv[3];
	const char *out_fname_arg = argv[4];
	const size_t offset = strtoul(offset_arg, NULL, 0);
	const size_t bytes = strtoul(bytes_arg, NULL, 0);
	if (bytes == 0) return 0;

	FILE *fi = fopen(in_fname_arg, "rb");
	if (!fi)
	{
		fprintf(stderr, "Couldn't open %s for reading.\n", in_fname_arg);
		return 1;
	}

	FILE *fo = fopen(out_fname_arg, "wb");
	if (!fo)
	{
		fprintf(stderr, "Couldn't open %s for writing.\n", out_fname_arg);
		fclose(fi);
		return 1;
	}

	fseek(fi, offset, SEEK_SET);
	for (size_t i = 0; i < bytes; i++)
	{
		if (feof(fi)) break;
		fputc(fgetc(fi), fo);
	}

	const size_t bytes_read = ftell(fo);

	if (bytes_read != bytes)
	{
		fprintf(stderr, "Warning: Actual bytes read does not match expectation"
		        "(actual: $%X expected $%x)\n",
		        (int)bytes_read, (int)bytes);
	}
	else
	{
		printf("Copied %d ($%X) bytes to %s.\n",
		       (int)bytes_read, (int)bytes_read, out_fname_arg);
	}

	fclose(fi);
	fclose(fo);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x4, %edi
jg 0x11f2
movq (%rsi), %rsi
leaq 0xe20(%rip), %rdi       # 0x2004
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1040
jmp 0x12ca
movq 0x8(%rsi), %r12
movq 0x10(%rsi), %rdi
movq 0x18(%rsi), %r15
movq 0x20(%rsi), %r14
xorl %ebx, %ebx
xorl %esi, %esi
xorl %edx, %edx
callq 0x10c0
movq %rax, %r13
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10c0
testq %rax, %rax
je 0x12ca
movq %rax, %r15
leaq 0xe00(%rip), %rsi       # 0x202f
movq %r12, %rdi
callq 0x10b0
testq %rax, %rax
je 0x12d6
movq %rax, %rbx
leaq 0xe07(%rip), %rsi       # 0x2051
movq %r14, %rdi
callq 0x10b0
testq %rax, %rax
je 0x12f3
movq %rax, %r12
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x10a0
movq %r15, %r13
subq $0x1, %r13
jb 0x1294
movq %rbx, %rdi
callq 0x1090
testl %eax, %eax
jne 0x1294
movq %rbx, %rdi
callq 0x1050
movl %eax, %edi
movq %r12, %rsi
callq 0x1060
jmp 0x126e
movq %r12, %rdi
callq 0x1080
cmpq %r15, %rax
jne 0x131b
leaq 0xe1c(%rip), %rdi       # 0x20c4
movl %r15d, %esi
movl %r15d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x1040
movq %rbx, %rdi
callq 0x1030
movq %r12, %rdi
callq 0x1030
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x2d1b(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd4b(%rip), %rsi       # 0x2032
movq %r12, %rdx
xorl %eax, %eax
callq 0x1070
jmp 0x1316
movq 0x2cfe(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd50(%rip), %rsi       # 0x2054
movq %r14, %rdx
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
callq 0x1030
pushq $0x1
popq %rbx
jmp 0x12ca
movq 0x2cd6(%rip), %rcx      # 0x3ff8
movq (%rcx), %rdi
leaq 0xd47(%rip), %rsi       # 0x2073
movl %eax, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x1070
jmp 0x12b8
// File: /workspace/github_c_makefile_star2_O2/esheldon[P]xshear/src/source.c
// Function: source_new
Source* source_new(const ShearConfig* config) {
    Source* src = calloc(1,sizeof(Source));
    if (src == NULL) {
        wlog("Could not allocate Source\n");
        exit(EXIT_FAILURE);
    }

    src->shear_style = config->shear_style;
    src->mask_style = config->mask_style;
    src->scstyle = config->scstyle;
    src->sourceid_style = config->sourceid_style;

    if (src->scstyle == SIGMACRIT_STYLE_INTERP) {
        src->scinv = dvector_zeros(config->nzl);

        if (src->scinv == NULL) {
            wlog("Could not allocate %ld scinv for source\n", config->nzl);
            exit(EXIT_FAILURE);
        }
    }

    return src;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rdi
movl $0xc8, %esi
callq 0x2180
testq %rax, %rax
je 0x4db1
movq %rax, %r14
movups 0x18(%rbx), %xmm0
movl 0x20(%rbx), %eax
movups %xmm0, (%r14)
cmpl $0x2, %eax
jne 0x4da6
movq 0x30(%rbx), %rdi
callq 0x461b
movq %rax, 0x58(%r14)
testq %rax, %rax
je 0x4dcf
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x9240(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x4bbe(%rip), %rdi      # 0x9980
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x22a0
jmp 0x4deb
movq 0x9222(%rip), %rax      # 0xdff8
movq (%rax), %rdi
movq 0x30(%rbx), %rdx
leaq 0x4bb7(%rip), %rsi      # 0x999b
xorl %eax, %eax
callq 0x21b0
pushq $0x1
popq %rdi
callq 0x2290
// File: /workspace/github_c_makefile_star2_O2/esheldon[P]xshear/src/source.c
// Function: source_free
Source* source_free(Source* src) {

    if (src != NULL) {

        if (src->scstyle == SIGMACRIT_STYLE_INTERP) {
            if (src->scinv != NULL) {
                vector_free(src->scinv);
            }
        }

        free(src);
    }
    return NULL;
}

// Assembly:
testq %rdi, %rdi
je 0x4e26
pushq %rbx
movq %rdi, %rbx
cmpl $0x2, 0x8(%rdi)
jne 0x4e1d
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x4e1d
movq 0x10(%rax), %rdi
callq 0x2030
movq 0x58(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
callq 0x2030
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/esheldon[P]xshear/src/shear.c
// Function: shear_process_source
void shear_process_source(Shear* self, Source* src) {
    src->hpixid = hpix_eq2pix(self->hpix, src->ra, src->dec);

    int64 hpix_mod = src->hpixid - self->hpix->half_npix;
    TreeNode* node = tree_find(self->lcat->hpix_tree, hpix_mod);

    if (node == NULL) {
        return;
    }

    Lens* lens=NULL;
    Lensum* lensum=NULL;

    vector_foreach(ind, node->indices) {

        lens = &self->lcat->data[*ind];
        lensum = &self->lensums->data[*ind];

        if (lens->z >= self->min_zlens && lens->z <= self->max_zlens) {
            shear_procpair(self, src, lens, lensum);
        }
    }

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
movsd 0x18(%rsi), %xmm0
movsd 0x20(%rsi), %xmm1
callq 0x6900
movq %rax, 0x50(%rbx)
movq 0x10(%r14), %rcx
movq 0x18(%r14), %rdx
subq 0x10(%rcx), %rax
movq 0x10(%rdx), %rdi
movq %rax, %rsi
callq 0x857c
testq %rax, %rax
je 0x6e70
movq 0x8(%rax), %rax
movq (%rax), %r15
movq 0x10(%rax), %r12
shlq $0x3, %r15
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x6e70
movq 0x18(%r14), %rax
movq 0x8(%rax), %rdx
movq (%r12,%r13), %rcx
shlq $0x7, %rcx
movsd 0x18(%rdx,%rcx), %xmm0
ucomisd 0x28(%r14), %xmm0
jb 0x6e6a
movsd 0x30(%r14), %xmm1
ucomisd %xmm0, %xmm1
jb 0x6e6a
movq 0x20(%r14), %rax
addq %rcx, %rdx
addq 0x8(%rax), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6e7a
addq $0x8, %r13
jmp 0x6e25
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/esheldon[P]xshear/src/shear.c
// Function: shear_free
Shear* shear_free(Shear* self) {

    if (self != NULL) {

        self->config   = sconfig_free(self->config);
        self->lcat     = lcat_free(self->lcat);
        self->hpix     = hpix_free(self->hpix);
        self->cosmo    = cosmo_free(self->cosmo);
        self->lensums  = lensums_free(self->lensums);

    }
    free(self);
    return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x74a7
movq (%rbx), %rdi
callq 0x2c69
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
callq 0x5871
movq %rax, 0x18(%rbx)
movq 0x10(%rbx), %rdi
callq 0x6088
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rdi
callq 0x5c94
movq %rax, 0x8(%rbx)
movq 0x20(%rbx), %rdi
callq 0x7f34
movq %rbx, %rdi
callq 0x2030
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/esheldon[P]xshear/src/interp.c
// Function: interplin
double interplin(const dvector* vx, const dvector* vy, double u) {

    // default to last point
    size_t ilo = vx->size-2;
    size_t ihi = vx->size-1;

    for (size_t i=0; i<vx->size; i++) {

        if (vx->data[i] >= u) {
            if (i == 0) {
                ilo = 0;
                ihi = 1;
            } else {
                ilo = i-1;
                ihi = i;
            }
            break;
        }
    }


    double* x=vx->data;
    double* y=vy->data;
    double val;
    val = ( u-x[ilo] )*( y[ihi] - y[ilo] )/( x[ihi] - x[ilo] ) + y[ilo];

    return val;
}

// Assembly:
movq (%rdi), %r8
movq 0x10(%rdi), %rax
leaq -0x2(%r8), %rdx
leaq -0x1(%r8), %rcx
xorl %edi, %edi
cmpq %rdi, %r8
je 0x86bf
movsd (%rax,%rdi,8), %xmm1
ucomisd %xmm0, %xmm1
jae 0x86aa
incq %rdi
jmp 0x8695
cmpq $0x1, %rdi
movq %rdi, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
subq $0x1, %rdi
cmovaeq %rdi, %rdx
movq 0x10(%rsi), %rsi
movsd (%rax,%rdx,8), %xmm2
subsd %xmm2, %xmm0
movsd (%rsi,%rcx,8), %xmm1
movsd (%rsi,%rdx,8), %xmm3
subsd %xmm3, %xmm1
mulsd %xmm0, %xmm1
movsd (%rax,%rcx,8), %xmm0
subsd %xmm2, %xmm0
divsd %xmm0, %xmm1
addsd %xmm3, %xmm1
movapd %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/esheldon[P]xshear/src/xshear.c
// Function: usage_and_exit
void usage_and_exit(void) {
    wlog("usage: \n");
    wlog("   cat source_cat | xshear config_file lens_cat > outfile\n");
    wlog("   cat source_cat1 source_cat2 .. | xshear config_file lens_cat > outfile\n");
    wlog("   cat source_cat | some_filter | xshear config_file lens_cat > outfile\n");
    wlog("   cat source_cat | xshear config_file lens_cat pair_logfile > outfile\n");
    exit(EXIT_FAILURE);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x584d(%rip), %r14      # 0xdff8
movq (%r14), %rcx
leaq 0x1b70(%rip), %rdi      # 0xa325
pushq $0x8
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x22a0
movq (%r14), %rcx
leaq 0x1b61(%rip), %rdi      # 0xa32e
pushq $0x3a
popq %rsi
movq %rbx, %rdx
callq 0x22a0
movq (%r14), %rcx
leaq 0x1b87(%rip), %rdi      # 0xa369
pushq $0x4a
popq %rsi
movq %rbx, %rdx
callq 0x22a0
movq (%r14), %rcx
leaq 0x1bbd(%rip), %rdi      # 0xa3b4
pushq $0x48
popq %rsi
movq %rbx, %rdx
callq 0x22a0
movq (%r14), %rcx
leaq 0x1bf1(%rip), %rdi      # 0xa3fd
pushq $0x47
popq %rsi
movq %rbx, %rdx
callq 0x22a0
pushq $0x1
popq %rdi
callq 0x2290
// File: /workspace/github_c_makefile_star2_O2/esheldon[P]xshear/src/quad.c
// Function: quadeq_get_quadrant
int quadeq_get_quadrant(double pa_degrees)
{
    int quadrant;
    if (pa_degrees < -90.) {
        quadrant=3;
    } else if (pa_degrees < 0.0) {
        quadrant=4;
    } else if (pa_degrees < 90.) {
        quadrant=1;
    } else {
        quadrant=2;
    }

    return quadrant;
}

// Assembly:
movsd 0x1638(%rip), %xmm1     # 0xa500
ucomisd %xmm0, %xmm1
jbe 0x8ed2
pushq $0x3
jmp 0x8ede
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x8ee0
pushq $0x4
popq %rax
retq
movsd 0xfd0(%rip), %xmm1      # 0x9eb8
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setbe %al
incl %eax
retq
// File: /workspace/github_c_makefile_star2_O2/deepika9294[P]Threading-Library/one-one/test/mutex1.c
// Function: thread1
void *thread1(void *arg) {
	while(run == 1) {
		dthread_mutex_lock(&lock);
        c++;
		dthread_mutex_unlock(&lock);

		c1++;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2937(%rip), %rbx      # 0x40f0
cmpq $0x1, 0x28df(%rip)      # 0x40a0
jne 0x17e3
movq %rbx, %rdi
callq 0x15a6
incq 0x28f6(%rip)            # 0x40c8
movq %rbx, %rdi
callq 0x160e
incq 0x28ef(%rip)            # 0x40d0
jmp 0x17b9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deepika9294[P]Threading-Library/one-one/test/mutex1.c
// Function: thread2
void *thread2(void *arg) {
	while(run == 1) {
        dthread_mutex_lock(&lock);
        c++;
		dthread_mutex_unlock(&lock);
		c2++;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x28f7(%rip), %rbx      # 0x40f0
cmpq $0x1, 0x289f(%rip)      # 0x40a0
jne 0x1823
movq %rbx, %rdi
callq 0x15a6
incq 0x28b6(%rip)            # 0x40c8
movq %rbx, %rdi
callq 0x160e
incq 0x28b7(%rip)            # 0x40d8
jmp 0x17f9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deepika9294[P]Threading-Library/one-one/test/mutex1.c
// Function: thread3
void *thread3(void *arg) {
	while(run == 1) {
        dthread_mutex_lock(&lock);
        c++;
		dthread_mutex_unlock(&lock);
		c3++;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x28b7(%rip), %rbx      # 0x40f0
cmpq $0x1, 0x285f(%rip)      # 0x40a0
jne 0x1863
movq %rbx, %rdi
callq 0x15a6
incq 0x2876(%rip)            # 0x40c8
movq %rbx, %rdi
callq 0x160e
incq 0x287f(%rip)            # 0x40e0
jmp 0x1839
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deepika9294[P]Threading-Library/one-one/test/mutex1.c
// Function: thread4
void *thread4(void *arg) {
	while(run == 1) {
        dthread_mutex_lock(&lock);
        c++;
		dthread_mutex_unlock(&lock);
		c4++;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2877(%rip), %rbx      # 0x40f0
cmpq $0x1, 0x281f(%rip)      # 0x40a0
jne 0x18a3
movq %rbx, %rdi
callq 0x15a6
incq 0x2836(%rip)            # 0x40c8
movq %rbx, %rdi
callq 0x160e
incq 0x2847(%rip)            # 0x40e8
jmp 0x1879
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/deepika9294[P]Threading-Library/one-one/test/mutex1.c
// Function: main
int main() {
	dthread_t th1, th2, th3, th4; 
    dthread_init();
	dthread_mutex_init(&lock);
    printf("\n\n--------------------------------MUTEX LOCK TEST ---------------------------------\n\n");
    printf("***** MUTEX TEST : 1 *****\n");

	dthread_create(&th1, thread1, NULL);
	dthread_create(&th2, thread2, NULL);
	dthread_create(&th3, thread3, NULL);
	dthread_create(&th4, thread4, NULL);

	sleep(2);
	run = 0;
	dthread_join(th1, NULL);
	dthread_join(th2, NULL);
	dthread_join(th3, NULL);
	dthread_join(th4, NULL);

	if(c == c1 + c2 + c3 + c4) {
		printf(GREEN "**PASSED**: MUTEX LOCK test for race problem between 4 threads\n" NONE);
	}
	else {
		printf(RED "**FAILED**: MUTEX LOCK test for race problem between 4 threads\n" NONE);
	}
    // printf("\n%ld %ld %ld %ld %ld %ld\n", c, c1+c2+c3+c4 , c1, c2, c3, c4);

	printf("\n");
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
callq 0x121c
leaq 0x2829(%rip), %rdi      # 0x40f0
callq 0x159b
leaq 0x808(%rip), %rdi       # 0x20db
callq 0x1060
leaq 0x851(%rip), %rdi       # 0x2130
callq 0x1060
leaq -0x13f(%rip), %rsi      # 0x17ac
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1302
leaq -0x114(%rip), %rsi      # 0x17ec
leaq -0x38(%rbp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x1302
leaq -0xe9(%rip), %rsi       # 0x182c
leaq -0x30(%rbp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x1302
leaq -0xbe(%rip), %rsi       # 0x186c
leaq -0x28(%rbp), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0x1302
pushq $0x2
popq %rdi
callq 0x1110
andq $0x0, 0x2758(%rip)      # 0x40a0
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x1477
movq (%r14), %rdi
xorl %esi, %esi
callq 0x1477
movq (%r15), %rdi
xorl %esi, %esi
callq 0x1477
movq (%r12), %rdi
xorl %esi, %esi
callq 0x1477
movq 0x2760(%rip), %rax      # 0x40d8
addq 0x2751(%rip), %rax      # 0x40d0
addq 0x275a(%rip), %rax      # 0x40e0
addq 0x275b(%rip), %rax      # 0x40e8
cmpq %rax, 0x2734(%rip)      # 0x40c8
leaq 0x6a6(%rip), %rax       # 0x2041
leaq 0x6ec(%rip), %rdi       # 0x208e
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x10a0
pushq $0xa
popq %rdi
callq 0x1040
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rsa9000[P]regfanalysistools/regftree.c
// Function: regf_parse_lst
static int regf_parse_lst(const char *pref, unsigned off, int have_vals)
{
	const struct regf_cell *rc = st.data + off;
	const struct regf_lst *lst = (void *)rc->data;

	if (regf_cell_check_len(st.data, off, "lst", sizeof(*lst)))
		return -1;

	if (strncmp(lst->sign, "lf", 2) == 0) {
		return regf_parse_lst_lf(pref, off, have_vals);
	} else if (strncmp(lst->sign, "lh", 2) == 0) {
		return regf_parse_lst_lh(pref, off, have_vals);
	} else if (strncmp(lst->sign, "li", 2) == 0) {
		return regf_parse_lst_li(pref, off, have_vals);
	} else if (strncmp(lst->sign, "ri", 2) == 0) {
		return regf_parse_lst_ri(pref, off, have_vals);
	} else {
		PR_ERR(off, "lst", "unexpected list signature\n");
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movq 0x456e(%rip), %r12      # 0x6110
leaq 0x1d61(%rip), %rdx      # 0x390a
pushq $0x4
popq %rcx
movq %r12, %rdi
callq 0x2dfe
pushq $-0x1
popq %r15
testl %eax, %eax
jne 0x1cd4
movl %ebx, %r13d
movzbl 0x4(%r12,%r13), %eax
cmpl $0x72, %eax
je 0x1bfd
cmpl $0x6c, %eax
jne 0x1cbd
cmpb $0x66, 0x5(%r12,%r13)
jne 0x1c79
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1e4c
cmpb $0x69, 0x5(%r12,%r13)
jne 0x1cbd
addq 0x4500(%rip), %r13      # 0x6110
xorl %r12d, %r12d
xorl %r15d, %r15d
movzwl 0x6(%r13), %eax
cmpq %rax, %r12
jae 0x1cd4
movl 0x8(%r13,%r12,4), %edi
callq 0x1879
leaq 0x195f(%rip), %rdi      # 0x3594
testq %rax, %rax
je 0x1c5b
incl 0x24(%rax)
orb $0x10, 0x28(%rax)
movl 0x8(%r13,%r12,4), %esi
movq %r14, %rdi
movl %ebp, %edx
callq 0x1b89
leaq 0x1973(%rip), %rdi      # 0x35ca
testl %eax, %eax
je 0x1c74
movl 0x8(%r13,%r12,4), %ecx
movl %ebx, %esi
leaq 0x187a(%rip), %rdx      # 0x34e3
xorl %eax, %eax
callq 0x2c88
pushq $-0x1
popq %r15
incq %r12
jmp 0x1c16
cmpb $0x68, 0x5(%r12,%r13)
jne 0x1c9b
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1f68
cmpb $0x69, 0x5(%r12,%r13)
jne 0x1cbd
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2098
leaq 0x1822(%rip), %rdi      # 0x34e6
leaq 0x1c3f(%rip), %rdx      # 0x390a
movl %ebx, %esi
xorl %eax, %eax
callq 0x2c88
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rsa9000[P]regfanalysistools/regftree.c
// Function: regf_parse_vlst
static int regf_parse_vlst(const char *pref, unsigned off, unsigned num)
{
#define VLST_PR_WARN(__fmt, ...)	PR_WARN(off, "vlst", __fmt, ##__VA_ARGS__)
	const struct regf_cell *rc = st.data + off;
	const uint32_t *vals = (void *)rc->data;
	size_t pref_len = strlen(pref);
	char __pref[pref_len + 4];
	struct cell *cell;
	unsigned i;
	int res, ret = 0;

	if (regf_cell_check_len(st.data, off, "vlst", num * sizeof(vals[0])))
		return -1;

	for (i = 0; i < num; ++i) {
		cell = cache_cell_find(vals[i]);
		if (!cell) {
			VLST_PR_WARN("could not find value cell 0x%08X\n",
				     vals[i]);
			ret = -1;
			continue;
		}
		cache_cell_updref(cell, CT_VK);
		if (i == num - 1) {
			printf("%s '-", pref);
			snprintf(__pref, sizeof(__pref), "%s   ", pref);
		} else {
			printf("%s +-", pref);
			snprintf(__pref, sizeof(__pref), "%s | ", pref);
		}
		res = regf_parse_vk(__pref, vals[i]);
		if (res) {
			VLST_PR_WARN("could not parse value key in cell 0x%08X\n",
				     vals[i]);
			ret = -1;
			continue;
		}
	}

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movl %esi, %r15d
movq 0x440d(%rip), %r13      # 0x6110
movq %rdi, -0x58(%rbp)
callq 0x1090
movq %rax, %r14
movq %rsp, %r12
addq $0x13, %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movq %rbx, -0x30(%rbp)
leal (,%rbx,4), %ecx
leaq 0x18d4(%rip), %rdx      # 0x3606
movq %r13, -0x38(%rbp)
movq %r13, %rdi
movl %r15d, %esi
callq 0x2dfe
testl %eax, %eax
je 0x1d4d
pushq $-0x1
popq %rax
jmp 0x1e3d
movl %r15d, %eax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rax), %r13
addq $0x4, %r13
addq $0x4, %r14
movq %r14, -0x50(%rbp)
movq -0x30(%rbp), %rcx
leal -0x1(%rcx), %eax
movq %rax, -0x48(%rbp)
movl %ecx, %eax
movq %rax, -0x38(%rbp)
xorl %r14d, %r14d
movl $0x0, -0x30(%rbp)
movl %r15d, -0x3c(%rbp)
cmpq %r14, -0x38(%rbp)
je 0x1e3a
movl (%r13,%r14,4), %edi
callq 0x1879
leaq 0x186d(%rip), %rdi      # 0x360b
testq %rax, %rax
je 0x1e16
incl 0x24(%rax)
orb $0x40, 0x28(%rax)
cmpq %r14, -0x48(%rbp)
leaq 0x1797(%rip), %rdi      # 0x354c
leaq 0x1784(%rip), %rax      # 0x3540
cmoveq %rax, %rdi
leaq 0x178b(%rip), %r15      # 0x3552
leaq 0x1778(%rip), %rax      # 0x3546
cmoveq %rax, %r15
movq %r12, %rbx
movq -0x58(%rbp), %r12
movq %r12, %rsi
xorl %eax, %eax
callq 0x10b0
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
movq %r15, %rdx
movl -0x3c(%rbp), %r15d
movq %r12, %rcx
movq %rbx, %r12
xorl %eax, %eax
callq 0x10d0
movl (%r13,%r14,4), %esi
movq %rbx, %rdi
callq 0x21c8
leaq 0x182b(%rip), %rdi      # 0x363d
testl %eax, %eax
je 0x1e32
movl (%r13,%r14,4), %ecx
movl %r15d, %esi
leaq 0x17e1(%rip), %rdx      # 0x3606
xorl %eax, %eax
callq 0x2c88
pushq $-0x1
popq %rax
movl %eax, -0x30(%rbp)
incq %r14
jmp 0x1d83
movl -0x30(%rbp), %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rsa9000[P]regfanalysistools/regftree.c
// Function: regf_parse_lst_lf
static int regf_parse_lst_lf(const char *pref, unsigned off, int have_vals)
{
#define LF_PR_WARN(__fmt, ...)	PR_WARN(off, "lf", __fmt, ##__VA_ARGS__)
	const struct regf_cell *rc = st.data + off;
	const struct regf_lst *lst = (void *)rc->data;
	const struct regf_lf_elem *elems = (void *)lst->data;
	size_t pref_len = strlen(pref);
	char __pref[pref_len + 4];
	struct cell *cell;
	int i, res, ret = 0;

	for (i = 0; i < lst->nelem; ++i) {
		cell = cache_cell_find(elems[i].off);
		if (!cell) {
			LF_PR_WARN("could not find key cell 0x%08X\n",
				   elems[i].off);
			ret = -1;
			continue;
		}
		cache_cell_updref(cell, CT_NK);
		if (i == lst->nelem - 1 && !have_vals) {
			printf("%s '-", pref);
			snprintf(__pref, sizeof(__pref), "%s   ", pref);
		} else {
			printf("%s +-", pref);
			snprintf(__pref, sizeof(__pref), "%s | ", pref);
		}
		res = regf_parse_nk(__pref, elems[i].off);
		if (res) {
			LF_PR_WARN("could not parse subkey in cell 0x%08X\n",
				   elems[i].off);
			ret = -1;
			continue;
		}
	}

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x30(%rbp)
movq %rdi, %r15
movl %esi, -0x34(%rbp)
movl %esi, %r14d
addq 0x42a0(%rip), %r14      # 0x6110
callq 0x1090
leaq 0x4(%rax), %rcx
movq %rcx, -0x40(%rbp)
movq %rsp, %r13
addq $0x13, %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
xorl %ebx, %ebx
movl $0x0, -0x2c(%rbp)
movzwl 0x6(%r14), %eax
cmpq %rax, %rbx
jae 0x1f56
movl 0x8(%r14,%rbx,8), %edi
callq 0x1879
leaq 0x165a(%rip), %rdi      # 0x3510
testq %rax, %rax
je 0x1f32
cmpl $0x0, -0x30(%rbp)
setne %cl
incl 0x24(%rax)
orb $0x2, 0x28(%rax)
movzwl 0x6(%r14), %eax
decl %eax
cmpq %rax, %rbx
setne %al
orb %cl, %al
leaq 0x1661(%rip), %rdi      # 0x3540
leaq 0x1666(%rip), %rax      # 0x354c
cmovneq %rax, %rdi
leaq 0x1655(%rip), %r12      # 0x3546
leaq 0x165a(%rip), %rax      # 0x3552
cmovneq %rax, %r12
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
movq %r13, %rdi
movq -0x40(%rbp), %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x10d0
movl 0x8(%r14,%rbx,8), %esi
movq %r13, %rdi
callq 0x189a
leaq 0x162a(%rip), %rdi      # 0x3558
testl %eax, %eax
je 0x1f4e
movl 0x8(%r14,%rbx,8), %ecx
movl -0x34(%rbp), %esi
leaq 0x1599(%rip), %rdx      # 0x34da
xorl %eax, %eax
callq 0x2c88
pushq $-0x1
popq %rax
movl %eax, -0x2c(%rbp)
incq %rbx
jmp 0x1e97
movl -0x2c(%rbp), %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rsa9000[P]regfanalysistools/regftree.c
// Function: regf_parse_lst_lh
static int regf_parse_lst_lh(const char *pref, unsigned off, int have_vals)
{
#define LH_PR_WARN(__fmt, ...)	PR_WARN(off, "lh", __fmt, ##__VA_ARGS__)
	const struct regf_cell *rc = st.data + off;
	const struct regf_lst *lst = (void *)rc->data;
	const struct regf_lh_elem *elems = (void *)lst->data;
	size_t pref_len = strlen(pref);
	char __pref[pref_len + 4];
	struct cell *cell;
	int i, res, ret = 0;

	snprintf(__pref, sizeof(__pref), "%s  ", pref);

	for (i = 0; i < lst->nelem; ++i) {
		cell = cache_cell_find(elems[i].off);
		if (!cell) {
			LH_PR_WARN("could not find key cell 0x%08X\n",
				   elems[i].off);
			ret = -1;
			continue;
		}
		cache_cell_updref(cell, CT_NK);
		if (i == lst->nelem - 1 && !have_vals) {
			printf("%s '-", pref);
			snprintf(__pref, sizeof(__pref), "%s   ", pref);
		} else {
			printf("%s +-", pref);
			snprintf(__pref, sizeof(__pref), "%s | ", pref);
		}
		res = regf_parse_nk(__pref, elems[i].off);
		if (res) {
			LH_PR_WARN("could not parse subkey in cell 0x%08X\n",
				   elems[i].off);
			ret = -1;
			continue;
		}
	}

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x30(%rbp)
movq %rdi, %r15
movl %esi, -0x34(%rbp)
movl %esi, %r14d
addq 0x4184(%rip), %r14      # 0x6110
callq 0x1090
leaq 0x4(%rax), %rsi
movq %rsp, %r13
addq $0x13, %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
leaq 0x15e2(%rip), %rdx      # 0x358f
movq %r13, %rdi
movq %rsi, -0x40(%rbp)
movq %r15, %rcx
xorl %eax, %eax
callq 0x10d0
xorl %ebx, %ebx
movl $0x0, -0x2c(%rbp)
movzwl 0x6(%r14), %eax
cmpq %rax, %rbx
jae 0x2086
movl 0x8(%r14,%rbx,8), %edi
callq 0x1879
leaq 0x152a(%rip), %rdi      # 0x3510
testq %rax, %rax
je 0x2062
cmpl $0x0, -0x30(%rbp)
setne %cl
incl 0x24(%rax)
orb $0x2, 0x28(%rax)
movzwl 0x6(%r14), %eax
decl %eax
cmpq %rax, %rbx
setne %al
orb %cl, %al
leaq 0x1531(%rip), %rdi      # 0x3540
leaq 0x1536(%rip), %rax      # 0x354c
cmovneq %rax, %rdi
leaq 0x1525(%rip), %r12      # 0x3546
leaq 0x152a(%rip), %rax      # 0x3552
cmovneq %rax, %r12
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
movq %r13, %rdi
movq -0x40(%rbp), %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x10d0
movl 0x8(%r14,%rbx,8), %esi
movq %r13, %rdi
callq 0x189a
leaq 0x14fa(%rip), %rdi      # 0x3558
testl %eax, %eax
je 0x207e
movl 0x8(%r14,%rbx,8), %ecx
movl -0x34(%rbp), %esi
leaq 0x146c(%rip), %rdx      # 0x34dd
xorl %eax, %eax
callq 0x2c88
pushq $-0x1
popq %rax
movl %eax, -0x2c(%rbp)
incq %rbx
jmp 0x1fc7
movl -0x2c(%rbp), %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rsa9000[P]regfanalysistools/regftree.c
// Function: regf_parse_lst_li
static int regf_parse_lst_li(const char *pref, unsigned off, int have_vals)
{
#define LI_PR_WARN(__fmt, ...)	PR_WARN(off, "li", __fmt, ##__VA_ARGS__)
	const struct regf_cell *rc = st.data + off;
	const struct regf_lst *lst = (void *)rc->data;
	const struct regf_li_elem *elems = (void *)lst->data;
	size_t pref_len = strlen(pref);
	char __pref[pref_len + 4];
	struct cell *cell;
	int i, res, ret = 0;

	snprintf(__pref, sizeof(__pref), "%s  ", pref);

	for (i = 0; i < lst->nelem; ++i) {
		cell = cache_cell_find(elems[i].off);
		if (!cell) {
			LI_PR_WARN("could not find key cell 0x%08X\n",
				   elems[i].off);
			ret = -1;
			continue;
		}
		cache_cell_updref(cell, CT_NK);
		if (i == lst->nelem - 1 && !have_vals) {
			printf("%s '-", pref);
			snprintf(__pref, sizeof(__pref), "%s   ", pref);
		} else {
			printf("%s +-", pref);
			snprintf(__pref, sizeof(__pref), "%s | ", pref);
		}
		res = regf_parse_nk(__pref, elems[i].off);
		if (res) {
			LI_PR_WARN("could not parse subkey in cell 0x%08X\n",
				   elems[i].off);
			ret = -1;
			continue;
		}
	}

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x30(%rbp)
movq %rdi, %r15
movl %esi, -0x34(%rbp)
movl %esi, %r14d
addq 0x4054(%rip), %r14      # 0x6110
callq 0x1090
leaq 0x4(%rax), %rsi
movq %rsp, %r13
addq $0x13, %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
leaq 0x14b2(%rip), %rdx      # 0x358f
movq %r13, %rdi
movq %rsi, -0x40(%rbp)
movq %r15, %rcx
xorl %eax, %eax
callq 0x10d0
xorl %ebx, %ebx
movl $0x0, -0x2c(%rbp)
movzwl 0x6(%r14), %eax
cmpq %rax, %rbx
jae 0x21b6
movl 0x8(%r14,%rbx,4), %edi
callq 0x1879
leaq 0x13fa(%rip), %rdi      # 0x3510
testq %rax, %rax
je 0x2192
cmpl $0x0, -0x30(%rbp)
setne %cl
incl 0x24(%rax)
orb $0x2, 0x28(%rax)
movzwl 0x6(%r14), %eax
decl %eax
cmpq %rax, %rbx
setne %al
orb %cl, %al
leaq 0x1401(%rip), %rdi      # 0x3540
leaq 0x1406(%rip), %rax      # 0x354c
cmovneq %rax, %rdi
leaq 0x13f5(%rip), %r12      # 0x3546
leaq 0x13fa(%rip), %rax      # 0x3552
cmovneq %rax, %r12
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
movq %r13, %rdi
movq -0x40(%rbp), %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x10d0
movl 0x8(%r14,%rbx,4), %esi
movq %r13, %rdi
callq 0x189a
leaq 0x13ca(%rip), %rdi      # 0x3558
testl %eax, %eax
je 0x21ae
movl 0x8(%r14,%rbx,4), %ecx
movl -0x34(%rbp), %esi
leaq 0x133f(%rip), %rdx      # 0x34e0
xorl %eax, %eax
callq 0x2c88
pushq $-0x1
popq %rax
movl %eax, -0x2c(%rbp)
incq %rbx
jmp 0x20f7
movl -0x2c(%rbp), %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rsa9000[P]regfanalysistools/regftree.c
// Function: regf_print_data
static int regf_print_data(const char *pref, const void *p, unsigned type,
			   unsigned len)
{
	switch (type) {
	case REGF_VK_T_DWORD:
		printf("%s%s\n", pref, regf_dword2str(p, len));
		break;
	case REGF_VK_T_QWORD:
		printf("%s%s\n", pref, regf_qword2str(p, len));
		break;
	case REGF_VK_T_SZ:
	case REGF_VK_T_EXPAND_SZ:
		printf("%s%ls\n", pref, regf_unicode2wchar(p, len));
		break;
	default:
		printf("%s%s\n", pref, regf_hexdump(p, len));
		break;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leal -0x1(%rsi), %eax
cmpl $0x2, %eax
jb 0x25b6
cmpl $0xb, %esi
je 0x25d6
cmpl $0x4, %esi
jne 0x260d
testl %edx, %edx
je 0x2696
cmpl $0x4, %edx
jne 0x269f
movl (%rbx), %ecx
leaq 0x3c96(%rip), %rbx      # 0x6230
leaq 0x12b4(%rip), %rdx      # 0x3855
pushq $0x20
popq %rsi
movq %rbx, %rdi
movl %ecx, %r8d
xorl %eax, %eax
callq 0x10d0
jmp 0x26a6
movq %rbx, %rdi
movl %edx, %esi
callq 0x1aa1
leaq 0x1285(%rip), %rdi      # 0x384c
leaq 0xf7c(%rip), %rsi       # 0x354a
movq %rax, %rdx
jmp 0x26b7
testl %edx, %edx
je 0x2696
cmpl $0x8, %edx
jne 0x269f
movq (%rbx), %rcx
leaq 0x3c5f(%rip), %rbx      # 0x6250
leaq 0x127a(%rip), %rdx      # 0x3872
pushq $0x40
popq %rsi
movq %rbx, %rdi
movq %rcx, %r8
xorl %eax, %eax
callq 0x10d0
jmp 0x26a6
cmpl $0x10, %edx
pushq $0x10
popq %r12
movl %edx, 0x4(%rsp)
cmovbl %edx, %r12d
leaq 0x3c6d(%rip), %r13      # 0x6290
leaq 0x1257(%rip), %r15      # 0x3881
xorl %ebp, %ebp
movq %r13, %r14
cmpq %rbp, %r12
je 0x2659
movq %r13, %rsi
subq %r14, %rsi
addq $0x35, %rsi
movzbl (%rbx,%rbp), %ecx
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10d0
cltq
addq %rax, %r14
incq %rbp
jmp 0x262f
cmpl $0x11, 0x4(%rsp)
jb 0x267f
leaq 0x3c29(%rip), %rsi      # 0x6290
subq %r14, %rsi
addq $0x35, %rsi
leaq 0x1212(%rip), %rdx      # 0x3887
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
leaq 0x11c0(%rip), %rdi      # 0x3846
leaq 0xebd(%rip), %rsi       # 0x354a
leaq 0x3bfd(%rip), %rdx      # 0x6291
jmp 0x26b7
leaq 0x11b6(%rip), %rbx      # 0x3853
jmp 0x26a6
leaq 0x11bb(%rip), %rbx      # 0x3861
leaq 0x1199(%rip), %rdi      # 0x3846
leaq 0xe96(%rip), %rsi       # 0x354a
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
// File: /workspace/github_c_makefile_star2_O2/millimat[P]Soft-Heap/./binheap.c
// Function: max_heapify
void max_heapify(int *A, size_t heapsize, size_t i) {
  while(true) {
    size_t l = left(i), r = right(i), largest = i;
    // Detect the index of the largest valid element in A between l, r, i
    if(l < heapsize && A[l] > A[i]) largest = l;
    if(r < heapsize && A[r] > A[largest]) largest = r;

    // If i is the largest already, the heap property has been restored; terminate
    if(largest == i) break; 
    
    // Else swap i down and continue
    swap(A, i, largest);
    i = largest;
  }
}

// Assembly:
movq %rdx, %rax
leaq 0x1(,%rdx,2), %rcx
cmpq %rsi, %rcx
jae 0x1271
movl (%rdi,%rcx,4), %eax
cmpl (%rdi,%rdx,4), %eax
jg 0x126e
movq %rdx, %rcx
movq %rcx, %rax
leaq 0x2(,%rdx,2), %rcx
cmpq %rsi, %rcx
jae 0x1293
leaq (%rdx,%rdx), %r8
movl 0x8(%rdi,%r8,4), %r8d
cmpl (%rdi,%rax,4), %r8d
jg 0x1290
movq %rax, %rcx
movq %rcx, %rax
cmpq %rdx, %rax
je 0x12ab
movl (%rdi,%rdx,4), %ecx
movl (%rdi,%rax,4), %r8d
movl %r8d, (%rdi,%rdx,4)
movl %ecx, (%rdi,%rax,4)
movq %rax, %rdx
jmp 0x1256
retq
// File: /workspace/github_c_makefile_star2_O2/millimat[P]Soft-Heap/./binheap.c
// Function: min_heapify
void min_heapify(int *A, size_t heapsize, int i) {
  while(true) {
    size_t l = left(i), r = right(i), smallest = i;
    // Detect the index of the largest valid element in A between l, r, i
    if(l < heapsize && A[l] < A[i]) smallest = l;
    if(r < heapsize && A[r] < A[smallest]) smallest = r;

    // If i is the largest already, the heap property has been restored; terminate
    if(smallest == i) break; 
    
    // Else swap i down and continue
    swap(A, i, smallest);
    i = smallest;
  }
}

// Assembly:
movslq %edx, %rax
leaq 0x1(,%rax,2), %rcx
movq %rax, %rdx
cmpq %rsi, %rcx
jae 0x12cd
movl (%rdi,%rcx,4), %edx
cmpl (%rdi,%rax,4), %edx
jl 0x12ca
movq %rax, %rcx
movq %rcx, %rdx
leaq 0x2(,%rax,2), %rcx
cmpq %rsi, %rcx
jae 0x12ef
leaq (%rax,%rax), %r8
movl 0x8(%rdi,%r8,4), %r8d
cmpl (%rdi,%rdx,4), %r8d
jl 0x12ec
movq %rdx, %rcx
movq %rcx, %rdx
cmpq %rax, %rdx
je 0x1304
movl (%rdi,%rax,4), %ecx
movl (%rdi,%rdx,4), %r8d
movl %r8d, (%rdi,%rax,4)
movl %ecx, (%rdi,%rdx,4)
jmp 0x12ac
retq
// File: /workspace/github_c_makefile_star2_O2/millimat[P]Soft-Heap/sorts.c
// Function: main
int main(int argc, char *argv[]) {
  if(argc != 2) error(1,0, "usage: ./sorts [nelems]");
  int nelems = atoi(argv[1]);
  if(nelems <= 0) error(1,0, "nelems must be a valid integer greater than or equal to 1");

  long long seed = time(NULL);
  srand(seed);
  printf("Random seed: %lld\n", seed);

  printf("Creating a template array of %d random elements...\n", nelems);
  int A[nelems];
  for(int i = 0; i < nelems; i++) A[i] = rand();
  printf("Done. Starting tests...\n\n");

  time_mergesort(A, nelems);
  time_heapsort(A, nelems);
  time_quicksort(A, nelems);
  time_gnu_qsort(A, nelems);
  time_radix_sort(A, nelems);
  time_softheap_sort(A, nelems);   

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpl $0x2, %edi
je 0x1392
leaq 0x1cba(%rip), %rdx      # 0x3040
pushq $0x1
popq %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x10f0
movq 0x8(%rbx), %rdi
callq 0x1100
movl %eax, %ebx
testl %eax, %eax
jg 0x13b4
leaq 0x1cb0(%rip), %rdx      # 0x3058
pushq $0x1
popq %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x10f0
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x10d0
movq %rax, %r14
movl %r14d, %edi
callq 0x10b0
leaq 0x1cc2(%rip), %rdi      # 0x3092
movq %r14, %rsi
xorl %eax, %eax
callq 0x1070
leaq 0x1cc4(%rip), %rdi      # 0x30a5
movl %ebx, %esi
xorl %eax, %eax
callq 0x1070
movl %ebx, %eax
movq %rsp, %r14
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
testl %ebx, %ebx
movl $0x0, %r12d
cmovgl %ebx, %r12d
cmpq %r15, %r12
je 0x1420
callq 0x1120
movl %eax, (%r14,%r15,4)
incq %r15
jmp 0x140d
leaq 0x1d52(%rip), %rdi      # 0x3179
callq 0x1040
movslq %ebx, %rbx
leaq 0x1b1(%rip), %rdx       # 0x15e7
leaq 0x1c9c(%rip), %rcx      # 0x30d9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14d4
leaq 0x2eb(%rip), %rdx       # 0x173a
leaq 0x1ced(%rip), %rcx      # 0x3143
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14d4
leaq 0x312(%rip), %rdx       # 0x177a
leaq 0x1cdd(%rip), %rcx      # 0x314c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14d4
leaq 0x3eb(%rip), %rdx       # 0x186c
leaq 0x1cce(%rip), %rcx      # 0x3156
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14d4
leaq 0x3e6(%rip), %rdx       # 0x1880
leaq 0x1cbf(%rip), %rcx      # 0x3160
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14d4
leaq 0x4db(%rip), %rdx       # 0x198e
leaq 0x1cb1(%rip), %rcx      # 0x316b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14d4
xorl %eax, %eax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/millimat[P]Soft-Heap/sorts.c
// Function: time_sort
static void time_sort(int *A, size_t length, sorter sort, char *sort_name) {
  printf("----------------- Timing %s ------------------\n", sort_name);
  printf("Making copy of original array...\n");
  int B[length];
  memcpy(B, A, length * sizeof(int));

  printf("Timing %s on array...\n", sort_name);

  clock_t tick = clock();
  sort(B, length);
  clock_t tock = clock();
  double elapsed_secs = (double)(tock - tick) / CLOCKS_PER_SEC;
  
  if(!sorted(B, length)) error(1,0, "%s failed", sort_name);
  printf("Success.\n");
  printf("%s\t %4.6f s \n\n", sort_name, elapsed_secs);  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
leaq 0x1bee(%rip), %rdi      # 0x30e3
movq %rcx, %rsi
xorl %eax, %eax
callq 0x1070
leaq 0x1c8c(%rip), %rdi      # 0x3192
callq 0x1040
movq %rsp, %r15
leaq 0xf(,%r14,4), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
leaq (,%r14,4), %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x10c0
leaq 0x1bd9(%rip), %rdi      # 0x3113
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1070
callq 0x1060
movq %rax, %r13
movq %r15, %rdi
movq %r14, %rsi
callq *%r12
callq 0x1060
movq %rax, %r12
pushq $0x1
popq %rax
subq %r14, %rax
decq %r14
pushq $-0x1
popq %rcx
leaq (%rax,%rcx), %rdx
cmpq $-0x1, %rdx
je 0x15a1
movl 0x4(%r15,%rcx,4), %esi
leaq 0x1(%rcx), %rdx
cmpl 0x8(%r15,%rcx,4), %esi
movq %rdx, %rcx
jle 0x1569
cmpq %rdx, %r14
jbe 0x15a1
leaq 0x1b98(%rip), %rdx      # 0x312a
pushq $0x1
popq %rdi
xorl %esi, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10f0
subq %r13, %r12
cvtsi2sd %r12, %xmm0
divsd 0x1a57(%rip), %xmm0     # 0x3008
movsd %xmm0, -0x30(%rbp)
leaq 0x1bf6(%rip), %rdi      # 0x31b3
callq 0x1040
leaq 0x1b6b(%rip), %rdi      # 0x3134
movq %rbx, %rsi
movsd -0x30(%rbp), %xmm0
movb $0x1, %al
callq 0x1070
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/millimat[P]Soft-Heap/sorts.c
// Function: mergesort
static void mergesort(int *A, int *aux1, int *aux2, int l, int r) {
  if(l >= r) return;
  
  // Recursively sort two halves
  int q = (l+r)/2;
  mergesort(A, aux1, aux2, l, q);
  mergesort(A, aux1, aux2, q+1, r);
  
  // Copy the two sorted halves into aux arrays
  int nlo = q - l + 1, nhi = r - q;
  memcpy(aux1, A + l, nlo * sizeof(int));
  memcpy(aux2, A + q + 1, nhi * sizeof(int));

  // Merge the arrays by filling A[l..r] with the lower current elem
  // of the smallest two unconsidered elements in aux1 and aux2
  int i = 0, j = 0, pos = l;
  while(i < nlo && j < nhi) {
    if(aux1[i] <= aux2[j]) A[pos++] = aux1[i++];
    else A[pos++] = aux2[j++];
  }
  
  // fill the remainder of A[l..r] with whichever subarray isn't done
  while(i < nlo) A[pos++] = aux1[i++];
  while(j < nhi) A[pos++] = aux2[j++];
}

// Assembly:
cmpl %r8d, %ecx
jge 0x1739
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r13d
movl %ecx, %r12d
movq %rdx, %rbx
movq %rsi, %r14
leal (%r12,%r13), %ebp
shrl %ebp
movq %rdi, %r15
movq %rdi, 0x8(%rsp)
movl %ebp, %r8d
callq 0x1624
leal 0x1(%rbp), %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r13d, %r8d
callq 0x1624
movl %ebp, %r15d
movq %r12, 0x10(%rsp)
subl %r12d, %r15d
subl %ebp, %r13d
movl %r12d, %eax
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
movslq %r15d, %r12
leaq 0x4(,%r12,4), %rdx
movq %r14, %rdi
callq 0x10c0
movq 0x8(%rsp), %rax
leaq (%rax,%rbp,4), %rsi
addq $0x4, %rsi
movslq %r13d, %r13
leaq (,%r13,4), %rdx
movq %rbx, %rdi
callq 0x10c0
movslq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax,4), %rax
xorl %edi, %edi
xorl %esi, %esi
movl %edi, %edx
movl %esi, %ecx
cmpl %r15d, %edi
jg 0x1713
cmpl %r13d, %esi
jge 0x1713
movl (%r14,%rdx,4), %r8d
movl (%rbx,%rcx,4), %ecx
xorl %r9d, %r9d
xorl %edi, %edi
cmpl %ecx, %r8d
setg %r9b
setle %dil
cmovll %r8d, %ecx
addl %edx, %edi
addl %r9d, %esi
movl %ecx, (%rax)
addq $0x4, %rax
jmp 0x16d0
movl (%r14,%rdx,4), %esi
incq %rdx
movl %esi, (%rax)
addq $0x4, %rax
cmpq %r12, %rdx
jle 0x1706
jmp 0x1726
movl (%rbx,%rcx,4), %edx
incq %rcx
movl %edx, (%rax)
addq $0x4, %rax
cmpq %r13, %rcx
jl 0x171a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/millimat[P]Soft-Heap/sorts.c
// Function: heapsort
static void heapsort(int *A, size_t length) {
  build_maxheap(A, length);
  for(size_t i = length - 1; i >= 1; i--) {
    swap(A, i, 0);
    max_heapify(A, i, 0);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1305
decq %r14
movq %r14, %r15
subq $0x1, %r15
jb 0x1774
movl (%rbx,%r14,4), %eax
movl (%rbx), %ecx
movl %ecx, (%rbx,%r14,4)
movl %eax, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1253
movq %r15, %r14
jmp 0x1750
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/millimat[P]Soft-Heap/sorts.c
// Function: quicksort
static void quicksort(int *A, int l, int r) {
  if(l >= r) return;
  int rand_pivot = l + (rand() % (r - l + 1));
  swap(A, l, rand_pivot);

  int q = partition(A, l, r);
  quicksort(A, l, q-1);
  quicksort(A, q+1, r);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
movabsq $-0x100000000, %r15     # imm = 0xFFFFFFFF00000000
movq %rdx, (%rsp)
leal 0x1(%rdx), %r12d
movabsq $0x100000000, %r13      # imm = 0x100000000
cmpl (%rsp), %ebp
jge 0x185d
callq 0x1120
movl %r12d, %ecx
subl %ebp, %ecx
cltd
idivl %ecx
addl %ebp, %edx
movslq %ebp, %rax
movslq %edx, %rcx
movl (%r14,%rax,4), %edx
movl (%r14,%rcx,4), %esi
movl %esi, (%r14,%rax,4)
movl %edx, (%r14,%rcx,4)
movl (%r14,%rax,4), %ecx
movl %r12d, %edx
movl %ebp, %ebx
movslq %edx, %rdx
movq %rdx, %rsi
shlq $0x20, %rsi
movl -0x4(%r14,%rdx,4), %edi
decq %rdx
addq %r15, %rsi
cmpl %ecx, %edi
jg 0x17ee
movslq %ebx, %rbx
sarq $0x20, %rsi
movq %rbx, %r8
shlq $0x20, %r8
addq %r15, %r8
movq %rbx, %r10
addq %r13, %r8
movl 0x4(%r14,%rbx,4), %r9d
incq %rbx
cmpq %rsi, %r10
jge 0x1826
cmpl %ecx, %r9d
jl 0x180e
cmpq %rdx, %rbx
jge 0x1835
movl %edi, (%r14,%rbx,4)
movl %r9d, (%r14,%rdx,4)
jmp 0x17e4
movl (%r14,%rax,4), %ecx
sarq $0x1e, %r8
movl (%r14,%r8), %edx
movl %edx, (%r14,%rax,4)
movl %ecx, (%r14,%r8)
leal -0x2(%rbx), %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x1781
movl %ebx, %ebp
jmp 0x17ad
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/millimat[P]Soft-Heap/sorts.c
// Function: radix_sort
static void radix_sort(int *A, size_t length) {
  int b = 10; // radix sort base
  int ndigits = ceil(log(RAND_MAX)/log(b));
  int B[length];
  memset(B, 0, sizeof(int) * length); // Valgrind gets pissed if I don't do this

  int divisor = 1; // (x / divisor) % (b) is the log_b(divisor)th least sigdig of x

  for(int i = 0; i < ndigits; i++) {
    // On even-numbered runs, current progress moves A->B; on even, B->A
    if(i % 2 == 0) radix_pass(A, B, length, b, divisor);
    else radix_pass(B, A, length, b, divisor);
    divisor *= b;
  }

  // After the final pass, the sorted array will be B if ndigits was odd.
  // If this is the case, copy B into A to complete the sort.
  if(ndigits % 2 == 1) memcpy(A, B, length * sizeof(int));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
leaq 0xf(,%rsi,4), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
leaq (,%rsi,4), %rdx
xorl %r13d, %r13d
movq %r15, %rdi
xorl %esi, %esi
callq 0x1090
pushq $0x1
popq %r12
cmpl $0xa, %r13d
je 0x18f0
testb $0x1, %r13b
jne 0x18d6
movq %r14, %rdi
movq %r15, %rsi
jmp 0x18dc
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x18ff
imull $0xa, %r12d, %r12d
incl %r13d
jmp 0x18c2
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/millimat[P]Soft-Heap/sorts.c
// Function: radix_pass
static void radix_pass(int *input, int *output, size_t length, int b, int divisor) {
  int counter[b];
  memset(counter, 0, sizeof(int) * b); // set digit counts to 0
   
  // Count the number of representatives there are of each digit across all values
  for(int i = 0; i < length; i++) {
    int dig_i = (input[i] / divisor) % b; 
    counter[dig_i]++;
  }

  // Change counter so that counter[i] counts how many elements have appropriate LSD
  // less than or equal to i. This is 1 plus the max index at which an element 
  // with that digit should appear in a zero-indexed array. 
  for(int i = 1; i < b; i++) {
    counter[i] += counter[i-1];
  }
  
  for(int i = length - 1; i >= 0; i--) {
    int elem = input[i];
    int dig_i = (elem / divisor) % b;
    output[counter[dig_i] - 1] = elem;
    counter[dig_i]--; // so that next elem with this digit can be placed before this one
  }
}

// Assembly:
movq %rdx, %r8
xorps %xmm0, %xmm0
andq $0x0, -0x8(%rsp)
movaps %xmm0, -0x18(%rsp)
movaps %xmm0, -0x28(%rsp)
xorl %r10d, %r10d
movl $0xa, %r9d
cmpq %r10, %r8
je 0x193a
movl (%rdi,%r10,4), %eax
cltd
idivl %ecx
cltd
idivl %r9d
movslq %edx, %rax
incl -0x28(%rsp,%rax,4)
incq %r10
jmp 0x191e
movabsq $0x1, %rax
cmpq $0xa, %rax
je 0x1957
movl -0x2c(%rsp,%rax,4), %edx
addl %edx, -0x28(%rsp,%rax,4)
incq %rax
jmp 0x1944
movl %r8d, %r10d
decq %r10
testl %r10d, %r10d
js 0x198d
movl %r10d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl (%rdi,%rax,4), %r8d
movl %r8d, %eax
cltd
idivl %ecx
cltd
idivl %r9d
movslq %edx, %rax
movslq -0x28(%rsp,%rax,4), %rdx
movl %r8d, -0x4(%rsi,%rdx,4)
decl %edx
movl %edx, -0x28(%rsp,%rax,4)
jmp 0x195a
retq
// File: /workspace/github_c_makefile_star2_O2/millimat[P]Soft-Heap/sorts.c
// Function: softheap_sort
static void softheap_sort(int *A, size_t length) {
  if(length == 1) return; // already sorted
  double epsilon = (double)1/length;
  if(epsilon <= 0) epsilon = DBL_MIN; // guarantee positive epsilon

  softheap *sh = makeheap_empty(epsilon);
  for(int i = 0; i < length; i++) insert(sh, A[i]);
  for(int i = 0; i < length; i++) A[i] = extract_min(sh);
  destroy_heap(sh);
}

// Assembly:
cmpq $0x1, %rsi
jne 0x1995
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %xmm0
punpckldq 0x1670(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1678(%rip), %xmm0     # 0x3030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x1644(%rip), %xmm2     # 0x3010
divsd %xmm1, %xmm2
xorpd %xmm1, %xmm1
movapd %xmm2, %xmm0
cmpnlesd %xmm1, %xmm0
andpd %xmm0, %xmm2
movsd 0x162f(%rip), %xmm1     # 0x3018
andnpd %xmm1, %xmm0
orpd %xmm2, %xmm0
callq 0x1a68
movq %rax, %r15
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x1a12
movl (%r14,%r12,4), %esi
movq %r15, %rdi
callq 0x1bda
incq %r12
jmp 0x19fc
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x1a2b
movq %r15, %rdi
callq 0x1e12
movl %eax, (%r14,%r12,4)
incq %r12
jmp 0x1a15
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1b51
nop
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/DASrealign.c
// Function: convert_trace
static void convert_trace(Path *path)
{ int ab, ae;
  int t;
  uint16 *trace = ((uint16 *) (path->trace));
  
  ae = lowTP(path->abpos);
  ab = path->abpos;
  for (t = 0; t < path->tlen; t += 2)
    { ae += TRACE_SPACING;
      if (ae > path->aepos)
        ae = path->aepos;
#ifdef TRACE
      printf("        %5d,%5d -> %5d,%5d\n",trace[t],trace[t+1],ae-ab,trace[t+1]);
      fflush(stdout);
#endif
      trace[t] = ae-ab;
      ab = ae;
    }
}

// Assembly:
movq (%rdi), %rsi
movl 0x10(%rdi), %ecx
movl 0x1c5f0(%rip), %r8d     # 0x1f198
movl %ecx, %eax
cltd
idivl %r8d
movl %ecx, %eax
subl %edx, %eax
movslq 0x8(%rdi), %rdx
xorl %r9d, %r9d
cmpq %rdx, %r9
jge 0x2bdf
addl %r8d, %eax
movl 0x18(%rdi), %r10d
cmpl %r10d, %eax
cmovgel %r10d, %eax
movl %eax, %r10d
subl %ecx, %r10d
movw %r10w, (%rsi,%r9,2)
addq $0x2, %r9
movl %eax, %ecx
jmp 0x2bb9
retq