// File: /workspace/github_c_makefile_star2_O0/aquaxis[P]synverll/src/parser_ir.c
// Function: create_stage_parser_tree
int create_stage_parser_tree()
{
	PARSER_TREE_IR *now_parser_tree_ir;
    char *token;
	int current_parallel = 0;
	int current_stage = 0;
	int new_stage = 0;
	INST_STAGE inst_stage;
	INST_STAGE proc_stage;
    char *line_buf;
    char *init_name, *next_name;

	token = calloc(STR_MAX, 1);
	init_name = calloc(STR_MAX, 1);
	next_name = calloc(STR_MAX, 1);

    printf(" -> Create Stage for LLVM-IR\n");
    now_parser_tree_ir = parser_tree_ir_top;
    while(now_parser_tree_ir != NULL){

		if( current_stage == 0 ){
			if( now_parser_tree_ir->flag == PARSER_IR_FLAG_MODULE ){
				/*
				 * モジュール宣言に入った時にステージが初めてスタートします。
				 */
				current_stage = 1;
				current_parallel = 0;
			}
			now_parser_tree_ir->parallel = current_parallel;
			now_parser_tree_ir->stage = current_stage;
		}else{
			switch(now_parser_tree_ir->flag){
				case PARSER_IR_FLAG_MODULE:
//					printf("[ERROR] Stage Level for Module Start : parser_tree_1st_stage().\n");
					break;
				case PARSER_IR_FLAG_REGISTER:
				case PARSER_IR_FLAG_FLOAT:
					inst_stage = search_reg_llvm(now_parser_tree_ir, now_parser_tree_ir->label, now_parser_tree_ir->reg.input_left, now_parser_tree_ir->reg.input_right);
					if((current_parallel > inst_stage.parallel) || (current_stage > inst_stage.stage)){
						current_parallel++;
					}
					current_stage = inst_stage.stage;
					current_stage++;
					now_parser_tree_ir->parallel = current_parallel;
					now_parser_tree_ir->stage = current_stage;
					now_parser_tree_ir->prev_parallel = inst_stage.parallel;
					now_parser_tree_ir->prev_stage = inst_stage.stage;
					break;
				case PARSER_IR_FLAG_WIRE:
					/* WIREはstageに左右されない */
					inst_stage = search_reg_llvm(now_parser_tree_ir, now_parser_tree_ir->label, now_parser_tree_ir->reg.input_left, now_parser_tree_ir->reg.input_right);
					if((current_parallel > inst_stage.parallel) || (current_stage > inst_stage.stage)){
						current_parallel++;
					}
					current_stage = inst_stage.stage;
					now_parser_tree_ir->parallel = current_parallel;
					now_parser_tree_ir->stage = current_stage;
					now_parser_tree_ir->prev_parallel = inst_stage.parallel;
					now_parser_tree_ir->prev_stage = inst_stage.stage;
					break;
				case PARSER_IR_FLAG_CALL:
				case PARSER_IR_FLAG_SCALL:
					inst_stage = search_args_llvm(now_parser_tree_ir, now_parser_tree_ir->label, now_parser_tree_ir->call.argument);
					if((current_parallel > inst_stage.parallel) || (current_stage > inst_stage.stage)){
						current_parallel++;
					}

					proc_stage = search_proc_llvm(now_parser_tree_ir, now_parser_tree_ir->flag);

					if(inst_stage.stage >= proc_stage.stage){
							current_stage = inst_stage.stage;
					}else{
							current_stage = proc_stage.stage;
					}
					current_parallel = proc_stage.parallel;

					current_stage++;
					now_parser_tree_ir->parallel = current_parallel;
					now_parser_tree_ir->stage = current_stage;
					now_parser_tree_ir->prev_parallel = inst_stage.parallel;
					now_parser_tree_ir->prev_stage = inst_stage.stage;
					break;
				case PARSER_IR_FLAG_REGISTER_LOOP:
					line_buf = charalloc(now_parser_tree_ir->phi.argument);

					do{
						//
						get_token_llvm(line_buf, token);
						// value
						get_token_llvm(line_buf, token);
//						printf("[LOOP]: value: %s\n", token);

						if(is_register_name(token)){
							inst_stage = search_reg_llvm(now_parser_tree_ir, now_parser_tree_ir->label, token, "");
							if((current_parallel > inst_stage.parallel) || (current_stage > inst_stage.stage)){
								current_parallel++;
							}
						}
						proc_stage = search_proc_llvm(now_parser_tree_ir, now_parser_tree_ir->flag);

						if(inst_stage.stage >= proc_stage.stage){
								current_stage = inst_stage.stage;
						}else{
								current_stage = proc_stage.stage;
						}
						current_parallel = proc_stage.parallel;

						// ,
						get_token_llvm(line_buf, token);
						// name
						get_token_llvm(line_buf, token);
//						printf("[LOOP]: name: %s\n", token);
						// ]
						get_token_llvm(line_buf, token);
						// ,
						get_token_llvm(line_buf, token);
					}while(strlen(line_buf) > 0);
					free(line_buf);
					current_stage++;
					now_parser_tree_ir->parallel = current_parallel;
					now_parser_tree_ir->stage = current_stage;
					now_parser_tree_ir->prev_parallel = inst_stage.parallel;
					now_parser_tree_ir->prev_stage = inst_stage.stage;
					break;
				case PARSER_IR_FLAG_STORE:
					/*  */
					inst_stage = search_reg_llvm(now_parser_tree_ir, now_parser_tree_ir->label, now_parser_tree_ir->reg.input_left, now_parser_tree_ir->reg.input_right);
					if((current_parallel > inst_stage.parallel) || (current_stage > inst_stage.stage)){
						current_parallel++;
					}
					proc_stage = search_proc_llvm(now_parser_tree_ir, now_parser_tree_ir->flag);

					if(inst_stage.stage >= proc_stage.stage){
							current_stage = inst_stage.stage;
					}else{
							current_stage = proc_stage.stage;
					}
					current_parallel = proc_stage.parallel;

					current_stage++;
					now_parser_tree_ir->parallel = current_parallel;
					now_parser_tree_ir->stage = current_stage;
					now_parser_tree_ir->prev_parallel = inst_stage.parallel;
					now_parser_tree_ir->prev_stage = inst_stage.stage;
					break;
				case PARSER_IR_FLAG_COMPARE:
					inst_stage = search_reg_llvm(now_parser_tree_ir, now_parser_tree_ir->label, now_parser_tree_ir->comp.input_left, now_parser_tree_ir->comp.input_right);
					if((current_parallel > inst_stage.parallel) || (current_stage > inst_stage.stage)){
						current_parallel++;
					}
					current_stage = inst_stage.stage;
					current_stage++;
					now_parser_tree_ir->parallel = current_parallel;
					now_parser_tree_ir->stage = current_stage;
					now_parser_tree_ir->prev_parallel = inst_stage.parallel;
					now_parser_tree_ir->prev_stage = inst_stage.stage;
					break;
				case PARSER_IR_FLAG_POINTER:
					inst_stage = search_reg_llvm(now_parser_tree_ir, now_parser_tree_ir->label, now_parser_tree_ir->pointer.name, now_parser_tree_ir->pointer.init_name);
					// ポインターが階層になっている場合は、全ての位置を把握する必要がある
					line_buf = charalloc(now_parser_tree_ir->pointer.add_name);

					do{
						// タイプ
						get_irtype_llvm(line_buf, token);
						// 変数
						get_irtype_llvm(line_buf, token);
						proc_stage = search_reg_llvm(now_parser_tree_ir, now_parser_tree_ir->label, token, "");
						// ,
						get_token_llvm(line_buf, token);
						if(proc_stage.stage > new_stage){
//							new_parallel = proc_stage.parallel;
							new_stage = proc_stage.stage;
						}
					}while(!strcmp(token, ",") && (strlen(line_buf) > 0));

					free(line_buf);

					if(inst_stage.stage >= proc_stage.stage){
							current_stage = inst_stage.stage;
					}else{
							current_stage = proc_stage.stage;
					}
					current_parallel = proc_stage.parallel;

					current_stage++;
					now_parser_tree_ir->parallel = current_parallel;
					now_parser_tree_ir->stage = current_stage;
					now_parser_tree_ir->prev_parallel = inst_stage.parallel;
					now_parser_tree_ir->prev_stage = inst_stage.stage;
					break;
				case PARSER_IR_FLAG_LOAD:
					line_buf = charalloc(now_parser_tree_ir->load.name);

					// getelementptr
					get_token_llvm(line_buf, token);
					if(!strcmp(token, "getelementptr")){
						// inbounds
						get_token_llvm(line_buf, token);

						inst_stage = search_args_llvm(now_parser_tree_ir, now_parser_tree_ir->label, line_buf);
						if((current_parallel > inst_stage.parallel) || (current_stage > inst_stage.stage)){
							current_parallel++;
						}
					}else{
						inst_stage = search_reg_llvm(now_parser_tree_ir, now_parser_tree_ir->label, token, "");
					}
					free(line_buf);
					proc_stage = search_proc_llvm(now_parser_tree_ir, now_parser_tree_ir->flag);

					if(inst_stage.stage >= proc_stage.stage){
							current_stage = inst_stage.stage;
					}else{
							current_stage = proc_stage.stage;
					}
					current_parallel = proc_stage.parallel;

					current_stage++;
					now_parser_tree_ir->parallel = current_parallel;
					now_parser_tree_ir->stage = current_stage;
					now_parser_tree_ir->prev_parallel = inst_stage.parallel;
					now_parser_tree_ir->prev_stage = inst_stage.stage;
					break;
				case PARSER_IR_FLAG_SELECT:
					inst_stage = search_reg_llvm(now_parser_tree_ir, now_parser_tree_ir->label, now_parser_tree_ir->select.condition_value, "");
					if((current_parallel > inst_stage.parallel) || (current_stage > inst_stage.stage)){
						current_parallel++;
					}
					current_stage = inst_stage.stage;
					current_stage++;
					now_parser_tree_ir->parallel = current_parallel;
					now_parser_tree_ir->stage = current_stage;
					now_parser_tree_ir->prev_parallel = inst_stage.parallel;
					now_parser_tree_ir->prev_stage = inst_stage.stage;
					break;
				case PARSER_IR_FLAG_LABEL:
					inst_stage = search_maxstage_llvm(now_parser_tree_ir);
					current_stage = inst_stage.stage;
					current_stage++;
					now_parser_tree_ir->parallel = current_parallel;
					now_parser_tree_ir->stage = current_stage;
					now_parser_tree_ir->prev_parallel = inst_stage.parallel;
					now_parser_tree_ir->prev_stage = inst_stage.stage;
					break;
				case PARSER_IR_FLAG_BRANCH:
					inst_stage = search_reg_llvm(now_parser_tree_ir, now_parser_tree_ir->label, now_parser_tree_ir->branch.condition_value, "");
					if((current_parallel > inst_stage.parallel) || (current_stage > inst_stage.stage)){
						current_parallel++;
					}
					proc_stage = search_proc_llvm(now_parser_tree_ir, now_parser_tree_ir->flag);

					if(inst_stage.stage >= proc_stage.stage){
							current_stage = inst_stage.stage;
					}else{
							current_stage = proc_stage.stage;
					}
					current_parallel = proc_stage.parallel;

					current_stage++;
					now_parser_tree_ir->parallel = current_parallel;
					now_parser_tree_ir->stage = current_stage;
					now_parser_tree_ir->prev_parallel = inst_stage.parallel;
					now_parser_tree_ir->prev_stage = inst_stage.stage;
					break;
				case PARSER_IR_FLAG_TYPE:
				case PARSER_IR_FLAG_ARRAY:
				case PARSER_IR_FLAG_RETURN:
				case PARSER_IR_FLAG_ALLOCA:
				case PARSER_IR_FLAG_CLOSE:
					now_parser_tree_ir->prev_parallel = current_parallel;
					now_parser_tree_ir->prev_stage = current_stage;
					current_stage++;
					now_parser_tree_ir->parallel = current_parallel;
					now_parser_tree_ir->stage = current_stage;
					break;
				case PARSER_IR_FLAG_NONE:
				case PARSER_IR_FLAG_UNKNOWN:
					break;
				default:
					printf("Unknown(can't parser: %d)\n", now_parser_tree_ir->flag);
					break;
			}

		}
        now_parser_tree_ir = now_parser_tree_ir->next_ptr;
    }

    free(token);
    free(init_name);
    free(next_name);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x10(%rbp)
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x40(%rbp)
movl $0x400, %edi            # imm = 0x400
movl $0x1, %esi
callq 0x10c0
movq %rax, -0x48(%rbp)
leaq 0xd051(%rip), %rdi      # 0x13621
movb $0x0, %al
callq 0x1090
movq 0x11b32(%rip), %rax     # 0x18110
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x6f86
cmpl $0x0, -0x18(%rbp)
jne 0x6624
movq -0x8(%rbp), %rax
cmpl $0xf, 0x10(%rax)
jne 0x660b
movl $0x1, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x6f75
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq %rax, -0xe0(%rbp)
subq $0x14, %rax
ja 0x6f5e
movq -0xe0(%rbp), %rax
leaq 0xcb12(%rip), %rcx      # 0x1315c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x6f73
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x8(%rbp), %rdx
addq $0x2830, %rdx           # imm = 0x2830
addq $0x804, %rdx            # imm = 0x804
movq -0x8(%rbp), %rcx
addq $0x2830, %rcx           # imm = 0x2830
addq $0x1004, %rcx           # imm = 0x1004
callq 0x6190
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x66a9
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x66b2
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x6f73
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x8(%rbp), %rdx
addq $0x2830, %rdx           # imm = 0x2830
addq $0x804, %rdx            # imm = 0x804
movq -0x8(%rbp), %rcx
addq $0x2830, %rcx           # imm = 0x2830
addq $0x1004, %rcx           # imm = 0x1004
callq 0x6190
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x673f
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x6748
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x6f73
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x8(%rbp), %rdx
addq $0x1c30, %rdx           # imm = 0x1C30
addq $0x800, %rdx            # imm = 0x800
callq 0x6350
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x67ba
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x67c3
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x6480
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x2c(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0x67ef
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x67f5
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x6f73
movq -0x8(%rbp), %rdi
addq $0xb034, %rdi           # imm = 0xB034
addq $0x400, %rdi            # imm = 0x400
callq 0x13b0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x11ca0
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x11ca0
movq -0x10(%rbp), %rdi
callq 0x6fb0
cmpl $0x0, %eax
je 0x68b7
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x10(%rbp), %rdx
leaq 0xe736(%rip), %rcx      # 0x14fc1
callq 0x6190
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x68ac
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x68b5
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x68b7
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x6480
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x2c(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0x68e3
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x68e9
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x11ca0
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x11ca0
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x11ca0
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x11ca0
movq -0x38(%rbp), %rdi
callq 0x1070
cmpq $0x0, %rax
ja 0x684c
movq -0x38(%rbp), %rdi
callq 0x1030
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x6f73
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x8(%rbp), %rdx
addq $0x2830, %rdx           # imm = 0x2830
addq $0x804, %rdx            # imm = 0x804
movq -0x8(%rbp), %rcx
addq $0x2830, %rcx           # imm = 0x2830
addq $0x1004, %rcx           # imm = 0x1004
callq 0x6190
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x69c6
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x69cf
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x6480
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x2c(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0x6a01
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x6a07
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x6f73
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x8(%rbp), %rdx
addq $0x9834, %rdx           # imm = 0x9834
addq $0xc00, %rdx            # imm = 0xC00
movq -0x8(%rbp), %rcx
addq $0x9834, %rcx           # imm = 0x9834
addq $0x1400, %rcx           # imm = 0x1400
callq 0x6190
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x6a9a
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x6aa3
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x6f73
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x8(%rbp), %rdx
addq $0x7c34, %rdx           # imm = 0x7C34
addq $0x800, %rdx            # imm = 0x800
movq -0x8(%rbp), %rcx
addq $0x7c34, %rcx           # imm = 0x7C34
addq $0x1000, %rcx           # imm = 0x1000
callq 0x6190
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
addq $0x7c34, %rdi           # imm = 0x7C34
addq $0x1800, %rdi           # imm = 0x1800
callq 0x13b0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x25b0
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x25b0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x10(%rbp), %rdx
leaq 0xe44f(%rip), %rcx      # 0x14fc1
callq 0x6190
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x2c(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x11ca0
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x6ba4
movl -0x28(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x6ba6
movq -0x10(%rbp), %rdi
leaq 0xdee4(%rip), %rsi      # 0x14a95
callq 0x10d0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xe1(%rbp)
jne 0x6bdb
movq -0x38(%rbp), %rdi
callq 0x1070
cmpq $0x0, %rax
seta %al
movb %al, -0xe1(%rbp)
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x6b41
movq -0x38(%rbp), %rdi
callq 0x1030
movl -0x20(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0x6c02
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x6c08
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x6f73
movq -0x8(%rbp), %rdi
addq $0x7434, %rdi           # imm = 0x7434
addq $0x400, %rdi            # imm = 0x400
callq 0x13b0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x11ca0
movq -0x10(%rbp), %rdi
leaq 0xc54b(%rip), %rsi      # 0x131c2
callq 0x10d0
cmpl $0x0, %eax
jne 0x6cd0
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x11ca0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x38(%rbp), %rdx
callq 0x6350
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x6cc5
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x6cce
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6cfe
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x10(%rbp), %rdx
leaq 0xe2da(%rip), %rcx      # 0x14fc1
callq 0x6190
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x24(%rbp)
movq -0x38(%rbp), %rdi
callq 0x1030
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x6480
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x2c(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0x6d39
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x6d3f
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x6f73
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x8(%rbp), %rdx
addq $0x5434, %rdx           # imm = 0x5434
addq $0x400, %rdx            # imm = 0x400
leaq 0xe221(%rip), %rcx      # 0x14fc1
callq 0x6190
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x6dc7
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x6dd0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x6f73
movq -0x8(%rbp), %rdi
callq 0x6510
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x24(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x6f73
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x8(%rbp), %rdx
addq $0x4434, %rdx           # imm = 0x4434
addq $0x400, %rdx            # imm = 0x400
leaq 0xe139(%rip), %rcx      # 0x14fc1
callq 0x6190
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x6eaf
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x6eb8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x6480
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x2c(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0x6eea
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x6ef0
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x6f73
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x6f73
jmp 0x6f73
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
leaq 0xd6f7(%rip), %rdi      # 0x14663
movb $0x0, %al
callq 0x1090
jmp 0x6f75
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x65e2
movq -0x10(%rbp), %rdi
callq 0x1030
movq -0x40(%rbp), %rdi
callq 0x1030
movq -0x48(%rbp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)