// File: /workspace/github_c_makefile_star2_O2/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
movq %rdx, %rcx
movl %esi, %r12d
leaq 0x20e84(%rip), %r15     # 0x3e9f0
leaq 0x553d(%rip), %rbx      # 0x230b0
movl %edi, %r14d
leaq 0x8(%rcx), %rdx
cmpb $0x1, 0x10(%rcx)
cmovneq %r15, %rcx
movq (%rcx), %rax
cvttsd2si (%rax), %eax
cmovneq %r15, %rdx
movq (%rdx), %r9
movb 0x10(%r9), %r10b
cmpb $0x1, %r10b
jne 0x1dbdd
movq (%r9), %rsi
cvttsd2si (%rsi), %edx
movq 0x8(%r9), %rsi
cmpb $0x1, 0x10(%rsi)
movq %r15, %rdi
cmoveq %rsi, %rdi
movq (%rdi), %rdi
cvttsd2si (%rdi), %ecx
jne 0x1dc38
movq 0x8(%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x1dc4d
cmpb $0x1, %r10b
jne 0x1dc0e
movq 0x8(%r9), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x1dc45
leaq 0x8(%r9), %rdi
jmp 0x1dc21
movq 0x20e0c(%rip), %rsi     # 0x3e9f0
cvttsd2si (%rsi), %edx
cmpb $0x1, 0x10(%rsi)
movl %edx, %ecx
jne 0x1dc2a
movq (%rsi), %rsi
cvttsd2si (%rsi), %ecx
movq 0x20df2(%rip), %rsi     # 0x3e9f0
cmpb $0x1, 0x10(%rsi)
jne 0x1dc2a
movq 0x8(%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x1dc2a
movq 0x20ddb(%rip), %rsi     # 0x3e9f0
cmpb $0x1, 0x10(%rsi)
movq %r15, %rdi
movq %r15, %rsi
jne 0x1dc48
movq (%rdi), %rsi
addq $0x8, %rsi
jmp 0x1dc48
movq 0x20dbf(%rip), %rsi     # 0x3e9f0
cvttsd2si (%rsi), %r8d
jmp 0x1dc6e
movq 0x20db1(%rip), %rsi     # 0x3e9f0
cmpb $0x1, 0x10(%rsi)
jne 0x1dc8a
movq %r15, %rsi
movq (%rsi), %rsi
jmp 0x1dc50
movq %r15, %rsi
movq (%rsi), %rsi
cvttsd2si (%rsi), %r8d
cmpb $0x1, %r10b
jne 0x1dc6e
movq 0x8(%r9), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x1dc8f
leaq 0x8(%r9), %rdi
jmp 0x1dc81
movq 0x20d7b(%rip), %rsi     # 0x3e9f0
cmpb $0x1, 0x10(%rsi)
movq %r15, %rdi
movq %r15, %rsi
jne 0x1dcca
movq (%rdi), %rsi
addq $0x8, %rsi
jmp 0x1dc92
cvttsd2si (%rsi), %r8d
movq %r15, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x1dca7
cmpb $0x1, %r10b
jne 0x1dcac
movq 0x8(%r9), %rsi
jmp 0x1dcb3
movq %r15, %rsi
jmp 0x1dcca
movq 0x20d3d(%rip), %rsi     # 0x3e9f0
cmpb $0x1, 0x10(%rsi)
movq %r15, %rdi
jne 0x1dcc3
addq $0x8, %rsi
movq %rsi, %rdi
movq (%rdi), %rsi
addq $0x8, %rsi
addl $-0x2, %eax
cmpl $0x6, %eax
ja 0x1e35d
movq (%rsi), %r13
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmpq *%rax
movl %r14d, %edi
movl %r12d, %esi
callq 0x20679
incl %r14d
cmpb $0x1, 0x10(%r13)
cmovneq %r15, %r13
movq (%r13), %rcx
jmp 0x1db76
leaq 0x8(%r13), %rax
cmpb $0x1, 0x10(%r13)
cmovneq %r15, %r13
cmovneq %r15, %rax
movq (%rax), %rcx
cmpb $0x1, 0x10(%rcx)
jne 0x1dd29
movq (%rcx), %rax
cvttsd2si (%rax), %eax
movq 0x8(%rcx), %rcx
jmp 0x1dd34
movq 0x20cc0(%rip), %rcx     # 0x3e9f0
cvttsd2si (%rcx), %eax
cmpb $0x1, 0x10(%rcx)
movq %r15, %rdx
jne 0x1dd40
movq %rcx, %rdx
movq (%r13), %rcx
cvttsd2si (%rcx), %esi
movq (%rdx), %rcx
addl %esi, %r14d
addl %eax, %r12d
movl %r14d, %edi
jmp 0x1db73
movl %edx, -0x34(%rbp)
movl %ecx, -0x38(%rbp)
movl %r14d, %edi
movl %r12d, %r15d
movl %r12d, %esi
movl $0xe295b6, %edx         # imm = 0xE295B6
movq %r8, -0x30(%rbp)
callq 0x2064a
movq -0x30(%rbp), %rcx
leal -0x1(%rcx), %r12d
pushq $0x1
popq %rax
movl %eax, %ebx
cmpl %r12d, %ebx
jge 0x1dda1
leal (%r14,%rbx), %edi
movl %r15d, %esi
movl $0xe29480, %edx         # imm = 0xE29480
callq 0x2064a
movq -0x30(%rbp), %rcx
incl %ebx
jmp 0x1dd83
leal (%r14,%rcx), %edi
decl %edi
movl %r15d, %ebx
movl %r15d, %esi
movl $0xe295b4, %edx         # imm = 0xE295B4
callq 0x2064a
cmpb $0x1, 0x10(%r13)
leaq 0x20c2d(%rip), %r15     # 0x3e9f0
movq %r15, %rax
cmoveq %r13, %rax
movq (%rax), %rcx
movb 0x10(%rcx), %sil
cmpb $0x1, %sil
jne 0x1ddf8
movq 0x8(%rcx), %rax
cmpb $0x1, 0x10(%rax)
jne 0x1de32
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
movq -0x30(%rbp), %r8
movl -0x34(%rbp), %r9d
je 0x1de47
jmp 0x1de62
movq 0x20bf1(%rip), %rdx     # 0x3e9f0
cmpb $0x1, 0x10(%rdx)
movq %r15, %rax
movq -0x30(%rbp), %r8
movl -0x34(%rbp), %r9d
jne 0x1df22
movq 0x8(%rdx), %rax
cmpb $0x1, 0x10(%rax)
movq 0x20bcd(%rip), %rax     # 0x3e9f0
movb 0x10(%rax), %dl
jne 0x1de7a
movq %r15, %rdi
cmpb $0x1, %dl
je 0x1de54
jmp 0x1de5b
movq 0x20bb7(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
movq -0x30(%rbp), %r8
movl -0x34(%rbp), %r9d
jne 0x1dea9
movq 0x8(%rcx), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rdi
jne 0x1de5b
addq $0x8, %rax
movq %rax, %rdi
movq (%rdi), %rax
addq $0x8, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
jne 0x1df22
cmpb $0x1, %sil
jne 0x1de86
jmp 0x1deb9
movq %r15, %rax
cmpb $0x1, %dl
jne 0x1df22
movq 0x20b63(%rip), %rdx     # 0x3e9f0
cmpb $0x1, 0x10(%rdx)
movq %r15, %rax
jne 0x1df1f
movq 0x8(%rdx), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
je 0x1defe
jmp 0x1df1f
movq 0x20b40(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
jne 0x1df22
movq 0x8(%rcx), %rax
cmpb $0x1, 0x10(%rax)
jne 0x1dee9
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
jne 0x1df1f
cmpb $0x1, %sil
jne 0x1defe
movq 0x8(%rcx), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rdx
jne 0x1df18
leaq 0x8(%rcx), %rax
jmp 0x1df11
movq 0x20b00(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
movq %r15, %rdx
movq %r15, %rax
je 0x1df18
jmp 0x1df1f
movq 0x20aeb(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
movq %r15, %rdx
jne 0x1df18
movq (%rax), %rdx
addq $0x8, %rdx
movq (%rdx), %rax
addq $0x8, %rax
movq (%rax), %rax
movq (%rax), %rax
cvttsd2si (%rax), %edx
movl %r8d, %eax
subl %edx, %eax
cltd
pushq $0x2
popq %rdi
idivl %edi
cmpb $0x1, %sil
jne 0x1df40
movq 0x8(%rcx), %rdx
jmp 0x1df47
movq 0x20aa9(%rip), %rdx     # 0x3e9f0
cmpb $0x1, 0x10(%rdx)
movq %r15, %rsi
jne 0x1df53
movq %rdx, %rsi
movq (%rsi), %rdx
cvttsd2si (%rdx), %edx
addl %r14d, %eax
movl %ebx, %esi
subl %r9d, %esi
addl %edx, %esi
movl %eax, %edi
movq %rcx, %rdx
callq 0x1db4e
cmpb $0x1, 0x10(%r13)
leaq 0x8(%r13), %rax
cmovneq %r15, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
cmovneq %r15, %rax
movq (%rax), %rcx
movb 0x10(%rcx), %sil
cmpb $0x1, %sil
jne 0x1dfb4
movq 0x8(%rcx), %rax
cmpb $0x1, 0x10(%rax)
jne 0x1dfee
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
movl -0x38(%rbp), %r12d
movq -0x30(%rbp), %r8
je 0x1e003
jmp 0x1e01e
movq 0x20a35(%rip), %rdx     # 0x3e9f0
cmpb $0x1, 0x10(%rdx)
movq %r15, %rax
movl -0x38(%rbp), %r12d
movq -0x30(%rbp), %r8
jne 0x1e0de
movq 0x8(%rdx), %rax
cmpb $0x1, 0x10(%rax)
movq 0x20a11(%rip), %rax     # 0x3e9f0
movb 0x10(%rax), %dl
jne 0x1e036
movq %r15, %rdi
cmpb $0x1, %dl
je 0x1e010
jmp 0x1e017
movq 0x209fb(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
movl -0x38(%rbp), %r12d
movq -0x30(%rbp), %r8
jne 0x1e065
movq 0x8(%rcx), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rdi
jne 0x1e017
addq $0x8, %rax
movq %rax, %rdi
movq (%rdi), %rax
addq $0x8, %rax
movq (%rax), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
jne 0x1e0de
cmpb $0x1, %sil
jne 0x1e042
jmp 0x1e075
movq %r15, %rax
cmpb $0x1, %dl
jne 0x1e0de
movq 0x209a7(%rip), %rdx     # 0x3e9f0
cmpb $0x1, 0x10(%rdx)
movq %r15, %rax
jne 0x1e0db
movq 0x8(%rdx), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
je 0x1e0ba
jmp 0x1e0db
movq 0x20984(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
jne 0x1e0de
movq 0x8(%rcx), %rax
cmpb $0x1, 0x10(%rax)
jne 0x1e0a5
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
jne 0x1e0db
cmpb $0x1, %sil
jne 0x1e0ba
movq 0x8(%rcx), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rdx
jne 0x1e0d4
leaq 0x8(%rcx), %rax
jmp 0x1e0cd
movq 0x20944(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
movq %r15, %rdx
movq %r15, %rax
je 0x1e0d4
jmp 0x1e0db
movq 0x2092f(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
movq %r15, %rdx
jne 0x1e0d4
movq (%rax), %rdx
addq $0x8, %rdx
movq (%rdx), %rax
addq $0x8, %rax
movq (%rax), %rax
movq (%rax), %rax
cvttsd2si (%rax), %eax
subl %eax, %r8d
movl %r8d, %eax
cltd
pushq $0x2
popq %rdi
idivl %edi
movl %eax, %edi
cmpb $0x1, %sil
jne 0x1e109
movq 0x8(%rcx), %rax
cmpb $0x1, 0x10(%rax)
jne 0x1e12f
movq 0x8(%rax), %rax
jmp 0x1e136
movq 0x208e0(%rip), %rdx     # 0x3e9f0
cmpb $0x1, 0x10(%rdx)
movq %r15, %rax
jne 0x1e156
movq 0x8(%rdx), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
jne 0x1e156
movq 0x208c3(%rip), %rax     # 0x3e9f0
jmp 0x1e143
movq 0x208ba(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
movq %r15, %rax
jne 0x1e156
movq 0x8(%rcx), %rax
cmpb $0x1, 0x10(%rax)
movq %r15, %rdx
jne 0x1e153
addq $0x8, %rax
movq %rax, %rdx
movq (%rdx), %rax
movq (%rax), %rax
cvttsd2si (%rax), %eax
addl %r14d, %edi
addl %ebx, %r12d
subl %eax, %r12d
jmp 0x1db6c
cmpb $0x1, 0x10(%r13)
leaq 0x20879(%rip), %rax     # 0x3e9f0
cmoveq %r13, %rax
movq (%rax), %rax
cvttsd2si (%rax), %edx
movl %r14d, %edi
movl %r12d, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2064a
movl %r14d, %edi
movl %r12d, %esi
movl %edx, %ebx
callq 0x20679
addl $0x2, %r14d
subl %ebx, %r12d
incl %r12d
movl %r14d, %edi
movl %r12d, %esi
movq %r13, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x206e3
cmpb $0x1, 0x10(%r13)
leaq 0x20816(%rip), %rbx     # 0x3e9f0
cmovneq %rbx, %r13
movq (%r13), %r13
cmpb $0x1, 0x10(%r13)
jne 0x1e35d
movq (%r13), %rdx
movl %r14d, %edi
movl %r12d, %esi
callq 0x1db4e
movb 0x10(%r13), %al
cmpb $0x1, %al
movq %rbx, %rcx
cmoveq %r13, %rcx
movq (%rcx), %rcx
movb 0x10(%rcx), %dl
cmpb $0x1, %dl
jne 0x1e22d
movq 0x8(%rcx), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x1e261
movq 0x8(%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
movq %rbx, %rsi
je 0x1e26e
jmp 0x1e289
movq 0x207bc(%rip), %rdi     # 0x3e9f0
cmpb $0x1, 0x10(%rdi)
movq %rbx, %rsi
jne 0x1e348
movq 0x8(%rdi), %rsi
cmpb $0x1, 0x10(%rsi)
movq 0x207a0(%rip), %rsi     # 0x3e9f0
movb 0x10(%rsi), %dil
jne 0x1e2a0
movq %rbx, %r8
cmpb $0x1, %dil
je 0x1e27b
jmp 0x1e282
movq 0x20788(%rip), %rsi     # 0x3e9f0
cmpb $0x1, 0x10(%rsi)
jne 0x1e2d0
movq 0x8(%rcx), %rsi
cmpb $0x1, 0x10(%rsi)
movq %rbx, %r8
jne 0x1e282
addq $0x8, %rsi
movq %rsi, %r8
movq (%r8), %rsi
addq $0x8, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
movq %rbx, %rsi
jne 0x1e348
cmpb $0x1, %dl
jne 0x1e2ad
jmp 0x1e2e0
movq %rbx, %rsi
cmpb $0x1, %dil
jne 0x1e348
movq 0x2073c(%rip), %rcx     # 0x3e9f0
cmpb $0x1, 0x10(%rcx)
movq %rbx, %rsi
jne 0x1e345
movq 0x8(%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
movq %rbx, %rsi
je 0x1e324
jmp 0x1e345
movq 0x20719(%rip), %rsi     # 0x3e9f0
cmpb $0x1, 0x10(%rsi)
movq %rbx, %rsi
jne 0x1e348
movq 0x8(%rcx), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x1e30f
movq 0x8(%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
movq %rbx, %rsi
jne 0x1e345
cmpb $0x1, %dl
jne 0x1e324
movq 0x8(%rcx), %rdx
cmpb $0x1, 0x10(%rdx)
movq %rbx, %rdx
jne 0x1e33e
addq $0x8, %rcx
jmp 0x1e337
movq 0x206da(%rip), %rcx     # 0x3e9f0
cmpb $0x1, 0x10(%rcx)
movq %rbx, %rdx
movq %rbx, %rsi
je 0x1e33e
jmp 0x1e345
movq 0x206c5(%rip), %rcx     # 0x3e9f0
cmpb $0x1, 0x10(%rcx)
movq %rbx, %rcx
movq %rbx, %rdx
jne 0x1e33e
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, %r13
cmpb $0x1, %al
jmp 0x1e1da
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq