LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/uobikiemukot[P]yaft/tools/mkfont_bdf.c
// Function: load_alias
bool load_alias(struct glyph_t *font[], char *alias)
{
	unsigned int dst, src;
	char buf[BUFSIZE];
	FILE *fp;

	if ((fp = efopen(alias, "r")) == NULL)
		return false;

	while (fgets(buf, BUFSIZE, fp) != NULL) {
		if (strlen(buf) == 0 || buf[0] == '#')
			continue;

		sscanf(buf, "%X %X", &dst, &src);
		if ((dst >= UCS2_CHARS) || (src >= UCS2_CHARS))
			continue;

		//if (font[src] != NULL && font[dst] != NULL) {
		if (font[src] != NULL) {
			logging(DEBUG, "swapped: use U+%.4X for U+%.4X\n", src, dst);
			font[dst] = font[src];

			//free(font[dst]->bitmap);
			//font[dst]->width  = font[src]->width;
			//font[dst]->height = font[src]->height;
			//font[dst]->bitmap = font[src]->bitmap;
			//memcpy(font[dst]->bitmap, font[src]->bitmap, sizeof(bitmap_width_t) * font[src]->height);
		}
	}
	efclose(fp);
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x13a8(%rip), %rsi      # 0x3010
movq %rax, %rdi
callq 0x1354
movq %rax, %r14
testq %rax, %rax
je 0x1d01
leaq 0x10(%rsp), %r15
leaq 0x1448(%rip), %r12      # 0x30d0
leaq 0xc(%rsp), %r13
leaq 0x8(%rsp), %rbp
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x10c0
testq %rax, %rax
je 0x1cf9
movzbl 0x10(%rsp), %eax
testl %eax, %eax
je 0x1c92
cmpl $0x23, %eax
je 0x1c92
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x1100
movl 0xc(%rsp), %eax
cmpq $0x10000, %rax          # imm = 0x10000
setae %dl
movl 0x8(%rsp), %ecx
cmpl $0x10000, %ecx          # imm = 0x10000
setae %sil
orb %dl, %sil
jne 0x1c92
movl %ecx, %ecx
movq (%rbx,%rcx,8), %rcx
testq %rcx, %rcx
je 0x1c92
movq %rcx, (%rbx,%rax,8)
jmp 0x1c92
movq %r14, %rdi
callq 0x13be
testq %r14, %r14
setne %al
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/uobikiemukot[P]yaft/tools/mkfont_bdf.c
// Function: check_font
bool check_font(struct glyph_t **font, struct glyph_t *empty_half, struct glyph_t *empty_wide)
{
	empty_half->bitmap = (bitmap_width_t *) ecalloc(font[DEFAULT_CHAR]->height, sizeof(bitmap_width_t));
	empty_wide->bitmap = (bitmap_width_t *) ecalloc(font[DEFAULT_CHAR]->height, sizeof(bitmap_width_t));

	if (!empty_half->bitmap || !empty_wide->bitmap)
		return false;

	empty_half->width  = font[DEFAULT_CHAR]->width;
	empty_wide->width  = font[DEFAULT_CHAR]->width * WIDE;
	empty_half->height = font[DEFAULT_CHAR]->height;
	empty_wide->height = font[DEFAULT_CHAR]->height;

	if (font[SUBSTITUTE_HALF] == NULL) {
		logging(WARN, "half substitute glyph(U+%.4X) not found, use empty glyph\n", SUBSTITUTE_HALF);
		font[SUBSTITUTE_HALF] = empty_half;
	}
	if (font[SUBSTITUTE_WIDE] == NULL) {
		logging(WARN, "wide substitute glyph(U+%.4X) not found, use empty glyph\n", SUBSTITUTE_WIDE);
		font[SUBSTITUTE_WIDE] = empty_wide;
	}
	if (font[REPLACEMENT_CHAR] == NULL) {
		logging(WARN, "replacement glyph(U+%.4X) not found, use empty glyph\n", REPLACEMENT_CHAR);
		font[REPLACEMENT_CHAR] = empty_half;
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x100(%rdi), %rax
movzbl 0x1(%rax), %edi
pushq $0x8
popq %r12
movq %r12, %rsi
callq 0x1404
movq %rax, 0x8(%rbx)
movq 0x100(%r14), %rax
movzbl 0x1(%rax), %edi
movq %r12, %rsi
callq 0x1404
movq %rax, 0x8(%r15)
cmpq $0x0, 0x8(%rbx)
setne %cl
testq %rax, %rax
setne %bpl
andb %cl, %bpl
cmpb $0x1, %bpl
jne 0x1dda
movq 0x100(%r14), %rax
movb (%rax), %cl
movb %cl, (%rbx)
addb %cl, %cl
movb %cl, (%r15)
movb 0x1(%rax), %al
movb %al, 0x1(%rbx)
movb %al, 0x1(%r15)
cmpq $0x0, 0x18000(%r14)
jne 0x1db5
leaq 0x145c(%rip), %rsi      # 0x31fb
pushq $0x1
popq %rdi
movl $0x3000, %edx           # imm = 0x3000
xorl %eax, %eax
callq 0x128c
movq %r15, 0x18000(%r14)
cmpq $0x0, 0x1f8(%r14)
jne 0x1dda
leaq 0x146f(%rip), %rsi      # 0x3235
pushq $0x1
popq %rdi
pushq $0x3f
popq %rdx
xorl %eax, %eax
callq 0x128c
movq %rbx, 0x1f8(%r14)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/uobikiemukot[P]yaft/tools/mkfont_bdf.c
// Function: cleanup
void cleanup(struct glyph_list_t *glist_head, struct glyph_t *empty_half, struct glyph_t *empty_wide)
{
	struct glyph_list_t *listp, *next;

	for (listp = glist_head; listp != NULL; listp = next) {
		next = listp->next;

		free(listp->glyph->bitmap);
		free(listp->glyph);
		free(listp);
	}
	free(empty_half->bitmap);
	free(empty_wide->bitmap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %r15, %r15
je 0x1f95
movq 0x8(%r15), %rax
movq 0x10(%r15), %r12
movq 0x8(%rax), %rdi
callq 0x1030
movq 0x8(%r15), %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
movq %r12, %r15
jmp 0x1f69
movq 0x8(%r14), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/uobikiemukot[P]yaft/tools/mkfont_bdf.c
// Function: main
int main(int argc, char *argv[])
{
	struct glyph_list_t *glist_head = NULL;
	struct glyph_t *font[UCS2_CHARS], default_glyph, empty_wide, empty_half;

	if (!setlocale(LC_ALL, "")) /* set current locale for wcwidth() */
		logging(WARN, "setlocale() failed\n");

	if (argc < 3) {
		logging(FATAL, "usage: ./mkfont ALIAS BDF1 [BDF2] [BDF3] ...\n");
		return EXIT_FAILURE;
	}

	for (int i = 0; i < UCS2_CHARS; i++)
		font[i] = NULL;

	for (int i = 2; i < argc; i++)
		load_bdf_glyph(&glist_head, &default_glyph, argv[i]);

	if (!map_glyph(font, glist_head, &default_glyph)) {
		logging(FATAL, "map_glyph() failed\n");
		goto err_occurred;
	}

	if (!load_alias(font, argv[1]))
		logging(WARN, "font alias does not work\n");

	if (!check_font(font, &empty_half, &empty_wide)) {
		logging(FATAL, "check_font() failed\n");
		goto err_occurred;
	}

	if (!dump_font(font)) {
		logging(FATAL, "dump_font() failed\n");
		goto err_occurred;
	}

	cleanup(glist_head, &empty_half, &empty_wide);
	return EXIT_SUCCESS;

err_occurred:
	cleanup(glist_head, &empty_half, &empty_wide);
	return EXIT_FAILURE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80040, %rsp          # imm = 0x80040
movq %rsi, %r14
movl %edi, %ebx
andq $0x0, 0x8(%rsp)
leaq 0x106f(%rip), %rsi      # 0x3043
pushq $0x6
popq %rdi
callq 0x1110
testq %rax, %rax
jne 0x1ff2
leaq 0x1377(%rip), %rsi      # 0x335f
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x128c
cmpl $0x3, %ebx
jge 0x200d
leaq 0x1375(%rip), %rsi      # 0x3373
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x128c
jmp 0x20fb
xorl %eax, %eax
cmpq $0x10000, %rax          # imm = 0x10000
je 0x2022
andq $0x0, 0x40(%rsp,%rax,8)
incq %rax
jmp 0x200f
movl %ebx, %r12d
pushq $0x2
popq %r13
leaq 0x8(%rsp), %rbx
leaq 0x30(%rsp), %r15
cmpq %r13, %r12
je 0x204c
movq (%r14,%r13,8), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1ad2
incq %r13
jmp 0x2033
movq 0x8(%rsp), %rbx
leaq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %rbx, %rsi
callq 0x1bce
testb %al, %al
je 0x20c6
movq 0x8(%r14), %rsi
leaq 0x40(%rsp), %rdi
callq 0x1c4a
testb %al, %al
jne 0x208a
leaq 0x1335(%rip), %rsi      # 0x33b5
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x128c
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x1d19
testb %al, %al
je 0x20cf
leaq 0x40(%rsp), %rdi
callq 0x1de5
testb %al, %al
je 0x20d8
leaq 0x10(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x1f58
xorl %eax, %eax
jmp 0x20fe
leaq 0x12d4(%rip), %rsi      # 0x33a1
jmp 0x20df
leaq 0x12f9(%rip), %rsi      # 0x33cf
jmp 0x20df
leaq 0x1305(%rip), %rsi      # 0x33e4
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x128c
leaq 0x10(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x1f58
pushq $0x1
popq %rax
addq $0x80040, %rsp          # imm = 0x80040
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/identify/identifyz2.c
// Function: closestNote
char *
closestNote(double freq)
    {
    int i,index = -1;
    for (i = 0; index < 0 && i < 120; ++i)
        {
        if (freq >= freqs[i] && freq < freqs[i+1])
            {
            if (freq - freqs[i] >= freqs[i+1] - freq)
                index = i+1;
            else
                index = i;
            }
        }

    return notes[index];
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %eax, %eax
leaq 0x5df2(%rip), %rcx      # 0x8150
testl %edx, %edx
jns 0x239b
cmpq $0x77, %rax
ja 0x239b
movsd (%rcx,%rax,8), %xmm1
ucomisd %xmm1, %xmm0
jb 0x237f
movsd 0x8(%rcx,%rax,8), %xmm2
ucomisd %xmm0, %xmm2
ja 0x2384
incq %rax
jmp 0x235e
movapd %xmm0, %xmm3
subsd %xmm1, %xmm3
subsd %xmm0, %xmm2
ucomisd %xmm2, %xmm3
movl %eax, %edx
sbbl $-0x1, %edx
jmp 0x237f
movslq %edx, %rax
leaq 0x610b(%rip), %rcx      # 0x84b0
movq (%rcx,%rax,8), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/./IO_stream.h
// Function: fopen_output_stream
FILE *fopen_output_stream(const char *filename) {
	int fd ;
	if (strncmp(filename,"-", 1)==0 || !strcmp(filename,"")) {
		fd = STDOUT_FILENO;
	} else {
		fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666 );
		if (fd==-1) err(1, "Failed to create output file (%s)", filename);
	}
	FILE *out = fdopen(fd,"wb");
	return out;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %eax
pushq $0x1
popq %rdi
testl %eax, %eax
je 0x37fa
cmpl $0x2d, %eax
je 0x37fa
movq %rbx, %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x3530
movl %eax, %edi
cmpl $-0x1, %eax
je 0x3807
leaq 0x13833(%rip), %rsi     # 0x17034
popq %rbx
jmp 0x34c0
leaq 0x13804(%rip), %rsi     # 0x17012
pushq $0x1
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3430
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/./IO_stream.h
// Function: fcreat_outfile
FILE *fcreat_outfile(const char *outfile,const char *suffix) {
	char *out=(char *)calloc(strlen(outfile)+strlen(suffix)+2,sizeof(char));
	sprintf(out,"%s%s",outfile,suffix);
	FILE *fo=fopen_output_stream(out);
	return fo;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x31f0
movq %rax, %r15
movq %rbx, %rdi
callq 0x31f0
leaq (%r15,%rax), %rdi
addq $0x2, %rdi
pushq $0x1
popq %rsi
callq 0x3330
movq %rax, %r15
leaq 0x137e7(%rip), %rsi     # 0x17037
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x35c0
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x37cc
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/./IO_stream.h
// Function: open_output_stream
gzFile open_output_stream(char* filename) {
	int fd ;
	if (strncmp(filename,"-", 1)==0 || !strcmp(filename,"")) {
		fd = STDOUT_FILENO;
	} else {
		fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666 );
		if (fd==-1) err(1, "Failed to create output file (%s)", filename);
	}
	gzFile out = gzdopen(fd,"wb");
	return out;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %eax
pushq $0x1
popq %rdi
testl %eax, %eax
je 0x389b
cmpl $0x2d, %eax
je 0x389b
movq %rbx, %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x3530
movl %eax, %edi
cmpl $-0x1, %eax
je 0x38a8
leaq 0x13792(%rip), %rsi     # 0x17034
popq %rbx
jmp 0x31b0
leaq 0x13763(%rip), %rsi     # 0x17012
pushq $0x1
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3430
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/./IO_stream.h
// Function: open_input_stream
gzFile open_input_stream(const char *filename){
	int fd ;
	if (strncmp(filename,"-", 1)==0 || !strcmp(filename,"")) {
		fd = STDIN_FILENO;
	} else {
		fd = open(filename, O_CREAT | O_RDONLY , 0666 );
		if (fd==-1) err(1, "Failed to create input file (%s)", filename);
	}
	gzFile in = gzdopen(fd,"rb");
	return in;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %eax
xorl %edi, %edi
testl %eax, %eax
je 0x3939
cmpl $0x2d, %eax
je 0x3939
pushq $0x40
popq %rsi
movq %rbx, %rdi
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x3530
movl %eax, %edi
cmpl $-0x1, %eax
je 0x3946
leaq 0x1371d(%rip), %rsi     # 0x1705d
popq %rbx
jmp 0x31b0
leaq 0x136ef(%rip), %rsi     # 0x1703c
pushq $0x1
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3430
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/bam2bedGraph.c
// Function: display_usage
void display_usage(char * argv[]){
	char *buffer=(char* )malloc(8092*sizeof(char));
	const char* usage=
"\nCopyright (c) 2012-2013\n" \
"Contact: XiongXu <xuxiong19880610@163.com> <xiongxu@me.com> \n" \
"Usage: %s [-o OUTFILE] [-r chr1:1-2000000] [-h] bamFile1 bamFile2 ..\n" \
"Discription:\n  This program is used for converting a bam file to wig file format, the bamfile should be samtools indexed. If you don't specify the -r parameter ,the program will convert the whole .bam file by chromosomes\n" \
"Example1:\n  %s -o out -r chr1:1-100000 /share/work1/staff/xuxiong/twins/batch2/test_20131224/RT144FD_L1_I001.R1.clean.fastq.gz_1224/accepted_hits.bam\n" \
"Example2:\n  %s -o out /share/work1/staff/xuxiong/twins/batch2/test_20131224/RT144FD_L1_I001.R1.clean.fastq.gz_1224/accepted_hits.bam\n" \
"\n" \
"   [-o OUTPUT_FILE]  = OUTPUT file.                                   [required]\n" \
"   [-r]              = region, default is whole genome.(chr1:1-20000) [option]\n" \
"   [-h]              = This helpful help screen.                      [option]\n" \
"   Infiles           = bam format input file(s),at least 1 bam file.  [required]\n" \
"\n";
	sprintf(buffer,usage,argv[0],argv[0],argv[0]);
	fprintf(stderr,"%s",buffer);
	exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1f9c, %edi           # imm = 0x1F9C
callq 0x3440
movq %rax, %r14
movq (%rbx), %rcx
leaq 0x136e8(%rip), %rsi     # 0x17060
movq %rax, %rdi
movq %rcx, %rdx
movq %rcx, %r8
xorl %eax, %eax
callq 0x35c0
movq 0x1d669(%rip), %rax     # 0x20ff8
movq (%rax), %rsi
movq %r14, %rdi
callq 0x3270
pushq $0x1
popq %rdi
callq 0x35d0
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/bam2bedGraph.c
// Function: load_bam_index
bam_index_t *load_bam_index(char *filename){
	bam_index_t *idx;
	if ((idx = bam_index_load(filename)) == 0) {
		fprintf(stderr, "bam2bed: BAM indexing file is not available.\n");
		exit(1);
	}
	return idx;
}

// Assembly:
pushq %rax
callq 0xe8d7
testq %rax, %rax
je 0x39af
popq %rcx
retq
movq 0x1d642(%rip), %rax     # 0x20ff8
movq (%rax), %rcx
leaq 0x13a76(%rip), %rdi     # 0x17436
pushq $0x2d
popq %rsi
pushq $0x1
popq %rdx
callq 0x35f0
pushq $0x1
popq %rdi
callq 0x35d0
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/bam2bedGraph.c
// Function: bam_fetch_chr
int bam_fetch_chr(bam_index_t *idx,const char *region,DataBuf *databuf){
	int ref, beg, end;
	bam_parse_region(databuf->fp->header,region, &ref, &beg, &end);
	if (ref < 0) {
		fprintf(stderr, "bam2bed: Invalid region %s\n", globalArgs.region);
		exit(1);
	}
//	fprintf(stderr,"%s\t%d\t%d\n",databuf->fp->header->target_name[ref],beg,end);
	bam_fetch(databuf->fp->x.bam, idx, ref, beg, end, databuf, fetch_func);
	return ref;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq (%rdx), %rax
movq 0x10(%rax), %rdi
leaq 0x1c(%rsp), %r15
leaq 0x18(%rsp), %rcx
leaq 0x14(%rsp), %r8
movq %r15, %rdx
callq 0x8dbe
movl (%r15), %edx
testl %edx, %edx
js 0x3a3b
movq (%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x18(%rsp), %ecx
movl 0x14(%rsp), %r8d
leaq 0x44(%rip), %rax        # 0x3a62
movq %rax, (%rsp)
movq %r14, %rsi
movq %rbx, %r9
callq 0xf3e0
movl 0x1c(%rsp), %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x1d5b6(%rip), %rax     # 0x20ff8
movq (%rax), %rdi
movq 0x1def4(%rip), %rdx     # 0x21940
leaq 0x13a11(%rip), %rsi     # 0x17464
xorl %eax, %eax
callq 0x3370
pushq $0x1
popq %rdi
callq 0x35d0
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/bam2bedGraph.c
// Function: fetch_func
int fetch_func(const bam1_t *b, void *data) {
	DataBuf *databuf=(DataBuf *)data;
	uint32_t *cigar = bam1_cigar(b);
	const bam1_core_t *c = &b->core;
	if (c->flag&BAM_DEF_MASK || b->core.tid < 0) return 0;
	int i, l;
	unsigned int temp_start= c->pos;
	for (i = l = 0; i < c->n_cigar; ++i) {
		int op = bam_cigar_op(cigar[i]);
		if (op == BAM_CINS) continue;
		if ( op == BAM_CDEL || op == BAM_CREF_SKIP){
			l = bam_cigar_oplen(cigar[i]);
			temp_start+=l;
		}
		else if (op == BAM_CMATCH ) {
			l = bam_cigar_oplen(cigar[i]);
			insertInt2Hash(databuf->Start,temp_start);
			temp_start+=l;
			insertInt2Hash(databuf->End,temp_start);
		}
	}
	databuf->chrRC[c->tid]++;
	databuf->chrReadLen[c->tid]+=l;
	return 0;
}

// Assembly:
movq 0x8(%rdi), %rax
movabsq $0x70400000000, %rcx    # imm = 0x70400000000
testq %rcx, %rax
jne 0x3b27
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
js 0x3b19
movq %rsi, %r14
movl %eax, %r15d
shrl $0x18, %r15d
addq 0x30(%rbx), %r15
movl 0x4(%rbx), %ebp
xorl %r12d, %r12d
xorl %ecx, %ecx
movq %rax, %rdx
shrq $0x30, %rdx
cmpq %rdx, %r12
jae 0x3b02
movl (%r15,%r12,4), %r13d
movl %r13d, %edx
andl $0xf, %edx
cmpl $0x1, %edx
je 0x3afd
movl %r13d, %esi
andl $0xe, %esi
cmpl $0x2, %esi
jne 0x3ad5
shrl $0x4, %r13d
addl %r13d, %ebp
jmp 0x3afa
testl %edx, %edx
jne 0x3afd
shrl $0x4, %r13d
movq 0x8(%r14), %rdi
movl %ebp, %esi
callq 0x4207
addl %r13d, %ebp
movq 0x10(%r14), %rdi
movl %ebp, %esi
callq 0x4207
movq 0x8(%rbx), %rax
movl %r13d, %ecx
incq %r12
jmp 0x3aa6
movq 0x18(%r14), %rax
movslq (%rbx), %rdx
incl (%rax,%rdx,4)
movl %ecx, %eax
movq 0x20(%r14), %rcx
movslq (%rbx), %rdx
addq %rax, (%rcx,%rdx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/./int2sds.h
// Function: sds2int
uint32_t sds2int(const sds string){
	uint32_t pos=0;
	int8_t i;
	for (i=sdslen(string)-1; i>=0 ;i-- ){
		pos=pos << 8 | (unsigned char)string[i];
	}
	return pos;
}

// Assembly:
movzbl -0x8(%rdi), %ecx
decq %rcx
xorl %eax, %eax
testb %cl, %cl
js 0x3b6d
shll $0x8, %eax
movl %ecx, %edx
andl $0x7f, %edx
movzbl (%rdi,%rdx), %edx
orl %edx, %eax
decq %rcx
jmp 0x3b56
retq
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/bam2bedGraph.c
// Function: union_hashed_keys
sds *union_hashed_keys(dict *hashtbl_a,dict *hashtbl_b){
	sds *keys=(sds *)calloc((hashtbl_a->used+hashtbl_b->used),sizeof(sds));
	int j=0;
	dictIterator *iter=dictGetIterator(hashtbl_a);
	dictEntry *entry=dictNext(iter);
	for (;entry;entry=dictNext(iter) ){
		keys[j++]=(sds)(entry->key);
	}
	dictReleaseIterator(iter);

	iter=dictGetIterator(hashtbl_b);
	entry=dictNext(iter);
	for (;entry;entry=dictNext(iter) ){
		keys[j++]=(sds)(entry->key);
	}
	dictReleaseIterator(iter);
	qsort(keys,j,sizeof(sds),cmpInt);
	return keys;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq 0x20(%rsi), %rdi
addq 0x20(%r15), %rdi
pushq $0x8
popq %rsi
callq 0x3330
movq %rax, %rbx
movq %r15, %rdi
callq 0x557a
movq %rax, %r15
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x5596
testq %rax, %rax
je 0x3bb6
movq (%rax), %rax
movq %rax, (%rbx,%r12,8)
incq %r12
jmp 0x3b9d
movq %r15, %rdi
callq 0x55d4
movq %r14, %rdi
callq 0x557a
movq %rax, %r14
movq %r14, %rdi
callq 0x5596
testq %rax, %rax
je 0x3be2
movq (%rax), %rax
movq %rax, (%rbx,%r12,8)
incq %r12
jmp 0x3bc9
movq %r14, %rdi
callq 0x55d4
movl %r12d, %esi
leaq -0xca(%rip), %rcx       # 0x3b2a
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x3110
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/bam2bedGraph.c
// Function: region_sam2wig
void region_sam2wig(DataBuf *databuf ,bam_index_t *idx,const char *region,FILE *bedGraph,dictType *mydictType){
	databuf->Start=dictCreate(mydictType,NULL);
	databuf->End=dictCreate(mydictType,NULL);
	int ref=bam_fetch_chr(idx,region,databuf);
	hash2BedGraph(databuf,ref,bedGraph);
	dictRelease(databuf->Start);
	dictRelease(databuf->End);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movq %r8, %rdi
xorl %esi, %esi
callq 0x50d8
movq %rax, 0x8(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x50d8
movq %rax, 0x10(%rbx)
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x39d3
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
callq 0x3c0e
movq 0x8(%rbx), %rdi
callq 0x54ec
movq 0x10(%rbx), %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x54ec
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/bam2bedGraph.c
// Function: insertInt2Hash
int insertInt2Hash(dict *Start,uint32_t pos) {
	sds value=int2sds(pos);
	dictEntry *val_data=dictFind(Start,value);
	if (val_data==NULL) {
		int *init=(int *)malloc(sizeof(int));
		*init=1;
		dictAdd(Start,value,init);
	}
	else{
		(*(int *)val_data->val)++;
	}
	sdsfree(value);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0xffffff, %esi         # imm = 0xFFFFFF
jbe 0x421f
pushq $0x4
jmp 0x4229
cmpl $0xffff, %ebp           # imm = 0xFFFF
jbe 0x422d
pushq $0x3
popq %r15
jmp 0x423b
cmpl $0x100, %ebp            # imm = 0x100
pushq $0x1
popq %r15
sbbq $-0x1, %r15
xorl %edi, %edi
movq %r15, %rsi
callq 0x42ac
movq %rax, %r14
leal -0x8(,%r15,8), %ecx
testq %r15, %r15
jle 0x4266
movl %ebp, %eax
shrl %cl, %eax
movb %al, -0x1(%r14,%r15)
decq %r15
addl $-0x8, %ecx
jmp 0x4250
movq %rbx, %rdi
movq %r14, %rsi
callq 0x53ad
testq %rax, %rax
je 0x427e
movq 0x8(%rax), %rax
incl (%rax)
jmp 0x429a
pushq $0x4
popq %rdi
callq 0x3440
movl $0x1, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x5239
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x434e
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/hiredis/./dict.c
// Function: dictExpand
int dictExpand(dict *ht, unsigned long size) {
    dict n; /* the new hashtable */
    unsigned long realsize = _dictNextPower(size), i;

    /* the size is invalid if it is smaller than the number of
     * elements already inside the hashtable */
    if (ht->used > size)
        return DICT_ERR;

    _dictInit(&n, ht->type, ht->privdata);
    n.size = realsize;
    n.sizemask = realsize-1;
    n.table = calloc(realsize,sizeof(dictEntry*));

    /* Copy all the elements from the old to the new table:
     * note that if the old hash table is empty ht->size is zero,
     * so dictExpand just creates an hash table. */
    n.used = ht->used;
    for (i = 0; i < ht->size && ht->used > 0; i++) {
        dictEntry *he, *nextHe;

        if (ht->table[i] == NULL) continue;

        /* For each hash entry on this slot... */
        he = ht->table[i];
        while(he) {
            unsigned int h;

            nextHe = he->next;
            /* Get the new element index */
            h = dictHashKey(ht, he->key) & n.sizemask;
            he->next = n.table[h];
            n.table[h] = he;
            ht->used--;
            /* Pass to the next element */
            he = nextHe;
        }
    }
    assert(ht->used == 0);
    free(ht->table);

    /* Remap the new hashtable in the old */
    *ht = n;
    return DICT_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movabsq $0x7ffffffffffffffe, %r14 # imm = 0x7FFFFFFFFFFFFFFE
cmpq %r14, %rsi
jbe 0x512f
incq %r14
jmp 0x513d
pushq $0x4
popq %rax
movq %rax, %r14
addq %rax, %rax
cmpq %rsi, %r14
jb 0x5132
movq 0x20(%rbx), %r12
cmpq %rsi, %r12
jbe 0x514e
pushq $0x1
popq %rax
jmp 0x520b
movq 0x8(%rbx), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq -0x1(%r14), %r13
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x3330
movq %rax, %r15
movq %r12, 0x18(%rsp)
movq %r12, %rax
xorl %edx, %edx
cmpq 0x10(%rbx), %rdx
jae 0x51d6
testq %rax, %rax
je 0x51db
movq (%rbx), %rcx
movq %rdx, 0x20(%rsp)
movq (%rcx,%rdx,8), %r12
testq %r12, %r12
jne 0x51c7
jmp 0x51cc
movq (%r12), %rdi
movq 0x10(%r12), %rbp
movq 0x8(%rbx), %rax
callq *(%rax)
andl %r13d, %eax
movq (%r15,%rax,8), %rcx
movq %rcx, 0x10(%r12)
movq %r12, (%r15,%rax,8)
movq 0x20(%rbx), %rax
decq %rax
movq %rax, 0x20(%rbx)
movq %rbp, %r12
testq %r12, %r12
jne 0x519a
movq 0x20(%rsp), %rdx
incq %rdx
jmp 0x517c
testq %rax, %rax
jne 0x521a
movq (%rbx), %rdi
callq 0x3060
movq %r15, (%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movq %r13, 0x18(%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rbx)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x123de(%rip), %rdi     # 0x175ff
leaq 0x123e5(%rip), %rsi     # 0x1760d
leaq 0x123e7(%rip), %rcx     # 0x17616
movl $0x9d, %edx
callq 0x3260
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/hiredis/./dict.c
// Function: dictAdd
int dictAdd(dict *ht, void *key, void *val) {
    int index;
    dictEntry *entry;

    /* Get the index of the new element, or -1 if
     * the element already exists. */
    if ((index = _dictKeyIndex(ht, key)) == -1)
        return DICT_ERR;

    /* Allocates the memory and stores key */
    entry = malloc(sizeof(*entry));
    entry->next = ht->table[index];
    ht->table[index] = entry;

    /* Set the hash entry fields. */
    dictSetHashKey(ht, entry, key);
    dictSetHashVal(ht, entry, val);
    ht->used++;
    return DICT_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
pushq $0x1
popq %rbp
testq %rsi, %rsi
je 0x5264
cmpq %rsi, 0x20(%rbx)
jne 0x5277
addq %rsi, %rsi
jmp 0x5267
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x510a
testl %eax, %eax
jne 0x532a
movq 0x8(%rbx), %rax
movq %r15, %rdi
callq *(%rax)
movl %eax, %r12d
andl 0x18(%rbx), %r12d
leaq (,%r12,8), %r13
addq (%rbx), %r13
movq (%r13), %r13
testq %r13, %r13
je 0x52c7
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x52bb
movq 0x28(%rbx), %rdi
movq (%r13), %rdx
movq %r15, %rsi
callq *%rax
testl %eax, %eax
jne 0x52c1
jmp 0x532a
cmpq %r15, (%r13)
jne 0x532a
addq $0x10, %r13
jmp 0x5292
cmpl $-0x1, %r12d
je 0x532a
pushq $0x18
popq %rdi
callq 0x3440
movq %rax, %r13
movq (%rbx), %rax
movslq %r12d, %rcx
movq (%rax,%rcx,8), %rdx
movq %rdx, 0x10(%r13)
movq %r13, (%rax,%rcx,8)
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x5307
movq 0x28(%rbx), %rdi
movq %r15, %rsi
callq *%rcx
movq %rax, %r15
movq 0x8(%rbx), %rax
movq %r15, (%r13)
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x5320
movq 0x28(%rbx), %rdi
movq %r14, %rsi
callq *%rax
movq %rax, %r14
movq %r14, 0x8(%r13)
incq 0x20(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/hiredis/./dict.c
// Function: dictDelete
int dictDelete(dict *ht, const void *key) {
    unsigned int h;
    dictEntry *de, *prevde;

    if (ht->size == 0)
        return DICT_ERR;
    h = dictHashKey(ht, key) & ht->sizemask;
    de = ht->table[h];

    prevde = NULL;
    while(de) {
        if (!dictCompareHashKeys(ht,key,de->key)) {
            /* Unlink the element from the list */
            if (prevde)
                prevde->next = de->next;
            else
                ht->table[h] = de->next;

            dictFreeEntryKey(ht,de);
            dictFreeEntryVal(ht,de);
            free(de);
            ht->used--;
            return DICT_OK;
        }
        prevde = de;
        de = de->next;
    }
    return DICT_ERR; /* not found */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $0x1
popq %rbp
cmpq $0x0, 0x10(%rdi)
je 0x54db
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq %rsi, %rdi
callq *(%rax)
movl %eax, %r12d
andl 0x18(%rbx), %r12d
shlq $0x3, %r12
movq (%rbx), %rax
addq %r12, %rax
xorl %r13d, %r13d
movq (%rax), %r14
testq %r14, %r14
je 0x54db
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x5479
movq 0x28(%rbx), %rdi
movq (%r14), %rdx
movq %r15, %rsi
callq *%rax
testl %eax, %eax
jne 0x547e
jmp 0x5487
cmpq %r15, (%r14)
jne 0x5487
leaq 0x10(%r14), %rax
movq %r14, %r13
jmp 0x544e
movq 0x10(%r14), %rax
testq %r13, %r13
je 0x5496
addq $0x10, %r13
jmp 0x549c
addq (%rbx), %r12
movq %r12, %r13
movq %rax, (%r13)
movq 0x8(%rbx), %rcx
movq 0x20(%rcx), %rax
testq %rax, %rax
je 0x54ba
movq 0x28(%rbx), %rdi
movq (%r14), %rsi
callq *%rax
movq 0x8(%rbx), %rcx
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x54cd
movq 0x28(%rbx), %rdi
movq 0x8(%r14), %rsi
callq *%rax
movq %r14, %rdi
callq 0x3060
decq 0x20(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xiongxu[P]bam2bedGraph2/hiredis/hiredis.c
// Function: redisFree
void redisFree(redisContext *c) {
    if (c == NULL)
        return;
    if (c->fd > 0)
        close(c->fd);
    if (c->obuf != NULL)
        sdsfree(c->obuf);
    if (c->reader != NULL)
        redisReaderFree(c->reader);
    free(c);
}

// Assembly:
testq %rdi, %rdi
je 0x79a8
pushq %rbx
movq %rdi, %rbx
movl 0x84(%rdi), %edi
testl %edi, %edi
jle 0x797d
callq 0x32a0
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x798e
callq 0x434e
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x799f
callq 0x69e8
movq %rbx, %rdi
popq %rbx
jmp 0x3060
retq
// File: /workspace/github_c_makefile_star2_O2/timocramer[P]thinklight-fun/tl-onofftoggle.c
// Function: main
int main(void) {
	if(tl_init()) {
		write(2, ERROR_MESSAGE, sizeof(ERROR_MESSAGE) - 1);
		return 1;
	}
	
#ifdef ON
	tl_on();
#elif defined OFF
	tl_off();
#elif defined TOGGLE
	tl_toggle();
#endif
	
	tl_deinit();
	return 0;
}

// Assembly:
pushq %rax
callq 0x119c
testl %eax, %eax
je 0x118d
leaq 0xe87(%rip), %rsi       # 0x2004
pushq $0x2
popq %rdi
pushq $0x22
popq %rdx
callq 0x1030
pushq $0x1
popq %rax
jmp 0x1199
callq 0x11d4
callq 0x11bc
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_17/sort.c
// Function: fieldscmp
int fieldscmp(const char *s1, const char *s2)
{
  int i = 0;
  while (i < nr_of_fields)
  {
    size_t start_s1 = str_nth_blank_pos(s1, fields_options[i][INDEX] - 1);
    size_t end_s1 = str_nth_blank_pos(s1, fields_options[i][INDEX]);
    char *field_s1 = substr(s1, start_s1, end_s1);

    size_t start_s2 = str_nth_blank_pos(s2, fields_options[i][INDEX] - 1);
    size_t end_s2 = str_nth_blank_pos(s2, fields_options[i][INDEX]);
    char *field_s2 = substr(s2, start_s2, end_s2);

    comp = fields_comp[i];
    order = fields_options[i][ORDER];
    fold = fields_options[i][FOLD];
    directory = fields_options[i][DIRECTORY];

    int comp_result = comp(field_s1, field_s2);

    afree(field_s1);
    afree(field_s2);

    if (comp_result == 0)
    {
      ++i;
    }
    else
    {
      return comp_result;
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
leaq 0x32a5(%rip), %rax      # 0x4a00
addq $0x2710, %rax           # imm = 0x2710
movq %rax, (%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
movslq 0x2927(%rip), %rax      # 0x4098
cmpq %rax, %r14
jge 0x187c
leaq 0x291f(%rip), %rax      # 0x40a0
movslq (%rax,%rbx,2), %r12
movq %rax, %rbp
leaq -0x1(%r12), %rsi
movq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x188d
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x188d
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x18dc
movq %rax, %r12
movslq (%rbp,%rbx,2), %r13
leaq -0x1(%r13), %rsi
movq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x188d
movq %rax, %rbp
movq %r15, %rdi
movq %r13, %rsi
callq 0x188d
movq %r15, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x18dc
movq %rax, %r13
leaq 0x2eeb(%rip), %rax      # 0x46e0
movq (%rbx,%rax), %rax
movq %rax, 0x2870(%rip)      # 0x4070
leaq 0x2899(%rip), %rsi      # 0x40a0
movl 0x4(%rsi,%rbx,2), %ecx
movl 0x8(%rsi,%rbx,2), %edx
movl %ecx, 0x2853(%rip)      # 0x4068
movl %edx, 0x2875(%rip)      # 0x4090
movl 0xc(%rsi,%rbx,2), %ecx
movl %ecx, 0x286f(%rip)      # 0x4094
movq %r12, %rdi
movq %r13, %rsi
callq *%rax
leaq 0x31cc(%rip), %rcx      # 0x4a00
cmpq %rcx, %r12
setae %dl
movq (%rsp), %r8
cmpq %r8, %r12
setb %sil
cmpq %rcx, %r13
setae %dil
cmpq %r8, %r13
setb %cl
andb %dil, %cl
testb %sil, %dl
jne 0x185e
testb %cl, %cl
je 0x186b
testb %cl, %cl
cmovneq %r13, %r12
movq %r12, 0x280d(%rip)      # 0x4078
incq %r14
addq $0x8, %rbx
testl %eax, %eax
je 0x176a
jmp 0x187e
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_17/sort.c
// Function: str_nth_blank_pos
size_t str_nth_blank_pos(const char *s, size_t n)
{
  size_t pos = 0;
  while (n && *s != '\0')
  {
    if (*s == ' ' || *s == '\t')
    {
      do
      {
        ++pos;
        ++s;
      } while (*s == ' ' || *s == '\t');

      --n;
    }
    else
    {
      ++pos;
      ++s;
    }
  }

  return pos;
}

// Assembly:
xorl %ecx, %ecx
movq %rcx, %rax
movq %rdi, %rdx
incq %rdi
incq %rcx
testq %rsi, %rsi
je 0x18db
movzbl (%rdx), %r8d
testl %r8d, %r8d
je 0x18db
cmpl $0x20, %r8d
je 0x18c9
cmpl $0x9, %r8d
je 0x18c9
incq %rax
incq %rdx
incq %rdi
incq %rcx
jmp 0x189b
incq %rdi
incq %rcx
movzbl (%rdi), %eax
cmpl $0x20, %eax
je 0x18c3
cmpl $0x9, %eax
je 0x18c3
decq %rsi
jmp 0x188f
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_17/sort.c
// Function: substr
char *substr(const char *s, size_t start, size_t end)
{
  if (start > end)
  {
    return NULL;
  }

  const size_t len = end - start;
  char *dest = alloc(len + 1);

  for (size_t i = start; i < end && s[i] != '\0'; ++i)
  {
    *dest = s[i];
    ++dest;
  }
  *dest = '\0';

  return dest - len;
}

// Assembly:
movq %rdx, %rcx
subq %rsi, %rcx
jae 0x18e7
xorl %eax, %eax
retq
incq %rcx
movq 0x2787(%rip), %rax      # 0x4078
leaq 0x3108(%rip), %r8       # 0x4a00
subq %rax, %r8
addq $0x2710, %r8            # imm = 0x2710
cmpq %rcx, %r8
jae 0x190b
xorl %eax, %eax
jmp 0x1915
addq %rax, %rcx
movq %rcx, 0x2763(%rip)      # 0x4078
movq %rax, %rcx
cmpq %rdx, %rsi
jae 0x1931
movb (%rdi,%rsi), %r8b
testb %r8b, %r8b
je 0x1931
movb %r8b, (%rcx)
incq %rcx
incq %rsi
jmp 0x1918
movb $0x0, (%rcx)
subq %rdx, %rax
addq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_2/exercise_2_03/htoi.c
// Function: get_line
int get_line(char line[], int lim)
{
  char c;
  int i = 0;
  while (i < lim - 1 && (c = getchar()) != EOF && c != '\n')
  {
    line[i++] = c;
  }

  line[i] = '\0';

  return i;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x2, %esi
pushq $0x1
popq %r14
cmovgel %esi, %r14d
decl %r14d
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x120d
callq 0x1070
cmpb $0xa, %al
je 0x120a
movzbl %al, %ecx
cmpl $0xff, %ecx
je 0x120a
movb %al, (%rbx,%r15)
incq %r15
jmp 0x11e8
movl %r15d, %r14d
movl %r14d, %eax
movb $0x0, (%rbx,%rax)
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_2/exercise_2_03/htoi.c
// Function: htoi
int htoi(char hex[])
{
  int result = 0;

  int i = 0, len = strlen(hex);

  while (i < len)
  {
    if (hex[i] == '0' && (hex[i + 1] == 'x' || hex[i + 1] == 'X'))
    {
      i += 2;
    }

    int temp = tolower(hex[i]);

    if (isdigit(temp))
    {
      temp -= 48;
    }

    if (isalpha(temp) && temp <= 'f')
    {
      temp = temp - 'a' + 10;
    }

    if ((hex[i] >= '0' && hex[i] <= '9') || (hex[i] >= 'a' && hex[i] <= 'f') || (hex[i] >= 'A' && hex[i] <= 'F'))
    {
      result += temp * (int)pow(16, len - i - 1);
    }
    else
    {
      printf("Error: Not a valid hex value.\n Try this format: 0xHHHH, where H is a hex digit.\n");
    }

    ++i;
  }

  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1050
movq %rax, %r14
xorl %r13d, %r13d
xorl %ebp, %ebp
movq %rbx, (%rsp)
cmpl %r14d, %r13d
jge 0x1310
movslq %r13d, %rax
movb (%rbx,%rax), %r15b
cmpb $0x30, %r15b
jne 0x1270
movzbl 0x1(%rbx,%rax), %ecx
orl $0x20, %ecx
cmpl $0x78, %ecx
jne 0x126d
movb 0x2(%rbx,%rax), %r15b
addq $0x2, %rax
movl %eax, %r13d
jmp 0x1270
movb $0x30, %r15b
callq 0x1080
movq (%rax), %rax
movsbq %r15b, %rbx
movslq (%rax,%rbx,4), %r12
callq 0x1090
movq (%rax), %rax
leal -0x30(%r12), %ecx
testb $0x8, 0x1(%rax,%r12,2)
cmovel %r12d, %ecx
movslq %ecx, %rcx
leal -0x57(%rcx), %r12d
cmpl $0x67, %ecx
cmovgel %ecx, %r12d
testb $0x4, 0x1(%rax,%rcx,2)
cmovel %ecx, %r12d
addb $-0x30, %bl
cmpb $0xa, %bl
jb 0x12d2
movzbl %r15b, %eax
addl $-0x41, %eax
cmpl $0x25, %eax
ja 0x1302
movabsq $0x3f0000003f, %rcx     # imm = 0x3F0000003F
btq %rax, %rcx
jae 0x1302
movl %r13d, %eax
notl %eax
addl %r14d, %eax
cvtsi2sd %eax, %xmm0
mulsd 0xd22(%rip), %xmm0      # 0x2008
callq 0x1030
cvttsd2si %xmm0, %eax
imull %eax, %r12d
addl %r12d, %ebp
incl %r13d
movq (%rsp), %rbx
jmp 0x123c
leaq 0xd0a(%rip), %rdi       # 0x2013
callq 0x1040
jmp 0x12f6
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vanhauser-thc[P]vulntest/use_after_free.c
// Function: main
int main(int argc, char *argv[]) {
  str container;

  container.foo.a = 0;
  if ((container.foo.b = (char *)malloc(256 * sizeof(char))) != NULL) {
    strcpy(container.foo.b, "Falut!");
    container.foo.b[0] = 'S';
    printf("%s\n", container.foo.b);
    free(container.foo.b);
    if (container.foo.b)
      container.foo.b[0] = 'S';
  }
  return 0;
}

// Assembly:
pushq %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x1050
testq %rax, %rax
je 0x118f
movq %rax, %rbx
movl $0x756c6146, (%rax)     # imm = 0x756C6146
movl $0x217475, 0x3(%rax)    # imm = 0x217475
movb $0x53, (%rax)
movq %rax, %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/tests/test_matrix.c
// Function: print_matrix
static void print_matrix(const parasail_matrix_t *matrix) {
    int i = 0;
    int j = 0;
    const char *alphabet = NULL;
    alphabet = matrix->alphabet;

    printf("matrix '%s'\n", matrix->name);
    printf("  ");
    for (i=0; i<matrix->size; ++i) {
        printf("%4c", alphabet[i]);
    }
    printf("\n");
    for (j=0; j<matrix->length; ++j) {
        if (matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) {
            printf("%c ", alphabet[j]);
        }
        else {
            if (matrix->query != NULL) {
                printf("%c ", matrix->query[j]);
            }
            else {
                printf("* ");
            }
        }
        for (i=0; i<matrix->size; ++i) {
            printf("%4d", matrix->matrix[j*matrix->size + i]);
        }
        printf("\n");
    }
    printf("max = %d\n", matrix->max);
    printf("min = %d\n", matrix->min);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x38(%rdi), %r13
leaq 0x2d433(%rip), %rdi     # 0x329b4
xorl %eax, %eax
callq 0x5090
leaq 0x4afc(%rip), %rdi      # 0xa08b
xorl %eax, %eax
callq 0x5090
leaq 0x4af1(%rip), %r14      # 0xa08e
xorl %r15d, %r15d
movslq 0x18(%rbx), %rax
cmpq %rax, %r15
jge 0x55be
movsbl (%r13,%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x5090
incq %r15
jmp 0x55a0
pushq $0xa
popq %rbp
movl %ebp, %edi
callq 0x5050
leaq 0x4aca(%rip), %r15      # 0xa099
xorl %r12d, %r12d
movslq 0x34(%rbx), %rax
cmpq %rax, %r12
jge 0x564b
cmpl $0x0, 0x30(%rbx)
je 0x55f1
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x5607
movsbl (%rax,%r12), %esi
jmp 0x55f7
movsbl (%r13,%r12), %esi
leaq 0x4a94(%rip), %rdi      # 0xa092
xorl %eax, %eax
callq 0x5090
jmp 0x5615
leaq 0x4a88(%rip), %rdi      # 0xa096
xorl %eax, %eax
callq 0x5090
xorl %r14d, %r14d
movl 0x18(%rbx), %eax
cmpl %eax, %r14d
jge 0x563f
movq 0x8(%rbx), %rcx
imull %r12d, %eax
addl %r14d, %eax
cltq
movl (%rcx,%rax,4), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x5090
incl %r14d
jmp 0x5618
movl %ebp, %edi
callq 0x5050
incq %r12
jmp 0x55d2
movl 0x1c(%rbx), %esi
leaq 0x4a48(%rip), %rdi      # 0xa09d
xorl %eax, %eax
callq 0x5090
movl 0x20(%rbx), %esi
leaq 0x4a41(%rip), %rdi      # 0xa0a7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5090
// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/tests/test_matrix.c
// Function: print_mapper
static void print_mapper(const parasail_matrix_t *matrix) {
    int i = 0;
    const int *mapper = matrix->mapper;

    for (i=0; i<256; ++i) {
        if (i%16 == 0) printf("\n");
        printf("%5d", mapper[i]);
    }
    printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rdi), %r15
pushq $0xa
popq %rbx
leaq 0x4a20(%rip), %r14      # 0xa0b1
xorl %r12d, %r12d
cmpq $0x100, %r12            # imm = 0x100
je 0x56bd
testb $0xf, %r12b
jne 0x56aa
movl %ebx, %edi
callq 0x5050
movl (%r15,%r12,4), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x5090
incq %r12
jmp 0x5694
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5050
// File: /workspace/github_c_makefile_star2_O2/stefpant[P]TCPserver/webserver/functions.c
// Function: analyze_request
int analyze_request(char* request,char **req_page){
	if(request == NULL) return -1;//bad request
	int start=0;
	char *word;
	short flagGET=0,flagCON=0,flagHOST=0;//flagUA=0,flagACL=0,flagACE=0;
	while(start!=-1){
		word = NULL;
		start = nextWord(request,&word,start);//save word
		if(start == -2) break;//request was empty
		if( !strcmp(word,"GET") ){
			flagGET=1;
			start = nextWord(request,req_page,start);//save req_page
			free(word);
			word=NULL;
			start = nextWord(request,&word,start);//check protocol
			if( strcmp(word,"HTTP/1.1") ){
				free(word);
				break;
			}
		}
		else if( !strcmp(word,"Host:") ) flagHOST=1;
		//else if( !strcmp(word,"User-Agent:") ) flagUA=1;
		//else if( !strcmp(word,"Accept-Language:") ) flagACL=1;
		//else if( !strcmp(word,"Accept-Encoding:") ) flagACE=1;
		else if( !strcmp(word,"Connection:") ) flagCON=1;
		free(word);
	}

	//if(flagGET && flagCON && flagUA && flagHOST && flagACL && flagACE)
	if(flagGET && flagCON &&  flagHOST)
		return 0;//OK

	return -1;//error missing one header
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x40(%rbp)
testq %rdi, %rdi
je 0x2884
movq %rdi, %r14
xorl %r13d, %r13d
leaq -0x38(%rbp), %r15
movl $0x0, -0x30(%rbp)
xorl %r12d, %r12d
movl $0x0, -0x2c(%rbp)
cmpl $-0x1, %r13d
je 0x2862
andq $0x0, -0x38(%rbp)
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x247a
cmpl $-0x2, %eax
je 0x2862
movl %eax, %r13d
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
leaq 0x183c(%rip), %rsi      # 0x4004
callq 0x2180
testl %eax, %eax
je 0x27fe
movq %rbx, %rdi
leaq 0x1836(%rip), %rsi      # 0x4011
callq 0x2180
testl %eax, %eax
je 0x284e
movq %rbx, %rdi
leaq 0x1829(%rip), %rsi      # 0x4017
callq 0x2180
testl %eax, %eax
pushq $0x1
popq %rax
cmovel %eax, %r12d
jmp 0x2855
movq %r14, %rdi
movq -0x40(%rbp), %rsi
movl %r13d, %edx
callq 0x247a
movl %eax, %r13d
movq %rbx, %rdi
callq 0x2030
andq $0x0, -0x38(%rbp)
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x247a
movl %eax, %r13d
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
leaq 0x17cc(%rip), %rsi      # 0x4008
callq 0x2180
testl %eax, %eax
jne 0x2896
movw $0x1, %ax
movl %eax, -0x30(%rbp)
jmp 0x2855
movw $0x1, %ax
movl %eax, -0x2c(%rbp)
movq %rbx, %rdi
callq 0x2030
jmp 0x2791
cmpw $0x0, -0x30(%rbp)
sete %al
testw %r12w, %r12w
sete %cl
orb %al, %cl
cmpw $0x0, -0x2c(%rbp)
sete %al
orb %cl, %al
movzbl %al, %eax
negl %eax
jmp 0x2887
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2030
xorl %eax, %eax
jmp 0x286a
// File: /workspace/github_c_makefile_star2_O2/stefpant[P]TCPserver/webserver/functions.c
// Function: copy_page
char* copy_page(char *page,int* count){
	*count=0;
	FILE *fp = fopen(page,"r");
	int maxlen = 20;
	char c;
	char* cppage = malloc(20*sizeof(char));
	while( 1 ){
		if(*count == maxlen){
			maxlen*=2;
			cppage = realloc(cppage,maxlen*sizeof(char));
		}
		c = fgetc(fp);
		if( !feof(fp) )
			cppage[*count] = c;
		else{
			cppage[*count] = '\0';
			break;
		}
		(*count)++;
	}
	fclose(fp);
	cppage = realloc(cppage,(*count + 1)*sizeof(char));
	return cppage;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
andl $0x0, (%rsi)
leaq 0x1766(%rip), %rsi      # 0x4023
callq 0x22a0
movq %rax, %r14
pushq $0x14
popq %rdi
callq 0x21e0
movq %rax, %r15
movl (%rbx), %r12d
pushq $0x14
popq %r13
cmpl %r13d, %r12d
jne 0x28f0
addl %r12d, %r12d
movslq %r12d, %rsi
movq %r15, %rdi
callq 0x2210
movq %rax, %r15
movl %r12d, %r13d
movq %r14, %rdi
callq 0x2120
movl %eax, %r12d
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
jne 0x2919
movslq (%rbx), %rax
movb %r12b, (%r15,%rax)
movl (%rbx), %r12d
incl %r12d
movl %r12d, (%rbx)
jmp 0x28d7
movslq (%rbx), %rax
movb $0x0, (%r15,%rax)
movq %r14, %rdi
callq 0x20d0
movslq (%rbx), %rsi
incq %rsi
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2210
// File: /workspace/github_c_makefile_star2_O2/stefpant[P]TCPserver/webserver/webserver.c
// Function: reqArray_init
void reqArray_init(reqArray** ra){
	(*ra) = malloc(sizeof(reqArray));
	(*ra)->fds = malloc(MAXR*sizeof(int));
	(*ra)->start = 0;
	(*ra)->end = -1;
	(*ra)->count = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x21e0
movq %rax, %r14
movq %rax, (%rbx)
movl $0xc8, %edi
callq 0x21e0
movq %rax, (%r14)
orl $-0x1, 0x10(%r14)
andq $0x0, 0x8(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stefpant[P]TCPserver/webserver/webserver.c
// Function: place
void place(reqArray** ra,int fd){// place request in buffer
	pthread_mutex_lock(&mtx);
	while((*ra)->count>=MAXR){
		//printf("Pool found full\n");
		pthread_cond_wait(&cv_notfull,&mtx);
	}
	(*ra)->end = ((*ra)->end+1)%MAXR;
	(*ra)->fds[(*ra)->end] = fd;
	//printf("placed: %d\n",(*ra)->fds[(*ra)->end]);
	(*ra)->count++;
	pthread_mutex_unlock(&mtx);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0x308f(%rip), %r15      # 0x61d0
movq %r15, %rdi
callq 0x2340
leaq 0x30a8(%rip), %r12      # 0x61f8
movq (%r14), %rcx
cmpl $0x32, 0x8(%rcx)
jl 0x3166
movq %r12, %rdi
movq %r15, %rsi
callq 0x20c0
jmp 0x3150
movl 0x10(%rcx), %eax
incl %eax
pushq $0x32
popq %rsi
cltd
idivl %esi
movl %edx, 0x10(%rcx)
movq (%rcx), %rax
movslq %edx, %rdx
movl %ebx, (%rax,%rdx,4)
incl 0x8(%rcx)
leaq 0x3049(%rip), %rdi      # 0x61d0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21d0
// File: /workspace/github_c_makefile_star2_O2/stefpant[P]TCPserver/webserver/webserver.c
// Function: obtain
int obtain(reqArray** ra){//get request from buffer
	int data;
	pthread_mutex_lock(&mtx);
	while( (*ra)->count <= 0 ){
		//printf("Pool found empty\n");
		pthread_cond_wait(&cv_notempty,&mtx);
	}
	data = (*ra)->fds[(*ra)->start];
	(*ra)->start = ( (*ra)->start + 1 ) % MAXR;
	(*ra)->count--;
	pthread_mutex_unlock(&mtx);
	return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3028(%rip), %r14      # 0x61d0
movq %r14, %rdi
callq 0x2340
leaq 0x3071(%rip), %r15      # 0x6228
movq (%rbx), %rcx
movl 0x8(%rcx), %esi
testl %esi, %esi
jg 0x31ce
movq %r15, %rdi
movq %r14, %rsi
callq 0x20c0
jmp 0x31b7
movq (%rcx), %rax
movslq 0xc(%rcx), %rdx
movl (%rax,%rdx,4), %ebx
leal 0x1(%rdx), %eax
pushq $0x32
popq %rdi
cltd
idivl %edi
movl %edx, 0xc(%rcx)
decl %esi
movl %esi, 0x8(%rcx)
leaq 0x2fe0(%rip), %rdi      # 0x61d0
callq 0x21d0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq