// File: /workspace/github_c_makefile_star2_O3/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 0xa93c
movq %rax, %rbp
movl $0x2, %edi
callq 0xa93c
movq %rax, %r13
movq %rbx, %rdi
callq 0x1d422
xorl %r15d, %r15d
cmpl $0x60, %eax
ja 0x7878
movl %eax, %eax
leaq 0x28f76(%rip), %rcx     # 0x30720
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %rax, %r15
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %rax, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x8e9c
movq %rax, %rbp
movl $0x1, %edi
callq 0xa8da
movq %rax, %r12
movq %rbx, %rdi
callq 0x8efd
movl %eax, %edi
callq 0xa8da
movq %rax, %r15
movq %rbx, %rdi
callq 0x1d422
movl %eax, %eax
leaq (%rax,%rax,2), %rax
leaq 0x3ca5b(%rip), %r13     # 0x44270
movl (%r13,%rax,4), %esi
movq %r14, %rdi
movq (%rsp), %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
movq %rbx, %rdi
callq 0x1d422
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 0x8dc2
movl 0x4(%r12), %eax
xorl %ecx, %ecx
cmpl 0x4(%r15), %eax
setne %cl
leal 0x1(,%rcx,2), %esi
movq %r14, %rdi
movq %r12, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
movq %r15, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x3b, %edi
callq 0xa93c
movq %rax, (%rsp)
movq %rbx, %rdi
callq 0x1e384
movq %rax, %r15
movq %rax, %rdi
callq 0x129b4
movl %eax, %r12d
leal -0x1(%r12), %ecx
cmpl $0x6, %ecx
movq %r14, 0x28(%rsp)
movq %rcx, 0x68(%rsp)
ja 0x82f8
leaq 0x28fd7(%rip), %rax     # 0x308a4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %r15, %rdi
callq 0x23002
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
shll $0x5, %ebp
addl $0x35, %ebp
movq %rbx, %rdi
callq 0x8efd
movl %ebp, %edi
movl %eax, %esi
callq 0xaacd
movq %rax, 0x30(%rsp)
movq $0x0, 0x20(%rsp)
jmp 0x83ab
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %r14, %rdi
movq %rax, %rsi
callq 0x8e9c
movq %rax, %r15
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %rax, %r12
cmpl $0x5, (%rax)
je 0x7969
movl 0x4(%r12), %esi
movl $0x2, %edi
callq 0xaacd
movq %r14, %rdi
movl $0x1, %esi
movq %r12, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
movq %r13, %r12
movq %rbx, %rdi
callq 0x1d422
cmpl $0xc, %eax
jne 0x7e81
movq 0x20(%rbx), %rdi
callq 0x22fb3
movq %r14, %rdi
testl %eax, %eax
je 0x81c6
movl $0x16, %esi
jmp 0x7868
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %rax, %r13
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %r14, %rdi
movq %rax, %rsi
callq 0x8e9c
movq %rax, (%rsp)
movq %rbx, %rdi
callq 0x8efd
movl $0x25, %edi
movl %eax, %esi
callq 0xaacd
movq %rax, 0x40(%rsp)
movl 0x4(%r13), %edi
callq 0xa8da
movq %rax, %r15
movq %r14, %rdi
movl $0x1, %esi
movq %r13, %rdx
movq 0x40(%rsp), %r13
movq %r13, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
movq (%r12), %rdi
callq 0x1e384
movq %rax, %rdi
callq 0x22fb3
movl 0x4(%r15), %ecx
testl %eax, %eax
je 0x80f9
decl %ecx
cmpl $0x3, %ecx
ja 0x8bcb
leaq 0x28ec8(%rip), %rax     # 0x308fc
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
movq (%rsp), %r12
jmpq *%rcx
movl $0x35, %edi
movl $0x2, %esi
callq 0xaacd
movq %r14, %rdi
movl $0x4, %esi
movq %r13, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
jmp 0x8218
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x2d, %esi
jmp 0x8146
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %rax, %r12
movq %rbx, %rdi
callq 0x8efd
movl %eax, %edi
callq 0xa8da
movq %rax, %r15
cmpl $0x6, 0x4(%r12)
jne 0x812c
movq %r14, %rdi
movl $0x2a, %esi
jmp 0x7868
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %rax, %r12
cmpl $0x2, (%rax)
je 0x7adf
movq %r14, %rdi
movq %r12, %rsi
callq 0x8e9c
movq %rax, %r12
movq %rbx, %rdi
callq 0x8efd
movl %eax, %edi
callq 0xa8da
movq %rax, %r15
jmp 0x7850
movq (%r12), %rdi
callq 0x1d422
movl %eax, %r15d
leal -0x33(%r15), %eax
cmpl $0x2, %eax
jb 0x7b15
cmpl $0x13, %r15d
jne 0x8bac
movq (%r12), %rdi
callq 0xec54
testl %eax, %eax
jne 0x8b6f
cmpl $0x34, %r15d
je 0x8ab6
movq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %rax, %r15
movq (%r12), %rdi
callq 0x1d422
movq (%r12), %rsi
cmpl $0x13, %eax
jne 0x8abe
movq 0x50(%rsi), %rax
movq (%rax), %r12
movq %rbx, %rdi
callq 0x8efd
movq %r14, %rbx
movq %r14, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x8f2d
jmp 0x8ac9
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x2c, %esi
jmp 0x8146
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %r14, %rbx
movq %rax, %r14
movq 0x8(%r12), %rsi
movq %rbx, %rdi
callq 0x775b
movq %rax, %r15
movq (%r12), %rax
movq 0x20(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax), %rsi
movl $0x1, %edi
callq 0xec3c
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 0x9298
jmp 0x7878
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %rax, %r12
cmpl $0x2, (%rax)
je 0x7c15
movq %r14, %rdi
movq %r12, %rsi
callq 0x8e9c
movq %rax, %r12
movq %rbx, %rdi
callq 0x8efd
movl %eax, %edi
callq 0xa8da
movq %rax, %r15
movq %r14, %rdi
movl $0x29, %esi
jmp 0x7fdd
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %rax, %r12
cmpl $0x2, (%rax)
je 0x7c56
movq %r14, %rdi
movq %r12, %rsi
callq 0x8e9c
movq %rax, %r12
movq %rbx, %rdi
callq 0x8efd
movl %eax, %edi
callq 0xa8da
movq %rax, %r15
movq %r14, %rdi
movl $0x28, %esi
jmp 0x7fdd
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %rax, %r12
cmpl $0x2, (%rax)
je 0x7c97
movq %r14, %rdi
movq %r12, %rsi
callq 0x8e9c
movq %rax, %r12
movq %rbx, %rdi
callq 0x8efd
movl %eax, %edi
callq 0xa8da
movq %rax, %r15
movq %r14, %rdi
movl $0x1, %esi
jmp 0x7fdd
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq 0x8(%r12), %rcx
movq 0x50(%rcx), %rcx
movq (%rcx), %rcx
movq 0x30(%rcx), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x9422
jmp 0x8ab6
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x2f, %esi
jmp 0x8146
movq (%r12), %rsi
movq %r14, %rbx
movq %r14, %rdi
callq 0x775b
movq %rax, %r14
movl (%rax), %eax
cmpl $0x1, %eax
je 0x81af
cmpl $0x4, %eax
jne 0x7d25
cmpq $0x0, 0x28(%r14)
je 0x81af
movl $0x4, %edi
callq 0xa8da
movq %rax, %r15
movq %rbx, %rdi
movl $0x5, %esi
movq %r14, %rdx
jmp 0x7fe0
movq %rbx, %rdi
callq 0x1e384
movq %rax, %rdi
callq 0x227ac
movq %rax, %rdi
callq 0x227e7
testl %eax, %eax
jne 0x80cd
leaq 0x28d45(%rip), %rdi     # 0x30aae
leaq 0x28d06(%rip), %rsi     # 0x30a76
leaq 0x28d06(%rip), %rcx     # 0x30a7d
movl $0x443, %edx            # imm = 0x443
callq 0x4180
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %r14, %rdi
movq %rax, %rsi
callq 0x8e9c
movq %rax, %r13
movl $0x1, %edi
callq 0xa8da
movq %rax, %r12
movq %rbx, %rdi
callq 0x8efd
movl %eax, %edi
callq 0xa8da
movq %rax, %r15
movq %rbx, %rdi
callq 0x1d422
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movq %rbx, %rbp
leaq 0x3c49e(%rip), %rbx     # 0x44270
movl (%rbx,%rax,4), %esi
movq %r14, %rdi
movq %r13, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
movq %rbp, %rdi
callq 0x1d422
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movl 0x8(%rbx,%rax,4), %esi
jmp 0x7841
movq 0x10(%r14), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
callq 0xa7af
jmp 0x7ff1
movq (%r12), %r15
movq %rbx, %rdi
callq 0x8efd
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 0x8f2d
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x11, %esi
jmp 0x8146
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x13, %esi
jmp 0x8146
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x7, %esi
jmp 0x8146
movq %r14, %rdi
movl $0x15, %esi
jmp 0x7868
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x6, %esi
jmp 0x8146
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8c32
movq %rax, %r15
testq %rax, %rax
jne 0x7878
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x12, %esi
jmp 0x8146
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %r14, %rdi
movq %rax, %rsi
callq 0x8e9c
movq %rax, %r15
movq %r14, %rdi
movl $0x10, %esi
jmp 0x8020
movq (%r12), %rdi
callq 0x12664
movq (%r12), %rdx
cmpq $0x1, %rax
jne 0x8139
movq %r14, %rdi
movq %rdx, %rsi
callq 0x775b
movq %r14, %rbx
movq %rax, %r14
movq 0x8(%r12), %rsi
movq %rbx, %rdi
callq 0x775b
movq %rax, %r12
cmpl $0x2, (%rax)
je 0x7f4c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8e9c
movq %rax, %r12
movl $0x1, %edi
callq 0xa93c
movq %rax, %r13
movl 0x4(%r14), %edi
callq 0xa8da
movq %rax, %r15
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
movq %rbx, %rdi
movl $0x9, %esi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8dc2
movq %rbx, %rdi
movl $0x1, %esi
movq %r13, %rdx
jmp 0x786b
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %rax, %r12
cmpl $0x2, (%rax)
je 0x7fc3
movq %r14, %rdi
movq %r12, %rsi
callq 0x8e9c
movq %rax, %r12
movq %rbx, %rdi
callq 0x8efd
movl %eax, %edi
callq 0xa8da
movq %rax, %r15
movq %r14, %rdi
movl $0x4, %esi
movq %r12, %rdx
movq %rax, %rcx
jmp 0x786e
movq (%r12), %rdi
callq 0xa81f
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x34, %esi
jmp 0x8020
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %r14, %rdi
movq %rax, %rsi
callq 0x8e9c
movq %rax, %r15
movq %r14, %rdi
movl $0x14, %esi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8dc2
jmp 0x7878
movq (%r12), %rsi
movq %r14, %rdi
callq 0x775b
movq %r14, %rdi
movq %rax, %rsi
callq 0x8e9c
movq %rax, %r15
movq (%r12), %rdi
callq 0x8efd
cmpl $0x5, %eax
jne 0x8159
movl $0x5, %edi
callq 0xa8da
movq %r14, %rbx
movq %rax, %r14
movl $0x80000000, %edi       # imm = 0x80000000
movl $0x5, %esi
callq 0xaaa5
movq %rax, %r12
movq %rbx, %rdi
movl $0x27, %esi
jmp 0x819a
movq %r14, %rdi
movq %r12, %rsi
callq 0x9099
jmp 0x8ab6
movq %rbx, %rdi
callq 0x28999
testl %eax, %eax
je 0x80cd
movl $0x4, %edi
callq 0xa8da
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x91b0
movq %r14, %rdi
movl $0x5, %esi
jmp 0x8277
movq %r14, %rdi
movq %rbx, %rsi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x91b0
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r14, %rdi
movl $0x2e, %esi
jmp 0x8146
cmpl $0x1, %ecx
jne 0x81d0
movl $0x11, %edi
callq 0xa93c
movq %rax, %r12
movl $0x11, %edi
callq 0xa93c
movq %r14, %rdi
movl $0x13, %esi
movq %r12, %rdx
movq %rax, %rcx
jmp 0x81de
movq %r14, %rdi
movl $0x2b, %esi
jmp 0x7868
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 0x8bd9
movq %r14, %rbx
movq (%r12), %rdi
callq 0x8efd
cmpl $0x6, %eax
jne 0x8862
movl $0x4, %edi
callq 0xa8da
movq %rax, %r14
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
movl $0x4, %esi
callq 0xaaa5
movq %rax, %r12
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
jmp 0x8868
movq 0x10(%r14), %rdi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa7e7
movl $0x17, %esi
jmp 0x7868
movq %r14, %rdi
movl $0x13, %esi
movq %rbp, %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
movl $0xb, %esi
movq (%rsp), %r12
jmp 0x821d
movq %r14, %rdi
movl $0xe, %esi
jmp 0x820f
movq %r14, %rdi
movl $0xf, %esi
jmp 0x820f
movq %r14, %rdi
movl $0xd, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x8dc2
movl $0xc, %esi
movq %r14, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8dc2
movq %rbx, %rdi
callq 0x1d422
cmpl $0x5, %eax
jne 0x8248
movq %rbx, %rdi
callq 0x8efd
movl $0x25, %edi
jmp 0x8268
cmpl $0x1, 0x4(%r15)
jne 0x825b
movl $0x11, %edi
callq 0xa93c
jmp 0x826f
movq %rbx, %rdi
callq 0x8efd
movl $0x27, %edi
movl %eax, %esi
callq 0xaacd
movq %r14, %rdi
movl $0x1, %esi
movq %rax, %rdx
jmp 0x786b
movl 0x3bfcb(%rip), %ebp     # 0x44250
movq %r15, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0xa2a5
movl %ebp, %edi
movl %eax, %esi
callq 0xaacd
movq %rax, 0x30(%rsp)
movl 0x3bfb8(%rip), %ebp     # 0x44260
jmp 0x82e9
movl 0x3bfa0(%rip), %ebp     # 0x44250
movq $0x0, 0x20(%rsp)
movq %r15, %rdi
movl $0x1, %esi
jmp 0x8323
movl 0x3bf97(%rip), %ebp     # 0x44260
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xa2a5
movl %ebp, %edi
movl %eax, %esi
callq 0xaacd
movq %rax, 0x30(%rsp)
movl 0x3bf7f(%rip), %ebp     # 0x44268
movl $0x8, %edx
movq %r15, %rdi
xorl %esi, %esi
jmp 0x8398
movq $0x0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
jmp 0x83ab
movl 0x3bf4b(%rip), %ebp     # 0x44260
movq $0x0, 0x20(%rsp)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xa2a5
movl %ebp, %edi
movl %eax, %esi
callq 0xaacd
movq %rax, 0x30(%rsp)
jmp 0x83ab
movl 0x3bf20(%rip), %ebp     # 0x44260
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xa2a5
movl %ebp, %edi
movl %eax, %esi
callq 0xaacd
movq %rax, 0x30(%rsp)
movl 0x3bef0(%rip), %ebp     # 0x44250
jmp 0x838b
movl 0x3bee8(%rip), %ebp     # 0x44250
movq %r15, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0xa2a5
movl %ebp, %edi
movl %eax, %esi
callq 0xaacd
movq %rax, 0x30(%rsp)
movl 0x3becd(%rip), %ebp     # 0x44258
movl $0x8, %edx
movq %r15, %rdi
movl $0x1, %esi
callq 0xa2a5
movl %ebp, %edi
movl %eax, %esi
callq 0xaacd
movq %rax, 0x20(%rsp)
movq 0x50(%rbx), %rax
movq (%rax), %rdi
callq 0x1e384
movq %rax, %rdi
callq 0x227ac
movq %rax, %rdi
callq 0x12965
movq %rax, 0x40(%rsp)
movq %rbx, %rdi
callq 0x1d422
movq %rbx, %rcx
xorl %ebx, %ebx
cmpl $0x48, %eax
sete %bl
incq %rbx
movq %rcx, 0x50(%rsp)
movq 0x50(%rcx), %r14
testl %r12d, %r12d
je 0x8407
movq (%r14,%rbx,8), %rax
movq %rax, 0x48(%rsp)
xorl %eax, %eax
cmpl $0x8, %r12d
setne %al
addq %rax, %rbx
jmp 0x8407
movq 0x50(%rsp), %rax
movq 0x40(%rax), %r13
movq %r13, %rax
subq %rbx, %rax
movq %rax, 0x70(%rsp)
jne 0x8422
xorl %r12d, %r12d
jmp 0x8470
xorl %r12d, %r12d
movq %rbx, %rbp
movq (%r14,%rbp,8), %rdi
callq 0x12664
movl $0x8, %esi
movq %rax, %rdi
callq 0x2e20c
movq %r12, %rdi
movq %rax, %rsi
callq 0x2e217
movq %rax, %r15
movq (%r14,%rbp,8), %rdi
callq 0x12664
addq %rax, %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x2e217
movq %rax, %r12
incq %rbp
cmpq %rbp, %r13
jne 0x8428
movl $0x10, %esi
movq %r12, %rdi
callq 0x2e217
movq %rax, %r12
movq %rax, %rdi
movl $0x4, %esi
callq 0xaaa5
movq %rax, %r15
movq %r12, 0x60(%rsp)
testq %r12, %r12
je 0x84b5
movq 0x28(%rsp), %rdi
movl $0x7, %esi
movq %r15, %rdx
movq (%rsp), %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
movq %r15, 0x58(%rsp)
xorl %r12d, %r12d
movq %r12, 0x8(%rsp)
movq %r12, 0x18(%rsp)
movq %r12, 0x10(%rsp)
cmpq %rbx, %r13
jne 0x854f
movq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x1d422
movq 0x50(%rbx), %rcx
movq (%rcx), %r15
cmpl $0x2d, %eax
jne 0x878c
movq %r15, %rdi
callq 0x1e384
movq %rax, %rdi
callq 0x227ac
cmpl $0x1e, (%rax)
movq 0x28(%rsp), %rbx
movq 0x48(%rsp), %r12
jne 0x8b50
movq 0x60(%rbx), %rdi
movq %r15, %rsi
callq 0x2d8fa
movq %rax, %r14
movq %r15, %rdi
callq 0x8efd
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl %eax, %ecx
callq 0xa9f9
movq %rbx, %rdi
movl $0x32, %esi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8dc2
jmp 0x87f0
leaq (%r14,%rbx,8), %rbx
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rsi
movq 0x28(%rsp), %rdi
callq 0x775b
movq %rax, %rbp
movq (%rbx,%r14,8), %rdi
callq 0x1e384
movq %rax, %r15
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xec3c
movq %rax, 0x8(%rsp)
movl $0x8, %r13d
cmpq 0x40(%rsp), %r14
jae 0x85b9
movl $0x8, %esi
movq %rax, %rdi
callq 0x2e217
movq %rax, 0x8(%rsp)
testl %r12d, %r12d
jne 0x85bf
movq %r15, %rdi
callq 0x129b4
movl %eax, %r13d
xorl %r12d, %r12d
jmp 0x85bf
movl $0x1, %r12d
movl %r13d, %eax
leaq 0x283e7(%rip), %rcx     # 0x309b0
movslq 0x4(%rcx,%rax,8), %rcx
addq 0x18(%rsp), %rcx
cmpq $0x8, %rcx
ja 0x85ef
leaq 0x283d0(%rip), %rcx     # 0x309b0
movslq (%rcx,%rax,8), %rcx
addq 0x10(%rsp), %rcx
cmpq $0x6, %rcx
jbe 0x8637
movq (%rbx,%r14,8), %rsi
subq $0x8, %rsp
movq 0x30(%rsp), %rdi
movq %rbp, %rdx
xorl %ecx, %ecx
movq 0x8(%rsp), %r8
movl %r12d, %r9d
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0x30(%rsp), %rax
pushq %rax
callq 0xa31a
addq $0x20, %rsp
incq %r14
cmpq %r14, 0x70(%rsp)
jne 0x8556
jmp 0x84d1
decl %eax
cmpl $0x7, %eax
ja 0x8624
leaq 0x2827b(%rip), %rcx     # 0x308c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx,%r14,8), %rsi
subq $0x8, %rsp
movq 0x30(%rsp), %rdi
movq %rbp, %rdx
movl $0x2, %ecx
jmp 0x8601
movq (%rbx,%r14,8), %rsi
subq $0x8, %rsp
movq 0x30(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rdx
movl $0x2, %ecx
jmp 0x86ce
movq (%rbx,%r14,8), %rsi
subq $0x8, %rsp
movq 0x30(%rsp), %rdi
movq %rbp, %rdx
movl $0x1, %ecx
jmp 0x8601
movq (%rbx,%r14,8), %rsi
subq $0x8, %rsp
movq 0x30(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rdx
movl $0x1, %ecx
jmp 0x8736
movq (%rbx,%r14,8), %rsi
subq $0x8, %rsp
movq 0x30(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rdx
movl $0x1, %ecx
movq 0x8(%rsp), %r15
movq %r15, %r8
movl %r12d, %r9d
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0x30(%rsp), %rax
pushq %rax
callq 0xa31a
addq $0x20, %rsp
movq (%rbx,%r14,8), %rax
movq %rax, 0x38(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x9943
subq $0x8, %rsp
movq %r13, %rdi
movq 0x40(%rsp), %rsi
movq %rax, %rdx
movl $0x2, %ecx
jmp 0x8784
movq (%rbx,%r14,8), %rsi
subq $0x8, %rsp
movq 0x30(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rdx
movl $0x2, %ecx
movq 0x8(%rsp), %r15
movq %r15, %r8
movl %r12d, %r9d
leaq 0x10(%rsp), %rax
pushq %rax
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0x30(%rsp), %rax
pushq %rax
callq 0xa31a
addq $0x20, %rsp
movq (%rbx,%r14,8), %rax
movq %rax, 0x38(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x9943
subq $0x8, %rsp
movq %r13, %rdi
movq 0x40(%rsp), %rsi
movq %rax, %rdx
movl $0x1, %ecx
movq %r15, %r8
jmp 0x8606
movq %rbx, %r14
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x775b
movq %rax, %r15
movq 0x50(%r14), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x775b
movq %rax, %r14
movl $0x35, %edi
callq 0xa93c
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
movq %rbx, %rdi
movl $0x33, %esi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8dc2
movq 0x48(%rsp), %r12
cmpq $0x0, 0x60(%rsp)
movq 0x30(%rsp), %r15
je 0x8818
movq %rbx, %rdi
movl $0x6, %esi
movq 0x58(%rsp), %rdx
movq (%rsp), %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
movq 0x68(%rsp), %rcx
cmpl $0x6, %ecx
ja 0x8ab6
leaq 0x280b3(%rip), %rax     # 0x308e0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa5e9
movq %rax, %r14
movl 0x4(%r15), %edi
callq 0xa7a3
movq %rbx, %rdi
testl %eax, %eax
je 0x8b0e
movl $0x27, %esi
jmp 0x8b13
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 0x8dc2
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
jmp 0x786b
movq %rbx, %rdi
movq %r12, %rsi
callq 0x775b
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x88b2
cmpl $0x5, %ecx
je 0x88b2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8e9c
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0xa973
movq %rbx, %rdi
movl $0x27, %esi
jmp 0x8948
movq %rbx, %rdi
movq %r12, %rsi
callq 0x775b
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x88ef
cmpl $0x5, %ecx
je 0x88ef
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8e9c
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0xa973
movq %rbx, %rdi
movl $0x27, %esi
jmp 0x89d6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x775b
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x892f
cmpl $0x5, %ecx
je 0x892f
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8e9c
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x4, %ecx
callq 0xa973
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
movq %rbx, %rdi
movq %r12, %rsi
callq 0x775b
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x897a
cmpl $0x5, %ecx
je 0x897a
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8e9c
movl $0x8, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x4, %ecx
callq 0xa973
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x8aa4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x775b
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x89bd
cmpl $0x5, %ecx
je 0x89bd
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8e9c
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x4, %ecx
callq 0xa973
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rdx
jmp 0x8aa9
movq %rbx, %rdi
movq %r12, %rsi
callq 0x775b
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x8a00
cmpl $0x5, %ecx
je 0x8a00
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8e9c
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x4, %ecx
callq 0xa973
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x8a56
movq %rbx, %rdi
movq %r12, %rsi
callq 0x775b
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x8a3d
cmpl $0x5, %ecx
je 0x8a3d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8e9c
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0xa973
movq %rbx, %rdi
movl $0x27, %esi
movq %r15, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
movq %rbx, %rdi
movq %r12, %rsi
callq 0x775b
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x8a88
cmpl $0x5, %ecx
je 0x8a88
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8e9c
movl $0x8, %edi
movq %rax, %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0xa973
movq %rbx, %rdi
movl $0x27, %esi
movq 0x20(%rsp), %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8dc2
xorl %r15d, %r15d
jmp 0x7878
movq %r14, %rbx
movq %r14, %rdi
callq 0x775b
movq %rax, %r14
movl (%r15), %eax
cmpl $0x2, %eax
je 0x8ae7
cmpl $0x5, %eax
je 0x8ae7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8e9c
movq %rax, %r15
movl 0x4(%r15), %edi
callq 0xa7a3
movq %rbx, %rdi
testl %eax, %eax
je 0x8afe
movl $0x27, %esi
jmp 0x8b03
movl $0x1, %esi
movq %r15, %rdx
movq %r14, %rcx
jmp 0x786e
movl $0x1, %esi
movq %r15, %rdx
movq %r14, %rcx
jmp 0x8aac
movq 0x3b4ae(%rip), %rax     # 0x43fd0
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x13806
movq %rbx, %rdi
callq 0x1d422
movl %eax, %eax
leaq 0x57862(%rip), %rcx     # 0x603a0
movq (%rcx,%rax,8), %rsi
leaq 0x27f81(%rip), %rdi     # 0x30aca
xorl %eax, %eax
callq 0x13844
leaq 0x280ca(%rip), %rdi     # 0x30c21
leaq 0x27f18(%rip), %rsi     # 0x30a76
leaq 0x280e1(%rip), %rcx     # 0x30c46
movl $0x21a, %edx            # imm = 0x21A
callq 0x4180
leaq 0x27f24(%rip), %rdi     # 0x30a9a
leaq 0x27ef9(%rip), %rsi     # 0x30a76
leaq 0x27ef9(%rip), %rcx     # 0x30a7d
movl $0x420, %edx            # imm = 0x420
callq 0x4180
movq %rbx, %rdi
callq 0x1d422
movl %eax, %eax
leaq 0x57801(%rip), %rcx     # 0x603a0
movq (%rcx,%rax,8), %rsi
leaq 0x27e8f(%rip), %rdi     # 0x30a39
jmp 0x8b49
leaq 0x27e9a(%rip), %rdi     # 0x30a4d
leaq 0x27ebc(%rip), %rsi     # 0x30a76
leaq 0x27ebc(%rip), %rcx     # 0x30a7d
movl $0x41f, %edx            # imm = 0x41F
callq 0x4180
leaq 0x27e4e(%rip), %rdi     # 0x30a20
xorl %eax, %eax
callq 0x13844