// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movl %r9d, 0x4(%rsp)
movl %r8d, (%rsp)
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movl $0x60, %edi
movl $0x1, %esi
callq 0x10f0
movq %rax, %r15
movq 0xa568(%rip), %rax      # 0x145b0
testq %rax, %rax
je 0xa062
movq %rax, %rcx
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0xa04d
movq %r15, 0x8(%rcx)
movq %rcx, (%r15)
jmp 0xa069
movq %r15, 0xa547(%rip)      # 0x145b0
movq 0x50(%rsp), %r13
movq %r14, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, 0x10(%r15)
movq %rax, %rdi
movq %r14, %rsi
callq 0x1060
movq %rbx, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, 0x28(%r15)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
movq %r12, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, 0x38(%r15)
movq %rax, %rdi
movq %r12, %rsi
callq 0x1060
cmpl $0x5, %ebp
jne 0xa10c
movq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, 0x40(%r15)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
movq %r13, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, 0x50(%r15)
movq %rax, %rdi
movq %r13, %rsi
callq 0x1060
movq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0x1090
leaq 0x1(%rax), %rdi
movl $0x1, %esi
callq 0x10f0
movq %rax, 0x58(%r15)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
movl (%rsp), %eax
movl %eax, 0x1c(%r15)
movl %ebp, 0x30(%r15)
movl 0x48(%rsp), %eax
movl %eax, 0x48(%r15)
movl 0x4(%rsp), %eax
movl %eax, 0x18(%r15)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq