// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, -0x48(%rbp)
movl %edi, %ebx
callq 0x8bbb
callq 0x3809
callq 0x523d
callq 0x5e42
cmpl $0x1, %ebx
je 0x24168
leaq -0x1dbb2(%rip), %rdx    # 0x5e38
leaq -0x1bf71(%rip), %rcx    # 0x7a80
leaq -0xb8(%rbp), %rdi
movq %rdx, %rsi
movq %rcx, %r8
callq 0x55cc
cmpl $0x2, %ebx
jl 0x23d1f
movl %ebx, %edx
movl $0x1, %r14d
xorl %esi, %esi
xorl %r13d, %r13d
movq $0x0, -0x50(%rbp)
xorl %r12d, %r12d
xorl %r15d, %r15d
movq $0x0, -0x58(%rbp)
movl %ebx, -0x30(%rbp)
movslq %r14d, %rax
movq -0x48(%rbp), %rcx
movq (%rcx,%rax,8), %rbx
cmpb $0x2d, (%rbx)
jne 0x23b06
movq %rsi, -0x38(%rbp)
movq %rbx, %rdi
leaq 0x24f58(%rip), %rsi     # 0x489ac
callq 0x30d0
testl %eax, %eax
je 0x23b17
movq %rbx, %rdi
leaq 0x25001(%rip), %rsi     # 0x48a6c
callq 0x30d0
testl %eax, %eax
je 0x23b72
movq %rbx, %rdi
leaq 0x25037(%rip), %rsi     # 0x48ab9
callq 0x30d0
testl %eax, %eax
je 0x23ba4
movq %rbx, %rdi
leaq 0x250f2(%rip), %rsi     # 0x48b8b
callq 0x30d0
testl %eax, %eax
je 0x23c1d
movq %rbx, %rdi
leaq 0x2518f(%rip), %rsi     # 0x48c3f
callq 0x30d0
testl %eax, %eax
je 0x23ca3
movq %rbx, %rdi
leaq 0x2517d(%rip), %rsi     # 0x48c44
callq 0x30d0
testl %eax, %eax
jne 0x24151
cmpq $0x0, -0x58(%rbp)
movq -0x38(%rbp), %rsi
movl -0x30(%rbp), %edx
jne 0x24174
incl %r14d
cmpl %edx, %r14d
jge 0x2417d
movslq %r14d, %rax
movq -0x48(%rbp), %rcx
movq (%rcx,%rax,8), %rax
movq %rax, -0x58(%rbp)
jmp 0x23c92
testq %rsi, %rsi
jne 0x240b2
movq %rbx, %rsi
jmp 0x23c92
testq %r13, %r13
jne 0x240c3
incl %r14d
cmpl -0x30(%rbp), %r14d
jge 0x240cf
movslq %r14d, %rax
movq -0x48(%rbp), %rcx
movq (%rcx,%rax,8), %rbx
movq %rbx, %rdi
leaq 0x268cc(%rip), %rsi     # 0x4a40e
callq 0x30d0
testl %eax, %eax
je 0x23c14
movq %rbx, %r13
movq %rbx, %rdi
leaq 0x268c6(%rip), %rsi     # 0x4a422
callq 0x30d0
testl %eax, %eax
jne 0x24101
movq -0x38(%rbp), %rsi
jmp 0x23c8f
cmpq $0x0, -0x50(%rbp)
jne 0x240e2
incl %r14d
movl -0x30(%rbp), %edx
cmpl %edx, %r14d
movq -0x38(%rbp), %rsi
jge 0x240ee
movslq %r14d, %rax
movq -0x48(%rbp), %rcx
movq (%rcx,%rax,8), %rax
movq %rax, -0x50(%rbp)
jmp 0x23c92
testq %r12, %r12
jne 0x24110
incl %r14d
cmpl -0x30(%rbp), %r14d
jge 0x24119
movslq %r14d, %rax
movq -0x48(%rbp), %rcx
movq (%rcx,%rax,8), %r12
movq %r12, %rdi
leaq 0x24f2f(%rip), %rsi     # 0x48afe
callq 0x30d0
testl %eax, %eax
je 0x23b69
movq %r12, %rdi
leaq 0x24f24(%rip), %rsi     # 0x48b06
callq 0x30d0
testl %eax, %eax
je 0x23b69
movq %r12, -0x40(%rbp)
movq %r12, %rdi
leaq 0x24f12(%rip), %rsi     # 0x48b0f
callq 0x30d0
testl %eax, %eax
jne 0x241ab
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %r12
jmp 0x23c8f
movq -0x38(%rbp), %rsi
movq %rbx, %r13
jmp 0x23c8f
testq %r15, %r15
jne 0x2418d
incl %r14d
cmpl -0x30(%rbp), %r14d
jge 0x2419b
movslq %r14d, %rax
movq -0x48(%rbp), %rcx
movq (%rcx,%rax,8), %r15
movq %r15, %rdi
leaq 0x1d6ea(%rip), %rsi     # 0x41332
callq 0x30d0
testl %eax, %eax
je 0x23b69
movq %r15, %rdi
leaq 0x24f71(%rip), %rsi     # 0x48bd0
callq 0x30d0
testl %eax, %eax
je 0x23b69
movq %r15, -0x40(%rbp)
movq %r15, %rdi
leaq 0x24f5d(%rip), %rsi     # 0x48bd7
callq 0x30d0
testl %eax, %eax
jne 0x241fe
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %r15
movl -0x30(%rbp), %edx
incl %r14d
cmpl %edx, %r14d
jl 0x23a32
jmp 0x23d3a
leal 0x1(%r14), %eax
movl -0x30(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2413e
addl $0x2, %r14d
cmpl %ecx, %r14d
jge 0x2413e
cltq
movq -0x48(%rbp), %rcx
movq (%rcx,%rax,8), %rdi
movslq %r14d, %rax
movq (%rcx,%rax,8), %rax
movq %rax, -0x40(%rbp)
callq 0x7964
movq %rax, %rbx
movq -0x40(%rbp), %rdi
callq 0x7964
movq %rax, -0x40(%rbp)
leaq -0xb8(%rbp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x5935
leaq -0xb8(%rbp), %rdi
movq %rbx, %rsi
movq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq 0x5738
jmp 0x23b69
movq $0x0, -0x58(%rbp)
xorl %r15d, %r15d
xorl %r12d, %r12d
movq $0x0, -0x50(%rbp)
xorl %r13d, %r13d
xorl %esi, %esi
movq %rsi, -0x38(%rbp)
testq %rsi, %rsi
je 0x2412c
testq %r13, %r13
leaq 0x266bd(%rip), %r14     # 0x4a40e
cmovneq %r13, %r14
movq -0x50(%rbp), %rax
testq %rax, %rax
leaq 0x20157(%rip), %rcx     # 0x43eba
cmoveq %rcx, %rax
movq %rax, -0x50(%rbp)
testq %r12, %r12
leaq 0x24d89(%rip), %rax     # 0x48afe
cmovneq %r12, %rax
movq %rax, -0x30(%rbp)
testq %r15, %r15
leaq 0x24e49(%rip), %rbx     # 0x48bd0
cmovneq %r15, %rbx
leaq 0x24f7b(%rip), %rdi     # 0x48d0d
callq 0x7964
movq %rax, %r13
callq 0x792a
movq %rax, %r12
leaq 0x2b071(%rip), %rsi     # 0x4ee1a
movq %rax, %rdi
movq %r14, -0x48(%rbp)
movq %r14, %rdx
xorl %eax, %eax
callq 0x7b31
leaq -0xb8(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x5935
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x5738
leaq 0x24f26(%rip), %rdi     # 0x48d16
callq 0x7964
movq %rax, %r12
callq 0x792a
movq %rax, %r13
movq %rax, %rdi
leaq 0x2b010(%rip), %rsi     # 0x4ee1a
movq %rbx, -0x40(%rbp)
movq %rbx, %rdx
xorl %eax, %eax
callq 0x7b31
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x5935
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movl $0x1, %ecx
callq 0x5738
leaq -0x5c(%rbp), %rsi
movl $0x0, (%rsi)
movq -0x38(%rbp), %rdi
callq 0x97b5
testq %rax, %rax
je 0x24135
movq %rax, %r15
movq -0x58(%rbp), %r13
testq %r13, %r13
je 0x23e8f
leaq 0x24ecb(%rip), %rsi     # 0x48d3a
movq %r13, %rdi
callq 0x3130
movq %rax, %r14
testq %rax, %rax
movq -0x48(%rbp), %rbx
jne 0x23e9d
leaq 0x24eb2(%rip), %rdi     # 0x48d3c
jmp 0x24108
movq 0x35142(%rip), %rax     # 0x58fd8
movq (%rax), %r14
movq -0x48(%rbp), %rbx
leaq -0x70(%rbp), %r12
movq %r12, %rdi
callq 0x7548
movl -0x5c(%rbp), %ecx
movq %r12, (%rsp)
leaq -0xb8(%rbp), %r12
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %r15, %rdx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x3df20
movq %r15, %rdi
callq 0x3190
movl $0x1, %r15d
movq %r12, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x56aa
leaq 0x24c1b(%rip), %rsi     # 0x48b0f
movq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x30d0
testl %eax, %eax
je 0x23fa3
leaq 0x264ff(%rip), %rsi     # 0x4a40e
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
je 0x23f38
leaq 0x26500(%rip), %rsi     # 0x4a422
movq %rbx, %rdi
callq 0x30d0
movl $0x2, %r15d
testl %eax, %eax
jne 0x241b4
movq -0x68(%rbp), %rax
testq %rax, %rax
leaq 0x1ff74(%rip), %rsi     # 0x43eba
cmovneq %rax, %rsi
movl -0x6c(%rbp), %edx
movq -0x38(%rbp), %rdi
movl %r15d, %ecx
callq 0x245b3
movq %rax, %rbx
movq %rax, %rdi
callq 0x246a1
movq %rbx, %rdi
callq 0x2a42c
leaq 0x24b8b(%rip), %rsi     # 0x48afe
movq %r12, %rdi
callq 0x30d0
testl %eax, %eax
je 0x23ff6
leaq 0x24b80(%rip), %rsi     # 0x48b06
movq %r12, %rdi
callq 0x30d0
testl %eax, %eax
jne 0x241d3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24c34
jmp 0x23fbf
movq -0x68(%rbp), %rax
testq %rax, %rax
leaq 0x1ff09(%rip), %rdi     # 0x43eba
cmovneq %rax, %rdi
movq %r14, %rsi
callq 0x30b0
xorl %ebx, %ebx
leaq -0x70(%rbp), %rdi
callq 0x7a38
testq %r13, %r13
je 0x23fd5
movq %r14, %rdi
callq 0x3060
testq %rbx, %rbx
je 0x23fe2
movq %rbx, %rdi
callq 0x2465e
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24bd3(%rip), %rsi     # 0x48bd0
movq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x30d0
testl %eax, %eax
je 0x24060
leaq 0x1d31e(%rip), %rsi     # 0x41332
movq %r15, %rdi
callq 0x30d0
testl %eax, %eax
je 0x24089
leaq 0x24bb0(%rip), %rsi     # 0x48bd7
movq %r15, %rdi
callq 0x30d0
testl %eax, %eax
jne 0x24210
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc284
movq %r14, %r15
movq %rax, %r14
movq %rax, %rdi
callq 0xba5c
movq %r14, %rdi
movq %r15, %r14
callq 0xc3a5
jmp 0x23fbf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18fd7
movq %r14, %r15
movq %rax, %r14
movq %rax, %rdi
callq 0x183b8
movq %r14, %rdi
movq %r15, %r14
callq 0x190f8
jmp 0x23fbf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x14792
movq %r14, %r15
movq %rax, %r14
movq %rax, %rdi
callq 0x140f8
movq %r14, %rdi
movq %r15, %r14
callq 0x1484c
jmp 0x23fbf
leaq 0x24bf2(%rip), %rdi     # 0x48cab
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2424a
leaq 0x248e8(%rip), %rdi     # 0x489b2
jmp 0x24194
leaq 0x2491d(%rip), %rdi     # 0x489f3
leaq 0x248cf(%rip), %rsi     # 0x489ac
jmp 0x24209
leaq 0x2498c(%rip), %rdi     # 0x48a75
jmp 0x24194
leaq 0x248fe(%rip), %rdi     # 0x489f3
leaq 0x24970(%rip), %rsi     # 0x48a6c
jmp 0x24209
leaq 0x24910(%rip), %rdi     # 0x48a18
movq %r13, %rsi
jmp 0x24209
leaq 0x249aa(%rip), %rdi     # 0x48ac1
jmp 0x24194
leaq 0x248d3(%rip), %rdi     # 0x489f3
leaq 0x24992(%rip), %rsi     # 0x48ab9
jmp 0x24209
leaq 0x24bb8(%rip), %rdi     # 0x48ceb
jmp 0x24194
leaq 0x24be5(%rip), %rdi     # 0x48d21
jmp 0x24194
leaq 0x248ae(%rip), %rdi     # 0x489f3
leaq 0x24af3(%rip), %rsi     # 0x48c3f
jmp 0x24209
leaq 0x24b31(%rip), %rsi     # 0x48c89
movq %rbx, %rdi
callq 0x30d0
testl %eax, %eax
jne 0x241f2
callq 0x2422f
xorl %edi, %edi
callq 0x3160
leaq 0x24ad1(%rip), %rdi     # 0x48c4c
jmp 0x24194
leaq 0x2486f(%rip), %rdi     # 0x489f3
leaq 0x24ab9(%rip), %rsi     # 0x48c44
jmp 0x24209
leaq 0x249ff(%rip), %rdi     # 0x48b93
xorl %eax, %eax
callq 0x2424a
leaq 0x24851(%rip), %rdi     # 0x489f3
leaq 0x249e2(%rip), %rsi     # 0x48b8b
jmp 0x24209
leaq 0x24968(%rip), %rdi     # 0x48b1a
jmp 0x24205
leaq 0x1c1c9(%rip), %rdi     # 0x40384
leaq 0x24ba8(%rip), %rsi     # 0x48d6a
leaq 0x24bba(%rip), %rcx     # 0x48d83
movl $0x125, %edx            # imm = 0x125
callq 0x30a0
leaq 0x1c1aa(%rip), %rdi     # 0x40384
leaq 0x24b89(%rip), %rsi     # 0x48d6a
leaq 0x24b9b(%rip), %rcx     # 0x48d83
movl $0x147, %edx            # imm = 0x147
callq 0x30a0
leaq 0x24a96(%rip), %rdi     # 0x48c8f
movq %rbx, %rsi
jmp 0x24209
leaq 0x249d7(%rip), %rdi     # 0x48bdc
movq -0x40(%rbp), %rsi
xorl %eax, %eax
callq 0x2424a
leaq 0x1c16d(%rip), %rdi     # 0x40384
leaq 0x24b4c(%rip), %rsi     # 0x48d6a
leaq 0x24b5e(%rip), %rcx     # 0x48d83
movl $0x141, %edx            # imm = 0x141
callq 0x30a0