LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/Zarh[P]regps3iso/main.c
// Function: GetExtension
char *GetExtension(char *path)
{
    int n = strlen(path);
    int m = n;

    while(m > 1 && path[m] != '.' && path[m] != '/') m--;
    
	
    if(strcmp(&path[m], ".0")==0 || strcmp(&path[m], ".66600")==0) { // splitted
       m--;
       while(m > 1 && path[m] != '.' && path[m] != '/') m--; 
    }
	
	if(strcasecmp(&path[m], ".bin")==0) {
		if(strcasecmp(&path[m-7], ".header.bin")==0) {
			m-=7;	
		}
	}
  
    if(path[m] == '.') return &path[m];

    return &path[n];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4010f8
movq %rax, %r14
movl %r14d, %r15d
cmpl $0x2, %r14d
jl 0x401b87
movl %r15d, %eax
movb (%rbx,%rax), %al
andb $-0x2, %al
cmpb $0x2e, %al
je 0x401b87
leal -0x1(%r15), %eax
cmpl $0x2, %r15d
movl %eax, %r15d
jg 0x401b68
movl $0x1, %r15d
movslq %r15d, %r12
leaq (%rbx,%r12), %rdi
cmpb $0x2e, (%rbx,%r12)
jne 0x401ba1
cmpb $0x30, 0x1(%rdi)
jne 0x401ba1
cmpb $0x0, 0x2(%rdi)
je 0x401bb1
leaq 0xc146c(%rip), %rsi     # 0x4c3014
callq 0x4010c8
testl %eax, %eax
jne 0x401be7
movl %r15d, %eax
cmpl $0x2, %r15d
movl $0x2, %ecx
cmovll %r15d, %ecx
decl %ecx
decq %rax
cmpl $0x3, %r15d
jl 0x401be1
movl %eax, %edx
movb (%rbx,%rdx), %dl
andb $-0x2, %dl
decl %r15d
decq %rax
cmpb $0x2e, %dl
jne 0x401bc6
jmp 0x401be4
movl %ecx, %r15d
movslq %r15d, %r12
leaq (%rbx,%r12), %rdi
leaq 0xc1430(%rip), %rsi     # 0x4c3022
callq 0x401098
testl %eax, %eax
jne 0x401c1f
movslq %r15d, %r12
addl $-0x7, %r15d
leaq (%r12,%rbx), %rdi
addq $-0x7, %rdi
leaq 0xc140a(%rip), %rsi     # 0x4c301b
callq 0x401098
testl %eax, %eax
cmovel %r15d, %r12d
movslq %r12d, %r12
movslq %r14d, %rax
addq %rbx, %rax
cmpb $0x2e, (%rbx,%r12)
leaq (%rbx,%r12), %rcx
cmoveq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Zarh[P]regps3iso/main.c
// Function: do_task
void do_task(char *path_in, u8 task)
{
	DIR *d;
	struct dirent *dir;
	
	char path[512];
	strcpy(path, path_in);
	int l = strlen(path);
	int i;
	
	for(i=0;i<l;i++){
		if(path[i]=='\\') path[i]='/';
	}
	
	if( is_dir(path) ) {
		d = opendir(path);
		if(d==NULL) return;
		
		while ((dir = readdir(d))) {
			if(!strcmp(dir->d_name, ".") || !strcmp(dir->d_name, "..")) continue;		
			
			char temp[512];
			sprintf(temp, "%s/%s", path, dir->d_name);
			
			if(is_dir(temp)) do_task(temp, task);
			else {
				
				char *ext = GetExtension(temp);
				if( strcasecmp(ext, ".header.bin") == 0 || strcasecmp(ext, ".iso") == 0) {
					do_it(temp, task);
				}
			}
		}
		closedir(d);
	} else {
		do_it(path, task);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x498, %rsp            # imm = 0x498
movl %esi, %ebp
movq %rdi, %rsi
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
callq 0x401020
movq %rbx, %rdi
callq 0x4010f8
testl %eax, %eax
jle 0x403305
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
cmpb $0x5c, 0x90(%rsp,%rcx)
jne 0x4032fd
movb $0x2f, 0x90(%rsp,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x4032eb
leaq 0x90(%rsp), %rdi
leaq 0x290(%rsp), %rbx
movq %rbx, %rsi
callq 0x4650b0
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rbx), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x403423
leaq 0x90(%rsp), %rdi
callq 0x464540
testq %rax, %rax
je 0x403434
movq %rax, %rbx
movq %rax, %rdi
callq 0x4647a0
testq %rax, %rax
je 0x403419
leaq 0x290(%rsp), %r15
movq %rsp, %r13
movl $0xf000, %r12d          # imm = 0xF000
movzbl %bpl, %ebp
cmpb $0x2e, 0x13(%rax)
jne 0x40338b
cmpb $0x0, 0x14(%rax)
je 0x403408
cmpb $0x2e, 0x14(%rax)
jne 0x40338b
cmpb $0x0, 0x15(%rax)
je 0x403408
addq $0x13, %rax
movq %r15, %rdi
leaq 0xbfe59(%rip), %rsi     # 0x4c31f2
leaq 0x90(%rsp), %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x40e1e0
movq %r15, %rdi
movq %r13, %rsi
callq 0x4650b0
movl 0x18(%rsp), %eax
andl %r12d, %eax
movq %r15, %rdi
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x4033d0
movl %ebp, %esi
callq 0x4032b2
jmp 0x403408
callq 0x401b4c
movq %rax, %r14
movq %rax, %rdi
leaq 0xbfc39(%rip), %rsi     # 0x4c301b
callq 0x401098
testl %eax, %eax
je 0x4033fe
movq %r14, %rdi
leaq 0xbfe6b(%rip), %rsi     # 0x4c3260
callq 0x401098
testl %eax, %eax
jne 0x403408
movq %r15, %rdi
movl %ebp, %esi
callq 0x403273
movq %rbx, %rdi
callq 0x4647a0
testq %rax, %rax
jne 0x40336f
movq %rbx, %rdi
callq 0x464770
jmp 0x403434
movzbl %bpl, %esi
leaq 0x90(%rsp), %rdi
callq 0x403273
addq $0x498, %rsp            # imm = 0x498
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Zarh[P]regps3iso/main.c
// Function: main
int main (int argc, char **argv)
{	
	if(argc==1) print_help();
	
	u8 task = do_fixps3iso_region;
	verbose=0;
	
	int args = 1;
	if(strcmp(argv[args], "verbose") == 0){
		verbose=1;
		args++;
	}
	
	if(strcmp(argv[args], "do_read_region_info") == 0){
		task=do_read_region_info;
		args++;
	} else
	if(strcmp(argv[args], "do_get_plain_files") == 0){
		task=do_get_plain_files;
		args++;
	} else
	if(strcmp(argv[args], "do_get_enc_files") == 0){
		task=do_get_enc_files;
		args++;
	} else
	if(strcmp(argv[args], "do_fixps3iso_region") == 0){
		task=do_fixps3iso_region;
		args++;
	}
	
	u32 i;
	for(i=args;i<argc;i++) {
		do_task(argv[i], task);
	}
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x1, %edi
je 0x40352e
movq %rsi, %r14
movl %edi, %ebx
movb $0x0, 0xf3f6a(%rip)     # 0x4f73d0
movq 0x8(%rsi), %rdi
leaq 0xbfd87(%rip), %rsi     # 0x4c31f8
callq 0x4010c8
xorl %r12d, %r12d
testl %eax, %eax
sete 0xf3f4e(%rip)           # 0x4f73d0
sete %r12b
incl %r12d
movq (%r14,%r12,8), %r15
leaq 0xbfd6c(%rip), %rsi     # 0x4c3200
movq %r15, %rdi
callq 0x4010c8
movl $0x1, %r13d
testl %eax, %eax
je 0x4034e8
leaq 0xbfd67(%rip), %rsi     # 0x4c3214
movq %r15, %rdi
callq 0x4010c8
testl %eax, %eax
je 0x4034ec
leaq 0xbfd67(%rip), %rsi     # 0x4c3227
movq %r15, %rdi
callq 0x4010c8
testl %eax, %eax
je 0x4034f0
leaq 0xbfd65(%rip), %rsi     # 0x4c3238
movq %r15, %rdi
callq 0x4010c8
xorl %r13d, %r13d
testl %eax, %eax
sete %r13b
movb $0x3, %al
jmp 0x4034f2
xorl %eax, %eax
jmp 0x4034f2
movb $0x1, %al
jmp 0x4034f2
movb $0x2, %al
leal (%r12,%r13), %ecx
cmpl %ebx, %ecx
jae 0x40351d
movl %r12d, %ecx
leaq (%r14,%rcx,8), %r14
movl %r13d, %r15d
subl %r12d, %ebx
movzbl %al, %ebp
movq (%r14,%r15,8), %rdi
movl %ebp, %esi
callq 0x4032b2
incq %r15
cmpl %r15d, %ebx
jne 0x40350a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbfd17(%rip), %rdi     # 0x4c324c
callq 0x41d390
xorl %edi, %edi
callq 0x40d5e0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/Zarh[P]regps3iso/iso.c
// Function: strcpy_malloc
char *strcpy_malloc(char *STR_DEFAULT)
{
	if(STR_DEFAULT==NULL) return NULL;
	u32 size = strlen(STR_DEFAULT)+1;
	char *STR = malloc(size+1);
	if(STR==NULL) return NULL;
	memset(STR, 0, size+1);
	memcpy(STR, STR_DEFAULT, size);
	return STR;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x403582
movq %rdi, %rbx
callq 0x4010f8
movq %rax, %r14
leal 0x2(%rax), %esi
movl $0x1, %edi
callq 0x42c090
testq %rax, %rax
je 0x403582
incl %r14d
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x401048
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Zarh[P]regps3iso/iso.c
// Function: UTF16_to_UTF8
static void UTF16_to_UTF8(u16 *stw, u8 *stb)
{
    while(SWAP_BE(stw[0])) {
        if((SWAP_BE(stw[0]) & 0xFF80) == 0) {
            *(stb++) = SWAP_BE(stw[0]) & 0xFF;   // utf16 00000000 0xxxxxxx utf8 0xxxxxxx
        } else if((SWAP_BE(stw[0]) & 0xF800) == 0) { // utf16 00000yyy yyxxxxxx utf8 110yyyyy 10xxxxxx
            *(stb++) = ((SWAP_BE(stw[0])>>6) & 0xFF) | 0xC0; *(stb++) = (SWAP_BE(stw[0]) & 0x3F) | 0x80;
        } else if((SWAP_BE(stw[0]) & 0xFC00) == 0xD800 && (SWAP_BE(stw[1]) & 0xFC00) == 0xDC00 ) { // utf16 110110ww wwzzzzyy 110111yy yyxxxxxx (wwww = uuuuu - 1) 
                                                                             // utf8 1111000uu 10uuzzzz 10yyyyyy 10xxxxxx  
            *(stb++)= (((SWAP_BE(stw[0]) + 64)>>8) & 0x3) | 0xF0; *(stb++)= (((SWAP_BE(stw[0])>>2) + 16) & 0x3F) | 0x80; 
            *(stb++)= ((SWAP_BE(stw[0])>>4) & 0x30) | 0x80 | ((SWAP_BE(stw[1])<<2) & 0xF); *(stb++)= (SWAP_BE(stw[1]) & 0x3F) | 0x80;
            stw++;
        } else { // utf16 zzzzyyyy yyxxxxxx utf8 1110zzzz 10yyyyyy 10xxxxxx
            *(stb++)= ((SWAP_BE(stw[0])>>12) & 0xF) | 0xE0; *(stb++)= ((SWAP_BE(stw[0])>>6) & 0x3F) | 0x80; *(stb++)= (SWAP_BE(stw[0]) & 0x3F) | 0x80;
        } 
        
        stw++;
    }
    
    *stb= 0;
}

// Assembly:
movzwl 0xf3af3(%rip), %edx     # 0x4f7c20
leaq 0xf32ac(%rip), %rax     # 0x4f73e0
testw %dx, %dx
je 0x404237
leaq 0xf3adc(%rip), %rcx     # 0x4f7c20
testl $0x80ff, %edx           # imm = 0x80FF
je 0x4041d6
testb $-0x8, %dl
je 0x40420a
movl %edx, %esi
andl $0xfc, %esi
cmpl $0xd8, %esi
jne 0x4041dd
movzwl 0x2(%rcx), %esi
andl $0xfc, %esi
cmpl $0xdc, %esi
jne 0x4041dd
rolw $0x8, %dx
addl $0x40, %edx
shrl $0x8, %edx
andb $0x3, %dl
orb $-0x10, %dl
movb %dl, (%rax)
movzwl (%rcx), %edx
shrl $0xa, %edx
addb $0x10, %dl
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x1(%rax)
movzwl (%rcx), %edx
movzwl 0x2(%rcx), %esi
movb 0x3(%rcx), %dil
addq $0x2, %rcx
shll $0x4, %edx
andl $0x30, %edx
shrl $0x6, %esi
andl $0xc, %esi
orl %edx, %esi
orb $-0x80, %sil
movb %sil, 0x2(%rax)
andb $0x3f, %dil
orb $-0x80, %dil
movb %dil, 0x3(%rax)
addq $0x4, %rax
jmp 0x404226
movb %dh, (%rax)
incq %rax
jmp 0x404226
shrb $0x4, %dl
orb $-0x20, %dl
movb %dl, (%rax)
movzwl (%rcx), %edx
rolw $0x8, %dx
shrl $0x6, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x1(%rax)
movb 0x1(%rcx), %dl
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x2(%rax)
addq $0x3, %rax
jmp 0x404226
rolw $0x8, %dx
shrl $0x6, %edx
orb $-0x40, %dl
movb %dl, (%rax)
movb 0x1(%rcx), %dl
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x1(%rax)
addq $0x2, %rax
movzwl 0x2(%rcx), %edx
addq $0x2, %rcx
testw %dx, %dx
jne 0x404144
movb $0x0, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/Zarh[P]regps3iso/iso.c
// Function: get_iso_path
static void get_iso_path(char *path, int indx) 
{
    char aux[0x420];

    path[0] = 0;

    if(!indx) {path[0] = '/'; path[1] = 0; return;}

    while(1) {
        strcpy(aux, directory_iso2[indx].name);
        strcat(aux, path);
        strcpy(path, aux);
       
        indx = directory_iso2[indx].parent - 1;
        if(indx == 0) break;     
    }

}

// Assembly:
movb $0x0, 0xf35be(%rip)     # 0x4f7800
testl %edi, %edi
je 0x4042a6
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq 0xf41c5(%rip), %r15     # 0x4f8420
movq %rsp, %rbx
leaq 0xf359b(%rip), %r14     # 0x4f7800
movslq %edi, %r12
shlq $0x4, %r12
movq 0x8(%r15,%r12), %rsi
movq %rbx, %rdi
callq 0x401020
movq %rbx, %rdi
movq %r14, %rsi
callq 0x401060
movq %r14, %rdi
movq %rbx, %rsi
callq 0x401020
movl (%r15,%r12), %edi
decl %edi
jne 0x404265
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movw $0x2f, 0xf3551(%rip)    # 0x4f7800
retq
// File: /workspace/github_c_makefile_star2_O3/eiselekd[P]MinimalLisp/l.c
// Function: main
int
main(int argc, char **argv) 
{
    ctx cctx; 
    FILE *f; char *m = 0, *lft; long l, val; int c, ad = 1, i; 
    v *cl = mkCons(0,0), *v, *n, *r;
    memset(&cctx, 0, sizeof(cctx));
    
    if (argv[1] && (f = fopen(argv[1],"r"))) {
        fseek(f, 0, SEEK_END); 
        l = ftell(f);
        fseek(f, 0, SEEK_SET); 
        m = (char *)malloc(l+1);
        fread(m, 1, l, f);
        m[l] = 0;
        fclose(f);
        printf("%s", m);
    }
    v = scan(&cctx, m);
    
    print(&cctx, stderr, v ); printf("\n");

    l_init(&cctx) ;
    
    evlist(&cctx, v, cctx.env);
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x2bb7
leaq 0x682(%rip), %rsi       # 0x31c7
callq 0x1140
testq %rax, %rax
je 0x2bb7
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1130
movq %rbx, %rdi
callq 0x10c0
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1130
leaq 0x1(%r15), %rdi
callq 0x10f0
movq %rax, %r14
movl $0x1, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1050
movb $0x0, (%r14,%r15)
movq %rbx, %rdi
callq 0x1060
leaq 0x576(%rip), %rdi       # 0x3121
movq %r14, %rsi
xorl %eax, %eax
callq 0x1080
jmp 0x2bba
xorl %r14d, %r14d
leaq -0x30(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x26aa
movq %rax, %rbx
movq 0x2425(%rip), %rax      # 0x4ff8
movq (%rax), %r14
movl $0x18, %edi
callq 0x10f0
movl $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq %rax, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
movl $0x80, %r8d
xorl %r9d, %r9d
callq 0x1557
movl $0xa, %edi
callq 0x1030
movq %r15, %rdi
callq 0x2a58
testq %rbx, %rbx
je 0x2c41
leaq -0x30(%rbp), %r14
movq 0x8(%r14), %r15
movq 0x8(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x1f7e
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x2c29
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/keithnoguchi[P]pearls-in-action/0x9/main_test.c
// Function: main
int main(void)
{
	int fail = 0;
	int i = 0;

	printf("===============================\n");
	printf("Programming Pearls: Chapter 0x9\n");
	printf("===============================\n");

	if (test_find_first_10(&i))
		fail++;
	if (test_find_first_1000(&i))
		fail++;
	if (test_find_first1000(&i))
		fail++;
	if (test_find_first1023_512(&i))
		fail++;
	if (test_find_first1023_1000(&i))
		fail++;
	if (test_find_first_flat_1023(&i))
		fail++;

	return fail;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
movl $0x0, (%rbx)
leaq 0xeae(%rip), %r14       # 0x2024
movq %r14, %rdi
callq 0x1030
leaq 0xe7f(%rip), %rdi       # 0x2004
callq 0x1030
movq %r14, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x124c
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
movq %rbx, %rdi
callq 0x14e0
leal 0x1(%r14), %ebp
testl %eax, %eax
cmovel %r14d, %ebp
movq %rbx, %rdi
callq 0x15f0
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x1898
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x1b1c
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movq %rbx, %rdi
callq 0x1c94
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/keithnoguchi[P]pearls-in-action/0x9/find_first.c
// Function: find_first
int find_first(int v, const int x[], int n)
{
	int l, u;

	l = -1, u = n;
	while (l+1 != u) {
		int m = (l+u)/2;

		if (x[m] < v)
			l = m;
		else
			u = m;
	}

	if (u >= n || x[u] != v)
		return -1;
	return u;
}

// Assembly:
testl %edx, %edx
je 0x122f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %edx, %r8d
leal (%r8,%rax), %r9d
movl %r9d, %ecx
shrl $0x1f, %ecx
addl %r9d, %ecx
sarl %ecx
movslq %ecx, %r9
cmpl %edi, (%rsi,%r9,4)
jge 0x1221
movl %ecx, %eax
movl %r8d, %ecx
leal 0x1(%rax), %r9d
movl %ecx, %r8d
cmpl %ecx, %r9d
jne 0x1204
jmp 0x1231
xorl %ecx, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %edx, %ecx
jge 0x1248
movslq %ecx, %rax
cmpl %edi, (%rsi,%rax,4)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovel %ecx, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/keithnoguchi[P]pearls-in-action/0x9/find_first1000.c
// Function: find_first1000
int find_first1000(int t, const int x[])
{
	int l, i, p;

	i = 512;
	l = -1;
	if (x[511] < t)
		l = 1000-512;
	while (i != 1) {
		i /= 2;
		if (x[l+i] < t)
			l += i;
	}
	p = l+1;
	if (p == 1000 || x[p] != t)
		p = -1;

	return p;
}

// Assembly:
xorl %ecx, %ecx
cmpl %edi, 0x7fc(%rsi)
setge %cl
negl %ecx
orl $0x1e8, %ecx            # imm = 0x1E8
movl $0x200, %edx            # imm = 0x200
movl %edx, %r8d
shrl $0x1f, %r8d
addl %edx, %r8d
sarl %r8d
leal (%r8,%rcx), %eax
movslq %eax, %r9
cmpl %edi, (%rsi,%r9,4)
jl 0x15cc
movl %ecx, %eax
andl $-0x2, %edx
movl %eax, %ecx
cmpl $0x2, %edx
movl %r8d, %edx
jne 0x15b0
incl %eax
cmpl $0x3e8, %eax            # imm = 0x3E8
je 0x15ea
movslq %eax, %rcx
cmpl %edi, (%rsi,%rcx,4)
je 0x15ef
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/keithnoguchi[P]pearls-in-action/0x9/find_first1023.c
// Function: find_first1023
int find_first1023(int t, const int x[], unsigned int nr)
{
	int l, i, p;

	assert(512 <= nr && nr < 1024);

	i = 512;
	l = -1;
	if (x[511] < t)
		l = nr-512;
	while (i != 1) {
		i /= 2;
		if (x[l+i] < t)
			l += i;
	}
	p = l+1;
	if (p >= nr || x[p] != t)
		p = -1;
	return p;
}

// Assembly:
movl %edx, %eax
andl $0xfffffe00, %eax       # imm = 0xFFFFFE00
cmpl $0x200, %eax            # imm = 0x200
jne 0x1877
leal -0x200(%rdx), %eax
cmpl %edi, 0x7fc(%rsi)
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
cmovll %eax, %r8d
movl $0x200, %ecx            # imm = 0x200
movl %ecx, %r9d
shrl $0x1f, %r9d
addl %ecx, %r9d
sarl %r9d
leal (%r9,%r8), %eax
movslq %eax, %r10
cmpl %edi, (%rsi,%r10,4)
jl 0x1856
movl %r8d, %eax
andl $-0x2, %ecx
movl %eax, %r8d
cmpl $0x2, %ecx
movl %r9d, %ecx
jne 0x1839
incl %eax
cmpl %edx, %eax
jae 0x1871
movl %eax, %ecx
cmpl %edi, (%rsi,%rcx,4)
je 0x1876
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
pushq %rax
leaq 0x9a5(%rip), %rdi       # 0x2224
leaq 0x9b5(%rip), %rsi       # 0x223b
leaq 0x9bf(%rip), %rcx       # 0x224c
movl $0xb, %edx
callq 0x1050
nop
// File: /workspace/github_c_makefile_star2_O3/keithnoguchi[P]pearls-in-action/0x9/find_first1023_test.c
// Function: generate_array1023
static void generate_array1023(int x[], unsigned int nr, enum dup_pos p, int count)
{
	int i, value, start;

	for (i = 0; i < nr; i++)
		x[i] = i;

	/* create duplicate */
	switch (p) {
	case DUPLICATE_FRONT:
		value = x[0];
		start = 0;
		break;
	case DUPLICATE_MIDDLE:
		value = x[(nr-1)/2];
		start = (nr-count)/2;
		break;
	case DUPLICATE_BACK:
		value = x[nr-1];
		start = nr-count;
		break;
	}
	for (i = 0; i < count; i++)
		x[start+i] = value;

	dump_array1023(x, nr);
}

// Assembly:
testl %esi, %esi
je 0x19ef
movl %esi, %r8d
leaq 0x1(%r8), %rax
andq $-0x2, %rax
decq %r8
movq %r8, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x6da(%rip), %xmm1      # 0x2050
xorl %r8d, %r8d
movdqa 0x6df(%rip), %xmm2      # 0x2060
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x6df(%rip), %xmm4      # 0x2070
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %r9d
notl %r9d
testb $0x1, %r9b
je 0x19c9
movl %r8d, (%rdi,%r8,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %r9d
testb $0x1, %r9b
je 0x19e2
leal 0x1(%r8), %r9d
movl %r9d, 0x4(%rdi,%r8,4)
addq $0x2, %r8
paddq %xmm4, %xmm1
cmpq %r8, %rax
jne 0x1991
cmpl $0x2, %edx
je 0x1a11
cmpl $0x1, %edx
je 0x1a03
testl %edx, %edx
jne 0x1a1a
movl (%rdi), %eax
xorl %esi, %esi
jmp 0x1a1a
leal -0x1(%rsi), %eax
shrl %eax
movl (%rdi,%rax,4), %eax
subl %ecx, %esi
shrl %esi
jmp 0x1a1a
movslq %esi, %rax
movl -0x4(%rdi,%rax,4), %eax
subl %ecx, %esi
testl %ecx, %ecx
jle 0x1b1b
movslq %esi, %rdx
movl %ecx, %esi
addl $0x3, %ecx
decq %rsi
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq (%rdi,%rdx,4), %rdx
addq $0xc, %rdx
shrl $0x2, %ecx
shlq $0x4, %rcx
movdqa 0x632(%rip), %xmm1      # 0x2080
movdqa 0x5fa(%rip), %xmm2      # 0x2050
xorl %esi, %esi
movdqa 0x600(%rip), %xmm3      # 0x2060
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x620(%rip), %xmm5      # 0x2090
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edi
notl %edi
testb $0x1, %dil
je 0x1aa9
movl %eax, -0xc(%rdx,%rsi)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edi
testb $0x1, %dil
je 0x1abc
movl %eax, -0x8(%rdx,%rsi)
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %edi
testb $0x1, %dil
je 0x1af8
movl %eax, -0x4(%rdx,%rsi)
pextrw $0x4, %xmm6, %edi
testb $0x1, %dil
je 0x1b06
movl %eax, (%rdx,%rsi)
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x10, %rsi
cmpq %rsi, %rcx
jne 0x1a70
retq
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/elmc.c
// Function: main
int main (int argc, char **argv) {
    if (argc <= 1) {
        print_usage();
    } else if (strcmp(argv[1], "-v") == 0) {
        print_version();
    } else {
        return handle_script(&argv[1]);
    } 
    return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpl $0x1, %edi
jg 0x1352
leaq 0xbcc7(%rip), %rdi      # 0xd004
leaq 0xbd73(%rip), %rsi      # 0xd0b7
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x10b0
jmp 0x13f2
movq 0x8(%rsi), %rdi
cmpb $0x2d, (%rdi)
jne 0x136d
cmpb $0x76, 0x1(%rdi)
jne 0x1367
cmpb $0x0, 0x2(%rdi)
je 0x13ca
cmpb $0x0, 0x1(%rdi)
je 0x13aa
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x30dc
movq (%rbx), %rdi
testl %eax, %eax
je 0x1394
callq 0x23dc
movq 0x8(%rsp), %rdi
callq 0x1f07
xorl %ebx, %ebx
jmp 0x13f2
callq 0x3146
movq 0x8(%rsp), %rdi
callq 0x3156
movl $0x1, %ebx
jmp 0x13f2
movq 0x11c2f(%rip), %rax     # 0x12fe0
movq (%rax), %rsi
leaq 0xbd16(%rip), %rdi      # 0xd0d1
leaq 0x8(%rsp), %rbx
movq %rbx, %rdx
callq 0x306d
jmp 0x137a
leaq 0xbceb(%rip), %rdi      # 0xd0bc
leaq 0xbcec(%rip), %rsi      # 0xd0c4
leaq 0xbcec(%rip), %rdx      # 0xd0cb
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x10b0
movl $0xa, %edi
callq 0x1030
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_expr
elm_ast_val_t *elm_ast_expr(int i, elm_ast_val_t **xs) {
    elm_ast_t *node = elm_ast_new(ELM_AST_EXPR, NULL);
    for (int x = 0; x < i; x++) {
        elm_ast_add_child(node, xs[x]);
    }
    return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movl $0x20, %edi
callq 0x1170
movq %rax, %rcx
movl $0x7, (%rax)
xorl %r12d, %r12d
movq %r12, 0x8(%rax)
movl $0x0, 0x10(%rax)
movq %r12, 0x18(%rax)
testl %ebp, %ebp
jle 0x15ff
movq %rcx, (%rsp)
movl %ebp, %r13d
shlq $0x3, %r13
xorl %ebp, %ebp
xorl %eax, %eax
movq (%rbx,%rbp), %r14
leaq 0x8(%rbp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x11a0
movq %r14, (%rax,%rbp)
incl %r12d
movq %r15, %rbp
cmpq %r15, %r13
jne 0x15d1
movq (%rsp), %rcx
movl %r12d, 0x10(%rcx)
movq %rax, 0x18(%rcx)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_list_cons
elm_ast_val_t *elm_ast_list_cons(int i, elm_ast_val_t **xs) {
    elm_ast_t *node = elm_ast_new(ELM_AST_LIST, NULL);
    for (int x = 0; x < i; x++) {
        elm_ast_t *nx = (elm_ast_t *)xs[x];
        if (nx->tag == ELM_AST_LIST) {
            for (int y = 0; y < nx->children_num; y++) {
                elm_ast_add_child(node, nx->children[y]);
            }
            elm_ast_delete_no_children(nx);
        } else {
            elm_ast_add_child(node, xs[x]);
        }
    }
    return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r13
movl %edi, %ebp
movl $0x20, %edi
callq 0x1170
movl $0x8, (%rax)
xorl %r14d, %r14d
movq %r14, 0x8(%rax)
movl $0x0, 0x10(%rax)
movq %rax, (%rsp)
movq %r14, 0x18(%rax)
testl %ebp, %ebp
jle 0x17df
movl %ebp, %eax
movq %rax, 0x20(%rsp)
xorl %r15d, %r15d
xorl %ebx, %ebx
movq %r13, 0x8(%rsp)
movq (%r13,%rbx,8), %r12
cmpl $0x8, (%r12)
jne 0x179a
cmpl $0x0, 0x10(%r12)
jle 0x1790
movq %rbx, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movslq %r14d, %r14
leaq 0x8(,%r14,8), %r13
shlq $0x3, %r14
xorl %ebx, %ebx
movq 0x18(%r12), %rax
movq (%rax,%rbx,8), %rbp
movq %r15, %rdi
movq %r13, %rsi
callq 0x11a0
movq %rax, %r15
addq %r14, %rax
movq %rbp, (%rax,%rbx,8)
incq %rbx
movslq 0x10(%r12), %rax
addq $0x8, %r13
cmpq %rax, %rbx
jl 0x1743
movq 0x18(%rsp), %r14
addl %ebx, %r14d
movq (%rsp), %rax
movl %r14d, 0x10(%rax)
movq %r15, 0x18(%rax)
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %rbx
movq %r12, %rdi
callq 0x17f2
jmp 0x17d1
movq %rbx, %r13
leal 0x1(%r14), %ebx
movq (%rsp), %rbp
movl %ebx, 0x10(%rbp)
movslq %r14d, %r14
leaq 0x8(,%r14,8), %rsi
movq %r15, %rdi
callq 0x11a0
movq %rax, %r15
movq %rax, 0x18(%rbp)
movq %r12, (%rax,%r14,8)
movl %ebx, %r14d
movq %r13, %rbx
movq 0x8(%rsp), %r13
incq %rbx
cmpq 0x20(%rsp), %rbx
jne 0x1714
movq (%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_tuple_cons
elm_ast_val_t *elm_ast_tuple_cons(int i, elm_ast_val_t **xs) {
    elm_ast_t *node = elm_ast_new(ELM_AST_TUPLE, NULL);
    for (int x = 0; x < i; x++) {
        elm_ast_t *nx = (elm_ast_t *)xs[x];
        if (nx->tag == ELM_AST_TUPLE) {
            for (int y = 0; y < nx->children_num; y++) {
                elm_ast_add_child(node, nx->children[y]);
            }
            elm_ast_delete_no_children(nx);
        } else {
            elm_ast_add_child(node, xs[x]);
        }
    }
    return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r13
movl %edi, %ebp
movl $0x20, %edi
callq 0x1170
movl $0x9, (%rax)
xorl %r14d, %r14d
movq %r14, 0x8(%rax)
movl $0x0, 0x10(%rax)
movq %rax, (%rsp)
movq %r14, 0x18(%rax)
testl %ebp, %ebp
jle 0x19b6
movl %ebp, %eax
movq %rax, 0x20(%rsp)
xorl %r15d, %r15d
xorl %ebx, %ebx
movq %r13, 0x8(%rsp)
movq (%r13,%rbx,8), %r12
cmpl $0x9, (%r12)
jne 0x1971
cmpl $0x0, 0x10(%r12)
jle 0x1967
movq %rbx, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movslq %r14d, %r14
leaq 0x8(,%r14,8), %r13
shlq $0x3, %r14
xorl %ebx, %ebx
movq 0x18(%r12), %rax
movq (%rax,%rbx,8), %rbp
movq %r15, %rdi
movq %r13, %rsi
callq 0x11a0
movq %rax, %r15
addq %r14, %rax
movq %rbp, (%rax,%rbx,8)
incq %rbx
movslq 0x10(%r12), %rax
addq $0x8, %r13
cmpq %rax, %rbx
jl 0x191a
movq 0x18(%rsp), %r14
addl %ebx, %r14d
movq (%rsp), %rax
movl %r14d, 0x10(%rax)
movq %r15, 0x18(%rax)
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %rbx
movq %r12, %rdi
callq 0x17f2
jmp 0x19a8
movq %rbx, %r13
leal 0x1(%r14), %ebx
movq (%rsp), %rbp
movl %ebx, 0x10(%rbp)
movslq %r14d, %r14
leaq 0x8(,%r14,8), %rsi
movq %r15, %rdi
callq 0x11a0
movq %rax, %r15
movq %rax, 0x18(%rbp)
movq %r12, (%rax,%r14,8)
movl %ebx, %r14d
movq %r13, %rbx
movq 0x8(%rsp), %r13
incq %rbx
cmpq 0x20(%rsp), %rbx
jne 0x18eb
movq (%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_if
elm_ast_val_t *elm_ast_if(int i, elm_ast_val_t **xs) {
    assert(i == 6);
    elm_ast_t *node = elm_ast_new(ELM_AST_IF, NULL);
    elm_ast_add_child(node, xs[1]);
    elm_ast_add_child(node, xs[3]);
    elm_ast_add_child(node, xs[5]);
    free(xs[0]);
    free(xs[2]);
    free(xs[4]);
    return node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x6, %edi
jne 0x1a5f
movq %rsi, %rbx
movl $0x20, %edi
callq 0x1170
movq %rax, %r14
movl $0xa, (%rax)
movq $0x0, 0x8(%rax)
movq 0x8(%rbx), %r15
movl $0x8, %edi
callq 0x1170
movq %r15, (%rax)
movq 0x18(%rbx), %r15
movl $0x10, %esi
movq %rax, %rdi
callq 0x11a0
movq %r15, 0x8(%rax)
movq 0x28(%rbx), %r15
movl $0x3, 0x10(%r14)
movl $0x18, %esi
movq %rax, %rdi
callq 0x11a0
movq %rax, 0x18(%r14)
movq %r15, 0x10(%rax)
movq (%rbx), %rdi
callq 0x1230
movq 0x10(%rbx), %rdi
callq 0x1230
movq 0x20(%rbx), %rdi
callq 0x1230
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0xb6bf(%rip), %rdi      # 0xd125
leaq 0xb6bf(%rip), %rsi      # 0xd12c
leaq 0xb6bf(%rip), %rcx      # 0xd133
movl $0x7c, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_case
elm_ast_val_t *elm_ast_case(int i, elm_ast_val_t **xs) {
    assert(i == 4);
    //assert(((elm_ast_t *)(xs[1]))->tag == ELM_AST_EXPR);
    assert(((elm_ast_t *)(xs[3]))->tag == ELM_AST_CASE);
    
    elm_ast_t *node = elm_ast_new(ELM_AST_CASE, NULL);
    elm_ast_add_child(node, xs[1]);
    
    elm_ast_t *branches = (elm_ast_t *)xs[3];
    for (int x = 0; x < branches->children_num; x++) {
        elm_ast_add_child(node, branches->children[x]);
    } 
    
    free(xs[0]);
    free(xs[2]);
    elm_ast_delete_no_children(xs[3]);
    
    return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x4, %edi
jne 0x1b62
movq %rsi, %rbx
movq 0x18(%rsi), %r12
cmpl $0xb, (%r12)
jne 0x1b81
movl $0x20, %edi
callq 0x1170
movq %rax, %r14
movl $0xb, (%rax)
movq $0x0, 0x8(%rax)
movq 0x8(%rbx), %r15
movl $0x1, 0x10(%rax)
movl $0x8, %edi
callq 0x1170
movq %rax, 0x18(%r14)
movq %r15, (%rax)
movslq 0x10(%r12), %r15
testq %r15, %r15
jle 0x1b36
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq 0x18(%r12), %r12
movl $0x1, %ebx
xorl %ebp, %ebp
movq %rbx, %r13
movq (%r12,%rbp,8), %r14
incq %rbx
leaq 0x8(,%r13,8), %rsi
movq %rax, %rdi
callq 0x11a0
movq %r14, (%rax,%r13,8)
incq %rbp
cmpq %r15, %rbp
jb 0x1afe
movq 0x8(%rsp), %r14
movl %ebx, 0x10(%r14)
movq %rax, 0x18(%r14)
movq 0x10(%rsp), %rbx
movq (%rbx), %rdi
callq 0x1230
movq 0x10(%rbx), %rdi
callq 0x1230
movq 0x18(%rbx), %rdi
callq 0x17f2
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb5fb(%rip), %rdi      # 0xd164
leaq 0xb5bc(%rip), %rsi      # 0xd12c
leaq 0xb5f4(%rip), %rcx      # 0xd16b
movl $0x88, %edx
callq 0x10c0
leaq 0xb616(%rip), %rdi      # 0xd19e
leaq 0xb59d(%rip), %rsi      # 0xd12c
leaq 0xb5d5(%rip), %rcx      # 0xd16b
movl $0x8a, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_branch
elm_ast_val_t *elm_ast_branch(int i, elm_ast_val_t **xs) {
    assert(i == 3);
    assert(((elm_ast_t *)(xs[i - 1]))->tag == ELM_AST_EXPR);

    elm_ast_t *node = elm_ast_new(ELM_AST_BRANCH, NULL);
    elm_ast_add_child(node, xs[0]);
    elm_ast_add_child(node, xs[2]);

    free(xs[1]);
    
    return node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x3, %edi
jne 0x1ca2
movq %rsi, %rbx
movq 0x10(%rsi), %r15
cmpl $0x7, (%r15)
jne 0x1cc1
movl $0x20, %edi
callq 0x1170
movq %rax, %r14
movl $0xc, (%rax)
movq $0x0, 0x8(%rax)
movq (%rbx), %r12
movl $0x8, %edi
callq 0x1170
movq %r12, (%rax)
movl $0x2, 0x10(%r14)
movl $0x10, %esi
movq %rax, %rdi
callq 0x11a0
movq %rax, 0x18(%r14)
movq %r15, 0x8(%rax)
movq 0x8(%rbx), %rdi
callq 0x1230
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xb521(%rip), %rdi      # 0xd1ca
leaq 0xb47c(%rip), %rsi      # 0xd12c
leaq 0xb51a(%rip), %rcx      # 0xd1d1
movl $0xa4, %edx
callq 0x10c0
leaq 0xb53e(%rip), %rdi      # 0xd206
leaq 0xb45d(%rip), %rsi      # 0xd12c
leaq 0xb4fb(%rip), %rcx      # 0xd1d1
movl $0xa5, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_decl
elm_ast_val_t *elm_ast_decl(int i, elm_ast_val_t **xs) {
    assert(i == 3);
    assert(((elm_ast_t *)(xs[0]))->tag == ELM_AST_FUNC);
    assert(((elm_ast_t *)(xs[2]))->tag == ELM_AST_EXPR);

    elm_ast_t *node = elm_ast_new(ELM_AST_DECL, NULL);
    elm_ast_add_child(node, xs[0]);
    elm_ast_add_child(node, xs[2]);

    free(xs[1]);

    return node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x3, %edi
jne 0x1da8
movq %rsi, %rbx
movq (%rsi), %r12
cmpl $0xf, (%r12)
jne 0x1dc7
movq 0x10(%rbx), %r15
cmpl $0x7, (%r15)
jne 0x1de6
movl $0x20, %edi
callq 0x1170
movq %rax, %r14
movl $0xe, (%rax)
movq $0x0, 0x8(%rax)
movl $0x8, %edi
callq 0x1170
movq %r12, (%rax)
movl $0x2, 0x10(%r14)
movl $0x10, %esi
movq %rax, %rdi
callq 0x11a0
movq %rax, 0x18(%r14)
movq %r15, 0x8(%rax)
movq 0x8(%rbx), %rdi
callq 0x1230
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xb41b(%rip), %rdi      # 0xd1ca
leaq 0xb376(%rip), %rsi      # 0xd12c
leaq 0xb479(%rip), %rcx      # 0xd236
movl $0xb7, %edx
callq 0x10c0
leaq 0xb49b(%rip), %rdi      # 0xd269
leaq 0xb357(%rip), %rsi      # 0xd12c
leaq 0xb45a(%rip), %rcx      # 0xd236
movl $0xb8, %edx
callq 0x10c0
leaq 0xb4a8(%rip), %rdi      # 0xd295
leaq 0xb338(%rip), %rsi      # 0xd12c
leaq 0xb43b(%rip), %rcx      # 0xd236
movl $0xb9, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_func
elm_ast_val_t *elm_ast_func(int i, elm_ast_val_t **xs) {
    elm_ast_t *node = elm_ast_new(ELM_AST_FUNC, NULL);

    assert(((elm_ast_t *)(xs[0]))->tag == ELM_AST_VAR);
    assert(((elm_ast_t *)(xs[0]))->contents != NULL);

    node->contents = malloc(sizeof(char) * strlen(((elm_ast_t *)(xs[0]))->contents));
    strcpy(node->contents, ((elm_ast_t *)(xs[0]))->contents);
    elm_ast_delete(xs[0]);

    if (i > 1) {
        for (int x = 1; x < i; x++) {
            elm_ast_add_child(node, xs[x]);
        }
    }

    return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movl $0x20, %edi
callq 0x1170
movl $0xf, (%rax)
movl $0x0, 0x10(%rax)
movq $0x0, 0x18(%rax)
movq (%rbx), %r15
cmpl $0x6, (%r15)
jne 0x1ec9
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x1ee8
movq %rax, %r14
movq %r12, %rdi
callq 0x1090
movq %rax, %rdi
callq 0x1170
movq %rax, 0x8(%r14)
movq %rax, %rdi
movq %r12, %rsi
callq 0x1050
movq %r15, %rdi
callq 0x1f07
cmpl $0x2, %ebp
jl 0x1eb7
movl %ebp, %r12d
shlq $0x3, %r12
movl $0x8, %r15d
xorl %r13d, %r13d
xorl %eax, %eax
movq (%rbx,%r15), %rbp
movq %rax, %rdi
movq %r15, %rsi
callq 0x11a0
movq %rbp, -0x8(%rax,%r15)
addq $0x8, %r15
incl %r13d
cmpq %r15, %r12
jne 0x1e8f
movl %r13d, 0x10(%r14)
movq %rax, 0x18(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb3f1(%rip), %rdi      # 0xd2c1
leaq 0xb255(%rip), %rsi      # 0xd12c
leaq 0xb40e(%rip), %rcx      # 0xd2ec
movl $0xc7, %edx
callq 0x10c0
leaq 0xb430(%rip), %rdi      # 0xd31f
leaq 0xb236(%rip), %rsi      # 0xd12c
leaq 0xb3ef(%rip), %rcx      # 0xd2ec
movl $0xc8, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_delete
void elm_ast_delete(elm_ast_t *a) {
    if (a == NULL) { return; }

    for (int i = 0; i < a->children_num; i++) {
        elm_ast_delete(a->children[i]);
    }

    free(a->children);
    free(a->contents);
    free(a);
}

// Assembly:
testq %rdi, %rdi
je 0x1f56
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x10(%rdi)
jle 0x1f35
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1f07
incq %r14
movslq 0x10(%rbx), %rax
cmpq %rax, %r14
jl 0x1f1c
movq 0x18(%rbx), %rdi
callq 0x1230
movq 0x8(%rbx), %rdi
callq 0x1230
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1230
retq
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_module
elm_ast_val_t *elm_ast_module(int i, elm_ast_val_t **xs) {
    elm_ast_t *node = elm_ast_new(ELM_AST_MODULE, NULL);
    for (int x = 0; x < i; x++) {
        elm_ast_add_child(node, xs[x]);
    }
    return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movl $0x20, %edi
callq 0x1170
movq %rax, %rcx
movl $0x10, (%rax)
xorl %r12d, %r12d
movq %r12, 0x8(%rax)
movl $0x0, 0x10(%rax)
movq %r12, 0x18(%rax)
testl %ebp, %ebp
jle 0x1fcd
movq %rcx, (%rsp)
movl %ebp, %r13d
shlq $0x3, %r13
xorl %ebp, %ebp
xorl %eax, %eax
movq (%rbx,%rbp), %r14
leaq 0x8(%rbp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x11a0
movq %r14, (%rax,%rbp)
incl %r12d
movq %r15, %rbp
cmpq %r15, %r13
jne 0x1f9f
movq (%rsp), %rcx
movl %r12d, 0x10(%rcx)
movq %rax, 0x18(%rcx)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_traverse_next
elm_ast_t *elm_ast_traverse_next(elm_ast_trav_t **trav) {
    elm_ast_trav_t *n_trav, *to_free;
    elm_ast_t *ret = NULL;
    int cchild;

    if(*trav == NULL) return NULL;

    switch((*trav)->order) {
        case ELM_AST_TRAV_ORDER_PRE:
            ret = (*trav)->curr_node;
            
            while(*trav != NULL &&
                    (*trav)->curr_child >= (*trav)->curr_node->children_num)
            {
                to_free = *trav;
                *trav = (*trav)->parent;
                free(to_free);
            }
            
            if(*trav == NULL) {
                break;
            }

            n_trav = malloc(sizeof(elm_ast_trav_t));

            cchild = (*trav)->curr_child;
            n_trav->curr_node = (*trav)->curr_node->children[cchild];
            n_trav->parent = *trav;
            n_trav->curr_child = 0;
            n_trav->order = (*trav)->order;

            (*trav)->curr_child++;
            *trav = n_trav;

            break;
        case ELM_AST_TRAV_ORDER_POST:
            break;
    }

    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x2435
cmpl $0x0, 0x14(%r15)
je 0x2444
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rdi, %r14
movq (%r15), %rbx
movslq 0x10(%r15), %r12
movq (%r15), %r13
cmpl 0x10(%r13), %r12d
jl 0x2470
movq 0x8(%r15), %rax
movq %rax, (%r14)
movq %r15, %rdi
callq 0x1230
movq (%r14), %r15
testq %r15, %r15
jne 0x244a
jmp 0x2437
movl $0x18, %edi
callq 0x1170
movq 0x18(%r13), %rcx
movq (%rcx,%r12,8), %rcx
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movl $0x0, 0x10(%rax)
movl 0x14(%r15), %ecx
movl %ecx, 0x14(%rax)
leal 0x1(%r12), %ecx
movl %ecx, 0x10(%r15)
movq %rax, (%r14)
jmp 0x2437
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_traverse_free
void elm_ast_traverse_free(elm_ast_trav_t **trav) {
    elm_ast_trav_t *n_trav;

    while(*trav != NULL) {
        n_trav = (*trav)->parent;
        free(*trav);
        *trav = n_trav;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x24c8
movq 0x8(%rdi), %r14
callq 0x1230
movq %r14, (%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0x24b4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/eparse.c
// Function: elm_parse
int elm_parse(const char *filename, const char *string, elm_result_t *r) {
    elm_parser_t *p = elm_parser_init();
    mpc_result_t result;
    if (mpc_parse(filename, string, p->Module, &result)) {
        r->output = (elm_ast_t *)result.output;
        elm_parser_cleanup(p);
        return 1;
    } else {
        r->error = elm_error(result.error);  
        elm_parser_cleanup(p);
        return 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
callq 0x253f
movq %rax, %r14
movq 0x80(%rax), %rdx
movq %rsp, %r13
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rcx
callq 0x478d
movl $0x1, %ebp
movq (%r13), %r15
testl %eax, %eax
jne 0x2523
movl $0x8, %edi
callq 0x1170
movq %r15, (%rax)
xorl %ebp, %ebp
movq %rax, %r15
movq %r15, (%rbx)
movq %r14, %rdi
callq 0x2f5d
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_O3/niho[P]elmc/src/eparse.c
// Function: elm_parse_pipe
int elm_parse_pipe(const char *filename, FILE *pipe, elm_result_t *r) {
    elm_parser_t *p = elm_parser_init();
    mpc_result_t result;
    if (mpc_parse_pipe(filename, pipe, p->Module, &result)) {
        r->output = (elm_ast_t *)result.output;
        elm_parser_cleanup(p);
        return 1;
    } else {
        r->error = elm_error(result.error);  
        elm_parser_cleanup(p);
        return 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
callq 0x253f
movq %rax, %r14
movq 0x80(%rax), %rdx
movq %rsp, %r13
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rcx
callq 0x4a80
movl $0x1, %ebp
movq (%r13), %r15
testl %eax, %eax
jne 0x30c0
movl $0x8, %edi
callq 0x1170
movq %r15, (%rax)
xorl %ebp, %ebp
movq %rax, %r15
movq %r15, (%rbx)
movq %r14, %rdi
callq 0x2f5d
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_O3/niho[P]elmc/src/eparse.c
// Function: elm_parse_contents
int elm_parse_contents(const char *filename, elm_result_t *r) {
    elm_parser_t *p = elm_parser_init();
    mpc_result_t result;
    if (mpc_parse_contents(filename, p->Module, &result)) {
        r->output = (elm_ast_t *)result.output;
        elm_parser_cleanup(p);
        return 1;
    } else {
        r->error = elm_error(result.error);
        elm_parser_cleanup(p);
        return 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r15
callq 0x253f
movq %rax, %r14
movq 0x80(%rax), %rsi
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x4b48
movl $0x1, %ebp
movq (%r12), %r15
testl %eax, %eax
jne 0x312c
movl $0x8, %edi
callq 0x1170
movq %r15, (%rax)
xorl %ebp, %ebp
movq %rax, %r15
movq %r15, (%rbx)
movq %r14, %rdi
callq 0x2f5d
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/eparse.c
// Function: is_unreserved
static int is_unreserved(mpc_val_t **xs) {
    if (strcmp(xs[0], "if") == 0)
        return 0;
    if (strcmp(xs[0], "then") == 0)
        return 0;
    if (strcmp(xs[0], "else") == 0)
        return 0;
    if (strcmp(xs[0], "case") == 0)
        return 0;
    if (strcmp(xs[0], "of") == 0)
        return 0;
    if (strcmp(xs[0], "->") == 0)
        return 0;
    if (strcmp(xs[0], "_") == 0)
        return 0;
    if (strcmp(xs[0], "=") == 0)
        return 0;
    return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rbx
movzbl (%rbx), %ebp
cmpl $0x69, %ebp
jne 0x3191
cmpb $0x66, 0x1(%rbx)
jne 0x3191
cmpb $0x0, 0x2(%rbx)
je 0x31f3
leaq 0xa384(%rip), %rsi      # 0xd51c
movq %rbx, %rdi
callq 0x1120
testl %eax, %eax
je 0x31f3
leaq 0xa376(%rip), %rsi      # 0xd521
movq %rbx, %rdi
callq 0x1120
testl %eax, %eax
je 0x31f3
leaq 0xa2dc(%rip), %rsi      # 0xd49a
movq %rbx, %rdi
callq 0x1120
testl %eax, %eax
je 0x31f3
movb $0x1, %al
cmpl $0x5e, %ebp
jg 0x31dd
cmpl $0x2d, %ebp
je 0x3208
cmpl $0x3d, %ebp
je 0x31ff
jmp 0x31f5
cmpl $0x5f, %ebp
je 0x31ff
cmpl $0x6f, %ebp
jne 0x31f5
cmpb $0x66, 0x1(%rbx)
jne 0x31f5
cmpb $0x0, 0x2(%rbx)
jne 0x31f5
xorl %eax, %eax
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
cmpb $0x0, 0x1(%rbx)
setne %al
jmp 0x31f5
cmpb $0x3e, 0x1(%rbx)
jne 0x31f5
cmpb $0x0, 0x2(%rbx)
jmp 0x3203
// File: /workspace/github_c_makefile_star2_O3/TeaInside[P]teavpn/src/teavpn/main.c
// Function: main
int main(int argc, char **_argv, char **envp)
{
	uint8_t exit_code;
	teavpn_config config;

	argv = _argv;

	if (!argv_parser(&config, argc, _argv, envp)) {
		exit_code = 1;
		goto ret;
	}

	switch (config.type) {
		case teavpn_server_config:
			exit_code = teavpn_tcp_server(&(config.config.server));
			break;
		case teavpn_client_config:
			exit_code = teavpn_tcp_client(&(config.config.client));
			break;
		default:
			printf("Invalid config type\n");
			exit_code = 1;
			break;
	}

	ret:
	return exit_code;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rcx
movq %rsi, %rdx
movl %edi, %esi
movq %fs:0x28, %rax
movq %rax, -0x10(%rbp)
movq %rdx, 0x8837(%rip)      # 0xb258
leaq -0x58(%rbp), %rdi
callq 0x338c
movb $0x1, %bl
testb %al, %al
je 0x2a60
movl -0x18(%rbp), %eax
cmpl $0x1, %eax
je 0x2a47
testl %eax, %eax
jne 0x2a54
leaq -0x58(%rbp), %rdi
callq 0x4594
jmp 0x2a50
leaq -0x58(%rbp), %rdi
callq 0x39b0
movl %eax, %ebx
jmp 0x2a60
leaq 0x45a9(%rip), %rdi      # 0x7004
callq 0x2090
movq %fs:0x28, %rax
cmpq -0x10(%rbp), %rax
jne 0x2a79
movzbl %bl, %eax
addq $0x58, %rsp
popq %rbx
popq %rbp
retq
callq 0x2110
nop
// File: /workspace/github_c_makefile_star2_O3/TeaInside[P]teavpn/src/teavpn/cli_arg.c
// Function: show_help_command
static void show_help_command(char *appname)
{
	printf("Usage: %s [command] [options]\n\n", appname);
	printf("Available commands:\n");
	printf("\tserver\t\tMake TeaVPN server.\n");
	printf("\tconnect\t\tConnect to TeaVPN server.\n");
	printf("\nDetailed information: %s [command] --help\n", appname);
	fflush(stdout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3944(%rip), %rdi      # 0x729e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2150
leaq 0x397f(%rip), %rdi      # 0x72ea
callq 0x2090
leaq 0x3987(%rip), %rdi      # 0x72fe
callq 0x2090
leaq 0x3998(%rip), %rdi      # 0x731b
callq 0x2090
leaq 0x392f(%rip), %rdi      # 0x72be
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2150
movq 0x7630(%rip), %rax      # 0xafd0
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x22d0
nop
// File: /workspace/github_c_makefile_star2_O3/TeaInside[P]teavpn/src/teavpn/server/tcp.c
// Function: get_bufchan_index
static int16_t get_bufchan_index()
{
	static bool sleep_state = false;
	static uint8_t buf_chan_wait = 0;

	for (int16_t i = 0; i < BUFCHAN_ALLOC; i++) {
		if (bufchan[i].ref_count == 0) {
			if (buf_chan_wait > 0) buf_chan_wait--;
			return i;
		}
	}

	if (buf_chan_wait > 30) {
		sleep_state = true;
	} else {
		if (buf_chan_wait <= 100) buf_chan_wait++;
	}

	if (sleep_state) {
		debug_log(1, "Buffer channel got sleep state...\n");
		usleep(10000);
		buf_chan_wait--;
		if (buf_chan_wait <= 20) {
			debug_log(1, "Sleep state has been released\n");
			sleep_state = false;
		}
	}

	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x558b(%rip), %rax      # 0xb370
xorl %ebx, %ebx
cmpw $0x0, (%rax)
je 0x5e0f
incq %rbx
addq $0x1030, %rax           # imm = 0x1030
cmpq $0x18, %rbx
jne 0x5de7
movb 0x5621(%rip), %al       # 0xb423
cmpb $0x1f, %al
jb 0x5e23
movb $0x1, 0x5615(%rip)      # 0xb422
jmp 0x5e38
movb 0x560e(%rip), %al       # 0xb423
testb %al, %al
je 0x5e8e
decb %al
movb %al, 0x5602(%rip)       # 0xb423
jmp 0x5e8e
incb %al
movb %al, 0x55f8(%rip)       # 0xb423
movw $0xffff, %bx            # imm = 0xFFFF
cmpb $0x1, 0x55ec(%rip)      # 0xb422
jne 0x5e8e
leaq 0x55e5(%rip), %r14      # 0xb424
cmpb $0x0, (%r14)
je 0x5e53
leaq 0x24ac(%rip), %rdi      # 0x82f8
xorl %eax, %eax
callq 0x5fb8
movl $0x2710, %edi           # imm = 0x2710
callq 0x2400
movb 0x55c0(%rip), %al       # 0xb423
decb %al
movb %al, 0x55b8(%rip)       # 0xb423
movw $0xffff, %bx            # imm = 0xFFFF
cmpb $0x14, %al
ja 0x5e8e
cmpb $0x0, (%r14)
je 0x5e87
leaq 0x249b(%rip), %rdi      # 0x831b
xorl %eax, %eax
callq 0x5fb8
movb $0x0, 0x5594(%rip)      # 0xb422
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)