// File: /workspace/github_c_makefile_star2_O3/michaelforney[P]cproc/qbe.c
// Function: funcexpr
struct value *
funcexpr(struct func *f, struct expr *e)
{
	enum instkind op = INONE;
	struct decl *d;
	struct value *l, *r, *v, **argvals;
	struct lvalue lval;
	struct expr *arg;
	struct block *b[3];
	struct type *t, *functype;
	size_t i;

	calcvla(f, e->type);
	switch (e->kind) {
	case EXPRIDENT:
		d = e->u.ident.decl;
		switch (d->kind) {
		case DECLOBJECT: return funcload(f, e->type, (struct lvalue){d->value});
		case DECLCONST:  return d->value;
		default:
			fatal("unimplemented declaration kind %d", d->kind);
		}
		break;
	case EXPRCONST:
		t = e->type;
		if (t->prop & PROPINT || t->kind == TYPEPOINTER)
			return mkintconst(e->u.constant.u);
		assert(t->prop & PROPFLOAT);
		return mkfltconst(t->size == 4 ? VALUE_FLTCONST : VALUE_DBLCONST, e->u.constant.f);
	case EXPRBITFIELD:
	case EXPRCOMPOUND:
		lval = funclval(f, e);
		return funcload(f, e->type, lval);
	case EXPRINCDEC:
		lval = funclval(f, e->base);
		l = funcload(f, e->base->type, lval);
		t = e->type;
		if (t->kind == TYPEPOINTER) {
			r = mkintconst(t->base->size);
		} else if (t->prop & PROPINT) {
			r = mkintconst(1);
		} else if (t->prop & PROPFLOAT) {
			r = mkfltconst(t->size == 4 ? VALUE_FLTCONST : VALUE_DBLCONST, 1);
		} else {
			fatal("not a scalar");
			return NULL;  /* unreachable */
		}
		v = funcinst(f, e->op == TINC ? IADD : ISUB, qbetype(t).base, l, r);
		v = funcstore(f, e->type, e->qual, lval, v);
		return e->u.incdec.post ? l : v;
	case EXPRCALL:
		argvals = xreallocarray(NULL, e->u.call.nargs, sizeof(argvals[0]));
		for (arg = e->u.call.args, i = 0; arg; arg = arg->next, ++i) {
			emittype(arg->type);
			argvals[i] = funcexpr(f, arg);
		}
		t = e->type;
		emittype(t);
		v = funcinst(f, ICALL, qbetype(t).base, funcexpr(f, e->base), t->value);
		functype = e->base->type->base;
		for (arg = e->u.call.args, i = 0; arg; arg = arg->next, ++i) {
			if (functype->u.func.isvararg && i == functype->u.func.nparam)
				funcinst(f, IVARARG, 0, NULL, NULL);
			t = arg->type;
			funcinst(f, IARG, qbetype(t).base, argvals[i], t->value);
		}
		e = e->base;
		if (e->kind == EXPRUNARY && e->op == TBAND) {
			e = e->base;
			if (e->kind == EXPRIDENT && e->u.ident.decl->u.func.isnoreturn)
				funchlt(f);
		}
		return v;
	case EXPRUNARY:
		switch (e->op) {
		case TBAND:
			lval = funclval(f, e->base);
			return lval.addr;
		case TMUL:
			r = funcexpr(f, e->base);
			return funcload(f, e->type, (struct lvalue){r});
		case TSUB:
			r = funcexpr(f, e->base);
			return funcinst(f, INEG, qbetype(e->type).base, r, NULL);
		}
		fatal("internal error; unknown unary expression");
		break;
	case EXPRCAST:
		if (e->toeval)
			funcexpr(f, e->toeval);
		l = funcexpr(f, e->base);
		return convert(f, e->type, e->base->type, l);
	case EXPRBINARY:
		l = funcexpr(f, e->u.binary.l);
		if (e->op == TLOR || e->op == TLAND) {
			b[0] = mkblock("logic_right");
			b[1] = mkblock("logic_join");
			t = e->u.binary.l->type;
			if (e->op == TLOR) {
				funcjnz(f, l, t, b[1], b[0]);
				b[1]->phi.val[0] = mkintconst(1);
			} else {
				funcjnz(f, l, t, b[0], b[1]);
				b[1]->phi.val[0] = mkintconst(0);
			}
			b[1]->phi.blk[0] = f->end;
			funclabel(f, b[0]);
			r = funcexpr(f, e->u.binary.r);
			b[1]->phi.val[1] = convert(f, &typebool, e->u.binary.r->type, r);
			b[1]->phi.blk[1] = f->end;
			funclabel(f, b[1]);
			functemp(f, &b[1]->phi.res);
			b[1]->phi.class = 'w';
			return &b[1]->phi.res;
		}
		r = funcexpr(f, e->u.binary.r);
		t = e->u.binary.l->type;
		if (t->kind == TYPEPOINTER)
			t = &typeulong;
		switch (e->op) {
		case TMUL:
			op = IMUL;
			break;
		case TDIV:
			op = !(t->prop & PROPINT) || t->u.basic.issigned ? IDIV : IUDIV;
			break;
		case TMOD:
			op = t->u.basic.issigned ? IREM : IUREM;
			break;
		case TADD:
			op = IADD;
			break;
		case TSUB:
			op = ISUB;
			break;
		case TSHL:
			op = ISHL;
			break;
		case TSHR:
			op = t->u.basic.issigned ? ISAR : ISHR;
			break;
		case TBOR:
			op = IOR;
			break;
		case TBAND:
			op = IAND;
			break;
		case TXOR:
			op = IXOR;
			break;
		case TLESS:
			if (t->size <= 4)
				op = t->prop & PROPFLOAT ? ICLTS : t->u.basic.issigned ? ICSLTW : ICULTW;
			else
				op = t->prop & PROPFLOAT ? ICLTD : t->u.basic.issigned ? ICSLTL : ICULTL;
			break;
		case TGREATER:
			if (t->size <= 4)
				op = t->prop & PROPFLOAT ? ICGTS : t->u.basic.issigned ? ICSGTW : ICUGTW;
			else
				op = t->prop & PROPFLOAT ? ICGTD : t->u.basic.issigned ? ICSGTL : ICUGTL;
			break;
		case TLEQ:
			if (t->size <= 4)
				op = t->prop & PROPFLOAT ? ICLES : t->u.basic.issigned ? ICSLEW : ICULEW;
			else
				op = t->prop & PROPFLOAT ? ICLED : t->u.basic.issigned ? ICSLEL : ICULEL;
			break;
		case TGEQ:
			if (t->size <= 4)
				op = t->prop & PROPFLOAT ? ICGES : t->u.basic.issigned ? ICSGEW : ICUGEW;
			else
				op = t->prop & PROPFLOAT ? ICGED : t->u.basic.issigned ? ICSGEL : ICUGEL;
			break;
		case TEQL:
			if (t->size <= 4)
				op = t->prop & PROPFLOAT ? ICEQS : ICEQW;
			else
				op = t->prop & PROPFLOAT ? ICEQD : ICEQL;
			break;
		case TNEQ:
			if (t->size <= 4)
				op = t->prop & PROPFLOAT ? ICNES : ICNEW;
			else
				op = t->prop & PROPFLOAT ? ICNED : ICNEL;
			break;
		}
		if (op == INONE)
			fatal("internal error; unimplemented binary expression");
		return funcinst(f, op, qbetype(e->type).base, l, r);
	case EXPRCOND:
		b[0] = mkblock("cond_true");
		b[1] = mkblock("cond_false");
		b[2] = mkblock("cond_join");

		v = funcexpr(f, e->base);
		funcjnz(f, v, e->base->type, b[0], b[1]);

		funclabel(f, b[0]);
		b[2]->phi.val[0] = funcexpr(f, e->u.cond.t);
		b[2]->phi.blk[0] = f->end;
		funcjmp(f, b[2]);

		funclabel(f, b[1]);
		b[2]->phi.val[1] = funcexpr(f, e->u.cond.f);
		b[2]->phi.blk[1] = f->end;

		funclabel(f, b[2]);
		if (e->type == &typevoid)
			return NULL;
		functemp(f, &b[2]->phi.res);
		b[2]->phi.class = qbetype(e->type).base;
		return &b[2]->phi.res;
	case EXPRASSIGN:
		r = funcexpr(f, e->u.assign.r);
		if (e->u.assign.l->kind == EXPRTEMP) {
			e->u.assign.l->u.temp = r;
		} else {
			lval = funclval(f, e->u.assign.l);
			r = funcstore(f, e->u.assign.l->type, e->u.assign.l->qual, lval, r);
		}
		return r;
	case EXPRCOMMA:
		for (e = e->base; e->next; e = e->next)
			funcexpr(f, e);
		return funcexpr(f, e);
	case EXPRBUILTIN:
		switch (e->u.builtin.kind) {
		case BUILTINVASTART:
			l = funcexpr(f, e->base);
			funcinst(f, IVASTART, 0, l, NULL);
			break;
		case BUILTINVAARG:
			if (e->toeval)
				funcexpr(f, e->toeval);
			/* https://todo.sr.ht/~mcf/cproc/52 */
			if (!(e->type->prop & PROPSCALAR))
				error(&tok.loc, "va_arg with non-scalar type is not yet supported");
			l = funcexpr(f, e->base);
			return funcinst(f, IVAARG, qbetype(e->type).base, l, NULL);
		case BUILTINALLOCA:
			l = funcexpr(f, e->base);
			return funcinst(f, IALLOC16, ptrclass, l, NULL);
		case BUILTINUNREACHABLE:
			return NULL;
		default:
			fatal("internal error: unimplemented builtin");
		}
		return NULL;
	case EXPRTEMP:
		assert(e->u.temp);
		return e->u.temp;
	case EXPRSIZEOF:
		t = e->u.szof.type;
		assert(t->kind == TYPEARRAY);
		calcvla(f, t);
		/* if the sizeof operand has VLA type, we must evaluate it */
		if (e->base)
			funcexpr(f, e->base);
		return t->u.array.size;
	}
	fatal("unimplemented expression %d", e->kind);
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xfef4
movl (%r14), %eax
cmpl $0xc, %eax
jne 0xf295
movq 0x18(%r14), %r14
cmpq $0x0, 0x20(%r14)
je 0xf265
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf251
movq 0x20(%r14), %r14
jmp 0xf27d
cmpl $0xf, %eax
ja 0xfa5d
movl %eax, %eax
leaq 0x6509(%rip), %rcx      # 0x157b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movq %r14, %rsi
callq 0x100a7
movq %rdx, %rcx
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
jmp 0xfa14
movq 0x38(%r14), %rsi
movl $0x8, %edx
xorl %edi, %edi
callq 0xe10e
movq %rax, 0x8(%rsp)
movq 0x30(%r14), %r15
testq %r15, %r15
je 0xf315
movq 0x8(%rsp), %r12
movq 0x8(%r15), %rdi
callq 0xe59b
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf251
movq %rax, (%r12)
movq 0x20(%r15), %r15
addq $0x8, %r12
testq %r15, %r15
jne 0xf2f0
movq 0x8(%r14), %r15
movq %r15, %rdi
callq 0xe59b
movq %r15, %rdi
callq 0x102e0
movsbl %al, %ebp
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq 0x18(%r15), %r8
movq %rbx, %rdi
movl $0x56, %esi
movl %ebp, %edx
movq %rax, %rcx
callq 0x10201
movq %rax, 0x10(%rsp)
movq 0x30(%r14), %rbp
testq %rbp, %rbp
je 0xf3c1
movq 0x18(%r14), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %r15
xorl %r12d, %r12d
cmpb $0x1, 0x40(%r15)
jne 0xf38c
cmpq 0x50(%r15), %r12
jne 0xf38c
movq %rbx, %rdi
movl $0x5a, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x10201
movq 0x8(%rbp), %r13
movq %r13, %rdi
callq 0x102e0
movsbl %al, %edx
movq 0x8(%rsp), %rax
movq (%rax,%r12,8), %rcx
movq 0x18(%r13), %r8
movq %rbx, %rdi
movl $0x59, %esi
callq 0x10201
incq %r12
movq 0x20(%rbp), %rbp
testq %rbp, %rbp
jne 0xf36b
movq 0x18(%r14), %rax
cmpl $0x7, (%rax)
jne 0xf8bb
cmpl $0x4a, 0x14(%rax)
movq 0x10(%rsp), %rbp
jne 0xfc79
movq 0x18(%rax), %rax
cmpl $0x0, (%rax)
jne 0xfc79
movq 0x30(%rax), %rax
cmpb $0x1, 0x41(%rax)
jne 0xfc79
movq 0x30(%rbx), %rax
cmpl $0x0, 0x60(%rax)
jne 0xfc79
movl $0x4, 0x60(%rax)
jmp 0xfc79
movq 0x8(%r14), %rax
movl 0x4(%rax), %ecx
testb $0x2, %cl
jne 0xf427
cmpl $0xc, (%rax)
jne 0xf9bb
movq 0x30(%r14), %rbx
movl $0x10, %edi
callq 0xe142
movq %rax, %rbp
movl $0x2, (%rax)
movq %rbx, 0x8(%rax)
jmp 0xfc79
movq 0x30(%r14), %rax
movl 0x8(%rax), %esi
cmpl $0x3, %esi
je 0xf99f
cmpl $0x1, %esi
jne 0xf9a8
movq 0x8(%r14), %rsi
movq 0x20(%rax), %rdx
movq %rbx, %rdi
jmp 0xfa12
movl 0x14(%r14), %eax
cmpl $0x4d, %eax
je 0xfa27
cmpl $0x4b, %eax
je 0xf9fc
cmpl $0x4a, %eax
jne 0xfa4f
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x100a7
movq %rax, %rbp
jmp 0xfc79
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x100a7
movq %rax, %r15
movq %rdx, %r12
movq 0x18(%r14), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
callq 0x10038
movq 0x8(%r14), %rbp
cmpl $0xc, (%rbp)
jne 0xf8c5
movq %rax, 0x10(%rsp)
movq %r15, 0x8(%rsp)
movq 0x20(%rbp), %rax
movq 0x10(%rax), %r15
movl $0x10, %edi
callq 0xe142
movq %rax, %r13
movl $0x2, (%rax)
movq %r15, 0x8(%rax)
jmp 0xfc22
movl 0x30(%r14), %eax
cmpl $0x7, %eax
jg 0xf8e6
testl %eax, %eax
je 0xfb6a
cmpl $0x7, %eax
je 0xf8b4
jmp 0xfb55
movl $0x88, %edi
callq 0xe142
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movl $0x7, %r12d
leaq 0x64c7(%rip), %rax      # 0x15a14
movq %rax, 0x8(%r13)
movl 0xcbe9(%rip), %eax      # 0x1c140
incl %eax
movl %eax, 0xcbe1(%rip)      # 0x1c140
movl %eax, 0x4(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
xorl %ebp, %ebp
movq %rbp, 0x20(%r13)
movl %ebp, 0x60(%r13)
movl %ebp, 0x50(%r13)
movq %rbp, 0x80(%r13)
movl $0x88, %edi
callq 0xe142
movq %rax, %r15
movl %r12d, (%rax)
leaq 0x6487(%rip), %rax      # 0x15a1e
movq %rax, 0x8(%r15)
movl 0xcb9f(%rip), %eax      # 0x1c140
incl %eax
movl %eax, 0xcb97(%rip)      # 0x1c140
movl %eax, 0x4(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movq %rbp, 0x20(%r15)
movl %ebp, 0x60(%r15)
movl %ebp, 0x50(%r15)
movq %rbp, 0x80(%r15)
movl $0x88, %edi
callq 0xe142
movq %rax, %r12
movl $0x7, %eax
movl %eax, (%r12)
leaq 0x6444(%rip), %rax      # 0x15a29
movq %rax, 0x8(%r12)
movl 0xcb50(%rip), %eax      # 0x1c140
incl %eax
movl %eax, 0xcb48(%rip)      # 0x1c140
movl %eax, 0x4(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r12)
movq %rbp, 0x20(%r12)
movl %ebp, 0x60(%r12)
movl %ebp, 0x50(%r12)
movq %rbp, 0x80(%r12)
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq 0x18(%r14), %rcx
movq 0x8(%rcx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rcx
movq %r15, %r8
callq 0xedf8
movq 0x30(%rbx), %rax
movq %r13, 0x80(%rax)
movq %r13, 0x30(%rbx)
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq %rax, 0x40(%r12)
movq 0x30(%rbx), %rax
movq %rax, 0x30(%r12)
cmpl %ebp, 0x60(%rax)
jne 0xf67f
movl $0x1, 0x60(%rax)
movq %r12, 0x70(%rax)
movq 0x30(%rbx), %rax
movq %r15, 0x80(%rax)
movq %r15, 0x30(%rbx)
movq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq %rax, 0x48(%r12)
movq 0x30(%rbx), %rax
movq %rax, 0x38(%r12)
movq %r12, 0x80(%rax)
movq %r12, 0x30(%rbx)
movq 0x8(%r14), %rax
cmpq 0xb8e6(%rip), %rax      # 0x1afa0
je 0xf8b4
movq %r12, %rbp
addq $0x50, %rbp
movl $0x5, 0x50(%r12)
movq $0x0, 0x58(%r12)
movl 0x58(%rbx), %eax
incl %eax
movl %eax, 0x58(%rbx)
movl %eax, 0x54(%r12)
movq 0x8(%r14), %rdi
callq 0x102e0
movsbl %al, %eax
movl %eax, 0x28(%r12)
jmp 0xfc79
movq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq %rax, %rbp
movq 0x30(%r14), %rsi
cmpl $0xe, (%rsi)
jne 0xf920
movq %rbp, 0x30(%rsi)
jmp 0xfc79
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0xf732
movq %rbx, %rdi
callq 0xf251
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq 0x8(%r14), %rsi
movq 0x18(%r14), %rcx
movq 0x8(%rcx), %rdx
movq %rbx, %rdi
movq %rax, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xee87
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq %rax, %r15
movl 0x14(%r14), %eax
andl $-0x2, %eax
cmpl $0x5c, %eax
jne 0xf952
movq %r15, 0x8(%rsp)
movl $0x88, %edi
callq 0xe142
movq %rax, %r13
movl $0x7, %ebp
movl %ebp, (%rax)
leaq 0x622b(%rip), %rax      # 0x159cd
movq %rax, 0x8(%r13)
movl 0xc994(%rip), %eax      # 0x1c140
incl %eax
movl %eax, 0xc98c(%rip)      # 0x1c140
movl %eax, 0x4(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
xorl %r15d, %r15d
movq %r15, 0x20(%r13)
movl %r15d, 0x60(%r13)
movl %r15d, 0x50(%r13)
movq %r15, 0x80(%r13)
movl $0x88, %edi
callq 0xe142
movq %rax, %r12
movl %ebp, (%rax)
leaq 0x61ed(%rip), %rax      # 0x159d9
movq %rax, 0x8(%r12)
movl 0xc949(%rip), %eax      # 0x1c140
incl %eax
movl %eax, 0xc941(%rip)      # 0x1c140
movl %eax, 0x4(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r12)
movq %r15, 0x20(%r12)
movl %r15d, 0x60(%r12)
movl %r15d, 0x50(%r12)
movq %r15, 0x80(%r12)
movq 0x30(%r14), %rax
movq 0x8(%rax), %rdx
cmpl $0x5d, 0x14(%r14)
jne 0xfa9f
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rcx
movq %r13, %r8
callq 0xedf8
movl $0x1, %r15d
jmp 0xfab5
movq 0x30(%r14), %r15
cmpl $0xd, (%r15)
jne 0xfeb6
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfef4
movq 0x18(%r14), %rsi
testq %rsi, %rsi
je 0xf87f
movq %rbx, %rdi
callq 0xf251
movq 0x50(%r15), %rbp
jmp 0xfc79
movq 0x30(%r14), %rbp
testq %rbp, %rbp
jne 0xfc79
leaq 0x61ee(%rip), %rdi      # 0x15a8a
leaq 0x6051(%rip), %rsi      # 0x158f4
leaq 0x60e1(%rip), %rcx      # 0x1598b
movl $0x3b3, %edx            # imm = 0x3B3
callq 0x30e0
xorl %ebp, %ebp
jmp 0xfc79
movq 0x10(%rsp), %rbp
jmp 0xfc79
movl 0x4(%rbp), %ecx
testb $0x2, %cl
jne 0xfa75
testb $0x20, %cl
jne 0xfbea
leaq 0x60df(%rip), %rdi      # 0x159c0
jmp 0xfb5c
cmpl $0x8, %eax
je 0xfb88
cmpl $0xc, %eax
jne 0xfb55
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x57, %esi
xorl %edx, %edx
movq %rax, %rcx
xorl %r8d, %r8d
callq 0x10201
jmp 0xfc79
movq %rbx, %rdi
callq 0x100a7
movq %rdx, %r8
movq 0x30(%r14), %rcx
movq 0x8(%rcx), %rsi
movl 0x10(%rcx), %edx
movq %rbx, %rdi
movq %rax, %rcx
movq %rbp, %r9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe972
movq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq %rax, %r12
movq 0x30(%r14), %rax
movq 0x8(%rax), %rax
cmpl $0xc, (%rax)
jne 0xf975
leaq 0xc393(%rip), %rax      # 0x1bd08
movl 0x14(%r14), %ecx
addl $-0x4a, %ecx
cmpl $0x11, %ecx
ja 0xfdf5
leaq 0x5e64(%rip), %rdx      # 0x157f0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0xb, %ebp
jmp 0xfe3e
movq 0x20(%rax), %rbp
jmp 0xfc79
leaq 0x5fa6(%rip), %rdi      # 0x15955
xorl %eax, %eax
callq 0xe058
jmp 0xfa5d
testb $0x20, %cl
je 0xfed5
xorl %ebx, %ebx
cmpq $0x4, 0x10(%rax)
setne %bl
addl $0x3, %ebx
movsd 0x30(%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x10, %edi
callq 0xe142
movq %rax, %rbp
movl %ebx, (%rax)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
jmp 0xfc79
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
xorl %ecx, %ecx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10038
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq %rax, %r15
movq 0x8(%r14), %rdi
callq 0x102e0
movsbl %al, %edx
movq %rbx, %rdi
movl $0x3, %esi
jmp 0xfbdf
leaq 0x377e(%rip), %rdi      # 0x131d4
xorl %eax, %eax
callq 0xe058
movl (%r14), %esi
leaq 0x6042(%rip), %rdi      # 0x15aa9
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xe058
jmp 0xfc79
movq %rax, 0x10(%rsp)
movq %r15, 0x8(%rsp)
movl $0x10, %edi
callq 0xe142
movq %rax, %r13
movl $0x2, (%rax)
movq $0x1, 0x8(%rax)
jmp 0xfc22
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rcx
movq %r12, %r8
callq 0xedf8
xorl %r15d, %r15d
movq %r12, %rbp
addq $0x50, %rbp
movl $0x10, %edi
callq 0xe142
movl $0x2, (%rax)
movq %r15, 0x8(%rax)
movq %rax, 0x40(%r12)
movq 0x30(%rbx), %rax
movq %rax, 0x30(%r12)
movq %r13, 0x80(%rax)
movq %r13, 0x30(%rbx)
movq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq 0x38(%r14), %rcx
movq 0x8(%rcx), %rdx
leaq 0xbeec(%rip), %rsi      # 0x1b9f0
movq %rbx, %rdi
movq %rax, %rcx
callq 0xee87
movq %rax, 0x48(%r12)
movq 0x30(%rbx), %rax
movq %rax, 0x38(%r12)
movq %r12, 0x80(%rax)
movq %r12, 0x30(%rbx)
movl $0x5, 0x50(%r12)
movq $0x0, 0x58(%r12)
movl 0x58(%rbx), %eax
incl %eax
movl %eax, 0x58(%rbx)
movl %eax, 0x54(%r12)
movl $0x77, 0x28(%r12)
jmp 0xfc79
leaq 0x5f08(%rip), %rdi      # 0x15a64
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xe058
jmp 0xfc79
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq %rbx, %rdi
movl $0x1f, %esi
movl $0x6c, %edx
movq %rax, %rcx
jmp 0xfbe2
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0xfb99
movq %rbx, %rdi
callq 0xf251
movq 0x8(%r14), %rax
testb $0x10, 0x4(%rax)
jne 0xfbbc
leaq 0xc55e(%rip), %rdi      # 0x1c108
addq $0x8, %rdi
leaq 0x5e7e(%rip), %rsi      # 0x15a33
xorl %eax, %eax
callq 0xd55c
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xf251
movq %rax, %r15
movq 0x8(%r14), %rdi
callq 0x102e0
movsbl %al, %edx
movq %rbx, %rdi
movl $0x58, %esi
movq %r15, %rcx
xorl %r8d, %r8d
jmp 0xfe55
movq %rax, 0x10(%rsp)
movq %r15, 0x8(%rsp)
xorl %r15d, %r15d
cmpq $0x4, 0x10(%rbp)
setne %r15b
addl $0x3, %r15d
movl $0x10, %edi
callq 0xe142
movq %rax, %r13
movl %r15d, (%rax)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x8(%r13)
xorl %r15d, %r15d
cmpl $0x48, 0x14(%r14)
setne %r15b
incl %r15d
movq %rbp, %rdi
callq 0x102e0
movsbl %al, %edx
movq %rbx, %rdi
movl %r15d, %esi
movq 0x10(%rsp), %r15
movq %r15, %rcx
movq %r13, %r8
callq 0x10201
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
movq %rbx, %rdi
movq 0x8(%rsp), %rcx
movq %r12, %r8
movq %rax, %r9
callq 0xe972
movq %rax, %rbp
cmpb $0x0, 0x30(%r14)
cmovneq %r15, %rbp
movq %rbp, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x4, 0x10(%rax)
movl 0x4(%rax), %eax
ja 0xfe07
testb $0x20, %al
movl $0x21, %eax
movl $0x35, %ebp
jmp 0xfe3b
cmpq $0x4, 0x10(%rax)
movl 0x4(%rax), %ecx
ja 0xfe15
movl $0x36, %ebp
testb $0x20, %cl
jne 0xfe3e
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x22(,%rax,4), %ebp
jmp 0xfe3e
cmpq $0x4, 0x10(%rax)
movl 0x4(%rax), %eax
ja 0xfe2f
testb $0x20, %al
movl $0x20, %eax
movl $0x34, %ebp
jmp 0xfe3b
movl $0x1, %ebp
jmp 0xfe3e
movzbl 0x40(%rax), %eax
movl $0x8, %ebp
subl %eax, %ebp
jmp 0xfe3e
cmpq $0x4, 0x10(%rax)
movl 0x4(%rax), %ecx
ja 0xfe68
movl $0x38, %ebp
testb $0x20, %cl
jne 0xfe3e
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x24(,%rax,4), %ebp
jmp 0xfe3e
movl $0x5, %ebp
jmp 0xfe3e
movl $0xe, %ebp
jmp 0xfe3e
movzbl 0x40(%rax), %ebp
xorl $0xd, %ebp
jmp 0xfe3e
movl $0xa, %ebp
jmp 0xfe3e
movl $0x9, %ebp
jmp 0xfe3e
movl $0x2, %ebp
jmp 0xfe3e
movl $0x4, %ebp
testb $0x2, 0x4(%rax)
je 0xfe3e
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x4(,%rax,2), %ebp
jmp 0xfe3e
cmpq $0x4, 0x10(%rax)
movl 0x4(%rax), %ecx
ja 0xfe82
movl $0x39, %ebp
testb $0x20, %cl
jne 0xfe3e
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x25(,%rax,4), %ebp
jmp 0xfe3e
cmpq $0x4, 0x10(%rax)
movl 0x4(%rax), %ecx
ja 0xfe9c
movl $0x37, %ebp
testb $0x20, %cl
jne 0xfe3e
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x23(,%rax,4), %ebp
jmp 0xfe3e
leaq 0x5be8(%rip), %rdi      # 0x159e4
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xe058
jmp 0xfe3e
testb $0x20, %al
movl $0x2b, %eax
movl $0x3d, %ebp
jmp 0xfe3b
movl $0x3e, %ebp
testb $0x20, %cl
jne 0xfe3e
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x2c(,%rax,4), %ebp
jmp 0xfe3e
testb $0x20, %al
movl $0x2a, %eax
movl $0x3c, %ebp
cmovel %eax, %ebp
movq 0x8(%r14), %rdi
callq 0x102e0
movsbl %al, %edx
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rcx
movq %r12, %r8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10201
movl $0x40, %ebp
testb $0x20, %cl
jne 0xfe3e
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x2e(,%rax,4), %ebp
jmp 0xfe3e
movl $0x41, %ebp
testb $0x20, %cl
jne 0xfe3e
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x2f(,%rax,4), %ebp
jmp 0xfe3e
movl $0x3f, %ebp
testb $0x20, %cl
jne 0xfe3e
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x2d(,%rax,4), %ebp
jmp 0xfe3e
leaq 0x5bd7(%rip), %rdi      # 0x15a94
leaq 0x5a30(%rip), %rsi      # 0x158f4
leaq 0x5ac0(%rip), %rcx      # 0x1598b
movl $0x3b7, %edx            # imm = 0x3B7
callq 0x30e0
leaq 0x5a9b(%rip), %rdi      # 0x15977
leaq 0x5a11(%rip), %rsi      # 0x158f4
leaq 0x5aa1(%rip), %rcx      # 0x1598b
movl $0x2d4, %edx            # imm = 0x2D4
callq 0x30e0