// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Uno/Src/uno_generic.c
// Function: eval_step
static int
eval_step(treenode *e, treenode *v, treenode *n)
{	leafnode *leaf;
	int val, arg1_val = -1;

	uno_assert(e && v, "bad call to eval_step");

	if (debug)
	{	printf("\teval %s <%s> ",
			name_of_node(e->hdr.type),
			x_stmnt(e));
		printf(":: %s <%s>\n",
			name_of_node(v->hdr.type),
			x_stmnt(v));
	}
	switch (e->hdr.type) {
	case TN_IDENT:
		leaf = (leafnode *) e;
		if (strcmp(leaf->data.sval->str, statename) != 0)
		{	printf("\t\texpected '%s', saw %s\n",
				statename, leaf->data.sval->str);
			exit(1);
		}
		arg1_val = gen_stack->uno_state;
		if (debug) printf("\t\targ1 %s (==%d)\n",
				leaf->data.sval->str, arg1_val);
		break;

	case TN_FUNC_CALL:
		arg1_val = eval_fct(e, n);
		break;

	case TN_EXPR:
		nogood = 0;
		arg1_val = eval_const_expr(e, n);
		if (nogood)
		{	printf("\t\tbad expression (%s == ?), saw %s <%s>\n",
				statename, name_of_node(e->hdr.type), x_stmnt(e));
			exit(1);
		} else
		{	if (debug) printf("\t\targ1 = %d\n", arg1_val);
		}
		break;
	default:
		printf("\t\targ1 expecting func_call or ident, saw %s <%s>\n",
			name_of_node(e->hdr.type), x_stmnt(e));
		exit(1);
	}

	switch (v->hdr.type) {
	case TN_IDENT:
		leaf = (leafnode *) v;

		if (debug) printf("\t\targ2 = %s\n", leaf->data.sval->str);

		if (strcmp(leaf->data.sval->str, "_true_") == 0)
		{	if (arg1_val) goto yes; else goto no;
		} else if (strcmp(leaf->data.sval->str, "_false_") == 0)
		{	if (arg1_val) goto no; else goto yes;
		} else if (strcmp(leaf->data.sval->str, statename) == 0)
		{	if (arg1_val == gen_stack->uno_state) goto yes;
			goto no;
		}
		printf("\t\texpected true, false, or %s, saw %s\n",
			statename, leaf->data.sval->str);			
		break;

	case TN_EXPR:
		nogood = 0;
		val = eval_const_expr(v, n);
		if (!nogood)
		{	if (debug) printf("\t\targ2 = %d\n", val);
			if (arg1_val == val) goto yes;
			goto no;
		}
		printf("\t\tbad expression arg2 = ?, saw <%s>\n", x_stmnt(v));
		break;
	default:
		printf("\t\targ2 expecting expr or ident, saw %s\n",
			name_of_node(v->hdr.type));
		break;
	}

	if (debug) printf("Don't Know\n");
	exit(1);
yes:
	if (debug) printf("Yes\n");
	return 1;
no:
	if (debug) printf("No\n");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x31(%rbp)
je 0x32912
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x14c6b(%rip), %rsi     # 0x4758c
callq 0x1fde0
cmpl $0x0, 0x642bb(%rip)     # 0x96be8
je 0x3298b
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edi
callq 0x8270
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4ec0
movq -0x48(%rbp), %rsi
movq %rax, %rdx
leaq 0x14c4c(%rip), %rdi     # 0x475a2
movb $0x0, %al
callq 0x30f0
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %edi
callq 0x8270
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4ec0
movq -0x40(%rbp), %rsi
movq %rax, %rdx
leaq 0x14c2d(%rip), %rdi     # 0x475b1
movb $0x0, %al
callq 0x30f0
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x4c(%rbp)
subl $0x3, %eax
je 0x32a44
jmp 0x329a0
movl -0x4c(%rbp), %eax
subl $0x28, %eax
je 0x32a59
jmp 0x329ae
movl -0x4c(%rbp), %eax
subl $0x2d, %eax
jne 0x32ae7
jmp 0x329bc
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdi
movq 0x1b811(%rip), %rsi     # 0x4e1e8
callq 0x3160
cmpl $0x0, %eax
je 0x32a0c
movq 0x1b800(%rip), %rsi     # 0x4e1e8
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdx
leaq 0x14bc2(%rip), %rdi     # 0x475bd
movb $0x0, %al
callq 0x30f0
movl $0x1, %edi
callq 0x3230
movq 0x641c5(%rip), %rax     # 0x96bd8
movl 0x8(%rax), %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, 0x641c8(%rip)     # 0x96be8
je 0x32a3f
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
movl -0x30(%rbp), %edx
leaq 0x14b9e(%rip), %rdi     # 0x475d6
movb $0x0, %al
callq 0x30f0
jmp 0x32b1f
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2f540
movl %eax, -0x30(%rbp)
jmp 0x32b1f
leaq 0x64098(%rip), %rax     # 0x96af8
movl $0x0, (%rax)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2b4f0
movl %eax, -0x30(%rbp)
leaq 0x6407b(%rip), %rax     # 0x96af8
cmpl $0x0, (%rax)
je 0x32ac9
movq 0x1b75f(%rip), %rax     # 0x4e1e8
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edi
callq 0x8270
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4ec0
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %rax, %rcx
leaq 0x14b30(%rip), %rdi     # 0x475e8
movb $0x0, %al
callq 0x30f0
movl $0x1, %edi
callq 0x3230
cmpl $0x0, 0x64118(%rip)     # 0x96be8
je 0x32ae3
movl -0x30(%rbp), %esi
leaq 0x14b35(%rip), %rdi     # 0x47611
movb $0x0, %al
callq 0x30f0
jmp 0x32ae5
jmp 0x32b1f
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edi
callq 0x8270
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4ec0
movq -0x68(%rbp), %rsi
movq %rax, %rdx
leaq 0x14b10(%rip), %rdi     # 0x4761e
movb $0x0, %al
callq 0x30f0
movl $0x1, %edi
callq 0x3230
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x6c(%rbp)
subl $0x28, %eax
je 0x32c27
jmp 0x32b34
movl -0x6c(%rbp), %eax
subl $0x2d, %eax
jne 0x32c92
jmp 0x32b42
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, 0x64097(%rip)     # 0x96be8
je 0x32b6d
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0x14aea(%rip), %rdi     # 0x47650
movb $0x0, %al
callq 0x30f0
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x12526(%rip), %rsi     # 0x450a6
callq 0x3160
cmpl $0x0, %eax
jne 0x32b9a
cmpl $0x0, -0x30(%rbp)
je 0x32b95
jmp 0x32cd0
jmp 0x32cf0
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x124f1(%rip), %rsi     # 0x4509e
callq 0x3160
cmpl $0x0, %eax
jne 0x32bc7
cmpl $0x0, -0x30(%rbp)
je 0x32bc2
jmp 0x32cf0
jmp 0x32cd0
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdi
movq 0x1b60e(%rip), %rsi     # 0x4e1e8
callq 0x3160
cmpl $0x0, %eax
jne 0x32bfd
movl -0x30(%rbp), %eax
movq 0x63fea(%rip), %rcx     # 0x96bd8
cmpl 0x8(%rcx), %eax
jne 0x32bf8
jmp 0x32cd0
jmp 0x32cf0
jmp 0x32bff
jmp 0x32c01
movq 0x1b5e0(%rip), %rsi     # 0x4e1e8
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rdx
leaq 0x14a42(%rip), %rdi     # 0x4765d
movb $0x0, %al
callq 0x30f0
jmp 0x32caf
leaq 0x63eca(%rip), %rax     # 0x96af8
movl $0x0, (%rax)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2b4f0
movl %eax, -0x2c(%rbp)
leaq 0x63ead(%rip), %rax     # 0x96af8
cmpl $0x0, (%rax)
jne 0x32c76
cmpl $0x0, 0x63f91(%rip)     # 0x96be8
je 0x32c6a
movl -0x2c(%rbp), %esi
leaq 0x14a21(%rip), %rdi     # 0x47684
movb $0x0, %al
callq 0x30f0
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jne 0x32c74
jmp 0x32cd0
jmp 0x32cf0
movq -0x18(%rbp), %rdi
callq 0x4ec0
movq %rax, %rsi
leaq 0x14a08(%rip), %rdi     # 0x47691
movb $0x0, %al
callq 0x30f0
jmp 0x32caf
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %edi
callq 0x8270
movq %rax, %rsi
leaq 0x14a0e(%rip), %rdi     # 0x476b6
movb $0x0, %al
callq 0x30f0
cmpl $0x0, 0x63f32(%rip)     # 0x96be8
je 0x32cc6
leaq 0x14a1f(%rip), %rdi     # 0x476de
movb $0x0, %al
callq 0x30f0
movl $0x1, %edi
callq 0x3230
cmpl $0x0, 0x63f11(%rip)     # 0x96be8
je 0x32ce7
leaq 0x14a0a(%rip), %rdi     # 0x476ea
movb $0x0, %al
callq 0x30f0
movl $0x1, -0x4(%rbp)
jmp 0x32d0e
cmpl $0x0, 0x63ef1(%rip)     # 0x96be8
je 0x32d07
leaq 0x149ef(%rip), %rdi     # 0x476ef
movb $0x0, %al
callq 0x30f0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)