// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_ir_top.c
// Function: register_top_signal_tree
int register_top_signal_tree(char *label,char *module_name, char *name, int flag, int inout, int size, char *call_name, int args_num, char *verilog_signal, char *verilog_wire)
{
	TOP_SIGNAL_TREE *now_top_signal_tree;
	TOP_SIGNAL_TREE *new_top_signal_tree;

	new_top_signal_tree	= (TOP_SIGNAL_TREE *)calloc(sizeof(TOP_SIGNAL_TREE), 1);

    if(top_signal_tree_top == NULL){
        top_signal_tree_top	= new_top_signal_tree;
    }else{
		get_top_signal_tree_last(&now_top_signal_tree);
		now_top_signal_tree->next_ptr	= new_top_signal_tree;
		new_top_signal_tree->prev_ptr	= now_top_signal_tree;
    }

	new_top_signal_tree->label			= calloc(strlen(label)+1,1);
	strcpy(new_top_signal_tree->label, label);
	new_top_signal_tree->module_name			= calloc(strlen(module_name)+1,1);
	strcpy(new_top_signal_tree->module_name, module_name);
	new_top_signal_tree->name			= calloc(strlen(name)+1,1);
	strcpy(new_top_signal_tree->name, name);
	if(flag == FLAG_CALL){
		new_top_signal_tree->call_name			= calloc(strlen(call_name)+1,1);
		strcpy(new_top_signal_tree->call_name, call_name);
	}
	new_top_signal_tree->verilog_signal	= calloc(strlen(verilog_signal)+1,1);
	strcpy(new_top_signal_tree->verilog_signal, verilog_signal);
	new_top_signal_tree->verilog_wire	= calloc(strlen(verilog_wire)+1,1);
	strcpy(new_top_signal_tree->verilog_wire, verilog_wire);

	new_top_signal_tree->inout			= inout;
	new_top_signal_tree->flag			= flag;
	new_top_signal_tree->args_num		= args_num;
	new_top_signal_tree->size			= size;
	new_top_signal_tree->used			= 0;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl $0x60, %edi
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x38(%rbp)
cmpq $0x0, 0xa7e7(%rip)      # 0x18590
jne 0xddb8
movq -0x38(%rbp), %rax
movq %rax, 0xa7da(%rip)      # 0x18590
jmp 0xddd8
leaq -0x30(%rbp), %rdi
callq 0xdd20
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x1050
movq -0x10(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x1050
movq -0x18(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x38(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x1050
cmpl $0x5, -0x1c(%rbp)
jne 0xdeb6
movq 0x10(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x38(%rbp), %rax
movq 0x40(%rax), %rdi
movq 0x10(%rbp), %rsi
callq 0x1050
movq 0x20(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rdi
movq 0x20(%rbp), %rsi
callq 0x1050
movq 0x28(%rbp), %rdi
callq 0x1070
movq %rax, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rdi
movq 0x28(%rbp), %rsi
callq 0x1050
movl -0x20(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x1c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x30(%rax)
movl 0x18(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x48(%rax)
movl -0x24(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x20(%rax)
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)