LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_ir_proc.c
// Function: alloc_proc_tree
PROC_TREE * alloc_proc_tree(){
	PROC_TREE *now_proc_tree		= NULL;
	PROC_TREE *old_proc_tree		= NULL;

	// メモリツリーに存在しなければ新規登録
	now_proc_tree = proc_tree_top;
	while(now_proc_tree != NULL){
		old_proc_tree = now_proc_tree;
		now_proc_tree = now_proc_tree->next_ptr;
	}

	now_proc_tree				= (PROC_TREE *)calloc(sizeof(PROC_TREE),1);
	now_proc_tree->prev_ptr	= old_proc_tree;
	now_proc_tree->next_ptr	= NULL;

	if(proc_tree_top == NULL){
		proc_tree_top				= now_proc_tree;
	}else{
		old_proc_tree->next_ptr	= now_proc_tree;
	}

	return now_proc_tree;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq 0xe971(%rip), %rax      # 0x18560
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x9c10
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x9bf3
movl $0x78, %edi
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
cmpq $0x0, 0xe91e(%rip)      # 0x18560
jne 0x9c51
movq -0x8(%rbp), %rax
movq %rax, 0xe911(%rip)      # 0x18560
jmp 0x9c5d
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_ir_proc.c
// Function: recall_proc_tree
PROC_TREE * recall_proc_tree(int stage)
{
	PROC_TREE *now_proc_tree;

    now_proc_tree = proc_tree_top;
    while(now_proc_tree != NULL){
        if(now_proc_tree->stage == stage){
			return now_proc_tree;
		}
        now_proc_tree = now_proc_tree->next_ptr;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq 0xe8e2(%rip), %rax      # 0x18560
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x9cad
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x9c9f
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9cb5
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x9c82
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_ir_proc.c
// Function: recall_proc_tree_end
PROC_TREE * recall_proc_tree_end()
{
	PROC_TREE *now_proc_tree;
	PROC_TREE *old_proc_tree;

    now_proc_tree = proc_tree_top;
    while(now_proc_tree != NULL){
		old_proc_tree = now_proc_tree;
        now_proc_tree = now_proc_tree->next_ptr;
    }
    return old_proc_tree;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xe895(%rip), %rax      # 0x18560
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x9cec
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x9ccf
movq -0x10(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_ir_proc.c
// Function: labelalloc
char *labelalloc(char *name)
{
	char *buf;
	int i;

	if(name[0] == '%'){
		buf=calloc(strlen(name)+1+8,1);
		sprintf(buf, "__label_%s", &name[1]);
	}else{
		buf=calloc(strlen(name)+1+8,1);
		sprintf(buf, "__label_%s", name);
	}

	for(i=0;i<strlen(buf);i++){
		if(buf[i] == '.') buf[i] = '_';
	}

	return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x25, %eax
jne 0xac66
movq -0x8(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x1, %rdx
leaq 0x94d5(%rip), %rsi      # 0x14132
movb $0x0, %al
callq 0x1160
jmp 0xac9e
movq -0x8(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq 0x949b(%rip), %rsi      # 0x14132
movb $0x0, %al
callq 0x1160
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1070
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0xacec
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2e, %eax
jne 0xacdf
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x5f, (%rax,%rcx)
jmp 0xace1
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xaca5
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_ir_proc.c
// Function: create_verilog_call_result
int create_verilog_call_result(char *name, char *reg, char *type, char *buf, int is_call)
{
	char *temp;
	char *str;
	int width;

	temp = calloc(STR_MAX, 1);
	strcpy(buf, "");

		str = regalloc(reg);
		sprintf(temp, "\t\t\t%s <= __call_%s_result;\n", str, name);
		free(str);
		strcat(buf, temp);

		// インターフェースの作成
		if(!strcmp(type, "i8")){
			width = 8;
		}else if(!strcmp(type, "i16")){
			width = 16;
		}else if(
			!strcmp(type, "i32") ||
			!strcmp(type, "i8*") || !strcmp(type, "i16*") || !strcmp(type, "i32*")
		){
			width = 32;
		}else{
			// ポインタの場合はここに入る
			width = 32;
		}
		// call_sianal_treeへ登録
		if(!is_call) register_call_signal_tree(name, "result", 0, width, 0);

	free(temp);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x9aa7(%rip), %rsi      # 0x14fc1
callq 0x1050
movq -0x10(%rbp), %rdi
callq 0xaa30
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x8(%rbp), %rcx
leaq 0x8c20(%rip), %rsi      # 0x1415f
movb $0x0, %al
callq 0x1160
movq -0x38(%rbp), %rdi
callq 0x1030
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1150
movq -0x18(%rbp), %rdi
leaq 0x7aa5(%rip), %rsi      # 0x1300c
callq 0x10d0
cmpl $0x0, %eax
jne 0xb57d
movl $0x8, -0x3c(%rbp)
jmp 0xb603
movq -0x18(%rbp), %rdi
leaq 0x7a87(%rip), %rsi      # 0x1300f
callq 0x10d0
cmpl $0x0, %eax
jne 0xb59b
movl $0x10, -0x3c(%rbp)
jmp 0xb601
movq -0x18(%rbp), %rdi
leaq 0x8cf3(%rip), %rsi      # 0x14299
callq 0x10d0
cmpl $0x0, %eax
je 0xb5ef
movq -0x18(%rbp), %rdi
leaq 0x8bc0(%rip), %rsi      # 0x1417b
callq 0x10d0
cmpl $0x0, %eax
je 0xb5ef
movq -0x18(%rbp), %rdi
leaq 0x8baf(%rip), %rsi      # 0x1417f
callq 0x10d0
cmpl $0x0, %eax
je 0xb5ef
movq -0x18(%rbp), %rdi
leaq 0x8b9f(%rip), %rsi      # 0x14184
callq 0x10d0
cmpl $0x0, %eax
jne 0xb5f8
movl $0x20, -0x3c(%rbp)
jmp 0xb5ff
movl $0x20, -0x3c(%rbp)
jmp 0xb601
jmp 0xb603
cmpl $0x0, -0x24(%rbp)
jne 0xb622
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %ecx
leaq 0x97b9(%rip), %rsi      # 0x14dd0
xorl %r8d, %r8d
movl %r8d, %edx
callq 0x72b0
movq -0x30(%rbp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_ir_proc.c
// Function: get_getelement_type
int get_getelement_type(char *line, char *result)
{
	char *token;
	char *buf;

	token = calloc(STR_MAX, 1);
	buf = charalloc(line);

	get_token_llvm(buf, token);		// getelementptr
	get_token_llvm(buf, token);		// inbounds
	get_irtype_llvm(buf, token);	// Type
	strcpy(result, token);

	free(token);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x13b0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x11ca0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x11ca0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x25b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1050
movq -0x18(%rbp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_ir_proc.c
// Function: register_verilog
char * register_verilog(char *body, char *buf)
{
    char *temp = NULL;

	// Verilogコード登録
	if(body != NULL){
		temp = charalloc(body);
		free(body);
		body = calloc(strlen(temp) + strlen(buf) + 1, 1);
		sprintf(body, "%s%s", temp, buf);
		free(temp);
	}else{
		body = charalloc(buf);
	}

	return body;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xb749
movq -0x8(%rbp), %rdi
callq 0x13b0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1030
movq -0x18(%rbp), %rdi
callq 0x1070
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1070
movq -0x20(%rbp), %rdi
addq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
leaq 0x7b9a(%rip), %rsi      # 0x132d1
movb $0x0, %al
callq 0x1160
movq -0x18(%rbp), %rdi
callq 0x1030
jmp 0xb756
movq -0x10(%rbp), %rdi
callq 0x13b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_ir_proc.c
// Function: create_verilog_label
int create_verilog_label()
{
	PARSER_TREE_IR *now_parser_tree_ir = parser_tree_ir_top;
    char *buf;
    char *str;
	int count = 1;

	buf = calloc(STR_MAX, 1);

	sprintf(buf, "localparam __label_0 = 0;\n");
	verilog_state = register_verilog(verilog_state, buf);

    while(now_parser_tree_ir != NULL){
		if(now_parser_tree_ir->flag == PARSER_IR_FLAG_LABEL){
			str = labelalloc(now_parser_tree_ir->label);
			sprintf(buf, "localparam %s = %d;\n", str, now_parser_tree_ir->stage);
			verilog_state = register_verilog(verilog_state, buf);
			free(str);
			count++;
		}
        now_parser_tree_ir = now_parser_tree_ir->next_ptr;
	}

	sprintf(buf, "integer __label_pre;\n");
	verilog_state = register_verilog(verilog_state, buf);
	sprintf(buf, "integer __label;\n");
	verilog_state = register_verilog(verilog_state, buf);

	free(buf);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0xaca1(%rip), %rax      # 0x18110
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x1c(%rbp)
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x733f(%rip), %rsi      # 0x147da
movb $0x0, %al
callq 0x1160
movq 0xb0cf(%rip), %rdi      # 0x18578
movq -0x10(%rbp), %rsi
callq 0xb6c0
movq %rax, 0xb0bf(%rip)      # 0x18578
cmpq $0x0, -0x8(%rbp)
je 0xd52f
movq -0x8(%rbp), %rax
cmpl $0xe, 0x10(%rax)
jne 0xd521
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
callq 0xac10
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
leaq 0x7304(%rip), %rsi      # 0x147f5
movb $0x0, %al
callq 0x1160
movq 0xb079(%rip), %rdi      # 0x18578
movq -0x10(%rbp), %rsi
callq 0xb6c0
movq %rax, 0xb069(%rip)      # 0x18578
movq -0x18(%rbp), %rdi
callq 0x1030
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xd4b9
movq -0x10(%rbp), %rdi
leaq 0x72d0(%rip), %rsi      # 0x1480a
movb $0x0, %al
callq 0x1160
movq 0xb030(%rip), %rdi      # 0x18578
movq -0x10(%rbp), %rsi
callq 0xb6c0
movq %rax, 0xb020(%rip)      # 0x18578
movq -0x10(%rbp), %rdi
leaq 0x72bd(%rip), %rsi      # 0x14820
movb $0x0, %al
callq 0x1160
movq 0xb007(%rip), %rdi      # 0x18578
movq -0x10(%rbp), %rsi
callq 0xb6c0
movq %rax, 0xaff7(%rip)      # 0x18578
movq -0x10(%rbp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_ir_proc.c
// Function: output_verilog_return
int output_verilog_return(FILE *fp)
{
	PARSER_TREE_IR *now_parser_tree_ir = parser_tree_ir_top;

	int width;

    while(now_parser_tree_ir != NULL){
		if(now_parser_tree_ir->flag == PARSER_IR_FLAG_RETURN){
			if(strcmp(now_parser_tree_ir->ret.type, "void")){
				width = get_width(now_parser_tree_ir->ret.type);
				fprintf(fp, "\toutput reg [%d:0] __func_result,\n", (width-1));
			}
		}
        now_parser_tree_ir = now_parser_tree_ir->next_ptr;
	}

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xab5d(%rip), %rax      # 0x18110
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xd622
movq -0x10(%rbp), %rax
cmpl $0x12, 0x10(%rax)
jne 0xd614
movq -0x10(%rbp), %rdi
addq $0x6434, %rdi           # imm = 0x6434
leaq 0x5a27(%rip), %rsi      # 0x13004
callq 0x10d0
cmpl $0x0, %eax
je 0xd612
movq -0x10(%rbp), %rdi
addq $0x6434, %rdi           # imm = 0x6434
callq 0x12a0
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
subl $0x1, %edx
leaq 0x743f(%rip), %rsi      # 0x14a4a
movb $0x0, %al
callq 0x10e0
jmp 0xd614
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xd5ba
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0xaf49(%rip), %rax      # 0x18588
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xd699
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0xd66e
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0xd686
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rdi
callq 0x1030
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xd643
movq $0x0, 0xaee4(%rip) # 0x18588
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x10(%rbp)
movq 0xadc6(%rip), %rax      # 0x18588
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xd8c1
movq -0x10(%rbp), %rdi
leaq 0x77e5(%rip), %rsi      # 0x14fc1
callq 0x1050
movq -0x8(%rbp), %rax
cmpl $0x1, 0x10(%rax)
je 0xd7f9
movq -0x8(%rbp), %rax
cmpl $0x2, 0x10(%rax)
jne 0xd8b0
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x1c(%rbp)
subl $0x1, %eax
je 0xd814
jmp 0xd80a
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0xd828
jmp 0xd83c
movq -0x10(%rbp), %rdi
leaq 0x5e88(%rip), %rsi      # 0x136a7
movb $0x0, %al
callq 0x1160
jmp 0xd83e
movq -0x10(%rbp), %rdi
leaq 0x723a(%rip), %rsi      # 0x14a6d
movb $0x0, %al
callq 0x1160
jmp 0xd83e
jmp 0xd83e
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jle 0xd868
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
subl $0x1, %ecx
leaq 0x5e4b(%rip), %rsi      # 0x136ac
movb $0x0, %al
callq 0x1160
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xaa30
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq 0x71e7(%rip), %rsi      # 0x14a73
movb $0x0, %al
callq 0x1160
movq -0x18(%rbp), %rdi
callq 0x1030
movq -0x10(%rbp), %rdi
callq 0x13b0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xd7c6
movq -0x10(%rbp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq 0xac95(%rip), %rax      # 0x18588
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xd949
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x14(%rbp)
decl %eax
subl $0x2, %eax
jb 0xd91b
jmp 0xd911
movl -0x14(%rbp), %eax
subl $0x3, %eax
je 0xd937
jmp 0xd939
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
leaq 0x619c(%rip), %rsi      # 0x13aca
movb $0x0, %al
callq 0x10e0
jmp 0xd93b
jmp 0xd93b
jmp 0xd93b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xd8f7
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
cmpq $0x0, 0xaa64(%rip)      # 0x185a0
jne 0xdb7d
movq -0x8(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, 0xaa41(%rip)      # 0x185a0
movq 0xaa3a(%rip), %rdi      # 0x185a0
movq -0x8(%rbp), %rdx
leaq 0x5e57(%rip), %rsi      # 0x139c8
movb $0x0, %al
callq 0x1160
jmp 0xdc09
movq 0xaa1c(%rip), %rdi      # 0x185a0
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq 0xa9f7(%rip), %rsi      # 0x185a0
callq 0x1050
movq 0xa9eb(%rip), %rdi      # 0x185a0
callq 0x1030
movq -0x10(%rbp), %rdi
callq 0x1070
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1070
movq -0x18(%rbp), %rdi
addq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, 0xa9b4(%rip)      # 0x185a0
movq 0xa9ad(%rip), %rdi      # 0x185a0
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rcx
leaq 0x56cf(%rip), %rsi      # 0x132d1
movb $0x0, %al
callq 0x1160
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
cmpq $0x0, 0xa96c(%rip)      # 0x185a8
jne 0xdc7d
movq -0x8(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, 0xa949(%rip)      # 0x185a8
movq 0xa942(%rip), %rdi      # 0x185a8
movq -0x8(%rbp), %rdx
leaq 0x5d57(%rip), %rsi      # 0x139c8
movb $0x0, %al
callq 0x1160
jmp 0xdd09
movq 0xa924(%rip), %rdi      # 0x185a8
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq 0xa8ff(%rip), %rsi      # 0x185a8
callq 0x1050
movq 0xa8f3(%rip), %rdi      # 0x185a8
callq 0x1030
movq -0x10(%rbp), %rdi
callq 0x1070
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1070
movq -0x18(%rbp), %rdi
addq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, 0xa8bc(%rip)      # 0x185a8
movq 0xa8b5(%rip), %rdi      # 0x185a8
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rcx
leaq 0x55cf(%rip), %rsi      # 0x132d1
movb $0x0, %al
callq 0x1160
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_ir_top.c
// Function: get_top_signal_tree_last
int get_top_signal_tree_last(TOP_SIGNAL_TREE **last_top_signal_tree)
{
	TOP_SIGNAL_TREE *now_top_signal_tree;
	TOP_SIGNAL_TREE *old_top_signal_tree;

	now_top_signal_tree = top_signal_tree_top;
    while(now_top_signal_tree != NULL){
		old_top_signal_tree = now_top_signal_tree;
        now_top_signal_tree = old_top_signal_tree->next_ptr;
	}

	*last_top_signal_tree = old_top_signal_tree;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq 0xa861(%rip), %rax      # 0x18590
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xdd50
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xdd33
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x20(%rbp)
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x30(%rbp)
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rdx
movl -0xc(%rbp), %r8d
leaq 0x6ae9(%rip), %rsi      # 0x14acc
leaq 0x6170(%rip), %rcx      # 0x1415a
movb $0x0, %al
callq 0x1160
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x59c8(%rip), %rsi      # 0x139c8
movb $0x0, %al
callq 0x1160
movq 0xa582(%rip), %rax      # 0x18590
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xe072
movq -0x18(%rbp), %rax
cmpl $0x5, 0x30(%rax)
jne 0xe064
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x10d0
cmpl $0x0, %eax
jne 0xe062
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rcx
leaq 0x6a8c(%rip), %rsi      # 0x14adc
movb $0x0, %al
callq 0x1160
movq -0x18(%rbp), %rax
movl $0x1, 0x20(%rax)
jmp 0xe064
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xe012
movq -0x20(%rbp), %rdi
callq 0x1070
cmpq $0x0, %rax
jbe 0xe0cc
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1070
movq %rax, %rcx
movq -0x40(%rbp), %rax
subq $0x1, %rcx
movb $0x3b, (%rax,%rcx)
movq -0x20(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1050
movq -0x20(%rbp), %rdi
callq 0x1030
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x9aed(%rip), %rax      # 0x18590
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xead6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
leaq 0x5009(%rip), %rsi      # 0x13aca
movb $0x0, %al
callq 0x10e0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xeaa7
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x9a9d(%rip), %rax      # 0x18590
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xec03
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0xebf2
movq -0x10(%rbp), %rax
cmpl $0x3, 0x30(%rax)
jne 0xeb8f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0xeb38
movq -0x8(%rbp), %rdi
leaq 0x4b68(%rip), %rsi      # 0x13697
movb $0x0, %al
callq 0x10e0
jmp 0xeb4a
movq -0x8(%rbp), %rdi
leaq 0x60ea(%rip), %rsi      # 0x14c2d
movb $0x0, %al
callq 0x10e0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jle 0xeb73
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edx
shll $0x3, %edx
subl $0x1, %edx
leaq 0x4b42(%rip), %rsi      # 0x136ae
movb $0x0, %al
callq 0x10e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x60c5(%rip), %rsi      # 0x14c4b
movb $0x0, %al
callq 0x10e0
jmp 0xebf0
movq -0x10(%rbp), %rax
cmpl $0x6, 0x30(%rax)
jne 0xebee
movq -0x8(%rbp), %rdi
leaq 0x6089(%rip), %rsi      # 0x14c2d
movb $0x0, %al
callq 0x10e0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jle 0xebd4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edx
shll $0x3, %edx
subl $0x1, %edx
leaq 0x4ae1(%rip), %rsi      # 0x136ae
movb $0x0, %al
callq 0x10e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x4ee3(%rip), %rsi      # 0x13aca
movb $0x0, %al
callq 0x10e0
jmp 0xebf0
jmp 0xebf2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xeaf7
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x996d(%rip), %rax      # 0x18590
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xecbd
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0xecac
movq -0x10(%rbp), %rax
cmpl $0x1, 0x30(%rax)
je 0xec5a
movq -0x10(%rbp), %rax
cmpl $0x3, 0x30(%rax)
je 0xec5a
movq -0x10(%rbp), %rax
cmpl $0x6, 0x30(%rax)
jne 0xecac
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0xec88
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
leaq 0x58c0(%rip), %rsi      # 0x1453f
movb $0x0, %al
callq 0x10e0
jmp 0xecaa
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
leaq 0x589c(%rip), %rsi      # 0x1453f
movb $0x0, %al
callq 0x10e0
jmp 0xecac
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xec27
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x20(%rbp)
leaq 0x984a(%rip), %rax      # 0x18550
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xedd5
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xedc4
movq -0x18(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0xedb3
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0x25, %eax
je 0xed61
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0x40, %eax
jne 0xed73
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xed7f
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x1400
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0x4c32(%rip), %rsi      # 0x139c8
movb $0x0, %al
callq 0x1160
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x5e8a(%rip), %rsi      # 0x14c36
movb $0x0, %al
callq 0x10e0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xed24
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xed0d
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x82b1(%rip), %rax      # 0x185b0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x10359
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1032e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x10346
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rdi
callq 0x1030
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x10303
movq $0x0, 0x824c(%rip) # 0x185b0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq 0x8219(%rip), %rax      # 0x185b0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x103b8
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x1039b
movl $0x28, %edi
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
cmpq $0x0, 0x81c6(%rip)      # 0x185b0
jne 0x103f9
movq -0x18(%rbp), %rax
movq %rax, 0x81b9(%rip)      # 0x185b0
jmp 0x10405
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
callq 0x13b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
callq 0x13b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x4bbc(%rip), %rdi      # 0x1500b
movb $0x0, %al
callq 0x1090
leaq 0x7cb3(%rip), %rax      # 0x18110
movq (%rax), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1049b
movq -0x8(%rbp), %rax
cmpl $0x4, 0x10(%rax)
jne 0x1048d
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x8(%rbp), %rsi
addq $0x1830, %rsi           # imm = 0x1830
callq 0x10370
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x10464
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x4af6(%rip), %rsi      # 0x14fc1
callq 0x1050
movq 0x80d9(%rip), %rax      # 0x185b0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x10519
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x10d0
cmpl $0x0, %eax
jne 0x1050b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x1050
jmp 0x10519
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x104db
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_struct.c
// Function: is_struct_name
int is_struct_name(char *label)
{
	STRUCT_TREE *now_struct_tree;

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

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq 0x806d(%rip), %rax      # 0x185b0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x10574
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x10d0
cmpl $0x0, %eax
jne 0x10566
jmp 0x10574
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x10547
cmpq $0x0, -0x18(%rbp)
jne 0x10584
movl $0x0, -0x4(%rbp)
jmp 0x1058b
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x4a7b(%rip), %rdi      # 0x1502e
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rdi
callq 0x11ba0
movb $0x0, %al
callq 0x11b20
movq %rax, %rdi
callq 0x11b40
movb $0x0, %al
callq 0x1f30
movb $0x0, %al
callq 0x1630
movl %eax, -0xc(%rbp)
movb $0x0, %al
callq 0x17a0
movb $0x0, %al
callq 0x11a40
movl -0xc(%rbp), %esi
leaq 0x4a4c(%rip), %rdi      # 0x15047
movb $0x0, %al
callq 0x1090
leaq 0x4a56(%rip), %rdi      # 0x1505f
movb $0x0, %al
callq 0x1090
movl $0x100, %edi            # imm = 0x100
callq 0x1100
movq %rax, -0x18(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x10656
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %edx
leaq 0x4a3a(%rip), %rsi      # 0x15075
movb $0x0, %al
callq 0x1160
movq -0x18(%rbp), %rdi
callq 0x1080
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x10625
movq -0x18(%rbp), %rdi
callq 0x1030
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
leaq 0x4521(%rip), %rdi      # 0x1511c
movl $0x1, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0x1090
leaq 0x4522(%rip), %rdi      # 0x15132
movb $0x0, %al
callq 0x1090
leaq 0x453b(%rip), %rdi      # 0x15159
movb $0x0, %al
callq 0x1090
leaq 0x4551(%rip), %rdi      # 0x1517d
movb $0x0, %al
callq 0x1090
leaq 0x4386(%rip), %rdi      # 0x14fc0
movb $0x0, %al
callq 0x1090
leaq 0x455f(%rip), %rdi      # 0x151a7
movb $0x0, %al
callq 0x1090
leaq 0x4559(%rip), %rdi      # 0x151af
movb $0x0, %al
callq 0x1090
leaq 0x456d(%rip), %rdi      # 0x151d1
movb $0x0, %al
callq 0x1090
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jle 0x10da4
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jae 0x10cfc
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
leaq 0x4547(%rip), %rsi      # 0x151f8
callq 0x10d0
cmpl $0x0, %eax
jne 0x10cc7
callq 0x10bf0
xorl %edi, %edi
callq 0x1170
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
leaq 0x4526(%rip), %rsi      # 0x151ff
callq 0x10d0
cmpl $0x0, %eax
jne 0x10ced
movl $0x1, 0x78cb(%rip)      # 0x185b8
jmp 0x10cef
jmp 0x10cf1
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x10c97
cmpl $0x2, -0x8(%rbp)
jge 0x10d0e
callq 0x10bf0
xorl %edi, %edi
callq 0x1170
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
addq $0xa, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, 0x7885(%rip)      # 0x185c0
movq 0x787e(%rip), %rdi      # 0x185c0
movq -0x18(%rbp), %rsi
callq 0x1050
movq 0x786e(%rip), %rax      # 0x185c0
movq %rax, -0x28(%rbp)
movq 0x7863(%rip), %rdi      # 0x185c0
callq 0x1070
movq %rax, %rcx
movq -0x28(%rbp), %rax
subq $0x2, %rcx
movb $0x0, (%rax,%rcx)
movq 0x7848(%rip), %rdi      # 0x185c0
leaq 0x4483(%rip), %rsi      # 0x15202
callq 0x1150
movq 0x7835(%rip), %rsi      # 0x185c0
leaq 0x4475(%rip), %rdi      # 0x15207
movb $0x0, %al
callq 0x1090
movq -0x18(%rbp), %rdi
callq 0x10a20
jmp 0x10da9
callq 0x10bf0
xorl %edi, %edi
callq 0x1170
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/token.c
// Function: iskanji
int iskanji(char *codein)
{
	unsigned char *code = (unsigned char *)codein;

    if((*code >= 0xa1) && (*code <= 0xfe)){
        // EUCの場合
        return 1;
    }else if(((*code >= 0x81) && (*code <= 0x9F)) || ((*code >= 0xe0) && (*code <= 0xfc))){
        // SJISの場合
        (*code)++;
        // SJISの2Byte目を判断する
        if((*code >= 0x40) && (*code <= 0x7e)){
            // 正常なSJISコード
            return 2;
        }else{
            // 異常なSJISコード
            return 3;
        }
    }else{
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa1, %eax
jl 0x10de5
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jg 0x10de5
movl $0x1, -0x4(%rbp)
jmp 0x10e59
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x81, %eax
jl 0x10e01
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x9f, %eax
jle 0x10e1d
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xe0, %eax
jl 0x10e52
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfc, %eax
jg 0x10e52
movq -0x18(%rbp), %rax
movb (%rax), %cl
addb $0x1, %cl
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x40, %eax
jl 0x10e49
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x7e, %eax
jg 0x10e49
movl $0x2, -0x4(%rbp)
jmp 0x10e59
movl $0x3, -0x4(%rbp)
jmp 0x10e59
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/token.c
// Function: get_line
int get_line(char *line, FILE *fp)
{
//	int leng;
//	char buf[STR_MAX];

    if(*line == '\0'){
        if(fgets(line, STR_MAX, fp) == NULL){
            return -1;
        }
#if 0
        strcpy(buf, line);
        while(buf[strlen(buf)-1] == '\n' || buf[strlen(buf)-1] == '\r'){
	        buf[strlen(buf)-1] = '\0';
		}
#endif
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x10e9f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x10b0
cmpq $0x0, %rax
jne 0x10e9d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x10ea6
jmp 0x10e9f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop