// File: /workspace/github_c_makefile_star2_O0/georgeweigt[P]eigenmath/eigenmath.c
// Function: evalf_nib
void
evalf_nib(struct atom *p1)
{
	if (interrupt)
		stopf("interrupt");

	// this is needed to prevent seg fault (STACKSIZE is greater than process stack)

	if (eval_level > 1000)
		stopf("evaluation depth exceeded, possibly due to recursive function or circular symbol definition");

	if (eval_level > max_eval_level)
		max_eval_level = eval_level;

	if (iscons(p1) && iskeyword(car(p1))) {
		expanding++;
		car(p1)->u.ksym.func(p1); // call through function pointer
		expanding--;
		return;
	}

	if (iscons(p1) && isusersymbol(car(p1))) {
		eval_user_function(p1);
		return;
	}

	if (iskeyword(p1)) { // bare keyword
		push(p1);
		push_symbol(LAST); // default arg
		list(2);
		evalg();
		return;
	}

	if (isusersymbol(p1)) {
		eval_user_symbol(p1);
		return;
	}

	if (istensor(p1)) {
		eval_tensor(p1);
		return;
	}

	push(p1); // rational, double, or string
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpl $0x0, 0x11a3f5(%rip)    # 0x124ac8
je 0xa6e1
leaq 0x3aa91(%rip), %rdi     # 0x4516d
callq 0x78d0
cmpl $0x3e8, 0x11a3d9(%rip)  # imm = 0x3E8
jle 0xa6f9
leaq 0x3aa83(%rip), %rdi     # 0x45177
callq 0x78d0
movl 0x11a3c5(%rip), %eax    # 0x124ac4
cmpl 0x11a3c7(%rip), %eax    # 0x124acc
jle 0xa713
movl 0x11a3b7(%rip), %eax    # 0x124ac4
movl %eax, 0x11a3b9(%rip)    # 0x124acc
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0xa7ac
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0xa73e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xa749
movq 0x542bb(%rip), %rax     # 0x5ea00
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x2, %eax
jne 0xa7ac
movl 0x11a374(%rip), %eax    # 0x124ad0
addl $0x1, %eax
movl %eax, 0x11a36b(%rip)    # 0x124ad0
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0xa77f
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xa78a
movq 0x5427a(%rip), %rax     # 0x5ea00
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movl 0x11a332(%rip), %eax    # 0x124ad0
addl $-0x1, %eax
movl %eax, 0x11a329(%rip)    # 0x124ad0
jmp 0xa862
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0xa7f6
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0xa7d3
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xa7de
movq 0x54226(%rip), %rax     # 0x5ea00
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x3, %eax
jne 0xa7f6
movq -0x8(%rbp), %rdi
callq 0xa870
jmp 0xa862
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x2, %eax
jne 0xa829
movq -0x8(%rbp), %rdi
callq 0x9110
movq 0x53bad(%rip), %rdi     # 0x5e3c0
callq 0x9110
movl $0x2, %edi
callq 0x90d0
callq 0xa610
jmp 0xa862
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x3, %eax
jne 0xa841
movq -0x8(%rbp), %rdi
callq 0xac60
jmp 0xa862
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x7, %eax
jne 0xa859
movq -0x8(%rbp), %rdi
callq 0xacb0
jmp 0xa862
movq -0x8(%rbp), %rdi
callq 0x9110
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)