LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/esheldon[P]xshear/src/redshear.c
// Function: find_lens
LensumHash* find_lens(LensumHash* lensums, int64 id) {
    // a single file reference, don't allocate
    LensumHash* alensum=NULL;
    HASH_FIND_INT64(lensums, &id, alensum);
    return alensum;
}

// Assembly:
movq %rsi, -0x8(%rsp)
testq %rdi, %rdi
je 0x85c1
movq %rsi, %rcx
shrq $0x20, %rcx
movl $0xff000000, %eax       # imm = 0xFF000000
andl %eax, %ecx
movq %rsi, %rdx
shrq $0x18, %rdx
sarl $0x8, %edx
movl $0xffff0000, %r8d       # imm = 0xFFFF0000
andl %r8d, %edx
addl %ecx, %edx
movq %rsi, %rcx
shrq $0x10, %rcx
sarl $0x10, %ecx
movl $0xffffff00, %r9d       # imm = 0xFFFFFF00
andl %r9d, %ecx
addl %edx, %ecx
movq %rsi, %rdx
shrq $0x8, %rdx
sarl $0x18, %edx
addl %edx, %ecx
addl $0x9e3779b9, %ecx       # imm = 0x9E3779B9
andl %esi, %eax
movl %esi, %edx
shll $0x8, %edx
sarl $0x8, %edx
andl %r8d, %edx
movswl %si, %r8d
andl %r9d, %r8d
addl %edx, %r8d
movsbl %sil, %edx
subl %ecx, %eax
addl %r8d, %eax
addl %eax, %edx
addl $0x9f49bac2, %edx       # imm = 0x9F49BAC2
xorl $0x7f76d, %edx          # imm = 0x7F76D
subl %edx, %ecx
addl $0x1124109, %ecx        # imm = 0x1124109
movl %edx, %eax
shll $0x8, %eax
xorl %ecx, %eax
movl $0xfeedbef7, %esi       # imm = 0xFEEDBEF7
subl %edx, %esi
subl %eax, %esi
movl %eax, %ecx
shrl $0xd, %ecx
xorl %esi, %ecx
subl %eax, %edx
subl %ecx, %edx
movl %ecx, %esi
shrl $0xc, %esi
xorl %edx, %esi
subl %ecx, %eax
subl %esi, %eax
movl %esi, %edx
shll $0x10, %edx
xorl %eax, %edx
subl %esi, %ecx
subl %edx, %ecx
movl %edx, %eax
shrl $0x5, %eax
xorl %ecx, %eax
subl %edx, %esi
subl %eax, %esi
movl %eax, %ecx
shrl $0x3, %ecx
xorl %esi, %ecx
subl %eax, %edx
subl %ecx, %edx
movl %ecx, %esi
shll $0xa, %esi
xorl %edx, %esi
addl %esi, %ecx
subl %ecx, %eax
shrl $0xf, %esi
xorl %eax, %esi
movq 0x8(%rdi), %rcx
movl 0x8(%rcx), %eax
decl %eax
andl %esi, %eax
movq (%rcx), %rdx
shlq $0x4, %rax
movq (%rdx,%rax), %rax
testq %rax, %rax
je 0x85c1
subq 0x20(%rcx), %rax
cmpl $0x8, 0x38(%rax)
jne 0x85bb
movq 0x30(%rax), %rdx
movq (%rdx), %rdx
cmpq -0x8(%rsp), %rdx
je 0x85c3
movq 0x28(%rax), %rax
jmp 0x859e
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/esheldon[P]xshear/src/sdss-survey.c
// Function: lon_bound
double lon_bound(double lon, double minval, double maxval) {
    while (lon < minval) {
        lon += 360.;
    }

    while (lon > maxval) {
        lon -= 360.;
    }
    return lon;
}

// Assembly:
ucomisd %xmm0, %xmm1
jbe 0x8af8
movsd 0x5aa(%rip), %xmm3      # 0x9098
addsd %xmm3, %xmm0
ucomisd %xmm0, %xmm1
ja 0x8aee
ucomisd %xmm2, %xmm0
jbe 0x8b10
movsd 0x156a(%rip), %xmm1     # 0xa070
addsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
ja 0x8b06
retq
// File: /workspace/github_c_makefile_star2_O3/esheldon[P]xshear/src/sdss-survey.c
// Function: eq2sdss
void eq2sdss(double ra, double dec, double* lam, double* eta) {

    // put everything in radians first
    ra *= D2R;
    dec *= D2R;

    // this is the SDSS node
    ra -= 1.6580627893946132;

    double cdec = cos(dec);
    
    double x = cos(ra)*cdec;
    double y = sin(ra)*cdec;
    double z = sin(dec);

    *lam = -asin(x);
    *eta = atan2(z, y);

    // this is the eta pole
    *eta -= 0.56723200689815712;

    *eta *= R2D;
    *lam *= R2D;

    *eta = lon_bound(*eta, -180., 180.);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movapd %xmm0, %xmm2
movsd 0x57e(%rip), %xmm0      # 0x90a8
mulsd %xmm0, %xmm2
mulsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
addsd 0x1538(%rip), %xmm2     # 0xa078
movsd %xmm2, 0x8(%rsp)
callq 0x2140
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2140
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2250
movsd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x20(%rsp), %xmm0
callq 0x2250
movsd %xmm0, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x2270
xorps 0x50a(%rip), %xmm0      # 0x90b0
movlps %xmm0, (%r14)
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x2210
addsd 0x14bd(%rip), %xmm0     # 0xa080
movsd 0x14bd(%rip), %xmm1     # 0xa088
mulsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
mulsd (%r14), %xmm1
movsd %xmm1, (%r14)
movsd (%rbx), %xmm0
movsd 0x14a7(%rip), %xmm1     # 0xa090
ucomisd %xmm0, %xmm1
jbe 0x8c01
movsd 0x4a1(%rip), %xmm2      # 0x9098
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
ja 0x8bf7
ucomisd 0x148f(%rip), %xmm0     # 0xa098
jbe 0x8c25
movsd 0x145d(%rip), %xmm1     # 0xa070
movsd 0x147d(%rip), %xmm2     # 0xa098
addsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
ja 0x8c1b
movsd %xmm0, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/esheldon[P]xshear/src/sdss-survey.c
// Function: gcirc_survey
void gcirc_survey(
        double lam1, double eta1, 
        double lam2, double eta2,
        double* dis,  double* theta)
{

  double tlam1 = lam1*D2R;
  //sinlam1 = sin(tlam1);
  double coslam1 = cos(tlam1);
  double sinlam1 = sin(tlam1);

  double tlam2 = lam2*D2R;
  double coslam2 = cos(tlam2);
  double sinlam2 = sin(tlam2);

  double etadiff = (eta2-eta1)*D2R;
  double cosetadiff = cos(etadiff);
  double sinetadiff = sin(etadiff);

  double cosdis = sinlam1*sinlam2 + coslam1*coslam2*cosetadiff;

  if (cosdis < -1.0) cosdis=-1.0;
  if (cosdis >  1.0) cosdis= 1.0;

  *dis = acos(cosdis);

  *theta = atan2( sinetadiff, sinlam1*cosetadiff - coslam1*sinlam2/coslam2 );

  *theta -= M_PI_2;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movsd %xmm3, 0x10(%rsp)
movsd %xmm2, 0x8(%rsp)
movsd %xmm1, 0x18(%rsp)
mulsd 0x3b5(%rip), %xmm0      # 0x90a8
movsd %xmm0, 0x20(%rsp)
callq 0x2140
movsd %xmm0, 0x30(%rsp)
movsd 0x20(%rsp), %xmm0
callq 0x2250
movsd %xmm0, 0x20(%rsp)
movsd 0x8(%rsp), %xmm0
mulsd 0x385(%rip), %xmm0      # 0x90a8
movsd %xmm0, 0x8(%rsp)
callq 0x2140
movsd %xmm0, 0x28(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2250
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
subsd 0x18(%rsp), %xmm0
mulsd 0x34f(%rip), %xmm0      # 0x90a8
movsd %xmm0, 0x10(%rsp)
callq 0x2140
movsd %xmm0, 0x18(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x2250
movsd %xmm0, 0x10(%rsp)
movsd 0x30(%rsp), %xmm0
mulsd 0x28(%rsp), %xmm0
mulsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd 0x293(%rip), %xmm2      # 0x9038
maxsd %xmm1, %xmm2
movsd 0x26f(%rip), %xmm0      # 0x9020
minsd %xmm2, %xmm0
callq 0x2160
movsd %xmm0, (%r14)
movsd 0x8(%rsp), %xmm0
mulsd 0x30(%rsp), %xmm0
divsd 0x28(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
mulsd 0x18(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
callq 0x2210
addsd 0x24c(%rip), %xmm0      # 0x9040
movsd %xmm0, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/esheldon[P]xshear/src/sdss-survey.c
// Function: survey_quad
int survey_quad(double theta) {
    theta = (M_PI_2 - theta)*R2D;
    if (theta >= 0. && theta < 90.) {
        return 0;
    } else if (theta >= 90. && theta < 180.) {
        return 1;
    } else if (theta >= 180. && theta < 270.) {
        return 2;
    } else {
        return 3;
    }
}

// Assembly:
movsd 0x1de(%rip), %xmm1      # 0x9030
subsd %xmm0, %xmm1
mulsd 0x122a(%rip), %xmm1     # 0xa088
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x8e79
xorl %eax, %eax
movsd 0x22e(%rip), %xmm0      # 0x90a0
ucomisd %xmm1, %xmm0
jbe 0x8e79
retq
ucomisd 0x21f(%rip), %xmm1      # 0x90a0
jb 0x8e96
movl $0x1, %eax
movsd 0x1208(%rip), %xmm0     # 0xa098
ucomisd %xmm1, %xmm0
ja 0x8e78
movsd 0x1202(%rip), %xmm0     # 0xa0a0
movsd 0x11f2(%rip), %xmm2     # 0xa098
cmplepd %xmm1, %xmm2
cmpltpd %xmm0, %xmm1
andpd %xmm2, %xmm1
movd %xmm1, %eax
andl $0x1, %eax
xorl $0x3, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/convert.c
// Function: aatrace_convert_pic
void aatrace_convert_pic(struct aatrace_text* txt,
			 const struct aatrace_pic* src,
			 const struct aatrace_font* font,
			 const struct aatrace_convert_ctx* ctx)
{
	int tl, tc;

	txt->ll = txt->w = src->w/AATRACE_FONT_WIDTH;
	txt->h = src->h/AATRACE_FONT_HEIGHT;
	txt->buf = (char*)malloc(txt->ll*txt->h);

	for (tl = 0; (tl + 1)*font->h <= src->h; tl++) {
		for (tc = 0; (tc + 1)*font->w <= src->w; tc++) {
			txt->buf[tl*txt->ll + tc] =
				aatrace_search_tile(src, font, tl, tc, &ctx->match, &ctx->search)
				+ font->ascii_offset;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x8(%rsp)
movq %rdi, %r15
movl 0xc(%rsi), %r13d
leal 0x7(%r13), %eax
testl %r13d, %r13d
cmovnsl %r13d, %eax
sarl $0x3, %eax
movl %eax, 0xc(%rdi)
movl %eax, 0x8(%rdi)
movq %rsi, 0x10(%rsp)
movl 0x10(%rsi), %ebx
leal 0xf(%rbx), %edi
testl %ebx, %ebx
cmovnsl %ebx, %edi
movq %rdx, %r12
sarl $0x4, %edi
movl %edi, 0x10(%r15)
imull %eax, %edi
callq 0x1100
movq %rax, (%r15)
movl 0x1c(%r12), %ecx
cmpl %ebx, %ecx
jg 0x2404
movq %r15, %rsi
movq 0x8(%rsp), %rax
leaq 0xc(%rax), %r14
movl 0x18(%r12), %eax
movl $0x1, %edi
xorl %ebp, %ebp
movq 0x8(%rsp), %r15
cmpl %r13d, %eax
jg 0x23f7
movl %edi, 0x4(%rsp)
xorl %ebx, %ebx
movq %rsi, %r13
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %ebx, %ecx
movq %r15, %r8
movq %r14, %r9
callq 0x2097
movq 0x10(%rsp), %rdi
movq %r13, %rsi
addl 0x24(%r12), %eax
movq (%r13), %rcx
movl 0x8(%r13), %edx
imull %ebp, %edx
addl %ebx, %edx
movb %al, (%rcx,%rdx)
leal 0x2(%rbx), %ecx
movl 0x18(%r12), %eax
imull %eax, %ecx
movl 0xc(%rdi), %r13d
incl %ebx
cmpl %r13d, %ecx
jle 0x239e
movl 0x1c(%r12), %ecx
movl 0x10(%rdi), %ebx
movl 0x4(%rsp), %edi
incl %edi
movl %edi, %edx
imull %ecx, %edx
incl %ebp
cmpl %ebx, %edx
jle 0x2393
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/zpole[P]IICV/src/test_heap-def.c
// Function: s_swap
void s_swap (S * v, vl_uindex a, vl_uindex b)
{
  S t = v[a] ;
  v[a] = v[b] ;
  v[b] = t ;
  printf("Swapping %" VL_FMT_UINDEX "x with %" VL_FMT_UINDEX "\n", a, b) ;
}

// Assembly:
movl (%rdi,%rsi,4), %eax
movl (%rdi,%rdx,4), %ecx
movl %ecx, (%rdi,%rsi,4)
movl %eax, (%rdi,%rdx,4)
leaq 0xeae(%rip), %rdi       # 0x2014
xorl %eax, %eax
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/simh[P]simtools/converters/strrem/strrem.c
// Function: main
int main (int argc, char *argv[])
{
int i, slen;
char *ppos, *fpos, *tpos, oname[256], line[256];
FILE *ifile, *ofile;

if ((argc < 2) || (argv[0] == NULL)) {
	printf ("Usage is: strrem file [file...]\n");
	exit (0);  }

slen = strlen (srem);
for (i = 1; i < argc; i++) {
	strcpy (oname, argv[i]);
        if (ppos = strrchr (oname, '.')) strcpy (ppos, ".new");
            else strcat (oname, ".new");
	ifile = fopen (argv[i], "r");
	if (ifile == NULL) {
	    printf ("Error opening file: %s\n", argv[i]);
	    exit (0);  }
	ofile = fopen (oname, "w");
	if (ofile == NULL) {
	    printf ("Error opening file: %s\n", oname);
	    exit (0);  }

	printf ("Processing file %s\n", argv[i]);
	while (fgets (line, 255, ifile) != NULL) {
	    tpos = strstr (line, srem);
	    if (tpos) {
		    fpos = tpos + slen;
		    while (*fpos) *tpos++ = *fpos++;
            *tpos = 0;
		    }
	    fputs (line, ofile);
	    }
	fclose (ifile);
	fclose (ofile);
	}
return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
cmpl $0x2, %edi
jl 0x1372
movq %rsi, %rbx
cmpq $0x0, (%rsi)
je 0x1372
movl %edi, %ebp
movq 0x2e74(%rip), %rdi      # 0x4080
callq 0x1060
movslq %eax, %r13
movl %ebp, %eax
movq %rax, 0x8(%rsp)
movl $0x1, %r14d
leaq 0x10(%rsp), %r12
leaq 0x110(%rsp), %rbp
movq (%rbx,%r14,8), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x1030
movq %r12, %rdi
movl $0x2e, %esi
callq 0x1080
testq %rax, %rax
je 0x125f
movb $0x0, 0x4(%rax)
movl $0x77656e2e, (%rax)     # imm = 0x77656E2E
movq (%rbx,%r14,8), %r15
jmp 0x1274
movq %r12, %rdi
callq 0x1060
movl $0x77656e2e, 0x10(%rsp,%rax) # imm = 0x77656E2E
movb $0x0, 0x14(%rsp,%rax)
movq %r15, %rdi
leaq 0xd94(%rip), %rsi       # 0x2012
callq 0x10b0
testq %rax, %rax
je 0x134b
movq %rax, %r15
movq %r12, %rdi
leaq 0xd77(%rip), %rsi       # 0x2010
callq 0x10b0
testq %rax, %rax
je 0x1358
movq %rax, %r12
movq (%rbx,%r14,8), %rsi
leaq 0xd77(%rip), %rdi       # 0x202c
xorl %eax, %eax
callq 0x1070
movq %rbp, %rdi
movl $0xff, %esi
movq %r15, %rdx
callq 0x10a0
testq %rax, %rax
je 0x1314
movq 0x2da8(%rip), %rsi      # 0x4080
movq %rbp, %rdi
callq 0x10d0
testq %rax, %rax
je 0x1307
movb (%rax,%r13), %cl
testb %cl, %cl
je 0x1301
leaq 0x1(%rax), %rdx
movb %cl, (%rax)
movb 0x1(%rax,%r13), %cl
movq %rdx, %rax
testb %cl, %cl
jne 0x12ed
jmp 0x1304
movq %rax, %rdx
movb $0x0, (%rdx)
movq %rbp, %rdi
movq %r12, %rsi
callq 0x1090
jmp 0x12bc
movq %r15, %rdi
callq 0x1050
movq %r12, %rdi
callq 0x1050
incq %r14
cmpq 0x8(%rsp), %r14
leaq 0x10(%rsp), %r12
jne 0x122e
xorl %eax, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx,%r14,8), %rsi
leaq 0xcbe(%rip), %rdi       # 0x2014
jmp 0x1364
leaq 0xcb5(%rip), %rdi       # 0x2014
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x1070
xorl %edi, %edi
callq 0x10c0
leaq 0xcc7(%rip), %rdi       # 0x2040
callq 0x1040
jmp 0x136b
// File: /workspace/github_c_makefile_star2_O3/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 0x12c7
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 0x12c7
movq %rax, %r15
leaq 0xe00(%rip), %rsi       # 0x202f
movq %r12, %rdi
callq 0x10b0
testq %rax, %rax
je 0x12d3
movq %rax, %rbx
leaq 0xe07(%rip), %rsi       # 0x2051
movq %r14, %rdi
callq 0x10b0
testq %rax, %rax
je 0x12f0
movq %rax, %r12
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x10a0
movq %r15, %r13
movq %rbx, %rdi
callq 0x1090
testl %eax, %eax
jne 0x1291
movq %rbx, %rdi
callq 0x1050
movl %eax, %edi
movq %r12, %rsi
callq 0x1060
decq %r13
jne 0x126e
movq %r12, %rdi
callq 0x1080
cmpq %r15, %rax
jne 0x131a
leaq 0xe1f(%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 0x2d1e(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd4e(%rip), %rsi       # 0x2032
movq %r12, %rdx
xorl %eax, %eax
callq 0x1070
jmp 0x1313
movq 0x2d01(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd53(%rip), %rsi       # 0x2054
movq %r14, %rdx
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
callq 0x1030
movl $0x1, %ebx
jmp 0x12c7
movq 0x2cd7(%rip), %rcx      # 0x3ff8
movq (%rcx), %rdi
leaq 0xd48(%rip), %rsi       # 0x2073
movl %eax, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x1070
jmp 0x12b5
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2180
testq %rax, %rax
je 0x633b
movq %rax, %r14
movups 0x18(%rbx), %xmm0
movl 0x20(%rbx), %eax
movups %xmm0, (%r14)
cmpl $0x2, %eax
jne 0x6330
movq 0x30(%rbx), %rdi
callq 0x5c21
movq %rax, 0x58(%r14)
testq %rax, %rax
je 0x6340
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x32f2
addq $0x30, %rbx
movq %rbx, %rdi
callq 0x32cb
// File: /workspace/github_c_makefile_star2_O3/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 0x637f
pushq %rbx
movq %rdi, %rbx
cmpl $0x2, 0x8(%rdi)
jne 0x6376
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x6376
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_O3/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 0x77fd
movq %rax, 0x50(%rbx)
movq 0x10(%r14), %rcx
movq 0x18(%r14), %rdx
subq 0x10(%rcx), %rax
movq 0x10(%rdx), %rdi
movq %rax, %rsi
callq 0x9084
testq %rax, %rax
je 0x7b61
movq 0x8(%rax), %rax
movq (%rax), %r15
testq %r15, %r15
je 0x7b61
movq 0x10(%rax), %r12
shlq $0x3, %r15
xorl %r13d, %r13d
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 0x7b58
movsd 0x30(%r14), %xmm1
ucomisd %xmm0, %xmm1
jb 0x7b58
movq 0x20(%r14), %rax
addq %rcx, %rdx
addq 0x8(%rax), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7b6b
addq $0x8, %r13
cmpq %r13, %r15
jne 0x7b18
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8175
movq (%rbx), %rdi
callq 0x4629
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
callq 0x6783
movq %rax, 0x18(%rbx)
movq 0x10(%rbx), %rdi
callq 0x6f84
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rdi
callq 0x6b4f
movq %rax, 0x8(%rbx)
movq 0x20(%rbx), %rdi
callq 0x889c
movq %rbx, %rdi
callq 0x2030
xorl %eax, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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
movq %r8, %rcx
subq $0x1, %rcx
jae 0x9190
movq $-0x2, %rdx
movq $-0x1, %rcx
jmp 0x91c0
leaq -0x2(%r8), %rdx
xorl %edi, %edi
movsd (%rax,%rdi,8), %xmm1
ucomisd %xmm0, %xmm1
jae 0x91ab
incq %rdi
cmpq %rdi, %r8
jne 0x9196
jmp 0x91c0
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
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq 0x6d64(%rip), %rbx      # 0xfff8
movq (%rbx), %rcx
leaq 0x2087(%rip), %rdi      # 0xb325
movl $0x8, %esi
movl $0x1, %edx
callq 0x22a0
movq (%rbx), %rcx
leaq 0x2077(%rip), %rdi      # 0xb32e
movl $0x3a, %esi
movl $0x1, %edx
callq 0x22a0
movq (%rbx), %rcx
leaq 0x2099(%rip), %rdi      # 0xb369
movl $0x4a, %esi
movl $0x1, %edx
callq 0x22a0
movq (%rbx), %rcx
leaq 0x20cb(%rip), %rdi      # 0xb3b4
movl $0x48, %esi
movl $0x1, %edx
callq 0x22a0
movq (%rbx), %rcx
leaq 0x20fb(%rip), %rdi      # 0xb3fd
movl $0x47, %esi
movl $0x1, %edx
callq 0x22a0
movl $0x1, %edi
callq 0x2290
// File: /workspace/github_c_makefile_star2_O3/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:
movl $0x3, %eax
movsd 0x1a57(%rip), %xmm1     # 0xb500
ucomisd %xmm0, %xmm1
ja 0x9ad1
movl $0x4, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x9ad1
movsd 0x1402(%rip), %xmm1     # 0xaec8
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setbe %al
incl %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5363(%rip), %r12      # 0x7110
leaq 0x2b56(%rip), %rdx      # 0x490a
movq %r12, %rdi
movl $0x4, %ecx
callq 0x3192
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x1f09
movl %ebx, %eax
movzbl 0x4(%r12,%rax), %ecx
cmpl $0x72, %ecx
je 0x1e0b
cmpl $0x6c, %ecx
jne 0x1ef2
cmpb $0x66, 0x5(%r12,%rax)
jne 0x1eae
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 0x20b8
cmpb $0x69, 0x5(%r12,%rax)
jne 0x1ef2
movq 0x52f2(%rip), %r13      # 0x7110
cmpw $0x0, 0x6(%r13,%rax)
je 0x1f1b
addq %rax, %r13
xorl %r12d, %r12d
xorl %r15d, %r15d
movl 0x8(%r13,%r12,4), %esi
leaq 0x52e8(%rip), %rdi      # 0x7128
callq 0x3095
leaq 0x52e4(%rip), %rcx      # 0x7130
cmpq %rcx, %rax
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
leaq 0x2733(%rip), %rdi      # 0x4594
jne 0x1e84
incl 0x24(%rax)
orb $0x10, 0x28(%rax)
movl 0x8(%r13,%r12,4), %esi
movq %r14, %rdi
movl %ebp, %edx
callq 0x1d94
leaq 0x274a(%rip), %rdi      # 0x45ca
testl %eax, %eax
je 0x1e9f
movl 0x8(%r13,%r12,4), %ecx
movl %ebx, %esi
leaq 0x2651(%rip), %rdx      # 0x44e3
xorl %eax, %eax
callq 0x1359
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
incq %r12
movzwl 0x6(%r13), %eax
cmpq %rax, %r12
jb 0x1e34
jmp 0x1f09
cmpb $0x68, 0x5(%r12,%rax)
jne 0x1ed0
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 0x2237
cmpb $0x69, 0x5(%r12,%rax)
jne 0x1ef2
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 0x23c7
leaq 0x25ed(%rip), %rdi      # 0x44e6
leaq 0x2a0a(%rip), %rdx      # 0x490a
movl %ebx, %esi
xorl %eax, %eax
callq 0x1359
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x1f09
// File: /workspace/github_c_makefile_star2_O3/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 $0x38, %rsp
movl %edx, -0x30(%rbp)
movq 0x503d(%rip), %r12      # 0x7110
movl %esi, -0x34(%rbp)
movl %esi, %ebx
movq %rdi, -0x58(%rbp)
callq 0x1090
movq %rsp, %rdx
leaq 0x13(%rax), %rcx
andq $-0x10, %rcx
subq %rcx, %rdx
movq %rdx, -0x50(%rbp)
movq %rdx, %rsp
cmpw $0x0, 0x6(%r12,%rbx)
je 0x221e
addq %rbx, %r12
addq $0x4, %rax
movq %rax, -0x48(%rbp)
leaq 0x5013(%rip), %rbx      # 0x7128
leaq 0x5014(%rip), %r14      # 0x7130
leaq 0x23ed(%rip), %r13      # 0x4510
xorl %r15d, %r15d
movl $0x0, -0x2c(%rbp)
movq %r12, -0x40(%rbp)
movl 0x8(%r12,%r15,8), %esi
movq %rbx, %rdi
callq 0x3095
cmpq %r14, %rax
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
movq %r13, %rdi
jne 0x21ed
cmpl $0x0, -0x30(%rbp)
setne %cl
incl 0x24(%rax)
orb $0x2, 0x28(%rax)
movzwl 0x6(%r12), %eax
decl %eax
cmpq %rax, %r15
setne %al
orb %cl, %al
leaq 0x23c6(%rip), %rdi      # 0x4540
leaq 0x23cb(%rip), %rax      # 0x454c
cmovneq %rax, %rdi
leaq 0x23ba(%rip), %r12      # 0x4546
leaq 0x23bf(%rip), %rax      # 0x4552
cmovneq %rax, %r12
movq %rbx, %r13
movq -0x58(%rbp), %rbx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10b0
movq -0x50(%rbp), %r14
movq %r14, %rdi
movq -0x48(%rbp), %rsi
movq %r12, %rdx
movq -0x40(%rbp), %r12
movq %rbx, %rcx
movq %r13, %rbx
leaq 0x2349(%rip), %r13      # 0x4510
xorl %eax, %eax
callq 0x10d0
movl 0x8(%r12,%r15,8), %esi
movq %r14, %rdi
leaq 0x4f53(%rip), %r14      # 0x7130
callq 0x1a22
leaq 0x236f(%rip), %rdi      # 0x4558
testl %eax, %eax
je 0x220a
movl 0x8(%r12,%r15,8), %ecx
movl -0x34(%rbp), %esi
leaq 0x22de(%rip), %rdx      # 0x44da
xorl %eax, %eax
callq 0x1359
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
incq %r15
movzwl 0x6(%r12), %eax
cmpq %rax, %r15
jb 0x2131
jmp 0x2225
movl $0x0, -0x2c(%rbp)
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_O3/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 $0x28, %rsp
movl %edx, -0x30(%rbp)
movq %rdi, %r15
movq 0x4ebb(%rip), %r12      # 0x7110
movl %esi, -0x34(%rbp)
movl %esi, %ebx
callq 0x1090
leaq 0x4(%rax), %rsi
movq %rsp, %rdi
addq $0x13, %rax
andq $-0x10, %rax
subq %rax, %rdi
movq %rdi, %rsp
leaq 0x2314(%rip), %rdx      # 0x458f
movl $0x0, -0x2c(%rbp)
movq %rdi, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
movq %r15, -0x50(%rbp)
movq %r15, %rcx
xorl %eax, %eax
callq 0x10d0
cmpw $0x0, 0x6(%r12,%rbx)
je 0x23b5
addq %rbx, %r12
leaq 0x4e79(%rip), %rbx      # 0x7128
leaq 0x4e7a(%rip), %r14      # 0x7130
leaq 0x2253(%rip), %r13      # 0x4510
xorl %r15d, %r15d
movl $0x0, -0x2c(%rbp)
movl 0x8(%r12,%r15,8), %esi
movq %rbx, %rdi
callq 0x3095
cmpq %r14, %rax
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
movq %r13, %rdi
jne 0x2386
cmpl $0x0, -0x30(%rbp)
setne %cl
incl 0x24(%rax)
orb $0x2, 0x28(%rax)
movzwl 0x6(%r12), %eax
decl %eax
cmpq %rax, %r15
setne %al
orb %cl, %al
leaq 0x2230(%rip), %rdi      # 0x4540
leaq 0x2235(%rip), %rax      # 0x454c
cmovneq %rax, %rdi
leaq 0x2224(%rip), %rbx      # 0x4546
leaq 0x2229(%rip), %rax      # 0x4552
cmovneq %rax, %rbx
movq %r12, %r13
movq -0x50(%rbp), %r12
movq %r12, %rsi
xorl %eax, %eax
callq 0x10b0
movq -0x40(%rbp), %r14
movq %r14, %rdi
movq -0x48(%rbp), %rsi
movq %rbx, %rdx
leaq 0x4dd5(%rip), %rbx      # 0x7128
movq %r12, %rcx
movq %r13, %r12
leaq 0x21b0(%rip), %r13      # 0x4510
xorl %eax, %eax
callq 0x10d0
movl 0x8(%r12,%r15,8), %esi
movq %r14, %rdi
leaq 0x4dba(%rip), %r14      # 0x7130
callq 0x1a22
leaq 0x21d6(%rip), %rdi      # 0x4558
testl %eax, %eax
je 0x23a3
movl 0x8(%r12,%r15,8), %ecx
movl -0x34(%rbp), %esi
leaq 0x2148(%rip), %rdx      # 0x44dd
xorl %eax, %eax
callq 0x1359
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
incq %r15
movzwl 0x6(%r12), %eax
cmpq %rax, %r15
jb 0x22c7
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_O3/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 $0x28, %rsp
movl %edx, -0x30(%rbp)
movq %rdi, %r15
movq 0x4d2b(%rip), %r12      # 0x7110
movl %esi, -0x34(%rbp)
movl %esi, %ebx
callq 0x1090
leaq 0x4(%rax), %rsi
movq %rsp, %rdi
addq $0x13, %rax
andq $-0x10, %rax
subq %rax, %rdi
movq %rdi, %rsp
leaq 0x2184(%rip), %rdx      # 0x458f
movl $0x0, -0x2c(%rbp)
movq %rdi, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
movq %r15, -0x50(%rbp)
movq %r15, %rcx
xorl %eax, %eax
callq 0x10d0
cmpw $0x0, 0x6(%r12,%rbx)
je 0x2545
addq %rbx, %r12
leaq 0x4ce9(%rip), %rbx      # 0x7128
leaq 0x4cea(%rip), %r14      # 0x7130
leaq 0x20c3(%rip), %r13      # 0x4510
xorl %r15d, %r15d
movl $0x0, -0x2c(%rbp)
movl 0x8(%r12,%r15,4), %esi
movq %rbx, %rdi
callq 0x3095
cmpq %r14, %rax
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
movq %r13, %rdi
jne 0x2516
cmpl $0x0, -0x30(%rbp)
setne %cl
incl 0x24(%rax)
orb $0x2, 0x28(%rax)
movzwl 0x6(%r12), %eax
decl %eax
cmpq %rax, %r15
setne %al
orb %cl, %al
leaq 0x20a0(%rip), %rdi      # 0x4540
leaq 0x20a5(%rip), %rax      # 0x454c
cmovneq %rax, %rdi
leaq 0x2094(%rip), %rbx      # 0x4546
leaq 0x2099(%rip), %rax      # 0x4552
cmovneq %rax, %rbx
movq %r12, %r13
movq -0x50(%rbp), %r12
movq %r12, %rsi
xorl %eax, %eax
callq 0x10b0
movq -0x40(%rbp), %r14
movq %r14, %rdi
movq -0x48(%rbp), %rsi
movq %rbx, %rdx
leaq 0x4c45(%rip), %rbx      # 0x7128
movq %r12, %rcx
movq %r13, %r12
leaq 0x2020(%rip), %r13      # 0x4510
xorl %eax, %eax
callq 0x10d0
movl 0x8(%r12,%r15,4), %esi
movq %r14, %rdi
leaq 0x4c2a(%rip), %r14      # 0x7130
callq 0x1a22
leaq 0x2046(%rip), %rdi      # 0x4558
testl %eax, %eax
je 0x2533
movl 0x8(%r12,%r15,4), %ecx
movl -0x34(%rbp), %esi
leaq 0x1fbb(%rip), %rdx      # 0x44e0
xorl %eax, %eax
callq 0x1359
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
incq %r15
movzwl 0x6(%r12), %eax
cmpq %rax, %r15
jb 0x2457
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_O3/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 0x29cb
cmpl $0xb, %esi
je 0x29eb
cmpl $0x4, %esi
jne 0x2a24
testl %edx, %edx
je 0x2aaf
cmpl $0x4, %edx
jne 0x2ab8
movl (%rbx), %ecx
leaq 0x4883(%rip), %rbx      # 0x7230
leaq 0x1ea1(%rip), %rdx      # 0x4855
movl $0x20, %esi
movq %rbx, %rdi
movl %ecx, %r8d
xorl %eax, %eax
callq 0x10d0
jmp 0x2abf
movq %rbx, %rdi
movl %edx, %esi
callq 0x1ca7
leaq 0x1e70(%rip), %rdi      # 0x484c
leaq 0x1b67(%rip), %rsi      # 0x454a
movq %rax, %rdx
jmp 0x2ad0
testl %edx, %edx
je 0x2aaf
cmpl $0x8, %edx
jne 0x2ab8
movq (%rbx), %rcx
leaq 0x484a(%rip), %rbx      # 0x7250
leaq 0x1e65(%rip), %rdx      # 0x4872
movl $0x40, %esi
movq %rbx, %rdi
movq %rcx, %r8
xorl %eax, %eax
callq 0x10d0
jmp 0x2abf
testl %edx, %edx
je 0x2a98
cmpl $0x10, %edx
movl $0x10, %r12d
movl %edx, 0x4(%rsp)
cmovbl %edx, %r12d
leaq 0x4850(%rip), %r13      # 0x7290
leaq 0x1e3a(%rip), %r14      # 0x4881
xorl %ebp, %ebp
movq %r13, %rdi
movq %rdi, %r15
movq %r13, %rsi
subq %rdi, %rsi
addq $0x35, %rsi
movzbl (%rbx,%rbp), %ecx
movq %r14, %rdx
xorl %eax, %eax
callq 0x10d0
movslq %eax, %rdi
addq %r15, %rdi
incq %rbp
cmpq %rbp, %r12
jne 0x2a4c
cmpl $0x11, 0x4(%rsp)
jb 0x2a98
leaq 0x480d(%rip), %rsi      # 0x7290
subq %rdi, %rsi
addq $0x35, %rsi
leaq 0x1df6(%rip), %rdx      # 0x4887
xorl %eax, %eax
callq 0x10d0
leaq 0x1da7(%rip), %rdi      # 0x4846
leaq 0x1aa4(%rip), %rsi      # 0x454a
leaq 0x47e4(%rip), %rdx      # 0x7291
jmp 0x2ad0
leaq 0x1d9d(%rip), %rbx      # 0x4853
jmp 0x2abf
leaq 0x1da2(%rip), %rbx      # 0x4861
leaq 0x1d80(%rip), %rdi      # 0x4846
leaq 0x1a7d(%rip), %rsi      # 0x454a
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x138f
leaq 0x1cbf(%rip), %rdx      # 0x3040
movl $0x1, %edi
xorl %esi, %esi
xorl %eax, %eax
callq 0x10f0
movq 0x8(%rbx), %rdi
callq 0x1100
movl %eax, %ebx
testl %eax, %eax
jg 0x13b3
leaq 0x1cb3(%rip), %rdx      # 0x3058
movl $0x1, %edi
xorl %esi, %esi
xorl %eax, %eax
callq 0x10f0
xorl %edi, %edi
callq 0x10d0
movq %rax, %r14
movl %r14d, %edi
callq 0x10b0
leaq 0x1cc6(%rip), %rdi      # 0x3092
movq %r14, %rsi
xorl %eax, %eax
callq 0x1070
leaq 0x1cc8(%rip), %rdi      # 0x30a5
movl %ebx, %esi
xorl %eax, %eax
callq 0x1070
movl %ebx, %r15d
movq %rsp, %r14
leaq 0xf(,%r15,4), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
testl %ebx, %ebx
jle 0x1416
xorl %r12d, %r12d
callq 0x1120
movl %eax, (%r14,%r12,4)
incq %r12
cmpq %r12, %r15
jne 0x1405
leaq 0x1d5c(%rip), %rdi      # 0x3179
callq 0x1040
movslq %ebx, %rbx
leaq 0x1b9(%rip), %rdx       # 0x15e5
leaq 0x1ca6(%rip), %rcx      # 0x30d9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14ca
leaq 0x362(%rip), %rdx       # 0x17a7
leaq 0x1cf7(%rip), %rcx      # 0x3143
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14ca
leaq 0x39d(%rip), %rdx       # 0x17fb
leaq 0x1ce7(%rip), %rcx      # 0x314c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14ca
leaq 0x472(%rip), %rdx       # 0x18e9
leaq 0x1cd8(%rip), %rcx      # 0x3156
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14ca
leaq 0x46f(%rip), %rdx       # 0x18ff
leaq 0x1cc9(%rip), %rcx      # 0x3160
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14ca
leaq 0x58f(%rip), %rdx       # 0x1a38
leaq 0x1cbb(%rip), %rcx      # 0x316b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14ca
xorl %eax, %eax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1bf8(%rip), %rdi      # 0x30e3
movq %rcx, %rsi
xorl %eax, %eax
callq 0x1070
leaq 0x1c96(%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 0x1be3(%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
movl $0x1, %eax
subq %r14, %rax
decq %r14
movq $-0x1, %rcx
leaq (%rax,%rcx), %rdx
cmpq $-0x1, %rdx
je 0x159f
movl 0x4(%r15,%rcx,4), %esi
leaq 0x1(%rcx), %rdx
cmpl 0x8(%r15,%rcx,4), %esi
movq %rdx, %rcx
jle 0x1565
cmpq %rdx, %r14
jbe 0x159f
leaq 0x1b9c(%rip), %rdx      # 0x312a
movl $0x1, %edi
xorl %esi, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10f0
subq %r13, %r12
cvtsi2sd %r12, %xmm0
divsd 0x1a59(%rip), %xmm0     # 0x3008
movsd %xmm0, -0x30(%rbp)
leaq 0x1bf8(%rip), %rdi      # 0x31b3
callq 0x1040
leaq 0x1b6d(%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_O3/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 0x17a6
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r15d
movq %rdx, %rbx
movq %rsi, %rbp
leal (%r15,%rcx), %r12d
shrl %r12d
movl %r12d, %r8d
movq %rdi, (%rsp)
movq %rcx, %r14
callq 0x1622
leal 0x1(%r12), %ecx
movq (%rsp), %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movl %r15d, %r8d
callq 0x1622
movl %r12d, %r13d
movq %r14, 0x10(%rsp)
subl %r14d, %r13d
subl %r12d, %r15d
movl %r14d, %eax
movq (%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
movslq %r13d, %rax
movq %rax, 0x8(%rsp)
leaq 0x4(,%rax,4), %rdx
movq %rbp, %rdi
callq 0x10c0
movl %r12d, %eax
movq (%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
addq $0x4, %rsi
movslq %r15d, %r14
leaq (,%r14,4), %rdx
movq %rbx, %rdi
callq 0x10c0
cmpl $0x0, 0x8(%rsp)
setns %al
testl %r14d, %r14d
setg %sil
andb %al, %sil
xorl %edx, %edx
movl $0x0, %ecx
movq 0x10(%rsp), %rax
movq %rax, %r11
cmpb $0x1, %sil
jne 0x1739
movq %r11, %rdx
movslq %edx, %rax
movq (%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
xorl %ecx, %ecx
movl %edx, %eax
xorl %edx, %edx
movl %edx, %edi
movl %ecx, %r8d
movl %edx, %ecx
movl (%rbp,%rcx,4), %r9d
movl %r8d, %ecx
movl (%rbx,%rcx,4), %r10d
xorl %ecx, %ecx
xorl %edx, %edx
cmpl %r10d, %r9d
setg %cl
setle %dl
cmovll %r9d, %r10d
addl %edi, %edx
addl %r8d, %ecx
movl %r10d, (%rsi)
incl %eax
cmpl %r13d, %edx
jg 0x1739
addq $0x4, %rsi
cmpl %r15d, %ecx
jl 0x16fd
cmpl %r13d, %edx
jg 0x1774
movslq %eax, %rdi
movslq %edx, %rsi
leaq (,%rsi,4), %rsi
addq %rbp, %rsi
subl %edx, %r12d
subl %r11d, %r12d
incl %r12d
movq (%rsp), %rdx
leaq (%rdx,%rdi,4), %rdi
xorl %edx, %edx
movl (%rsi,%rdx,4), %r8d
movl %r8d, (%rdi,%rdx,4)
incq %rdx
cmpl %edx, %r12d
jne 0x1762
addl %edx, %eax
cmpl %r15d, %ecx
jge 0x1798
movslq %eax, %rdx
movslq %ecx, %rax
movq (%rsp), %rcx
leaq (%rcx,%rdx,4), %rcx
movl (%rbx,%rax,4), %edx
incq %rax
movl %edx, (%rcx)
addq $0x4, %rcx
cmpq %r14, %rax
jl 0x1787
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, %rbx
movq %rdi, %r14
movq %rsi, %rax
shrq %rax
decl %eax
js 0x17f0
movl %eax, %r15d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1253
addq $-0x1, %r15
jb 0x17bf
jmp 0x17f0
movl (%r14,%rbx,4), %eax
movl (%r14), %ecx
movl %ecx, (%r14,%rbx,4)
movl %eax, (%r14)
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1253
decq %rbx
jne 0x17d5
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
cmpl %edx, %esi
jge 0x18e8
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
leal 0x1(%rbx), %ebp
movabsq $0x100000000, %r13      # imm = 0x100000000
callq 0x1120
movl %ebp, %ecx
subl %r15d, %ecx
cltd
idivl %ecx
addl %r15d, %edx
movslq %r15d, %rsi
movslq %edx, %rax
movl (%r14,%rsi,4), %ecx
movl (%r14,%rax,4), %edx
movl %edx, (%r14,%rsi,4)
movl %ecx, (%r14,%rax,4)
movl (%r14,%rsi,4), %eax
movl %ebp, %ecx
movslq %ecx, %rcx
movq %rcx, %rdx
shlq $0x20, %rdx
movl -0x4(%r14,%rcx,4), %edi
decq %rcx
addq %r12, %rdx
cmpl %eax, %edi
jg 0x186a
movslq %r15d, %r15
sarq $0x20, %rdx
movq %r15, %r8
shlq $0x20, %r8
addq %r12, %r8
movq %r15, %r10
addq %r13, %r8
movl 0x4(%r14,%r15,4), %r9d
incq %r15
cmpq %rdx, %r10
jge 0x18a2
cmpl %eax, %r9d
jl 0x188a
cmpq %rcx, %r15
jge 0x18b1
movl %edi, (%r14,%r15,4)
movl %r9d, (%r14,%rcx,4)
jmp 0x1860
movl (%r14,%rsi,4), %eax
sarq $0x1e, %r8
movl (%r14,%r8), %ecx
movl %ecx, (%r14,%rsi,4)
movl %eax, (%r14,%r8)
leal -0x2(%r15), %edx
movq %r14, %rdi
callq 0x1802
cmpl %ebx, %r15d
jl 0x1834
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq