// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/main.c
// Function: main
int main(int argc, char *argv[]) {

	error_clear();
	ferr = stdout; // ferr in Eclipse console not visible?

	tu58images_init();

	parse_commandline(argc, argv);
	// returns only if everything is OK
	// Std options already executed

	// some debug info
	if (opt_debug) {
		info(version);
		info(copyright);
	}

	// some warnings
	check_capabilities();

	// give some info
	info("Using serial port %s at %d baud with %d%c%d format.", opt_serial_port,
			opt_serial_speed, opt_serial_bitcount, opt_serial_parity, opt_serial_stopbits);

	if (drive_count == 0) {
		info("No simulated drives were specified, emulator not started.");
	} else {
		// emulation: must have opened at least one unit

		if (opt_mrspen)
			info("MRSP mode enabled (NOT fully tested - use with caution)");

		// setup serial and console ports
		serial_devinit(&tu58_serial, opt_serial_port, opt_serial_speed, opt_serial_bitcount,
				opt_serial_parity, opt_serial_stopbits);
		coninit(0); // normal without echo

		// start thread with tu58 emulator
		run_emulator();

		// restore serial and console ports
		conrestore();
		serial_devrestore(&tu58_serial);

		// write back unsaved files and close
		tu58images_closeall();
	}

	// boot loader?
	if (opt_boot_monitor == monitor_showcode) {
		bootloader_show_code(stdout, opt_boot_address);
	} else if (opt_boot_monitor != monitor_none) {
		int res;
		serial_device_t monitor_serial; // PDP-11 console
		serial_devinit(&monitor_serial, opt_serial_port, opt_serial_speed, opt_serial_bitcount,
				opt_serial_parity, opt_serial_stopbits);
		coninit(1); // host console, raw: no processing of PDP-11 I/O

		// download, and echo to console
		res = bootloader_download(&monitor_serial, opt_boot_monitor, opt_boot_address);
		if (!res)
			res = bootloader_go(&monitor_serial, opt_boot_monitor, opt_boot_address);
		// no error

		if (opt_boot_keep) {
			if (res) {
				run_teletype(&monitor_serial, opt_boot_monitor,
						"PDP-11 does not respond. Use this teletype session to verify console prompt.");
			} else
				// interactive tty terminal on PDP-11 monitor port
				run_teletype(&monitor_serial, opt_boot_monitor, NULL);
		}

		// restore serial and console ports
		conrestore();
		serial_devrestore(&monitor_serial);
	}
	return 0 ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2568, %rsp           # imm = 0x2568
movq %rsi, %rbx
movl %edi, %ebp
callq 0x9f84
movq 0x18489(%rip), %r13     # 0x1bfd0
movq (%r13), %rax
leaq 0x1a6ee(%rip), %rcx     # 0x1e240
movq %rax, (%rcx)
callq 0x6728
leaq 0x18f3f(%rip), %r14     # 0x1caa0
movq %r14, %rdi
movl $0x1, %esi
callq 0x50f4
movl $0x0, 0x18f28(%rip)     # 0x1caa0
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf31f(%rip), %rax      # 0x12eab
movq %rax, (%rsp)
leaq 0x130be(%rip), %rsi     # 0x16c55
leaq 0xf308(%rip), %rdx      # 0x12ea6
xorl %r12d, %r12d
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf2fa(%rip), %rax      # 0x12ebf
movq %rax, (%rsp)
leaq 0x12b16(%rip), %rsi     # 0x166e6
leaq 0xf2e0(%rip), %rdx      # 0x12eb7
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf2e5(%rip), %rax      # 0x12ee0
movq %rax, (%rsp)
leaq 0xf2d0(%rip), %rsi      # 0x12ed6
leaq 0xf2cd(%rip), %rdx      # 0x12eda
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf2d7(%rip), %rax      # 0x12f08
movq %rax, (%rsp)
leaq 0x133ba(%rip), %rsi     # 0x16ff6
leaq 0xf2bd(%rip), %rdx      # 0x12f00
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf2c9(%rip), %rax      # 0x12f30
movq %rax, (%rsp)
leaq 0x114af(%rip), %rsi     # 0x15121
leaq 0xf2b2(%rip), %rdx      # 0x12f2b
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf2c3(%rip), %rax      # 0x12f60
movq %rax, (%rsp)
leaq 0x13326(%rip), %rsi     # 0x16fce
leaq 0xf2aa(%rip), %rdx      # 0x12f59
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf2c3(%rip), %rax      # 0x12f96
movq %rax, (%rsp)
leaq 0x11b5e(%rip), %rsi     # 0x1583c
leaq 0xf2ad(%rip), %rdx      # 0x12f92
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf2d1(%rip), %rax      # 0x12fda
movq %rax, (%rsp)
leaq 0xf2b8(%rip), %rsi      # 0x12fcc
leaq 0xf2b4(%rip), %rdx      # 0x12fcf
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf2e2(%rip), %rax      # 0x13021
movq %rax, (%rsp)
leaq 0x1017f(%rip), %rsi     # 0x13ec9
leaq 0xf2bf(%rip), %rdx      # 0x13010
leaq 0xf2bf(%rip), %rcx      # 0x13017
movq %r14, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf326(%rip), %rax      # 0x130a0
movq %rax, (%rsp)
leaq 0x1324d(%rip), %rsi     # 0x16fd2
leaq 0xf305(%rip), %rcx      # 0x13091
leaq 0xf307(%rip), %r9       # 0x1309a
movq %r14, %rdi
movq %rcx, %rdx
xorl %r8d, %r8d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
leaq 0xf43d(%rip), %rax      # 0x131ed
movq %rax, 0x10(%rsp)
leaq 0xf42d(%rip), %rax      # 0x131e9
movq %rax, 0x8(%rsp)
leaq 0xf31b(%rip), %rax      # 0x130e3
movq %rax, (%rsp)
leaq 0xf2f9(%rip), %rsi      # 0x130cc
leaq 0x100ea(%rip), %rdx     # 0x13ec4
leaq 0xf2ed(%rip), %rcx      # 0x130ce
leaq 0xf2f7(%rip), %r9       # 0x130df
movq %r14, %rdi
xorl %r8d, %r8d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf42d(%rip), %rax      # 0x13234
movq %rax, (%rsp)
leaq 0xf481(%rip), %rsi      # 0x13293
leaq 0xf408(%rip), %rdx      # 0x13221
leaq 0xf406(%rip), %rcx      # 0x13226
movq %r14, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf453(%rip), %rax      # 0x13295
movq %rax, (%rsp)
leaq 0xf440(%rip), %rsi      # 0x1328d
leaq 0xf43c(%rip), %rdx      # 0x13290
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf4a7(%rip), %rax      # 0x1331f
movq %rax, (%rsp)
leaq 0xe2a2(%rip), %rsi      # 0x12125
leaq 0xf490(%rip), %rdx      # 0x1331a
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
leaq 0xf5df(%rip), %rax      # 0x13488
movq %rax, 0x10(%rsp)
leaq 0xf5cf(%rip), %rax      # 0x13484
movq %rax, 0x8(%rsp)
leaq 0xf490(%rip), %rax      # 0x13351
movq %rax, (%rsp)
leaq 0xf9d4(%rip), %rsi      # 0x138a0
leaq 0x124e7(%rip), %rcx     # 0x163ba
movq %r14, %rdi
movq %rcx, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
leaq 0xf739(%rip), %rax      # 0x1362c
movq %rax, 0x10(%rsp)
leaq 0xf71e(%rip), %rax      # 0x1361d
movq %rax, 0x8(%rsp)
leaq 0xf5c1(%rip), %rax      # 0x134cc
movq %rax, (%rsp)
leaq 0x120ca(%rip), %rsi     # 0x15fe0
leaq 0x112fd(%rip), %rdx     # 0x1521a
leaq 0xf588(%rip), %rcx      # 0x134ac
movq %r14, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
leaq 0xf82a(%rip), %rax      # 0x1376b
movq %rax, 0x10(%rsp)
leaq 0xf801(%rip), %rax      # 0x1374e
movq %rax, 0x8(%rsp)
leaq 0xf72c(%rip), %rax      # 0x13685
movq %rax, (%rsp)
leaq 0xf6f0(%rip), %rsi      # 0x13654
leaq 0xf6ec(%rip), %rdx      # 0x13657
leaq 0xf6f2(%rip), %rcx      # 0x13664
movq %r14, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf809(%rip), %rax      # 0x1379d
movq %rax, (%rsp)
leaq 0x1244a(%rip), %rsi     # 0x163e9
leaq 0xf7eb(%rip), %rdx      # 0x13791
leaq 0xfdca(%rip), %rcx      # 0x13d77
leaq 0x11ac1(%rip), %r9      # 0x15a75
movq %r14, %rdi
xorl %r8d, %r8d
callq 0x511a
callq 0xbd6d
leaq 0xf815(%rip), %rsi      # 0x137e0
leaq 0x2160(%rsp), %r15
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3540
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movq %r15, (%rsp)
leaq 0xf8aa(%rip), %rsi      # 0x138a2
leaq 0xf8a6(%rip), %rdx      # 0x138a5
leaq 0xf8a6(%rip), %rcx      # 0x138ac
movq %r14, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
callq 0xbd6d
leaq 0xf8a8(%rip), %rsi      # 0x138c8
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3540
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movq %r15, (%rsp)
leaq 0xf955(%rip), %rsi      # 0x1399a
leaq 0xf85b(%rip), %rdx      # 0x138a7
leaq 0xf94a(%rip), %rcx      # 0x1399d
movq %r14, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xf956(%rip), %rax      # 0x139cb
movq %rax, (%rsp)
leaq 0xf939(%rip), %rdx      # 0x139b9
leaq 0xf937(%rip), %rcx      # 0x139be
leaq 0xf938(%rip), %r8       # 0x139c6
movq %r14, %rdi
movq %rdx, %rsi
xorl %r9d, %r9d
callq 0x511a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
leaq 0xfccf(%rip), %rax      # 0x13d7f
movq %rax, (%rsp)
leaq 0xfcab(%rip), %rsi      # 0x13d66
leaq 0xfca7(%rip), %rdx      # 0x13d69
leaq 0xfca9(%rip), %rcx      # 0x13d72
movq %r14, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x511a
cmpl $0x1, %ebp
jle 0x4f1e
movl %r12d, 0x19b91(%rip)    # 0x1dc78
movb $0x0, 0x18882(%rip)     # 0x1c970
movl %r12d, 0x189a3(%rip)    # 0x1ca98
leaq 0x189a4(%rip), %rdi     # 0x1caa0
movl %ebp, %esi
movq %rbx, %rdx
callq 0x5872
testl %eax, %eax
jle 0x4b89
leaq 0x1898b(%rip), %rbx     # 0x1caa0
leaq 0xed8a(%rip), %r14      # 0x12ea6
leaq 0xed94(%rip), %r15      # 0x12eb7
leaq 0xedb0(%rip), %r12      # 0x12eda
leaq 0xedcf(%rip), %r13      # 0x12f00
leaq 0x181f8(%rip), %rbp     # 0x1c330
movq $0x0, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x53b3
testl %eax, %eax
jne 0x4f1e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x53b3
testl %eax, %eax
je 0x417a
movq %rbp, %rdi
xorl %eax, %eax
callq 0xa127
jmp 0x42a8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x53b3
testl %eax, %eax
je 0x4198
movl $0x1, 0x188f1(%rip)     # 0x1ca84
jmp 0x42a8
movq %rbx, %rdi
movq %r13, %rsi
callq 0x53b3
testl %eax, %eax
je 0x41b6
movl $0x1, 0x188c3(%rip)     # 0x1ca74
jmp 0x42a8
movq %rbx, %rdi
leaq 0xed6b(%rip), %rsi      # 0x12f2b
callq 0x53b3
testl %eax, %eax
je 0x41d8
movl $0x1, 0x188a9(%rip)     # 0x1ca7c
jmp 0x42a8
movq %rbx, %rdi
leaq 0xed77(%rip), %rsi      # 0x12f59
callq 0x53b3
testl %eax, %eax
je 0x41fa
movl $0x1, 0x1888b(%rip)     # 0x1ca80
jmp 0x42a8
movq %rbx, %rdi
leaq 0xed8e(%rip), %rsi      # 0x12f92
callq 0x53b3
testl %eax, %eax
je 0x421c
movl $0x1, 0x18871(%rip)     # 0x1ca88
jmp 0x42a8
movq %rbx, %rdi
leaq 0xf56b(%rip), %rsi      # 0x13791
callq 0x53b3
movq %rbx, %rdi
testl %eax, %eax
je 0x424e
leaq 0xfb3e(%rip), %rsi      # 0x13d77
leaq 0x18850(%rip), %rdx     # 0x1ca90
callq 0x5c14
testl %eax, %eax
jns 0x42a8
jmp 0x4f23
leaq 0xed7a(%rip), %rsi      # 0x12fcf
callq 0x53b3
testl %eax, %eax
je 0x426a
movl $0x1, 0x18824(%rip)     # 0x1ca8c
jmp 0x42a8
movq %rbx, %rdi
leaq 0xed9c(%rip), %rsi      # 0x13010
callq 0x53b3
movq %rbx, %rdi
testl %eax, %eax
je 0x42bd
leaq 0xed90(%rip), %rsi      # 0x13017
leaq 0x187ea(%rip), %rdx     # 0x1ca78
callq 0x5c14
testl %eax, %eax
js 0x4f23
cmpl $0x3, 0x187d6(%rip)     # 0x1ca78
jge 0x4f6e
movq %rbx, %rdi
callq 0x544c
testl %eax, %eax
jg 0x4149
jmp 0x4b82
leaq 0xedcd(%rip), %rsi      # 0x13091
callq 0x53b3
movq %rbx, %rdi
testl %eax, %eax
je 0x42e3
leaq 0xedba(%rip), %rsi      # 0x13091
leaq 0x18792(%rip), %rdx     # 0x1ca70
jmp 0x4240
leaq 0xfbda(%rip), %rsi      # 0x13ec4
callq 0x53b3
movq %rbx, %rdi
testl %eax, %eax
je 0x4346
leaq 0xedd1(%rip), %rsi      # 0x130ce
leaq 0x160(%rsp), %rdx
movl $0x50, %ecx
callq 0x5aa1
testl %eax, %eax
js 0x4f23
leaq 0x160(%rsp), %rdi
leaq 0x17fea(%rip), %rsi     # 0x1c310
leaq 0x17fe7(%rip), %rdx     # 0x1c314
leaq 0x17fe4(%rip), %rcx     # 0x1c318
callq 0x868f
testl %eax, %eax
je 0x42a8
jmp 0x4f77
leaq 0xeed4(%rip), %rsi      # 0x13221
callq 0x53b3
movq %rbx, %rdi
testl %eax, %eax
je 0x4376
leaq 0xeec6(%rip), %rsi      # 0x13226
leaq 0x18609(%rip), %rdx     # 0x1c970
movl $0x100, %ecx            # imm = 0x100
callq 0x5aa1
jmp 0x4245
leaq 0xef13(%rip), %rsi      # 0x13290
callq 0x53b3
testl %eax, %eax
je 0x4393
movl $0x1, 0x3c(%rsp)
jmp 0x42a8
movq %rbx, %rdi
leaq 0xef7d(%rip), %rsi      # 0x1331a
callq 0x53b3
testl %eax, %eax
je 0x43b3
movl $0x2, 0x3c(%rsp)
jmp 0x42a8
movq %rbx, %rdi
leaq 0x11ffd(%rip), %rsi     # 0x163ba
callq 0x53b3
movq %rbx, %rdi
testl %eax, %eax
je 0x4465
leaq 0x11fe6(%rip), %rsi     # 0x163ba
leaq 0x160(%rsp), %rdx
movl $0x100, %ecx            # imm = 0x100
callq 0x5aa1
testl %eax, %eax
js 0x4f23
leaq 0x160(%rsp), %rdi
leaq 0xface(%rip), %rsi      # 0x13ecb
callq 0x3060
testl %eax, %eax
je 0x4534
leaq 0x160(%rsp), %rdi
callq 0x31a0
movq %rax, 0x40(%rsp)
callq 0x3030
movq (%rax), %rax
movq 0x40(%rsp), %rcx
decl %ecx
movslq %ecx, %rcx
movq %rcx, 0x30(%rsp)
movsbq 0x160(%rsp,%rcx), %rcx
movl (%rax,%rcx,4), %eax
cmpl $0x4b, %eax
je 0x4542
movl $0x1, %ecx
movq %rcx, 0x40(%rsp)
cmpl $0x4d, %eax
jne 0x4559
movl $0x100000, %eax         # imm = 0x100000
jmp 0x4547
leaq 0x10dae(%rip), %rsi     # 0x1521a
callq 0x53b3
testl %eax, %eax
jne 0x448c
movq %rbx, %rdi
leaq 0xf1d8(%rip), %rsi      # 0x13657
callq 0x53b3
testl %eax, %eax
je 0x4688
movq %rbx, %rdi
leaq 0xf1c1(%rip), %rsi      # 0x13657
callq 0x53b3
movl %eax, 0x30(%rsp)
movq %rbx, %rdi
leaq 0xfa35(%rip), %rsi      # 0x13ede
leaq 0x1160(%rsp), %rdx
callq 0x5c14
testl %eax, %eax
js 0x4f23
cmpl $0x8, 0x1160(%rsp)
jae 0x4f80
movq %rbx, %rdi
leaq 0xfa25(%rip), %rsi      # 0x13efb
leaq 0x160(%rsp), %rdx
movl $0x1000, %ecx           # imm = 0x1000
callq 0x5aa1
testl %eax, %eax
js 0x4f23
callq 0x3030
movq (%rax), %rax
movsbq 0x160(%rsp), %rcx
movl (%rax,%rcx,4), %eax
cmpl $0x43, %eax
je 0x45a6
cmpl $0x52, %eax
je 0x45b8
cmpl $0x57, %eax
jne 0x4f93
movl $0x0, 0x50(%rsp)
movl $0x0, 0x48(%rsp)
jmp 0x45c8
movq $0x0, 0x40(%rsp)
jmp 0x42a8
movl $0x400, %eax            # imm = 0x400
movq %rax, 0x40(%rsp)
movq 0x30(%rsp), %rax
movb $0x0, 0x160(%rsp,%rax)
leaq 0x160(%rsp), %rdi
leaq 0x1160(%rsp), %rsi
xorl %edx, %edx
callq 0x3340
movq 0x40(%rsp), %rcx
imull %eax, %ecx
movq %rcx, 0x40(%rsp)
testl %ecx, %ecx
je 0x4f9c
movq 0x30(%rsp), %rax
addq %rsp, %rax
addq $0x160, %rax            # imm = 0x160
cmpq %rax, 0x1160(%rsp)
je 0x42a8
jmp 0x4f9c
movl $0x0, 0x48(%rsp)
movl $0x1, 0x50(%rsp)
jmp 0x45c8
movl $0x1, 0x48(%rsp)
movl $0x0, 0x50(%rsp)
cmpl $0x0, 0x30(%rsp)
je 0x45ff
movq %rbx, %rdi
leaq 0x1083b(%rip), %rsi     # 0x14e14
leaq 0x160(%rsp), %rdx
movl $0x1000, %ecx           # imm = 0x1000
callq 0x5aa1
testl %eax, %eax
js 0x4f23
cmpl $0x0, 0x3c(%rsp)
jne 0x4623
jmp 0x4fb1
movq %rbx, %rdi
leaq 0xeeba(%rip), %rsi      # 0x134c3
leaq 0x160(%rsp), %rdx
movl $0x1000, %ecx           # imm = 0x1000
callq 0x5aa1
testl %eax, %eax
js 0x4f23
movl 0x1160(%rsp), %edi
movq 0x40(%rsp), %rsi
callq 0x6748
movl 0x1160(%rsp), %edi
callq 0x6784
movq %rax, %rdi
movl 0x30(%rsp), %esi
movl 0x48(%rsp), %edx
movl 0x50(%rsp), %ecx
leaq 0x160(%rsp), %r8
movl 0x3c(%rsp), %r9d
callq 0x7b5f
testl %eax, %eax
js 0x4f23
movl 0x1160(%rsp), %edi
callq 0x6784
movq %rax, %rdi
callq 0x7ee1
incl 0x195f5(%rip)           # 0x1dc78
jmp 0x42a8
movq %rbx, %rdi
leaq 0xf213(%rip), %rsi      # 0x138a5
callq 0x53b3
movq %rbx, %rdi
testl %eax, %eax
je 0x4854
leaq 0xee1a(%rip), %rsi      # 0x134c3
leaq 0x160(%rsp), %rdx
movl $0x1000, %ecx           # imm = 0x1000
callq 0x5aa1
testl %eax, %eax
js 0x4f23
movq %rbx, %rdi
leaq 0xf888(%rip), %rsi      # 0x13f55
leaq 0x1160(%rsp), %rdx
movl $0x1000, %ecx           # imm = 0x1000
callq 0x5aa1
testl %eax, %eax
js 0x4f23
movq %rbx, %rdi
leaq 0xf2bd(%rip), %rsi      # 0x139ae
leaq 0x60(%rsp), %rdx
movl $0x100, %ecx            # imm = 0x100
callq 0x5aa1
testl %eax, %eax
js 0x4f23
leaq 0x60(%rsp), %rdi
callq 0xbd1f
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x3c(%rsp)
je 0x4fb1
cmpl $0x0, 0x30(%rsp)
je 0x4fa5
cmpl $0x0, 0x40(%rsp)
setne %al
cmpl $0x1, 0x30(%rsp)
setne %cl
andb %al, %cl
cmpb $0x1, %cl
je 0x4fbd
movl 0x30(%rsp), %edi
movl $0xff, %esi
movq 0x40(%rsp), %rdx
callq 0x7a40
movq %rax, 0x50(%rsp)
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0x160(%rsp), %r8
movl 0x3c(%rsp), %r9d
callq 0x7b5f
testl %eax, %eax
je 0x478c
leaq 0xf81b(%rip), %rdi      # 0x13fa0
xorl %eax, %eax
callq 0xa2ef
movq 0x50(%rsp), %rax
movq 0x118(%rax), %rcx
movl 0x110(%rax), %r8d
movq 0xf8(%rax), %r9
movl 0x3c(%rsp), %edi
movl 0x30(%rsp), %esi
xorl %edx, %edx
callq 0xb6e7
movq %rax, 0x30(%rsp)
movq %rax, %rdi
callq 0xb829
testl %eax, %eax
je 0x47d4
leaq 0xf7e5(%rip), %rdi      # 0x13fb2
xorl %eax, %eax
callq 0xa2ef
xorl %edi, %edi
leaq 0x1160(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x9457
movq %rax, 0x48(%rsp)
movq %rax, %rdi
movl $0x1, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x8d7a
testl %eax, %eax
je 0x4813
leaq 0xf7be(%rip), %rdi      # 0x13fca
xorl %eax, %eax
callq 0xa2ef
movq 0x48(%rsp), %rdi
callq 0x90a7
leaq 0x19a1c(%rip), %rax     # 0x1e240
movq (%rax), %rsi
movq 0x30(%rsp), %rdi
callq 0xbc4b
leaq 0xf7a9(%rip), %rdi      # 0x13fe1
leaq 0x160(%rsp), %rsi
leaq 0x1160(%rsp), %rdx
xorl %eax, %eax
callq 0xa127
jmp 0x4a27
leaq 0xf04c(%rip), %rsi      # 0x138a7
callq 0x53b3
movq %rbx, %rdi
testl %eax, %eax
je 0x4a4a
leaq 0xec51(%rip), %rsi      # 0x134c3
leaq 0x160(%rsp), %rdx
movl $0x1000, %ecx           # imm = 0x1000
callq 0x5aa1
testl %eax, %eax
js 0x4f23
movq %rbx, %rdi
leaq 0xf6bf(%rip), %rsi      # 0x13f55
leaq 0x1160(%rsp), %rdx
movl $0x1000, %ecx           # imm = 0x1000
callq 0x5aa1
testl %eax, %eax
js 0x4f23
movq %rbx, %rdi
leaq 0xf0f4(%rip), %rsi      # 0x139ae
leaq 0x60(%rsp), %rdx
movl $0x100, %ecx            # imm = 0x100
callq 0x5aa1
testl %eax, %eax
js 0x4f23
leaq 0x60(%rsp), %rdi
callq 0xbd1f
testl %eax, %eax
je 0x4fa5
cmpl $0x0, 0x3c(%rsp)
je 0x4fb1
movl %eax, %edx
cmpl $0x0, 0x40(%rsp)
sete %al
cmpl $0x1, %edx
sete %cl
orb %al, %cl
je 0x4fbd
movl %edx, %edi
movl %edx, 0x30(%rsp)
movl $0xff, %esi
movq 0x40(%rsp), %rdx
callq 0x7a40
movq 0x118(%rax), %rcx
movq %rax, 0x50(%rsp)
movl 0x110(%rax), %r8d
movl 0x3c(%rsp), %edi
movl 0x30(%rsp), %esi
xorl %edx, %edx
xorl %r9d, %r9d
callq 0xb6e7
xorl %edi, %edi
leaq 0x1160(%rsp), %rsi
movq %rax, 0x30(%rsp)
movq %rax, %rdx
callq 0x9457
movq %rax, 0x48(%rsp)
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x8d7a
testl %eax, %eax
je 0x497c
leaq 0xf655(%rip), %rdi      # 0x13fca
xorl %eax, %eax
callq 0xa2ef
movq 0x48(%rsp), %rdi
callq 0x91d0
testl %eax, %eax
je 0x4998
leaq 0xf67f(%rip), %rdi      # 0x14010
xorl %eax, %eax
callq 0xa2ef
movq 0x30(%rsp), %rdi
callq 0xbbc4
testl %eax, %eax
je 0x49b4
leaq 0xf67c(%rip), %rdi      # 0x14029
xorl %eax, %eax
callq 0xa2ef
leaq 0x19885(%rip), %rax     # 0x1e240
movq (%rax), %rsi
movq 0x30(%rsp), %rdi
callq 0xbc4b
leaq 0x160(%rsp), %rdi
leaq 0x126ba(%rip), %rsi     # 0x17091
callq 0x34c0
movq %rax, 0x58(%rsp)
testq %rax, %rax
jne 0x49fc
leaq 0xf655(%rip), %rdi      # 0x14042
leaq 0x160(%rsp), %rsi
xorl %eax, %eax
callq 0xa2ef
movq 0x50(%rsp), %rax
movq 0x118(%rax), %rdi
movl 0x110(%rax), %edx
movl $0x1, %esi
movq 0x58(%rsp), %rcx
callq 0x3560
movq 0x58(%rsp), %rdi
callq 0x3160
movq 0x30(%rsp), %rdi
callq 0xb79c
movq 0x48(%rsp), %rdi
callq 0x94a8
movq 0x50(%rsp), %rdi
callq 0x8438
jmp 0x42a8
leaq 0xef68(%rip), %rsi      # 0x139b9
callq 0x53b3
movq %rbx, %rdi
testl %eax, %eax
je 0x4b10
leaq 0xef56(%rip), %rsi      # 0x139be
leaq 0x160(%rsp), %rdx
movl $0x100, %ecx            # imm = 0x100
callq 0x5aa1
testl %eax, %eax
js 0x4f23
leaq 0xf5d0(%rip), %rdi      # 0x14059
leaq 0x160(%rsp), %rsi
callq 0x3060
testl %eax, %eax
je 0x4b3a
leaq 0xf5b9(%rip), %rdi      # 0x1405e
leaq 0x160(%rsp), %rsi
callq 0x3060
testl %eax, %eax
je 0x4b53
leaq 0xf5a1(%rip), %rdi      # 0x14062
leaq 0x160(%rsp), %rsi
callq 0x3060
testl %eax, %eax
je 0x4b5a
leaq 0xf58b(%rip), %rdi      # 0x14068
leaq 0x160(%rsp), %rsi
callq 0x3060
testl %eax, %eax
je 0x4b61
leaq 0xf579(%rip), %rdi      # 0x1406e
leaq 0x160(%rsp), %rsi
callq 0x3060
movl $0x5, %ecx
testl %eax, %eax
je 0x4b66
jmp 0x4fc9
leaq 0xf252(%rip), %rsi      # 0x13d69
callq 0x53b3
testl %eax, %eax
je 0x42a8
movq %rbx, %rdi
leaq 0xf244(%rip), %rsi      # 0x13d72
leaq 0x17f5f(%rip), %rdx     # 0x1ca94
jmp 0x4240
movl $0x1, 0x17f54(%rip)     # 0x1ca98
movl $0x0, 0x17f4e(%rip)     # 0x1ca9c
jmp 0x42a8
movl $0x2, %ecx
jmp 0x4b66
movl $0x3, %ecx
jmp 0x4b66
movl $0x4, %ecx
movl %ecx, 0x17f2c(%rip)     # 0x1ca98
movq %rbx, %rdi
leaq 0xee50(%rip), %rsi      # 0x139c6
leaq 0x17f1f(%rip), %rdx     # 0x1ca9c
jmp 0x4240
movq 0x17447(%rip), %r13     # 0x1bfd0
leal 0x3(%rax), %ecx
cmpl $0x1, %ecx
jbe 0x4f23
testl %eax, %eax
js 0x4f2c
cmpl $0x0, 0x17ee0(%rip)     # 0x1ca84
je 0x4bc2
leaq 0x17783(%rip), %rdi     # 0x1c330
xorl %eax, %eax
callq 0xa127
leaq 0x177d5(%rip), %rdi     # 0x1c390
xorl %eax, %eax
callq 0xa127
cmpl $0x0, 0x190af(%rip)     # 0x1dc78
jle 0x4be2
cmpl $0x0, 0x17ec6(%rip)     # 0x1ca98
je 0x4be2
leaq 0xf507(%rip), %rdi      # 0x140e2
xorl %eax, %eax
callq 0xa2ef
cmpl $0x0, 0x1908f(%rip)     # 0x1dc78
jle 0x4c02
cmpb $0x0, 0x17d7e(%rip)     # 0x1c970
jne 0x4c02
leaq 0xf51b(%rip), %rdi      # 0x14116
xorl %eax, %eax
callq 0xa2ef
cmpl $0x2, 0x17e8f(%rip)     # 0x1ca98
jb 0x4c22
cmpb $0x0, 0x17d5e(%rip)     # 0x1c970
jne 0x4c22
leaq 0xf531(%rip), %rdi      # 0x1414c
xorl %eax, %eax
callq 0xa2ef
cmpl $0x0, 0x1904f(%rip)     # 0x1dc78
jle 0x4c42
cmpl $0x8, 0x176de(%rip)     # 0x1c310
je 0x4c42
leaq 0xf54d(%rip), %rdi      # 0x14188
xorl %eax, %eax
callq 0xa2ef
xorl %edi, %edi
callq 0x6784
testq %rax, %rax
je 0x4c7e
cmpl $0x1, 0x10c(%rax)
jne 0x4c7e
movq 0xe8(%rax), %rcx
movl 0xf0(%rax), %edx
imull 0x18(%rcx), %edx
cmpl %edx, 0x110(%rax)
je 0x4c7e
leaq 0xf549(%rip), %rdi      # 0x141c0
xorl %eax, %eax
callq 0xa20b
movl $0x2, %ebx
leaq 0xf56d(%rip), %r14      # 0x141f7
movl %ebx, %edi
callq 0x6784
testq %rax, %rax
je 0x4cab
cmpl $0x2, 0x10c(%rax)
jne 0x4cab
movq %r14, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0xa20b
incl %ebx
cmpl $0x8, %ebx
jne 0x4c8a
leaq 0xf57a(%rip), %rbx      # 0x14233
xorl %r14d, %r14d
xorl %ebp, %ebp
movl %ebp, %edi
callq 0x6784
testq %rax, %rax
je 0x4ce9
movl 0x10c(%rax), %eax
testl %r14d, %r14d
je 0x4ce6
cmpl %eax, %r14d
je 0x4ce9
movq %rbx, %rdi
xorl %eax, %eax
callq 0xa2ef
jmp 0x4ce9
movl %eax, %r14d
incl %ebp
cmpl $0x8, %ebp
jne 0x4cbe
leaq 0xf56c(%rip), %rbx      # 0x14263
xorl %r14d, %r14d
xorl %ebp, %ebp
movl %ebp, %edi
callq 0x6784
testq %rax, %rax
je 0x4d30
cmpl $0x2, 0x10c(%rax)
jne 0x4d30
movl 0x110(%rax), %eax
testl %r14d, %r14d
je 0x4d2d
cmpl %eax, %r14d
je 0x4d30
movq %rbx, %rdi
xorl %eax, %eax
callq 0xa20b
jmp 0x4d30
movl %eax, %r14d
incl %ebp
cmpl $0x8, %ebp
jne 0x4cfc
xorl %edi, %edi
callq 0x6784
testq %rax, %rax
je 0x4d79
cmpl $0x2, 0x10c(%rax)
jne 0x4d79
movq 0xe8(%rax), %rcx
movl 0xf0(%rax), %edx
imull 0x18(%rcx), %edx
cmpl %edx, 0x110(%rax)
je 0x4d79
cmpl $0x0, 0x3c(%rax)
jne 0x4d79
leaq 0xf522(%rip), %rdi      # 0x14294
xorl %eax, %eax
callq 0xa20b
movl 0x17cf1(%rip), %edx     # 0x1ca70
movl 0x1758b(%rip), %ecx     # 0x1c310
movsbl 0x17587(%rip), %r8d     # 0x1c314
movl 0x17584(%rip), %r9d     # 0x1c318
leaq 0xd4ef(%rip), %rdi      # 0x1228a
leaq 0x17bce(%rip), %rsi     # 0x1c970
xorl %eax, %eax
callq 0xa127
cmpl $0x0, 0x18ec8(%rip)     # 0x1dc78
je 0x4e1a
cmpl $0x0, 0x17cc3(%rip)     # 0x1ca7c
je 0x4dc9
leaq 0xd536(%rip), %rdi      # 0x122f8
xorl %eax, %eax
callq 0xa127
movl 0x17ca1(%rip), %edx     # 0x1ca70
movl 0x1753b(%rip), %ecx     # 0x1c310
movsbl 0x17537(%rip), %r8d     # 0x1c314
movl 0x17534(%rip), %r9d     # 0x1c318
leaq 0x190ed(%rip), %rbx     # 0x1ded8
leaq 0x17b7e(%rip), %rsi     # 0x1c970
movq %rbx, %rdi
callq 0x871f
xorl %edi, %edi
callq 0x8a2f
callq 0x38b7
callq 0x8b14
movq %rbx, %rdi
callq 0x8a0c
callq 0x6793
jmp 0x4e28
leaq 0xd49d(%rip), %rdi      # 0x122be
xorl %eax, %eax
callq 0xa127
movl 0x17c6a(%rip), %eax     # 0x1ca98
testl %eax, %eax
je 0x4f0a
cmpl $0x1, %eax
jne 0x4e4f
movq (%r13), %rdi
movl 0x174db(%rip), %esi     # 0x1c320
callq 0x113d8
jmp 0x4f0a
movl 0x17c1b(%rip), %edx     # 0x1ca70
movl 0x174b5(%rip), %ecx     # 0x1c310
movsbl 0x174b1(%rip), %r8d     # 0x1c314
movl 0x174ae(%rip), %r9d     # 0x1c318
leaq 0x17aff(%rip), %rsi     # 0x1c970
leaq 0x160(%rsp), %rbx
movq %rbx, %rdi
callq 0x871f
movl $0x1, %edi
callq 0x8a2f
movl 0x17c07(%rip), %esi     # 0x1ca98
movl 0x17489(%rip), %edx     # 0x1c320
movq %rbx, %rdi
callq 0x11451
testl %eax, %eax
je 0x4ea7
xorl %eax, %eax
jmp 0x4ec5
movl 0x17beb(%rip), %esi     # 0x1ca98
movl 0x1746d(%rip), %edx     # 0x1c320
leaq 0x160(%rsp), %rdi
callq 0x1151f
testl %eax, %eax
sete %al
cmpl $0x0, 0x17bd0(%rip)     # 0x1ca9c
je 0x4ef8
movl 0x17bc4(%rip), %esi     # 0x1ca98
testb %al, %al
je 0x4ee4
leaq 0x160(%rsp), %rdi
xorl %edx, %edx
jmp 0x4ef3
leaq 0xd445(%rip), %rdx      # 0x12330
leaq 0x160(%rsp), %rdi
callq 0x115a0
callq 0x8b14
leaq 0x160(%rsp), %rdi
callq 0x8a0c
xorl %eax, %eax
addq $0x2568, %rsp           # imm = 0x2568
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x36ec
xorl %edi, %edi
xorl %eax, %eax
callq 0x4fdf
leaq 0x1930d(%rip), %rbx     # 0x1e240
movq (%rbx), %rcx
leaq 0xf183(%rip), %rdi      # 0x140c0
movl $0x21, %esi
movl $0x1, %edx
callq 0x3560
movq (%rbx), %rdi
leaq 0x10dee(%rip), %rsi     # 0x15d44
leaq 0x181c7(%rip), %rdx     # 0x1d124
xorl %eax, %eax
callq 0x3320
movl $0x1, %edi
callq 0x3550
leaq 0xef38(%rip), %rdi      # 0x13ead
jmp 0x4f25
leaq 0xef3e(%rip), %rdi      # 0x13ebc
jmp 0x4f25
leaq 0xef5c(%rip), %rdi      # 0x13ee3
movl $0x8, %esi
xorl %eax, %eax
callq 0x4fdf
leaq 0xef73(%rip), %rdi      # 0x13f0d
jmp 0x4f25
leaq 0xef2c(%rip), %rdi      # 0x13ecf
jmp 0x4f25
leaq 0xefb1(%rip), %rdi      # 0x13f5d
jmp 0x4f25
leaq 0xef7f(%rip), %rdi      # 0x13f37
jmp 0x4f25
leaq 0xefa9(%rip), %rdi      # 0x13f6d
jmp 0x4f25
leaq 0xf0a3(%rip), %rdi      # 0x14073
leaq 0x160(%rsp), %rsi
xorl %eax, %eax
callq 0x4fdf