// File: /workspace/github_c_makefile_star2_O2/aap[P]pdp11/ka11.c
// Function: step
void
step(KA11 *cpu)
{
	uint by;
	uint br;
	uint b;
	uint c;
	uint src, dst, sf, df, sm, dm;
	word mask, sign;
	int inhov;
	byte oldpsw;

//	printf("fetch from %06o\n", cpu->r[7]);
//	printstate(cpu);

#define SP	cpu->r[6]
#define PC	cpu->r[7]
#define SR	cpu->r[010]
#define DR	cpu->r[011]
#define TV	cpu->r[012]
#define BA	cpu->ba
#define PSW	cpu->psw
#define RD_B	if(sm != 0) if(readop(cpu, 010, src, by)) goto be;\
		if(dm != 0) if(readop(cpu, 011, dst, by)) goto be;\
		if(sm == 0) fetchop(cpu, 010, src, by);\
		if(dm == 0) fetchop(cpu, 011, dst, by)
#define RD_U	if(dm != 0) if(readop(cpu, 011, dst, by)) goto be;\
		if(dm == 0) fetchop(cpu, 011, dst, by);\
		SR = DR
#define WR	if(writedest(cpu, b, by)) goto be
#define NZ	setnz(cpu, b)
#define SVC	goto service
#define TRAP(v)	TV = v; goto trap
#define CLC	cpu->psw &= ~PSW_C
#define CLV	cpu->psw &= ~PSW_V
#define CLCV	cpu->psw &= ~(PSW_V|PSW_C)
#define SEV	cpu->psw |= PSW_V
#define SEC	cpu->psw |= PSW_C
#define C	if(b & 0200000) SEC
#define NC	if((b & 0200000) == 0) SEC
#define BXT	if(by) b = sxt(b)
#define BR	PC += br
#define CBR(c)	if(((c)>>(cpu->psw&017)) & 1) BR
#define PUSH	SP -= 2; if(!inhov && (SP&~0377) == 0) cpu->traps |= TRAP_STACK
#define POP	SP += 2
#define OUT(a,d)	cpu->ba = (a); cpu->bus->data = (d); if(dato(cpu, 0)) goto be
#define IN(d)	if(dati(cpu, 0)) goto be; d = cpu->bus->data
#define INA(a,d)	cpu->ba = a; if(dati(cpu, 0)) goto be; d = cpu->bus->data
#define TR(m)	trace("%06o "#m"\n", PC-2)
#define TRB(m)	trace("%06o "#m"%s\n", PC-2, by ? "B" : "")

	oldpsw = PSW;

	trace("fetch from %06o\n", PC);
	tracestate(cpu);
	cpu->ba = PC;
	PC += 2;	/* increment even on bus error */
	IN(cpu->ir);

	by = !!(cpu->ir&B15);
	br = sxt(cpu->ir)<<1;
	src = cpu->ir>>6 & 077;
	sf = src & 7;
	sm = src>>3 & 7;
	dst = cpu->ir & 077;
	df = dst & 7;
	dm = dst>>3 & 7;
	if(by || (cpu->ir&0077700) == 0300)
		mask = M8, sign = B7;
	else
		mask = M16, sign = B15;

	inhov = 0;
	/* Binary */
	switch(cpu->ir & 0170000){
	case 0110000: case 0010000:	TRB(MOV);
		RD_B; CLV;
		b = SR; NZ;
		if(dm==0) cpu->r[df] = SR;
		else writedest(cpu, SR, by);
		SVC;
	case 0120000: case 0020000:	TRB(CMP);
		RD_B; CLCV;
		b = SR + W(~DR) + 1; NC; BXT;
		if(sgn((SR ^ DR) & ~(DR ^ b))) SEV;
		NZ; SVC;
	case 0130000: case 0030000:	TRB(BIT);
		RD_B; CLV;
		b = DR & SR;
		NZ; SVC;
	case 0140000: case 0040000:	TRB(BIC);
		RD_B; CLV;
		b = DR & ~SR;
		NZ; WR; SVC;
	case 0150000: case 0050000:	TRB(BIS);
		RD_B; CLV;
		b = DR | SR;
		NZ; WR; SVC;
	case 0060000:			TR(ADD);
		by = 0; RD_B; CLCV;
		b = SR + DR; C;
		if(sgn(~(SR ^ DR) & (DR ^ b))) SEV;
		NZ; WR; SVC;
	case 0160000:			TR(SUB);
		by = 0; RD_B; CLCV;
		b = DR + W(~SR) + 1; NC;
		if(sgn((SR ^ DR) & (DR ^ b))) SEV;
		NZ; WR; SVC;

	/* Reserved instructions */
	case 0170000: case 0070000: goto ri;
	}

	/* Unary */
	switch(cpu->ir & 0007700){
	case 0005000:	TRB(CLR);
		RD_U; CLCV;
		b = 0;
		NZ; WR; SVC;
	case 0005100:	TRB(COM);
		RD_U; CLV; SEC;
		b = W(~SR);
		NZ; WR; SVC;
	case 0005200:	TRB(INC);
		RD_U; CLV;
		b = W(SR+1); BXT;
		if(sgn(~SR&b)) SEV;
		NZ; WR; SVC;
	case 0005300:	TRB(DEC);
		RD_U; CLV;
		b = W(SR+~0); BXT;
		if(sgn(SR&~b)) SEV;
		NZ; WR; SVC;
	case 0005400:	TRB(NEG);
		RD_U; CLCV;
		b = W(~SR+1); BXT; if(b) SEC;
		if(sgn(b&SR)) SEV;
		NZ; WR; SVC;
	case 0005500:	TRB(ADC);
		RD_U; c = ISSET(PSW_C); CLCV;
		b = SR + c; C; BXT;
		if(sgn(~SR&b)) SEV;
		NZ; WR; SVC;
	case 0005600:	TRB(SBC);
		RD_U; c = !ISSET(PSW_C)-1; CLCV;
		b = W(SR+c); if(c && SR == 0) SEC; BXT;
		if(sgn(SR&~b)) SEV;
		NZ; WR; SVC;
	case 0005700:	TRB(TST);
		RD_U; CLCV;
		b = SR;
		NZ; SVC;

	case 0006000:	TRB(ROR);
		RD_U; c = ISSET(PSW_C); CLCV;
		b = (SR&mask) >> 1; if(c) b |= sign; if(SR & 1) SEC; BXT;
		if((PSW>>3^PSW)&1) SEV;
		NZ; WR; SVC;
	case 0006100:	TRB(ROL);
		RD_U; c = ISSET(PSW_C); CLCV;
		b = (SR<<1) & mask; if(c) b |= 1; if(SR & B15) SEC; BXT;
		if((PSW>>3^PSW)&1) SEV;
		NZ; WR; SVC;
	case 0006200:	TRB(ASR);
		RD_U; c = ISSET(PSW_C); CLCV;
		b = W(SR>>1) | SR&B15; if(SR & 1) SEC; BXT;
		if((PSW>>3^PSW)&1) SEV;
		NZ; WR; SVC;
	case 0006300:	TRB(ASL);
		RD_U; CLCV;
		b = W(SR<<1); if(SR & B15) SEC; BXT;
		if((PSW>>3^PSW)&1) SEV;
		NZ; WR; SVC;

	case 0006400:
	case 0006500:
	case 0006600:
	case 0006700:
		goto ri;

	}

	switch(cpu->ir & 0107400){
	case 0004000:
	case 0004400:	TR(JSR);
		if(dm == 0) goto ill;
		if(addrop(cpu, dst, 0)) goto be;
		DR = cpu->b;
		PUSH; OUT(SP, cpu->r[sf]);
		cpu->r[sf] = PC; PC = DR;
		SVC;
	case 0104000:	TR(EMT); TRAP(030);
	case 0104400:	TR(TRAP); TRAP(034);
	}

	/* Branches */
	switch(cpu->ir & 0103400){
	case 0000400:	TR(BR); BR; SVC;
	case 0001000:	TR(BNE); CBR(0x0F0F); SVC;
	case 0001400:	TR(BEQ); CBR(0xF0F0); SVC;
	case 0002000:	TR(BGE); CBR(0xCC33); SVC;
	case 0002400:	TR(BLT); CBR(0x33CC); SVC;
	case 0003000:	TR(BGT); CBR(0x0C03); SVC;
	case 0003400:	TR(BLE); CBR(0xF3FC); SVC;
	case 0100000:	TR(BPL); CBR(0x00FF); SVC;
	case 0100400:	TR(BMI); CBR(0xFF00); SVC;
	case 0101000:	TR(BHI); CBR(0x0505); SVC;
	case 0101400:	TR(BLOS); CBR(0xFAFA); SVC;
	case 0102000:	TR(BVC); CBR(0x3333); SVC;
	case 0102400:	TR(BVS); CBR(0xCCCC); SVC;
	case 0103000:	TR(BCC); CBR(0x5555); SVC;
	case 0103400:	TR(BCS); CBR(0xAAAA); SVC;
	}

	// Hope we caught all instructions we meant to
	assert((cpu->ir & 0177400) == 0);

	/* Misc */
	switch(cpu->ir & 0300){
	case 0100:	TR(JMP);
		if(dm == 0) goto ill;
		if(addrop(cpu, dst, 0)) goto be;
		PC = cpu->b;
		SVC;
	case 0200:
	switch(cpu->ir&070){
	case 000:	TR(RTS);
		BA = SP; POP;
		PC = cpu->r[df];
		IN(cpu->r[df]);
		SVC;
	case 010: case 020: case 030:
		goto ri;
	case 040: case 050:	TR(CCC); PSW &= ~(cpu->ir&017); SVC;
	case 060: case 070:	TR(SEC); PSW |= cpu->ir&017; SVC;
	}
	case 0300:	TR(SWAB);
		RD_U; CLC;
		b = WD(DR & 0377, (DR>>8) & 0377);
		NZ; WR; SVC;
	}

	/* Operate */
	switch(cpu->ir & 7){
	case 0:	TR(HALT); cpu->state = STATE_HALTED; return;
	case 1:	TR(WAIT); cpu->state = STATE_WAITING; SVC;
	case 2:	TR(RTI);
		BA = SP; POP; IN(PC);
		BA = SP; POP; IN(PSW);
		SVC;
	case 3:	TR(BPT); TRAP(014);
	case 4:	TR(IOT); TRAP(020);
	case 5:	TR(RESET); reset(cpu); SVC;
	}

	// All other instructions should be reserved now

ri:	TRAP(010);
ill:	TRAP(4);
be:	if(cpu->be > 1){
		printf("double bus error, HALT\n");
		cpu->state = STATE_HALTED;
		return;
	}
printf("bus error %o\n", cpu->bus->addr);
	TRAP(4);

trap:
	trace("TRAP %o\n", TV);
	PUSH; OUT(SP, PSW);
	PUSH; OUT(SP, PC);
	INA(TV, PC);
	INA(TV+2, PSW);
	/* no trace trap after a trap */
	oldpsw = PSW;

	tracestate(cpu);
	return;		// TODO: is this correct?
//	SVC;

service:
	c = PSW >> 5;
	if(oldpsw & PSW_T){
		oldpsw &= ~PSW_T;
		TRAP(014);
	}else if(cpu->traps & TRAP_STACK){
		cpu->traps &= ~TRAP_STACK;
		inhov = 1;
		TRAP(4);
	}else if(cpu->traps & TRAP_PWR){
		cpu->traps &= ~TRAP_PWR;
		TRAP(024);
	}else if(c < 7 && cpu->traps & TRAP_BR7){
		cpu->traps &= ~TRAP_BR7;
		TRAP(cpu->br[3].bg(cpu->br[3].dev));
	}else if(c < 6 && cpu->traps & TRAP_BR6){
		cpu->traps &= ~TRAP_BR6;
		TRAP(cpu->br[2].bg(cpu->br[2].dev));
	}else if(c < 5 && cpu->traps & TRAP_BR5){
		cpu->traps &= ~TRAP_BR5;
		TRAP(cpu->br[1].bg(cpu->br[1].dev));
	}else if(c < 4 && cpu->traps & TRAP_BR4){
		cpu->traps &= ~TRAP_BR4;
		TRAP(cpu->br[0].bg(cpu->br[0].dev));
	}else
	// TODO? console stop
		/* fetch next instruction */
		return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movb 0x30(%rdi), %bpl
cmpl $0x0, 0x11042(%rip)     # 0x13cc8
je 0x2c9a
movzwl 0xe(%rbx), %esi
leaq 0x4579(%rip), %rdi      # 0x720c
xorl %eax, %eax
callq 0x20a0
movq %rbx, %rdi
callq 0x2914
movzwl 0xe(%rbx), %eax
movw %ax, 0x22(%rbx)
addl $0x2, %eax
movw %ax, 0xe(%rbx)
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2ad3
pushq $0x4
popq %r13
testl %eax, %eax
jne 0x46c3
movb %bpl, 0xf(%rsp)
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %edi
movw %di, 0x24(%rbx)
testw %di, %di
sets %bpl
movl %edi, %eax
shrl $0xf, %eax
movl %eax, 0x1c(%rsp)
movl $0xff, %r12d
movl %edi, 0x14(%rsp)
andl %r12d, %edi
callq 0x2402
movzwl 0x24(%rbx), %ecx
movl %ecx, %r15d
shrl $0x6, %r15d
movl %ecx, %edx
andl $0x3f, %edx
movl %edx, 0x10(%rsp)
movl %ecx, %edi
andl $0x7, %edi
movl %ecx, %edx
shrl $0x3, %edx
andl $0x7, %edx
movl %edx, 0x18(%rsp)
movl %ecx, %edx
andl $0x7fc0, %edx           # imm = 0x7FC0
cmpl $0xc0, %edx
sete %dl
orb %bpl, %dl
movl $0xffff, %r8d           # imm = 0xFFFF
cmovnel %r12d, %r8d
movl $0x80, %edx
movl $0x8000, %r13d          # imm = 0x8000
cmovnel %edx, %r13d
leal -0x1000(%rcx), %edx
shrl $0xc, %edx
pushq $0x8
popq %rbp
movw $0x8, %r12w
cmpl $0xe, %edx
ja 0x3426
movl %r15d, %esi
andl $0x3f, %esi
movl %esi, 0x20(%rsp)
movl %ecx, %esi
shrl $0x9, %esi
movl %esi, 0x24(%rsp)
leaq 0x42ed(%rip), %rsi      # 0x7070
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
cmpl $0x0, 0x10f35(%rip)     # 0x13cc8
je 0x2dc8
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x4480(%rip), %rax      # 0x7229
leaq 0x48ec(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
movq %rdi, %r14
leaq 0x445f(%rip), %rdi      # 0x721d
xorl %eax, %eax
callq 0x20a0
movq %r14, %rdi
movl 0x24(%rsp), %r15d
testb $0x7, %r15b
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movl 0x1c(%rsp), %r14d
je 0x2e07
pushq $0x8
popq %rsi
movl %r12d, %ebp
movq %rdi, %r12
movq %rbx, %rdi
movl 0x20(%rsp), %edx
movl %r14d, %ecx
callq 0x4814
movq %r12, %rdi
movl %ebp, %r12d
testl %eax, %eax
jne 0x323f
cmpl $0x0, 0x18(%rsp)
je 0x2e34
pushq $0x9
popq %rsi
movl %r12d, %ebp
movq %rdi, %r12
movq %rbx, %rdi
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4814
movq %r12, %rdi
movl %ebp, %r12d
testl %eax, %eax
jne 0x323f
testb $0x7, %r15b
jne 0x2e52
pushq $0x8
popq %rsi
movq %rdi, %r15
movq %rbx, %rdi
movl 0x20(%rsp), %edx
movl %r14d, %ecx
callq 0x4856
movq %r15, %rdi
movl %r14d, %ebp
movq %rdi, %r15
movl 0x18(%rsp), %r14d
testl %r14d, %r14d
jne 0x2e73
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
andb $-0x3, 0x30(%rbx)
movzwl 0x10(%rbx), %esi
movq %rbx, %rdi
callq 0x48c8
movzwl 0x10(%rbx), %eax
testl %r14d, %r14d
je 0x45db
movzwl %ax, %esi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x48ea
jmp 0x45e0
cmpl $0x0, 0x10e1f(%rip)     # 0x13cc8
je 0x2ed8
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x436a(%rip), %rax      # 0x7229
leaq 0x47d6(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x435a(%rip), %rdi      # 0x722b
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %r15d
testb $0x7, %r15b
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movl 0x1c(%rsp), %ebp
movl 0x18(%rsp), %r14d
je 0x2f0e
pushq $0x8
popq %rsi
movq %rbx, %rdi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
jne 0x323f
testl %r14d, %r14d
je 0x2f2c
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
jne 0x323f
testb $0x7, %r15b
jne 0x2f43
pushq $0x8
popq %rsi
movq %rbx, %rdi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
testl %r14d, %r14d
jne 0x2f59
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
movb 0x30(%rbx), %dl
andb $-0x4, %dl
movb %dl, 0x30(%rbx)
movzwl 0x10(%rbx), %eax
movzwl 0x12(%rbx), %ecx
movl %ecx, %esi
xorl $0xffff, %esi           # imm = 0xFFFF
leal (%rax,%rsi), %ebp
incl %ebp
btl $0x10, %ebp
jb 0x2f83
orb $0x1, %dl
movb %dl, 0x30(%rbx)
cmpw $0x0, 0x14(%rsp)
jns 0x2f9f
movzbl %bpl, %edi
callq 0x2402
movzwl %ax, %ebp
movzwl 0x10(%rbx), %eax
movzwl 0x12(%rbx), %ecx
xorl %ecx, %eax
xorl %ebp, %ecx
notl %ecx
andl %eax, %ecx
movzwl %cx, %edi
callq 0x23fc
testw %ax, %ax
je 0x2fb8
orb $0x2, 0x30(%rbx)
movzwl %bp, %esi
jmp 0x3152
cmpl $0x0, 0x10d01(%rip)     # 0x13cc8
je 0x2ff6
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x424c(%rip), %rax      # 0x7229
leaq 0x46b8(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x4260(%rip), %rdi      # 0x724f
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %r15d
testb $0x7, %r15b
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movl 0x1c(%rsp), %ebp
movl 0x18(%rsp), %r14d
je 0x302c
pushq $0x8
popq %rsi
movq %rbx, %rdi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
jne 0x323f
testl %r14d, %r14d
je 0x304a
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
jne 0x323f
testb $0x7, %r15b
jne 0x3061
pushq $0x8
popq %rsi
movq %rbx, %rdi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
testl %r14d, %r14d
jne 0x3077
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
andb $-0x3, 0x30(%rbx)
movzwl 0x10(%rbx), %eax
orw 0x12(%rbx), %ax
movzwl %ax, %r14d
jmp 0x321f
cmpl $0x0, 0x10c35(%rip)     # 0x13cc8
je 0x30c2
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x4180(%rip), %rax      # 0x7229
leaq 0x45ec(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x417c(%rip), %rdi      # 0x7237
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %r15d
testb $0x7, %r15b
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movl 0x1c(%rsp), %ebp
movl 0x18(%rsp), %r14d
je 0x30f8
pushq $0x8
popq %rsi
movq %rbx, %rdi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
jne 0x323f
testl %r14d, %r14d
je 0x3116
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
jne 0x323f
testb $0x7, %r15b
jne 0x312d
pushq $0x8
popq %rsi
movq %rbx, %rdi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
testl %r14d, %r14d
jne 0x3143
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
andb $-0x3, 0x30(%rbx)
movzwl 0x10(%rbx), %eax
andw 0x12(%rbx), %ax
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x48c8
jmp 0x45e0
cmpl $0x0, 0x10b62(%rip)     # 0x13cc8
je 0x3195
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x40ad(%rip), %rax      # 0x7229
leaq 0x4519(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x40b5(%rip), %rdi      # 0x7243
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %r15d
testb $0x7, %r15b
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movl 0x1c(%rsp), %ebp
movl 0x18(%rsp), %r14d
je 0x31c7
pushq $0x8
popq %rsi
movq %rbx, %rdi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
jne 0x323f
testl %r14d, %r14d
je 0x31e1
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
jne 0x323f
testb $0x7, %r15b
jne 0x31f8
pushq $0x8
popq %rsi
movq %rbx, %rdi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
testl %r14d, %r14d
jne 0x320e
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
andb $-0x3, 0x30(%rbx)
movl 0x10(%rbx), %eax
notl %eax
andw 0x12(%rbx), %ax
movzwl %ax, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x48c8
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x48ea
testl %eax, %eax
je 0x45e0
xorl %r14d, %r14d
jmp 0x46c3
cmpl $0x0, 0x10a7a(%rip)     # 0x13cc8
je 0x3265
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x4007(%rip), %rdi      # 0x7265
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %ebp
testb $0x7, %bpl
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
je 0x3294
pushq $0x8
popq %rsi
xorl %r14d, %r14d
movq %rbx, %rdi
movl 0x20(%rsp), %edx
xorl %ecx, %ecx
callq 0x4814
testl %eax, %eax
jne 0x46c3
cmpl $0x0, 0x18(%rsp)
je 0x32b7
pushq $0x9
popq %rsi
xorl %r14d, %r14d
movq %rbx, %rdi
movl 0x10(%rsp), %edx
xorl %ecx, %ecx
callq 0x4814
testl %eax, %eax
jne 0x46c3
testb $0x7, %bpl
jne 0x32ce
pushq $0x8
popq %rsi
movq %rbx, %rdi
movl 0x20(%rsp), %edx
xorl %ecx, %ecx
callq 0x4856
cmpl $0x0, 0x18(%rsp)
jne 0x32e6
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
xorl %ecx, %ecx
callq 0x4856
movb 0x30(%rbx), %dl
andb $-0x4, %dl
movb %dl, 0x30(%rbx)
movzwl 0x12(%rbx), %eax
movzwl 0x10(%rbx), %ecx
movl %ecx, %esi
xorl $0xffff, %esi           # imm = 0xFFFF
leal (%rax,%rsi), %ebp
incl %ebp
btl $0x10, %ebp
jb 0x3310
orb $0x1, %dl
movb %dl, 0x30(%rbx)
xorl %eax, %ecx
movl %ebp, %edx
xorl %eax, %edx
andl %ecx, %edx
movzwl %dx, %edi
jmp 0x33ef
cmpl $0x0, 0x109a1(%rip)     # 0x13cc8
je 0x333e
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3f24(%rip), %rdi      # 0x725b
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %ebp
testb $0x7, %bpl
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
je 0x336d
pushq $0x8
popq %rsi
xorl %r14d, %r14d
movq %rbx, %rdi
movl 0x20(%rsp), %edx
xorl %ecx, %ecx
callq 0x4814
testl %eax, %eax
jne 0x46c3
cmpl $0x0, 0x18(%rsp)
je 0x3390
pushq $0x9
popq %rsi
xorl %r14d, %r14d
movq %rbx, %rdi
movl 0x10(%rsp), %edx
xorl %ecx, %ecx
callq 0x4814
testl %eax, %eax
jne 0x46c3
testb $0x7, %bpl
jne 0x33a7
pushq $0x8
popq %rsi
movq %rbx, %rdi
movl 0x20(%rsp), %edx
xorl %ecx, %ecx
callq 0x4856
cmpl $0x0, 0x18(%rsp)
jne 0x33bf
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
xorl %ecx, %ecx
callq 0x4856
movb 0x30(%rbx), %dl
andb $-0x4, %dl
movb %dl, 0x30(%rbx)
movzwl 0x10(%rbx), %eax
movzwl 0x12(%rbx), %ecx
movl %eax, %ebp
addl %ecx, %ebp
cmpl $0x10000, %ebp          # imm = 0x10000
jb 0x33e2
orb $0x1, %dl
movb %dl, 0x30(%rbx)
movl %ebp, %edx
xorl %ecx, %edx
xorl %ecx, %eax
notl %eax
andl %edx, %eax
movzwl %ax, %edi
callq 0x23fc
testw %ax, %ax
je 0x33fd
orb $0x2, 0x30(%rbx)
movzwl %bp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x48c8
xorl %r14d, %r14d
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x48ea
testl %eax, %eax
jne 0x46c3
jmp 0x45e0
movl %ecx, %edx
andl $0xfc0, %edx            # imm = 0xFC0
addl $0xfffff600, %edx       # imm = 0xFFFFF600
shrl $0x6, %edx
cmpl $0xf, %edx
ja 0x397c
leaq 0x3c65(%rip), %rax      # 0x70ac
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
pushq $0x4
popq %r13
jmp 0x46ea
cmpl $0x0, 0x10868(%rip)     # 0x13cc8
je 0x348f
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x3db3(%rip), %rax      # 0x7229
leaq 0x421f(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3e5f(%rip), %rdi      # 0x72e7
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movl 0x1c(%rsp), %ebp
pushq $0x9
popq %rsi
movq %rbx, %rdi
je 0x3a57
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x323f
jmp 0x3a6b
cmpl $0x0, 0x107fc(%rip)     # 0x13cc8
je 0x34fb
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x3d47(%rip), %rax      # 0x7229
leaq 0x41b3(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3dcf(%rip), %rdi      # 0x72c3
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movb 0xf(%rsp), %r12b
movl 0x1c(%rsp), %ecx
pushq $0x9
popq %rsi
movq %rbx, %rdi
je 0x3aa2
movl 0x10(%rsp), %edx
callq 0x4814
testl %eax, %eax
pushq $0x4
popq %r13
jne 0x323f
jmp 0x3aaf
cmpl $0x0, 0x10792(%rip)     # 0x13cc8
je 0x3565
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x3cdd(%rip), %rax      # 0x7229
leaq 0x4149(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3d11(%rip), %rdi      # 0x726f
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movb 0xf(%rsp), %r12b
movl 0x1c(%rsp), %ebp
pushq $0x9
popq %rsi
movq %rbx, %rdi
je 0x3ac0
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
pushq $0x4
popq %r13
jne 0x323f
jmp 0x3acf
movl %r8d, %r14d
cmpl $0x0, 0x10723(%rip)     # 0x13cc8
je 0x35d4
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x3c6e(%rip), %rax      # 0x7229
leaq 0x40da(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3d02(%rip), %rdi      # 0x72cf
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movl 0x1c(%rsp), %ebp
pushq $0x9
popq %rsi
movq %rbx, %rdi
je 0x3af0
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
movb 0xf(%rsp), %r12b
je 0x3b00
xorl %r14d, %r14d
pushq $0x4
popq %r13
jmp 0x46c3
cmpl $0x0, 0x106b4(%rip)     # 0x13cc8
je 0x3643
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x3bff(%rip), %rax      # 0x7229
leaq 0x406b(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3c6f(%rip), %rdi      # 0x72ab
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movl 0x1c(%rsp), %r15d
pushq $0x9
popq %rsi
movq %rbx, %rdi
je 0x3b7e
movl 0x10(%rsp), %edx
movl %r15d, %ecx
callq 0x4814
testl %eax, %eax
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x323f
jmp 0x3b93
cmpl $0x0, 0x10646(%rip)     # 0x13cc8
je 0x36b1
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x3b91(%rip), %rax      # 0x7229
leaq 0x3ffd(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3c49(%rip), %rdi      # 0x72f3
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movl 0x1c(%rsp), %ebp
pushq $0x9
popq %rsi
movq %rbx, %rdi
je 0x3bd8
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x323f
jmp 0x3bec
cmpl $0x0, 0x105da(%rip)     # 0x13cc8
je 0x371d
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x3b25(%rip), %rax      # 0x7229
leaq 0x3f91(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3b7d(%rip), %rdi      # 0x7293
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movl 0x1c(%rsp), %r15d
pushq $0x9
popq %rsi
movq %rbx, %rdi
je 0x3c37
movl 0x10(%rsp), %edx
movl %r15d, %ecx
callq 0x4814
testl %eax, %eax
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x323f
jmp 0x3c4c
cmpl $0x0, 0x1056c(%rip)     # 0x13cc8
je 0x378b
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x3ab7(%rip), %rax      # 0x7229
leaq 0x3f23(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3af7(%rip), %rdi      # 0x727b
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movb 0xf(%rsp), %r12b
movl 0x1c(%rsp), %ebp
pushq $0x9
popq %rsi
movq %rbx, %rdi
je 0x3c7d
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4814
testl %eax, %eax
pushq $0x4
popq %r13
jne 0x323f
jmp 0x3c8c
movl %r8d, %r15d
cmpl $0x0, 0x104fd(%rip)     # 0x13cc8
je 0x37fa
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x3a48(%rip), %rax      # 0x7229
leaq 0x3eb4(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3ae8(%rip), %rdi      # 0x72db
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movl 0x1c(%rsp), %r14d
pushq $0x9
popq %rsi
movq %rbx, %rdi
je 0x3cac
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4814
testl %eax, %eax
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x323f
jmp 0x3cc1
cmpl $0x0, 0x1048f(%rip)     # 0x13cc8
je 0x3868
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x39da(%rip), %rax      # 0x7229
leaq 0x3e46(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3a26(%rip), %rdi      # 0x7287
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movl 0x1c(%rsp), %r15d
pushq $0x9
popq %rsi
movq %rbx, %rdi
je 0x3d29
movl 0x10(%rsp), %edx
movl %r15d, %ecx
callq 0x4814
testl %eax, %eax
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x323f
jmp 0x3d3e
cmpl $0x0, 0x10421(%rip)     # 0x13cc8
je 0x38d6
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x396c(%rip), %rax      # 0x7229
leaq 0x3dd8(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x39e8(%rip), %rdi      # 0x72b7
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movl 0x1c(%rsp), %r15d
pushq $0x9
popq %rsi
movq %rbx, %rdi
je 0x3d70
movl 0x10(%rsp), %edx
movl %r15d, %ecx
callq 0x4814
testl %eax, %eax
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x323f
jmp 0x3d85
cmpl $0x0, 0x103b3(%rip)     # 0x13cc8
je 0x3944
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x14(%rsp)
leaq 0x38fe(%rip), %rax      # 0x7229
leaq 0x3d6a(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3962(%rip), %rdi      # 0x729f
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movl 0x1c(%rsp), %r15d
pushq $0x9
popq %rsi
movq %rbx, %rdi
je 0x3dce
movl 0x10(%rsp), %edx
movl %r15d, %ecx
callq 0x4814
testl %eax, %eax
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x323f
jmp 0x3de3
movl %ecx, %edx
andl $0x8f00, %edx           # imm = 0x8F00
cmpl $0x800, %edx            # imm = 0x800
pushq $0x4
popq %r13
je 0x39b4
cmpl $0x8900, %edx           # imm = 0x8900
je 0x3e6c
cmpl $0x8800, %edx           # imm = 0x8800
je 0x3e91
cmpl $0x900, %edx            # imm = 0x900
jne 0x3ec3
cmpl $0x0, 0x1030d(%rip)     # 0x13cc8
je 0x39d2
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3934(%rip), %rdi      # 0x72ff
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
movb 0xf(%rsp), %r12b
je 0x3faf
xorl %r14d, %r14d
movq %rbx, %rdi
movl 0x10(%rsp), %esi
xorl %edx, %edx
callq 0x4936
testl %eax, %eax
jne 0x46c3
andl $0x7, %r15d
movzwl 0x20(%rbx), %eax
movw %ax, 0x12(%rbx)
movl 0xc(%rbx), %eax
addl $-0x2, %eax
movw %ax, 0xc(%rbx)
cmpw $0xff, %ax
ja 0x3a1b
orb $0x1, 0x34(%rbx)
movw %ax, 0x22(%rbx)
movzwl (%rbx,%r15,2), %eax
movq 0x28(%rbx), %rcx
movw %ax, 0xc(%rcx)
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2baf
testl %eax, %eax
jne 0x46c3
movzwl 0xe(%rbx), %eax
movw %ax, (%rbx,%r15,2)
movzwl 0x12(%rbx), %eax
movw %ax, 0xe(%rbx)
jmp 0x45e0
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movzwl 0x12(%rbx), %eax
movb 0x30(%rbx), %sil
andb $-0x4, %sil
movl %eax, %edx
shrl %edx
movl %eax, %ecx
andb $0x1, %cl
orb %sil, %cl
movw %ax, 0x10(%rbx)
movb %cl, 0x30(%rbx)
cmpw $0x0, 0x14(%rsp)
js 0x3e42
andl $0x8000, %eax           # imm = 0x8000
orl %edx, %eax
jmp 0x3e4d
movl 0x10(%rsp), %edx
callq 0x4856
pushq $0x4
popq %r13
movzwl 0x12(%rbx), %esi
movw %si, 0x10(%rbx)
andb $-0x4, 0x30(%rbx)
jmp 0x3152
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
pushq $0x4
popq %r13
movzwl 0x12(%rbx), %eax
movw %ax, 0x10(%rbx)
movb 0x30(%rbx), %al
andb $-0x10, %al
orb $0x4, %al
movb %al, 0x30(%rbx)
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
jmp 0x3414
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
movb 0xf(%rsp), %r12b
movzwl 0x12(%rbx), %eax
movb 0x30(%rbx), %cl
movl %ecx, %edx
andb $-0x4, %dl
andl %eax, %r14d
shrl %r14d
xorl %esi, %esi
testb $0x1, %cl
cmovel %esi, %r13d
orl %r14d, %r13d
movw %ax, 0x10(%rbx)
andb $0x1, %al
orb %dl, %al
movb %al, 0x30(%rbx)
cmpw $0x0, 0x14(%rsp)
jns 0x3b41
movzbl %r13b, %edi
callq 0x2402
movzwl %ax, %r13d
movb 0x30(%rbx), %al
movzbl %al, %ecx
movl %ecx, %edx
shrl $0x3, %edx
xorl %ecx, %edx
testb $0x1, %dl
je 0x3b55
orb $0x2, %al
movb %al, 0x30(%rbx)
movq %rbx, %rdi
movl %r13d, %esi
callq 0x48c8
movq %rbx, %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x48ea
testl %eax, %eax
pushq $0x4
popq %r13
jne 0x323f
jmp 0x45e0
movl 0x10(%rsp), %edx
movl %r15d, %ecx
callq 0x4856
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movzwl 0x12(%rbx), %eax
movzbl 0x30(%rbx), %ecx
movl %ecx, %ebp
andl $0x1, %ebp
andb $-0x4, %cl
addl %eax, %ebp
cmpl $0x10000, %ebp          # imm = 0x10000
setae %dl
orb %cl, %dl
movw %ax, 0x10(%rbx)
movb %dl, 0x30(%rbx)
cmpw $0x0, 0x14(%rsp)
jns 0x3bcf
movzbl %bpl, %edi
callq 0x2402
movzwl %ax, %ebp
movzwl 0x10(%rbx), %eax
notl %eax
andl %ebp, %eax
jmp 0x3dc9
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movzwl 0x12(%rbx), %ecx
movb 0x30(%rbx), %dl
andb $-0x4, %dl
leal (%rcx,%rcx), %eax
movw %cx, 0x10(%rbx)
shrl $0xf, %ecx
orb %dl, %cl
movb %cl, 0x30(%rbx)
cmpw $0x0, 0x14(%rsp)
jns 0x3c18
movzbl %al, %edi
callq 0x2402
movb 0x30(%rbx), %cl
movzbl %cl, %edx
movl %edx, %esi
shrl $0x3, %esi
xorl %edx, %esi
testb $0x1, %sil
je 0x321b
orb $0x2, %cl
movb %cl, 0x30(%rbx)
jmp 0x321b
movl 0x10(%rsp), %edx
movl %r15d, %ecx
callq 0x4856
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movzwl 0x12(%rbx), %eax
andb $-0x3, 0x30(%rbx)
leal -0x1(%rax), %ebp
movw %ax, 0x10(%rbx)
cmpw $0x0, 0x14(%rsp)
jns 0x3c72
movzbl %bpl, %edi
callq 0x2402
movl %eax, %ebp
movzwl 0x10(%rbx), %eax
movl %ebp, %ecx
notl %ecx
andl %ecx, %eax
jmp 0x3d68
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4856
pushq $0x4
popq %r13
movzwl 0x12(%rbx), %r14d
movw %r14w, 0x10(%rbx)
movb 0x30(%rbx), %al
andb $-0x4, %al
incb %al
movb %al, 0x30(%rbx)
xorl $0xffff, %r14d          # imm = 0xFFFF
jmp 0x321f
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4856
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movzbl 0x30(%rbx), %ecx
movl %ecx, %eax
andl $0x1, %eax
andb $-0x4, %cl
movzwl 0x12(%rbx), %edx
leal (%rdx,%rdx), %ebp
andl %r15d, %ebp
orl %eax, %ebp
movw %dx, 0x10(%rbx)
movl %edx, %eax
shrl $0xf, %eax
orb %cl, %al
movb %al, 0x30(%rbx)
cmpw $0x0, 0x14(%rsp)
jns 0x3cfe
movzbl %bpl, %edi
callq 0x2402
movzwl %ax, %ebp
movb 0x30(%rbx), %al
movzbl %al, %ecx
movl %ecx, %edx
shrl $0x3, %edx
xorl %ecx, %edx
testb $0x1, %dl
je 0x3d12
orb $0x2, %al
movb %al, 0x30(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x48c8
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
jmp 0x3232
movl 0x10(%rsp), %edx
movl %r15d, %ecx
callq 0x4856
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movzwl 0x12(%rbx), %eax
andb $-0x3, 0x30(%rbx)
leal 0x1(%rax), %ebp
movw %ax, 0x10(%rbx)
cmpw $0x0, 0x14(%rsp)
jns 0x3d64
movzbl %bpl, %edi
callq 0x2402
movl %eax, %ebp
movzwl 0x10(%rbx), %eax
notl %eax
andl %ebp, %eax
movzwl %ax, %edi
jmp 0x3e17
movl 0x10(%rsp), %edx
movl %r15d, %ecx
callq 0x4856
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movzwl 0x12(%rbx), %eax
movzbl 0x30(%rbx), %ecx
movl %ecx, %edx
andl $0x1, %edx
testw %ax, %ax
sete %sil
orb $-0x4, %sil
movl %eax, %ebp
subl %edx, %ebp
andb %cl, %sil
movw %ax, 0x10(%rbx)
movb %sil, 0x30(%rbx)
cmpw $0x0, 0x14(%rsp)
jns 0x3dc3
movzbl %bpl, %edi
callq 0x2402
movl %eax, %ebp
movzwl 0x10(%rbx), %eax
movl %ebp, %ecx
notl %ecx
andl %ecx, %eax
movzwl %ax, %edi
jmp 0x3e17
movl 0x10(%rsp), %edx
movl %r15d, %ecx
callq 0x4856
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
movzwl 0x12(%rbx), %ebp
andb $-0x4, 0x30(%rbx)
movw %bp, 0x10(%rbx)
negl %ebp
cmpw $0x0, 0x14(%rsp)
jns 0x3e04
movzbl %bpl, %edi
callq 0x2402
movl %eax, %ebp
testw %bp, %bp
je 0x3e0d
orb $0x1, 0x30(%rbx)
movzwl 0x10(%rbx), %eax
andw %bp, %ax
movzwl %ax, %edi
callq 0x23fc
testw %ax, %ax
je 0x3e25
orb $0x2, 0x30(%rbx)
movzwl %bp, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x48c8
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
jmp 0x3232
movzbl %dl, %edi
callq 0x2402
movb 0x30(%rbx), %cl
movzbl %cl, %edx
movl %edx, %esi
shrl $0x3, %esi
xorl %edx, %esi
testb $0x1, %sil
je 0x321b
orb $0x2, %cl
movb %cl, 0x30(%rbx)
jmp 0x321b
pushq $0x1c
popq %rbp
movw $0x1c, %r12w
cmpl $0x0, 0xfe4d(%rip)      # 0x13cc8
je 0x46ea
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3484(%rip), %rdi      # 0x7313
jmp 0x3eb4
pushq $0x18
popq %rbp
movw $0x18, %r12w
cmpl $0x0, 0xfe28(%rip)      # 0x13cc8
je 0x46ea
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3455(%rip), %rdi      # 0x7309
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x20a0
jmp 0x46ea
movl %ecx, %edx
andl $0x8700, %edx           # imm = 0x8700
je 0x40d6
movzwl %ax, %r14d
addl %r14d, %r14d
cmpl $0x8700, %edx           # imm = 0x8700
je 0x3fbc
cmpl $0x200, %edx            # imm = 0x200
je 0x4205
cmpl $0x300, %edx            # imm = 0x300
je 0x4049
cmpl $0x400, %edx            # imm = 0x400
je 0x3feb
cmpl $0x500, %edx            # imm = 0x500
je 0x4260
cmpl $0x600, %edx            # imm = 0x600
je 0x4078
cmpl $0x700, %edx            # imm = 0x700
je 0x428c
cmpl $0x8000, %edx           # imm = 0x8000
je 0x4166
cmpl $0x8100, %edx           # imm = 0x8100
je 0x4234
cmpl $0x8200, %edx           # imm = 0x8200
je 0x41d6
cmpl $0x8300, %edx           # imm = 0x8300
je 0x401a
cmpl $0x8400, %edx           # imm = 0x8400
je 0x4137
cmpl $0x8500, %edx           # imm = 0x8500
je 0x40a7
cmpl $0x8600, %edx           # imm = 0x8600
jne 0x41a5
cmpl $0x0, 0xfd41(%rip)      # 0x13cc8
je 0x3f9e
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3409(%rip), %rdi      # 0x73a0
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0x5555, %ecx           # imm = 0x5555
jmp 0x42b6
movw $0x4, %r12w
movl %r13d, %ebp
jmp 0x4648
cmpl $0x0, 0xfd05(%rip)      # 0x13cc8
je 0x3fda
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x33d7(%rip), %rdi      # 0x73aa
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xaaaa, %ecx           # imm = 0xAAAA
jmp 0x42b6
cmpl $0x0, 0xfcd6(%rip)      # 0x13cc8
je 0x4009
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3339(%rip), %rdi      # 0x733b
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xcc33, %ecx           # imm = 0xCC33
jmp 0x42b6
cmpl $0x0, 0xfca7(%rip)      # 0x13cc8
je 0x4038
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3350(%rip), %rdi      # 0x7381
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xfafa, %ecx           # imm = 0xFAFA
jmp 0x42b6
cmpl $0x0, 0xfc78(%rip)      # 0x13cc8
je 0x4067
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x32d1(%rip), %rdi      # 0x7331
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xf0f0, %ecx           # imm = 0xF0F0
jmp 0x42b6
cmpl $0x0, 0xfc49(%rip)      # 0x13cc8
je 0x4096
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x32c0(%rip), %rdi      # 0x734f
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xc03, %ecx            # imm = 0xC03
jmp 0x42b6
cmpl $0x0, 0xfc1a(%rip)      # 0x13cc8
je 0x40c5
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x32d8(%rip), %rdi      # 0x7396
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xcccc, %ecx           # imm = 0xCCCC
jmp 0x42b6
cmpw $0x100, %cx             # imm = 0x100
jae 0x46a4
movl %r15d, %eax
leaq 0x3001(%rip), %rdx      # 0x70ec
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
movl %edi, %r15d
jmpq *%rax
cmpl $0x5, %edi
ja 0x46ea
leaq 0x2ff5(%rip), %rax      # 0x70fc
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0x0, 0xfbb1(%rip)      # 0x13cc8
je 0x4801
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x32ee(%rip), %rdi      # 0x7419
xorl %eax, %eax
callq 0x20a0
jmp 0x4801
cmpl $0x0, 0xfb8a(%rip)      # 0x13cc8
je 0x4155
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x323e(%rip), %rdi      # 0x738c
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0x3333, %ecx           # imm = 0x3333
jmp 0x42b6
cmpl $0x0, 0xfb5b(%rip)      # 0x13cc8
je 0x4184
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x31e6(%rip), %rdi      # 0x7363
xorl %eax, %eax
callq 0x20a0
movb 0x30(%rbx), %cl
andb $0xf, %cl
pushq $0x1
popq %rax
shll %cl, %eax
testb %al, %al
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x42c8
jmp 0x45e0
cmpl $0x0, 0xfb1c(%rip)      # 0x13cc8
je 0x41c3
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3162(%rip), %rdi      # 0x731e
xorl %eax, %eax
callq 0x20a0
addw %r14w, 0xe(%rbx)
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jmp 0x45e0
cmpl $0x0, 0xfaeb(%rip)      # 0x13cc8
je 0x41f4
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x318a(%rip), %rdi      # 0x7377
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0x505, %ecx            # imm = 0x505
jmp 0x42b6
cmpl $0x0, 0xfabc(%rip)      # 0x13cc8
je 0x4223
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x310b(%rip), %rdi      # 0x7327
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xf0f, %ecx            # imm = 0xF0F
jmp 0x42b6
cmpl $0x0, 0xfa8d(%rip)      # 0x13cc8
je 0x4252
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3122(%rip), %rdi      # 0x736d
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xff00, %ecx           # imm = 0xFF00
jmp 0x42b6
cmpl $0x0, 0xfa61(%rip)      # 0x13cc8
je 0x427e
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x30ce(%rip), %rdi      # 0x7345
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0x33cc, %ecx           # imm = 0x33CC
jmp 0x42b6
cmpl $0x0, 0xfa35(%rip)      # 0x13cc8
je 0x42aa
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x30b6(%rip), %rdi      # 0x7359
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xf3fc, %ecx           # imm = 0xF3FC
btl %eax, %ecx
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jae 0x45e0
addw %r14w, 0xe(%rbx)
jmp 0x45e0
movl 0x18(%rsp), %eax
leaq 0x2e37(%rip), %rdx      # 0x7114
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
cmpl $0x0, 0xf9db(%rip)      # 0x13cc8
je 0x4308
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x30fd(%rip), %rdi      # 0x73fa
xorl %eax, %eax
callq 0x20a0
movzwl 0x24(%rbx), %ecx
notb %cl
orb $-0x10, %cl
andb 0x30(%rbx), %cl
jmp 0x4438
cmpl $0x0, 0xf9ac(%rip)      # 0x13cc8
je 0x4333
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x30e2(%rip), %rdi      # 0x740e
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
je 0x43ab
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
movl 0x1c(%rsp), %ecx
callq 0x4814
testl %eax, %eax
jne 0x3601
jmp 0x43be
cmpl $0x0, 0xf96a(%rip)      # 0x13cc8
je 0x4375
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3078(%rip), %rdi      # 0x73e6
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x18(%rsp)
je 0x4402
xorl %r14d, %r14d
movq %rbx, %rdi
movl 0x10(%rsp), %esi
xorl %edx, %edx
callq 0x4936
testl %eax, %eax
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x46c3
movzwl 0x20(%rbx), %eax
jmp 0x3a4e
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl 0x10(%rsp), %edx
movl 0x1c(%rsp), %ecx
callq 0x4856
movzwl 0x12(%rbx), %eax
movw %ax, 0x10(%rbx)
andb $-0x2, 0x30(%rbx)
rolw $0x8, %ax
movzwl %ax, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x48c8
movq %rbx, %rdi
movl %r14d, %esi
movl 0x1c(%rsp), %edx
callq 0x48ea
testl %eax, %eax
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x323f
jmp 0x45e0
movw $0x4, %r12w
pushq $0x4
popq %r13
jmp 0x3fb4
cmpl $0x0, 0xf8b1(%rip)      # 0x13cc8
je 0x4432
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2fdd(%rip), %rdi      # 0x7404
xorl %eax, %eax
callq 0x20a0
movzwl 0x24(%rbx), %ecx
andb $0xf, %cl
orb 0x30(%rbx), %cl
movb %cl, 0x30(%rbx)
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jmp 0x45e3
pushq $0x10
popq %rbp
movw $0x10, %r12w
cmpl $0x0, 0xf870(%rip)      # 0x13cc8
je 0x46ea
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2fd7(%rip), %rdi      # 0x7443
jmp 0x4546
cmpl $0x0, 0xf850(%rip)      # 0x13cc8
je 0x448f
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2f9c(%rip), %rdi      # 0x7424
xorl %eax, %eax
callq 0x20a0
movl $0x2, 0x3c(%rbx)
jmp 0x41c8
cmpl $0x0, 0xf826(%rip)      # 0x13cc8
je 0x44b9
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2f7d(%rip), %rdi      # 0x742f
xorl %eax, %eax
callq 0x20a0
movl 0xc(%rbx), %eax
movw %ax, 0x22(%rbx)
addl $0x2, %eax
movw %ax, 0xc(%rbx)
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2ad3
testl %eax, %eax
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x46c3
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %eax
movw %ax, 0xe(%rbx)
movl 0xc(%rbx), %eax
movw %ax, 0x22(%rbx)
addl $0x2, %eax
movw %ax, 0xc(%rbx)
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2ad3
testl %eax, %eax
jne 0x46c3
movq 0x28(%rbx), %rax
movb 0xc(%rax), %cl
movb %cl, 0x30(%rbx)
jmp 0x45e3
pushq $0xc
popq %rbp
movw $0xc, %r12w
cmpl $0x0, 0xf796(%rip)      # 0x13cc8
je 0x46ea
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2ef3(%rip), %rdi      # 0x7439
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x20a0
jmp 0x3450
cmpl $0x0, 0xf76c(%rip)      # 0x13cc8
je 0x4573
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2ee1(%rip), %rdi      # 0x744d
xorl %eax, %eax
callq 0x20a0
movq %rbx, %rdi
callq 0x2ab7
jmp 0x41c8
cmpl $0x0, 0xf741(%rip)      # 0x13cc8
je 0x459e
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2e59(%rip), %rdi      # 0x73f0
xorl %eax, %eax
callq 0x20a0
movl 0xc(%rbx), %eax
movw %ax, 0x22(%rbx)
addl $0x2, %eax
movw %ax, 0xc(%rbx)
movzwl (%rbx,%r15,2), %eax
movw %ax, 0xe(%rbx)
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2ad3
testl %eax, %eax
pushq $0x4
popq %r13
movb 0xf(%rsp), %r12b
jne 0x46c3
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %eax
movw %ax, (%rbx,%r15,2)
movb 0x30(%rbx), %cl
testb $0x10, %r12b
jne 0x4640
movl 0x34(%rbx), %eax
testb $0x1, %al
jne 0x4650
testb $0x2, %al
jne 0x465f
cmpb $-0x20, %cl
setae %dl
testb $0x4, %al
sete %sil
orb %dl, %sil
je 0x466f
cmpb $-0x41, %cl
ja 0x4805
testb $0x8, %al
jne 0x4686
cmpb $-0x61, %cl
ja 0x4805
testb $0x20, %al
jne 0x4695
testb %cl, %cl
sets %cl
testb $0x40, %al
sete %dl
orb %cl, %dl
jne 0x4805
andl $-0x6c, %eax
movl %eax, 0x34(%rbx)
movq 0x50(%rbx), %rdi
callq *0x48(%rbx)
jmp 0x467f
pushq $0xc
popq %rbp
movw $0xc, %r12w
xorl %r14d, %r14d
jmp 0x46ea
pushq $0x1
popq %r14
andl $-0x2, %eax
movl %eax, 0x34(%rbx)
jmp 0x46e2
andl $-0x4, %eax
movl %eax, 0x34(%rbx)
pushq $0x14
popq %rbp
movw $0x14, %r12w
jmp 0x4648
andl $-0x8, %eax
movl %eax, 0x34(%rbx)
movq 0x80(%rbx), %rdi
callq *0x78(%rbx)
movl %eax, %r12d
movl %eax, %ebp
jmp 0x4648
andl $-0xc, %eax
movl %eax, 0x34(%rbx)
movq 0x70(%rbx), %rdi
callq *0x68(%rbx)
jmp 0x467f
andl $-0x2c, %eax
movl %eax, 0x34(%rbx)
movq 0x60(%rbx), %rdi
callq *0x58(%rbx)
jmp 0x467f
leaq 0x2d09(%rip), %rdi      # 0x73b4
leaq 0x2d1b(%rip), %rsi      # 0x73cd
leaq 0x2d1b(%rip), %rcx      # 0x73d4
movl $0x1da, %edx            # imm = 0x1DA
callq 0x20d0
cmpl $0x2, 0x38(%rbx)
jge 0x47f5
movq 0x28(%rbx), %rax
movl 0x8(%rax), %esi
leaq 0x2d7e(%rip), %rdi      # 0x7459
xorl %eax, %eax
callq 0x20a0
movw $0x4, %r12w
movl %r13d, %ebp
movw %r12w, 0x14(%rbx)
cmpl $0x0, 0xf5d2(%rip)      # 0x13cc8
je 0x4709
movzwl %bp, %esi
leaq 0x2d65(%rip), %rdi      # 0x7467
xorl %eax, %eax
callq 0x20a0
movzwl 0xc(%rbx), %eax
addl $-0x2, %eax
movw %ax, 0xc(%rbx)
testl %r14d, %r14d
sete %cl
cmpw $0x100, %ax             # imm = 0x100
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x472c
orb $0x1, 0x34(%rbx)
movw %ax, 0x22(%rbx)
movzbl 0x30(%rbx), %eax
movq 0x28(%rbx), %rcx
movw %ax, 0xc(%rcx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2baf
testl %eax, %eax
jne 0x46c3
testl %r14d, %r14d
sete %cl
movzwl 0xc(%rbx), %eax
addl $-0x2, %eax
movw %ax, 0xc(%rbx)
cmpw $0x100, %ax             # imm = 0x100
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x4771
orb $0x1, 0x34(%rbx)
movw %ax, 0x22(%rbx)
movzwl 0xe(%rbx), %eax
movq 0x28(%rbx), %rcx
movw %ax, 0xc(%rcx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2baf
testl %eax, %eax
jne 0x46c3
movzwl 0x14(%rbx), %eax
movw %ax, 0x22(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2ad3
testl %eax, %eax
jne 0x46c3
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %eax
movw %ax, 0xe(%rbx)
movl 0x14(%rbx), %eax
addl $0x2, %eax
movw %ax, 0x22(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2ad3
testl %eax, %eax
jne 0x46c3
movq 0x28(%rbx), %rax
movb 0xc(%rax), %al
movb %al, 0x30(%rbx)
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2914
leaq 0x2c77(%rip), %rdi      # 0x7473
callq 0x2040
andl $0x0, 0x3c(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq