LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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
movq $0x0, 0x8(%rsp)
leaq 0xf77(%rip), %rsi       # 0x3043
movl $0x6, %edi
callq 0x1120
testq %rax, %rax
jne 0x20ee
leaq 0x127d(%rip), %rsi      # 0x335f
movl $0x1, %edi
xorl %eax, %eax
callq 0x129c
cmpl $0x3, %ebx
jge 0x210b
leaq 0x1279(%rip), %rsi      # 0x3373
movl $0x3, %edi
xorl %eax, %eax
callq 0x129c
jmp 0x21f9
leaq 0x40(%rsp), %rdi
movl $0x80000, %edx          # imm = 0x80000
xorl %esi, %esi
callq 0x10b0
movl %ebx, %r12d
movl $0x2, %r13d
leaq 0x8(%rsp), %rbx
leaq 0x30(%rsp), %r15
movq (%r14,%r13,8), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b50
incq %r13
cmpq %r13, %r12
jne 0x212f
movq 0x8(%rsp), %rbx
leaq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %rbx, %rsi
callq 0x1c5b
testb %al, %al
je 0x21c2
movq 0x8(%r14), %rsi
leaq 0x40(%rsp), %rdi
callq 0x1cdf
testb %al, %al
jne 0x2186
leaq 0x123b(%rip), %rsi      # 0x33b5
movl $0x1, %edi
xorl %eax, %eax
callq 0x129c
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x1dc3
testb %al, %al
je 0x21cb
leaq 0x40(%rsp), %rdi
callq 0x1e9b
testb %al, %al
je 0x21d4
leaq 0x10(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x204a
xorl %eax, %eax
jmp 0x21fe
leaq 0x11d8(%rip), %rsi      # 0x33a1
jmp 0x21db
leaq 0x11fd(%rip), %rsi      # 0x33cf
jmp 0x21db
leaq 0x1209(%rip), %rsi      # 0x33e4
movl $0x3, %edi
xorl %eax, %eax
callq 0x129c
leaq 0x10(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x204a
movl $0x1, %eax
addq $0x80040, %rsp          # imm = 0x80040
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5bb2(%rip), %rcx      # 0x8150
movsd (%rcx,%rax,8), %xmm1
ucomisd %xmm1, %xmm0
jb 0x25ce
movsd 0x8(%rcx,%rax,8), %xmm2
ucomisd %xmm0, %xmm2
jbe 0x25ce
movapd %xmm0, %xmm3
subsd %xmm1, %xmm3
subsd %xmm0, %xmm2
ucomisd %xmm2, %xmm3
jb 0x25cc
leal 0x1(%rax), %edx
jmp 0x25ce
movl %eax, %edx
testl %edx, %edx
jns 0x25df
leaq 0x1(%rax), %rsi
cmpq $0x77, %rax
movq %rsi, %rax
jb 0x259e
movslq %edx, %rax
leaq 0x5ec7(%rip), %rcx      # 0x84b0
movq (%rcx,%rax,8), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %edi
testl %eax, %eax
je 0x45ec
cmpl $0x2d, %eax
je 0x45ec
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 0x45f9
leaq 0x16a41(%rip), %rsi     # 0x1b034
popq %rbx
jmp 0x34c0
leaq 0x16a12(%rip), %rsi     # 0x1b012
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3430
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
callq 0x3330
movq %rax, %r15
leaq 0x169f1(%rip), %rsi     # 0x1b037
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x35c0
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x45bc
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %edi
testl %eax, %eax
je 0x4693
cmpl $0x2d, %eax
je 0x4693
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 0x46a0
leaq 0x1699a(%rip), %rsi     # 0x1b034
popq %rbx
jmp 0x31b0
leaq 0x1696b(%rip), %rsi     # 0x1b012
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3430
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/./IO_stream.h
// Function: creat_outfile
gzFile creat_outfile(const char *outfile,const char *suffix) {
	char *out=(char *)calloc(strlen(outfile)+strlen(suffix)+2,sizeof(char));
	sprintf(out,"%s%s",outfile,suffix);
	gzFile fo=open_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
movl $0x1, %esi
callq 0x3330
movq %rax, %r15
leaq 0x1694a(%rip), %rsi     # 0x1b037
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x35c0
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4663
// File: /workspace/github_c_makefile_star2_O1/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 0x4737
cmpl $0x2d, %eax
je 0x4737
movq %rbx, %rdi
movl $0x40, %esi
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x3530
movl %eax, %edi
cmpl $-0x1, %eax
je 0x4744
leaq 0x1691f(%rip), %rsi     # 0x1b05d
popq %rbx
jmp 0x31b0
leaq 0x168f1(%rip), %rsi     # 0x1b03c
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3430
// File: /workspace/github_c_makefile_star2_O1/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 0x168e8(%rip), %rsi     # 0x1b060
movq %rax, %rdi
movq %rcx, %rdx
movq %rcx, %r8
xorl %eax, %eax
callq 0x35c0
movq 0x1f869(%rip), %rax     # 0x23ff8
movq (%rax), %rsi
movq %r14, %rdi
callq 0x3270
movl $0x1, %edi
callq 0x35d0
// File: /workspace/github_c_makefile_star2_O1/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 0x11d88
testq %rax, %rax
je 0x47b1
popq %rcx
retq
callq 0x36e0
// File: /workspace/github_c_makefile_star2_O1/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 0xa796
movl (%r15), %edx
testl %edx, %edx
js 0x481e
movq (%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x18(%rsp), %ecx
movl 0x14(%rsp), %r8d
leaq 0x22(%rip), %rax        # 0x4823
movq %rax, (%rsp)
movq %r14, %rsi
movq %rbx, %r9
callq 0x127f5
movl 0x1c(%rsp), %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x3705
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x8, %esi
callq 0x3330
movq %rax, %rbx
movq %r15, %rdi
callq 0x695b
movq %rax, %r15
movq %rax, %rdi
callq 0x697c
xorl %r12d, %r12d
testq %rax, %rax
je 0x4af9
movq (%rax), %rax
movq %rax, (%rbx,%r12,8)
incq %r12
movq %r15, %rdi
callq 0x697c
jmp 0x4ae0
movq %r15, %rdi
callq 0x69ba
movq %r14, %rdi
callq 0x695b
movq %rax, %r14
movq %rax, %rdi
callq 0x697c
testq %rax, %rax
je 0x4b3a
movl %r12d, %ecx
leaq (%rbx,%rcx,8), %r15
movq (%rax), %rax
movq %rax, (%r15)
movq %r14, %rdi
callq 0x697c
addq $0x8, %r15
incl %r12d
testq %rax, %rax
jne 0x4b20
movq %r14, %rdi
callq 0x69ba
movl %r12d, %esi
leaq -0xf9(%rip), %rcx       # 0x4a53
movl $0x8, %edx
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_O1/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 0x649c
movq %rax, 0x8(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x649c
movq %rax, 0x10(%rbx)
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x47b6
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
callq 0x4b68
movq 0x8(%rbx), %rdi
callq 0x68b8
movq 0x10(%rbx), %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x68b8
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
testq %rsi, %rsi
je 0x6627
cmpq %rsi, 0x20(%rbx)
jne 0x663e
addq %rsi, %rsi
jmp 0x662c
movl $0x4, %esi
movq %rbx, %rdi
callq 0x64d0
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x668c
movq 0x8(%rbx), %rax
movq %r15, %rdi
callq *(%rax)
movl %eax, %r12d
andl 0x18(%rbx), %r12d
movq (%rbx), %rax
movq (%rax,%r12,8), %r13
testq %r13, %r13
je 0x668c
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x667a
movq 0x28(%rbx), %rdi
movq (%r13), %rdx
movq %r15, %rsi
callq *%rax
testl %eax, %eax
jne 0x6680
jmp 0x6686
cmpq %r15, (%r13)
jne 0x6686
movq 0x10(%r13), %r13
jmp 0x6655
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpl $-0x1, %r12d
je 0x66f3
movl $0x18, %edi
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), %rax
testq %rax, %rax
je 0x66ca
movq 0x28(%rbx), %rdi
movq %r15, %rsi
callq *%rax
movq %rax, %r15
movq %r15, (%r13)
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x66e7
movq 0x28(%rbx), %rdi
movq %r14, %rsi
callq *%rax
movq %rax, %r14
movq %r14, 0x8(%r13)
incq 0x20(%rbx)
xorl %eax, %eax
jmp 0x66f8
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %ebp
cmpq $0x0, 0x10(%rdi)
je 0x68a7
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq %rsi, %rdi
callq *(%rax)
movl %eax, %r15d
andl 0x18(%rbx), %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %rax
testq %rax, %rax
je 0x68a7
xorl %r13d, %r13d
movq %rax, %r14
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x683c
movq 0x28(%rbx), %rdi
movq (%r14), %rdx
movq %r12, %rsi
callq *%rax
testl %eax, %eax
jne 0x6841
jmp 0x684f
cmpq %r12, (%r14)
jne 0x684f
movq 0x10(%r14), %rax
movq %r14, %r13
testq %rax, %rax
jne 0x681a
jmp 0x68a7
movq 0x10(%r14), %rax
testq %r13, %r13
je 0x685e
addq $0x10, %r13
jmp 0x6868
shlq $0x3, %r15
addq (%rbx), %r15
movq %r15, %r13
movq %rax, (%r13)
movq 0x8(%rbx), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x6882
movq 0x28(%rbx), %rdi
movq (%r14), %rsi
callq *%rax
movq 0x8(%rbx), %rax
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x6899
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_O1/xiongxu[P]bam2bedGraph2/hiredis/./dict.c
// Function: dictGetIterator
dictIterator *dictGetIterator(dict *ht) {
    dictIterator *iter = malloc(sizeof(*iter));

    iter->ht = ht;
    iter->index = -1;
    iter->entry = NULL;
    iter->nextEntry = NULL;
    return iter;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x20, %edi
callq 0x3440
movq %rbx, (%rax)
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9161
pushq %rbx
movq %rdi, %rbx
movl 0x84(%rdi), %edi
testl %edi, %edi
jle 0x9136
callq 0x32a0
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x9147
callq 0x5261
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x9158
callq 0x808f
movq %rbx, %rdi
popq %rbx
jmp 0x3060
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x11a4
testl %eax, %eax
je 0x1193
leaq 0xe87(%rip), %rsi       # 0x2004
movl $0x22, %edx
movl $0x2, %edi
callq 0x1030
movl $0x1, %eax
jmp 0x119f
callq 0x11e0
callq 0x11c4
xorl %eax, %eax
popq %rcx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movq %rsi, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
xorl %ebx, %ebx
leaq 0x31d5(%rip), %rax      # 0x4a00
addq $0x2710, %rax           # imm = 0x2710
movq %rax, 0x10(%rsp)
xorl %r14d, %r14d
movslq 0x2858(%rip), %rax      # 0x4098
cmpq %rax, %r14
jge 0x1957
movl %ecx, 0xc(%rsp)
leaq 0x284c(%rip), %rax      # 0x40a0
movslq (%rax,%rbx,2), %r15
movq %rax, %rbp
leaq -0x1(%r15), %rsi
movq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0x196a
movq %rax, %r12
movq %r13, %rdi
movq %r15, %rsi
callq 0x196a
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x19a3
movq %rax, %r15
movslq (%rbp,%rbx,2), %r12
leaq -0x1(%r12), %rsi
movq 0x20(%rsp), %rbp
movq %rbp, %rdi
callq 0x196a
movq %rax, %r13
movq %rbp, %rdi
movq %r12, %rsi
callq 0x196a
movq %rbp, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x19a3
movq %rax, %r12
leaq 0x2e18(%rip), %rax      # 0x46e0
movq (%rbx,%rax), %rax
movq %rax, 0x279d(%rip)      # 0x4070
leaq 0x27c6(%rip), %rsi      # 0x40a0
movl 0x4(%rsi,%rbx,2), %ecx
movl 0x8(%rsi,%rbx,2), %edx
movl %ecx, 0x2780(%rip)      # 0x4068
movl %edx, 0x27a2(%rip)      # 0x4090
movl 0xc(%rsi,%rbx,2), %ecx
movl %ecx, 0x279c(%rip)      # 0x4094
movq %r15, %rdi
movq %r12, %rsi
callq *%rax
leaq 0x30f9(%rip), %rcx      # 0x4a00
cmpq %rcx, %r15
setae %dl
movq 0x10(%rsp), %r8
cmpq %r8, %r15
setb %sil
cmpq %rcx, %r12
setae %dil
cmpq %r8, %r12
setb %cl
andb %dil, %cl
testb %sil, %dl
jne 0x1932
testb %cl, %cl
je 0x193f
testb %cl, %cl
cmovneq %r12, %r15
movq %r15, 0x2739(%rip)      # 0x4078
incq %r14
addq $0x8, %rbx
testl %eax, %eax
movl 0xc(%rsp), %ecx
cmovnel %eax, %ecx
je 0x1839
jmp 0x1959
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %eax, %eax
testq %rsi, %rsi
je 0x19a2
movzbl (%rdi), %ecx
cmpl $0x9, %ecx
je 0x198a
cmpl $0x20, %ecx
je 0x198a
testl %ecx, %ecx
je 0x19a2
incq %rax
incq %rdi
jmp 0x196c
incq %rdi
incq %rax
movzbl (%rdi), %ecx
cmpl $0x20, %ecx
je 0x198a
cmpl $0x9, %ecx
je 0x198a
decq %rsi
jmp 0x196c
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x19ae
xorl %eax, %eax
retq
leaq 0x1(%rcx), %r8
movq 0x26bf(%rip), %rax      # 0x4078
leaq 0x3040(%rip), %r9       # 0x4a00
subq %rax, %r9
addq $0x2710, %r9            # imm = 0x2710
cmpq %r8, %r9
jae 0x19d3
xorl %eax, %eax
jmp 0x19dd
addq %rax, %r8
movq %r8, 0x269b(%rip)       # 0x4078
subq %rsi, %rdx
jbe 0x19ff
addq %rsi, %rdi
xorl %esi, %esi
movb (%rdi,%rsi), %r8b
testb %r8b, %r8b
je 0x19fc
movb %r8b, (%rax,%rsi)
incq %rsi
cmpq %rsi, %rdx
jne 0x19e7
addq %rsi, %rax
movb $0x0, (%rax)
subq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_2/exercise_2_03/htoi.c
// Function: main
int main(void)
{
  char hex[MAXLINE];

  get_line(hex, MAXLINE);

  printf("%d", htoi(hex));

  return 0;
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
xorl %ebx, %ebx
callq 0x1070
cmpb $0xa, %al
je 0x11c8
movzbl %al, %ecx
cmpl $0xff, %ecx
je 0x11c8
movb %al, (%rsp,%rbx)
incq %rbx
cmpq $0x63, %rbx
jne 0x11a3
movl $0x63, %ebx
movl %ebx, %eax
movb $0x0, (%rsp,%rax)
movq %rsp, %rdi
callq 0x1242
leaq 0xe33(%rip), %rdi       # 0x2010
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpl $0x2, %esi
jl 0x122d
movl %esi, %ebp
decl %ebp
movl %ebp, %r15d
xorl %r14d, %r14d
callq 0x1070
cmpb $0xa, %al
je 0x122d
movzbl %al, %ecx
cmpl $0xff, %ecx
je 0x122d
movb %al, (%rbx,%r14)
incq %r14
cmpq %r14, %r15
jne 0x120a
movl %ebp, %r14d
movl %r14d, %eax
movb $0x0, (%rbx,%rax)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
testl %r14d, %r14d
jle 0x1332
callq 0x1080
movq %rax, (%rsp)
xorl %ebp, %ebp
callq 0x1090
movq %rax, %r12
xorl %r13d, %r13d
movslq %r13d, %rax
cmpb $0x30, (%rbx,%rax)
jne 0x1291
movzbl 0x1(%rbx,%rax), %eax
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x1291
addl $0x2, %r13d
movq (%rsp), %rax
movq (%rax), %rcx
movslq %r13d, %rax
movb (%rbx,%rax), %al
movsbq %al, %rdx
movslq (%rcx,%rdx,4), %rcx
movq (%r12), %rsi
leal -0x30(%rcx), %edi
testb $0x8, 0x1(%rsi,%rcx,2)
cmovel %ecx, %edi
movslq %edi, %rcx
leal -0x57(%rcx), %r15d
cmpl $0x67, %ecx
cmovgel %ecx, %r15d
testb $0x4, 0x1(%rsi,%rcx,2)
cmovel %ecx, %r15d
addb $-0x30, %dl
cmpb $0xa, %dl
jb 0x12ef
movzbl %al, %eax
addl $-0x41, %eax
cmpl $0x25, %eax
ja 0x1324
movabsq $0x3f0000003f, %rcx     # imm = 0x3F0000003F
btq %rax, %rcx
jae 0x1324
movl %r13d, %eax
notl %eax
addl %r14d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0xd02(%rip), %xmm0      # 0x2008
callq 0x1030
cvttsd2si %xmm0, %eax
imull %eax, %r15d
addl %r15d, %ebp
incl %r13d
cmpl %r14d, %r13d
jl 0x1277
jmp 0x1334
leaq 0xce8(%rip), %rdi       # 0x2013
callq 0x1040
jmp 0x1316
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_O1/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 %rbp
pushq %rbx
pushq %rax
movl $0x100, %edi            # imm = 0x100
callq 0x1050
testq %rax, %rax
je 0x1197
movq %rax, %rbx
movl $0x756c6146, (%rax)     # imm = 0x756C6146
movl $0x217475, 0x3(%rax)    # imm = 0x217475
movb $0x53, %bpl
movb %bpl, (%rax)
movq %rax, %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x1030
movb %bpl, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2cc1b(%rip), %rdi     # 0x339b4
xorl %eax, %eax
callq 0x5090
leaq 0x42e4(%rip), %rdi      # 0xb08b
xorl %eax, %eax
callq 0x5090
cmpl $0x0, 0x18(%rbx)
jle 0x6dda
leaq 0x42d3(%rip), %r14      # 0xb08e
xorl %r15d, %r15d
movsbl (%r13,%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x5090
incq %r15
movslq 0x18(%rbx), %rax
cmpq %rax, %r15
jl 0x6dbe
movl $0xa, %edi
callq 0x5050
cmpl $0x0, 0x34(%rbx)
jle 0x6e77
leaq 0x429d(%rip), %r14      # 0xb092
leaq 0x429d(%rip), %r15      # 0xb099
xorl %ebp, %ebp
cmpl $0x0, 0x30(%rbx)
je 0x6e13
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x6e25
movsbl (%rax,%rbp), %esi
jmp 0x6e19
movsbl (%r13,%rbp), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x5090
jmp 0x6e33
leaq 0x426a(%rip), %rdi      # 0xb096
xorl %eax, %eax
callq 0x5090
movl 0x18(%rbx), %eax
testl %eax, %eax
jle 0x6e61
xorl %r12d, %r12d
movq 0x8(%rbx), %rcx
imull %ebp, %eax
cltq
addq %r12, %rax
movl (%rcx,%rax,4), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x5090
movl 0x18(%rbx), %eax
incq %r12
cmpl %eax, %r12d
jl 0x6e3d
movl $0xa, %edi
callq 0x5050
incq %rbp
movslq 0x34(%rbx), %rax
cmpq %rax, %rbp
jl 0x6dfe
movl 0x1c(%rbx), %esi
leaq 0x421c(%rip), %rdi      # 0xb09d
xorl %eax, %eax
callq 0x5090
movl 0x20(%rbx), %esi
leaq 0x4215(%rip), %rdi      # 0xb0a7
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_O1/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 %rbx
movq 0x10(%rdi), %r14
leaq 0x41fa(%rip), %rbx      # 0xb0b1
xorl %r15d, %r15d
testb $0xf, %r15b
jne 0x6eca
movl $0xa, %edi
callq 0x5050
movl (%r14,%r15,4), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5090
incq %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x6eba
movl $0xa, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x5050
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x2a23
movq %rdi, %r14
movl $0x0, -0x34(%rbp)
leaq -0x30(%rbp), %r15
xorl %r12d, %r12d
movl $0x0, -0x38(%rbp)
xorl %r13d, %r13d
movq $0x0, -0x30(%rbp)
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x257a
cmpl $-0x2, %eax
je 0x2a01
movl %eax, %r13d
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
leaq 0x16a8(%rip), %rsi      # 0x4004
callq 0x2190
testl %eax, %eax
je 0x2994
movq %rbx, %rdi
leaq 0x16a2(%rip), %rsi      # 0x4011
callq 0x2190
testl %eax, %eax
je 0x29e7
movq %rbx, %rdi
leaq 0x1695(%rip), %rsi      # 0x4017
callq 0x2190
testl %eax, %eax
movl $0x1, %eax
cmovel %eax, %r12d
jmp 0x29ee
movq %r14, %rdi
movq -0x40(%rbp), %rsi
movl %r13d, %edx
callq 0x257a
movl %eax, %r13d
movq %rbx, %rdi
callq 0x2030
movq $0x0, -0x30(%rbp)
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x257a
movl %eax, %r13d
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
leaq 0x1633(%rip), %rsi      # 0x4008
callq 0x2190
testl %eax, %eax
jne 0x2a37
movw $0x1, %ax
movl %eax, -0x38(%rbp)
jmp 0x29ee
movw $0x1, %ax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
callq 0x2030
cmpl $-0x1, %r13d
jne 0x292c
cmpw $0x0, -0x38(%rbp)
sete %al
testw %r12w, %r12w
sete %cl
orb %al, %cl
cmpw $0x0, -0x34(%rbp)
sete %al
orb %cl, %al
movzbl %al, %eax
negl %eax
jmp 0x2a28
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
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 0x2a09
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x0, (%rsi)
leaq 0x15c2(%rip), %rsi      # 0x4023
callq 0x22b0
movq %rax, %r14
movl $0x14, %edi
callq 0x21f0
movq %rax, %r15
movl $0x14, %r13d
cmpl %r13d, (%rbx)
jne 0x2a92
addl %r13d, %r13d
movslq %r13d, %rsi
movq %r15, %rdi
callq 0x2220
movq %rax, %r15
movq %r14, %rdi
callq 0x2130
movl %eax, %r12d
movq %r14, %rdi
callq 0x21a0
testl %eax, %eax
jne 0x2ab4
movslq (%rbx), %rax
movb %r12b, (%r15,%rax)
incl (%rbx)
jmp 0x2a7c
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 0x2220
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x18, %edi
callq 0x21f0
movq %rax, %r14
movq %rax, (%rbx)
movl $0xc8, %edi
callq 0x21f0
movq %rax, (%r14)
movl $0xffffffff, 0x10(%r14) # imm = 0xFFFFFFFF
movq $0x0, 0x8(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2eab(%rip), %rdi      # 0x61d8
callq 0x2350
movq (%r14), %rax
cmpl $0x32, 0x8(%rax)
jl 0x335d
leaq 0x2ebe(%rip), %r15      # 0x6200
leaq 0x2e8f(%rip), %r12      # 0x61d8
movq %r15, %rdi
movq %r12, %rsi
callq 0x20c0
movq (%r14), %rax
cmpl $0x31, 0x8(%rax)
jg 0x3349
movl 0x10(%rax), %ecx
movl %ecx, %edx
incl %edx
movslq %edx, %rdx
imulq $0x51eb851f, %rdx, %rdx # imm = 0x51EB851F
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x24, %rdx
addl %esi, %edx
imull $0x32, %edx, %edx
negl %edx
addl %edx, %ecx
incl %ecx
movl %ecx, 0x10(%rax)
movq (%rax), %rdx
movslq %ecx, %rcx
movl %ebx, (%rdx,%rcx,4)
incl 0x8(%rax)
leaq 0x2e3e(%rip), %rdi      # 0x61d8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
// File: /workspace/github_c_makefile_star2_O1/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 0x2e1d(%rip), %rdi      # 0x61d8
callq 0x2350
movq (%rbx), %rax
movl 0x8(%rax), %ecx
testl %ecx, %ecx
jg 0x33ed
leaq 0x2e5f(%rip), %r14      # 0x6230
leaq 0x2e00(%rip), %r15      # 0x61d8
movq %r14, %rdi
movq %r15, %rsi
callq 0x20c0
movq (%rbx), %rax
movl 0x8(%rax), %ecx
testl %ecx, %ecx
jle 0x33d8
movq (%rax), %rdx
movslq 0xc(%rax), %rsi
movl (%rdx,%rsi,4), %ebx
leal 0x1(%rsi), %edx
movslq %edx, %rdx
imulq $0x51eb851f, %rdx, %rsi # imm = 0x51EB851F
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x24, %rsi
addl %edi, %esi
imull $0x32, %esi, %esi
subl %esi, %edx
movl %edx, 0xc(%rax)
decl %ecx
movl %ecx, 0x8(%rax)
leaq 0x2db3(%rip), %rdi      # 0x61d8
callq 0x21e0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/webserver/webserver.c
// Function: threadExec
void *threadExec(void * rootdir){
	char *buf;
	char *page = NULL;
	char *ans = NULL;
	int anslen;
	char *rdir = (char *)rootdir;
	char *rdpage = NULL;
	int reqerr,localbytes;
	while( 1 ){//try to obtain a file desc and exit if u obtain -1
		buf = NULL;//malloc(10*sizeof(char));
		int data;
		data = obtain(&ra);
		//printf("thread: %d\n",data);
		pthread_cond_signal(&cv_notfull);
		if( data == -1) break;
		pthread_mutex_lock(&mtxcounter);
		totalrc++;
		pthread_mutex_unlock(&mtxcounter);
		while( (buf = read_request(data,BUFFERSIZE)) == NULL ){}//in case client haven't answered yet,repeat
		//printf("buf= %s\n",buf);
		reqerr = analyze_request(buf,&page);
		if(page != NULL){
			rdpage = (char *)malloc((strlen(page) + strlen(rdir) + 1)*sizeof(char));
			strcpy(rdpage,rdir);
			strcat(rdpage,page);
		}
		//printf("%s\n",rdpage);
		ans = create_answer(&anslen,rdpage,reqerr,&localbytes);
		pthread_mutex_lock(&mtxbytes);
		totalBytes += localbytes;
		pthread_mutex_unlock(&mtxbytes);
		//printf("%s\n",ans);
		write(data,ans,anslen);
		close(data);
		free(page);
		free(ans);
		free(rdpage);
		free(buf);
	}
	free(buf);
	printf("thread exiting...\n");
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movq $0x0, (%rax)
xorl %r15d, %r15d
leaq 0x2dff(%rip), %rdi      # 0x6260
callq 0x33a7
movl %eax, %r12d
leaq 0x2d90(%rip), %rdi      # 0x6200
callq 0x2160
cmpl $-0x1, %r12d
je 0x3577
leaq 0x2de2(%rip), %rbx      # 0x6268
movq %rbx, %rdi
callq 0x2350
incl 0x2d3c(%rip)            # 0x61d0
movq %rbx, %rdi
callq 0x21e0
movl %r12d, %edi
movl $0x80, %esi
callq 0x2811
testq %rax, %rax
je 0x349c
movq %rax, %r13
movq %rax, %rdi
leaq -0x30(%rbp), %rsi
callq 0x28f3
movq -0x30(%rbp), %rbx
testq %rbx, %rbx
je 0x3508
movq %rbx, %rdi
movl %eax, -0x34(%rbp)
callq 0x20e0
movq %rax, %r15
movq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0x20e0
leaq (%r15,%rax), %rdi
incq %rdi
callq 0x21f0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x2070
movq %r15, %rdi
movq %rbx, %rsi
callq 0x22f0
movl -0x34(%rbp), %eax
leaq -0x3c(%rbp), %rdi
movq %r15, %rsi
movl %eax, %edx
leaq -0x38(%rbp), %rcx
callq 0x2ae0
movq %rax, %rbx
leaq 0x2d6c(%rip), %r14      # 0x6290
movq %r14, %rdi
callq 0x2350
movl -0x38(%rbp), %eax
addl %eax, 0x2c9f(%rip)      # 0x61d4
movq %r14, %rdi
callq 0x21e0
movslq -0x3c(%rbp), %rdx
movl %r12d, %edi
movq %rbx, %rsi
callq 0x20b0
movl %r12d, %edi
callq 0x2140
movq -0x30(%rbp), %rdi
callq 0x2030
movq %rbx, %rdi
callq 0x2030
movq %r15, %rdi
callq 0x2030
movq %r13, %rdi
callq 0x2030
jmp 0x357a
xorl %r13d, %r13d
cmpl $-0x1, %r12d
jne 0x345a
movq %r13, %rdi
callq 0x2030
leaq 0xe90(%rip), %rdi       # 0x4423
callq 0x2090
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/CSerxzm[P]WindowstoLinuxInterface/src/DEL.c
// Function: del_file
int del_file(const char *dir){
    DIR* dirp;
    struct dirent *dp;
    struct stat dir_stat;
    char dir_name[255];

    if(access(dir,F_OK)!=0){
        return 0;
    }
    if(stat(dir, &dir_stat)<0){
        perror("失败!\n");
        return -1;
    } 
    if(S_ISREG(dir_stat.st_mode)){
        remove(dir);
    }
    else{
        perror("error!\n");
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %r14
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x1070
testl %eax, %eax
jne 0x12f4
leaq -0xa0(%rbp), %rsi
movq %r14, %rdi
callq 0x1060
testl %eax, %eax
js 0x1302
movl $0xf000, %eax           # imm = 0xF000
andl -0x88(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x1315
movq %r14, %rdi
callq 0x1030
movl %ebx, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xcfb(%rip), %rdi       # 0x2004
callq 0x1080
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x12f4
leaq 0xcf1(%rip), %rdi       # 0x200d
callq 0x1080
jmp 0x12f4
// File: /workspace/github_c_makefile_star2_O1/CSerxzm[P]WindowstoLinuxInterface/src/DEL.c
// Function: main
int main(int argc, char** argv){
    char lines[argc+1][255];
    predealLine(argc, argv, lines);

    if((strcmp("DEL",lines[0])==0)||(strcmp("del",lines[0])==0)){
        for(int i=1;i<argc;i++){
            del_file(lines[i]);
        }
    }
    else{
        perror("error after lines\n");
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
leal 0x1(%r14), %eax
movq %rax, %rcx
shlq $0x8, %rcx
subq %rax, %rcx
addq $0xf, %rcx
movabsq $0x1fffffffff0, %rax    # imm = 0x1FFFFFFFFF0
andq %rcx, %rax
movq %rsp, %rbx
subq %rax, %rbx
movq %rbx, %rsp
movq %rbx, %rdx
callq 0x11ac
leaq 0xcb1(%rip), %rdi       # 0x2015
movq %rbx, %rsi
callq 0x1050
testl %eax, %eax
je 0x1383
leaq 0xca2(%rip), %rdi       # 0x2019
movq %rbx, %rsi
callq 0x1050
testl %eax, %eax
jne 0x13b5
cmpl $0x2, %r14d
jl 0x13aa
movl %r14d, %r14d
addq $0xff, %rbx
decq %r14
movq %rbx, %rdi
callq 0x12a9
addq $0xff, %rbx
decq %r14
jne 0x1396
xorl %eax, %eax
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xc61(%rip), %rdi       # 0x201d
callq 0x1080
jmp 0x13aa
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/tools/pciffmanager/main.cpp
// Function: PCIFFManager::OpenFile()
Void PCIFFManager::OpenFile()
{
	FileSelection	 dialog;

	dialog.SetParentWindow(wnd);

	dialog.AddFilter("PCI Image Files", "*.pci");
	dialog.AddFilter("All Files", "*.*");

	if (dialog.ShowDialog() == Success())
	{
		filename = dialog.GetFileName();

		String	 file = filename.Tail(filename.Length() - filename.FindLast(Directory::GetDirectoryDelimiter()) - 1);

		wnd->SetText(String("smooth PCIFF Manager v").Append(SMOOTH_VERSION).Append(" - ").Append(file));
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x7a0, %rsp            # imm = 0x7A0
movq %rdi, %rbx
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x3330
movq 0x5b8(%rbx), %rsi
movq %r14, %rdi
callq 0x3080
leaq 0x164f(%rip), %rsi      # 0x5066
leaq 0x18(%rsp), %rdi
callq 0x3320
leaq 0x164e(%rip), %rsi      # 0x5076
movq %rsp, %rdi
callq 0x3320
leaq 0x60(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
callq 0x3120
movq %rsp, %rdi
callq 0x31f0
leaq 0x18(%rsp), %rdi
callq 0x31f0
leaq 0x1621(%rip), %rsi      # 0x507c
leaq 0x18(%rsp), %rdi
callq 0x3320
leaq 0x161a(%rip), %rsi      # 0x5086
movq %rsp, %rdi
callq 0x3320
leaq 0x60(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
callq 0x3120
movq %rsp, %rdi
callq 0x31f0
leaq 0x18(%rsp), %rdi
callq 0x31f0
leaq 0x60(%rsp), %rdi
callq 0x31b0
movq 0x4547(%rip), %rcx      # 0x7ff0
addq $0x10, %rcx
leaq 0x18(%rsp), %rsi
movq %rcx, (%rsi)
movl $0x0, 0x8(%rsi)
movq (%rax), %rcx
movq %rax, %rdi
callq *0x18(%rcx)
testb %al, %al
je 0x3bc0
leaq 0x60(%rsp), %rdi
callq 0x3090
leaq 0x5e0(%rbx), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x3250
movq %r14, %rdi
callq 0x3140
movl %eax, %ebp
callq 0x3060
movq %rsp, %rdi
movq %rax, %rsi
callq 0x3320
movq %rsp, %rsi
movq %r14, %rdi
callq 0x31e0
notl %eax
addl %eax, %ebp
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x3190
movq %rsp, %rdi
callq 0x31f0
movq 0x5b8(%rbx), %rbx
leaq 0x14fc(%rip), %rsi      # 0x5033
movq %rsp, %rdi
callq 0x3320
leaq 0x1504(%rip), %rsi      # 0x504a
leaq 0x48(%rsp), %rdi
callq 0x3320
movq %rsp, %rdi
leaq 0x48(%rsp), %rsi
callq 0x30c0
movq %rax, %r14
leaq 0x1523(%rip), %rsi      # 0x508a
leaq 0x30(%rsp), %rdi
callq 0x3320
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x30c0
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x30c0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0xa0(%rcx)
leaq 0x30(%rsp), %rdi
callq 0x31f0
leaq 0x48(%rsp), %rdi
callq 0x31f0
movq %rsp, %rdi
callq 0x31f0
leaq 0x18(%rsp), %rdi
callq 0x31f0
leaq 0x60(%rsp), %rdi
callq 0x3230
addq $0x7a0, %rsp            # imm = 0x7A0
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x3bd8
movq %rax, %rbx
jmp 0x3c0e
jmp 0x3bf5
jmp 0x3bfa
jmp 0x3c2c
movq %rax, %rbx
movq %rsp, %rdi
jmp 0x3c25
jmp 0x3c2c
jmp 0x3c2c
jmp 0x3bf5
jmp 0x3bfa
jmp 0x3c2c
movq %rax, %rbx
jmp 0x3c18
movq %rax, %rbx
jmp 0x3c20
jmp 0x3c2c
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x31f0
leaq 0x48(%rsp), %rdi
callq 0x31f0
movq %rsp, %rdi
callq 0x31f0
leaq 0x18(%rsp), %rdi
callq 0x31f0
jmp 0x3c2f
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3230
movq %rbx, %rdi
callq 0x3150
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/tools/pciffmanager/main.cpp
// Function: PCIFFManager::~PCIFFManager()
PCIFFManager::~PCIFFManager()
{
	DeleteObject(title);
	DeleteObject(wnd);
	DeleteObject(menubar);
	DeleteObject(menu_file);
	DeleteObject(statusbar);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x3e97(%rip), %rax      # 0x7af0
movq %rax, (%rdi)
movq 0x5c0(%rdi), %rdi
callq 0x33a0
movq 0x5b8(%rbx), %rdi
callq 0x33a0
movq 0x5c8(%rbx), %rdi
callq 0x33a0
movq 0x5d8(%rbx), %rdi
callq 0x33a0
movq 0x5d0(%rbx), %rdi
callq 0x33a0
leaq 0x5e0(%rbx), %rdi
callq 0x31f0
movq %rbx, %rdi
popq %rbx
jmp 0x3210
movq %rax, %rdi
callq 0x3e05
nop