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

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

#define SR_N	010
#define DR_N	011
#define SP	cpu->r[6]
#define PC	cpu->r[7]
#define SR	cpu->r[SR_N]
#define DR	cpu->r[DR_N]
#define TV	cpu->r[012]
#define BA	cpu->ba
#define PSW	cpu->psw
#define RD_B(p)	if(readop(cpu, SR_N, src, by, 0)) goto be; if(readop(cpu, DR_N, dst, by, p)) goto be
#define RD_U(p)	if(readop(cpu, DR_N, dst, by, p)) goto be; 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 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, 0)) goto be; d = cpu->bus->data
#define INA(a,d)	cpu->ba = a; if(dati(cpu, 0, 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;

	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;
	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);
		if(readop(cpu, SR_N, src, by, 0)) goto be;
		if(addrop(cpu, dst, by)) goto be;
		if(dm && fetchop(cpu, DR_N, dst, by, 1)) goto be;
		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(0); 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(0); CLV;
		b = DR & SR;
		NZ; SVC;
	case 0140000: case 0040000:	TRB(BIC);
		RD_B(1); CLV;
		b = DR & ~SR;
		NZ; WR; SVC;
	case 0150000: case 0050000:	TRB(BIS);
		RD_B(1); CLV;
		b = DR | SR;
		NZ; WR; SVC;
	case 0060000:			TR(ADD);
		by = 0; RD_B(1); CLCV;
		b = SR + DR; C;
		if(sgn(~(SR ^ DR) & (DR ^ b))) SEV;
		NZ; WR; SVC;
	case 0160000:			TR(SUB);
		by = 0; RD_B(1); 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(1); CLCV;
		b = 0;
		NZ; WR; SVC;
	case 0005100:	TRB(COM);
		RD_U(1); CLV; SEC;
		b = W(~SR);
		NZ; WR; SVC;
	case 0005200:	TRB(INC);
		RD_U(1); CLV;
		b = W(SR+1); BXT;
		if(sgn(~SR&b)) SEV;
		NZ; WR; SVC;
	case 0005300:	TRB(DEC);
		RD_U(1); CLV;
		b = W(SR+~0); BXT;
		if(sgn(SR&~b)) SEV;
		NZ; WR; SVC;
	case 0005400:	TRB(NEG);
		RD_U(1); CLCV;
		b = W(~SR+1); BXT; if(b) SEC;
		if(sgn(b&SR)) SEV;
		NZ; WR; SVC;
	case 0005500:	TRB(ADC);
		RD_U(1); c = ISSET(PSW_C); CLCV;
		b = SR + c; C; BXT;
		if(sgn(~SR&b)) SEV;
		NZ; WR; SVC;
	case 0005600:	TRB(SBC);
		RD_U(1); 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(0); CLCV;
		b = SR;
		NZ; SVC;

	case 0006000:	TRB(ROR);
		RD_U(1); 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(1); 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(1); 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(1); 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){
	/* Branches */
	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;

	case 0004000:
	case 0004400:	TR(JSR);
		if(dm == 0) goto ill;
		if(addrop(cpu, dst, 0)) goto be;
		if(dati(cpu, 0, 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);
	case 0007000:
	case 0007400:
	case 0107000:
	case 0107400:
		goto ri;
	}

	// 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;
		if(dati(cpu, 0, 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);
		if(readop(cpu, DR_N, dst, by, 1)) goto be;
		CLCV;
		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\n");
	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);
	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 < 6 && cpu->traps & TRAP_CLK){
		cpu->traps &= ~TRAP_CLK;
		cpu->lc_int = 0;
		TRAP(0100);
	}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 if(c < 4 && cpu->traps & TRAP_RX){
		cpu->traps &= ~TRAP_RX;
		cpu->rcd_int = 0;
		TRAP(060);
	}else if(c < 4 && cpu->traps & TRAP_TX){
		cpu->traps &= ~TRAP_TX;
		cpu->xmit_int = 0;
		TRAP(064);
	}else
	// TODO? console stop
		/* fetch next instruction */
		return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movb 0x30(%rdi), %bpl
movzwl 0xe(%rdi), %eax
movw %ax, 0x22(%rdi)
addl $0x2, %eax
movw %ax, 0xe(%rdi)
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b41
testl %eax, %eax
jne 0x2ebd
movb %bpl, 0xb(%rsp)
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %r13d
movw %r13w, 0x24(%rbx)
testw %r13w, %r13w
sets %bpl
movl %r13d, %eax
shrl $0xf, %eax
movl %eax, 0xc(%rsp)
movl $0xff, %r15d
movl %r13d, %edi
andl %r15d, %edi
callq 0x1524
movzwl 0x24(%rbx), %ecx
movl %ecx, %r14d
shrl $0x6, %r14d
movl %ecx, %r8d
andl $0x3f, %r8d
movl %ecx, %r9d
andl $0x7, %r9d
movl %ecx, %r12d
shrl $0x3, %r12d
andl $0x7, %r12d
movl %ecx, %edx
andl $0x7fc0, %edx           # imm = 0x7FC0
cmpl $0xc0, %edx
sete %dl
orb %bpl, %dl
movl $0xffff, %ebp           # imm = 0xFFFF
cmovnel %r15d, %ebp
movl $0x80, %edx
movl $0x8000, %r15d          # imm = 0x8000
cmovnel %edx, %r15d
leal -0x1000(%rcx), %esi
shrl $0xc, %esi
cmpl $0xe, %esi
ja 0x2384
movl %r14d, %edx
andl $0x3f, %edx
leaq 0x31ba(%rip), %rdi      # 0x50e8
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movq %r9, 0x10(%rsp)
movl %r8d, %r13d
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x8, %esi
movl 0xc(%rsp), %r14d
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x3119
testl %eax, %eax
jne 0x2ebd
movq %rbx, %rdi
movl %r13d, %esi
movl %r14d, %edx
callq 0x3165
testl %eax, %eax
jne 0x2ebd
testl %r12d, %r12d
movb 0xb(%rsp), %bpl
je 0x1fa3
movq %rbx, %rdi
movl $0x9, %esi
movl %r13d, %edx
movl %r14d, %ecx
movl $0x1, %r8d
callq 0x327a
testl %eax, %eax
jne 0x2ebd
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 %r12d, %r12d
je 0x23ba
movzwl %ax, %esi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x3305
jmp 0x21a9
movl %r8d, %r14d
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x8, %esi
movl 0xc(%rsp), %ebp
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x3119
testl %eax, %eax
jne 0x2ebd
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x9, %esi
movl %r14d, %edx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x3119
testl %eax, %eax
jne 0x2ebd
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 0x2051
orb $0x1, %al
movb %al, 0x30(%rbx)
testw %r13w, %r13w
jns 0x2063
movzbl %bpl, %edi
callq 0x1524
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 0x151e
testw %ax, %ax
je 0x2085
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)
xorl %r15d, %r15d
movb 0xb(%rsp), %bpl
jmp 0x2fe1
movl %r8d, %ebp
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x8, %esi
movl 0xc(%rsp), %r14d
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x3119
testl %eax, %eax
jne 0x2ebd
movq %rbx, %rdi
movl $0x9, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
movb 0xb(%rsp), %bpl
jne 0x2ebd
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 0x222c
movl %r8d, %r12d
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x8, %esi
movl 0xc(%rsp), %r14d
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x3119
testl %eax, %eax
movb 0xb(%rsp), %bpl
jne 0x2ebd
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x9, %esi
movl %r12d, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x3119
testl %eax, %eax
jne 0x2ebd
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)
xorl %r15d, %r15d
jmp 0x2fe1
movl %r8d, %ebp
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x8, %esi
movl 0xc(%rsp), %r14d
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x3119
testl %eax, %eax
jne 0x2ebd
movq %rbx, %rdi
movl $0x9, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
movb 0xb(%rsp), %bpl
jne 0x2ebd
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 %r14d, %edx
callq 0x3305
xorl %r15d, %r15d
testl %eax, %eax
jne 0x2ebd
jmp 0x2fe1
movl %r8d, %ebp
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x8, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3119
testl %eax, %eax
jne 0x2ebd
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x9, %esi
movl %ebp, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x2ebd
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 0x22b3
orb $0x1, %dl
movb %dl, 0x30(%rbx)
xorl %eax, %ecx
movl %ebp, %edx
xorl %eax, %edx
andl %ecx, %edx
movzwl %dx, %edi
jmp 0x2332
movl %r8d, %ebp
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x8, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3119
testl %eax, %eax
jne 0x2ebd
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x9, %esi
movl %ebp, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x2ebd
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 0x2325
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 0x151e
testw %ax, %ax
je 0x2340
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 %r15d, %r15d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3305
testl %eax, %eax
movb 0xb(%rsp), %bpl
jne 0x2ebd
jmp 0x2fe1
movl %ecx, %edx
andl $0xfc0, %edx            # imm = 0xFC0
addl $0xfffff600, %edx       # imm = 0xFFFFF600
shrl $0x6, %edx
cmpl $0xf, %edx
ja 0x28b7
leaq 0x2d7f(%rip), %rax      # 0x5124
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %r15d, %r15d
movw $0x8, %ax
jmp 0x2ef7
movq 0x10(%rsp), %rcx
movw %ax, (%rbx,%rcx,2)
jmp 0x21a9
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %r14d
movl %r14d, %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x28af
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 %r13w, %r13w
js 0x2a5d
andl $0x8000, %eax           # imm = 0x8000
orl %ecx, %eax
jmp 0x2a65
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %ecx
xorl %r8d, %r8d
callq 0x3119
testl %eax, %eax
movb 0xb(%rsp), %bpl
jne 0x2ebd
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 0x21a9
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %ebp
movl %ebp, %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x28af
movzwl 0x12(%rbx), %eax
movw %ax, 0x10(%rbx)
movb 0x30(%rbx), %al
andb $-0x10, %al
orb $0x4, %al
movb %al, 0x30(%rbx)
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
jmp 0x236d
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %r14d
movl %r14d, %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x28af
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, %r15d
orl %ebp, %r15d
movw %ax, 0x10(%rbx)
andb $0x1, %al
orb %dl, %al
movb %al, 0x30(%rbx)
testw %r13w, %r13w
jns 0x2520
movzbl %r15b, %edi
callq 0x1524
movzwl %ax, %r15d
movb 0xb(%rsp), %bpl
movzbl 0x30(%rbx), %eax
movl %eax, %ecx
shrl $0x3, %ecx
xorl %eax, %ecx
testb $0x1, %cl
je 0x253a
orb $0x2, %al
movb %al, 0x30(%rbx)
movb 0x30(%rbx), %al
andb $-0xd, %al
leal 0x8(%rax), %ecx
testw %r15w, %r15w
movzbl %al, %eax
movzbl %cl, %ecx
cmovnsl %eax, %ecx
leal 0x4(%rcx), %eax
testl %r15d, %r15d
movzbl %al, %eax
cmovnel %ecx, %eax
movb %al, 0x30(%rbx)
movq %rbx, %rdi
movl %r15d, %esi
jmp 0x222f
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %r14d
movl %r14d, %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x28af
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 %r13w, %r13w
jns 0x25c5
movzbl %bpl, %edi
callq 0x1524
movzwl %ax, %ebp
movzwl 0x10(%rbx), %edi
xorl $0xffff, %edi           # imm = 0xFFFF
andl %ebp, %edi
callq 0x151e
testw %ax, %ax
je 0x25df
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 0x26ef
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %r14d
movl %r14d, %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x28af
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 %r13w, %r13w
jns 0x2a65
movzbl %al, %edi
jmp 0x2a60
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x28af
movzwl 0x12(%rbx), %eax
andb $-0x3, 0x30(%rbx)
leal -0x1(%rax), %r14d
movw %ax, 0x10(%rbx)
jmp 0x2833
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %ebp
movl %ebp, %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x28af
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)
movzwl %ax, %esi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x3305
xorl %r15d, %r15d
jmp 0x2372
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %r14d
movl %r14d, %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x28af
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 %r13w, %r13w
jns 0x2758
movzbl %sil, %edi
callq 0x1524
movzwl %ax, %esi
movb 0xb(%rsp), %bpl
movzbl 0x30(%rbx), %eax
movl %eax, %ecx
shrl $0x3, %ecx
xorl %eax, %ecx
testb $0x1, %cl
je 0x2772
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 0x222c
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x28af
movzwl 0x12(%rbx), %eax
andb $-0x3, 0x30(%rbx)
leal 0x1(%rax), %r14d
movw %ax, 0x10(%rbx)
testw %r13w, %r13w
jns 0x27dd
movzbl %r14b, %edi
callq 0x1524
movl %eax, %r14d
movb 0xb(%rsp), %bpl
movl 0x10(%rbx), %eax
notl %eax
andl %r14d, %eax
jmp 0x2853
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x28af
movzwl 0x12(%rbx), %r14d
movzbl 0x30(%rbx), %eax
movl %eax, %ecx
andl $0x1, %ecx
testw %r14w, %r14w
sete %dl
orb $-0x4, %dl
movw %r14w, 0x10(%rbx)
subl %ecx, %r14d
andb %al, %dl
movb %dl, 0x30(%rbx)
testw %r13w, %r13w
jns 0x2845
movzbl %r14b, %edi
callq 0x1524
movl %eax, %r14d
movb 0xb(%rsp), %bpl
movl %r14d, %eax
notl %eax
andw 0x10(%rbx), %ax
movzwl %ax, %edi
callq 0x151e
testw %ax, %ax
je 0x2864
orb $0x2, 0x30(%rbx)
movb 0x30(%rbx), %al
andb $-0xd, %al
movzbl %al, %ecx
orb $0x8, %al
movzbl %al, %eax
testw %r14w, %r14w
cmovnsl %ecx, %eax
leal 0x4(%rax), %ecx
testw %r14w, %r14w
movzbl %cl, %ecx
cmovnel %eax, %ecx
movb %cl, 0x30(%rbx)
jmp 0x29d0
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
je 0x2960
xorl %r15d, %r15d
jmp 0x2ebd
movzwl %ax, %eax
addl %eax, %eax
movl %ecx, %edx
andl $0x8f00, %edx           # imm = 0x8F00
xorl %r15d, %r15d
cmpl $0x7fff, %edx           # imm = 0x7FFF
jle 0x291f
cmpl $0x85ff, %edx           # imm = 0x85FF
jg 0x29e0
cmpl $0x82ff, %edx           # imm = 0x82FF
jg 0x2a8b
cmpl $0x8000, %edx           # imm = 0x8000
je 0x2c3e
cmpl $0x8100, %edx           # imm = 0x8100
je 0x2bff
cmpl $0x8200, %edx           # imm = 0x8200
jne 0x2cb5
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0x505, %edx            # imm = 0x505
jmp 0x2ca3
cmpl $0x5ff, %edx            # imm = 0x5FF
jle 0x2a19
cmpl $0x8ff, %edx            # imm = 0x8FF
jg 0x2aec
cmpl $0x600, %edx            # imm = 0x600
je 0x2c94
cmpl $0x700, %edx            # imm = 0x700
je 0x2c83
cmpl $0x800, %edx            # imm = 0x800
je 0x2b3d
jmp 0x2cb5
movzwl 0x12(%rbx), %r14d
andb $-0x4, 0x30(%rbx)
movw %r14w, 0x10(%rbx)
negl %r14d
testw %r13w, %r13w
jns 0x2983
movzbl %r14b, %edi
callq 0x1524
movl %eax, %r14d
movb 0xb(%rsp), %bpl
testw %r14w, %r14w
je 0x2992
orb $0x1, 0x30(%rbx)
movzwl 0x10(%rbx), %eax
andw %r14w, %ax
movzwl %ax, %edi
callq 0x151e
testw %ax, %ax
je 0x29ab
orb $0x2, 0x30(%rbx)
movb 0x30(%rbx), %al
andb $-0xd, %al
leal 0x8(%rax), %ecx
testw %r14w, %r14w
movzbl %al, %eax
movzbl %cl, %ecx
cmovnsl %eax, %ecx
leal 0x4(%rcx), %eax
testw %r14w, %r14w
movzbl %al, %eax
cmovnel %ecx, %eax
movb %al, 0x30(%rbx)
movzwl %r14w, %esi
movq %rbx, %rdi
movl 0xc(%rsp), %edx
jmp 0x2232
cmpl $0x88ff, %edx           # imm = 0x88FF
jg 0x2ac3
cmpl $0x8600, %edx           # imm = 0x8600
je 0x2c58
cmpl $0x8700, %edx           # imm = 0x8700
je 0x2c13
movw $0x18, %ax
cmpl $0x8800, %edx           # imm = 0x8800
je 0x2ef7
jmp 0x2cb5
cmpl $0x2ff, %edx            # imm = 0x2FF
jle 0x2b11
cmpl $0x300, %edx            # imm = 0x300
je 0x2beb
cmpl $0x400, %edx            # imm = 0x400
je 0x2bd7
cmpl $0x500, %edx            # imm = 0x500
jne 0x2cb5
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0x33cc, %edx           # imm = 0x33CC
jmp 0x2ca3
movzbl %cl, %edi
callq 0x1524
movb 0xb(%rsp), %bpl
movzbl 0x30(%rbx), %ecx
movl %ecx, %edx
shrl $0x3, %edx
xorl %ecx, %edx
testb $0x1, %dl
je 0x2a80
orb $0x2, %cl
movb %cl, 0x30(%rbx)
movb 0x30(%rbx), %cl
andb $-0xd, %cl
jmp 0x220b
cmpl $0x8300, %edx           # imm = 0x8300
je 0x2c69
cmpl $0x8400, %edx           # imm = 0x8400
je 0x2c24
cmpl $0x8500, %edx           # imm = 0x8500
jne 0x2cb5
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0xcccc, %edx           # imm = 0xCCCC
jmp 0x2ca3
cmpl $0x8900, %edx           # imm = 0x8900
je 0x2c7a
cmpl $0x8e00, %edx           # imm = 0x8E00
je 0x23ae
cmpl $0x8f00, %edx           # imm = 0x8F00
je 0x23ae
jmp 0x2cb5
cmpl $0x900, %edx            # imm = 0x900
je 0x2b3d
cmpl $0xe00, %edx            # imm = 0xE00
je 0x23ae
cmpl $0xf00, %edx            # imm = 0xF00
je 0x23ae
jmp 0x2cb5
cmpl $0x100, %edx            # imm = 0x100
je 0x2c35
cmpl $0x200, %edx            # imm = 0x200
jne 0x2cb5
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0xf0f, %edx            # imm = 0xF0F
jmp 0x2ca3
testl %r12d, %r12d
je 0x2ef3
xorl %r15d, %r15d
movq %rbx, %rdi
movl %r8d, %esi
xorl %edx, %edx
callq 0x3165
testl %eax, %eax
jne 0x2ebd
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b41
testl %eax, %eax
jne 0x2ebd
andl $0x7, %r14d
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 0x2b9a
orb $0x1, 0x34(%rbx)
movw %ax, 0x22(%rbx)
movzwl (%rbx,%r14,2), %eax
movq 0x28(%rbx), %rcx
movw %ax, 0xc(%rcx)
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1cbd
testl %eax, %eax
movb 0xb(%rsp), %bpl
jne 0x2ebd
movzwl 0xe(%rbx), %eax
movw %ax, (%rbx,%r14,2)
movzwl 0x12(%rbx), %eax
jmp 0x2dbd
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0xcc33, %edx           # imm = 0xCC33
jmp 0x2ca3
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0xf0f0, %edx           # imm = 0xF0F0
jmp 0x2ca3
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0xff00, %edx           # imm = 0xFF00
jmp 0x2ca3
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0xaaaa, %edx           # imm = 0xAAAA
jmp 0x2ca3
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0x3333, %edx           # imm = 0x3333
jmp 0x2ca3
addw %ax, 0xe(%rbx)
jmp 0x20a7
movb 0x30(%rbx), %cl
andb $0xf, %cl
movl $0x1, %edx
shll %cl, %edx
xorl %r15d, %r15d
testb %dl, %dl
je 0x20aa
jmp 0x2cac
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0x5555, %edx           # imm = 0x5555
jmp 0x2ca3
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0xfafa, %edx           # imm = 0xFAFA
jmp 0x2ca3
movw $0x1c, %ax
jmp 0x2ef7
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0xf3fc, %edx           # imm = 0xF3FC
jmp 0x2ca3
movzbl 0x30(%rbx), %ecx
andl $0xf, %ecx
xorl %r15d, %r15d
movl $0xc03, %edx            # imm = 0xC03
btl %ecx, %edx
jae 0x20aa
addw %ax, 0xe(%rbx)
jmp 0x20aa
cmpl $0x100, %ecx            # imm = 0x100
jae 0x2e9e
movl %r14d, %eax
leaq 0x2499(%rip), %rdx      # 0x5164
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
cmpl $0x5, %r9d
ja 0x23ae
movl %r9d, %eax
leaq 0x248c(%rip), %rcx      # 0x5174
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x2, 0x3c(%rbx)
jmp 0x20a7
movl %r12d, %eax
leaq 0x2485(%rip), %rdx      # 0x518c
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
notb %cl
orb $-0x10, %cl
andb %cl, 0x30(%rbx)
jmp 0x20a7
movq %rbx, %rdi
movl $0x9, %esi
movl %r8d, %edx
movl 0xc(%rsp), %ecx
movl $0x1, %r8d
callq 0x3119
testl %eax, %eax
jne 0x28af
movb 0x30(%rbx), %al
movzwl 0x12(%rbx), %ecx
movl %ecx, %edx
rolw $0x8, %dx
andb $-0x10, %al
leal 0x8(%rax), %esi
testw %dx, %dx
movzbl %al, %eax
movzbl %sil, %esi
cmovnsl %eax, %esi
leal 0x4(%rsi), %eax
testw %cx, %cx
movzbl %al, %eax
cmovnel %esi, %eax
movb %al, 0x30(%rbx)
movzwl %dx, %esi
movq %rbx, %rdi
movl 0xc(%rsp), %edx
jmp 0x26ef
testl %r12d, %r12d
je 0x2ef3
xorl %r15d, %r15d
movq %rbx, %rdi
movl %r8d, %esi
xorl %edx, %edx
callq 0x3165
testl %eax, %eax
movb 0xb(%rsp), %bpl
jne 0x2ebd
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b41
testl %eax, %eax
jne 0x2ebd
movzwl 0x20(%rbx), %eax
movw %ax, 0xe(%rbx)
jmp 0x21a9
andb $0xf, %cl
orb %cl, 0x30(%rbx)
jmp 0x20a7
movw $0x10, %ax
jmp 0x2ef7
movl 0xc(%rbx), %eax
movw %ax, 0x22(%rbx)
addl $0x2, %eax
movw %ax, 0xc(%rbx)
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b41
testl %eax, %eax
movb 0xb(%rsp), %bpl
jne 0x2ebd
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 %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b41
testl %eax, %eax
jne 0x2ebd
movq 0x28(%rbx), %rax
movb 0xc(%rax), %al
movb %al, 0x30(%rbx)
jmp 0x21a9
movw $0xc, %ax
jmp 0x2ef7
movq %rbx, %rdi
callq 0x1ae4
jmp 0x20a7
movl 0xc(%rbx), %eax
movw %ax, 0x22(%rbx)
addl $0x2, %eax
movw %ax, 0xc(%rbx)
movl %r9d, %r14d
movzwl (%rbx,%r14,2), %eax
movw %ax, 0xe(%rbx)
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b41
testl %eax, %eax
movb 0xb(%rsp), %bpl
jne 0x2ebd
movq 0x28(%rbx), %rax
movzwl 0xc(%rax), %eax
movw %ax, (%rbx,%r14,2)
jmp 0x21a9
leaq 0x23c0(%rip), %rdi      # 0x5265
leaq 0x23d2(%rip), %rsi      # 0x527e
leaq 0x23d3(%rip), %rcx      # 0x5286
movl $0x24e, %edx            # imm = 0x24E
callq 0x10d0
cmpl $0x2, 0x38(%rbx)
jge 0x2ed1
leaq 0x23ee(%rip), %rdi      # 0x52b8
callq 0x1040
jmp 0x2ef3
leaq 0x23ea(%rip), %rdi      # 0x52c2
callq 0x1040
movl $0x0, 0x3c(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movw $0x4, %ax
movw %ax, 0x14(%rbx)
movzwl 0xc(%rbx), %eax
addl $-0x2, %eax
movw %ax, 0xc(%rbx)
testl %r15d, %r15d
sete %cl
movzwl %ax, %edx
cmpl $0x100, %edx            # imm = 0x100
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2f23
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 0x1cbd
testl %eax, %eax
jne 0x2ebd
testl %r15d, %r15d
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 0x2f6d
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 0x1cbd
testl %eax, %eax
jne 0x2ebd
movzwl 0x14(%rbx), %eax
movw %ax, 0x22(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b41
testl %eax, %eax
jne 0x2ebd
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
xorl %edx, %edx
callq 0x1b41
testl %eax, %eax
jne 0x2ebd
movq 0x28(%rbx), %rax
movb 0xc(%rax), %bpl
movb %bpl, 0x30(%rbx)
movw $0xc, %ax
testb $0x10, %bpl
jne 0x2ef7
movl 0x34(%rbx), %eax
testb $0x1, %al
jne 0x307d
testb $0x2, %al
jne 0x308e
movb 0x30(%rbx), %cl
cmpb $-0x20, %cl
setae %dl
testb $0x4, %al
sete %sil
orb %dl, %sil
je 0x309d
cmpb $-0x41, %cl
ja 0x302f
testb $0x8, %al
jne 0x30c1
testb $0x10, %al
jne 0x30e5
cmpb $-0x60, %cl
setae %dl
testb $0x20, %al
sete %sil
orb %dl, %sil
je 0x30af
testb %cl, %cl
js 0x2ee4
testb $0x40, %al
jne 0x30d3
testb %al, %al
js 0x30fe
btl $0x8, %eax
jae 0x2ee4
andl $0xfffffe3c, %eax       # imm = 0xFFFFFE3C
movl %eax, 0x34(%rbx)
movl $0x0, 0xb0(%rbx)
movw $0x34, %ax
jmp 0x2ef7
andl $-0x2, %eax
movl %eax, 0x34(%rbx)
movl $0x1, %r15d
jmp 0x2ef3
andl $-0x4, %eax
movl %eax, 0x34(%rbx)
movw $0x14, %ax
jmp 0x2ef7
andl $-0x8, %eax
movl %eax, 0x34(%rbx)
movq 0x78(%rbx), %rdi
callq *0x70(%rbx)
jmp 0x2ef7
andl $-0x24, %eax
movl %eax, 0x34(%rbx)
movq 0x58(%rbx), %rdi
callq *0x50(%rbx)
jmp 0x2ef7
andl $-0xc, %eax
movl %eax, 0x34(%rbx)
movq 0x68(%rbx), %rdi
callq *0x60(%rbx)
jmp 0x2ef7
andl $-0x44, %eax
movl %eax, 0x34(%rbx)
movq 0x48(%rbx), %rdi
callq *0x40(%rbx)
jmp 0x2ef7
andl $-0x1c, %eax
movl %eax, 0x34(%rbx)
movl $0x0, 0x8c(%rbx)
movw $0x40, %ax
jmp 0x2ef7
andl $0xffffff3c, %eax       # imm = 0xFFFFFF3C
movl %eax, 0x34(%rbx)
movl $0x0, 0x9c(%rbx)
movw $0x30, %ax
jmp 0x2ef7