// File: /workspace/github_c_makefile_star2_O3/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 0x11685
movq 0x16d14(%rip), %rsi     # 0x1b148
movq %rax, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r12
movq 0x30(%rbx), %rdi
callq 0x115e6
movq %rax, %rdi
callq 0x96d9
movq %rax, %r15
movq 0x16cf4(%rip), %rsi     # 0x1b150
movq %rax, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r13
movq 0x16cd0(%rip), %rsi     # 0x1b140
movq %r15, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, 0x8(%rsp)
movq 0x16cd2(%rip), %rsi     # 0x1b158
movq %r15, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r15
leaq 0xfde2(%rip), %rax      # 0x1427c
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x16edf(%rip), %r14     # 0x1b388
movq (%r14), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x240, 0xc(%rdi)       # imm = 0x240
leaq 0x12640(%rip), %rbp     # 0x16b04
movq %rbp, 0x10(%rdi)
leaq 0x16c61(%rip), %rcx     # 0x1b130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1339a
cmpq 0x16c8d(%rip), %r12     # 0x1b170
je 0x454e
cmpq 0x16c8c(%rip), %r12     # 0x1b178
je 0x4543
movq 0x16c6b(%rip), %r15     # 0x1b160
leaq 0xfd89(%rip), %rdi      # 0x14285
callq 0xea73
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xa30f
movq 0x16c32(%rip), %rsi     # 0x1b148
movq 0x16c4b(%rip), %rdx     # 0x1b168
leaq 0x16dd4(%rip), %rdi     # 0x1b2f8
callq 0x11b2c
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0xa30f
movl $0x248, %eax            # imm = 0x248
jmp 0x45f6
movq %r13, %rdi
callq 0x11685
movq %rax, %r13
movq %r13, %rdi
callq 0x115e6
movq %rax, %r12
leaq 0x173d0(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x45a3
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %rbp, 0x10(%rax)
movq %rbp, %rdi
callq 0x12afc
testl %eax, %eax
je 0x45a3
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x24a, 0xc(%rax)       # imm = 0x24A
movq %r12, %rdi
callq 0xb5b4
leaq 0xfffc(%rip), %rdi      # 0x14595
movq %rax, %rsi
xorl %eax, %eax
callq 0x1340b
movq 0x16bae(%rip), %rsi     # 0x1b158
leaq 0x16d47(%rip), %rdi     # 0x1b2f8
movq %r15, %rdx
callq 0x11b2c
movq 0x16b80(%rip), %rsi     # 0x1b140
movq %rax, %rdi
movq 0x8(%rsp), %rdx
callq 0x11b2c
movq 0x16b74(%rip), %rsi     # 0x1b148
movq %rax, %rdi
movq %r12, %rdx
callq 0x11b2c
movq 0x16b9a(%rip), %rsi     # 0x1b180
movq %rbx, %rdi
movq %rax, %rdx
callq 0xa30f
movl $0x250, %eax            # imm = 0x250
leaq 0x10(%rsp), %rdi
movl %eax, 0xc(%rdi)
callq 0x1351f
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq