// File: /workspace/github_c_makefile_star2_O3/dalnefre[P]kernel_abe/reduce.c
// Function: reduce_if
BEH_DECL(reduce_if)
{
	CONS* msg = WHAT;
	CONS* expr = map_get(msg, expr_symbol);
	CONS* cont = map_get(msg, cont_symbol);
	CONS* env = map_get(msg, env_symbol);

	DBUG_ENTER("reduce_if");
	if (consp(expr) && consp(cdr(expr)) && consp(cdr(cdr(expr)))) {
		CONS* state;
		CONS* actor;
		
		state = NIL;
		state = map_put(state, env_symbol, env);
		state = map_put(state, cont_symbol, cont);
		state = map_put(state, form_symbol, cdr(expr));
		actor = ACTOR(apply_if, state);
		msg = NIL;
		msg = map_put(msg, env_symbol, env);
		msg = map_put(msg, cont_symbol, actor);
		msg = map_put(msg, expr_symbol, car(expr));
		SEND(a_reduce, msg);
	} else {	/* error */
		SEND(an_error, ATOM("if: illegal argument"));
		msg = NIL;
		msg = map_put(msg, expr_symbol, undefined_symbol);
		SEND(cont, msg);
	}
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x11685
movq %rax, %r12
movq 0x16b12(%rip), %rsi     # 0x1b148
movq %rax, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r14
movq 0x16af6(%rip), %rsi     # 0x1b140
movq %r12, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r15
movq 0x16afa(%rip), %rsi     # 0x1b158
movq %r12, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r12
leaq 0xfc3e(%rip), %rax      # 0x142b0
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x16d09(%rip), %rax     # 0x1b388
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x261, 0xc(%rdi)       # imm = 0x261
leaq 0x1246a(%rip), %rcx     # 0x16b04
movq %rcx, 0x10(%rdi)
leaq 0x16a8b(%rip), %rcx     # 0x1b130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1339a
testq %r14, %r14
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0x46dc
movq %r14, %rdi
callq 0x11685
testq %rax, %rax
je 0x46dc
movq %r14, %rdi
callq 0x11685
testb $0x3, %al
je 0x4743
movq 0x16a7d(%rip), %r14     # 0x1b160
leaq 0xfbd0(%rip), %rdi      # 0x142ba
callq 0xea73
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xa30f
movq 0x16a44(%rip), %rsi     # 0x1b148
movq 0x16a5d(%rip), %rdx     # 0x1b168
leaq 0x16be6(%rip), %rdi     # 0x1b2f8
callq 0x11b2c
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xa30f
movq %rsp, %rdi
movl $0x276, 0xc(%rdi)       # imm = 0x276
callq 0x1351f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x11685
movq %rax, %rdi
callq 0x11685
testq %rax, %rax
je 0x46dc
movq %r14, %rdi
callq 0x11685
movq %rax, %rdi
callq 0x11685
testb $0x3, %al
jne 0x46dc
movq 0x169e1(%rip), %rsi     # 0x1b158
leaq 0x16b7a(%rip), %r13     # 0x1b2f8
movq %r13, %rdi
movq %r12, %rdx
callq 0x11b2c
movq 0x169b0(%rip), %rsi     # 0x1b140
movq %rax, %rdi
movq %r15, %rdx
callq 0x11b2c
movq %rax, %r15
movq 0x169ab(%rip), %rbp     # 0x1b150
movq %r14, %rdi
callq 0x11685
movq %r15, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x11b2c
leaq -0x3af(%rip), %rsi      # 0x4413
movq %rbx, %rdi
movq %rax, %rdx
callq 0xa232
movq %rax, %r15
movq 0x16981(%rip), %rsi     # 0x1b158
movq %r13, %rdi
movq %r12, %rdx
callq 0x11b2c
movq 0x16957(%rip), %rsi     # 0x1b140
movq %rax, %rdi
movq %r15, %rdx
callq 0x11b2c
movq %rax, %r15
movq 0x1694a(%rip), %r12     # 0x1b148
movq %r14, %rdi
callq 0x115e6
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x11b2c
movq 0x16965(%rip), %rsi     # 0x1b180
movq %rbx, %rdi
jmp 0x471d