// File: /workspace/github_c_makefile_star2_O2/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 0x10e46
movq %rax, %r15
leaq 0xc106(%rip), %rdi      # 0x13503
callq 0xe45f
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x112c7
movq %rax, %r14
movq 0x12d47(%rip), %rsi     # 0x1a160
movq %r15, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0x10d3b
movq %rax, %rdi
callq 0x929b
movq %rax, %r13
movq 0x12d0f(%rip), %rsi     # 0x1a150
movq %rax, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, %r12
movq 0x12d13(%rip), %rsi     # 0x1a168
movq %r13, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, 0x8(%rsp)
leaq 0xc132(%rip), %rax      # 0x1359d
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x12f1e(%rip), %r13     # 0x1a398
movq (%r13), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x56d, 0xc(%rdi)       # imm = 0x56D
leaq 0xe64e(%rip), %rbp      # 0x15ae4
movq %rbp, 0x10(%rdi)
leaq 0x12c9f(%rip), %rcx     # 0x1a140
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x12bb9
movl %r14d, %eax
notl %eax
testb $0x3, %al
jne 0x76bf
testq %r15, %r15
je 0x76de
movl %r15d, %eax
andl $0x3, %eax
jne 0x76de
movl %r12d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x76fd
leaq 0x1345a(%rip), %rax     # 0x1a940
cmpl $0x0, (%rax)
je 0x7534
movq (%r13), %rax
movq 0x50(%rax), %rax
movq %rbp, 0x10(%rax)
movq %rbp, %rdi
callq 0x12334
testl %eax, %eax
je 0x7534
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x571, 0xc(%rax)       # imm = 0x571
movq %r14, %rbp
shrq $0x2, %rbp
movq %r15, %rdi
callq 0xb248
leaq 0xc0a4(%rip), %rdi      # 0x135cc
movl %ebp, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x12c30
cmpq 0x12a85(%rip), %r15     # 0x19fc0
je 0x7647
movq 0x12c08(%rip), %rsi     # 0x1a150
leaq 0x12db9(%rip), %rbp     # 0x1a308
movq %rbp, %rdi
movq %r12, %rdx
callq 0x11339
movq %rax, %r12
leaq 0xbf9f(%rip), %rdi      # 0x13503
callq 0xe45f
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x11339
leaq -0x396(%rip), %rsi      # 0x71e8
movq %rbx, %rdi
movq %rax, %rdx
callq 0x9ef7
movq %rax, %r12
movq 0x12bd5(%rip), %rsi     # 0x1a168
movq %rbp, %rdi
movq 0x8(%rsp), %rdx
callq 0x11339
movq 0x12ba9(%rip), %rsi     # 0x1a150
movq %rax, %rdi
movq %r12, %rdx
callq 0x11339
movq %rax, %r12
movq 0x12b9c(%rip), %r13     # 0x1a158
movq %r15, %rdi
callq 0x10d3b
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x11339
movq 0x12bb7(%rip), %rsi     # 0x1a190
movq %rbx, %rdi
movq %rax, %rdx
callq 0x9fd4
movq 0x12b75(%rip), %r12     # 0x1a160
movq %r15, %rdi
callq 0x10e46
movq %rbp, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x11339
movq %rax, %r15
leaq 0xbef8(%rip), %rdi      # 0x13503
callq 0xe45f
shlq $0x1e, %r14
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %r14, %rdx
sarq $0x1e, %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x11339
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x10d3b
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
jmp 0x769a
leaq 0xbbf6(%rip), %rdi      # 0x13244
callq 0xe45f
movq %rax, %r15
leaq 0xc7a6(%rip), %rdi      # 0x13e03
callq 0xe45f
leaq 0x12c9f(%rip), %rdi     # 0x1a308
movq %r15, %rsi
movq %rax, %rdx
callq 0x11339
movq %rax, %r15
leaq 0xbe85(%rip), %rdi      # 0x13503
callq 0xe45f
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x11339
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x9fd4
leaq 0x10(%rsp), %rdi
movl $0x588, 0xc(%rdi)       # imm = 0x588
callq 0x12d32
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbe4b(%rip), %rdi      # 0x13511
leaq 0xb960(%rip), %rsi      # 0x1302d
leaq 0xbed3(%rip), %rcx      # 0x135a7
movl $0x56e, %edx            # imm = 0x56E
callq 0x2100
leaq 0xbedb(%rip), %rdi      # 0x135c0
leaq 0xb941(%rip), %rsi      # 0x1302d
leaq 0xbeb4(%rip), %rcx      # 0x135a7
movl $0x56f, %edx            # imm = 0x56F
callq 0x2100
leaq 0xbe7c(%rip), %rdi      # 0x13580
leaq 0xb922(%rip), %rsi      # 0x1302d
leaq 0xbe95(%rip), %rcx      # 0x135a7
movl $0x570, %edx            # imm = 0x570
callq 0x2100