// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/frontend/main.c
// Function: main
int main(int argc, char *argv[]) {
	ParserContext *ctx = NULL;

	char *opt_file = NULL;
	char *opt_arch = NULL;
	char *opt_incpath = NULL;
	char *opt_action = NULL;
	char *opt_target = NULL;
	char *opt_output = NULL;

	// 跑测试。
	_test();

	// 没有任何参数时直接打印帮助信息。
	if (argc == 1) {
		_help();
		exit(0);
	}

	Map defs;
	map_init(
		&defs,
		map_rstr_comparer, map_rstr_comparer,
		(MapReleaser) rstr_delete, (MapReleaser) rstr_delete
	);

	for (int i = 1; i < argc; i++) {
		#define	_NEXT_ARG(opt_name) { if (i + 1 < argc) { opt = argv[++i]; } else { _error("the option '%s' expects a parameter.", opt_name); } }

		char *opt = argv[i];

		if (*opt == '-') {
			if (strcmp(opt, _OPT_ARCH) == 0) {
				if (opt_arch != NULL) {
					_error("the architecture option '-arch' cannot be specified multi-times.");
				}
				_NEXT_ARG(_OPT_ARCH)
				opt_arch = opt;
				if (strcmp(opt_arch, _OPT_ARCH_32) != 0
						&& strcmp(opt_arch, _OPT_ARCH_64) != 0) {
					_error(
						"the option '-arch' is specified a invalid value '%s', maybe specify a '32' or '64'.",
						opt_arch
					);
				}
			} else if (strcmp(opt, _OPT_INCPATH) == 0) {
				if (opt_incpath != NULL) {
					_error("the include path option '-incpath' cannot be specified multi-times.");
				}
				_NEXT_ARG(_OPT_INCPATH)
				opt_incpath = opt;
			} else if (strcmp(opt, _OPT_ACTION) == 0) {
				if (opt_action != NULL) {
					_error("the action option '-action' cannot be specified multi-times.");
				}
				_NEXT_ARG(_OPT_ACTION)
				opt_action = opt;
				if (strcmp(opt_action, _OPT_ACTION_COMPILE) != 0
						&& strcmp(opt_action, _OPT_ACTION_PRINTAST) != 0
						&& strcmp(opt_action, _OPT_ACTION_PREPROCESS) != 0) {
					_error(
						"the option '-action' is specified a invalid value '%s', maybe specify a 'compile' or 'printast' or 'preprocess'.",
						opt_action
					);
				}
			} else if (strcmp(opt, _OPT_TARGET) == 0) {
				if (opt_target != NULL) {
					_error("the target option '-target' cannot be specified multi-times.");
				}
				_NEXT_ARG(_OPT_TARGET)
				opt_target = opt;
				if (strcmp(opt_target, _OPT_TARGET_C) != 0
						&& strcmp(opt_target, _OPT_TARGET_LLVMIR) != 0
						&& strcmp(opt_target, _OPT_TARGET_ILIR) != 0) {
					_error(
						"the option '-target' is specified a invalid value '%s', maybe specify a 'c' or 'llvmir' or 'ilir'.",
						opt_target
					);
				}
			} else if (strcmp(opt, _OPT_DEF) == 0) {
				_NEXT_ARG(_OPT_DEF)
				const char *name = opt;
				_NEXT_ARG(_OPT_DEF)
				const char *value = opt;

				ResizableString *rstr_name = rstr_new_with_cstr(name);
				ResizableString *rstr_value = rstr_new_with_cstr(value);

				map_remove(&defs, rstr_name, true, true);
				map_set(&defs, rstr_name, rstr_value, true);
			} else if (strcmp(opt, _OPT_OUTPUT) == 0) {
				if (opt_output != NULL) {
					_error("the output option '-output' cannot be specified multi-times.");
				}
				_NEXT_ARG(_OPT_OUTPUT)
				opt_output = opt;
			} else if (strcmp(opt, _OPT_HELP) == 0) {
				_help();
				exit(0);
			} else {
				_error(
					"the option '%s' is invalid.",
					opt
				);
			}
		} else {
			if (opt_file != NULL) {
				_error(
					"the source file cannot be specified multi-times, '%s' and '%s'.",
					opt_file,
					opt
				);
			}
			opt_file = opt;
		}

		#undef	_NEXT_ARG
	}

	if (opt_file == NULL) {
		_error("the source file not be specified.");
	}
	if (opt_arch == NULL) {
		opt_arch = _OPT_ARCH_32;
	}
	if (opt_incpath == NULL) {
		opt_incpath = "";
	}
	if (opt_action == NULL) {
		opt_action = _OPT_ACTION_COMPILE;
	}
	if (opt_target == NULL) {
		opt_target = _OPT_TARGET_LLVMIR;
	}

	ResizableString *rstr_arch_name = rstr_new_with_cstr("__ARCH__");
	ResizableString *rstr_arch = rstr_new();
	rstr_appendf(rstr_arch, "\"%s\"", opt_arch);
	map_remove(&defs, rstr_arch_name, true, true);
	map_set(
		&defs,
		rstr_arch_name,
		rstr_arch,
		true
	);

	ResizableString *rstr_target_name = rstr_new_with_cstr("__TARGET__");
	ResizableString *rstr_target = rstr_new();
	rstr_appendf(rstr_target, "\"%s\"", opt_target);
	map_remove(&defs, rstr_target_name, true, true);
	map_set(
		&defs,
		rstr_target_name,
		rstr_target,
		true
	);

	// 读取源文件。
	const char *source = NULL;
	int len = 0;
	source = (const char *)util_get_file_content(opt_file, &len);
	if (source == NULL) {
		_error("cannot open source file.");
	}

	// 打开输出文件。
	FILE *output = stdout;
	if (opt_output != NULL) {
		output = fopen(opt_output, "w");
		if (output == NULL) {
			_error("cannot write target code to target file '%s'.", opt_output);
		}
	}

	// 预处理。
	ResizableString preprocessed_source;
	rstr_init(&preprocessed_source);
	pp_process(
		opt_file, opt_incpath, source, len, &defs, NULL, &preprocessed_source
	);
	free((void *)source);

	map_free(&defs, true, true);

	if (strcmp(opt_action, _OPT_ACTION_PREPROCESS) == 0) {
		fputs(RSTR_CSTR(&preprocessed_source), output);
		goto _end;
	}

	// 语法解析。
	int arch = FE_ARCH_32;
	if (strcmp(opt_arch, _OPT_ARCH_32) == 0) {
		arch = FE_ARCH_32;
	} else if (strcmp(opt_arch, _OPT_ARCH_64) == 0) {
		arch = FE_ARCH_64;
	} else {
		assert(0);
	}
	ctx = fe_parser_new_context(
		opt_file, RSTR_CSTR(&preprocessed_source), RSTR_LEN(&preprocessed_source), arch
	);
	fe_parser_parse(ctx);

	// 语义解析。
	fe_sem_process(ctx);
	
	// 执行操作（编译、打印AST）。
	if (strcmp(opt_action, _OPT_ACTION_COMPILE) == 0) {
		if (strcmp(opt_target, _OPT_TARGET_LLVMIR) == 0) {
			// 输出LLVM IR。
			IRGeneratorLlvmirContext *irgen_ctx = fe_irgen_llvmir_new_context(ctx, output);
			fe_irgen_llvmir_generate(irgen_ctx);
			fe_irgen_llvmir_free_context(irgen_ctx);
		} else if (strcmp(opt_target, _OPT_TARGET_C) == 0) {
			// 输出C。
			IRGeneratorCContext *irgen_ctx = fe_irgen_c_new_context(ctx, output);
			fe_irgen_c_generate(irgen_ctx);
			fe_irgen_c_free_context(irgen_ctx);
		} else if (strcmp(opt_target, _OPT_TARGET_ILIR) == 0) {
			// 输出到ILIR。
			IRGeneratorContext *irgen_ctx = fe_irgen_new_context(ctx, output);
			fe_irgen_generate(irgen_ctx);
			fe_irgen_free_context(irgen_ctx);
		} else {
			assert(0);
		}
	} else if (strcmp(opt_action, _OPT_ACTION_PRINTAST) == 0) {
		// 打印语法树。
		fe_parser_print_ast(ctx, output);
	} else {
		assert(0);
	}
	
	// 释放资源。
_end:
	rstr_free(&preprocessed_source);
	if (opt_output != NULL) {
		fclose(output);
	}
	if (ctx != NULL) {
		fe_parser_free_context(ctx);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
callq 0x41e60
cmpl $0x1, -0x8(%rbp)
jne 0x413e8
callq 0x41e80
xorl %edi, %edi
callq 0x3170
leaq -0x90(%rbp), %rdi
leaq -0x3a4a6(%rip), %rdx    # 0x6f50
leaq -0x3806d(%rip), %r8     # 0x9390
movq %rdx, %rsi
movq %r8, %rcx
callq 0x6200
movl $0x1, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x41970
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x4192f
movq -0xa0(%rbp), %rdi
leaq 0x3a0ea(%rip), %rsi     # 0x7b542
callq 0x30e0
cmpl $0x0, %eax
jne 0x4150d
cmpq $0x0, -0x28(%rbp)
je 0x4147b
leaq 0x3a0d4(%rip), %rdi     # 0x7b548
movb $0x0, %al
callq 0x41eb0
movl -0x94(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0x414ac
movq -0x10(%rbp), %rax
movl -0x94(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x94(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
jmp 0x414c1
leaq 0x3a0d6(%rip), %rdi     # 0x7b589
leaq 0x3a088(%rip), %rsi     # 0x7b542
movb $0x0, %al
callq 0x41eb0
movq -0xa0(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x3ba3b(%rip), %rsi     # 0x7cf12
callq 0x30e0
cmpl $0x0, %eax
je 0x41508
movq -0x28(%rbp), %rdi
leaq 0x3ba3a(%rip), %rsi     # 0x7cf26
callq 0x30e0
cmpl $0x0, %eax
je 0x41508
movq -0x28(%rbp), %rsi
leaq 0x3a0ad(%rip), %rdi     # 0x7b5ae
movb $0x0, %al
callq 0x41eb0
jmp 0x4192d
movq -0xa0(%rbp), %rdi
leaq 0x3a0e7(%rip), %rsi     # 0x7b602
callq 0x30e0
cmpl $0x0, %eax
jne 0x41590
cmpq $0x0, -0x30(%rbp)
je 0x4153a
leaq 0x3a0d8(%rip), %rdi     # 0x7b60b
movb $0x0, %al
callq 0x41eb0
movl -0x94(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0x4156b
movq -0x10(%rbp), %rax
movl -0x94(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x94(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
jmp 0x41580
leaq 0x3a017(%rip), %rdi     # 0x7b589
leaq 0x3a089(%rip), %rsi     # 0x7b602
movb $0x0, %al
callq 0x41eb0
movq -0xa0(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x4192b
movq -0xa0(%rbp), %rdi
leaq 0x3a0b1(%rip), %rsi     # 0x7b64f
callq 0x30e0
cmpl $0x0, %eax
jne 0x41668
cmpq $0x0, -0x38(%rbp)
je 0x415c1
leaq 0x3a09d(%rip), %rdi     # 0x7b657
movb $0x0, %al
callq 0x41eb0
movl -0x94(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0x415f2
movq -0x10(%rbp), %rax
movl -0x94(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x94(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
jmp 0x41607
leaq 0x39f90(%rip), %rdi     # 0x7b589
leaq 0x3a04f(%rip), %rsi     # 0x7b64f
movb $0x0, %al
callq 0x41eb0
movq -0xa0(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
leaq 0x3a077(%rip), %rsi     # 0x7b694
callq 0x30e0
cmpl $0x0, %eax
je 0x41663
movq -0x38(%rbp), %rdi
leaq 0x3a06a(%rip), %rsi     # 0x7b69c
callq 0x30e0
cmpl $0x0, %eax
je 0x41663
movq -0x38(%rbp), %rdi
leaq 0x3a05e(%rip), %rsi     # 0x7b6a5
callq 0x30e0
cmpl $0x0, %eax
je 0x41663
movq -0x38(%rbp), %rsi
leaq 0x3a054(%rip), %rdi     # 0x7b6b0
movb $0x0, %al
callq 0x41eb0
jmp 0x41929
movq -0xa0(%rbp), %rdi
leaq 0x3a0ab(%rip), %rsi     # 0x7b721
callq 0x30e0
cmpl $0x0, %eax
jne 0x41740
cmpq $0x0, -0x40(%rbp)
je 0x41699
leaq 0x3a097(%rip), %rdi     # 0x7b729
movb $0x0, %al
callq 0x41eb0
movl -0x94(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0x416ca
movq -0x10(%rbp), %rax
movl -0x94(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x94(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
jmp 0x416df
leaq 0x39eb8(%rip), %rdi     # 0x7b589
leaq 0x3a049(%rip), %rsi     # 0x7b721
movb $0x0, %al
callq 0x41eb0
movq -0xa0(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
leaq 0x31cfb(%rip), %rsi     # 0x733f0
callq 0x30e0
cmpl $0x0, %eax
je 0x4173b
movq -0x40(%rbp), %rdi
leaq 0x3a05c(%rip), %rsi     # 0x7b766
callq 0x30e0
cmpl $0x0, %eax
je 0x4173b
movq -0x40(%rbp), %rdi
leaq 0x3a04e(%rip), %rsi     # 0x7b76d
callq 0x30e0
cmpl $0x0, %eax
je 0x4173b
movq -0x40(%rbp), %rsi
leaq 0x3a03e(%rip), %rdi     # 0x7b772
movb $0x0, %al
callq 0x41eb0
jmp 0x41927
movq -0xa0(%rbp), %rdi
leaq 0x3a087(%rip), %rsi     # 0x7b7d5
callq 0x30e0
cmpl $0x0, %eax
jne 0x41868
movl -0x94(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0x4178d
movq -0x10(%rbp), %rax
movl -0x94(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x94(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
jmp 0x417a2
leaq 0x39df5(%rip), %rdi     # 0x7b589
leaq 0x3a03a(%rip), %rsi     # 0x7b7d5
movb $0x0, %al
callq 0x41eb0
movq -0xa0(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl -0x94(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0x417e1
movq -0x10(%rbp), %rax
movl -0x94(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x94(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
jmp 0x417f6
leaq 0x39da1(%rip), %rdi     # 0x7b589
leaq 0x39fe6(%rip), %rsi     # 0x7b7d5
movb $0x0, %al
callq 0x41eb0
movq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rdi
callq 0x9210
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x9210
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rsi
leaq -0x90(%rbp), %rdi
movl $0x1, %ecx
movl %ecx, %edx
callq 0x67e0
movq -0xb8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
leaq -0x90(%rbp), %rdi
movl $0x1, %ecx
callq 0x6450
jmp 0x41925
movq -0xa0(%rbp), %rdi
leaq 0x39f64(%rip), %rsi     # 0x7b7da
callq 0x30e0
cmpl $0x0, %eax
jne 0x418e8
cmpq $0x0, -0x48(%rbp)
je 0x41895
leaq 0x39f54(%rip), %rdi     # 0x7b7e2
movb $0x0, %al
callq 0x41eb0
movl -0x94(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0x418c6
movq -0x10(%rbp), %rax
movl -0x94(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x94(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xa0(%rbp)
jmp 0x418db
leaq 0x39cbc(%rip), %rdi     # 0x7b589
leaq 0x39f06(%rip), %rsi     # 0x7b7da
movb $0x0, %al
callq 0x41eb0
movq -0xa0(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x41923
movq -0xa0(%rbp), %rdi
leaq 0x39f29(%rip), %rsi     # 0x7b81f
callq 0x30e0
cmpl $0x0, %eax
jne 0x4190c
callq 0x41e80
xorl %edi, %edi
callq 0x3170
movq -0xa0(%rbp), %rsi
leaq 0x39f0b(%rip), %rdi     # 0x7b825
movb $0x0, %al
callq 0x41eb0
jmp 0x41923
jmp 0x41925
jmp 0x41927
jmp 0x41929
jmp 0x4192b
jmp 0x4192d
jmp 0x4195a
cmpq $0x0, -0x20(%rbp)
je 0x4194f
movq -0x20(%rbp), %rsi
movq -0xa0(%rbp), %rdx
leaq 0x39ef9(%rip), %rdi     # 0x7b841
movb $0x0, %al
callq 0x41eb0
movq -0xa0(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x4195c
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x41412
cmpq $0x0, -0x20(%rbp)
jne 0x41985
leaq 0x39f03(%rip), %rdi     # 0x7b881
movb $0x0, %al
callq 0x41eb0
cmpq $0x0, -0x28(%rbp)
jne 0x41997
leaq 0x3b57f(%rip), %rax     # 0x7cf12
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x419a9
leaq 0x35f10(%rip), %rax     # 0x778b5
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x419bb
leaq 0x39cdd(%rip), %rax     # 0x7b694
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x419cd
leaq 0x39d9d(%rip), %rax     # 0x7b766
movq %rax, -0x40(%rbp)
leaq 0x39ecf(%rip), %rdi     # 0x7b8a3
callq 0x9210
movq %rax, -0xc8(%rbp)
callq 0x91e0
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x405cb(%rip), %rsi     # 0x81fc9
movb $0x0, %al
callq 0x94d0
movq -0xc8(%rbp), %rsi
leaq -0x90(%rbp), %rdi
movl $0x1, %ecx
movl %ecx, %edx
callq 0x67e0
movq -0xc8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
leaq -0x90(%rbp), %rdi
movl $0x1, %ecx
callq 0x6450
leaq 0x39e67(%rip), %rdi     # 0x7b8ac
callq 0x9210
movq %rax, -0xd8(%rbp)
callq 0x91e0
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0x4055a(%rip), %rsi     # 0x81fc9
movb $0x0, %al
callq 0x94d0
movq -0xd8(%rbp), %rsi
leaq -0x90(%rbp), %rdi
movl $0x1, %ecx
movl %ecx, %edx
callq 0x67e0
movq -0xd8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
leaq -0x90(%rbp), %rdi
movl $0x1, %ecx
callq 0x6450
movq $0x0, -0xe8(%rbp)
movl $0x0, -0xec(%rbp)
movq -0x20(%rbp), %rdi
leaq -0xec(%rbp), %rsi
callq 0xb9b0
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0xe8(%rbp)
jne 0x41af3
leaq 0x39dcb(%rip), %rdi     # 0x7b8b7
movb $0x0, %al
callq 0x41eb0
movq 0x4b4de(%rip), %rax     # 0x8cfd8
movq (%rax), %rax
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x41b40
movq -0x48(%rbp), %rdi
leaq 0x39dba(%rip), %rsi     # 0x7b8d0
callq 0x3140
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0xf8(%rbp)
jne 0x41b3e
movq -0x48(%rbp), %rsi
leaq 0x39d9b(%rip), %rdi     # 0x7b8d2
movb $0x0, %al
callq 0x41eb0
jmp 0x41b40
leaq -0x108(%rbp), %rdi
callq 0x8c90
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0xe8(%rbp), %rdx
movl -0xec(%rbp), %ecx
leaq -0x90(%rbp), %r8
xorl %eax, %eax
movl %eax, %r9d
leaq -0x108(%rbp), %rax
movq %rax, (%rsp)
callq 0x70070
movq -0xe8(%rbp), %rdi
callq 0x31a0
leaq -0x90(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0x6350
movq -0x38(%rbp), %rdi
leaq 0x39afe(%rip), %rsi     # 0x7b6a5
callq 0x30e0
cmpl $0x0, %eax
jne 0x41bf1
cmpq $0x0, -0x100(%rbp)
jne 0x41bcb
leaq 0x35cf3(%rip), %rax     # 0x778b5
movq %rax, -0x130(%rbp)
jmp 0x41bd9
movq -0x100(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x30b0
jmp 0x41e23
movl $0x1, -0x10c(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x3b30c(%rip), %rsi     # 0x7cf12
callq 0x30e0
cmpl $0x0, %eax
jne 0x41c1c
movl $0x1, -0x10c(%rbp)
jmp 0x41c5e
movq -0x28(%rbp), %rdi
leaq 0x3b2ff(%rip), %rsi     # 0x7cf26
callq 0x30e0
cmpl $0x0, %eax
jne 0x41c3d
movl $0x2, -0x10c(%rbp)
jmp 0x41c5c
leaq 0x30817(%rip), %rdi     # 0x7245b
leaq 0x39cb5(%rip), %rsi     # 0x7b900
movl $0x125, %edx            # imm = 0x125
leaq 0x39cc2(%rip), %rcx     # 0x7b919
callq 0x30a0
jmp 0x41c5e
movq -0x20(%rbp), %rax
movq %rax, -0x138(%rbp)
cmpq $0x0, -0x100(%rbp)
jne 0x41c83
leaq 0x35c3b(%rip), %rax     # 0x778b5
movq %rax, -0x140(%rbp)
jmp 0x41c91
movq -0x100(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x138(%rbp), %rdi
movq -0x140(%rbp), %rsi
movl -0x104(%rbp), %edx
movl -0x10c(%rbp), %ecx
callq 0x42310
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x42450
movq -0x18(%rbp), %rdi
callq 0x4cd00
movq -0x38(%rbp), %rdi
leaq 0x399c3(%rip), %rsi     # 0x7b694
callq 0x30e0
cmpl $0x0, %eax
jne 0x41dd9
movq -0x40(%rbp), %rdi
leaq 0x39a7c(%rip), %rsi     # 0x7b766
callq 0x30e0
cmpl $0x0, %eax
jne 0x41d28
movq -0x18(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x28150
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rdi
callq 0x27b70
movq -0x118(%rbp), %rdi
callq 0x28320
jmp 0x41dd7
movq -0x40(%rbp), %rdi
leaq 0x316bd(%rip), %rsi     # 0x733f0
callq 0x30e0
cmpl $0x0, %eax
jne 0x41d6e
movq -0x18(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x207d0
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rdi
callq 0x20510
movq -0x120(%rbp), %rdi
callq 0x20910
jmp 0x41dd5
movq -0x40(%rbp), %rdi
leaq 0x399f4(%rip), %rsi     # 0x7b76d
callq 0x30e0
cmpl $0x0, %eax
jne 0x41db4
movq -0x18(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0xf700
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rdi
callq 0xf290
movq -0x128(%rbp), %rdi
callq 0xf8d0
jmp 0x41dd3
leaq 0x306a0(%rip), %rdi     # 0x7245b
leaq 0x39b3e(%rip), %rsi     # 0x7b900
movl $0x141, %edx            # imm = 0x141
leaq 0x39b4b(%rip), %rcx     # 0x7b919
callq 0x30a0
jmp 0x41dd5
jmp 0x41dd7
jmp 0x41e21
movq -0x38(%rbp), %rdi
leaq 0x398b8(%rip), %rsi     # 0x7b69c
callq 0x30e0
cmpl $0x0, %eax
jne 0x41e00
movq -0x18(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x42600
jmp 0x41e1f
leaq 0x30654(%rip), %rdi     # 0x7245b
leaq 0x39af2(%rip), %rsi     # 0x7b900
movl $0x147, %edx            # imm = 0x147
leaq 0x39aff(%rip), %rcx     # 0x7b919
callq 0x30a0
jmp 0x41e21
jmp 0x41e23
leaq -0x108(%rbp), %rdi
callq 0x9310
cmpq $0x0, -0x48(%rbp)
je 0x41e42
movq -0xf8(%rbp), %rdi
callq 0x3060
cmpq $0x0, -0x18(%rbp)
je 0x41e52
movq -0x18(%rbp), %rdi
callq 0x42400
xorl %eax, %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopl (%rax)