// File: /workspace/github_c_makefile_star2_O1/georgeweigt[P]eigenmath/eigenmath.c
// Function: fmt_update_superscript
void
fmt_update_superscript(void)
{
	int d, dx, dy, h, w, y;
	struct atom *p1, *p2;

	p2 = pop(); // exponent
	p1 = pop(); // base

	h = HEIGHT(p2);
	d = DEPTH(p2);
	w = WIDTH(p2);

	// y is distance from baseline to bottom of superscript

	y = HEIGHT(p1) - d - 1;

	y = MAX(y, 1);

	dx = 0;
	dy = -(y + d);

	h = y + h + d;
	d = 0;

	if (OPCODE(p1) == EMIT_SUBSCRIPT) {
		dx = -WIDTH(p1);
		w = MAX(0, w - WIDTH(p1));
	}

	push(p1); // base

	push_double(EMIT_SUPERSCRIPT);
	push_double(h);
	push_double(d);
	push_double(w);
	push_double(dx);
	push_double(dy);
	push(p2);

	list(7);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
callq 0x8b78
movq %rax, %rbx
callq 0x8b78
leaq 0x8(%rbx), %rcx
cmpb $0x1, 0x10(%rbx)
leaq 0x1e720(%rip), %rsi     # 0x40a00
cmovneq %rsi, %rcx
movq (%rcx), %rdi
movb 0x10(%rdi), %dl
leaq 0x8(%rdi), %rcx
cmpb $0x1, %dl
cmovneq %rsi, %rdi
movq %rsi, %r8
cmoveq %rcx, %r8
movq (%r8), %r8
cmpb $0x1, 0x10(%r8)
movq %rsi, %r8
jne 0x2231a
cmpb $0x1, %dl
leaq 0x1e6ed(%rip), %r8      # 0x40a00
cmoveq %rcx, %r8
movq (%r8), %r8
cmpb $0x1, %dl
movq %rsi, %r9
cmoveq %rcx, %r9
movq (%r9), %r9
cmpb $0x1, 0x10(%r9)
movq %rsi, %r9
jne 0x22346
cmpb $0x1, %dl
leaq 0x1e6c5(%rip), %r9      # 0x40a00
cmoveq %rcx, %r9
movq (%r9), %r9
addq $0x8, %r9
movq (%rdi), %rdi
movq (%r8), %r8
movq (%r9), %r9
cmpb $0x1, 0x10(%r9)
movq %rsi, %r9
jne 0x2238c
cmpb $0x1, %dl
leaq 0x1e69d(%rip), %r9      # 0x40a00
movq %r9, %r10
cmoveq %rcx, %r10
movq (%r10), %r10
cmpb $0x1, 0x10(%r10)
jne 0x22389
cmpb $0x1, %dl
leaq 0x1e682(%rip), %rdx     # 0x40a00
cmoveq %rcx, %rdx
movq (%rdx), %r9
addq $0x8, %r9
movq (%r9), %r9
movsd (%rdi), %xmm0
movsd (%r8), %xmm1
movq (%r9), %rcx
cvttsd2si (%rcx), %r14d
leaq 0x8(%rax), %rcx
cmpb $0x1, 0x10(%rax)
cmovneq %rsi, %rcx
movq (%rcx), %rcx
movq %rax, %rdi
cmovneq %rsi, %rdi
movb 0x10(%rcx), %dl
cmpb $0x1, %dl
cmoveq %rcx, %rsi
movq (%rdi), %rdi
cvttsd2si (%rdi), %edi
movq (%rsi), %rsi
movsd (%rsi), %xmm2
cmpl $0x5, %edi
jne 0x22555
addq $0x8, %rcx
cmpb $0x1, %dl
leaq 0x1e61e(%rip), %rdi     # 0x40a00
movq %rdi, %rsi
cmoveq %rcx, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
movq %rdi, %rsi
jne 0x2240a
cmpb $0x1, %dl
leaq 0x1e601(%rip), %rsi     # 0x40a00
cmoveq %rcx, %rsi
movq (%rsi), %rsi
addq $0x8, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
movq %rdi, %rsi
jne 0x22449
cmpb $0x1, %dl
leaq 0x1e5e0(%rip), %rsi     # 0x40a00
movq %rsi, %r8
cmoveq %rcx, %r8
movq (%r8), %r8
cmpb $0x1, 0x10(%r8)
jne 0x22446
cmpb $0x1, %dl
leaq 0x1e5c5(%rip), %rsi     # 0x40a00
cmoveq %rcx, %rsi
movq (%rsi), %rsi
addq $0x8, %rsi
movq (%rsi), %rsi
movq (%rsi), %rsi
cmpb $0x1, %dl
movq %rdi, %r8
cmoveq %rcx, %r8
movq (%r8), %r8
cmpb $0x1, 0x10(%r8)
movq %rdi, %r8
jne 0x22478
cmpb $0x1, %dl
leaq 0x1e593(%rip), %r8      # 0x40a00
cmoveq %rcx, %r8
movq (%r8), %r8
addq $0x8, %r8
cvttsd2si (%rsi), %esi
movq (%r8), %r8
cmpb $0x1, 0x10(%r8)
jne 0x224b9
cmpb $0x1, %dl
leaq 0x1e570(%rip), %rdi     # 0x40a00
movq %rdi, %r8
cmoveq %rcx, %r8
movq (%r8), %r8
cmpb $0x1, 0x10(%r8)
jne 0x224b6
cmpb $0x1, %dl
leaq 0x1e555(%rip), %rdi     # 0x40a00
cmoveq %rcx, %rdi
movq (%rdi), %rdi
addq $0x8, %rdi
movq (%rdi), %rdi
movq (%rdi), %rdi
cvttsd2si (%rdi), %r8d
negl %esi
xorl %edi, %edi
cmpl %r8d, %r14d
jl 0x22547
cmpb $0x1, %dl
leaq 0x1e52c(%rip), %rdi     # 0x40a00
movq %rdi, %r8
cmoveq %rcx, %r8
movq (%r8), %r8
cmpb $0x1, 0x10(%r8)
movq %rdi, %r8
jne 0x224fd
cmpb $0x1, %dl
leaq 0x1e50e(%rip), %r8      # 0x40a00
cmoveq %rcx, %r8
movq (%r8), %r8
addq $0x8, %r8
movq (%r8), %r8
cmpb $0x1, 0x10(%r8)
jne 0x2253a
cmpb $0x1, %dl
leaq 0x1e4ef(%rip), %rdi     # 0x40a00
movq %rdi, %r8
cmoveq %rcx, %r8
movq (%r8), %r8
cmpb $0x1, 0x10(%r8)
jne 0x22537
cmpb $0x1, %dl
leaq 0x1e4d4(%rip), %rdx     # 0x40a00
cmoveq %rcx, %rdx
movq (%rdx), %rdi
addq $0x8, %rdi
movq (%rdi), %rdi
movq (%rdi), %rcx
cvttsd2si (%rcx), %ecx
subl %ecx, %r14d
movl %r14d, %edi
cvtsi2sd %esi, %xmm3
movsd %xmm3, -0x30(%rbp)
movl %edi, %r14d
jmp 0x2255e
xorpd %xmm3, %xmm3
movsd %xmm3, -0x30(%rbp)
cvttsd2si %xmm1, %ecx
movl %ecx, %edx
cvttsd2si %xmm2, %esi
notl %edx
addl %edx, %esi
cmpl $0x2, %esi
movl $0x1, %r15d
cmovgel %esi, %r15d
cvttsd2si %xmm0, %r13d
addl %ecx, %r15d
addl %r15d, %r13d
negl %r15d
movq %rax, %rdi
callq 0x8b01
callq 0x74ec
movb $0x5, %r12b
movb %r12b, 0x10(%rax)
movabsq $0x4010000000000000, %rcx # imm = 0x4010000000000000
movq %rcx, (%rax)
movq %rax, %rdi
callq 0x8b01
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0x74ec
movb %r12b, 0x10(%rax)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %rax, %rdi
callq 0x8b01
callq 0x74ec
movb %r12b, 0x10(%rax)
movq $0x0, (%rax)
movq %rax, %rdi
callq 0x8b01
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0x74ec
movb %r12b, 0x10(%rax)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %rax, %rdi
callq 0x8b01
callq 0x74ec
movb %r12b, 0x10(%rax)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %rax, %rdi
callq 0x8b01
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x74ec
movb %r12b, 0x10(%rax)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %rax, %rdi
callq 0x8b01
movq %rbx, %rdi
callq 0x8b01
movl $0x7, %edi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8ad9