LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_ir_signal.c
// Function: clean_signal_tree
int clean_signal_tree()
{
	SIGNAL_TREE *now_signal_tree;
	SIGNAL_TREE *new_signal_tree;

    now_signal_tree = signal_tree_top;
    while(now_signal_tree != NULL){
        new_signal_tree = now_signal_tree->next_ptr;
        if(now_signal_tree->label != NULL) free(now_signal_tree->label);
        if(now_signal_tree->verilog != NULL) free(now_signal_tree->verilog);
        free(now_signal_tree);
        now_signal_tree = new_signal_tree;
    }
    signal_tree_top = NULL;
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0xaa71(%rip), %rbx      # 0x145a8
testq %rbx, %rbx
je 0x9b6c
movq 0x8(%rbx), %r14
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x9b4e
callq 0x1030
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x9b5c
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movq %r14, %rbx
testq %r14, %r14
jne 0x9b3c
movq $0x0, 0xaa31(%rip) # 0x145a8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_ir_signal.c
// Function: create_verilog_signal
int create_verilog_signal()
{
	SIGNAL_TREE *now_signal_tree;
	char *buf;
	char *str;

	buf = calloc(STR_MAX, 1);

    now_signal_tree = signal_tree_top;
    while(now_signal_tree != NULL){
		strcpy(buf ,"");
		if(
			(now_signal_tree->flag == SIGNAL_FLAG_REG) ||
			(now_signal_tree->flag == SIGNAL_FLAG_WIRE)
		){
			switch(now_signal_tree->flag){
				case SIGNAL_FLAG_REG:
					sprintf(buf, "reg ");
					break;
				case SIGNAL_FLAG_WIRE:
					sprintf(buf, "wire ");
					break;
				default:
					break;
			}
			if(now_signal_tree->width > 0){
				sprintf(buf, "%s[%d:0] ", buf, now_signal_tree->width-1);
			}
			str = regalloc(now_signal_tree->label);
			sprintf(buf, "%s%s;", buf, str);
			free(str);
			now_signal_tree->verilog = charalloc(buf);
		}

        now_signal_tree = now_signal_tree->next_ptr;
    }

    free(buf);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10f0
movq %rax, %rbx
movq 0xa97a(%rip), %r13      # 0x145a8
testq %r13, %r13
je 0x9ccb
leaq 0x49fd(%rip), %r14      # 0xe63b
leaq 0x5e29(%rip), %r15      # 0xfa6e
movb $0x0, (%rbx)
movl 0x10(%r13), %eax
leal -0x1(%rax), %ecx
cmpl $0x1, %ecx
ja 0x9cbe
cmpl $0x1, %eax
jne 0x9c65
movb $0x0, 0x4(%rbx)
movl $0x20676572, (%rbx)     # imm = 0x20676572
jmp 0x9c71
movw $0x20, 0x4(%rbx)
movl $0x65726977, (%rbx)     # imm = 0x65726977
movl 0x20(%r13), %ecx
testl %ecx, %ecx
jle 0x9c8b
decl %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x11a0
movq 0x18(%r13), %rdi
callq 0x7b63
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x11a0
movq %r12, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x137c
movq %rax, 0x30(%r13)
movq 0x8(%r13), %r13
testq %r13, %r13
jne 0x9c45
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_ir_signal.c
// Function: output_signal_tree
int output_signal_tree(FILE *fp)
{
	SIGNAL_TREE *now_signal_tree;

    now_signal_tree = signal_tree_top;
    while(now_signal_tree != NULL){
		switch(now_signal_tree->flag){
			case SIGNAL_FLAG_REG:
			case SIGNAL_FLAG_WIRE:
				fprintf(fp, "%s\n", now_signal_tree->verilog);
				break;
			case SIGNAL_FLAG_RAM:
				/*
				 * RAMの直接的なVerilog HDLコードは存在しない。
				 */
				break;
			default:
				break;
		}

        now_signal_tree = now_signal_tree->next_ptr;
    }

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0xa8bd(%rip), %r15      # 0x145a8
testq %r15, %r15
je 0x9d1f
movq %rdi, %rbx
leaq 0x4dcc(%rip), %r14      # 0xeac6
movl 0x10(%r15), %eax
decl %eax
cmpl $0x1, %eax
ja 0x9d16
movq 0x30(%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1110
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x9cfa
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_ir_signal.c
// Function: print_signal_tree
int print_signal_tree(FILE *fp)
{
	SIGNAL_TREE *now_signal_tree;

    fprintf(fp,"==============================\n");
    fprintf(fp,"Print Signal\n");
    fprintf(fp,"==============================\n");
    now_signal_tree = signal_tree_top;
    while(now_signal_tree != NULL){
		fprintf(fp, "%s: ", now_signal_tree->label);
		switch(now_signal_tree->flag){
			case SIGNAL_FLAG_REG:
				fprintf(fp, "Reg, ");
				fprintf(fp, "width=%d,", now_signal_tree->width);
				fprintf(fp, "verilog=%s", now_signal_tree->verilog);
				break;
			case SIGNAL_FLAG_WIRE:
				fprintf(fp, "Wire, ");
				fprintf(fp, "width=%d,", now_signal_tree->width);
				fprintf(fp, "verilog=%s", now_signal_tree->verilog);
				break;
			case SIGNAL_FLAG_RAM:
				fprintf(fp, "RAM, ");
				fprintf(fp, "type=%s,", now_signal_tree->type);
				fprintf(fp, "verilog=%s", now_signal_tree->verilog);
				break;
			default:
				break;
		}
		fprintf(fp, "\n");

        now_signal_tree = now_signal_tree->next_ptr;
    }

    fprintf(fp,"==============================\n");

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x496f(%rip), %r14      # 0xe6ab
movl $0x1f, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x11c0
leaq 0x5d1c(%rip), %rdi      # 0xfa74
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x11c0
movl $0x1f, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x11c0
movq 0xa822(%rip), %rbp      # 0x145a8
testq %rbp, %rbp
je 0x9e61
leaq 0x4a03(%rip), %r14      # 0xe799
leaq 0x5cf5(%rip), %r13      # 0xfa92
leaq 0x5ce4(%rip), %r15      # 0xfa88
leaq 0x5cd7(%rip), %r12      # 0xfa82
movq 0x18(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1110
movl 0x10(%rbp), %eax
cmpl $0x3, %eax
je 0x9e08
cmpl $0x2, %eax
je 0x9ddd
cmpl $0x1, %eax
jne 0x9e47
movl $0x5, %esi
movl $0x1, %edx
movq %r12, %rdi
jmp 0x9dee
movl $0x6, %esi
movl $0x1, %edx
leaq 0x5caf(%rip), %rdi      # 0xfa9d
movq %rbx, %rcx
callq 0x11c0
movl 0x20(%rbp), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1110
jmp 0x9e36
movl $0x5, %esi
movl $0x1, %edx
leaq 0x5c8b(%rip), %rdi      # 0xfaa4
movq %rbx, %rcx
callq 0x11c0
movq 0x28(%rbp), %rdx
movq %rbx, %rdi
leaq 0x5c7b(%rip), %rsi      # 0xfaaa
xorl %eax, %eax
callq 0x1110
movq 0x30(%rbp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x1110
movl $0xa, %edi
movq %rbx, %rsi
callq 0x10d0
movq 0x8(%rbp), %rbp
testq %rbp, %rbp
jne 0x9dab
leaq 0x4843(%rip), %rdi      # 0xe6ab
movl $0x1f, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x11c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_ir_top.c
// Function: register_top_module_decl
int register_top_module_decl(char *line)
{
	char *temp = NULL;

	if(top_module_decl == NULL){
		top_module_decl = calloc(strlen(line)+1, 1);
		sprintf(top_module_decl, "%s", line);
	}else{
		temp = calloc(strlen(top_module_decl)+1, 1);
		strcpy(temp, top_module_decl);
		free(top_module_decl);
		top_module_decl = calloc(strlen(temp)+strlen(line)+1, 1);
		sprintf(top_module_decl, "%s%s", temp, line);
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xa725(%rip), %r15      # 0x145c0
testq %r15, %r15
je 0x9f10
movq %r15, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x1060
movq %r15, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1090
movq %rax, %r15
movq %rbx, %rdi
callq 0x1090
leaq (%r15,%rax), %rdi
incq %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, 0xa6c9(%rip)      # 0x145c0
leaq 0x4342(%rip), %rsi      # 0xe240
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x11a0
jmp 0x9f38
movq %rbx, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, 0xa693(%rip)      # 0x145c0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_ir_top.c
// Function: register_top_module_assign
int register_top_module_assign(char *line)
{
	char *temp = NULL;

	if(top_module_assign == NULL){
		top_module_assign = calloc(strlen(line)+1, 1);
		sprintf(top_module_assign, "%s", line);
	}else{
		temp = calloc(strlen(top_module_assign)+1, 1);
		strcpy(temp, top_module_assign);
		free(top_module_assign);
		top_module_assign = calloc(strlen(temp)+strlen(line)+1, 1);
		sprintf(top_module_assign, "%s%s", temp, line);
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xa679(%rip), %r15      # 0x145c8
testq %r15, %r15
je 0x9fc4
movq %r15, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x1060
movq %r15, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1090
movq %rax, %r15
movq %rbx, %rdi
callq 0x1090
leaq (%r15,%rax), %rdi
incq %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, 0xa61d(%rip)      # 0x145c8
leaq 0x428e(%rip), %rsi      # 0xe240
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x11a0
jmp 0x9fec
movq %rbx, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, 0xa5e7(%rip)      # 0x145c8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_ir_top.c
// Function: search_top_signal_call_args
char *search_top_signal_call_args(char *call_name, int args_num)
{
	TOP_SIGNAL_TREE *now_top_signal_tree = NULL;
	char *result = NULL;
	char *label = NULL;
	char *signal_name = NULL;
	char *verilog = NULL;

	result = calloc(STR_MAX, 1);
//printf("call_name: %s_%s(%d)\n", call_name, name, args_num);

	signal_name = calloc(STR_MAX, 1);
	label = calloc(STR_MAX, 1);

	sprintf(label, "__call_%s_%s_%d", call_name, "args", args_num);
	sprintf(signal_name, "%s", label);
//printf("call_name: %s\n", signal_name);

	now_top_signal_tree = top_signal_tree_top;
    while(now_top_signal_tree != NULL){
		if(now_top_signal_tree->flag == FLAG_CALL){
			if(!strcmp(now_top_signal_tree->label, label)){
				sprintf(result, "%s %s |", result, now_top_signal_tree->verilog_signal);
				now_top_signal_tree->used = 1;
//printf("    call_name: %s <> %s\n", now_top_signal_tree->label, label);
			}
		}
        now_top_signal_tree = now_top_signal_tree->next_ptr;
	}

	if(strlen(result) > 0){
		result[strlen(result)-1] = ';';
		verilog = calloc(strlen(result)+1, 1);
		strcpy(verilog, result);
//printf("    result: %s,%s\n", result, verilog);
	}

	free(result);

	return verilog;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %r15
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10f0
movq %rax, %rbx
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10f0
movq %rax, %r14
leaq 0x5921(%rip), %rsi      # 0xfae0
leaq 0x4f98(%rip), %rcx      # 0xf15e
movq %rax, %rdi
movq %r15, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x11a0
movq 0xa3d3(%rip), %r12      # 0x145b0
testq %r12, %r12
je 0xa22a
leaq 0x5907(%rip), %r15      # 0xfaf0
cmpl $0x5, 0x30(%r12)
jne 0xa220
movq 0x10(%r12), %rdi
movq %r14, %rsi
callq 0x1100
testl %eax, %eax
jne 0xa220
movq 0x50(%r12), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x11a0
movl $0x1, 0x20(%r12)
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0xa1e9
movq %rbx, %rdi
callq 0x1090
testq %rax, %rax
je 0xa262
movb $0x3b, -0x1(%rbx,%rax)
movq %rbx, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
jmp 0xa265
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x1030
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_ir_top.c
// Function: create_top_wire
int create_top_wire(FILE *fp)
{
	TOP_SIGNAL_TREE *now_top_signal_tree;

	now_top_signal_tree = top_signal_tree_top;
    while(now_top_signal_tree != NULL){
		fprintf(fp, "%s\n", now_top_signal_tree->verilog_wire);
        now_top_signal_tree = now_top_signal_tree->next_ptr;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x9d5b(%rip), %r15      # 0x145b0
testq %r15, %r15
je 0xa87e
movq %rdi, %rbx
leaq 0x4262(%rip), %r14      # 0xeac6
movq 0x58(%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1110
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0xa864
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_ir_top.c
// Function: create_top_nowire
int create_top_nowire(FILE *fp)
{
	TOP_SIGNAL_TREE *now_top_signal_tree;

	now_top_signal_tree = top_signal_tree_top;
    while(now_top_signal_tree != NULL){
		if(now_top_signal_tree->used == 0){
			if(now_top_signal_tree->flag == FLAG_ARGS){
				if(now_top_signal_tree->inout == SIG_IN){
					fprintf(fp, "\tinput ");
				}else{
					fprintf(fp, "\toutput ");
				}
				if(now_top_signal_tree->size > 0){
					fprintf(fp, "[%d:0] ", now_top_signal_tree->size*8-1);
				}
				fprintf(fp, "%s,\n", now_top_signal_tree->label);
			}else if(now_top_signal_tree->flag == FLAG_RETURN){
				fprintf(fp, "\toutput ");
				if(now_top_signal_tree->size > 0){
					fprintf(fp, "[%d:0] ", now_top_signal_tree->size*8-1);
				}
				fprintf(fp, "%s\n", now_top_signal_tree->label);
			}
		}
        now_top_signal_tree = now_top_signal_tree->next_ptr;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x9d18(%rip), %rbp      # 0x145b0
testq %rbp, %rbp
je 0xa95b
movq %rdi, %rbx
leaq 0x53a1(%rip), %r14      # 0xfc4c
leaq 0x3d8b(%rip), %r15      # 0xe63d
leaq 0x53b1(%rip), %r12      # 0xfc6a
cmpl $0x0, 0x20(%rbp)
jne 0xa94e
movl 0x30(%rbp), %eax
cmpl $0x6, %eax
je 0xa8e5
cmpl $0x3, %eax
jne 0xa94e
cmpl $0x0, 0x1c(%rbp)
je 0xa906
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rdi
jmp 0xa917
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x11c0
movl 0x18(%rbp), %eax
leaq 0x41c2(%rip), %r13      # 0xeac6
jmp 0xa925
movl $0x7, %esi
movl $0x1, %edx
leaq 0x532d(%rip), %rdi      # 0xfc44
movq %rbx, %rcx
callq 0x11c0
movl 0x18(%rbp), %eax
movq %r12, %r13
testl %eax, %eax
jle 0xa93d
leal -0x1(,%rax,8), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1110
movq 0x10(%rbp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x1110
movq 0x8(%rbp), %rbp
testq %rbp, %rbp
jne 0xa8b9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_ir_top.c
// Function: create_top_nofunc
int create_top_nofunc(FILE *fp)
{
	TOP_SIGNAL_TREE *now_top_signal_tree;

	now_top_signal_tree = top_signal_tree_top;
    while(now_top_signal_tree != NULL){
		if((now_top_signal_tree->used == 0) && (
			(now_top_signal_tree->flag == FLAG_CTRL) ||
			(now_top_signal_tree->flag == FLAG_ARGS) ||
			(now_top_signal_tree->flag == FLAG_RETURN)
			)
		){
			if(now_top_signal_tree->inout == SIG_IN){
				fprintf(fp, "assign %s = %s;\n", now_top_signal_tree->verilog_signal, now_top_signal_tree->label);
			}else{
				fprintf(fp, "assign %s = %s;\n", now_top_signal_tree->label, now_top_signal_tree->verilog_signal);
			}
		}
        now_top_signal_tree = now_top_signal_tree->next_ptr;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x9c36(%rip), %r15      # 0x145b0
testq %r15, %r15
je 0xa9d8
movq %rdi, %rbx
movl $0x4a, %ebp
leaq 0x4b69(%rip), %r14      # 0xf4f7
cmpl $0x0, 0x20(%r15)
jne 0xa9cf
movl 0x30(%r15), %eax
cmpl $0x6, %eax
ja 0xa9cf
btl %eax, %ebp
jae 0xa9cf
xorl %eax, %eax
xorl %ecx, %ecx
cmpl $0x0, 0x1c(%r15)
setne %al
sete %cl
shll $0x6, %ecx
shll $0x6, %eax
movq 0x10(%r15,%rcx), %rdx
movq 0x10(%r15,%rax), %rcx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1110
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0xa98e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_ir_top.c
// Function: create_top_global
int create_top_global(FILE *fp)
{
	MODULE_TREE *now_module_tree = NULL;
	MEMORY_TREE *now_memory_tree = NULL;

	char *label;
	label				= calloc(STR_MAX, 1);

    now_module_tree = module_tree_top;
    while(now_module_tree != NULL){
			now_memory_tree = now_module_tree->memory_tree_ptr;
			while(now_memory_tree != NULL){
				if(now_memory_tree->flag == MEMORY_FLAG_GLOBAL){
					sprintf(label, "%s", convname(sep_p(now_memory_tree->label)));
					fprintf(fp, "\tinput [31:0] __base_%s,\n", label);
				}
				now_memory_tree = now_memory_tree->next_ptr;
			}
        now_module_tree = now_module_tree->next_ptr;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10f0
movq %rax, %r14
leaq 0x9b66(%rip), %rax      # 0x14570
movq (%rax), %r12
testq %r12, %r12
je 0xaa6e
leaq 0x523c(%rip), %r15      # 0xfc55
movq 0x18(%r12), %r13
testq %r13, %r13
je 0xaa64
cmpl $0x1, 0x10(%r13)
jne 0xaa5e
movq 0x18(%r13), %rdi
movzbl (%rdi), %eax
cmpl $0x40, %eax
je 0xaa3b
cmpl $0x25, %eax
jne 0xaa3e
incq %rdi
callq 0x139f
movq %r14, %rdi
movq %rax, %rsi
callq 0x1060
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1110
movq 0x8(%r13), %r13
jmp 0xaa1e
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0xaa19
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_struct.c
// Function: clean_struct_tree
int clean_struct_tree()
{
	STRUCT_TREE *now_struct_tree;
	STRUCT_TREE *new_struct_tree;

    now_struct_tree = struct_tree_top;
    while(now_struct_tree != NULL){
        new_struct_tree = now_struct_tree->next_ptr;
        if(now_struct_tree->label != NULL) free(now_struct_tree->label);
        if(now_struct_tree->argument != NULL) free(now_struct_tree->argument);
        free(now_struct_tree);
        now_struct_tree = new_struct_tree;
    }
    struct_tree_top = NULL;
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8a05(%rip), %rbx      # 0x145d0
testq %rbx, %rbx
je 0xbc00
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xbbe2
callq 0x1030
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xbbf0
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movq %r14, %rbx
testq %r14, %r14
jne 0xbbd0
movq $0x0, 0x89c5(%rip) # 0x145d0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_struct.c
// Function: register_struct_tree
int register_struct_tree(char *label, char *argument)
{
	STRUCT_TREE *now_struct_tree = NULL;
	STRUCT_TREE *old_struct_tree = NULL;

	now_struct_tree = struct_tree_top;
	while(now_struct_tree != NULL){
		old_struct_tree = now_struct_tree;
		now_struct_tree = now_struct_tree->next_ptr;
	}

	now_struct_tree				= (STRUCT_TREE *)calloc(sizeof(STRUCT_TREE),1);
	now_struct_tree->prev_ptr	= old_struct_tree;
	now_struct_tree->next_ptr	= NULL;

	if(struct_tree_top == NULL){
		struct_tree_top				= now_struct_tree;
	}else{
		old_struct_tree->next_ptr	= now_struct_tree;
	}


	now_struct_tree->label = charalloc(label);
	now_struct_tree->argument = charalloc(argument);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x89a6(%rip), %rax      # 0x145d0
xorl %ecx, %ecx
movq %rcx, %r12
movq (%rax), %rcx
leaq 0x8(%rcx), %rax
testq %rcx, %rcx
jne 0xbc2c
movl $0x28, %edi
movl $0x1, %esi
callq 0x10f0
movq %rax, %r15
movq %r12, (%rax)
addq $0x8, %r12
cmpq $0x0, 0x8974(%rip)      # 0x145d0
leaq 0x896d(%rip), %rax      # 0x145d0
cmoveq %rax, %r12
movq %r15, (%r12)
movq %r14, %rdi
callq 0x137c
movq %rax, 0x10(%r15)
movq %rbx, %rdi
callq 0x137c
movq %rax, 0x18(%r15)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_struct.c
// Function: parser_struct_tree
int parser_struct_tree()
{
	PARSER_TREE_IR *now_parser_tree_ir;

    printf("[Parsing struct type for LLCM-IR]\n");

    now_parser_tree_ir = parser_tree_ir_top;
    while(now_parser_tree_ir != NULL){
		if(now_parser_tree_ir->flag == PARSER_IR_FLAG_TYPE){
			register_struct_tree(now_parser_tree_ir->label, now_parser_tree_ir->type.name);
		}
        now_parser_tree_ir = now_parser_tree_ir->next_ptr;
    }

    return 0;
}

// Assembly:
pushq %rbx
leaq 0x4388(%rip), %rdi      # 0x10021
callq 0x1070
leaq 0x848b(%rip), %rax      # 0x14130
movq (%rax), %rbx
testq %rbx, %rbx
je 0xbcc9
cmpl $0x4, 0x10(%rbx)
jne 0xbcc3
leaq 0x30(%rbx), %rdi
leaq 0x1830(%rbx), %rsi
callq 0xbc15
movq 0x8(%rbx), %rbx
jmp 0xbca8
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/parser_struct.c
// Function: get_struct_argument
int get_struct_argument(char *label, char *argument)
{
	STRUCT_TREE *now_struct_tree;

	strcpy(argument, "");

    now_struct_tree = struct_tree_top;
    while(now_struct_tree != NULL){
		if(!strcmp(now_struct_tree->label, label)){
			strcpy(argument, now_struct_tree->argument);
			break;
		}
		now_struct_tree = now_struct_tree->next_ptr;
    }

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movb $0x0, (%rsi)
movq 0x88f4(%rip), %r15      # 0x145d0
testq %r15, %r15
je 0xbd0e
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%r15), %rdi
movq %r14, %rsi
callq 0x1100
testl %eax, %eax
je 0xbd02
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0xbce7
jmp 0xbd0e
movq 0x18(%r15), %rsi
movq %rbx, %rdi
callq 0x1060
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/synverll.c
// Function: split_c_source
int split_c_source(char *filename)
{
    int function_count;
	int i;
	char *llvm_command;

	printf("[C Source Parser Start]\n");

    read_file(filename);								// ファイルの読み込みとトークン取得
    set_token_order_current(get_token_order_top());	// トークンのポインタをトップへ戻す

    parser_c_source();									// 構文解析
    function_count = create_proc_source();				// Processの処理
    create_header_source();								// Lineの処理

	// トークンオーダーをクリーンナップする
	clean_token_order();

	printf(" -> Function Count: %d\n", function_count);

	/*
	 * 分離したCソースコードをLLVMでコンパイルする
	 */
	printf("[LLVM Compile Start]\n");
	llvm_command = malloc(256);

	for(i = 0; i < function_count; i++){
		sprintf(llvm_command, "clang -S -m32 -O3 -emit-llvm __%03d.c", i);
		system(llvm_command);
	}

	free(llvm_command);

	return function_count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4399(%rip), %rdi      # 0x100fe
callq 0x1070
movq %rbx, %rdi
callq 0xc9d7
xorl %eax, %eax
callq 0xc9a3
movq %rax, %rdi
callq 0xc9b3
xorl %eax, %eax
callq 0x1a64
xorl %eax, %eax
callq 0x14b4
movl %eax, %ebx
xorl %eax, %eax
callq 0x15b6
xorl %eax, %eax
callq 0xc923
leaq 0x429d(%rip), %rdi      # 0x10043
movl %ebx, %esi
xorl %eax, %eax
callq 0x10b0
leaq 0x4360(%rip), %rdi      # 0x10116
callq 0x1070
movl $0x100, %edi            # imm = 0x100
callq 0x1130
movq %rax, %r14
testl %ebx, %ebx
jle 0xbdf2
leaq 0x4288(%rip), %r15      # 0x1005b
xorl %ebp, %ebp
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x11a0
movq %r14, %rdi
callq 0x10a0
incl %ebp
cmpl %ebp, %ebx
jne 0xbdd5
movq %r14, %rdi
callq 0x1030
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/synverll.c
// Function: help
void help()
{
    printf("Synverll Rev %d.%02d\n", REVISION_MAIN, REVISION_MANOR);
    printf(" Synthesis for Verilog HDL using LLVM\n");
    printf(" C Source to Verilog-HDL Convertor\n");
    printf(" Hidemi Ishihara <hidemi(at)aquaxis.com>\n");
    printf("\n");
    printf("Usage:\n");
//    printf(" synverll C_SOURCE_FILENAME TOP_MODULE_NAME\n");
    printf(" synverll [-d] C_SOURCE_FILENAME\n");
    printf("  -d: Debug Mode(output a debug file)\n");
}

// Assembly:
pushq %rax
leaq 0x3ea7(%rip), %rdi      # 0x100cf
movl $0x1, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x10b0
leaq 0x3f1f(%rip), %rdi      # 0x1015c
callq 0x1070
leaq 0x3f39(%rip), %rdi      # 0x10182
callq 0x1070
leaq 0x3f50(%rip), %rdi      # 0x101a5
callq 0x1070
movl $0xa, %edi
callq 0x1040
leaq 0x3f63(%rip), %rdi      # 0x101ce
callq 0x1070
leaq 0x3f5e(%rip), %rdi      # 0x101d5
callq 0x1070
leaq 0x3f73(%rip), %rdi      # 0x101f6
popq %rax
jmp 0x1070
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/synverll.c
// Function: main
int main(int argc,char *argv[])
{
    char *filename;
    unsigned int i;

    if(argc > 1){
        // 引数の解析
        for(i = 1; i < argc; i++){
            if(!strcmp(argv[i],"--help")){
                help(); // ヘルプの表示
                exit(0);
            }else if(!strcmp(argv[i],"-d")){
				debug_mode = 1;
			}
        }

		if(argc < 2){
            help(); // ヘルプの表示
            exit(0);
		}

		filename = argv[1];
//		topname  = argv[2];

		topname = calloc(strlen(filename) +10, 1);
		strcpy(topname, filename);
		topname[strlen(topname)-2] = 0;
		strcat(topname, "_top");
		printf("topname: %s\n", topname);

        process(filename);
    }else{
        help(); // ヘルプの表示
    }
    exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jl 0xc35b
movq %rsi, %rbx
movl %edi, %r12d
movl $0x1, %r13d
leaq 0x3e35(%rip), %r14      # 0x100e5
movq (%rbx,%r13,8), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1100
testl %eax, %eax
je 0xc35b
cmpb $0x2d, (%r15)
jne 0xc2e5
cmpb $0x64, 0x1(%r15)
jne 0xc2e5
cmpb $0x0, 0x2(%r15)
jne 0xc2e5
movl $0x1, 0x82f3(%rip)      # 0x145d8
incq %r13
cmpq %r13, %r12
jne 0xc2b0
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x1090
leaq 0xa(%rax), %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, %r14
movq %rax, 0x82cf(%rip)      # 0x145e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
movq %r14, %rdi
callq 0x1090
xorl %ebp, %ebp
movb %bpl, -0x2(%r14,%rax)
movq %r14, %rdi
callq 0x1090
movb %bpl, 0x4(%r14,%rax)
movl $0x706f745f, (%r14,%rax) # imm = 0x706F745F
leaq 0x3daa(%rip), %rdi      # 0x100f1
movq %r14, %rsi
xorl %eax, %eax
callq 0x10b0
movq %rbx, %rdi
callq 0xc081
jmp 0xc360
callq 0xc220
xorl %edi, %edi
callq 0x11b0
nop
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/token.c
// Function: insert_token_order
int insert_token_order(char *line, char *token, FILE *fp)
{
//    TOKEN_ORDER *new_token_order;

    if(!strcmp(token,"//")){
        // //のコメント行は行末までコメントなので読み飛ばす
        do{
            get_line(line, fp);
            get_token(line, token);
        }while(strcmp(token,"\n"));
    }else if(!strcmp(token,"/*")){
        // /*のコメント行は*/までコメントなので読み飛ばす
        do{
            get_line(line, fp);
            get_token(line, token);
        }while(strcmp(token,"*/"));
        // 改行の場合は何もしない
    }else if(!strcmp(token,"\r")){
        // 改行の場合は何もしない
    }else if(!strcmp(token,"")){
        // トークンに何もない場合は何も処理しない
    }else{
        // トークンオーダーの新規取得
        create_token_order();

        // トークンオーダーにトークンを登録する
        token_order_current->str = (char *)malloc(strlen(token)+1);
        strcpy(token_order_current->str, token);
    }
    return 0;
}

// Assembly:
movzbl (%rsi), %eax
testl %eax, %eax
je 0xc8ca
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpl $0xd, %eax
je 0xc893
cmpl $0x2f, %eax
jne 0xc899
movq %rdx, %r14
movq %rdi, %r15
cmpb $0x2f, 0x1(%rbx)
jne 0xc825
cmpb $0x0, 0x2(%rbx)
je 0xc865
cmpb $0x2a, 0x1(%rbx)
jne 0xc899
cmpb $0x0, 0x2(%rbx)
jne 0xc899
cmpb $0x0, (%r15)
jne 0xc847
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x10e0
movq %r15, %rdi
movq %rbx, %rsi
callq 0xc3af
cmpb $0x2a, (%rbx)
jne 0xc831
cmpb $0x2f, 0x1(%rbx)
jne 0xc831
cmpb $0x0, 0x2(%rbx)
jne 0xc831
jmp 0xc8c5
cmpb $0x0, (%r15)
jne 0xc87b
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x10e0
movq %r15, %rdi
movq %rbx, %rsi
callq 0xc3af
cmpb $0xa, (%rbx)
jne 0xc865
cmpb $0x0, 0x1(%rbx)
jne 0xc865
jmp 0xc8c5
cmpb $0x0, 0x1(%rbx)
je 0xc8c5
callq 0xc8cd
movq %rbx, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
callq 0x1130
movq 0x7d3a(%rip), %rcx      # 0x145f0
movq %rax, 0x10(%rcx)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
popq %rbx
popq %r14
popq %r15
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/token.c
// Function: create_token_order
int create_token_order()
{
    // トークンオーダーの生成
    if(token_order_top == NULL){
        // 先頭トークンオーダーが空の場合、新規取得したトークンオーダーをセットする
        token_order_top = (TOKEN_ORDER *)malloc(sizeof(TOKEN_ORDER));
        token_order_current = token_order_top;
    }else{
        token_order_current->next_ptr = (TOKEN_ORDER *)malloc(sizeof(TOKEN_ORDER));
        token_order_prev    = token_order_current;
        token_order_current = token_order_prev->next_ptr;
    }
    token_order_current->next_ptr   = NULL;
    token_order_current->str        = NULL;
    return 0;
}

// Assembly:
pushq %rbx
movq 0x7d13(%rip), %rbx      # 0x145e8
movl $0x18, %edi
callq 0x1130
testq %rbx, %rbx
je 0xc901
movq 0x7d05(%rip), %rcx      # 0x145f0
movq %rax, (%rcx)
movq 0x7cfb(%rip), %rax      # 0x145f0
movq %rax, 0x7cfc(%rip)      # 0x145f8
movq (%rax), %rax
jmp 0xc908
movq %rax, 0x7ce0(%rip)      # 0x145e8
movq %rax, 0x7ce1(%rip)      # 0x145f0
xorl %ecx, %ecx
movq %rcx, (%rax)
movq 0x7cd5(%rip), %rax      # 0x145f0
movq %rcx, 0x10(%rax)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/token.c
// Function: clean_token_order
int clean_token_order()
{
    TOKEN_ORDER *new_token_order;

    token_order_current = token_order_top;
    while(1){
        if(token_order_current == NULL) break;
        new_token_order = token_order_current->next_ptr;
        free(token_order_current);
        token_order_current = new_token_order;
    }
    token_order_top = NULL;
    return 0;
}

// Assembly:
movq 0x7cbe(%rip), %rdi      # 0x145e8
movq %rdi, 0x7cbf(%rip)      # 0x145f0
testq %rdi, %rdi
je 0xc94f
pushq %rbx
movq (%rdi), %rbx
callq 0x1030
movq %rbx, 0x7caa(%rip)      # 0x145f0
movq %rbx, %rdi
testq %rbx, %rbx
jne 0xc937
popq %rbx
movq $0x0, 0x7c8e(%rip) # 0x145e8
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/token.c
// Function: read_token
int read_token(char *token)
{
    if(token_order_current != NULL){
        strcpy(token, token_order_current->str);
        token_order_prev    = token_order_current;
        token_order_current = token_order_current->next_ptr;
        return 0;
    }else{
        *token = '\0';
        return 1;
    }
}

// Assembly:
movq 0x7c8c(%rip), %rax      # 0x145f0
testq %rax, %rax
je 0xc992
pushq %rax
movq 0x10(%rax), %rsi
callq 0x1060
movq 0x7c76(%rip), %rax      # 0x145f0
movq %rax, 0x7c77(%rip)      # 0x145f8
movq (%rax), %rax
movq %rax, 0x7c65(%rip)      # 0x145f0
xorl %eax, %eax
addq $0x8, %rsp
retq
movb $0x0, (%rdi)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/token.c
// Function: read_file
int read_file(char *filename)
{
    FILE *fp;
    char *line, *token;

	line = malloc(STR_MAX);
	token = malloc(STR_MAX);

	memset(line, 0, STR_MAX);
	memset(token, 0, STR_MAX);

    printf("Open Filename: %s\n",filename);
    if((fp =fopen(filename,"rb")) == NULL){
        printf("can't open file.\n");
		free(line);
		free(token);
        exit(1);
    }
    while(1){
        get_line(line, fp);
        get_token(line, token);
        if(*token == '\0') break;
        insert_token_order(line, token, fp);    // トークンを追加する
    }
    fclose(fp);

	free(line);
	free(token);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movl $0x1, %edi
movl $0x400, %esi            # imm = 0x400
callq 0x10f0
movq %rax, %r14
movl $0x1, %edi
movl $0x400, %esi            # imm = 0x400
callq 0x10f0
movq %rax, %rbx
leaq 0x3854(%rip), %rdi      # 0x1025e
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
leaq 0x366e(%rip), %rsi      # 0x10089
movq %r15, %rdi
callq 0x1160
testq %rax, %rax
je 0xca81
movq %rax, %r15
movq %r14, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdx
callq 0x10e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc3af
cmpb $0x0, (%rbx)
je 0xca61
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xc7ee
cmpb $0x0, (%r14)
jne 0xca3b
jmp 0xca2b
movq %r15, %rdi
callq 0x1080
movq %r14, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x36c3(%rip), %rdi      # 0x1014b
callq 0x1070
movq %r14, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movl $0x1, %edi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O3/aquaxis[P]synverll/src/token.c
// Function: get_chara_llvm
int get_chara_llvm(char *line, char *token)
{
    char *p, *ptk, *pp;

    // ポインタの初期化
    p   = line;
    ptk = token;

    *ptk = 0;

    // cか"の場合、読み飛ばす
    while(*p == 'c' || *p == '"') ++p;
    // バッファが空の場合は終了する
    if(*p == '\0'){
		pp = malloc(strlen(p)+1);	// 残りの文字列をlineに戻す
		strcpy(pp,p);
		strcpy(line,pp);
		free(pp);
        token[0] = '\0';
        return 1;
    }

    if(*p == '"'){
		// "は終了
		*ptk = 0;
		return -1;
    }else if(*p == '\\'){
        (*p)++;
		// \はこの後に2文字16進数が続く
		/*
		 * ToDo:
		 *   isxdigit(*p)でエラー処理を入れる
		 */
        *ptk = *p++;
		*ptk <<= 4;	// 16倍する
        *ptk = *p++;
    }else{	// それ以外は一文字のキャラクターとして処理する
        *ptk = *p++;
	}
    pp = malloc(strlen(p)+1);	// 残りの文字列をlineに戻す
    strcpy(pp,p);
    strcpy(line,pp);
    free(pp);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, (%rsi)
movq %rdi, %r15
movb (%r15), %al
movzbl %al, %ecx
cmpl $0x5b, %ecx
jg 0xd064
cmpl $0x22, %ecx
je 0xd069
jmp 0xd06e
cmpl $0x63, %ecx
jne 0xd0af
incq %r15
jmp 0xd052
testl %ecx, %ecx
jne 0xd0c6
movq %r15, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
callq 0x1130
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x1060
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1060
movq %r12, %rdi
callq 0x1030
movb $0x0, (%r14)
movl $0x1, %eax
jmp 0xd100
cmpl $0x5c, %ecx
jne 0xd0c6
movb $0x5d, (%r15)
movb $-0x30, (%r14)
movb 0x1(%r15), %al
addq $0x2, %r15
jmp 0xd0c9
incq %r15
movb %al, (%r14)
movq %r15, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
callq 0x1130
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x1060
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1060
movq %r14, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/andyfighting[P]hiredis_timer_cmpt/net.c
// Function: redisContextConnectUnix
int redisContextConnectUnix(redisContext *c, const char *path, const struct timeval *timeout) {
    int blocking = (c->flags & REDIS_BLOCK);
    struct sockaddr_un sa;

    if (redisCreateSocket(c,AF_LOCAL) < 0)
        return REDIS_ERR;
    if (redisSetBlocking(c,0) != REDIS_OK)
        return REDIS_ERR;

    c->connection_type = REDIS_CONN_UNIX;
    if (c->unix_sock.path != path)
        c->unix_sock.path = strdup(path);

    if (timeout) {
        if (c->timeout != timeout) {
            if (c->timeout == NULL)
                c->timeout = malloc(sizeof(struct timeval));

            memcpy(c->timeout, timeout, sizeof(struct timeval));
        }
    } else {
        if (c->timeout)
            free(c->timeout);
        c->timeout = NULL;
    }

    sa.sun_family = AF_LOCAL;
    strncpy(sa.sun_path,path,sizeof(sa.sun_path)-1);
    if (connect(c->fd, (struct sockaddr*)&sa, sizeof(sa)) == -1) {
        if (errno == EINPROGRESS && !blocking) {
            /* This is ok. */
        } else {
            if (redisContextWaitReady(c,c->timeout) != REDIS_OK)
                return REDIS_ERR;
        }
    }

    /* Reset socket to be blocking after connect(2). */
    if (blocking && redisSetBlocking(c,1) != REDIS_OK)
        return REDIS_ERR;

    c->flags |= REDIS_CONNECTED;
    return REDIS_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl 0x88(%rdi), %r12d
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x3540
cmpl $-0x1, %eax
je 0x3daa
movl %eax, 0x84(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3e5f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x3e50
movl $0x1, 0xa0(%rbx)
cmpq %r14, 0xc8(%rbx)
je 0x3d77
movq %r14, %rdi
callq 0x34c0
movq %rax, 0xc8(%rbx)
movq 0xa8(%rbx), %rdi
testq %r15, %r15
je 0x3dbe
cmpq %r15, %rdi
je 0x3dd3
testq %rdi, %rdi
jne 0x3da1
movl $0x10, %edi
callq 0x3340
movq %rax, %rdi
movq %rax, 0xa8(%rbx)
movups (%r15), %xmm0
movups %xmm0, (%rdi)
jmp 0x3dd3
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3794
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x3e50
testq %rdi, %rdi
je 0x3dc8
callq 0x3050
movq $0x0, 0xa8(%rbx)
leaq 0x4(%rsp), %rdi
movw $0x1, -0x2(%rdi)
movl $0x6b, %edx
movq %r14, %rsi
callq 0x3090
movl 0x84(%rbx), %edi
leaq 0x2(%rsp), %rsi
movl $0x6e, %edx
callq 0x3470
cmpl $-0x1, %eax
je 0x3e1e
testb $0x1, %r12b
je 0x3e47
movq %rbx, %rdi
movl $0x1, %esi
callq 0x3e5f
testl %eax, %eax
jne 0x3e50
jmp 0x3e47
callq 0x3080
movl (%rax), %eax
xorl $0x73, %eax
movl %r12d, %ecx
andl $0x1, %ecx
orl %eax, %ecx
je 0x3e47
movq 0xa8(%rbx), %rsi
movq %rbx, %rdi
callq 0x3ee8
testl %eax, %eax
jne 0x3e50
jmp 0x3e05
orb $0x2, 0x88(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/andyfighting[P]hiredis_timer_cmpt/net.c
// Function: redisSetBlocking
static int redisSetBlocking(redisContext *c, int blocking) {
    int flags;

    /* Set the socket nonblocking.
     * Note that fcntl(2) for F_GETFL and F_SETFL can't be
     * interrupted by a signal. */
    if ((flags = fcntl(c->fd, F_GETFL)) == -1) {
        __redisSetErrorFromErrno(c,REDIS_ERR_IO,"fcntl(F_GETFL)");
        redisContextCloseFd(c);
        return REDIS_ERR;
    }

    if (blocking)
        flags &= ~O_NONBLOCK;
    else
        flags |= O_NONBLOCK;

    if (fcntl(c->fd, F_SETFL, flags) == -1) {
        __redisSetErrorFromErrno(c,REDIS_ERR_IO,"fcntl(F_SETFL)");
        redisContextCloseFd(c);
        return REDIS_ERR;
    }
    return REDIS_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movl 0x84(%rdi), %edi
xorl %ebp, %ebp
movl $0x3, %esi
xorl %eax, %eax
callq 0x3100
cmpl $-0x1, %eax
je 0x3eb4
xorl %edx, %edx
testl %r14d, %r14d
sete %dl
andl $0xfffff7ff, %eax       # imm = 0xFFFFF7FF
shll $0xb, %edx
orl %eax, %edx
movl 0x84(%rbx), %edi
movl $0x4, %esi
xorl %eax, %eax
callq 0x3100
cmpl $-0x1, %eax
jne 0x3ee1
leaq 0x5203(%rip), %rsi      # 0x90b5
jmp 0x3ebb
leaq 0x51eb(%rip), %rsi      # 0x90a6
movq %rbx, %rdi
callq 0x3794
movl 0x84(%rbx), %edi
testl %edi, %edi
js 0x3edc
callq 0x3200
movl $0xffffffff, 0x84(%rbx) # imm = 0xFFFFFFFF
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/andyfighting[P]hiredis_timer_cmpt/net.c
// Function: redisContextWaitReady
static int redisContextWaitReady(redisContext *c, const struct timeval *timeout) {
    struct pollfd   wfd[1];
    long msec;

    msec          = -1;
    wfd[0].fd     = c->fd;
    wfd[0].events = POLLOUT;

    /* Only use timeout when not NULL. */
    if (timeout != NULL) {
        if (timeout->tv_usec > 1000000 || timeout->tv_sec > __MAX_MSEC) {
            __redisSetErrorFromErrno(c, REDIS_ERR_IO, NULL);
            redisContextCloseFd(c);
            return REDIS_ERR;
        }

        msec = (timeout->tv_sec * 1000) + ((timeout->tv_usec + 999) / 1000);

        if (msec < 0 || msec > INT_MAX) {
            msec = INT_MAX;
        }
    }

    if (errno == EINPROGRESS) {
        int res;

        if ((res = poll(wfd, 1, msec)) == -1) {
            __redisSetErrorFromErrno(c, REDIS_ERR_IO, "poll(2)");
            redisContextCloseFd(c);
            return REDIS_ERR;
        } else if (res == 0) {
            errno = ETIMEDOUT;
            __redisSetErrorFromErrno(c,REDIS_ERR_IO,NULL);
            redisContextCloseFd(c);
            return REDIS_ERR;
        }

        if (redisCheckSocketError(c) != REDIS_OK)
            return REDIS_ERR;

        return REDIS_OK;
    }

    __redisSetErrorFromErrno(c,REDIS_ERR_IO,NULL);
    redisContextCloseFd(c);
    return REDIS_ERR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x84(%rdi), %eax
movl %eax, (%rsp)
movw $0x4, 0x4(%rsp)
testq %rsi, %rsi
je 0x3f65
movq 0x8(%rsi), %rax
cmpq $0xf4240, %rax          # imm = 0xF4240
jg 0x3fa4
movq (%rsi), %rcx
movabsq $0x20c49ba5e353f7, %rdx # imm = 0x20C49BA5E353F7
cmpq %rdx, %rcx
jge 0x3fa4
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
addq $0x3e7, %rax            # imm = 0x3E7
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
imulq %rdx
movq %rdx, %r14
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %r14
addq %rax, %r14
addq %rcx, %r14
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r14
cmovaeq %rax, %r14
jmp 0x3f6b
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
callq 0x3080
cmpl $0x73, (%rax)
jne 0x3fa4
movq %rax, %r15
movq %rsp, %rdi
movl $0x1, %esi
movl %r14d, %edx
callq 0x33d0
testl %eax, %eax
je 0x3f9d
cmpl $-0x1, %eax
jne 0x3fd9
leaq 0x512c(%rip), %rsi      # 0x90c4
movq %rbx, %rdi
jmp 0x3fa9
movl $0x6e, (%r15)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3794
movl 0x84(%rbx), %edi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %edi, %edi
js 0x3fcc
callq 0x3200
movl $0xffffffff, 0x84(%rbx) # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x3150
xorl %ebp, %ebp
negl %eax
sbbl %ebp, %ebp
jmp 0x3fcc
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/andyfighting[P]hiredis_timer_cmpt/hiredis.c
// Function: freeReplyObject
void freeReplyObject(void *reply) {
    redisReply *r = reply;
    size_t j;

    if (r == NULL)
        return;

    switch(r->type) {
    case REDIS_REPLY_INTEGER:
        break; /* Nothing to free */
    case REDIS_REPLY_ARRAY:
        if (r->element != NULL) {
            for (j = 0; j < r->elements; j++)
                if (r->element[j] != NULL)
                    freeReplyObject(r->element[j]);
            free(r->element);
        }
        break;
    case REDIS_REPLY_ERROR:
    case REDIS_REPLY_STATUS:
    case REDIS_REPLY_STRING:
        if (r->str != NULL)
            free(r->str);
        break;
    }
    free(r);
}

// Assembly:
testq %rdi, %rdi
je 0x4062
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %eax
leal -0x5(%rax), %ecx
cmpl $0x2, %ecx
jb 0x4045
cmpl $0x1, %eax
je 0x4045
cmpl $0x2, %eax
jne 0x4053
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x4053
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x404e
xorl %r14d, %r14d
movq 0x28(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x4037
callq 0x33f0
movq 0x20(%rbx), %rax
incq %r14
cmpq %rax, %r14
jb 0x4021
movq 0x28(%rbx), %rdi
jmp 0x404e
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4053
callq 0x3050
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3050
retq
// File: /workspace/github_c_makefile_star2_O3/andyfighting[P]hiredis_timer_cmpt/hiredis.c
// Function: _redisSetError
void __redisSetError(redisContext *c, int type, const char *str) {
    size_t len;

    c->err = type;
    if (str != NULL) {
        len = strlen(str);
        len = len < (sizeof(c->errstr)-1) ? len : (sizeof(c->errstr)-1);
        memcpy(c->errstr,str,len);
        c->errstr[len] = '\0';
    } else {
        /* Only REDIS_ERR_IO may lack a description! */
        assert(type == REDIS_ERR_IO);
        __redis_strerror_r(errno, c->errstr, sizeof(c->errstr));
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, (%rdi)
testq %rdx, %rdx
je 0x4b58
movq %rdx, %r14
movq %rdx, %rdi
callq 0x3130
cmpq $0x7f, %rax
movl $0x7f, %r15d
cmovbq %rax, %r15
leaq 0x4(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x32f0
movb $0x0, 0x4(%rbx,%r15)
popq %rbx
popq %r14
popq %r15
retq
cmpl $0x1, %esi
jne 0x4b7a
callq 0x3080
movl (%rax), %edi
addq $0x4, %rbx
movl $0x80, %edx
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x30f0
leaq 0x4673(%rip), %rdi      # 0x91f4
leaq 0x456a(%rip), %rsi      # 0x90f2
leaq 0x467a(%rip), %rcx      # 0x9209
movl $0x247, %edx            # imm = 0x247
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O3/andyfighting[P]hiredis_timer_cmpt/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);
    if (c->tcp.host)
        free(c->tcp.host);
    if (c->tcp.source_addr)
        free(c->tcp.source_addr);
    if (c->unix_sock.path)
        free(c->unix_sock.path);
    if (c->timeout)
        free(c->timeout);
    free(c);
}

// Assembly:
testq %rdi, %rdi
je 0x4c30
pushq %rbx
movq %rdi, %rbx
movl 0x84(%rdi), %edi
testl %edi, %edi
jle 0x4bc1
callq 0x3200
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x4bd2
callq 0x3280
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x4be3
callq 0x34b0
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
je 0x4bf4
callq 0x3050
movq 0xb8(%rbx), %rdi
testq %rdi, %rdi
je 0x4c05
callq 0x3050
movq 0xc8(%rbx), %rdi
testq %rdi, %rdi
je 0x4c16
callq 0x3050
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x4c27
callq 0x3050
movq %rbx, %rdi
popq %rbx
jmp 0x3050
retq
// File: /workspace/github_c_makefile_star2_O3/andyfighting[P]hiredis_timer_cmpt/hiredis.c
// Function: redisReconnect
int redisReconnect(redisContext *c) {
    c->err = 0;
    memset(c->errstr, '\0', strlen(c->errstr));

    if (c->fd > 0) {
        close(c->fd);
    }

    sdsfree(c->obuf);
    redisReaderFree(c->reader);

    c->obuf = sdsempty();
    c->reader = redisReaderCreate();

    if (c->connection_type == REDIS_CONN_TCP) {
        return redisContextConnectBindTcp(c, c->tcp.host, c->tcp.port,
                c->timeout, c->tcp.source_addr);
    } else if (c->connection_type == REDIS_CONN_UNIX) {
        return redisContextConnectUnix(c, c->unix_sock.path, c->timeout);
    } else {
        /* Something bad happened here and shouldn't have. There isn't
           enough information in the context to reconnect. */
        __redisSetError(c,REDIS_ERR_OTHER,"Not enough information to reconnect");
    }

    return REDIS_ERR;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, (%rdi)
leaq 0x4(%rdi), %r14
movq %r14, %rdi
callq 0x3130
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x31f0
movl 0x84(%rbx), %edi
testl %edi, %edi
jle 0x4c80
callq 0x3200
movq 0x90(%rbx), %rdi
callq 0x3280
movq 0x98(%rbx), %rdi
callq 0x34b0
callq 0x3490
movq %rax, 0x90(%rbx)
leaq 0x860d(%rip), %rdi      # 0xd2b8
callq 0x3430
movq %rax, 0x98(%rbx)
movl 0xa0(%rbx), %eax
cmpl $0x1, %eax
je 0x4cf0
testl %eax, %eax
jne 0x4d0d
movq 0xa8(%rbx), %rcx
movq 0xb0(%rbx), %rsi
movl 0xc0(%rbx), %edx
movq 0xb8(%rbx), %r8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x32d0
movq 0xa8(%rbx), %rdx
movq 0xc8(%rbx), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x32b0
movl $0x2, (%rbx)
movups 0x4537(%rip), %xmm0     # 0x9251
movups %xmm0, 0x10(%r14)
movups 0x451b(%rip), %xmm0     # 0x9241
movups %xmm0, (%r14)
movl $0x7463656e, 0x1f(%r14) # imm = 0x7463656E
movb $0x0, 0x27(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/andyfighting[P]hiredis_timer_cmpt/hiredis.c
// Function: redisConnect
redisContext *redisConnect(const char *ip, int port) {
    redisContext *c;

    c = redisContextInit();
    if (c == NULL)
        return NULL;

    c->flags |= REDIS_BLOCK;
    redisContextConnectTcp(c,ip,port,NULL);
    return c;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x4d77
movq %rax, %rbx
testq %rax, %rax
je 0x4d6f
orb $0x1, 0x88(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x3400
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq