// File: /workspace/github_c_makefile_star2_O3/dalnefre[P]kernel_abe/reduce.c
// Function: apply_par
BEH_DECL(apply_par)
{
	CONS* msg = WHAT;
	CONS* i = map_get(msg, ATOM("i"));
	CONS* form = map_get(msg, form_symbol);
	CONS* state = MINE;
	CONS* collect = map_get(state, cont_symbol);
	CONS* env = map_get(state, env_symbol);

	DBUG_ENTER("apply_par");
	assert(numberp(i));
	assert(consp(form));
	assert(actorp(collect));
	DBUG_PRINT("", ("i=%d form=%s", MK_INT(i), cons_to_str(form)));
	if (nilp(form)) {
		msg = NIL;
		msg = map_put(msg, ATOM("op"), ATOM("n"));
		msg = map_put(msg, ATOM("i"), i);
		SEND(collect, msg);		
	} else {
		CONS* actor;
		
		state = NIL;
		state = map_put(state, cont_symbol, collect);
		state = map_put(state, ATOM("i"), i);
		actor = ACTOR(eval_par, state);
		msg = NIL;
		msg = map_put(msg, env_symbol, env);
		msg = map_put(msg, cont_symbol, actor);
		msg = map_put(msg, expr_symbol, car(form));
		SEND(a_reduce, msg);
		msg = NIL;
		msg = map_put(msg, form_symbol, cdr(form));
		msg = map_put(msg, ATOM("i"), NUMBER(MK_INT(i) + 1));
		SEND(SELF, 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 %rax, %r15
leaq 0xcd3d(%rip), %rdi      # 0x14503
callq 0xea73
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r14
movq 0x1396e(%rip), %rsi     # 0x1b150
movq %r15, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0x115e6
movq %rax, %rdi
callq 0x96d9
movq %rax, %r13
movq 0x13936(%rip), %rsi     # 0x1b140
movq %rax, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r12
movq 0x1393a(%rip), %rsi     # 0x1b158
movq %r13, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, 0x8(%rsp)
leaq 0xcd69(%rip), %rax      # 0x1459d
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x13b45(%rip), %r13     # 0x1b388
movq (%r13), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x56d, 0xc(%rdi)       # imm = 0x56D
leaq 0xf2a5(%rip), %rbp      # 0x16b04
movq %rbp, 0x10(%rdi)
leaq 0x138c6(%rip), %rcx     # 0x1b130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1339a
movl %r14d, %eax
notl %eax
testb $0x3, %al
jne 0x7a88
testq %r15, %r15
je 0x7aa7
movl %r15d, %eax
andl $0x3, %eax
jne 0x7aa7
movl %r12d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x7ac6
leaq 0x14081(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x78fd
movq (%r13), %rax
movq 0x50(%rax), %rax
movq %rbp, 0x10(%rax)
movq %rbp, %rdi
callq 0x12afc
testl %eax, %eax
je 0x78fd
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x571, 0xc(%rax)       # imm = 0x571
movq %r14, %rbp
shrq $0x2, %rbp
movq %r15, %rdi
callq 0xb5b4
leaq 0xccdb(%rip), %rdi      # 0x145cc
movl %ebp, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1340b
cmpq 0x136bc(%rip), %r15     # 0x1afc0
je 0x7a10
movq 0x1382f(%rip), %rsi     # 0x1b140
leaq 0x139e0(%rip), %rbp     # 0x1b2f8
movq %rbp, %rdi
movq %r12, %rdx
callq 0x11b2c
movq %rax, %r12
leaq 0xcbd6(%rip), %rdi      # 0x14503
callq 0xea73
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x11b2c
leaq -0x396(%rip), %rsi      # 0x75b1
movq %rbx, %rdi
movq %rax, %rdx
callq 0xa232
movq %rax, %r12
movq 0x137fc(%rip), %rsi     # 0x1b158
movq %rbp, %rdi
movq 0x8(%rsp), %rdx
callq 0x11b2c
movq 0x137d0(%rip), %rsi     # 0x1b140
movq %rax, %rdi
movq %r12, %rdx
callq 0x11b2c
movq %rax, %r12
movq 0x137c3(%rip), %r13     # 0x1b148
movq %r15, %rdi
callq 0x115e6
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x11b2c
movq 0x137de(%rip), %rsi     # 0x1b180
movq %rbx, %rdi
movq %rax, %rdx
callq 0xa30f
movq 0x1379c(%rip), %r12     # 0x1b150
movq %r15, %rdi
callq 0x11685
movq %rbp, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x11b2c
movq %rax, %r15
leaq 0xcb2f(%rip), %rdi      # 0x14503
callq 0xea73
shlq $0x1e, %r14
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %r14, %rdx
sarq $0x1e, %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x11b2c
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x115e6
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
jmp 0x7a63
leaq 0xc82d(%rip), %rdi      # 0x14244
callq 0xea73
movq %rax, %r15
leaq 0xd3dd(%rip), %rdi      # 0x14e03
callq 0xea73
leaq 0x138c6(%rip), %rdi     # 0x1b2f8
movq %r15, %rsi
movq %rax, %rdx
callq 0x11b2c
movq %rax, %r15
leaq 0xcabc(%rip), %rdi      # 0x14503
callq 0xea73
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x11b2c
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xa30f
leaq 0x10(%rsp), %rdi
movl $0x588, 0xc(%rdi)       # imm = 0x588
callq 0x1351f
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xca82(%rip), %rdi      # 0x14511
leaq 0xc597(%rip), %rsi      # 0x1402d
leaq 0xcb0a(%rip), %rcx      # 0x145a7
movl $0x56e, %edx            # imm = 0x56E
callq 0x2100
leaq 0xcb12(%rip), %rdi      # 0x145c0
leaq 0xc578(%rip), %rsi      # 0x1402d
leaq 0xcaeb(%rip), %rcx      # 0x145a7
movl $0x56f, %edx            # imm = 0x56F
callq 0x2100
leaq 0xcab3(%rip), %rdi      # 0x14580
leaq 0xc559(%rip), %rsi      # 0x1402d
leaq 0xcacc(%rip), %rcx      # 0x145a7
movl $0x570, %edx            # imm = 0x570
callq 0x2100