// File: /workspace/github_c_makefile_star2_O3/georgeweigt[P]eigenmath/eigenmath.c
// Function: fmt_draw
void
fmt_draw(int x, int y, struct atom *p)
{
	int d, dx, dy, h, i, k, w;

	k = OPCODE(p);
	h = HEIGHT(p);
	d = DEPTH(p);
	w = WIDTH(p);

	p = cddddr(p);

	switch (k) {

	case EMIT_SPACE:
		break;

	case EMIT_CHAR:
		fmt_draw_char(x, y, VAL1(p));
		break;

	case EMIT_LIST:
		p = car(p);
		while (iscons(p)) {
			fmt_draw(x, y, car(p));
			x += WIDTH(car(p));
			p = cdr(p);
		}
		break;

	case EMIT_SUPERSCRIPT:
	case EMIT_SUBSCRIPT:
		dx = VAL1(p);
		dy = VAL2(p);
		p = caddr(p);
		fmt_draw(x + dx, y + dy, p);
		break;

	case EMIT_SUBEXPR:
		fmt_draw_delims(x, y, h, d, w);
		fmt_draw(x + 1, y, car(p));
		break;

	case EMIT_FRACTION:

		// horizontal line

		fmt_draw_char(x, y, BDLR);

		for (i = 1; i < w - 1; i++)
			fmt_draw_char(x + i, y, BDLH);

		fmt_draw_char(x + w - 1, y, BDLL);

		// numerator

		dx = (w - WIDTH(car(p))) / 2;
		dy = -h + HEIGHT(car(p));
		fmt_draw(x + dx, y + dy, car(p));

		// denominator

		p = cdr(p);
		dx = (w - WIDTH(car(p))) / 2;
		dy = d - DEPTH(car(p));
		fmt_draw(x + dx, y + dy, car(p));

		break;

	case EMIT_TABLE:
		fmt_draw_delims(x, y, h, d, w);
		fmt_draw_table(x + 2, y - h + 1, p);
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, -0x2c(%rbp)
leaq 0x219ee(%rip), %r15     # 0x45a00
leal 0x1(%rdi), %r12d
movl %edi, %r14d
leaq 0x8(%rdx), %rcx
cmpb $0x1, 0x10(%rdx)
cmovneq %r15, %rdx
movq (%rdx), %rax
cvttsd2si (%rax), %eax
cmovneq %r15, %rcx
movq (%rcx), %rcx
movb 0x10(%rcx), %dl
cmpb $0x1, %dl
jne 0x24083
movq (%rcx), %rsi
cvttsd2si (%rsi), %r13d
movq 0x8(%rcx), %rsi
cmpb $0x1, 0x10(%rsi)
movq %r15, %rdi
cmoveq %rsi, %rdi
movq (%rdi), %rdi
cvttsd2si (%rdi), %r9d
jne 0x240e1
movq 0x8(%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x240f6
cmpb $0x1, %dl
jne 0x240b7
movq 0x8(%rcx), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x240ee
leaq 0x8(%rcx), %rdi
jmp 0x240ca
movq 0x21976(%rip), %rsi     # 0x45a00
cvttsd2si (%rsi), %r13d
cmpb $0x1, 0x10(%rsi)
movl %r13d, %r9d
jne 0x240d3
movq (%rsi), %rsi
cvttsd2si (%rsi), %r9d
movq 0x21959(%rip), %rsi     # 0x45a00
cmpb $0x1, 0x10(%rsi)
jne 0x240d3
movq 0x8(%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x240d3
movq 0x21942(%rip), %rsi     # 0x45a00
cmpb $0x1, 0x10(%rsi)
movq %r15, %rdi
movq %r15, %rsi
jne 0x240f1
movq (%rdi), %rsi
addq $0x8, %rsi
jmp 0x240f1
movq 0x21926(%rip), %rsi     # 0x45a00
cvttsd2si (%rsi), %r8d
jmp 0x24116
movq 0x21918(%rip), %rsi     # 0x45a00
cmpb $0x1, 0x10(%rsi)
jne 0x24132
movq %r15, %rsi
movq (%rsi), %rsi
jmp 0x240f9
movq %r15, %rsi
movq (%rsi), %rsi
cvttsd2si (%rsi), %r8d
cmpb $0x1, %dl
jne 0x24116
movq 0x8(%rcx), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x24137
leaq 0x8(%rcx), %rsi
jmp 0x24129
movq 0x218e3(%rip), %rsi     # 0x45a00
cmpb $0x1, 0x10(%rsi)
movq %r15, %rsi
movq %r15, %rdi
jne 0x24171
movq (%rsi), %rsi
addq $0x8, %rsi
jmp 0x2413a
cvttsd2si (%rsi), %r8d
movq %r15, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x2414e
cmpb $0x1, %dl
jne 0x24153
movq 0x8(%rcx), %rcx
jmp 0x2415a
movq %r15, %rdi
jmp 0x24171
movq 0x218a6(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
movq %r15, %rdx
jne 0x2416a
addq $0x8, %rcx
movq %rcx, %rdx
movq (%rdx), %rdi
addq $0x8, %rdi
movq (%rdi), %rbx
cmpl $0x6, %eax
jne 0x241a0
movl %r14d, %edi
movl -0x2c(%rbp), %esi
movl %r13d, %edx
movl %r9d, %ecx
callq 0x276c3
incl %r14d
cmpb $0x1, 0x10(%rbx)
cmovneq %r15, %rbx
movq (%rbx), %rdx
incl %r12d
jmp 0x24019
addl $-0x2, %eax
cmpl $0x6, %eax
ja 0x24921
leaq 0x5efd(%rip), %rcx      # 0x2a0b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x8(%rbx), %rax
cmpb $0x1, 0x10(%rbx)
cmovneq %r15, %rbx
cmovneq %r15, %rax
movq (%rax), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x241e2
movq (%rcx), %rax
cvttsd2si (%rax), %eax
movq 0x8(%rcx), %rcx
jmp 0x241ed
movq 0x21817(%rip), %rcx     # 0x45a00
cvttsd2si (%rcx), %eax
cmpb $0x1, 0x10(%rcx)
movq %r15, %rdx
jne 0x241f9
movq %rcx, %rdx
movq (%rbx), %rcx
cvttsd2si (%rcx), %ecx
movq (%rdx), %rdx
addl %ecx, %r14d
addl %eax, -0x2c(%rbp)
movl %r14d, %edi
jmp 0x24012
testl %r14d, %r14d
js 0x24247
cmpl $0x0, -0x2c(%rbp)
js 0x24247
movl 0xf21de(%rip), %eax     # 0x116400
cmpl %r14d, %eax
jle 0x24247
movl -0x2c(%rbp), %ecx
cmpl %ecx, 0xf21cc(%rip)     # 0x1163fc
jle 0x24247
movq 0xf21cf(%rip), %rcx     # 0x116408
imull -0x2c(%rbp), %eax
addl %r14d, %eax
movl $0xe295b6, (%rcx,%rax,4) # imm = 0xE295B6
cmpl $0x3, %r8d
jl 0x2428e
movq 0xf21b4(%rip), %rax     # 0x116408
leal -0x2(%r8), %ecx
testl %r12d, %r12d
js 0x24287
cmpl $0x0, -0x2c(%rbp)
js 0x24287
movl 0xf2197(%rip), %edx     # 0x116400
cmpl %r12d, %edx
jle 0x24287
movl -0x2c(%rbp), %esi
cmpl %esi, 0xf2185(%rip)     # 0x1163fc
jle 0x24287
imull -0x2c(%rbp), %edx
addl %r12d, %edx
movl $0xe29480, (%rax,%rdx,4) # imm = 0xE29480
incl %r12d
decl %ecx
jne 0x24258
leal (%r8,%r14), %ecx
testl %ecx, %ecx
jle 0x242cb
cmpl $0x0, -0x2c(%rbp)
js 0x242cb
movl 0xf215e(%rip), %eax     # 0x116400
cmpl %ecx, %eax
jl 0x242cb
movl -0x2c(%rbp), %ecx
cmpl %ecx, 0xf214d(%rip)     # 0x1163fc
jle 0x242cb
leal (%r8,%r14), %ecx
decl %ecx
movq 0xf214a(%rip), %rdx     # 0x116408
imull -0x2c(%rbp), %eax
addl %ecx, %eax
movl $0xe295b4, (%rdx,%rax,4) # imm = 0xE295B4
cmpb $0x1, 0x10(%rbx)
movq %r15, %rax
cmoveq %rbx, %rax
movq (%rax), %rdx
movb 0x10(%rdx), %al
cmpb $0x1, %al
movq %r8, -0x38(%rbp)
jne 0x242fd
movq 0x8(%rdx), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x2432a
movq 0x8(%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rcx
je 0x24337
jmp 0x24352
movq 0x216fc(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
jne 0x24368
movq 0x8(%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
movq 0x216e7(%rip), %rcx     # 0x45a00
movb 0x10(%rcx), %dil
jne 0x24385
movq %r15, %rsi
cmpb $0x1, %dil
je 0x24344
jmp 0x2434b
movq 0x216cf(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
jne 0x243b2
movq 0x8(%rdx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rsi
jne 0x2434b
addq $0x8, %rcx
movq %rcx, %rsi
movq (%rsi), %rcx
addq $0x8, %rcx
movq (%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rcx
jne 0x2442a
cmpb $0x1, %al
jne 0x2438f
jmp 0x243c3
movl %r9d, %r12d
cvttsd2si (%rcx), %eax
movl %r8d, %ecx
subl %eax, %ecx
movl %ecx, %edi
shrl $0x1f, %edi
addl %ecx, %edi
sarl %edi
movq %r15, %rcx
jmp 0x2447b
cmpb $0x1, %dil
jne 0x2444c
movq 0x2166a(%rip), %rsi     # 0x45a00
cmpb $0x1, 0x10(%rsi)
movq %r15, %rcx
jne 0x24427
movq 0x8(%rsi), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rcx
je 0x24406
jmp 0x24427
movq 0x21647(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
jne 0x24664
movq 0x8(%rdx), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x243f1
movq 0x8(%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rcx
jne 0x24427
cmpb $0x1, %al
jne 0x24406
movq 0x8(%rdx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rsi
jne 0x24420
leaq 0x8(%rdx), %rcx
jmp 0x24419
movq 0x21608(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
movq %r15, %rsi
movq %r15, %rcx
je 0x24420
jmp 0x24427
movq 0x215f3(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
movq %r15, %rcx
movq %r15, %rsi
jne 0x24420
movq (%rcx), %rsi
addq $0x8, %rsi
movq (%rsi), %rcx
addq $0x8, %rcx
movq (%rcx), %rcx
movq (%rcx), %rcx
cvttsd2si (%rcx), %ecx
movl %r8d, %esi
subl %ecx, %esi
movl %esi, %edi
shrl $0x1f, %edi
addl %esi, %edi
sarl %edi
cmpb $0x1, %al
jne 0x24465
movl %r9d, %r12d
movq 0x8(%rdx), %rax
jmp 0x2446f
movq 0x215ad(%rip), %rax     # 0x45a00
cvttsd2si (%rax), %eax
movl %r8d, %ecx
subl %eax, %ecx
movl %ecx, %edi
shrl $0x1f, %edi
addl %ecx, %edi
sarl %edi
movl %r9d, %r12d
movq 0x21591(%rip), %rax     # 0x45a00
cmpb $0x1, 0x10(%rax)
movq %r15, %rcx
jne 0x2447b
movq %rax, %rcx
movq (%rcx), %rax
cvttsd2si (%rax), %eax
addl %r14d, %edi
movl -0x2c(%rbp), %esi
subl %r13d, %esi
addl %eax, %esi
callq 0x23ff7
cmpb $0x1, 0x10(%rbx)
leaq 0x8(%rbx), %rax
cmovneq %r15, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
cmovneq %r15, %rax
movq (%rax), %rdx
movb 0x10(%rdx), %al
cmpb $0x1, %al
jne 0x244d3
movq 0x8(%rdx), %rcx
cmpb $0x1, 0x10(%rcx)
movl %r12d, %r8d
jne 0x24507
movq 0x8(%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rcx
movq -0x38(%rbp), %r9
je 0x24518
jmp 0x24533
movq 0x21526(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
movl %r12d, %r8d
jne 0x24549
movq 0x8(%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
movq 0x2150e(%rip), %rcx     # 0x45a00
movb 0x10(%rcx), %dil
movq -0x38(%rbp), %r9
jne 0x24561
movq %r15, %rsi
cmpb $0x1, %dil
je 0x24525
jmp 0x2452c
movq 0x214f2(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
movq -0x38(%rbp), %r9
jne 0x2458e
movq 0x8(%rdx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rsi
jne 0x2452c
addq $0x8, %rcx
movq %rcx, %rsi
movq (%rsi), %rcx
addq $0x8, %rcx
movq (%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rcx
jne 0x24606
cmpb $0x1, %al
jne 0x2456b
jmp 0x2459f
cvttsd2si (%rcx), %eax
movq -0x38(%rbp), %rcx
subl %eax, %ecx
movl %ecx, %edi
shrl $0x1f, %edi
addl %ecx, %edi
sarl %edi
jmp 0x246d4
cmpb $0x1, %dil
jne 0x24682
movq 0x2148e(%rip), %rsi     # 0x45a00
cmpb $0x1, 0x10(%rsi)
movq %r15, %rcx
jne 0x24603
movq 0x8(%rsi), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rcx
je 0x245e2
jmp 0x24603
movq 0x2146b(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
jne 0x246f1
movq 0x8(%rdx), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x245cd
movq 0x8(%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rcx
jne 0x24603
cmpb $0x1, %al
jne 0x245e2
movq 0x8(%rdx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rsi
jne 0x245fc
leaq 0x8(%rdx), %rcx
jmp 0x245f5
movq 0x2142c(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
movq %r15, %rsi
movq %r15, %rcx
je 0x245fc
jmp 0x24603
movq 0x21417(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
movq %r15, %rcx
movq %r15, %rsi
jne 0x245fc
movq (%rcx), %rsi
addq $0x8, %rsi
movq (%rsi), %rcx
addq $0x8, %rcx
movq (%rcx), %rcx
movq (%rcx), %rcx
cvttsd2si (%rcx), %ecx
subl %ecx, %r9d
movl %r9d, %edi
shrl $0x1f, %edi
addl %r9d, %edi
sarl %edi
cmpb $0x1, %al
jne 0x2469b
movq 0x8(%rdx), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x2464f
movq 0x8(%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x246d4
cmpb $0x1, %al
jne 0x246b5
movq 0x8(%rdx), %rax
cmpb $0x1, 0x10(%rax)
jne 0x2470f
leaq 0x8(%rdx), %rcx
jmp 0x246c8
movq 0x213aa(%rip), %rax     # 0x45a00
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
movq %r15, %rcx
je 0x246cf
jmp 0x246d7
movq 0x21395(%rip), %rax     # 0x45a00
cvttsd2si (%rax), %eax
movl %r8d, %ecx
subl %eax, %ecx
movl %ecx, %edi
shrl $0x1f, %edi
addl %ecx, %edi
sarl %edi
jmp 0x24443
movq 0x21377(%rip), %rax     # 0x45a00
cvttsd2si (%rax), %eax
subl %eax, %r9d
movl %r9d, %edi
shrl $0x1f, %edi
addl %r9d, %edi
sarl %edi
movq 0x2135e(%rip), %rax     # 0x45a00
cmpb $0x1, 0x10(%rax)
jne 0x246d4
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rcx
jne 0x246d7
movq 0x21344(%rip), %rax     # 0x45a00
cmpb $0x1, 0x10(%rax)
movq %r15, %rcx
movq %r15, %rax
jne 0x246cf
movq (%rcx), %rax
addq $0x8, %rax
movq (%rax), %rcx
jmp 0x246d7
movq %r15, %rcx
movq (%rcx), %rax
cvttsd2si (%rax), %eax
addl %r14d, %edi
addl -0x2c(%rbp), %r8d
subl %eax, %r8d
movl %r8d, -0x2c(%rbp)
jmp 0x24012
movq 0x21308(%rip), %rcx     # 0x45a00
cvttsd2si (%rcx), %ecx
subl %ecx, %r9d
movl %r9d, %edi
shrl $0x1f, %edi
addl %r9d, %edi
sarl %edi
jmp 0x2461f
movq %r15, %rax
jmp 0x246cf
cmpb $0x1, 0x10(%rbx)
leaq 0x212e1(%rip), %r15     # 0x45a00
cmovneq %r15, %rbx
movq (%rbx), %rbx
cmpb $0x1, 0x10(%rbx)
jne 0x24921
movq (%rbx), %rdx
movl %r14d, %edi
movl -0x2c(%rbp), %esi
callq 0x23ff7
movb 0x10(%rbx), %al
cmpb $0x1, %al
movq %r15, %rcx
cmoveq %rbx, %rcx
movq (%rcx), %rcx
movb 0x10(%rcx), %dl
cmpb $0x1, %dl
jne 0x2476e
movq 0x8(%rcx), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x247a2
movq 0x8(%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
movq %r15, %rsi
je 0x247af
jmp 0x247ca
movq 0x2128b(%rip), %rdi     # 0x45a00
cmpb $0x1, 0x10(%rdi)
movq %r15, %rsi
jne 0x24889
movq 0x8(%rdi), %rsi
cmpb $0x1, 0x10(%rsi)
movq 0x2126f(%rip), %rsi     # 0x45a00
movb 0x10(%rsi), %dil
jne 0x247e1
movq %r15, %r8
cmpb $0x1, %dil
je 0x247bc
jmp 0x247c3
movq 0x21257(%rip), %rsi     # 0x45a00
cmpb $0x1, 0x10(%rsi)
jne 0x24811
movq 0x8(%rcx), %rsi
cmpb $0x1, 0x10(%rsi)
movq %r15, %r8
jne 0x247c3
addq $0x8, %rsi
movq %rsi, %r8
movq (%r8), %rsi
addq $0x8, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
movq %r15, %rsi
jne 0x24889
cmpb $0x1, %dl
jne 0x247ee
jmp 0x24821
movq %r15, %rsi
cmpb $0x1, %dil
jne 0x24889
movq 0x2120b(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
movq %r15, %rsi
jne 0x24886
movq 0x8(%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %r15, %rsi
je 0x24865
jmp 0x24886
movq 0x211e8(%rip), %rsi     # 0x45a00
cmpb $0x1, 0x10(%rsi)
movq %r15, %rsi
jne 0x24889
movq 0x8(%rcx), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x24850
movq 0x8(%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
movq %r15, %rsi
jne 0x24886
cmpb $0x1, %dl
jne 0x24865
movq 0x8(%rcx), %rdx
cmpb $0x1, 0x10(%rdx)
movq %r15, %rdx
jne 0x2487f
addq $0x8, %rcx
jmp 0x24878
movq 0x211a9(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
movq %r15, %rdx
movq %r15, %rsi
je 0x2487f
jmp 0x24886
movq 0x21194(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
movq %r15, %rcx
movq %r15, %rdx
jne 0x2487f
movq (%rcx), %rdx
addq $0x8, %rdx
movq (%rdx), %rsi
addq $0x8, %rsi
movq (%rsi), %rsi
movq (%rsi), %rcx
cvttsd2si (%rcx), %ecx
addl %ecx, %r14d
addq $0x8, %rbx
cmpb $0x1, %al
jmp 0x2471f
movl %r14d, %edi
movl -0x2c(%rbp), %r15d
movl %r15d, %esi
movl %r13d, %edx
movl %r9d, %ecx
callq 0x276c3
addl $0x2, %r14d
subl %r13d, %r15d
incl %r15d
movl %r14d, %edi
movl %r15d, %esi
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x27792
cmpb $0x1, 0x10(%rbx)
leaq 0x2111c(%rip), %rax     # 0x45a00
cmoveq %rbx, %rax
testl %r14d, %r14d
js 0x24921
cmpl $0x0, -0x2c(%rbp)
js 0x24921
movl 0xf1b07(%rip), %ecx     # 0x116400
cmpl %r14d, %ecx
jle 0x24921
movl -0x2c(%rbp), %edx
cmpl %edx, 0xf1af5(%rip)     # 0x1163fc
jle 0x24921
movq (%rax), %rax
cvttsd2si (%rax), %eax
movq 0xf1af1(%rip), %rdx     # 0x116408
imull -0x2c(%rbp), %ecx
addl %r14d, %ecx
movl %eax, (%rdx,%rcx,4)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq