// File: /workspace/github_c_makefile_star2_O2/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 0x2c5ba(%rip), %rax     # 0x3e9f0
movq %rax, %rcx
cmoveq %r13, %rcx
movq (%rcx), %rcx
movb 0x10(%rcx), %dl
cmpb $0x1, %dl
movq %rax, %rsi
cmoveq %rcx, %rsi
movq (%rsi), %rsi
movq %rsi, -0x30(%rbp)
cmpb $0x3, 0x10(%rsi)
jne 0x1269f
movq %rdi, %r15
cmpb $0x1, %dl
jne 0x1246c
movq 0x8(%rcx), %rcx
jmp 0x12473
movq 0x2c57d(%rip), %rcx     # 0x3e9f0
cmpb $0x1, 0x10(%rcx)
jne 0x1247c
movq %rcx, %rax
movq (%rax), %rdi
callq 0x861b
callq 0x8fbb
callq 0x868d
movq %rax, %r14
movq %rax, %rdi
callq 0x126ab
testl %eax, %eax
je 0x12693
movq %r14, %rdi
callq 0x861b
callq 0xd9d9
cmpb $0x1, 0x10(%r15)
leaq 0x2c536(%rip), %rcx     # 0x3e9f0
movq %rcx, %rdx
cmoveq %r13, %rdx
movl %eax, %r14d
movq (%rdx), %rax
cmpb $0x1, 0x10(%rax)
jne 0x124dd
movq 0x8(%rax), %rdx
cmpb $0x1, 0x10(%rdx)
jne 0x124fd
movq 0x8(%rdx), %rdx
jmp 0x12504
movq 0x2c50c(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
jne 0x12524
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
jne 0x12524
movq 0x2c4f5(%rip), %rax     # 0x3e9f0
jmp 0x1250e
movq 0x2c4ec(%rip), %rdx     # 0x3e9f0
cmpb $0x1, 0x10(%rdx)
jne 0x12524
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
jne 0x1251a
addq $0x8, %rax
jmp 0x12521
leaq 0x2c4cf(%rip), %rax     # 0x3e9f0
movq (%rax), %rcx
movq (%rcx), %rdi
callq 0x861b
callq 0x8fbb
callq 0x868d
movq %rax, %r12
movq %rax, %rdi
callq 0x126ab
testl %eax, %eax
je 0x12693
movq %r12, %rdi
callq 0x861b
callq 0xd9d9
cmpb $0x1, 0x10(%r15)
leaq 0x2c48e(%rip), %r12     # 0x3e9f0
cmovneq %r12, %r13
movl %eax, -0x34(%rbp)
movq (%r13), %rax
cmpb $0x1, 0x10(%rax)
jne 0x12587
movq 0x8(%rax), %rcx
cmpb $0x1, 0x10(%rcx)
movq -0x30(%rbp), %r13
jne 0x125b1
movq 0x8(%rcx), %rcx
jmp 0x125b8
movq 0x2c462(%rip), %rax     # 0x3e9f0
cmpb $0x1, 0x10(%rax)
movq %r12, %rcx
movq -0x30(%rbp), %r13
jne 0x125df
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
movq %r12, %rcx
jne 0x125df
movq 0x2c441(%rip), %rax     # 0x3e9f0
jmp 0x125c5
movq 0x2c438(%rip), %rcx     # 0x3e9f0
cmpb $0x1, 0x10(%rcx)
movq %r12, %rcx
jne 0x125df
movq 0x8(%rax), %rax
cmpb $0x1, 0x10(%rax)
jne 0x125d1
addq $0x8, %rax
jmp 0x125d8
leaq 0x2c418(%rip), %rax     # 0x3e9f0
movq (%rax), %rcx
addq $0x8, %rcx
movq (%rcx), %rbx
movq %r13, %rdi
callq 0xd63f
movl 0xf24e7(%rip), %r15d    # 0x104ad8
andl $0x0, 0xf24e0(%rip)     # 0x104ad8
movl %r14d, %edi
callq 0xa426
callq 0x868d
movq 0x2c3e4(%rip), %rdx     # 0x3e9f0
movq %r13, %rdi
movq %rax, %rsi
callq 0x12721
movq %rbx, %r13
cmpb $0x1, 0x10(%r13)
jne 0x12654
movq (%r13), %rdi
callq 0x861b
callq 0x8f7d
callq 0x868d
leaq 0x8(%r13), %rax
cmpb $0x1, 0x10(%r13)
cmovneq %r12, %rax
movq (%rax), %r13
movl 0xfcd66(%rip), %eax     # 0x10f3b0
orl 0xf2488(%rip), %eax     # 0x104ad8
je 0x1261a
jmp 0x1266d
cmpl -0x34(%rbp), %r14d
je 0x1266d
setl %al
movzbl %al, %eax
leal (%r14,%rax,2), %r14d
decl %r14d
movq -0x30(%rbp), %r13
jmp 0x125f8
movl %r15d, 0xf2464(%rip)    # 0x104ad8
callq 0xd684
movq 0x2c370(%rip), %rdi     # 0x3e9f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x861b
leaq 0x10d11(%rip), %rdi     # 0x233ab
callq 0x7756
leaq 0x10cef(%rip), %rdi     # 0x23395
callq 0x7756