// File: /workspace/github_c_makefile_star2_O1/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, 0x10dea(%rip)     # 0x13cc8
je 0x2ef2
movzwl 0xe(%rbx), %esi
leaq 0x4321(%rip), %rdi      # 0x720c
xorl %eax, %eax
callq 0x20a0
movq %rbx, %rdi
callq 0x2b70
movzwl 0xe(%rbx), %eax
movw %ax, 0x22(%rbx)
addl $0x2, %eax
movw %ax, 0xe(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2d35
testl %eax, %eax
jne 0x4977
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, 0x18(%rsp)
movl $0xff, %r12d
movl %edi, 0x1c(%rsp)
andl %r12d, %edi
callq 0x2544
movzwl 0x24(%rbx), %ecx
movl %ecx, %r15d
shrl $0x6, %r15d
movl %ecx, %edx
andl $0x3f, %edx
movl %edx, 0x10(%rsp)
movl %ecx, %r14d
andl $0x7, %r14d
movl %ecx, %edx
shrl $0x3, %edx
andl $0x7, %edx
movl %edx, 0x14(%rsp)
movl %ecx, %edx
andl $0x7fc0, %edx           # imm = 0x7FC0
cmpl $0xc0, %edx
sete %dl
orb %bpl, %dl
movl $0xffff, %ebp           # imm = 0xFFFF
cmovnel %r12d, %ebp
movl $0x80, %edx
movl $0x8000, %r13d          # imm = 0x8000
cmovnel %edx, %r13d
leal -0x1000(%rcx), %edx
shrl $0xc, %edx
movw $0x8, %r12w
cmpl $0xe, %edx
ja 0x36e9
movl %r15d, %esi
andl $0x3f, %esi
movl %esi, 0x20(%rsp)
movl %ecx, %esi
shrl $0x9, %esi
movl %esi, 0x24(%rsp)
leaq 0x409e(%rip), %rsi      # 0x7070
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
cmpl $0x0, 0x10ce6(%rip)     # 0x13cc8
je 0x3011
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x1c(%rsp)
leaq 0x4231(%rip), %rax      # 0x7229
leaq 0x469d(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x4213(%rip), %rdi      # 0x721d
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %r12d
testb $0x7, %r12b
movb 0xf(%rsp), %r13b
movl 0x18(%rsp), %ebp
movl 0x14(%rsp), %r15d
je 0x3045
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
testl %r15d, %r15d
je 0x3065
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
testb $0x7, %r12b
jne 0x307e
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
testl %r15d, %r15d
jne 0x3096
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
movb 0x30(%rbx), %cl
movzwl 0x10(%rbx), %eax
andb $-0xf, %cl
movzbl %cl, %edx
orb $0x8, %cl
movzbl %cl, %ecx
testw %ax, %ax
cmovnsl %edx, %ecx
leal 0x4(%rcx), %edx
testw %ax, %ax
movzbl %dl, %edx
cmovnel %ecx, %edx
movb %dl, 0x30(%rbx)
testl %r15d, %r15d
je 0x377d
movzwl %ax, %esi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x4b9f
jmp 0x3782
cmpl $0x0, 0x10be8(%rip)     # 0x13cc8
movl 0x1c(%rsp), %r15d
je 0x3112
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
testw %r15w, %r15w
leaq 0x4130(%rip), %rax      # 0x7229
leaq 0x459c(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x4120(%rip), %rdi      # 0x722b
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %r12d
testb $0x7, %r12b
movb 0xf(%rsp), %r13b
movl 0x18(%rsp), %ebp
movl 0x14(%rsp), %r14d
je 0x3146
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
testl %r14d, %r14d
je 0x3166
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
testb $0x7, %r12b
jne 0x317f
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
testl %r14d, %r14d
jne 0x3197
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
movb 0x30(%rbx), %al
andb $-0x4, %al
movb %al, 0x30(%rbx)
movzwl 0x10(%rbx), %ecx
movzwl 0x12(%rbx), %edx
xorl $0xffff, %edx           # imm = 0xFFFF
leal (%rcx,%rdx), %ebp
incl %ebp
btl $0x10, %ebp
jb 0x31bd
orb $0x1, %al
movb %al, 0x30(%rbx)
testw %r15w, %r15w
jns 0x31cf
movzbl %bpl, %edi
callq 0x2544
movzwl %ax, %ebp
movzwl 0x12(%rbx), %eax
movzwl 0x10(%rbx), %ecx
xorw %ax, %cx
xorl %ebp, %eax
notl %eax
andl %ecx, %eax
movzwl %ax, %edi
callq 0x253e
testw %ax, %ax
je 0x31f1
orb $0x2, 0x30(%rbx)
movb 0x30(%rbx), %al
andb $-0xd, %al
movzbl %al, %ecx
orb $0x8, %al
movzbl %al, %eax
testw %bp, %bp
cmovnsl %ecx, %eax
leal 0x4(%rax), %ecx
testw %bp, %bp
movzbl %cl, %ecx
jmp 0x33e0
cmpl $0x0, 0x10aaf(%rip)     # 0x13cc8
je 0x3248
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x1c(%rsp)
leaq 0x3ffa(%rip), %rax      # 0x7229
leaq 0x4466(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x400e(%rip), %rdi      # 0x724f
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %r15d
testb $0x7, %r15b
movb 0xf(%rsp), %r13b
movl 0x18(%rsp), %ebp
movl 0x14(%rsp), %r14d
je 0x327c
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
testl %r14d, %r14d
je 0x329c
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
testb $0x7, %r15b
jne 0x32b5
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
testl %r14d, %r14d
jne 0x32cd
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
movzwl 0x10(%rbx), %eax
orw 0x12(%rbx), %ax
movb 0x30(%rbx), %cl
andb $-0xf, %cl
movzbl %cl, %edx
orb $0x8, %cl
movzbl %cl, %ecx
testw %ax, %ax
cmovnsl %edx, %ecx
leal 0x4(%rcx), %edx
testw %ax, %ax
movzbl %dl, %edx
cmovnel %ecx, %edx
movb %dl, 0x30(%rbx)
movzwl %ax, %esi
jmp 0x34d2
cmpl $0x0, 0x109c0(%rip)     # 0x13cc8
je 0x3337
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x1c(%rsp)
leaq 0x3f0b(%rip), %rax      # 0x7229
leaq 0x4377(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3f07(%rip), %rdi      # 0x7237
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %r15d
testb $0x7, %r15b
movb 0xf(%rsp), %r13b
movl 0x18(%rsp), %ebp
movl 0x14(%rsp), %r14d
je 0x336b
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
testl %r14d, %r14d
je 0x338b
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
testb $0x7, %r15b
jne 0x33a4
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
testl %r14d, %r14d
jne 0x33bc
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
movb 0x30(%rbx), %al
movzwl 0x10(%rbx), %ecx
andb $-0xf, %al
movzbl %al, %edx
orb $0x8, %al
movzbl %al, %eax
movzwl 0x12(%rbx), %esi
testw %cx, %si
cmovnsl %edx, %eax
leal 0x4(%rax), %edx
testw %cx, %si
movzbl %dl, %ecx
cmovnel %eax, %ecx
movb %cl, 0x30(%rbx)
jmp 0x3782
cmpl $0x0, 0x108d6(%rip)     # 0x13cc8
je 0x3421
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x1c(%rsp)
leaq 0x3e21(%rip), %rax      # 0x7229
leaq 0x428d(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3e29(%rip), %rdi      # 0x7243
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %r15d
testb $0x7, %r15b
movb 0xf(%rsp), %r13b
movl 0x18(%rsp), %ebp
movl 0x14(%rsp), %r14d
je 0x3455
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
testl %r14d, %r14d
je 0x3471
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
testb $0x7, %r15b
jne 0x348a
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
testl %r14d, %r14d
jne 0x34a2
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
movl 0x10(%rbx), %eax
notl %eax
andw 0x12(%rbx), %ax
movb 0x30(%rbx), %cl
andb $-0xf, %cl
movzbl %cl, %edx
orb $0x8, %cl
movzbl %cl, %ecx
testw %ax, %ax
cmovnsl %edx, %ecx
leal 0x4(%rcx), %edx
testw %ax, %ax
movzbl %dl, %edx
cmovnel %ecx, %edx
movb %dl, 0x30(%rbx)
movzwl %ax, %esi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x4b9f
testl %eax, %eax
je 0x3782
xorl %r14d, %r14d
jmp 0x4977
cmpl $0x0, 0x107d5(%rip)     # 0x13cc8
je 0x350a
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3d62(%rip), %rdi      # 0x7265
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %ebp
testb $0x7, %bpl
movb 0xf(%rsp), %r13b
je 0x3537
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
xorl %ecx, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x4977
cmpl $0x0, 0x14(%rsp)
je 0x355c
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
xorl %ecx, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x4977
testb $0x7, %bpl
jne 0x3575
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
xorl %ecx, %ecx
callq 0x4b17
cmpl $0x0, 0x14(%rsp)
jne 0x358f
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
xorl %ecx, %ecx
callq 0x4b17
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 0x35b9
orb $0x1, %dl
movb %dl, 0x30(%rbx)
xorl %eax, %ecx
movl %ebp, %edx
xorl %eax, %edx
andl %ecx, %edx
movzwl %dx, %edi
jmp 0x369c
cmpl $0x0, 0x106f8(%rip)     # 0x13cc8
je 0x35e7
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3c7b(%rip), %rdi      # 0x725b
xorl %eax, %eax
callq 0x20a0
movl 0x24(%rsp), %ebp
testb $0x7, %bpl
movb 0xf(%rsp), %r13b
je 0x3614
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
xorl %ecx, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x4977
cmpl $0x0, 0x14(%rsp)
je 0x3639
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
xorl %ecx, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x4977
testb $0x7, %bpl
jne 0x3652
movq %rbx, %rdi
movl $0x8, %esi
movl 0x20(%rsp), %edx
xorl %ecx, %ecx
callq 0x4b17
cmpl $0x0, 0x14(%rsp)
jne 0x366c
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
xorl %ecx, %ecx
callq 0x4b17
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 0x368f
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 0x253e
testw %ax, %ax
je 0x36aa
orb $0x2, 0x30(%rbx)
movb 0x30(%rbx), %al
andb $-0xd, %al
movzbl %al, %ecx
orb $0x8, %al
movzbl %al, %eax
testw %bp, %bp
cmovnsl %ecx, %eax
leal 0x4(%rax), %ecx
testw %bp, %bp
movzbl %cl, %ecx
cmovnel %eax, %ecx
movb %cl, 0x30(%rbx)
movzwl %bp, %esi
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4b9f
testl %eax, %eax
jne 0x4977
jmp 0x3782
movl %ecx, %edx
andl $0xfc0, %edx            # imm = 0xFC0
addl $0xfffff600, %edx       # imm = 0xFFFFF600
shrl $0x6, %edx
cmpl $0xf, %edx
ja 0x3cf2
leaq 0x39a2(%rip), %rax      # 0x70ac
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0x0, 0x105ae(%rip)     # 0x13cc8
je 0x3749
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x1c(%rsp)
leaq 0x3af9(%rip), %rax      # 0x7229
leaq 0x3f65(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3b2d(%rip), %rdi      # 0x726f
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
movb 0xf(%rsp), %r13b
movl 0x18(%rsp), %ebp
movq %rbx, %rdi
movl $0x9, %esi
je 0x3e92
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
jmp 0x3e9d
movw %ax, (%rbx,%r14,2)
movw $0xc, %r12w
testb $0x10, %r13b
jne 0x3dd2
movl 0x34(%rbx), %eax
testb $0x1, %al
jne 0x37fa
testb $0x2, %al
jne 0x380b
movb 0x30(%rbx), %cl
cmpb $-0x20, %cl
setae %dl
testb $0x4, %al
sete %sil
orb %dl, %sil
je 0x381b
cmpb $-0x40, %cl
setae %dl
testb $0x8, %al
sete %sil
orb %dl, %sil
je 0x3830
cmpb $-0x60, %cl
setae %dl
testb $0x20, %al
sete %sil
orb %dl, %sil
je 0x3dc2
testb %cl, %cl
sets %cl
testb $0x40, %al
sete %dl
orb %cl, %dl
jne 0x4ac4
andl $-0x44, %eax
movl %eax, 0x34(%rbx)
movq 0x50(%rbx), %rdi
callq *0x48(%rbx)
jmp 0x3dcf
andl $-0x2, %eax
movl %eax, 0x34(%rbx)
movl $0x1, %r14d
jmp 0x4996
andl $-0x4, %eax
movl %eax, 0x34(%rbx)
movw $0x14, %r12w
jmp 0x3dd2
andl $-0x8, %eax
movl %eax, 0x34(%rbx)
movq 0x80(%rbx), %rdi
callq *0x78(%rbx)
jmp 0x3dcf
andl $-0xc, %eax
movl %eax, 0x34(%rbx)
movq 0x70(%rbx), %rdi
callq *0x68(%rbx)
jmp 0x3dcf
cmpl $0x0, 0x1047f(%rip)     # 0x13cc8
movl 0x1c(%rsp), %r14d
je 0x387b
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
testw %r14w, %r14w
leaq 0x39c7(%rip), %rax      # 0x7229
leaq 0x3e33(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3a73(%rip), %rdi      # 0x72e7
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
movl 0x18(%rsp), %ebp
movq %rbx, %rdi
movl $0x9, %esi
je 0x3e13
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
movb 0xf(%rsp), %r13b
jne 0x34e4
jmp 0x3e23
cmpl $0x0, 0x10412(%rip)     # 0x13cc8
je 0x38e5
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x1c(%rsp)
leaq 0x395d(%rip), %rax      # 0x7229
leaq 0x3dc9(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x39e5(%rip), %rdi      # 0x72c3
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
movb 0xf(%rsp), %r13b
movl 0x18(%rsp), %ecx
movq %rbx, %rdi
movl $0x9, %esi
je 0x3e58
movl 0x10(%rsp), %edx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
jmp 0x3e61
cmpl $0x0, 0x103aa(%rip)     # 0x13cc8
movl 0x1c(%rsp), %r15d
je 0x3950
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
testw %r15w, %r15w
leaq 0x38f2(%rip), %rax      # 0x7229
leaq 0x3d5e(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3986(%rip), %rdi      # 0x72cf
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
movl 0x18(%rsp), %r14d
movq %rbx, %rdi
movl $0x9, %esi
je 0x3ebe
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
jmp 0x3eca
cmpl $0x0, 0x10340(%rip)     # 0x13cc8
movl 0x1c(%rsp), %r15d
je 0x39ba
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
testw %r15w, %r15w
leaq 0x3888(%rip), %rax      # 0x7229
leaq 0x3cf4(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x38f8(%rip), %rdi      # 0x72ab
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
movl 0x18(%rsp), %r14d
movq %rbx, %rdi
movl $0x9, %esi
je 0x3f5d
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4ad3
testl %eax, %eax
movb 0xf(%rsp), %r13b
jne 0x34e4
jmp 0x3f6e
cmpl $0x0, 0x102d1(%rip)     # 0x13cc8
movl 0x1c(%rsp), %r14d
je 0x3a29
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
testw %r14w, %r14w
leaq 0x3819(%rip), %rax      # 0x7229
leaq 0x3c85(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x38d1(%rip), %rdi      # 0x72f3
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
movl 0x18(%rsp), %ebp
movq %rbx, %rdi
movl $0x9, %esi
je 0x3fb5
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
movb 0xf(%rsp), %r13b
jne 0x34e4
jmp 0x3fc5
cmpl $0x0, 0x10264(%rip)     # 0x13cc8
movl 0x1c(%rsp), %r15d
je 0x3a96
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
testw %r15w, %r15w
leaq 0x37ac(%rip), %rax      # 0x7229
leaq 0x3c18(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3804(%rip), %rdi      # 0x7293
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
movl 0x18(%rsp), %r14d
movq %rbx, %rdi
movl $0x9, %esi
je 0x3ff0
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4ad3
testl %eax, %eax
movb 0xf(%rsp), %r13b
jne 0x34e4
jmp 0x4001
cmpl $0x0, 0x101f5(%rip)     # 0x13cc8
je 0x3b02
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
cmpw $0x0, 0x1c(%rsp)
leaq 0x3740(%rip), %rax      # 0x7229
leaq 0x3bac(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3780(%rip), %rdi      # 0x727b
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
movb 0xf(%rsp), %r13b
movl 0x18(%rsp), %ebp
movq %rbx, %rdi
movl $0x9, %esi
je 0x4015
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
jmp 0x4020
cmpl $0x0, 0x1018b(%rip)     # 0x13cc8
movl 0x1c(%rsp), %r15d
je 0x3b6f
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
testw %r15w, %r15w
leaq 0x36d3(%rip), %rax      # 0x7229
leaq 0x3b3f(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3773(%rip), %rdi      # 0x72db
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
movl 0x18(%rsp), %r14d
movq %rbx, %rdi
movl $0x9, %esi
je 0x4051
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4ad3
testl %eax, %eax
movb 0xf(%rsp), %r13b
jne 0x34e4
jmp 0x4062
cmpl $0x0, 0x1011c(%rip)     # 0x13cc8
movl 0x1c(%rsp), %r15d
je 0x3bde
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
testw %r15w, %r15w
leaq 0x3664(%rip), %rax      # 0x7229
leaq 0x3ad0(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x36b0(%rip), %rdi      # 0x7287
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
movl 0x18(%rsp), %r14d
movq %rbx, %rdi
movl $0x9, %esi
je 0x40d4
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4ad3
testl %eax, %eax
movb 0xf(%rsp), %r13b
jne 0x34e4
jmp 0x40e5
cmpl $0x0, 0x100ad(%rip)     # 0x13cc8
movl 0x1c(%rsp), %r15d
je 0x3c4d
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
testw %r15w, %r15w
leaq 0x35f5(%rip), %rax      # 0x7229
leaq 0x3a61(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x3671(%rip), %rdi      # 0x72b7
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
movl 0x18(%rsp), %r14d
movq %rbx, %rdi
movl $0x9, %esi
je 0x410e
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4ad3
testl %eax, %eax
movb 0xf(%rsp), %r13b
jne 0x34e4
jmp 0x411f
cmpl $0x0, 0x1003e(%rip)     # 0x13cc8
movl 0x1c(%rsp), %r15d
je 0x3cbc
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
testw %r15w, %r15w
leaq 0x3586(%rip), %rax      # 0x7229
leaq 0x39f2(%rip), %rdx      # 0x769c
cmovsq %rax, %rdx
leaq 0x35ea(%rip), %rdi      # 0x729f
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
movl 0x18(%rsp), %r14d
movq %rbx, %rdi
movl $0x9, %esi
je 0x419a
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4ad3
testl %eax, %eax
movb 0xf(%rsp), %r13b
jne 0x34e4
jmp 0x41ab
movl %ecx, %edx
andl $0x8f00, %edx           # imm = 0x8F00
cmpl $0x87ff, %edx           # imm = 0x87FF
movb 0xf(%rsp), %r13b
jg 0x3dda
cmpl $0x800, %edx            # imm = 0x800
je 0x3d1f
cmpl $0x900, %edx            # imm = 0x900
jne 0x423c
cmpl $0x0, 0xffa2(%rip)      # 0x13cc8
je 0x3d3d
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x35c9(%rip), %rdi      # 0x72ff
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
je 0x4725
xorl %r14d, %r14d
movq %rbx, %rdi
movl 0x10(%rsp), %esi
xorl %edx, %edx
callq 0x4bef
testl %eax, %eax
jne 0x4977
andl $0x7, %r15d
movzwl 0x20(%rbx), %eax
movw %ax, 0x12(%rbx)
movl 0xc(%rbx), %eax
addl $-0x2, %eax
movw %ax, 0xc(%rbx)
movzwl %ax, %ecx
cmpl $0xff, %ecx
ja 0x3d86
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 0x2e0c
testl %eax, %eax
jne 0x4977
movzwl 0xe(%rbx), %eax
movw %ax, (%rbx,%r15,2)
movzwl 0x12(%rbx), %eax
movw %ax, 0xe(%rbx)
jmp 0x3782
andl $-0x24, %eax
movl %eax, 0x34(%rbx)
movq 0x60(%rbx), %rdi
callq *0x58(%rbx)
movl %eax, %r12d
xorl %r14d, %r14d
jmp 0x499b
cmpl $0x8800, %edx           # imm = 0x8800
je 0x42d4
cmpl $0x8900, %edx           # imm = 0x8900
jne 0x423c
movw $0x1c, %r12w
cmpl $0x0, 0xfeca(%rip)      # 0x13cc8
je 0x3dd2
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3505(%rip), %rdi      # 0x7313
jmp 0x42f4
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
movb 0xf(%rsp), %r13b
movzwl 0x12(%rbx), %eax
movb 0x30(%rbx), %dl
andb $-0x4, %dl
movl %eax, %ecx
shrl %ecx
movl %eax, %esi
andb $0x1, %sil
orb %dl, %sil
movw %ax, 0x10(%rbx)
movb %sil, 0x30(%rbx)
testw %r14w, %r14w
js 0x4213
andl $0x8000, %eax           # imm = 0x8000
orl %ecx, %eax
jmp 0x421b
movl 0x10(%rsp), %edx
callq 0x4b17
movzwl 0x12(%rbx), %eax
movb 0x30(%rbx), %cl
andb $-0x10, %cl
movzbl %cl, %edx
orb $0x8, %cl
movzbl %cl, %ecx
testw %ax, %ax
cmovnsl %edx, %ecx
leal 0x4(%rcx), %edx
testw %ax, %ax
movw %ax, 0x10(%rbx)
movzbl %dl, %eax
cmovnel %ecx, %eax
movb %al, 0x30(%rbx)
jmp 0x3782
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
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 0x36d7
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4b17
movzwl 0x12(%rbx), %eax
movb 0x30(%rbx), %cl
movl %ecx, %edx
andb $-0x4, %dl
andl %eax, %ebp
shrl %ebp
xorl %esi, %esi
testb $0x1, %cl
cmovel %esi, %r13d
orl %ebp, %r13d
movw %ax, 0x10(%rbx)
andb $0x1, %al
orb %dl, %al
movb %al, 0x30(%rbx)
testw %r15w, %r15w
jns 0x3f04
movzbl %r13b, %edi
callq 0x2544
movzwl %ax, %r13d
movzbl 0x30(%rbx), %eax
movl %eax, %ecx
shrl $0x3, %ecx
xorl %eax, %ecx
testb $0x1, %cl
je 0x3f19
orb $0x2, %al
movb %al, 0x30(%rbx)
movb 0x30(%rbx), %al
andb $-0xd, %al
leal 0x8(%rax), %ecx
testw %r13w, %r13w
movzbl %al, %eax
movzbl %cl, %ecx
cmovnsl %eax, %ecx
leal 0x4(%rcx), %eax
testl %r13d, %r13d
movzbl %al, %eax
cmovnel %ecx, %eax
movb %al, 0x30(%rbx)
movq %rbx, %rdi
movl %r13d, %esi
movl %r14d, %edx
callq 0x4b9f
testl %eax, %eax
movb 0xf(%rsp), %r13b
jne 0x34e4
jmp 0x3782
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4b17
movb 0xf(%rsp), %r13b
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)
testw %r15w, %r15w
jns 0x3fa4
movzbl %bpl, %edi
callq 0x2544
movzwl %ax, %ebp
movzwl 0x10(%rbx), %edi
xorl $0xffff, %edi           # imm = 0xFFFF
andl %ebp, %edi
jmp 0x415c
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
movb 0xf(%rsp), %r13b
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)
testw %r14w, %r14w
jns 0x421b
movzbl %al, %edi
jmp 0x4216
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4b17
movb 0xf(%rsp), %r13b
movzwl 0x12(%rbx), %eax
andb $-0x3, 0x30(%rbx)
leal -0x1(%rax), %ebp
movw %ax, 0x10(%rbx)
jmp 0x4140
movl 0x10(%rsp), %edx
movl %ebp, %ecx
callq 0x4b17
movzwl 0x12(%rbx), %eax
movw %ax, 0x10(%rbx)
movb 0x30(%rbx), %cl
andb $-0x10, %cl
testw %ax, %ax
setns %dl
shlb $0x3, %dl
orb %cl, %dl
cmpw $-0x1, %ax
notl %eax
sete %cl
shlb $0x2, %cl
orb %dl, %cl
incb %cl
movb %cl, 0x30(%rbx)
jmp 0x34cf
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4b17
movb 0xf(%rsp), %r13b
movzbl 0x30(%rbx), %eax
movl %eax, %ecx
andl $0x1, %ecx
andb $-0x4, %al
movzwl 0x12(%rbx), %edx
leal (%rdx,%rdx), %esi
andl %ebp, %esi
orl %ecx, %esi
movw %dx, 0x10(%rbx)
movl %edx, %ecx
shrl $0xf, %ecx
orb %al, %cl
movb %cl, 0x30(%rbx)
testw %r15w, %r15w
jns 0x4098
movzbl %sil, %edi
callq 0x2544
movzwl %ax, %esi
movzbl 0x30(%rbx), %eax
movl %eax, %ecx
shrl $0x3, %ecx
xorl %eax, %ecx
testb $0x1, %cl
je 0x40ad
orb $0x2, %al
movb %al, 0x30(%rbx)
movb 0x30(%rbx), %al
andb $-0xd, %al
leal 0x8(%rax), %ecx
testw %si, %si
movzbl %al, %eax
movzbl %cl, %ecx
cmovnsl %eax, %ecx
leal 0x4(%rcx), %eax
testl %esi, %esi
movzbl %al, %eax
cmovnel %ecx, %eax
movb %al, 0x30(%rbx)
jmp 0x418f
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4b17
movb 0xf(%rsp), %r13b
movzwl 0x12(%rbx), %eax
andb $-0x3, 0x30(%rbx)
leal 0x1(%rax), %ebp
movw %ax, 0x10(%rbx)
testw %r15w, %r15w
jns 0x4105
movzbl %bpl, %edi
callq 0x2544
movl %eax, %ebp
movl 0x10(%rbx), %eax
notl %eax
andl %ebp, %eax
jmp 0x4159
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4b17
movb 0xf(%rsp), %r13b
movzwl 0x12(%rbx), %ebp
movzbl 0x30(%rbx), %eax
movl %eax, %ecx
andl $0x1, %ecx
testw %bp, %bp
sete %dl
orb $-0x4, %dl
movw %bp, 0x10(%rbx)
subl %ecx, %ebp
andb %al, %dl
movb %dl, 0x30(%rbx)
testw %r15w, %r15w
jns 0x4151
movzbl %bpl, %edi
callq 0x2544
movl %eax, %ebp
movl %ebp, %eax
notl %eax
andw 0x10(%rbx), %ax
movzwl %ax, %edi
callq 0x253e
testw %ax, %ax
je 0x416a
orb $0x2, 0x30(%rbx)
movb 0x30(%rbx), %al
andb $-0xd, %al
movzbl %al, %ecx
orb $0x8, %al
movzbl %al, %eax
testw %bp, %bp
cmovnsl %ecx, %eax
leal 0x4(%rax), %ecx
testw %bp, %bp
movzbl %cl, %ecx
cmovnel %eax, %ecx
movb %cl, 0x30(%rbx)
movzwl %bp, %esi
movq %rbx, %rdi
movl %r14d, %edx
jmp 0x34d7
movl 0x10(%rsp), %edx
movl %r14d, %ecx
callq 0x4b17
movb 0xf(%rsp), %r13b
movzwl 0x12(%rbx), %ebp
andb $-0x4, 0x30(%rbx)
movw %bp, 0x10(%rbx)
negl %ebp
testw %r15w, %r15w
jns 0x41ca
movzbl %bpl, %edi
callq 0x2544
movl %eax, %ebp
testw %bp, %bp
je 0x41d3
orb $0x1, 0x30(%rbx)
movzwl 0x10(%rbx), %eax
andw %bp, %ax
movzwl %ax, %edi
callq 0x253e
testw %ax, %ax
je 0x41eb
orb $0x2, 0x30(%rbx)
movb 0x30(%rbx), %al
andb $-0xd, %al
leal 0x8(%rax), %ecx
testw %bp, %bp
movzbl %al, %eax
movzbl %cl, %ecx
cmovnsl %eax, %ecx
leal 0x4(%rcx), %eax
testw %bp, %bp
movzbl %al, %eax
cmovnel %ecx, %eax
movb %al, 0x30(%rbx)
jmp 0x418c
movzbl %cl, %edi
callq 0x2544
movzbl 0x30(%rbx), %ecx
movl %ecx, %edx
shrl $0x3, %edx
xorl %ecx, %edx
testb $0x1, %dl
je 0x4231
orb $0x2, %cl
movb %cl, 0x30(%rbx)
movb 0x30(%rbx), %cl
andb $-0xd, %cl
jmp 0x34b1
movzwl %ax, %ebp
addl %ebp, %ebp
movl %ecx, %eax
andl $0x8700, %eax           # imm = 0x8700
cmpl $0x7fff, %eax           # imm = 0x7FFF
jg 0x4303
cmpl $0x3ff, %eax            # imm = 0x3FF
jg 0x4361
cmpl $0x1ff, %eax            # imm = 0x1FF
jg 0x43eb
testl %eax, %eax
jne 0x44d3
cmpl $0x100, %ecx            # imm = 0x100
jae 0x4958
movl %r15d, %eax
leaq 0x2e65(%rip), %rcx      # 0x70ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x5, %r14d
ja 0x3dd2
movl %r14d, %eax
leaq 0x2e58(%rip), %rcx      # 0x70fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, 0xfa14(%rip)      # 0x13cc8
je 0x4abd
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3151(%rip), %rdi      # 0x7419
xorl %eax, %eax
callq 0x20a0
jmp 0x4abd
movw $0x18, %r12w
cmpl $0x0, 0xf9e8(%rip)      # 0x13cc8
je 0x3dd2
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3015(%rip), %rdi      # 0x7309
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x20a0
jmp 0x499b
cmpl $0x83ff, %eax           # imm = 0x83FF
jg 0x43a6
cmpl $0x81ff, %eax           # imm = 0x81FF
jg 0x4425
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x44ff
cmpl $0x0, 0xf99d(%rip)      # 0x13cc8
je 0x4342
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x3028(%rip), %rdi      # 0x7363
xorl %eax, %eax
callq 0x20a0
movb 0x30(%rbx), %cl
andb $0xf, %cl
movl $0x1, %eax
shll %cl, %eax
testb %al, %al
movb 0xf(%rsp), %r13b
je 0x3782
jmp 0x464b
cmpl $0x5ff, %eax            # imm = 0x5FF
jg 0x445f
cmpl $0x400, %eax            # imm = 0x400
jne 0x452e
cmpl $0x0, 0xf94a(%rip)      # 0x13cc8
je 0x4395
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2fad(%rip), %rdi      # 0x733b
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xcc33, %ecx           # imm = 0xCC33
jmp 0x463d
cmpl $0x85ff, %eax           # imm = 0x85FF
jg 0x4499
cmpl $0x8400, %eax           # imm = 0x8400
jne 0x455d
cmpl $0x0, 0xf905(%rip)      # 0x13cc8
je 0x43da
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2fb9(%rip), %rdi      # 0x738c
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0x3333, %ecx           # imm = 0x3333
jmp 0x463d
cmpl $0x200, %eax            # imm = 0x200
jne 0x458c
cmpl $0x0, 0xf8cb(%rip)      # 0x13cc8
je 0x4414
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2f1a(%rip), %rdi      # 0x7327
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xf0f, %ecx            # imm = 0xF0F
jmp 0x463d
cmpl $0x8200, %eax           # imm = 0x8200
jne 0x45bb
cmpl $0x0, 0xf891(%rip)      # 0x13cc8
je 0x444e
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2f30(%rip), %rdi      # 0x7377
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0x505, %ecx            # imm = 0x505
jmp 0x463d
cmpl $0x600, %eax            # imm = 0x600
jne 0x45e7
cmpl $0x0, 0xf857(%rip)      # 0x13cc8
je 0x4488
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2ece(%rip), %rdi      # 0x734f
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xc03, %ecx            # imm = 0xC03
jmp 0x463d
cmpl $0x8600, %eax           # imm = 0x8600
jne 0x4613
cmpl $0x0, 0xf81d(%rip)      # 0x13cc8
je 0x44c2
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2ee5(%rip), %rdi      # 0x73a0
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0x5555, %ecx           # imm = 0x5555
jmp 0x463d
cmpl $0x0, 0xf7ee(%rip)      # 0x13cc8
je 0x44f1
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2e34(%rip), %rdi      # 0x731e
xorl %eax, %eax
callq 0x20a0
addw %bp, 0xe(%rbx)
movb 0xf(%rsp), %r13b
jmp 0x3782
cmpl $0x0, 0xf7c2(%rip)      # 0x13cc8
je 0x451d
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2e57(%rip), %rdi      # 0x736d
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xff00, %ecx           # imm = 0xFF00
jmp 0x463d
cmpl $0x0, 0xf793(%rip)      # 0x13cc8
je 0x454c
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2e00(%rip), %rdi      # 0x7345
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0x33cc, %ecx           # imm = 0x33CC
jmp 0x463d
cmpl $0x0, 0xf764(%rip)      # 0x13cc8
je 0x457b
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2e22(%rip), %rdi      # 0x7396
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xcccc, %ecx           # imm = 0xCCCC
jmp 0x463d
cmpl $0x0, 0xf735(%rip)      # 0x13cc8
je 0x45aa
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2d8e(%rip), %rdi      # 0x7331
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xf0f0, %ecx           # imm = 0xF0F0
jmp 0x463d
cmpl $0x0, 0xf706(%rip)      # 0x13cc8
je 0x45d9
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2daf(%rip), %rdi      # 0x7381
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xfafa, %ecx           # imm = 0xFAFA
jmp 0x463d
cmpl $0x0, 0xf6da(%rip)      # 0x13cc8
je 0x4605
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2d5b(%rip), %rdi      # 0x7359
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xf3fc, %ecx           # imm = 0xF3FC
jmp 0x463d
cmpl $0x0, 0xf6ae(%rip)      # 0x13cc8
je 0x4631
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2d80(%rip), %rdi      # 0x73aa
xorl %eax, %eax
callq 0x20a0
movzbl 0x30(%rbx), %eax
andl $0xf, %eax
movl $0xaaaa, %ecx           # imm = 0xAAAA
btl %eax, %ecx
movb 0xf(%rsp), %r13b
jae 0x3782
addw %bp, 0xe(%rbx)
jmp 0x3782
movl 0x14(%rsp), %eax
leaq 0x2ab5(%rip), %rcx      # 0x7114
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, 0xf659(%rip)      # 0x13cc8
je 0x4686
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2d7b(%rip), %rdi      # 0x73fa
xorl %eax, %eax
callq 0x20a0
movb 0x24(%rbx), %al
notb %al
orb $-0x10, %al
andb %al, 0x30(%rbx)
jmp 0x44f5
cmpl $0x0, 0xf62c(%rip)      # 0x13cc8
je 0x46b3
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2d62(%rip), %rdi      # 0x740e
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
je 0x472f
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
movl 0x18(%rsp), %ecx
callq 0x4ad3
testl %eax, %eax
jne 0x34e4
jmp 0x4744
cmpl $0x0, 0xf5e8(%rip)      # 0x13cc8
je 0x46f7
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2cf6(%rip), %rdi      # 0x73e6
xorl %eax, %eax
callq 0x20a0
cmpl $0x0, 0x14(%rsp)
je 0x4725
xorl %r14d, %r14d
movq %rbx, %rdi
movl 0x10(%rsp), %esi
xorl %edx, %edx
callq 0x4bef
testl %eax, %eax
movb 0xf(%rsp), %r13b
jne 0x4977
movzwl 0x20(%rbx), %eax
jmp 0x3db9
movw $0x4, %r12w
jmp 0x3dd2
movq %rbx, %rdi
movl $0x9, %esi
movl 0x10(%rsp), %edx
movl 0x18(%rsp), %ecx
callq 0x4b17
movzwl 0x12(%rbx), %eax
movw %ax, 0x10(%rbx)
movb 0x30(%rbx), %cl
movl %eax, %edx
rolw $0x8, %dx
andb $-0xe, %cl
leal 0x8(%rcx), %esi
testw %dx, %dx
movzbl %cl, %ecx
movzbl %sil, %esi
cmovnsl %ecx, %esi
leal 0x4(%rsi), %ecx
testw %ax, %ax
movzbl %cl, %eax
cmovnel %esi, %eax
movb %al, 0x30(%rbx)
movzwl %dx, %esi
movq %rbx, %rdi
movl 0x18(%rsp), %edx
jmp 0x3f46
cmpl $0x0, 0xf53b(%rip)      # 0x13cc8
je 0x47a4
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2c67(%rip), %rdi      # 0x7404
xorl %eax, %eax
callq 0x20a0
movb 0x24(%rbx), %al
andb $0xf, %al
orb %al, 0x30(%rbx)
jmp 0x44f5
cmpl $0x0, 0xf510(%rip)      # 0x13cc8
je 0x47cf
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2c5c(%rip), %rdi      # 0x7424
xorl %eax, %eax
callq 0x20a0
movl $0x2, 0x3c(%rbx)
jmp 0x44f5
cmpl $0x0, 0xf4e6(%rip)      # 0x13cc8
je 0x47f9
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2c3d(%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 0x2d35
testl %eax, %eax
movb 0xf(%rsp), %r13b
jne 0x4977
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 0x2d35
testl %eax, %eax
jne 0x4977
movq 0x28(%rbx), %rax
movb 0xc(%rax), %al
movb %al, 0x30(%rbx)
jmp 0x3782
movw $0xc, %r12w
cmpl $0x0, 0xf45d(%rip)      # 0x13cc8
je 0x3dd2
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2bba(%rip), %rdi      # 0x7439
jmp 0x42f4
movw $0x10, %r12w
cmpl $0x0, 0xf438(%rip)      # 0x13cc8
je 0x3dd2
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2b9f(%rip), %rdi      # 0x7443
jmp 0x42f4
cmpl $0x0, 0xf418(%rip)      # 0x13cc8
je 0x48c7
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2b8d(%rip), %rdi      # 0x744d
xorl %eax, %eax
callq 0x20a0
movl $0x0, 0x34(%rbx)
movq 0x28(%rbx), %rax
movq (%rax), %r14
testq %r14, %r14
movb 0xf(%rsp), %r13b
je 0x3782
movq 0x8(%r14), %rdi
callq *0x38(%r14)
movq (%r14), %r14
testq %r14, %r14
jne 0x48e3
jmp 0x3782
cmpl $0x0, 0xf3c9(%rip)      # 0x13cc8
je 0x4916
movzwl 0xe(%rbx), %esi
addl $-0x2, %esi
leaq 0x2ae1(%rip), %rdi      # 0x73f0
xorl %eax, %eax
callq 0x20a0
movl 0xc(%rbx), %eax
movw %ax, 0x22(%rbx)
addl $0x2, %eax
movw %ax, 0xc(%rbx)
movl %r14d, %r15d
movzwl (%rbx,%r15,2), %eax
movw %ax, 0xe(%rbx)
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2d35
testl %eax, %eax
movb 0xf(%rsp), %r13b
jne 0x4977
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %eax
movw %ax, (%rbx,%r15,2)
jmp 0x3782
leaq 0x2a55(%rip), %rdi      # 0x73b4
leaq 0x2a67(%rip), %rsi      # 0x73cd
leaq 0x2a67(%rip), %rcx      # 0x73d4
movl $0x1da, %edx            # imm = 0x1DA
callq 0x20d0
cmpl $0x2, 0x38(%rbx)
jge 0x4ab1
movq 0x28(%rbx), %rax
movl 0x8(%rax), %esi
leaq 0x2aca(%rip), %rdi      # 0x7459
xorl %eax, %eax
callq 0x20a0
movw $0x4, %r12w
movw %r12w, 0x14(%rbx)
cmpl $0x0, 0xf321(%rip)      # 0x13cc8
je 0x49bb
movzwl 0x14(%rbx), %esi
leaq 0x2ab3(%rip), %rdi      # 0x7467
xorl %eax, %eax
callq 0x20a0
movzwl 0xc(%rbx), %eax
addl $-0x2, %eax
movw %ax, 0xc(%rbx)
testl %r14d, %r14d
sete %cl
movzwl %ax, %edx
cmpl $0x100, %edx            # imm = 0x100
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x49e3
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 0x2e0c
testl %eax, %eax
jne 0x4977
testl %r14d, %r14d
sete %cl
movzwl 0xc(%rbx), %eax
addl $-0x2, %eax
movw %ax, 0xc(%rbx)
movzwl %ax, %edx
cmpl $0x100, %edx            # imm = 0x100
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x4a2d
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 0x2e0c
testl %eax, %eax
jne 0x4977
movzwl 0x14(%rbx), %eax
movw %ax, 0x22(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2d35
testl %eax, %eax
jne 0x4977
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 0x2d35
testl %eax, %eax
jne 0x4977
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 0x2b70
leaq 0x29bb(%rip), %rdi      # 0x7473
callq 0x2040
movl $0x0, 0x3c(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq