// File: /workspace/github_c_makefile_star2_O3/georgeweigt[P]eigenmath/eigenmath.c
// Function: eval_for
void
eval_for(struct atom *p1)
{
	int j, k, t;
	struct atom *p2, *p3;

	p2 = cadr(p1);
	if (!isusersymbol(p2))
		stopf("for: index symbol err");

	push(caddr(p1));
	evalf();
	p3 = pop();
	if (!issmallinteger(p3))
		stopf("for: index range err");
	push(p3);
	j = pop_integer();

	push(cadddr(p1));
	evalf();
	p3 = pop();
	if (!issmallinteger(p3))
		stopf("for: index range err");
	push(p3);
	k = pop_integer();

	p1 = cddddr(p1);

	save_symbol(p2);

	t = breakflag;
	breakflag = 0;

	for (;;) {
		push_integer(j);
		p3 = pop();
		set_symbol(p2, p3, symbol(NIL));
		p3 = p1;
		while (iscons(p3)) {
			push(car(p3));
			evalg();
			pop();
			p3 = cdr(p3);
			if (breakflag || errorflag) {
				breakflag = t;
				restore_symbol();
				push_symbol(NIL);
				return;
			}
		}
		if (j == k)
			break;
		if (j < k)
			j++;
		else
			j--;
	}

	breakflag = t;
	restore_symbol();
	push_symbol(NIL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x8(%rdi), %r13
cmpb $0x1, 0x10(%rdi)
leaq 0x30296(%rip), %rax     # 0x45a00
movq %rax, %rcx
cmoveq %r13, %rcx
movq (%rcx), %rcx
movb 0x10(%rcx), %dl
cmpb $0x1, %dl
movq %rax, %rsi
cmoveq %rcx, %rsi
movq (%rsi), %rbx
cmpb $0x3, 0x10(%rbx)
jne 0x15ab6
movq %rdi, %r15
cmpb $0x1, %dl
jne 0x1579c
movq 0x8(%rcx), %rcx
jmp 0x157a3
movq 0x3025d(%rip), %rcx     # 0x45a00
cmpb $0x1, 0x10(%rcx)
jne 0x157ac
movq %rcx, %rax
movq (%rax), %rdi
callq 0x8ba5
callq 0x96e2
movl 0x29af9(%rip), %eax     # 0x3f2b8
movl $0xfffe795f, %ecx       # imm = 0xFFFE795F
leal (%rax,%rcx), %edx
cmpl %ecx, %edx
jbe 0x15a6a
decl %eax
movl %eax, 0x29ae1(%rip)     # 0x3f2b8
leaq 0x32de2(%rip), %rcx     # 0x485c0
movq (%rcx,%rax,8), %r14
movq %r14, %rdi
callq 0x15ac2
testl %eax, %eax
je 0x15a9e
movq %r14, %rdi
callq 0x8ba5
callq 0xf8e6
cmpb $0x1, 0x10(%r15)
leaq 0x301f5(%rip), %rcx     # 0x45a00
movq %rcx, %rdx
cmoveq %r13, %rdx
movq %rax, -0x30(%rbp)
movq (%rdx), %rax
cmpb $0x1, 0x10(%rax)
jne 0x1582f
movq 0x8(%rax), %rdx
cmpb $0x1, 0x10(%rdx)
jne 0x1584f
movq 0x8(%rdx), %rdx
jmp 0x15856
movq 0x301ca(%rip), %rax     # 0x45a00
cmpb $0x1, 0x10(%rax)
jne 0x15876
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
jne 0x15876
movq 0x301b3(%rip), %rax     # 0x45a00
jmp 0x15860
movq 0x301aa(%rip), %rdx     # 0x45a00
cmpb $0x1, 0x10(%rdx)
jne 0x15876
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
jne 0x1586c
addq $0x8, %rax
jmp 0x15873
leaq 0x3018d(%rip), %rax     # 0x45a00
movq (%rax), %rcx
movq (%rcx), %rdi
callq 0x8ba5
callq 0x96e2
movl 0x29a2f(%rip), %eax     # 0x3f2b8
movl $0xfffe795f, %ecx       # imm = 0xFFFE795F
leal (%rax,%rcx), %edx
cmpl %ecx, %edx
jbe 0x15a6a
decl %eax
movl %eax, 0x29a17(%rip)     # 0x3f2b8
leaq 0x32d18(%rip), %rcx     # 0x485c0
movq (%rcx,%rax,8), %r12
movq %r12, %rdi
callq 0x15ac2
testl %eax, %eax
je 0x15a9e
movq %r12, %rdi
callq 0x8ba5
callq 0xf8e6
cmpb $0x1, 0x10(%r15)
leaq 0x3012b(%rip), %rcx     # 0x45a00
cmovneq %rcx, %r13
movl %eax, -0x38(%rbp)
movq (%r13), %rax
cmpb $0x1, 0x10(%rax)
jne 0x158f6
movq 0x8(%rax), %rdx
cmpb $0x1, 0x10(%rdx)
jne 0x15916
movq 0x8(%rdx), %rdx
jmp 0x1591d
movq 0x30103(%rip), %rax     # 0x45a00
cmpb $0x1, 0x10(%rax)
jne 0x15941
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
jne 0x15941
movq 0x300ec(%rip), %rax     # 0x45a00
jmp 0x15927
movq 0x300e3(%rip), %rdx     # 0x45a00
cmpb $0x1, 0x10(%rdx)
jne 0x15941
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
jne 0x15933
addq $0x8, %rax
jmp 0x1593a
leaq 0x300c6(%rip), %rax     # 0x45a00
movq (%rax), %rcx
addq $0x8, %rcx
movq (%rcx), %r12
movq %rbx, %rdi
callq 0xf3a6
movl 0xf6196(%rip), %eax     # 0x10bae8
movl %eax, -0x34(%rbp)
movl $0x0, 0xf6189(%rip)     # 0x10bae8
movq -0x30(%rbp), %rdi
callq 0xb1be
movl 0x2994a(%rip), %eax     # 0x3f2b8
leal -0x186a1(%rax), %ecx
cmpl $0xfffe7960, %ecx       # imm = 0xFFFE7960
jb 0x15a6a
leaq 0xf6169(%rip), %rsi     # 0x10baf0
movl $0xfffe795f, %r15d      # imm = 0xFFFE795F
leaq 0x3006c(%rip), %r13     # 0x45a00
decl %eax
movl %eax, 0x2991c(%rip)     # 0x3f2b8
cmpb $0x3, 0x10(%rbx)
jne 0x15aaa
movq 0x30053(%rip), %rcx     # 0x45a00
movl %eax, %eax
leaq 0x32c0a(%rip), %rdx     # 0x485c0
movq (%rdx,%rax,8), %rax
movl 0x8(%rbx), %edx
movq %rax, (%rsi,%rdx,8)
movq %rbx, %r14
movl 0x8(%rbx), %eax
leaq 0xfb582(%rip), %rdx     # 0x110f50
movq %rcx, (%rdx,%rax,8)
movq %r12, %rbx
cmpb $0x1, 0x10(%r12)
jne 0x15a24
movq (%r12), %rdi
callq 0x8ba5
callq 0x96a4
movl 0x298c7(%rip), %eax     # 0x3f2b8
leal (%rax,%r15), %ecx
cmpl %r15d, %ecx
jbe 0x15a6a
decl %eax
movl %eax, 0x298b6(%rip)     # 0x3f2b8
leaq 0x8(%r12), %rax
cmpb $0x1, 0x10(%r12)
cmovneq %r13, %rax
movq (%rax), %r12
movl 0x1009a6(%rip), %eax    # 0x1163c0
orl 0xf60c8(%rip), %eax     # 0x10bae8
je 0x159d5
jmp 0x15a76
movq -0x30(%rbp), %rax
cmpl -0x38(%rbp), %eax
je 0x15a76
setl %al
movzbl %al, %eax
movq -0x30(%rbp), %rdi
leal (%rdi,%rax,2), %edi
decl %edi
movq %rdi, -0x30(%rbp)
callq 0xb1be
movl 0x2986d(%rip), %eax     # 0x3f2b8
leal -0x186a1(%rax), %ecx
cmpl $0xfffe7960, %ecx       # imm = 0xFFFE7960
movq %rbx, %r12
movq %r14, %rbx
leaq 0xf608c(%rip), %rsi     # 0x10baf0
jae 0x15994
leaq 0x194d0(%rip), %rdi     # 0x2ef41
callq 0x780b
movl -0x34(%rbp), %eax
movl %eax, 0xf6069(%rip)     # 0x10bae8
callq 0xf40c
movq 0x2ff75(%rip), %rdi     # 0x45a00
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8ba5
leaq 0x148ce(%rip), %rdi     # 0x2a373
callq 0x780b
leaq 0x194e9(%rip), %rdi     # 0x2ef9a
callq 0x780b
leaq 0x148a0(%rip), %rdi     # 0x2a35d
callq 0x780b