// File: /workspace/github_c_makefile_star2_O2/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
leaq 0x6760(%rip), %r15      # 0x14740
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xea64
movl (%r14), %eax
cmpq $0xf, %rax
ja 0xe62b
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
addq $0x18, %r14
movq %r14, %r12
movq (%r12), %r14
leaq 0x20(%r14), %r12
cmpq $0x0, 0x20(%r14)
je 0xdfe0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xdfc5
jmp 0xe009
movq %rbx, %rdi
movq %r14, %rsi
callq 0xec13
movq %rdx, %rcx
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
jmp 0xe5e8
leaq 0x698f(%rip), %rdi      # 0x149d8
callq 0xd279
movq %rax, %r13
leaq 0x698a(%rip), %rdi      # 0x149e2
callq 0xd279
movq %rax, %r15
leaq 0x6986(%rip), %rdi      # 0x149ed
callq 0xd279
movq %rax, %r12
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xdfc5
movq 0x18(%r14), %rcx
movq 0x8(%rcx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rcx
movq %r15, %r8
callq 0xdbfb
movq 0x30(%rbx), %rax
movq %r13, 0x80(%rax)
movq %r13, 0x30(%rbx)
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0xdfc5
movq %rax, 0x40(%r12)
movq 0x30(%rbx), %rax
movq %rax, 0x30(%r12)
cmpl $0x0, 0x60(%rax)
jne 0xe0d2
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 0xdfc5
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 0xce93(%rip), %rax      # 0x1afa0
je 0xe4d5
movq %r12, %r15
addq $0x50, %r15
movl $0x5, 0x50(%r12)
andq $0x0, 0x58(%r12)
movl 0x58(%rbx), %eax
incl %eax
movl %eax, 0x58(%rbx)
movl %eax, 0x54(%r12)
movq 0x8(%r14), %rdi
callq 0xee06
movsbl %al, %eax
movl %eax, 0x28(%r12)
jmp 0xe7e1
movq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0xdfc5
movq %rax, %r15
movq 0x30(%r14), %rsi
cmpl $0xe, (%rsi)
jne 0xe4dd
movq %r15, 0x30(%rsi)
jmp 0xe7e1
movq 0x30(%r14), %rax
movl 0x8(%rax), %esi
cmpl $0x3, %esi
je 0xe584
cmpl $0x1, %esi
jne 0xe58d
movq 0x8(%r14), %rsi
movq 0x20(%rax), %rdx
movq %rbx, %rdi
jmp 0xe5e6
movq 0x8(%r14), %rax
movl 0x4(%rax), %ecx
testb $0x2, %cl
jne 0xe1af
cmpl $0xc, (%rax)
jne 0xe5a0
movq 0x30(%r14), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd317
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0xe1d7
movq %rbx, %rdi
callq 0xdfc5
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xdfc5
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 0xdc8a
movq 0x30(%r14), %r15
testq %r15, %r15
jne 0xe7e1
leaq 0x6832(%rip), %rdi      # 0x14a4e
leaq 0x6695(%rip), %rsi      # 0x148b8
leaq 0x6725(%rip), %rcx      # 0x1494f
movl $0x3b3, %edx            # imm = 0x3B3
callq 0x30e0
movq 0x30(%r14), %r15
cmpl $0xd, (%r15)
jne 0xea26
movq %rbx, %rdi
movq %r15, %rsi
callq 0xea64
movq 0x18(%r14), %rsi
testq %rsi, %rsi
je 0xe25e
movq %rbx, %rdi
callq 0xdfc5
movq 0x50(%r15), %r15
jmp 0xe7e1
movl 0x14(%r14), %eax
cmpl $0x4d, %eax
je 0xe5fb
cmpl $0x4b, %eax
je 0xe5d0
cmpl $0x4a, %eax
jne 0xe61d
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xec13
movq %rax, %r15
jmp 0xe7e1
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xec13
movq %rax, %r15
movq %rdx, %r12
movq 0x18(%r14), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
callq 0xeb7c
movq 0x8(%r14), %rbp
cmpl $0xc, (%rbp)
jne 0xe50f
movq %rax, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq 0x20(%rbp), %rax
movq 0x10(%rax), %rdi
jmp 0xe651
leaq 0x30(%r14), %r13
movq 0x38(%r14), %rsi
pushq $0x8
popq %rdx
xorl %edi, %edi
callq 0xd0af
movq %rax, 0x10(%rsp)
movq %rax, %r12
movq %r13, %r15
movq (%r15), %r15
testq %r15, %r15
je 0xe32e
movq 0x8(%r15), %rdi
callq 0xd4a9
movq %rbx, %rdi
movq %r15, %rsi
callq 0xdfc5
movq %rax, (%r12)
addq $0x20, %r15
addq $0x8, %r12
jmp 0xe304
movq 0x8(%r14), %r15
movq %r15, %rdi
callq 0xd4a9
movq %r15, %rdi
callq 0xee06
movsbl %al, %ebp
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xdfc5
movq 0x18(%r15), %r8
pushq $0x56
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
movq %rax, %rcx
callq 0xed68
movq %rax, 0x8(%rsp)
movq 0x18(%r14), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %r15
xorl %r12d, %r12d
movq (%r13), %r13
testq %r13, %r13
je 0xe3d1
cmpb $0x1, 0x40(%r15)
jne 0xe3a1
cmpq 0x50(%r15), %r12
jne 0xe3a1
movq %rbx, %rdi
pushq $0x5a
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xed68
movq 0x8(%r13), %rbp
movq %rbp, %rdi
callq 0xee06
movsbl %al, %edx
movq 0x10(%rsp), %rax
movq (%rax,%r12,8), %rcx
movq 0x18(%rbp), %r8
movq %rbx, %rdi
pushq $0x59
popq %rsi
callq 0xed68
addq $0x20, %r13
incq %r12
jmp 0xe379
movq 0x18(%r14), %rax
cmpl $0x7, (%rax)
jne 0xe530
cmpl $0x4a, 0x14(%rax)
movq 0x8(%rsp), %r15
jne 0xe7e1
movq 0x18(%rax), %rax
cmpl $0x0, (%rax)
jne 0xe7e1
movq 0x30(%rax), %rax
cmpb $0x1, 0x41(%rax)
jne 0xe7e1
movq 0x30(%rbx), %rax
cmpl $0x0, 0x60(%rax)
jne 0xe7e1
movl $0x4, 0x60(%rax)
jmp 0xe7e1
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0xdfc5
movq %rax, %r15
movl 0x14(%r14), %eax
andl $-0x2, %eax
cmpl $0x5c, %eax
jne 0xe53a
leaq 0x6549(%rip), %rdi      # 0x14991
callq 0xd279
movq %rax, %r13
leaq 0x6546(%rip), %rdi      # 0x1499d
callq 0xd279
movq %rax, %r12
movq 0x30(%r14), %rax
movq 0x8(%rax), %rdx
cmpl $0x5d, 0x14(%r14)
jne 0xe6b5
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
movq %r13, %r8
callq 0xdbfb
pushq $0x1
popq %rdi
jmp 0xe6c8
movl 0x30(%r14), %eax
testl %eax, %eax
je 0xe7b0
cmpl $0x7, %eax
je 0xe4d5
cmpl $0x8, %eax
je 0xe756
cmpl $0xc, %eax
jne 0xe7d0
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xdfc5
xorl %r15d, %r15d
pushq $0x57
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
movq %rax, %rcx
xorl %r8d, %r8d
callq 0xed68
jmp 0xe7e1
xorl %r15d, %r15d
jmp 0xe7e1
movq %rbx, %rdi
callq 0xec13
movq %rdx, %r8
movq 0x30(%r14), %rcx
movq 0x8(%rcx), %rsi
movl 0x10(%rcx), %edx
movq %rbx, %rdi
movq %rax, %rcx
movq %r15, %r9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd82c
movl 0x4(%rbp), %ecx
testb $0x2, %cl
jne 0xe644
testb $0x20, %cl
jne 0xe7f3
leaq 0x6459(%rip), %rdi      # 0x14984
jmp 0xe7d7
movq 0x8(%rsp), %r15
jmp 0xe7e1
movq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0xdfc5
movq %rax, %r12
movq 0x30(%r14), %rax
movq 0x8(%rax), %rax
cmpl $0xc, (%rax)
jne 0xe55d
leaq 0xd7ab(%rip), %rax      # 0x1bd08
movl 0x14(%r14), %ecx
addl $-0x4a, %ecx
cmpl $0x11, %ecx
ja 0xe94e
leaq 0x620c(%rip), %rdx      # 0x14780
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
pushq $0xb
jmp 0xe9fb
movq 0x20(%rax), %r15
jmp 0xe7e1
leaq 0x6385(%rip), %rdi      # 0x14919
xorl %eax, %eax
callq 0xcffb
jmp 0xe62b
testb $0x20, %cl
je 0xea45
xorl %edi, %edi
cmpq $0x4, 0x10(%rax)
setne %dil
addl $0x3, %edi
movsd 0x30(%r14), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xebeb
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xdfc5
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 0xeb7c
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xdfc5
movq %rax, %r15
movq 0x8(%r14), %rdi
callq 0xee06
movsbl %al, %edx
pushq $0x3
jmp 0xe7a7
leaq 0x3bb0(%rip), %rdi      # 0x121d4
xorl %eax, %eax
callq 0xcffb
movl (%r14), %esi
leaq 0x6438(%rip), %rdi      # 0x14a6d
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xcffb
jmp 0xe7e1
movq %rax, 0x8(%rsp)
movq %r15, 0x10(%rsp)
pushq $0x1
popq %rdi
callq 0xd317
movq %rax, %r13
xorl %r15d, %r15d
cmpl $0x48, 0x14(%r14)
setne %r15b
incl %r15d
movq %rbp, %rdi
callq 0xee06
movsbl %al, %edx
movq %rbx, %rdi
movl %r15d, %esi
movq 0x8(%rsp), %rbp
movq %rbp, %rcx
movq %r13, %r8
callq 0xed68
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
movq %rbx, %rdi
movq 0x10(%rsp), %rcx
movq %r12, %r8
movq %rax, %r9
callq 0xd82c
movq %rax, %r15
cmpb $0x0, 0x30(%r14)
cmovneq %rbp, %r15
jmp 0xe7e1
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rcx
movq %r12, %r8
callq 0xdbfb
xorl %edi, %edi
callq 0xd317
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 0xdfc5
movq 0x38(%r14), %rcx
movq 0x8(%rcx), %rdx
leaq 0xd2ef(%rip), %rsi      # 0x1b9f0
movq %rbx, %rdi
movq %rax, %rcx
callq 0xdc8a
movq %rax, 0x48(%r12)
movq 0x30(%rbx), %rax
movq %rax, 0x38(%r12)
movq %r12, 0x80(%rax)
movq %r12, 0x30(%rbx)
movq %r12, %r15
addq $0x50, %r15
movl $0x5, 0x50(%r12)
andq $0x0, 0x58(%r12)
movl 0x58(%rbx), %eax
incl %eax
movl %eax, 0x58(%rbx)
movl %eax, 0x54(%r12)
movl $0x77, 0x28(%r12)
jmp 0xe7e1
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0xe767
movq %rbx, %rdi
callq 0xdfc5
movq 0x8(%r14), %rax
testb $0x10, 0x4(%rax)
jne 0xe78a
leaq 0xd990(%rip), %rdi      # 0x1c108
addq $0x8, %rdi
leaq 0x6274(%rip), %rsi      # 0x149f7
xorl %eax, %eax
callq 0xc536
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xdfc5
movq %rax, %r15
movq 0x8(%r14), %rdi
callq 0xee06
movsbl %al, %edx
pushq $0x58
popq %rsi
movq %rbx, %rdi
movq %r15, %rcx
jmp 0xe7c8
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xdfc5
pushq $0x1f
popq %rsi
pushq $0x6c
popq %rdx
movq %rbx, %rdi
movq %rax, %rcx
xorl %r8d, %r8d
jmp 0xea13
leaq 0x6251(%rip), %rdi      # 0x14a28
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xcffb
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x8(%rsp)
movq %r15, 0x10(%rsp)
xorl %edi, %edi
cmpq $0x4, 0x10(%rbp)
setne %dil
addl $0x3, %edi
movsd 0x6065(%rip), %xmm0     # 0x14878
callq 0xebeb
jmp 0xe656
cmpq $0x4, 0x10(%rax)
movl 0x4(%rax), %eax
ja 0xe963
testb $0x20, %al
pushq $0x21
popq %rax
pushq $0x35
jmp 0xe988
cmpq $0x4, 0x10(%rax)
movl 0x4(%rax), %ecx
ja 0xe96c
testb $0x20, %cl
jne 0xe9dd
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x22(,%rax,4), %ebp
jmp 0xe9fc
cmpq $0x4, 0x10(%rax)
movl 0x4(%rax), %eax
ja 0xe981
testb $0x20, %al
pushq $0x20
popq %rax
pushq $0x34
jmp 0xe988
pushq $0x1
jmp 0xe9fb
movzbl 0x40(%rax), %eax
pushq $0x8
popq %rbp
subl %eax, %ebp
jmp 0xe9fc
cmpq $0x4, 0x10(%rax)
movl 0x4(%rax), %ecx
ja 0xe98e
testb $0x20, %cl
jne 0xe9e5
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x24(,%rax,4), %ebp
jmp 0xe9fc
pushq $0x5
jmp 0xe9fb
pushq $0xe
jmp 0xe9fb
movzbl 0x40(%rax), %ebp
xorl $0xd, %ebp
jmp 0xe9fc
pushq $0xa
jmp 0xe9fb
pushq $0x9
jmp 0xe9fb
pushq $0x2
jmp 0xe9fb
testb $0x2, 0x4(%rax)
jne 0xe9a3
pushq $0x4
jmp 0xe9fb
cmpq $0x4, 0x10(%rax)
movl 0x4(%rax), %ecx
ja 0xe9b3
testb $0x20, %cl
jne 0xe9ed
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x25(,%rax,4), %ebp
jmp 0xe9fc
cmpq $0x4, 0x10(%rax)
movl 0x4(%rax), %ecx
ja 0xe9c8
testb $0x20, %cl
jne 0xe9f5
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x23(,%rax,4), %ebp
jmp 0xe9fc
leaq 0x6053(%rip), %rdi      # 0x149a8
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xcffb
jmp 0xe9fc
testb $0x20, %al
pushq $0x2b
popq %rax
pushq $0x3d
jmp 0xe988
testb $0x20, %cl
jne 0xe9e1
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x2c(,%rax,4), %ebp
jmp 0xe9fc
testb $0x20, %al
pushq $0x2a
popq %rax
pushq $0x3c
popq %rbp
cmovel %eax, %ebp
jmp 0xe9fc
testb $0x20, %cl
jne 0xe9e9
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x2e(,%rax,4), %ebp
jmp 0xe9fc
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x4(,%rax,2), %ebp
jmp 0xe9fc
testb $0x20, %cl
jne 0xe9f1
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x2f(,%rax,4), %ebp
jmp 0xe9fc
testb $0x20, %cl
jne 0xe9f9
movzbl 0x40(%rax), %eax
xorl $0x1, %eax
leal 0x2d(,%rax,4), %ebp
jmp 0xe9fc
pushq $0x36
jmp 0xe9fb
pushq $0x3e
jmp 0xe9fb
pushq $0x38
jmp 0xe9fb
pushq $0x40
jmp 0xe9fb
pushq $0x39
jmp 0xe9fb
pushq $0x41
jmp 0xe9fb
pushq $0x37
jmp 0xe9fb
pushq $0x3f
popq %rbp
movq 0x8(%r14), %rdi
callq 0xee06
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 0xed68
leaq 0x602b(%rip), %rdi      # 0x14a58
leaq 0x5e84(%rip), %rsi      # 0x148b8
leaq 0x5f14(%rip), %rcx      # 0x1494f
movl $0x3b7, %edx            # imm = 0x3B7
callq 0x30e0
leaq 0x5eef(%rip), %rdi      # 0x1493b
leaq 0x5e65(%rip), %rsi      # 0x148b8
leaq 0x5ef5(%rip), %rcx      # 0x1494f
movl $0x2d4, %edx            # imm = 0x2D4
callq 0x30e0