// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/tu58drive.c
// Function: tu58_server
void* tu58_server(void* none) {
	uint8_t flag = TUF_NULL;
	uint8_t last = TUF_NULL;
	UNUSED(none);

	// some init
	reinit(); // empty serial line buffers
	tu58_doinit = !opt_nosync; // start sending init flags?

	tu58_offline_request = 0;
	tu58_offline = 0;

	// say hello
	info("emulator %sstarted", tu58_runonce++ ? "re" : "");

	// loop forever ... almost
	for (;;) {

		if (tu58_offline_request && !tu58_offline) {
			// if requested, go offline after inactivity timeout

			if (tu58_serial.rx_lasttime_ms + opt_offlinetimeout_sec * 1000 < now_ms()
					&& tu58_serial.tx_lasttime_ms + opt_offlinetimeout_sec * 1000 < now_ms()) {
				tu58_offline = 1;
				if (opt_verbose)
					info("TU58 now offline");
			}
		} else if (!tu58_offline_request && tu58_offline) {
			tu58_offline = 0;
			if (opt_verbose)
				info("TU58 now online");
		}
		// if offline, on read/write/seek a "no cartridge" is sent

		// loop while no characters are available
		if (serial_devrxavail(&tu58_serial) == 0) {
			// delays and printout only if not VAX
			if (!opt_vax) {
				// send INITs if still required
				if (tu58_doinit) {
					if (opt_debug)
						fprintf(ferr, ".");
					serial_devtxput(&tu58_serial, TUF_INIT);
					serial_devtxflush(&tu58_serial);
					tu58_serial.tx_lasttime_ms = 0; // does not count as traffic
					delay_ms(75);
				}
				delay_ms(25);
				continue; // loop again
			}
		} else
			tu58_doinit = 0; // quit sending init flags

#ifdef ORG
		// loop while no characters are available
		while (serial_devrxavail() == 0) {
			// delays and printout only if not VAX
			if (!opt_vax) {
				// send INITs if still required
				if (tu58_doinit) {
					if (opt_debug) fprintf(ferr, ".");
					serial_devtxput(TUF_INIT);
					serial_devtxflush();
					delay_ms(75);
				}
				delay_ms(25);
			}
		}
		tu58_doinit = 0; // quit sending init flags
#endif

		// process received characters
		last = flag;
		flag = serial_devrxget(&tu58_serial);
		if (opt_debug)
			info("flag=0x%02X last=0x%02X", flag, last);

		switch (flag) {

		case TUF_CTRL:
			// control packet - process
			command(flag);
			break;

		case TUF_INIT:
			// init flag
			if (opt_debug)
				info("<INIT> seen");
			if (last == TUF_INIT) {
				// two in a row is special
				if (!opt_vax)
					delay_ms(tudelay[opt_timing].init); // no delay for VAX
				serial_devtxput(&tu58_serial, TUF_CONT); // send 'continue'
				serial_devtxflush(&tu58_serial); // send immediate
				flag = -1; // undefined
				if (opt_debug)
					info("<INIT><INIT> seen, sending <CONT>");
			}
			break;

		case TUF_BOOT:
			// special boot sequence
			if (opt_debug)
				info("<BOOT> seen");
			bootio();
			break;

		case TUF_NULL:
			// ignore nulls (which are BREAKs)
			if (opt_debug)
				info("<NULL> seen");
			break;

		case TUF_CONT:
			// continue restarts output
			if (opt_debug)
				info("<CONT> seen, starting output");
			serial_devtxstart(&tu58_serial);
			break;

		case TUF_XOFF:
			// send disable flag stops output
			if (opt_debug)
				info("<XOFF> seen, stopping output");
			serial_devtxstop(&tu58_serial);
			break;

		case TUF_DATA:
			// data packet - should never see one here
			error("protocol error - data flag out of sequence");
			reinit();
			break;

		default:
			// whoops, protocol error
			error("unknown packet flag 0x%02X (%c)", flag,
			isprint(flag) ? flag : '.');
			break;

		} // switch (flag)

	} // for (;;)

	return (void*) 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
callq 0x762d
leaq 0x16280(%rip), %rax     # 0x1ca70
xorl %ecx, %ecx
cmpl %ecx, (%rax)
sete 0x17676(%rip)           # 0x1de71
movl %ecx, 0x176bf(%rip)     # 0x1dec0
movl %ecx, 0x176bd(%rip)     # 0x1dec4
movb 0x17665(%rip), %al      # 0x1de72
leal 0x1(%rax), %ecx
movb %cl, 0x1765c(%rip)      # 0x1de72
testb %al, %al
leaq 0xefe4(%rip), %rax      # 0x15803
leaq 0xdfd8(%rip), %rsi      # 0x147fe
cmoveq %rax, %rsi
leaq 0xdfba(%rip), %rdi      # 0x147eb
xorl %eax, %eax
callq 0xa10f
leaq 0x16225(%rip), %r14     # 0x1ca64
leaq 0x17682(%rip), %r15     # 0x1dec8
leaq 0x1622b(%rip), %r12     # 0x1ca78
leaq 0x16220(%rip), %r13     # 0x1ca74
xorl %ebp, %ebp
cmpl $0x0, 0x17663(%rip)     # 0x1dec0
je 0x6868
cmpl $0x0, 0x1765e(%rip)     # 0x1dec4
je 0x6897
cmpl $0x0, 0x17651(%rip)     # 0x1dec0
jne 0x68fd
cmpl $0x0, 0x17648(%rip)     # 0x1dec4
je 0x68fd
movl $0x0, 0x1763c(%rip)     # 0x1dec4
cmpl $0x0, (%r14)
leaq 0xdf7f(%rip), %rdi      # 0x14812
jne 0x68f6
jmp 0x68fd
leaq 0x15a6e(%rip), %rax     # 0x1c30c
movslq (%rax), %rax
imulq $0x3e8, %rax, %rbx      # imm = 0x3E8
addq 0x17629(%rip), %rbx     # 0x1ded8
xorl %eax, %eax
callq 0xa3ff
cmpq %rax, %rbx
jae 0x68fd
leaq 0x15a4a(%rip), %rax     # 0x1c30c
movslq (%rax), %rax
imulq $0x3e8, %rax, %rbx      # imm = 0x3E8
addq 0x1760d(%rip), %rbx     # 0x1dee0
xorl %eax, %eax
callq 0xa3ff
cmpq %rax, %rbx
jae 0x68fd
movl $0x1, 0x175db(%rip)     # 0x1dec4
cmpl $0x0, (%r14)
leaq 0xdf0d(%rip), %rdi      # 0x14801
je 0x68fd
xorl %eax, %eax
callq 0xa10f
movq %r15, %rdi
callq 0x847e
testl %eax, %eax
jne 0x696d
cmpl $0x0, (%r12)
jne 0x6974
cmpb $0x0, 0x1755a(%rip)     # 0x1de71
je 0x695e
cmpl $0x0, (%r13)
je 0x6934
leaq 0x17909(%rip), %rax     # 0x1e230
movq (%rax), %rsi
movl $0x2e, %edi
callq 0x3290
movq %r15, %rdi
movl $0x4, %esi
callq 0x859b
movq %r15, %rdi
callq 0x8513
movq $0x0, 0x1758c(%rip) # 0x1dee0
movl $0x4b, %edi
callq 0xa3f4
movl $0x19, %edi
callq 0xa3f4
jmp 0x6856
movb $0x0, 0x174fd(%rip)     # 0x1de71
movq %r15, %rdi
callq 0x8564
movl %eax, %r14d
cmpl $0x0, (%r13)
movzbl %al, %ebx
je 0x699d
movzbl %bpl, %edx
leaq 0xde8e(%rip), %rdi      # 0x14822
movl %ebx, %esi
xorl %eax, %eax
callq 0xa10f
cmpb $0x8, %r14b
ja 0x69d5
leaq 0xdd66(%rip), %rcx      # 0x14710
movslq (%rcx,%rbx,4), %rax
addq %rcx, %rax
leaq 0x160ac(%rip), %r14     # 0x1ca64
jmpq *%rax
xorl %ebp, %ebp
cmpl $0x0, (%r13)
je 0x6856
xorl %ebp, %ebp
leaq 0xdea4(%rip), %rdi      # 0x14874
jmp 0x6af9
cmpl $0x10, %ebx
leaq 0x16085(%rip), %r14     # 0x1ca64
je 0x6b89
cmpl $0x13, %ebx
jne 0x6a0f
cmpl $0x0, (%r13)
je 0x69ff
leaq 0xdea5(%rip), %rdi      # 0x1489d
xorl %eax, %eax
callq 0xa10f
movq %r15, %rdi
callq 0x840c
movb $0x13, %bpl
jmp 0x6856
callq 0x35d0
movq (%rax), %rax
movzwl (%rax,%rbx,2), %eax
btl $0xe, %eax
movl %ebx, %edx
movl $0x2e, %eax
cmovael %eax, %edx
leaq 0xdeb5(%rip), %rdi      # 0x148e5
movl %ebx, %esi
xorl %eax, %eax
callq 0xa03c
movl %ebx, %ebp
jmp 0x6856
leaq 0xde73(%rip), %rdi      # 0x148ba
xorl %eax, %eax
callq 0xa03c
callq 0x762d
movb $0x1, %bpl
jmp 0x6856
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movb $0x2, 0x12(%rsp)
movq %r15, %rdi
callq 0x8564
movb %al, 0x13(%rsp)
cmpb $0xf, %al
jb 0x6bcd
movzbl %al, %esi
leaq 0xdea9(%rip), %rdi      # 0x14934
xorl %eax, %eax
callq 0xa03c
callq 0x762d
jmp 0x6c18
cmpl $0x0, (%r13)
je 0x6ab1
leaq 0xdd90(%rip), %rdi      # 0x1483a
xorl %eax, %eax
callq 0xa10f
cmpb $0x4, %bpl
movb $0x4, %bpl
jne 0x6856
cmpl $0x0, (%r12)
jne 0x6acf
movl $0x1, %edi
callq 0xa3f4
movq %r15, %rdi
movl $0x10, %esi
callq 0x859b
movq %r15, %rdi
callq 0x8513
movb $-0x1, %bpl
cmpl $0x0, (%r13)
je 0x6856
leaq 0xdd4d(%rip), %rdi      # 0x14846
xorl %eax, %eax
callq 0xa10f
jmp 0x6856
cmpl $0x0, (%r13)
je 0x6b1a
leaq 0xdd55(%rip), %rdi      # 0x14868
xorl %eax, %eax
callq 0xa10f
movq %r15, %rdi
callq 0x8564
movzbl %al, %ebx
leaq 0x17354(%rip), %rax     # 0x1de80
movq (%rax,%rbx,8), %r14
testq %r14, %r14
je 0x6bae
cmpb $0x0, 0xf4(%r14)
je 0x6bae
leaq 0x15f1e(%rip), %rax     # 0x1ca64
cmpl $0x0, (%rax)
je 0x6b6a
leaq 0xe18b(%rip), %rdi      # 0x14cdd
leaq 0xce60(%rip), %rsi      # 0x139b9
movl %ebx, %edx
xorl %ecx, %ecx
movl $0x200, %r8d            # imm = 0x200
xorl %eax, %eax
callq 0xa10f
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x7f07
testl %eax, %eax
je 0x6c90
leaq 0xe179(%rip), %rdi      # 0x14d00
jmp 0x6bb5
cmpl $0x0, (%r13)
je 0x6b9e
leaq 0xdce9(%rip), %rdi      # 0x14880
xorl %eax, %eax
callq 0xa10f
movq %r15, %rdi
callq 0x8415
movb $0x10, %bpl
jmp 0x6856
leaq 0xe115(%rip), %rdi      # 0x14cca
movl %ebx, %esi
xorl %eax, %eax
callq 0xa03c
leaq 0x15e9f(%rip), %r14     # 0x1ca64
movb $0x8, %bpl
jmp 0x6856
leaq 0x12(%rsp), %rdi
callq 0x774a
testl %eax, %eax
je 0x6c27
leaq 0xdd72(%rip), %rdi      # 0x14954
xorl %eax, %eax
callq 0xa03c
movb 0x16(%rsp), %al
movb %al, 0x15819(%rip)      # 0x1c40c
movb $-0x11, 0x15811(%rip)   # 0x1c40b
movl $0x0, 0x1580c(%rip)     # 0x1c410
leaq 0x157fd(%rip), %rdi     # 0x1c408
callq 0x77da
movq %r15, %rdi
callq 0x8513
movb $0x2, %bpl
leaq 0x15e42(%rip), %r14     # 0x1ca64
jmp 0x6856
cmpl $0x0, (%r13)
je 0x6c46
movzbl 0x14(%rsp), %esi
movzbl 0x13(%rsp), %edx
leaq 0xdd28(%rip), %rdi      # 0x14967
xorl %eax, %eax
callq 0xa10f
cmpl $0x0, (%r14)
leaq 0xdcde(%rip), %r14      # 0x1492f
je 0x6dc1
movzbl 0x14(%rsp), %eax
cmpq $0xa, %rax
ja 0x6d7c
leaq 0xdac7(%rip), %rcx      # 0x14734
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0xdd08(%rip), %r14      # 0x14983
leaq 0xe598(%rip), %rbx      # 0x1521a
jmpq *%rax
leaq 0xdd0e(%rip), %r14      # 0x14999
jmp 0x6d64
movq %r14, %rdi
leaq 0x100(%rsp), %r14
movq %r14, %rsi
movl $0x200, %edx            # imm = 0x200
callq 0x7fe3
cmpl $0x200, %eax            # imm = 0x200
jne 0x6ced
movq %r15, %rdi
movq %r14, %rsi
movl $0x200, %edx            # imm = 0x200
callq 0x84cb
cmpl $0x200, %eax            # imm = 0x200
leaq 0x15d99(%rip), %r14     # 0x1ca64
je 0x6bc5
leaq 0xe077(%rip), %rdi      # 0x14d4f
movl %ebx, %esi
movl $0x200, %edx            # imm = 0x200
movl %eax, %ecx
xorl %eax, %eax
callq 0xa03c
jmp 0x6bc5
leaq 0xe024(%rip), %rdi      # 0x14d18
movl %ebx, %esi
movl $0x200, %edx            # imm = 0x200
movl %eax, %ecx
xorl %eax, %eax
callq 0xa03c
jmp 0x6bbe
movzbl 0x16(%rsp), %edx
movzbl 0x17(%rsp), %ecx
movzbl 0x15(%rsp), %r8d
movzwl 0x1c(%rsp), %r9d
leaq 0xdca1(%rip), %rdi      # 0x149c7
leaq 0xdc80(%rip), %r14      # 0x149ad
movq %r14, %rsi
xorl %eax, %eax
callq 0xa10f
jmp 0x6db5
leaq 0xdc5d(%rip), %r14      # 0x1499d
jmp 0x6d64
leaq 0xdc5c(%rip), %r14      # 0x149a5
jmp 0x6d64
leaq 0xdc42(%rip), %r14      # 0x14994
jmp 0x6d64
leaq 0xde30(%rip), %rbx      # 0x14b8b
jmp 0x6d83
leaq 0xdc28(%rip), %r14      # 0x1498c
movzbl 0x16(%rsp), %edx
leaq 0xdc4a(%rip), %rdi      # 0x149ba
movq %r14, %rsi
xorl %eax, %eax
callq 0xa10f
jmp 0x6db5
leaq 0xdc2f(%rip), %rbx      # 0x149b2
movzbl 0x16(%rsp), %edx
movzbl 0x17(%rsp), %ecx
movzbl 0x15(%rsp), %r8d
movzwl 0x1c(%rsp), %r9d
movzwl 0x1a(%rsp), %eax
movl %eax, (%rsp)
leaq 0xdc4c(%rip), %rdi      # 0x149f4
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa10f
movq %rbx, %r14
xorl %edi, %edi
leaq 0x60(%rsp), %rsi
callq 0x3130
leaq 0x15ca4(%rip), %rax     # 0x1ca6c
cmpl $0x0, (%rax)
je 0x6ddc
movb 0x17(%rsp), %al
shrb $0x3, %al
andb $0x1, %al
movb %al, 0x17094(%rip)      # 0x1de70
movzbl 0x14(%rsp), %eax
cmpq $0xa, %rax
ja 0x703a
leaq 0xd96e(%rip), %rcx      # 0x14760
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, %edi
jmp 0x6ee4
movb 0x16(%rsp), %bl
movzbl %bl, %esi
leaq 0x1706d(%rip), %rax     # 0x1de80
movq (%rax,%rsi,8), %rdi
testq %rdi, %rdi
je 0x705a
cmpb $0x0, 0xf4(%rdi)
je 0x705a
cmpl $0x0, 0x17090(%rip)     # 0x1dec4
je 0x70d2
movb %bl, 0x155cc(%rip)      # 0x1c40c
movb $-0x9, 0x155c4(%rip)    # 0x1c40b
jmp 0x6efa
movb 0x16(%rsp), %bpl
movzbl %bpl, %ebx
leaq 0x17024(%rip), %rax     # 0x1de80
movq (%rax,%rbx,8), %rdi
testq %rdi, %rdi
je 0x707a
cmpb $0x0, 0xf4(%rdi)
je 0x707a
movb $-0x9, %al
cmpl $0x0, 0x17045(%rip)     # 0x1dec4
jne 0x708c
cmpb $0x0, 0x15(%rsp)
movl $0x80, %esi
movl $0x200, %eax            # imm = 0x200
cmovnsl %eax, %esi
movzwl 0x1c(%rsp), %edx
movl %edx, 0xc(%rsp)
xorl %ecx, %ecx
callq 0x7f07
testl %eax, %eax
je 0x71f4
leaq 0xddd1(%rip), %rdi      # 0x14c87
movl %ebx, %esi
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0xa03c
movb $-0x37, %al
jmp 0x708c
leaq 0x15b97(%rip), %rax     # 0x1ca68
movslq (%rax), %rax
leaq (%rax,%rax,2), %rax
leaq 0xd8b1(%rip), %rcx      # 0x14790
movzwl 0x4(%rcx,%rax,4), %edi
callq 0xa3f4
movb 0x16(%rsp), %al
movb %al, 0x15519(%rip)      # 0x1c40c
movb $0x0, 0x15511(%rip)     # 0x1c40b
movl $0x0, 0x1550c(%rip)     # 0x1c410
leaq 0x154fd(%rip), %rdi     # 0x1c408
callq 0x77da
movq %r15, %rdi
callq 0x8513
leaq 0x15b45(%rip), %rax     # 0x1ca64
cmpl $0x0, (%rax)
je 0x6c18
xorl %edi, %edi
leaq 0x50(%rsp), %rsi
callq 0x3130
cmpl $0x0, (%r13)
je 0x6c18
movl 0x50(%rsp), %eax
subl 0x60(%rsp), %eax
imull $0x3e8, %eax, %ecx      # imm = 0x3E8
movq 0x58(%rsp), %rax
subq 0x68(%rsp), %rax
movabsq $0x431bde82d7b634db, %rdx # imm = 0x431BDE82D7B634DB
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x12, %rdx
addl %eax, %edx
leal (%rdx,%rcx), %eax
cmpl $0x1, %eax
adcl %ecx, %edx
leaq 0xdaac(%rip), %rdi      # 0x14a2c
movq %r14, %rsi
xorl %eax, %eax
callq 0xa10f
jmp 0x6c18
movl $0x1, %edi
callq 0xa3f4
movq %r15, %rdi
callq 0x842a
movq %r15, %rdi
callq 0x8451
jmp 0x6ee9
movb 0x16(%rsp), %bpl
movzbl %bpl, %esi
leaq 0x16ec2(%rip), %rax     # 0x1de80
movq (%rax,%rsi,8), %rbx
testq %rbx, %rbx
je 0x709e
cmpb $0x0, 0xf4(%rbx)
je 0x709e
cmpl $0x0, 0x16ee5(%rip)     # 0x1dec4
je 0x712e
movb $-0x9, %al
xorl %ebx, %ebx
jmp 0x70b0
movl $0x1, %edi
callq 0xa3f4
leaq 0x15a6d(%rip), %rax     # 0x1ca6c
cmpl $0x0, (%rax)
jne 0x6ee9
movw $0x1801, 0x100(%rsp)    # imm = 0x1801
leaq 0x102(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x100(%rsp), %rdi
callq 0x77da
jmp 0x6f18
movl $0x1, %edi
callq 0xa3f4
movb 0x16(%rsp), %al
movb %al, 0x153be(%rip)      # 0x1c40c
movb $-0x30, 0x153b6(%rip)   # 0x1c40b
jmp 0x6efa
leaq 0xda9a(%rip), %rdi      # 0x14afb
xorl %eax, %eax
callq 0xa03c
movb %bl, 0x1539e(%rip)      # 0x1c40c
movb $-0x8, 0x15396(%rip)    # 0x1c40b
jmp 0x6efa
leaq 0xdbf3(%rip), %rdi      # 0x14c74
movl %ebx, %esi
xorl %eax, %eax
callq 0xa03c
movb $-0x8, %al
movb %bpl, 0x15379(%rip)     # 0x1c40c
movb %al, 0x15372(%rip)      # 0x1c40b
jmp 0x6efa
xorl %ebx, %ebx
leaq 0xd9ed(%rip), %rdi      # 0x14a94
xorl %eax, %eax
callq 0xa03c
movb $-0x8, %al
movb %bpl, 0x15355(%rip)     # 0x1c40c
movb %al, 0x1534e(%rip)      # 0x1c40b
movw %bx, 0x1534c(%rip)      # 0x1c410
movw $0x0, 0x15345(%rip)     # 0x1c412
jmp 0x6f04
movb %bl, 0x20(%rsp)
movq %rsi, 0x28(%rsp)
cmpb $0x0, 0x15(%rsp)
movl $0x80, %ebx
movl $0x200, %eax            # imm = 0x200
cmovnsl %eax, %ebx
movzwl 0x1c(%rsp), %edx
movzwl 0x1a(%rsp), %eax
movl %eax, 0x38(%rsp)
movzwl %ax, %ebp
leal -0x1(%rbp), %ecx
movq %rdi, 0x30(%rsp)
movl %ebx, %esi
movl %edx, 0xc(%rsp)
callq 0x7f07
testl %eax, %eax
je 0x71ac
leaq 0xd9ef(%rip), %rdi      # 0x14b0f
movq 0x28(%rsp), %rsi
movl 0xc(%rsp), %edx
jmp 0x71d7
movq %rsi, 0x20(%rsp)
cmpb $0x0, 0x15(%rsp)
movl $0x80, %esi
movl $0x200, %eax            # imm = 0x200
cmovnsl %eax, %esi
movzwl 0x1c(%rsp), %edx
movzwl 0x1a(%rsp), %eax
movl %eax, 0x30(%rsp)
movzwl %ax, %eax
movq %rax, 0x38(%rsp)
leal -0x1(%rax), %ecx
movq %rbx, %rdi
movl %esi, 0x28(%rsp)
movl %edx, 0xc(%rsp)
callq 0x7f07
testl %eax, %eax
jne 0x718c
movq %rbx, %rdi
movl 0x28(%rsp), %esi
movl 0xc(%rsp), %edx
xorl %ecx, %ecx
callq 0x7f07
testl %eax, %eax
je 0x7440
xorl %ebx, %ebx
leaq 0xd912(%rip), %rdi      # 0x14aa7
movq 0x20(%rsp), %rsi
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0xa03c
movb $-0x37, %al
jmp 0x70b0
movq %rbp, 0x48(%rsp)
movq 0x30(%rsp), %rdi
movl %ebx, %esi
movl 0xc(%rsp), %ebp
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x7f07
testl %eax, %eax
je 0x721a
leaq 0xd93f(%rip), %rdi      # 0x14b0f
movq 0x28(%rsp), %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0xa03c
movb 0x20(%rsp), %al
movb %al, 0x15224(%rip)      # 0x1c40c
movb $-0x37, 0x1521c(%rip)   # 0x1c40b
jmp 0x6efa
leaq 0x1586d(%rip), %rax     # 0x1ca68
movslq (%rax), %rax
leaq (%rax,%rax,2), %rax
leaq 0xd587(%rip), %rcx      # 0x14790
movzwl 0x6(%rcx,%rax,4), %edi
callq 0xa3f4
xorl %eax, %eax
jmp 0x708c
movq %rbx, 0x70(%rsp)
leaq 0x15842(%rip), %rax     # 0x1ca68
movslq (%rax), %rax
leaq (%rax,%rax,2), %rax
leaq 0xd55c(%rip), %rcx      # 0x14790
movzwl 0x6(%rcx,%rax,4), %edi
callq 0xa3f4
movl 0x38(%rsp), %ebx
testw %bx, %bx
movq 0x48(%rsp), %rbp
je 0x73a1
movl %ebp, %eax
movl %eax, 0x44(%rsp)
movq %r15, %rdi
movl $0x10, %esi
callq 0x859b
movq %r15, %rdi
callq 0x8513
cmpl $0x0, (%r13)
je 0x7280
leaq 0xd5e0(%rip), %rdi      # 0x14859
xorl %eax, %eax
callq 0xa10f
movb $-0x1, 0x7c(%rsp)
movb $-0x1, %bpl
movq %r15, %rdi
callq 0x8564
movb %al, 0x7c(%rsp)
cmpl $0x0, (%r13)
je 0x72b4
movzbl %al, %esi
movzbl %bpl, %edx
leaq 0xd579(%rip), %rdi      # 0x14822
xorl %eax, %eax
callq 0xa10f
movb 0x7c(%rsp), %al
xorb $0x4, %bpl
movl %eax, %ecx
xorb $0x4, %cl
orb %bpl, %cl
je 0x74f2
cmpb $0x10, %al
je 0x72fb
movzbl %al, %eax
cmpl $0x13, %eax
je 0x72dc
cmpl $0x2, %eax
jne 0x7318
jmp 0x755e
cmpl $0x0, (%r13)
je 0x72f1
leaq 0xd5b3(%rip), %rdi      # 0x1489d
xorl %eax, %eax
callq 0xa10f
movq %r15, %rdi
callq 0x840c
jmp 0x7318
cmpl $0x0, (%r13)
je 0x7310
leaq 0xd577(%rip), %rdi      # 0x14880
xorl %eax, %eax
callq 0xa10f
movq %r15, %rdi
callq 0x8415
movb 0x7c(%rsp), %bpl
cmpb $0x1, %bpl
jne 0x7288
movq %r15, %rdi
callq 0x8564
movb %al, 0x7d(%rsp)
leaq 0x7c(%rsp), %rdi
callq 0x774a
testl %eax, %eax
movl 0x38(%rsp), %ebx
jne 0x75bc
movzbl 0x7d(%rsp), %edx
movq 0x30(%rsp), %rdi
leaq 0x7e(%rsp), %rsi
callq 0x8068
movzbl 0x7d(%rsp), %ecx
cmpl %ecx, %eax
jne 0x75c5
leaq 0x156f7(%rip), %rax     # 0x1ca68
movslq (%rax), %rax
leaq (%rax,%rax,2), %rax
leaq 0xd411(%rip), %rcx      # 0x14790
movzwl 0xa(%rcx,%rax,4), %edi
callq 0xa3f4
movzbl 0x7d(%rsp), %eax
movl 0x44(%rsp), %ecx
subl %eax, %ecx
movl %ecx, %eax
movq 0x48(%rsp), %rbp
jg 0x7252
movq 0x70(%rsp), %rdx
leal -0x1(%rdx), %eax
andw %bx, %ax
movb 0x20(%rsp), %sil
je 0x742d
movzwl %ax, %eax
subl %eax, %edx
movq %rdx, %rbx
movslq %edx, %rdx
leaq 0x100(%rsp), %rdi
xorl %esi, %esi
callq 0x3220
cmpl $0x0, (%r13)
je 0x73e9
leaq 0xd842(%rip), %rdi      # 0x14c1d
movq 0x28(%rsp), %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0xa10f
movq 0x30(%rsp), %rdi
leaq 0x100(%rsp), %rsi
movl %ebx, %edx
callq 0x8068
cmpl %ebx, %eax
jne 0x7582
leaq 0x1565c(%rip), %rax     # 0x1ca68
movslq (%rax), %rax
leaq (%rax,%rax,2), %rax
leaq 0xd376(%rip), %rcx      # 0x14790
movzwl 0xa(%rcx,%rax,4), %edi
callq 0xa3f4
movl 0x38(%rsp), %ebx
movb 0x20(%rsp), %sil
movb %sil, 0x14fd8(%rip)     # 0x1c40c
movb $0x0, 0x14fd0(%rip)     # 0x1c40b
jmp 0x70bd
leaq 0x15621(%rip), %rax     # 0x1ca68
movslq (%rax), %rax
leaq (%rax,%rax,2), %rax
leaq 0xd33b(%rip), %rcx      # 0x14790
movzwl 0x6(%rcx,%rax,4), %edi
callq 0xa3f4
cmpw $0x0, 0x30(%rsp)
je 0x7525
movb %bpl, 0x28(%rsp)
movq 0x38(%rsp), %rax
movl %eax, %ebp
movb $0x1, 0x100(%rsp)
movl $0x80, %eax
cmpl %eax, %ebp
movl $0x80, %edx
cmovbl %ebp, %edx
movb %dl, 0x101(%rsp)
movq %rbx, %rdi
leaq 0x102(%rsp), %rsi
callq 0x7fe3
movzbl 0x101(%rsp), %ecx
cmpl %ecx, %eax
jne 0x7530
leaq 0x100(%rsp), %rdi
callq 0x77da
leaq 0x155a3(%rip), %rax     # 0x1ca68
movslq (%rax), %rax
leaq (%rax,%rax,2), %rax
leaq 0xd2bd(%rip), %rcx      # 0x14790
movzwl 0x8(%rcx,%rax,4), %edi
callq 0xa3f4
movzbl 0x101(%rsp), %ecx
xorl %eax, %eax
subl %ecx, %ebp
jg 0x7477
movb 0x28(%rsp), %bpl
jmp 0x7527
movq %r15, %rdi
movl $0x10, %esi
callq 0x859b
movq %r15, %rdi
callq 0x8513
cmpl $0x0, (%r13)
je 0x6f18
leaq 0xd617(%rip), %rdi      # 0x14b30
xorl %eax, %eax
callq 0xa10f
jmp 0x6f18
xorl %eax, %eax
movl 0x30(%rsp), %ebx
jmp 0x70b0
leaq 0xd590(%rip), %rdi      # 0x14ac7
movq 0x20(%rsp), %rsi
movl 0xc(%rsp), %edx
movq 0x38(%rsp), %rcx
xorl %eax, %eax
callq 0xa03c
movl 0x30(%rsp), %ebx
subl %ebp, %ebx
movb $-0x2, %al
movb 0x28(%rsp), %bpl
jmp 0x70b0
leaq 0xd5fa(%rip), %rdi      # 0x14b5f
xorl %eax, %eax
callq 0xa03c
movb 0x20(%rsp), %al
movb %al, 0x14e96(%rip)      # 0x1c40c
movb $-0x11, 0x14e8e(%rip)   # 0x1c40b
jmp 0x6efa
leaq 0xd6b6(%rip), %rdi      # 0x14c3f
movq 0x28(%rsp), %rsi
movl 0xc(%rsp), %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0xa03c
movb 0x20(%rsp), %al
movb %al, 0x14e67(%rip)      # 0x1c40c
movb $-0x2, 0x14e5f(%rip)    # 0x1c40b
movl 0x38(%rsp), %eax
movw %ax, 0x14e59(%rip)      # 0x1c410
jmp 0x70c4
leaq 0xd5ce(%rip), %rdi      # 0x14b91
jmp 0x7565
subl 0x44(%rsp), %ebx
cmpl $-0x2, %eax
movq 0x48(%rsp), %rcx
jne 0x7600
leaq 0xd5cb(%rip), %rdi      # 0x14ba5
movq 0x28(%rsp), %rsi
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0xa03c
movb 0x20(%rsp), %al
movb %al, 0x14e18(%rip)      # 0x1c40c
movb $-0xb, 0x14e10(%rip)    # 0x1c40b
jmp 0x70bd
leaq 0xd5db(%rip), %rdi      # 0x14be2
movq 0x28(%rsp), %rsi
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0xa03c
movb 0x20(%rsp), %al
movb %al, 0x14deb(%rip)      # 0x1c40c
movb $-0x2, 0x14de3(%rip)    # 0x1c40b
jmp 0x70bd