// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
leaq 0x8(%rdi), %r13
cmpb $0x1, 0x10(%rdi)
leaq 0x2c9bc(%rip), %rax     # 0x40a00
movq %rax, %rcx
cmoveq %r13, %rcx
movq (%rcx), %rcx
cmpb $0x1, 0x10(%rcx)
cmovneq %rax, %rcx
movq (%rcx), %rbx
cmpb $0x3, 0x10(%rbx)
jne 0x14332
movq %rdi, %r15
cmpb $0x1, 0x10(%rdi)
movq %rax, %rcx
cmoveq %r13, %rcx
movq (%rcx), %rcx
movb 0x10(%rcx), %dl
addq $0x8, %rcx
cmpb $0x1, %dl
movq %rax, %rsi
cmoveq %rcx, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x1409f
cmpb $0x1, %dl
leaq 0x2c968(%rip), %rax     # 0x40a00
cmoveq %rcx, %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0x8b01
callq 0x95e2
callq 0x8b78
movq %rax, %r14
movq %rax, %rdi
callq 0x1433e
testl %eax, %eax
je 0x14326
movq %r14, %rdi
callq 0x8b01
callq 0xeb5b
cmpb $0x1, 0x10(%r15)
leaq 0x2c923(%rip), %rdx     # 0x40a00
movq %rdx, %rcx
cmoveq %r13, %rcx
movl %eax, %r14d
movq (%rcx), %rax
movb 0x10(%rax), %cl
addq $0x8, %rax
cmpb $0x1, %cl
movq %rdx, %rsi
cmoveq %rax, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
movq %rdx, %rsi
jne 0x1411c
cmpb $0x1, %cl
leaq 0x2c8ef(%rip), %rsi     # 0x40a00
cmoveq %rax, %rsi
movq (%rsi), %rsi
addq $0x8, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x14157
cmpb $0x1, %cl
leaq 0x2c8d1(%rip), %rdx     # 0x40a00
movq %rdx, %rsi
cmoveq %rax, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x14154
cmpb $0x1, %cl
leaq 0x2c8b7(%rip), %rcx     # 0x40a00
cmoveq %rax, %rcx
movq (%rcx), %rdx
addq $0x8, %rdx
movq (%rdx), %rdx
movq (%rdx), %rdi
callq 0x8b01
callq 0x95e2
callq 0x8b78
movq %rax, %r12
movq %rax, %rdi
callq 0x1433e
testl %eax, %eax
je 0x14326
movq %r12, %rdi
callq 0x8b01
callq 0xeb5b
cmpb $0x1, 0x10(%r15)
leaq 0x2c86b(%rip), %rdx     # 0x40a00
cmovneq %rdx, %r13
movl %eax, -0x30(%rbp)
movq (%r13), %rax
movb 0x10(%rax), %cl
addq $0x8, %rax
cmpb $0x1, %cl
movq %rdx, %rsi
cmoveq %rax, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
movq %rdx, %rsi
jne 0x141d2
cmpb $0x1, %cl
leaq 0x2c839(%rip), %rsi     # 0x40a00
cmoveq %rax, %rsi
movq (%rsi), %rsi
addq $0x8, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x14211
cmpb $0x1, %cl
leaq 0x2c81b(%rip), %rdx     # 0x40a00
movq %rdx, %rsi
cmoveq %rax, %rsi
movq (%rsi), %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x1420a
cmpb $0x1, %cl
leaq 0x2c801(%rip), %rcx     # 0x40a00
cmoveq %rax, %rcx
movq (%rcx), %rdx
addq $0x8, %rdx
movq (%rdx), %rdx
addq $0x8, %rdx
movq (%rdx), %r12
movq %rbx, %rdi
callq 0xe73e
movl 0xf28c6(%rip), %eax     # 0x106ae8
movl %eax, -0x2c(%rbp)
movl $0x0, 0xf28b9(%rip)     # 0x106ae8
movl %r14d, %edi
callq 0xacbe
callq 0x8b78
cmpb $0x3, 0x10(%rbx)
jne 0x142f2
leaq 0xf28a3(%rip), %rsi     # 0x106af0
leaq 0xf7cfc(%rip), %rdi     # 0x10bf50
leaq 0x2c7a5(%rip), %r15     # 0x40a00
movq 0x2c79e(%rip), %rcx     # 0x40a00
movl 0x8(%rbx), %edx
movq %rax, (%rsi,%rdx,8)
movq %rbx, %r13
movl 0x8(%rbx), %eax
movq %rcx, (%rdi,%rax,8)
movq %r12, %rbx
cmpb $0x1, 0x10(%r12)
jne 0x142b3
movq (%r12), %rdi
callq 0x8b01
callq 0x95ac
callq 0x8b78
leaq 0x8(%r12), %rax
cmpb $0x1, 0x10(%r12)
cmovneq %r15, %rax
movq (%rax), %r12
movl 0xfd117(%rip), %eax     # 0x1113c0
orl 0xf2839(%rip), %eax     # 0x106ae8
je 0x14276
jmp 0x142fe
cmpl -0x30(%rbp), %r14d
je 0x142fe
setl %al
movzbl %al, %eax
leal (%r14,%rax,2), %r14d
decl %r14d
movl %r14d, %edi
callq 0xacbe
callq 0x8b78
leaq 0xf7c76(%rip), %rdi     # 0x10bf50
cmpb $0x3, 0x10(%r13)
leaq 0xf280a(%rip), %rsi     # 0x106af0
movq %rbx, %r12
movq %r13, %rbx
je 0x1425b
leaq 0x16c81(%rip), %rdi     # 0x2af7a
callq 0x77c8
movl -0x2c(%rbp), %eax
movl %eax, 0xf27e1(%rip)     # 0x106ae8
callq 0xe7a4
movq 0x2c6ed(%rip), %rdi     # 0x40a00
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8b01
leaq 0x12026(%rip), %rdi     # 0x26353
callq 0x77c8
leaq 0x12004(%rip), %rdi     # 0x2633d
callq 0x77c8