// File: /workspace/github_c_makefile_star2_O1/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 0x11655
movq %rax, %r15
leaq 0xccf5(%rip), %rdi      # 0x14503
callq 0xea8c
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x11a8a
movq %rax, %r14
movq 0x13926(%rip), %rsi     # 0x1b150
movq %r15, %rdi
xorl %edx, %edx
callq 0x11a8a
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0x115b6
movq %rax, %rdi
callq 0x9721
movq %rax, %r13
movq 0x138ee(%rip), %rsi     # 0x1b140
movq %rax, %rdi
xorl %edx, %edx
callq 0x11a8a
movq %rax, %r12
movq 0x138f2(%rip), %rsi     # 0x1b158
movq %r13, %rdi
xorl %edx, %edx
callq 0x11a8a
movq %rax, 0x8(%rsp)
leaq 0xcd21(%rip), %rax      # 0x1459d
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x13afd(%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 0xf25d(%rip), %rbp      # 0x16b04
movq %rbp, 0x10(%rdi)
leaq 0x1387e(%rip), %rcx     # 0x1b130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x13322
movl %r14d, %eax
notl %eax
testb $0x3, %al
jne 0x7ad0
testq %r15, %r15
je 0x7aef
movl %r15d, %eax
andl $0x3, %eax
jne 0x7aef
movl %r12d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x7b0e
leaq 0x14039(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x7945
movq (%r13), %rax
movq 0x50(%rax), %rax
movq %rbp, 0x10(%rax)
movq %rbp, %rdi
callq 0x12a94
testl %eax, %eax
je 0x7945
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x571, 0xc(%rax)       # imm = 0x571
movq %r14, %rbp
shrq $0x2, %rbp
movq %r15, %rdi
callq 0xb5ac
leaq 0xcc93(%rip), %rdi      # 0x145cc
movl %ebp, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x13393
cmpq 0x13674(%rip), %r15     # 0x1afc0
je 0x7a58
movq 0x137e7(%rip), %rsi     # 0x1b140
leaq 0x13998(%rip), %rbp     # 0x1b2f8
movq %rbp, %rdi
movq %r12, %rdx
callq 0x11afc
movq %rax, %r12
leaq 0xcb8e(%rip), %rdi      # 0x14503
callq 0xea8c
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x11afc
leaq -0x396(%rip), %rsi      # 0x75f9
movq %rbx, %rdi
movq %rax, %rdx
callq 0xa24a
movq %rax, %r12
movq 0x137b4(%rip), %rsi     # 0x1b158
movq %rbp, %rdi
movq 0x8(%rsp), %rdx
callq 0x11afc
movq 0x13788(%rip), %rsi     # 0x1b140
movq %rax, %rdi
movq %r12, %rdx
callq 0x11afc
movq %rax, %r12
movq 0x1377b(%rip), %r13     # 0x1b148
movq %r15, %rdi
callq 0x115b6
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x11afc
movq 0x13796(%rip), %rsi     # 0x1b180
movq %rbx, %rdi
movq %rax, %rdx
callq 0xa327
movq 0x13754(%rip), %r12     # 0x1b150
movq %r15, %rdi
callq 0x11655
movq %rbp, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x11afc
movq %rax, %r15
leaq 0xcae7(%rip), %rdi      # 0x14503
callq 0xea8c
shlq $0x1e, %r14
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %r14, %rdx
sarq $0x1e, %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x11afc
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x115b6
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
jmp 0x7aab
leaq 0xc7e5(%rip), %rdi      # 0x14244
callq 0xea8c
movq %rax, %r15
leaq 0xd395(%rip), %rdi      # 0x14e03
callq 0xea8c
leaq 0x1387e(%rip), %rdi     # 0x1b2f8
movq %r15, %rsi
movq %rax, %rdx
callq 0x11afc
movq %rax, %r15
leaq 0xca74(%rip), %rdi      # 0x14503
callq 0xea8c
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x11afc
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xa327
leaq 0x10(%rsp), %rdi
movl $0x588, 0xc(%rdi)       # imm = 0x588
callq 0x134a7
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xca3a(%rip), %rdi      # 0x14511
leaq 0xc54f(%rip), %rsi      # 0x1402d
leaq 0xcac2(%rip), %rcx      # 0x145a7
movl $0x56e, %edx            # imm = 0x56E
callq 0x2100
leaq 0xcaca(%rip), %rdi      # 0x145c0
leaq 0xc530(%rip), %rsi      # 0x1402d
leaq 0xcaa3(%rip), %rcx      # 0x145a7
movl $0x56f, %edx            # imm = 0x56F
callq 0x2100
leaq 0xca6b(%rip), %rdi      # 0x14580
leaq 0xc511(%rip), %rsi      # 0x1402d
leaq 0xca84(%rip), %rcx      # 0x145a7
movl $0x570, %edx            # imm = 0x570
callq 0x2100