// File: /workspace/github_c_makefile_star2_O3/georgeweigt[P]eigenmath/eigenmath.c
// Function: fmt_update_table
void
fmt_update_table(int n, int m)
{
	int i, j, t;
	int d, h, w;
	int total_height, total_width;
	struct atom *p1, *p2, *p3, *p4;

	total_height = 0;
	total_width = 0;

	t = tos - n * m;

	// height of each row

	for (i = 0; i < n; i++) { // for each row
		h = 0;
		for (j = 0; j < m; j++) { // for each column
			p1 = stack[t + i * m + j];
			h = MAX(h, HEIGHT(p1));
		}
		push_double(h);
		total_height += h;
	}

	list(n);
	p2 = pop();

	// depth of each row

	for (i = 0; i < n; i++) { // for each row
		d = 0;
		for (j = 0; j < m; j++) { // for each column
			p1 = stack[t + i * m + j];
			d = MAX(d, DEPTH(p1));
		}
		push_double(d);
		total_height += d;
	}

	list(n);
	p3 = pop();

	// width of each column

	for (j = 0; j < m; j++) { // for each column
		w = 0;
		for (i = 0; i < n; i++) { // for each row
			p1 = stack[t + i * m + j];
			w = MAX(w, WIDTH(p1));
		}
		push_double(w);
		total_width += w;
	}

	list(m);
	p4 = pop();

	// h, d, w for entire table centered vertical

	total_height += (n - 1) * TABLE_VSPACE + 2; // +2 for delimiters
	total_width += (m - 1) * TABLE_HSPACE + 4; // +4 for delimiters

	h = total_height / 2 + 1;
	d = total_height - h;
	w = total_width;

	list(n * m);
	p1 = pop();

	push_double(EMIT_TABLE);
	push_double(h);
	push_double(d);
	push_double(w);
	push_double(n);
	push_double(m);
	push(p1);
	push(p2);
	push(p3);
	push(p4);

	list(10);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl 0x18a94(%rip), %ecx     # 0x3f2b8
movl %esi, %eax
imull %edi, %eax
movl %eax, -0x6c(%rbp)
subl %eax, %ecx
movslq %esi, %rdx
movl %ecx, -0x70(%rbp)
movslq %ecx, %rcx
movl %edi, %eax
movq %rax, -0x50(%rbp)
movq %rsi, -0x40(%rbp)
movl %esi, %r15d
movq %rdi, -0x58(%rbp)
testl %edi, %edi
movq %rdx, -0x48(%rbp)
movq %rcx, -0x60(%rbp)
jle 0x2690e
leaq 0x21d61(%rip), %rax     # 0x485c0
leaq (%rax,%rcx,8), %r12
leaq (,%rdx,8), %rax
movq %rax, -0x68(%rbp)
xorl %r14d, %r14d
leaq 0x1f187(%rip), %r13     # 0x45a00
movq $0x0, -0x38(%rbp)
movl $0x0, %ebx
cmpl $0x0, -0x40(%rbp)
jle 0x268cb
xorl %eax, %eax
movq 0x1f16b(%rip), %rcx     # 0x45a00
xorl %ebx, %ebx
movq (%r12,%rax,8), %rdx
leaq 0x8(%rdx), %rsi
cmpb $0x1, 0x10(%rdx)
cmovneq %r13, %rsi
movq (%rsi), %rdx
cmpb $0x1, 0x10(%rdx)
jne 0x268b9
movq (%rdx), %rdx
cvttsd2si (%rdx), %edx
jmp 0x268bd
cvttsd2si (%rcx), %edx
cmpl %edx, %ebx
jg 0x268c3
movl %edx, %ebx
incq %rax
cmpq %rax, %r15
jne 0x26897
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x74dc
movb $0x5, 0x10(%rax)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %rax, %rdi
callq 0x8ba5
movq -0x38(%rbp), %rax
addl %ebx, %eax
movq %rax, -0x38(%rbp)
incq %r14
addq -0x68(%rbp), %r12
cmpq -0x50(%rbp), %r14
jne 0x26881
jmp 0x26916
movq $0x0, -0x38(%rbp)
movq -0x58(%rbp), %rbx
movl %ebx, %edi
callq 0x8b7d
movl 0x18991(%rip), %eax     # 0x3f2b8
movl $0xfffe795f, %ecx       # imm = 0xFFFE795F
leal (%rax,%rcx), %edx
cmpl %ecx, %edx
jbe 0x26e1f
decl %eax
movl %eax, 0x18979(%rip)     # 0x3f2b8
leaq 0x21c7a(%rip), %rcx     # 0x485c0
movq (%rcx,%rax,8), %rax
movq %rax, -0x68(%rbp)
testl %ebx, %ebx
jle 0x26a5d
movq -0x60(%rbp), %rax
leaq (%rcx,%rax,8), %r12
movq -0x48(%rbp), %rax
shlq $0x3, %rax
xorl %r14d, %r14d
leaq 0x1f090(%rip), %r13     # 0x45a00
movq %rax, -0x48(%rbp)
movl $0x0, %ebx
cmpl $0x0, -0x40(%rbp)
jle 0x26a19
xorl %eax, %eax
movq 0x1f074(%rip), %rcx     # 0x45a00
xorl %ebx, %ebx
movq (%r12,%rax,8), %rdx
leaq 0x8(%rdx), %rsi
cmpb $0x1, 0x10(%rdx)
cmovneq %r13, %rsi
movq (%rsi), %rdx
cmpb $0x1, 0x10(%rdx)
jne 0x269be
movq 0x8(%rdx), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x269dd
movq 0x8(%rdx), %rsi
movq (%rsi), %rsi
cvttsd2si (%rsi), %esi
jmp 0x269e1
cmpb $0x1, 0x10(%rcx)
jne 0x269fb
movq (%rcx), %rdx
cvttsd2si (%rdx), %edx
cmpl %edx, %ebx
jg 0x26a0d
cmpb $0x1, 0x10(%rcx)
movq %r13, %rdx
movq %r13, %rsi
je 0x269f6
jmp 0x26a06
cvttsd2si (%rcx), %esi
cmpl %esi, %ebx
jg 0x26a0d
movq 0x8(%rdx), %rsi
cmpb $0x1, 0x10(%rsi)
movq %r13, %rsi
jne 0x26a06
addq $0x8, %rdx
movq (%rdx), %rsi
jmp 0x26a06
cvttsd2si (%rcx), %edx
movq %r13, %rsi
cmpl %edx, %ebx
jg 0x26a0d
movq (%rsi), %rdx
cvttsd2si (%rdx), %ebx
incq %rax
cmpq %rax, %r15
jne 0x2698e
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x74dc
movb $0x5, 0x10(%rax)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %rax, %rdi
callq 0x8ba5
movq -0x38(%rbp), %rax
addl %ebx, %eax
movq %rax, -0x38(%rbp)
incq %r14
movq -0x48(%rbp), %rax
addq %rax, %r12
cmpq -0x50(%rbp), %r14
jne 0x26974
movq -0x58(%rbp), %rdi
callq 0x8b7d
movl 0x1884c(%rip), %eax     # 0x3f2b8
movl $0xfffe795f, %ecx       # imm = 0xFFFE795F
leal (%rax,%rcx), %edx
cmpl %ecx, %edx
jbe 0x26e1f
decl %eax
movl %eax, 0x18834(%rip)     # 0x3f2b8
leaq 0x21b35(%rip), %rcx     # 0x485c0
movq (%rcx,%rax,8), %rax
movq %rax, -0x60(%rbp)
movq -0x40(%rbp), %r13
testl %r13d, %r13d
movl -0x70(%rbp), %ebx
jle 0x26c61
xorl %r12d, %r12d
leaq 0x1ef53(%rip), %r15     # 0x45a00
xorl %r14d, %r14d
movq %r14, -0x30(%rbp)
movl $0x0, %r14d
cmpl $0x0, -0x58(%rbp)
leaq 0x21afb(%rip), %r11     # 0x485c0
jle 0x26c20
xorl %r14d, %r14d
movq 0x1ef2b(%rip), %rax     # 0x45a00
movq -0x50(%rbp), %rcx
movl %ebx, %edx
movslq %edx, %rsi
movq (%r11,%rsi,8), %rsi
leaq 0x8(%rsi), %rdi
cmpb $0x1, 0x10(%rsi)
cmovneq %r15, %rdi
movq (%rdi), %rsi
movb 0x10(%rsi), %dil
cmpb $0x1, %dil
jne 0x26b1a
movq 0x8(%rsi), %r8
cmpb $0x1, 0x10(%r8)
jne 0x26b39
movq 0x8(%rsi), %r8
movq 0x8(%r8), %r8
cmpb $0x1, 0x10(%r8)
movq %r15, %r8
je 0x26b3f
jmp 0x26b5b
cmpb $0x1, 0x10(%rax)
jne 0x26b74
movq 0x8(%rax), %r8
cmpb $0x1, 0x10(%r8)
jne 0x26b86
cmpb $0x1, 0x10(%rax)
movq %r15, %r9
movq %r15, %r8
je 0x26b51
jmp 0x26b58
cmpb $0x1, 0x10(%rax)
jne 0x26ba2
movq 0x8(%rsi), %r8
cmpb $0x1, 0x10(%r8)
movq %r15, %r8
jne 0x26b58
leaq 0x8(%rsi), %r9
movq (%r9), %r8
addq $0x8, %r8
movq (%r8), %r8
movq (%r8), %r8
cvttsd2si (%r8), %r8d
cmpl %r8d, %r14d
jg 0x26c14
cmpb $0x1, %dil
jne 0x26b94
jmp 0x26bac
cvttsd2si (%rax), %r9d
movq %r15, %r8
cmpl %r9d, %r14d
jle 0x26bc2
jmp 0x26c14
cvttsd2si (%rax), %r8d
cmpl %r8d, %r14d
jg 0x26c14
cmpb $0x1, 0x10(%rax)
movq %r15, %r9
movq %r15, %r8
je 0x26bbb
jmp 0x26bc2
cvttsd2si (%rax), %r8d
cmpl %r8d, %r14d
jg 0x26c14
movq 0x8(%rsi), %r8
cmpb $0x1, 0x10(%r8)
jne 0x26bfd
leaq 0x8(%rsi), %r9
movq (%r9), %r8
addq $0x8, %r8
movq (%r8), %r8
cmpb $0x1, 0x10(%r8)
movq %r15, %r8
jne 0x26c0c
cmpb $0x1, %dil
jne 0x26be8
movq 0x8(%rsi), %rdi
cmpb $0x1, 0x10(%rdi)
movq %r15, %rdi
jne 0x26c09
addq $0x8, %rsi
jmp 0x26bf4
cmpb $0x1, 0x10(%rax)
movq %r15, %rsi
movq %r15, %rdi
jne 0x26c09
movq (%rsi), %rdi
addq $0x8, %rdi
jmp 0x26c09
cmpb $0x1, 0x10(%rax)
movq %r15, %rdi
movq %r15, %r8
jne 0x26c0c
movq (%rdi), %r8
movq (%r8), %rsi
cvttsd2si (%rsi), %r14d
addl %r13d, %edx
decq %rcx
jne 0x26adb
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd %xmm0, -0x48(%rbp)
callq 0x74dc
movb $0x5, 0x10(%rax)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %rax, %rdi
callq 0x8ba5
movq -0x30(%rbp), %rax
addl %r14d, %eax
movq %rax, %r14
incl %r12d
incl %ebx
cmpl %r13d, %r12d
jne 0x26ab0
jmp 0x26c64
xorl %r14d, %r14d
movl %r13d, %edi
callq 0x8b7d
movl 0x18646(%rip), %eax     # 0x3f2b8
movl $0xfffe795f, %ebx       # imm = 0xFFFE795F
leal (%rax,%rbx), %ecx
cmpl %ebx, %ecx
jbe 0x26e1f
movq %r14, -0x30(%rbp)
decl %eax
movl %eax, 0x1862a(%rip)     # 0x3f2b8
leaq 0x2192b(%rip), %rcx     # 0x485c0
movq (%rcx,%rax,8), %rax
movq %rax, -0x50(%rbp)
movl -0x6c(%rbp), %edi
callq 0x8b7d
movl 0x1860d(%rip), %eax     # 0x3f2b8
leal (%rax,%rbx), %ecx
cmpl %ebx, %ecx
jbe 0x26e1f
movq -0x58(%rbp), %r15
movq -0x38(%rbp), %rdx
leal (%r15,%rdx), %ecx
leal (%r15,%rdx), %r14d
incl %r14d
movl %r14d, %edx
shrl $0x1f, %edx
leal (%rdx,%rcx), %r12d
incl %r12d
sarl %r12d
incl %r12d
subl %r12d, %r14d
leal (%r13,%r13,2), %ecx
movq -0x30(%rbp), %rdx
leal (%rdx,%rcx), %r13d
incl %r13d
decl %eax
movl %eax, 0x185c1(%rip)     # 0x3f2b8
leaq 0x218c2(%rip), %rcx     # 0x485c0
movq (%rcx,%rax,8), %rax
movq %rax, -0x38(%rbp)
callq 0x74dc
movb $0x5, %bl
movb %bl, 0x10(%rax)
movabsq $0x4020000000000000, %rcx # imm = 0x4020000000000000
movq %rcx, (%rax)
movq %rax, %rdi
callq 0x8ba5
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x74dc
movb %bl, 0x10(%rax)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %rax, %rdi
callq 0x8ba5
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x74dc
movb %bl, 0x10(%rax)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %rax, %rdi
callq 0x8ba5
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x74dc
movb %bl, 0x10(%rax)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %rax, %rdi
callq 0x8ba5
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x74dc
movb %bl, 0x10(%rax)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %rax, %rdi
callq 0x8ba5
xorps %xmm0, %xmm0
cvtsi2sdl -0x40(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
callq 0x74dc
movb %bl, 0x10(%rax)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %rax, %rdi
callq 0x8ba5
movq -0x38(%rbp), %rdi
callq 0x8ba5
movq -0x68(%rbp), %rdi
callq 0x8ba5
movq -0x60(%rbp), %rdi
callq 0x8ba5
movq -0x50(%rbp), %rdi
callq 0x8ba5
movl $0xa, %edi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8b7d
leaq 0x811b(%rip), %rdi      # 0x2ef41
callq 0x780b