// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0xc(%rsp)
movl %r8d, 0x8(%rsp)
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x60
popq %rdi
pushq $0x1
popq %rsi
callq 0x10f0
movq %rax, %r15
cmpq $0x0, 0x99d9(%rip)      # 0x135b0
je 0x9bf3
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x9b82
movq (%r13), %rax
movq %r15, 0x8(%rax)
movq %rax, (%r15)
jmp 0x9bfa
movq %r15, 0x99b6(%rip)      # 0x135b0
movq %r14, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
pushq $0x1
popq %r13
movq %r13, %rsi
callq 0x10f0
movq %rax, 0x10(%r15)
movq %rax, %rdi
movq %r14, %rsi
callq 0x1060
movq %rbx, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movq %r13, %rsi
callq 0x10f0
movq %rax, 0x28(%r15)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
movq %r12, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movq %r13, %rsi
callq 0x10f0
movq %rax, 0x38(%r15)
movq %rax, %rdi
movq %r12, %rsi
callq 0x1060
cmpl $0x5, %ebp
jne 0x9c94
movq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
pushq $0x1
popq %rsi
callq 0x10f0
movq %rax, 0x40(%r15)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
movq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
pushq $0x1
popq %rbx
movq %rbx, %rsi
callq 0x10f0
movq %rax, 0x50(%r15)
movq %rax, %rdi
movq %r14, %rsi
callq 0x1060
movq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movq %rbx, %rsi
callq 0x10f0
movq %rax, 0x58(%r15)
movq %rax, %rdi
movq %r14, %rsi
callq 0x1060
movl 0x8(%rsp), %eax
movl %eax, 0x1c(%r15)
movl %ebp, 0x30(%r15)
movl 0x58(%rsp), %eax
movl %eax, 0x48(%r15)
movl 0xc(%rsp), %eax
movl %eax, 0x18(%r15)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq