// File: /workspace/github_c_makefile_star2_O1/oridb[P]mc/6/isel.c
// Function: selexpr
Loc *
selexpr(Isel *s, Node *n)
{
	Loc *a, *b, *c, *d, *r;
	Loc *edx, *cl; /* x86 wants some hard-coded regs */
	Node **args;
	size_t al;
	Op op;

	args = n->expr.args;
	edx = locphysreg(Redx);
	cl = locphysreg(Rcl);
	r = NULL;
	switch (exprop(n)) {
	case Oadd:	r = binop(s, Iadd, args[0], args[1]);	break;
	case Osub:	r = binop(s, Isub, args[0], args[1]);	break;
	case Oband:	r = binop(s, Iand, args[0], args[1]);	break;
	case Obxor:	r = binop(s, Ixor, args[0], args[1]);	break;
	case Obor:
		r = rolop(s, n, args[0], args[1]);
		if (!r)
			r = binop(s, Ior,  args[0], args[1]);
		break;
	case Omul:
		if (size(args[0]) == 1) {
			a = selexpr(s, args[0]);
			b = inr(s, selexpr(s, args[1]));

			c = locphysreg(Ral);
			r = locreg(a->mode);
			g(s, Imov, a, c, NULL);
			g(s, Iimul_r, b, NULL);
			g(s, Imov, c, r, NULL);
		} else {
			r = binop(s, Iimul, args[0], args[1]);
		}
		break;
	case Odiv:
	case Omod:
		/* these get clobbered by the div insn */
		a = selexpr(s, args[0]);
		b = selexpr(s, args[1]);
		b = newr(s, b);
		c = coreg(Reax, mode(n));
		r = locreg(a->mode);
		g(s, Imov, a, c, NULL);
		if (istysigned(exprtype(args[0]))) {
			switch (r->mode) {
			case ModeB:	g(s, Imovsx, c, coreg(Rrax, ModeW), NULL);	break;
			case ModeW:	g(s, Icwd, NULL);	break;
			case ModeL:	g(s, Icdq, NULL);	break;
			case ModeQ:	g(s, Icqo, NULL);	break;
			default:	die("invalid mode in division"); break;
			}
			g(s, Iidiv, b, NULL);
		} else {
			if (r->mode == ModeB)
				g(s, Ixor, locphysreg(Rah), locphysreg(Rah), NULL);
			else
				g(s, Ixor, edx, edx, NULL);
			g(s, Idiv, b, NULL);
		}
		if (exprop(n) == Odiv)
			d = coreg(Reax, mode(n));
		else if (r->mode != ModeB)
			d = coreg(Redx, mode(n));
		else
			d = locphysreg(Rah);
		g(s, Imov, d, r, NULL);
		break;
	case Oneg:
		r = selexpr(s, args[0]);
		r = newr(s, r);
		g(s, Ineg, r, NULL);
		break;

		/* fp expressions */
	case Ofadd:	r = binop(s, Iadds, args[0], args[1]);	break;
	case Ofsub:	r = binop(s, Isubs, args[0], args[1]);	break;
	case Ofmul:	r = binop(s, Imuls, args[0], args[1]);	break;
	case Ofdiv:	r = binop(s, Idivs, args[0], args[1]);	break;
	case Ofneg:
		r = selexpr(s, args[0]);
		r = newr(s, r);
		a = NULL;
		b = NULL;
		if (mode(args[0]) == ModeF) {
			a = locreg(ModeF);
			b = loclit(1LL << (31), ModeF);
			g(s, Imovs, r, a, NULL);
		} else if (mode(args[0]) == ModeD) {
			a = locreg(ModeQ);
			b = loclit(1LL << 63, ModeQ);
			g(s, Imov, r, a, NULL);
		}
		g(s, Ixor, b, a, NULL);
		g(s, Imov, a, r, NULL);
		break;
	case Obsl:
	case Obsr:
		a = newr(s, selexpr(s, args[0]));
		b = selexpr(s, args[1]);
		if (b->type == Loclit) {
			d = b;
		} else {
			c = coreg(Rcl, b->mode);
			g(s, Imov, b, c, NULL);
			d = cl;
		}
		if (exprop(n) == Obsr) {
			if (istysigned(n->expr.type))
				g(s, Isar, d, a, NULL);
			else
				g(s, Ishr, d, a, NULL);
		} else {
			g(s, Ishl, d, a, NULL);
		}
		r = a;
		break;
	case Obnot:
		r = selexpr(s, args[0]);
		r = newr(s, r);
		g(s, Inot, r, NULL);
		break;

	case Oderef:
		r = memloc(s, args[0], mode(n));
		break;

	case Oaddr:
		a = selexpr(s, args[0]);
		if (a->type == Loclbl || (a->type == Locmeml && !a->mem.base)) {
			r = loclitl(a->lbl);
		} else {
			r = locreg(ModeQ);
			g(s, Ilea, a, r, NULL);
		}
		break;

	case Olnot:
		a = newr(s, selexpr(s, args[0]));
		b = locreg(ModeB);
		r = locreg(mode(n));
		/* lnot only valid for integer-like values */
		g(s, reloptab[exprop(n)].test, a, a, NULL);
		g(s, reloptab[exprop(n)].getflag, b, NULL);
		movz(s, b, r);
		break;

	case Oeq: case One: case Ogt: case Oge: case Olt: case Ole:
	case Ofeq: case Ofne: case Ofgt: case Ofge: case Oflt: case Ofle:
	case Oueq: case Oune: case Ougt: case Ouge: case Oult: case Oule:
		a = selexpr(s, args[0]);
		b = selexpr(s, args[1]);
		a = newr(s, a);
		c = locreg(ModeB);
		r = locreg(mode(n));
		g(s, reloptab[exprop(n)].test, b, a, NULL);
		g(s, reloptab[exprop(n)].getflag, c, NULL);
		movz(s, c, r);
		return r;

	case Oasn:  /* relabel */
		die("Unimplemented op %s", opstr[exprop(n)]);
		break;
	case Oset:
		op = exprop(args[0]);
		assert(op == Ovar || op == Oderef || op == Ogap);
		assert(!stacknode(args[0]));

		if (op == Ogap)
			break;

		b = selexpr(s, args[1]);
		if (exprop(args[0]) == Oderef)
			a = memloc(s, args[0]->expr.args[0], mode(n));
		else
			a = selexpr(s, args[0]);
		b = inri(s, b);
		if (isfloatmode(b->mode))
			g(s, Imovs, b, a, NULL);
		else
			g(s, Imov, b, a, NULL);
		r = b;
		break;
	case Ocall:
	case Ocallind:
		gencall(s, n);
		break;
	case Oret:
		a = locstrlbl(s->cfg->end->lbls[0]);
		g(s, Ijmp, a, NULL);
		break;
	case Ojmp:
		g(s, Ijmp, loclbl(args[0]), NULL);
		break;
	case Ocjmp:
		selcjmp(s, n, args);
		break;
	case Ovjmp:
		selvjmp(s, n, args);
		break;
	case Oucon:
		assert(isenum(tybase(exprtype(n))));
		/* fallthrough */
	case Olit:
		r = loc(s, n);
		break;
	case Ovar:
		if (isconstfn(n)) {
			r = locreg(ModeQ);
			a = loc(s, n);
			g(s, Ilea, a, r, NULL);
		} else {
			r = loc(s, n);
		}
		break;
	case Ogap:
		break;
	case Oblit:
		a = selexpr(s, args[0]);
		r = selexpr(s, args[1]);
		al = alignto(1, args[0]->expr.type->sub[0]);
		blit(s, a, r, 0, 0, args[2]->expr.args[0]->lit.intval, al);
		break;

	case Oclear:
		a = selexpr(s, args[0]);
		clear(s, a, args[1]->expr.args[0]->lit.intval, 0);
		break;

		/* cast operators that actually modify the values */
	case Otrunc:
		a = selexpr(s, args[0]);
		a = inr(s, a);
		r = locreg(mode(n));
		g(s, Imov, a, r, NULL);
		break;
	case Ozwiden:
		a = selexpr(s, args[0]);
		a = inr(s, a);
		r = locreg(mode(n));
		movz(s, a, r);
		break;
	case Oswiden:
		a = selexpr(s, args[0]);
		a = inr(s, a);
		r = locreg(mode(n));
		g(s, Imovsx, a, r, NULL);
		break;
	case Oint2flt:
		a = selexpr(s, args[0]);
		a = inr(s ,a);
		r = locreg(mode(n));
		g(s, Icvttsi2sd, a, r, NULL);
		break;
	case Oflt2int:
		a = selexpr(s, args[0]);
		a = inr(s ,a);
		r = locreg(mode(n));
		g(s, Icvttsd2si, a, r, NULL);
		break;

	case Oflt2flt:
		a = selexpr(s, args[0]);
		r = locreg(mode(n));
		if (a->mode == ModeD)
			g(s, Icvttsd2ss, a, r, NULL);
		else
			g(s, Icvttss2sd, a, r, NULL);
		break;
	case Odead:
	case Oundef:
	case Odef:
		/* nothing */
		break;

		/* These operators should never show up in the reduced trees,
		 * since they should have been replaced with more primitive
		 * expressions by now */
	case Obad: case Oauto: case Opreinc: case Opostinc: case Opredec:
	case Otern: case Opostdec: case Olor: case Oland: case Oaddeq:
	case Osubeq: case Omuleq: case Odiveq: case Omodeq: case Oboreq:
	case Obandeq: case Obxoreq: case Obsleq: case Obsreq: case Omemb:
	case Oslbase: case Osllen: case Ocast: case Outag: case Oudata:
	case Otup: case Oarr: case Ostruct:
	case Oslice: case Oidx: case Osize: case Otupget: case Otupmemb:
	case Obreak: case Ocontinue:
	case Numops:
		dumpn(n, stdout);
		die("Should not see %s in isel", opstr[exprop(n)]);
		break;
	}
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x50(%rsi), %r12
movl $0x27, %edi
callq 0xaa70
movq %rax, %rbp
movl $0x2, %edi
callq 0xaa70
movq %rax, %r13
movq %rbx, %rdi
callq 0x1d672
xorl %r15d, %r15d
cmpl $0x60, %eax
ja 0x8b9a
movl %eax, %eax
leaq 0x28e7a(%rip), %rcx     # 0x30720
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %rax, %r15
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %rax, 0x40(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x8f8a
movq %rax, %rbp
movl $0x1, %edi
callq 0xaa0e
movq %rax, %r12
movq %rbx, %rdi
callq 0x8feb
movl %eax, %edi
callq 0xaa0e
movq %rax, %r15
movq %rbx, %rdi
callq 0x1d672
movl %eax, %eax
leaq (%rax,%rax,2), %rax
leaq 0x3c95e(%rip), %r13     # 0x44270
movl (%r13,%rax,4), %esi
movq %r14, %rdi
movq 0x40(%rsp), %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
movq %rbx, %rdi
callq 0x1d672
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movl 0x8(%r13,%rax,4), %esi
movq %r14, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8eb0
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x9196
jmp 0x8b9a
movl $0x3b, %edi
callq 0xaa70
movq %rax, 0x20(%rsp)
movq %rbx, %rdi
callq 0x1e5d4
movq %rax, %r12
movq %rax, %rdi
callq 0x12b78
movl %eax, %r15d
leal -0x1(%r15), %ecx
cmpl $0x6, %ecx
movq %rcx, 0x68(%rsp)
ja 0x83d9
leaq 0x28f05(%rip), %rax     # 0x308a4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %r12, %rdi
callq 0x234b0
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
shll $0x5, %ebp
addl $0x35, %ebp
movq %rbx, %rdi
callq 0x8feb
movl %ebp, %edi
movl %eax, %esi
callq 0xac01
movq %rax, 0x28(%rsp)
movq $0x0, 0x18(%rsp)
jmp 0x848c
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %r14, %rdi
movq %rax, %rsi
callq 0x8f8a
movq %rax, %r15
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %rax, %r12
cmpl $0x5, (%rax)
je 0x7a3b
movl 0x4(%r12), %esi
movl $0x2, %edi
callq 0xac01
movq %r14, %rdi
movl $0x1, %esi
movq %r12, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
movq %r13, %r12
movq %rbx, %rdi
callq 0x1d672
cmpl $0xc, %eax
jne 0x7f5e
movq 0x20(%rbx), %rdi
callq 0x23461
movq %r14, %rdi
testl %eax, %eax
je 0x82a3
movl $0x16, %esi
jmp 0x82a8
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %rax, %r13
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %r14, %rdi
movq %rax, %rsi
callq 0x8f8a
movq %rax, 0x40(%rsp)
movq %rbx, %rdi
callq 0x8feb
movl $0x25, %edi
movl %eax, %esi
callq 0xac01
movq %rax, 0x48(%rsp)
movl 0x4(%r13), %edi
callq 0xaa0e
movq %rax, %r15
movq %r14, %rdi
movl $0x1, %esi
movq %r13, %rdx
movq 0x48(%rsp), %r13
movq %r13, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
movq (%r12), %rdi
callq 0x1e5d4
movq %rax, %rdi
callq 0x23461
movl 0x4(%r15), %ecx
testl %eax, %eax
je 0x81d6
decl %ecx
cmpl $0x3, %ecx
ja 0x8cb9
leaq 0x28df5(%rip), %rax     # 0x308fc
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
movq 0x40(%rsp), %r12
jmpq *%rcx
movl $0x35, %edi
movl $0x2, %esi
callq 0xac01
movq %r14, %rdi
movl $0x4, %esi
movq %r13, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
jmp 0x82f9
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x2d, %esi
jmp 0x8223
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %rax, %r12
movq %rbx, %rdi
callq 0x8feb
movl %eax, %edi
callq 0xaa0e
movq %rax, %r15
cmpl $0x6, 0x4(%r12)
jne 0x8209
movq %r14, %rdi
movl $0x2a, %esi
jmp 0x82a8
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %rax, %r12
cmpl $0x2, (%rax)
je 0x7bb3
movq %r14, %rdi
movq %r12, %rsi
callq 0x8f8a
movq %rax, %r12
movq %rbx, %rdi
callq 0x8feb
movl %eax, %edi
callq 0xaa0e
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
jmp 0x7957
movq (%r12), %rdi
callq 0x1d672
movl %eax, %r15d
leal -0x33(%r15), %eax
cmpl $0x2, %eax
jb 0x7bf2
cmpl $0x13, %r15d
jne 0x8c9a
movq (%r12), %rdi
callq 0xee80
testl %eax, %eax
jne 0x8c5d
cmpl $0x34, %r15d
je 0x8b97
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %rax, %r15
movq (%r12), %rdi
callq 0x1d672
movq (%r12), %rsi
cmpl $0x13, %eax
jne 0x8bac
movq 0x50(%rsi), %rax
movq (%rax), %r12
movq %rbx, %rdi
callq 0x8feb
movq %r14, %rbx
movq %r14, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x901b
jmp 0x8bb7
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x2c, %esi
jmp 0x8223
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %r14, %rbx
movq %rax, %r14
movq 0x8(%r12), %rsi
movq %rbx, %rdi
callq 0x7857
movq %rax, %r15
movq (%r12), %rax
movq 0x20(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax), %rsi
movl $0x1, %edi
callq 0xee68
movq 0x10(%r12), %rcx
movq 0x50(%rcx), %rcx
movq (%rcx), %rcx
movq 0x30(%rcx), %r8
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movq %rax, %r9
callq 0x93b8
jmp 0x8b9a
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %rax, %r12
cmpl $0x2, (%rax)
je 0x7cf2
movq %r14, %rdi
movq %r12, %rsi
callq 0x8f8a
movq %rax, %r12
movq %rbx, %rdi
callq 0x8feb
movl %eax, %edi
callq 0xaa0e
movq %rax, %r15
movq %r14, %rdi
movl $0x29, %esi
jmp 0x80ba
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %rax, %r12
cmpl $0x2, (%rax)
je 0x7d33
movq %r14, %rdi
movq %r12, %rsi
callq 0x8f8a
movq %rax, %r12
movq %rbx, %rdi
callq 0x8feb
movl %eax, %edi
callq 0xaa0e
movq %rax, %r15
movq %r14, %rdi
movl $0x28, %esi
jmp 0x80ba
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %rax, %r12
cmpl $0x2, (%rax)
je 0x7d74
movq %r14, %rdi
movq %r12, %rsi
callq 0x8f8a
movq %rax, %r12
movq %rbx, %rdi
callq 0x8feb
movl %eax, %edi
callq 0xaa0e
movq %rax, %r15
movq %r14, %rdi
movl $0x1, %esi
jmp 0x80ba
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq 0x8(%r12), %rcx
movq 0x50(%rcx), %rcx
movq (%rcx), %rcx
movq 0x30(%rcx), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x9542
jmp 0x8b97
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x2f, %esi
jmp 0x8223
movq (%r12), %rsi
movq %r14, %rbx
movq %r14, %rdi
callq 0x7857
movq %rax, %r14
movl (%rax), %eax
cmpl $0x1, %eax
je 0x828c
cmpl $0x4, %eax
jne 0x7e02
cmpq $0x0, 0x28(%r14)
je 0x828c
movl $0x4, %edi
callq 0xaa0e
movq %rax, %r15
movq %rbx, %rdi
movl $0x5, %esi
movq %r14, %rdx
jmp 0x80bd
movq %rbx, %rdi
callq 0x1e5d4
movq %rax, %rdi
callq 0x22c44
movq %rax, %rdi
callq 0x22c7f
testl %eax, %eax
jne 0x81aa
leaq 0x28c58(%rip), %rdi     # 0x30a9e
leaq 0x28c19(%rip), %rsi     # 0x30a66
leaq 0x28c19(%rip), %rcx     # 0x30a6d
movl $0x443, %edx            # imm = 0x443
callq 0x4180
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %r14, %rdi
movq %rax, %rsi
callq 0x8f8a
movq %rax, %r13
movl $0x1, %edi
callq 0xaa0e
movq %rax, %r12
movq %rbx, %rdi
callq 0x8feb
movl %eax, %edi
callq 0xaa0e
movq %rax, %r15
movq %rbx, %rdi
callq 0x1d672
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movq %rbx, %rbp
leaq 0x3c3c1(%rip), %rbx     # 0x44270
movl (%rbx,%rax,4), %esi
movq %r14, %rdi
movq %r13, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
movq %rbp, %rdi
callq 0x1d672
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movl 0x8(%rbx,%rax,4), %esi
jmp 0x793f
movq 0x10(%r14), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
callq 0xa8e3
jmp 0x80ce
movq (%r12), %r15
movq %rbx, %rdi
callq 0x8feb
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x901b
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x11, %esi
jmp 0x8223
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x13, %esi
jmp 0x8223
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x7, %esi
jmp 0x8223
movq %r14, %rdi
movl $0x15, %esi
jmp 0x82a8
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x6, %esi
jmp 0x8223
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8d20
movq %rax, %r15
testq %rax, %rax
jne 0x8b9a
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x12, %esi
jmp 0x8223
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %r14, %rdi
movq %rax, %rsi
callq 0x8f8a
movq %rax, %r15
movq %r14, %rdi
movl $0x10, %esi
jmp 0x80fd
movq (%r12), %rdi
callq 0x1281a
movq (%r12), %rdx
cmpq $0x1, %rax
jne 0x8216
movq %r14, %rdi
movq %rdx, %rsi
callq 0x7857
movq %r14, %rbx
movq %rax, %r14
movq 0x8(%r12), %rsi
movq %rbx, %rdi
callq 0x7857
movq %rax, %r12
cmpl $0x2, (%rax)
je 0x8029
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8f8a
movq %rax, %r12
movl $0x1, %edi
callq 0xaa70
movq %rax, %r13
movl 0x4(%r14), %edi
callq 0xaa0e
movq %rax, %r15
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
movq %rbx, %rdi
movl $0x9, %esi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8eb0
movq %rbx, %rdi
movl $0x1, %esi
movq %r13, %rdx
jmp 0x895f
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %rax, %r12
cmpl $0x2, (%rax)
je 0x80a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x8f8a
movq %rax, %r12
movq %rbx, %rdi
callq 0x8feb
movl %eax, %edi
callq 0xaa0e
movq %rax, %r15
movq %r14, %rdi
movl $0x4, %esi
movq %r12, %rdx
movq %rax, %rcx
jmp 0x8962
movq (%r12), %rdi
callq 0xa953
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x34, %esi
jmp 0x80fd
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %r14, %rdi
movq %rax, %rsi
callq 0x8f8a
movq %rax, %r15
movq %r14, %rdi
movl $0x14, %esi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8eb0
jmp 0x8b9a
movq (%r12), %rsi
movq %r14, %rdi
callq 0x7857
movq %r14, %rdi
movq %rax, %rsi
callq 0x8f8a
movq %rax, %r15
movq (%r12), %rdi
callq 0x8feb
cmpl $0x5, %eax
jne 0x8236
movl $0x5, %edi
callq 0xaa0e
movq %r14, %rbx
movq %rax, %r14
movl $0x80000000, %edi       # imm = 0x80000000
movl $0x5, %esi
callq 0xabd9
movq %rax, %r12
movq %rbx, %rdi
movl $0x27, %esi
jmp 0x8277
movq %r14, %rdi
movq %r12, %rsi
callq 0x91b9
jmp 0x8b97
movq %rbx, %rdi
callq 0x28e87
testl %eax, %eax
je 0x81aa
movl $0x4, %edi
callq 0xaa0e
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x92d0
movq %r14, %rdi
movl $0x5, %esi
jmp 0x8358
movq %r14, %rdi
movq %rbx, %rsi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x92d0
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x2e, %esi
jmp 0x8223
cmpl $0x1, %ecx
jne 0x82b0
movl $0x11, %edi
callq 0xaa70
movq %rax, %r12
movl $0x11, %edi
callq 0xaa70
movq %r14, %rdi
movl $0x13, %esi
movq %r12, %rdx
movq %rax, %rcx
jmp 0x82be
movq %r14, %rdi
movl $0x2b, %esi
jmp 0x82a8
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x8, %esi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8cc7
movq %r14, %rbx
movq (%r12), %rdi
callq 0x8feb
cmpl $0x6, %eax
jne 0x8936
movl $0x4, %edi
callq 0xaa0e
movq %rax, %r14
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
movl $0x4, %esi
callq 0xabd9
movq %rax, %r12
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
jmp 0x893c
movq 0x10(%r14), %rdi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa91b
movl $0x17, %esi
movq %r12, %rdx
jmp 0x895f
movq %r14, %rdi
movl $0x13, %esi
movq %rbp, %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
movl $0xb, %esi
movq 0x40(%rsp), %r12
jmp 0x82fe
movq %r14, %rdi
movl $0xe, %esi
jmp 0x82f0
movq %r14, %rdi
movl $0xf, %esi
jmp 0x82f0
movq %r14, %rdi
movl $0xd, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x8eb0
movl $0xc, %esi
movq %r14, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8eb0
movq %rbx, %rdi
callq 0x1d672
cmpl $0x5, %eax
jne 0x8329
movq %rbx, %rdi
callq 0x8feb
movl $0x25, %edi
jmp 0x8349
cmpl $0x1, 0x4(%r15)
jne 0x833c
movl $0x11, %edi
callq 0xaa70
jmp 0x8350
movq %rbx, %rdi
callq 0x8feb
movl $0x27, %edi
movl %eax, %esi
callq 0xac01
movq %r14, %rdi
movl $0x1, %esi
movq %rax, %rdx
jmp 0x895f
movl 0x3beea(%rip), %ebp     # 0x44250
movq %r12, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0xa3ce
movl %ebp, %edi
movl %eax, %esi
callq 0xac01
movq %rax, 0x28(%rsp)
movl 0x3bed7(%rip), %ebp     # 0x44260
jmp 0x83ca
movl 0x3bebf(%rip), %ebp     # 0x44250
movq $0x0, 0x18(%rsp)
movq %r12, %rdi
movl $0x1, %esi
jmp 0x8404
movl 0x3beb6(%rip), %ebp     # 0x44260
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xa3ce
movl %ebp, %edi
movl %eax, %esi
callq 0xac01
movq %rax, 0x28(%rsp)
movl 0x3be9e(%rip), %ebp     # 0x44268
movl $0x8, %edx
movq %r12, %rdi
xorl %esi, %esi
jmp 0x8479
movq $0x0, 0x18(%rsp)
movq $0x0, 0x28(%rsp)
jmp 0x848c
movl 0x3be6a(%rip), %ebp     # 0x44260
movq $0x0, 0x18(%rsp)
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xa3ce
movl %ebp, %edi
movl %eax, %esi
callq 0xac01
movq %rax, 0x28(%rsp)
jmp 0x848c
movl 0x3be3f(%rip), %ebp     # 0x44260
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xa3ce
movl %ebp, %edi
movl %eax, %esi
callq 0xac01
movq %rax, 0x28(%rsp)
movl 0x3be0f(%rip), %ebp     # 0x44250
jmp 0x846c
movl 0x3be07(%rip), %ebp     # 0x44250
movq %r12, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0xa3ce
movl %ebp, %edi
movl %eax, %esi
callq 0xac01
movq %rax, 0x28(%rsp)
movl 0x3bdec(%rip), %ebp     # 0x44258
movl $0x8, %edx
movq %r12, %rdi
movl $0x1, %esi
callq 0xa3ce
movl %ebp, %edi
movl %eax, %esi
callq 0xac01
movq %rax, 0x18(%rsp)
movq 0x50(%rbx), %rax
movq (%rax), %rdi
callq 0x1e5d4
movq %rax, %rdi
callq 0x22c44
movq %rax, %rdi
callq 0x12b29
movq %rax, 0x40(%rsp)
movq %rbx, %rdi
callq 0x1d672
movq %rbx, %rcx
xorl %ebx, %ebx
cmpl $0x48, %eax
sete %bl
incq %rbx
testl %r15d, %r15d
je 0x84e3
movq 0x50(%rcx), %rax
movq (%rax,%rbx,8), %rax
movq %rax, 0x50(%rsp)
xorl %eax, %eax
cmpl $0x8, %r15d
setne %al
addq %rax, %rbx
jmp 0x84e3
movq 0x40(%rcx), %r13
movq %rcx, 0x70(%rsp)
movq 0x50(%rcx), %r12
movq %r13, %rax
subq %rbx, %rax
movq %rax, 0x48(%rsp)
jne 0x8502
xorl %r15d, %r15d
jmp 0x8550
xorl %r15d, %r15d
movq %rbx, %rbp
movq (%r12,%rbp,8), %rdi
callq 0x1281a
movl $0x8, %esi
movq %rax, %rdi
callq 0x2e68c
movq %r15, %rdi
movq %rax, %rsi
callq 0x2e697
movq %rax, %r15
movq (%r12,%rbp,8), %rdi
callq 0x1281a
addq %rax, %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x2e697
movq %rax, %r15
incq %rbp
cmpq %rbp, %r13
jne 0x8508
movl $0x10, %esi
movq %r15, %rdi
callq 0x2e697
movq %rax, %rbp
movq %rax, %rdi
movl $0x4, %esi
callq 0xabd9
movq %rax, %r15
movq %rbp, 0x60(%rsp)
testq %rbp, %rbp
je 0x8594
movq %r14, %rdi
movl $0x7, %esi
movq %r15, %rdx
movq 0x20(%rsp), %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
movq %r15, 0x58(%rsp)
xorl %r15d, %r15d
movq %r15, (%rsp)
movq %r15, 0x10(%rsp)
movq %r15, 0x8(%rsp)
cmpq %rbx, %r13
je 0x87fb
leaq (%r12,%rbx,8), %r12
xorl %ebx, %ebx
movq %r14, 0x30(%rsp)
movq (%r12,%rbx,8), %rsi
movq %r14, %rdi
callq 0x7857
movq %rax, %rbp
movq (%r12,%rbx,8), %rdi
callq 0x1e5d4
movq %rax, %r13
movq (%rsp), %rdi
movq %rax, %rsi
callq 0xee68
movq %rax, (%rsp)
movl $0x1, %ecx
cmpq 0x40(%rsp), %rbx
jae 0x8609
movl $0x8, %esi
movq %rax, %rdi
callq 0x2e697
movq %rax, (%rsp)
movl %r15d, %ecx
movl %ecx, %r15d
movl $0x8, %r14d
movl $0x8, %eax
testl %ecx, %ecx
jne 0x8623
movq %r13, %rdi
callq 0x12b78
movl %eax, %eax
leaq 0x28374(%rip), %rcx     # 0x309a0
movslq 0x4(%rcx,%rax,8), %rcx
addq 0x10(%rsp), %rcx
cmpq $0x8, %rcx
ja 0x865b
leaq 0x2835d(%rip), %rcx     # 0x309a0
movslq (%rcx,%rax,8), %rcx
addq 0x8(%rsp), %rcx
movl $0x8, %r14d
cmpq $0x7, %rcx
jae 0x865b
movl %eax, %r14d
decl %r14d
cmpl $0x7, %r14d
ja 0x87e8
leaq 0x28251(%rip), %rcx     # 0x308c0
movslq (%rcx,%r14,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r12,%rbx,8), %rsi
subq $0x8, %rsp
movq 0x38(%rsp), %rdi
movq %rbp, %rdx
xorl %ecx, %ecx
jmp 0x86d2
movq (%r12,%rbx,8), %rsi
subq $0x8, %rsp
movq 0x38(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
movl $0x2, %ecx
jmp 0x8711
movq (%r12,%rbx,8), %rsi
subq $0x8, %rsp
movq 0x38(%rsp), %rdi
movq %rbp, %rdx
movl $0x2, %ecx
jmp 0x86d2
movq (%r12,%rbx,8), %rsi
subq $0x8, %rsp
movq 0x38(%rsp), %rdi
movq %rbp, %rdx
movl $0x1, %ecx
movq 0x28(%rsp), %r8
jmp 0x87ca
movq (%r12,%rbx,8), %rsi
subq $0x8, %rsp
movq 0x38(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
movl $0x1, %ecx
jmp 0x8779
movq (%r12,%rbx,8), %rsi
subq $0x8, %rsp
movq 0x38(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
movl $0x1, %ecx
movq 0x28(%rsp), %r13
movq %r13, %r8
movl %r15d, %r9d
leaq 0x8(%rsp), %rax
pushq %rax
leaq 0x18(%rsp), %rax
pushq %rax
leaq 0x28(%rsp), %rax
pushq %rax
callq 0xa443
addq $0x20, %rsp
movq (%r12,%rbx,8), %rax
movq %rax, 0x38(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x9a54
subq $0x8, %rsp
movq %r14, %rdi
movq 0x40(%rsp), %rsi
movq %rax, %rdx
movl $0x2, %ecx
jmp 0x87c7
movq (%r12,%rbx,8), %rsi
subq $0x8, %rsp
movq 0x38(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rdx
movl $0x2, %ecx
movq 0x28(%rsp), %r13
movq %r13, %r8
movl %r15d, %r9d
leaq 0x8(%rsp), %rax
pushq %rax
leaq 0x18(%rsp), %rax
pushq %rax
leaq 0x28(%rsp), %rax
pushq %rax
callq 0xa443
addq $0x20, %rsp
movq (%r12,%rbx,8), %rax
movq %rax, 0x38(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x9a54
subq $0x8, %rsp
movq %r14, %rdi
movq 0x40(%rsp), %rsi
movq %rax, %rdx
movl $0x1, %ecx
movq %r13, %r8
movl %r15d, %r9d
leaq 0x8(%rsp), %rax
pushq %rax
leaq 0x18(%rsp), %rax
pushq %rax
leaq 0x28(%rsp), %rax
pushq %rax
callq 0xa443
addq $0x20, %rsp
incq %rbx
cmpq %rbx, 0x48(%rsp)
movq 0x30(%rsp), %r14
jne 0x85be
movq 0x70(%rsp), %rbx
movq %rbx, %rdi
callq 0x1d672
movq 0x50(%rbx), %rcx
movq (%rcx), %r15
cmpl $0x2d, %eax
jne 0x8864
movq %r15, %rdi
callq 0x1e5d4
movq %rax, %rdi
callq 0x22c44
cmpl $0x1e, (%rax)
movq 0x50(%rsp), %r12
jne 0x8c3e
movq 0x60(%r14), %rdi
movq %r15, %rsi
callq 0x2dd9a
movq %r14, %rbx
movq %rax, %r14
movq %r15, %rdi
callq 0x8feb
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl %eax, %ecx
callq 0xab2d
movq %rax, %r15
movl $0x32, %esi
jmp 0x88b4
movq %r14, %rdi
movq %r15, %rsi
callq 0x7857
movq %rax, %r15
movq 0x50(%rbx), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdi
callq 0x7857
movq %r14, %rbx
movq %rax, %r14
movl $0x35, %edi
callq 0xaa70
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
movl $0x33, %esi
movq 0x50(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8eb0
cmpq $0x0, 0x60(%rsp)
je 0x88e7
movq %rbx, %rdi
movl $0x6, %esi
movq 0x58(%rsp), %rdx
movq 0x20(%rsp), %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
movq 0x68(%rsp), %rcx
cmpl $0x6, %ecx
movq 0x28(%rsp), %r15
ja 0x8b97
leaq 0x27fdf(%rip), %rax     # 0x308e0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa71e
movq %rax, %r14
movl 0x4(%r15), %edi
callq 0xa8d7
movq %rbx, %rdi
testl %eax, %eax
je 0x8bfc
movl $0x27, %esi
jmp 0x8c01
xorl %r12d, %r12d
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x13, %esi
movq %r12, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
jmp 0x8b9a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7857
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x8993
cmpl $0x5, %ecx
je 0x8993
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8f8a
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0xaaa7
movq %rbx, %rdi
movl $0x27, %esi
jmp 0x8a29
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7857
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x89d0
cmpl $0x5, %ecx
je 0x89d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8f8a
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0xaaa7
movq %rbx, %rdi
movl $0x27, %esi
jmp 0x8ab7
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7857
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x8a10
cmpl $0x5, %ecx
je 0x8a10
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8f8a
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x4, %ecx
callq 0xaaa7
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7857
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x8a5b
cmpl $0x5, %ecx
je 0x8a5b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8f8a
movl $0x8, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x4, %ecx
callq 0xaaa7
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x8b85
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7857
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x8a9e
cmpl $0x5, %ecx
je 0x8a9e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8f8a
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x4, %ecx
callq 0xaaa7
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rdx
jmp 0x8b8a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7857
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x8ae1
cmpl $0x5, %ecx
je 0x8ae1
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8f8a
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x4, %ecx
callq 0xaaa7
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x8b37
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7857
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x8b1e
cmpl $0x5, %ecx
je 0x8b1e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8f8a
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0xaaa7
movq %rbx, %rdi
movl $0x27, %esi
movq %r15, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7857
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x8b69
cmpl $0x5, %ecx
je 0x8b69
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8f8a
movl $0x8, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0xaaa7
movq %rbx, %rdi
movl $0x27, %esi
movq 0x18(%rsp), %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8eb0
xorl %r15d, %r15d
movq %r15, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rbx
movq %r14, %rdi
callq 0x7857
movq %rax, %r14
movl (%r15), %eax
cmpl $0x2, %eax
je 0x8bd5
cmpl $0x5, %eax
je 0x8bd5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8f8a
movq %rax, %r15
movl 0x4(%r15), %edi
callq 0xa8d7
movq %rbx, %rdi
testl %eax, %eax
je 0x8bec
movl $0x27, %esi
jmp 0x8bf1
movl $0x1, %esi
movq %r15, %rdx
movq %r14, %rcx
jmp 0x8962
movl $0x1, %esi
movq %r15, %rdx
movq %r14, %rcx
jmp 0x8b8d
movq 0x3b3c0(%rip), %rax     # 0x43fd0
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x139c1
movq %rbx, %rdi
callq 0x1d672
movl %eax, %eax
leaq 0x57774(%rip), %rcx     # 0x603a0
movq (%rcx,%rax,8), %rsi
leaq 0x27e83(%rip), %rdi     # 0x30aba
xorl %eax, %eax
callq 0x13a00
leaq 0x27fcc(%rip), %rdi     # 0x30c11
leaq 0x27e1a(%rip), %rsi     # 0x30a66
leaq 0x27fe3(%rip), %rcx     # 0x30c36
movl $0x21a, %edx            # imm = 0x21A
callq 0x4180
leaq 0x27e26(%rip), %rdi     # 0x30a8a
leaq 0x27dfb(%rip), %rsi     # 0x30a66
leaq 0x27dfb(%rip), %rcx     # 0x30a6d
movl $0x420, %edx            # imm = 0x420
callq 0x4180
movq %rbx, %rdi
callq 0x1d672
movl %eax, %eax
leaq 0x57713(%rip), %rcx     # 0x603a0
movq (%rcx,%rax,8), %rsi
leaq 0x27d91(%rip), %rdi     # 0x30a29
jmp 0x8c37
leaq 0x27d9c(%rip), %rdi     # 0x30a3d
leaq 0x27dbe(%rip), %rsi     # 0x30a66
leaq 0x27dbe(%rip), %rcx     # 0x30a6d
movl $0x41f, %edx            # imm = 0x41F
callq 0x4180
leaq 0x27d50(%rip), %rdi     # 0x30a10
xorl %eax, %eax
callq 0x13a00