// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/reduce.c
// Function: apply_if
BEH_DECL(apply_if)
{
	CONS* msg = WHAT;
	CONS* expr = map_get(msg, expr_symbol);
	CONS* state = MINE;
	CONS* form = map_get(state, form_symbol);
	CONS* cont = map_get(state, cont_symbol);
	CONS* env = map_get(state, env_symbol);
	
	DBUG_ENTER("apply_if");
	if (expr == true_symbol) {
		expr = car(form);
	} else if (expr == false_symbol) {
		expr = car(cdr(form));
	} else {	/* error */
		SEND(an_error, ATOM("if: predicate must reduce to TRUE or FALSE"));
		SEND(cont, map_put(NIL, expr_symbol, undefined_symbol));
		DBUG_RETURN;
	}
	DBUG_PRINT("", ("expr=%s", cons_to_str(expr)));
	msg = NIL;
	msg = map_put(msg, env_symbol, env);
	msg = map_put(msg, cont_symbol, cont);
	msg = map_put(msg, expr_symbol, expr);
	SEND(a_reduce, msg);
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x10e46
movq 0x160c8(%rip), %rsi     # 0x1a158
movq %rax, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, %r12
movq 0x30(%rbx), %rdi
callq 0x10d3b
movq %rax, %rdi
callq 0x929b
movq %rax, %r15
movq 0x160a8(%rip), %rsi     # 0x1a160
movq %rax, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, %r13
movq 0x16084(%rip), %rsi     # 0x1a150
movq %r15, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, 0x8(%rsp)
movq 0x16086(%rip), %rsi     # 0x1a168
movq %r15, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, %r15
leaq 0xf186(%rip), %rax      # 0x1327c
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x16293(%rip), %r14     # 0x1a398
movq (%r14), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x240, 0xc(%rdi)       # imm = 0x240
leaq 0x119c4(%rip), %rbp     # 0x15ae4
movq %rbp, 0x10(%rdi)
leaq 0x16015(%rip), %rcx     # 0x1a140
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x12bb9
cmpq 0x16041(%rip), %r12     # 0x1a180
je 0x41aa
cmpq 0x16040(%rip), %r12     # 0x1a188
je 0x419f
movq 0x1601f(%rip), %r15     # 0x1a170
leaq 0xf12d(%rip), %rdi      # 0x13285
callq 0xe45f
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x9fd4
movq 0x15fe6(%rip), %rsi     # 0x1a158
movq 0x15fff(%rip), %rdx     # 0x1a178
leaq 0x16188(%rip), %rdi     # 0x1a308
callq 0x11339
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0x9fd4
movl $0x248, %eax            # imm = 0x248
jmp 0x4252
movq %r13, %rdi
callq 0x10e46
movq %rax, %r13
movq %r13, %rdi
callq 0x10d3b
movq %rax, %r12
leaq 0x16784(%rip), %rax     # 0x1a940
cmpl $0x0, (%rax)
je 0x41ff
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %rbp, 0x10(%rax)
movq %rbp, %rdi
callq 0x12334
testl %eax, %eax
je 0x41ff
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x24a, 0xc(%rax)       # imm = 0x24A
movq %r12, %rdi
callq 0xb248
leaq 0xf3a0(%rip), %rdi      # 0x13595
movq %rax, %rsi
xorl %eax, %eax
callq 0x12c30
movq 0x15f62(%rip), %rsi     # 0x1a168
leaq 0x160fb(%rip), %rdi     # 0x1a308
movq %r15, %rdx
callq 0x11339
movq 0x15f34(%rip), %rsi     # 0x1a150
movq %rax, %rdi
movq 0x8(%rsp), %rdx
callq 0x11339
movq 0x15f28(%rip), %rsi     # 0x1a158
movq %rax, %rdi
movq %r12, %rdx
callq 0x11339
movq 0x15f4e(%rip), %rsi     # 0x1a190
movq %rbx, %rdi
movq %rax, %rdx
callq 0x9fd4
movl $0x250, %eax            # imm = 0x250
leaq 0x10(%rsp), %rdi
movl %eax, 0xc(%rdi)
callq 0x12d32
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq