// File: /workspace/github_c_makefile_star2_O1/dalnefre[P]kernel_abe/echallenge.c
// Function: countdown_builder_beh
BEH_DECL(countdown_builder_beh)
{
	CONS* n;
	CONS* first;
	CONS* m;
	int n_int;
/*
	CONS* n = MINE;
	CONS* first = car(WHAT);
	CONS* m = cdr(WHAT);
	int n_int = MK_INT(n);
*/
	DBUG_ENTER("countdown_builder_beh");
	n = MINE;
	assert(numberp(n));
	assert(consp(WHAT));
	first = car(WHAT);
	assert(actorp(first));
	m = cdr(WHAT);
	assert(numberp(m));
	n_int = MK_INT(n);
	DBUG_PRINT("", ("n=%d m=%d", n_int, MK_INT(m)));
	if (n_int <= 0) {
		BECOME(countdown_ring_0_beh, first);
		SEND(timing_actor, NIL);
		SEND(first, m);			/* NOTE: disable this line for process creation only */
	} else {
		CONS* next;

		next = ACTOR(countdown_builder_beh, NUMBER(n_int - 1));
		BECOME(countdown_ring_beh, next);
		SEND(next, WHAT);
	}
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0xb65b(%rip), %rax      # 0xe056
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x108f0(%rip), %rax     # 0x132f8
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x60, 0xc(%rdi)
leaq 0xd361(%rip), %r15      # 0xfd84
movq %r15, 0x10(%rdi)
leaq 0x106f2(%rip), %rcx     # 0x13120
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0xcd72
movq 0x30(%rbx), %rdi
callq 0xb006
movq %rax, %rdi
callq 0x3171
movq %rax, %r14
notl %eax
testb $0x3, %al
jne 0x2bec
movq 0x30(%rbx), %rdi
callq 0xb0a5
testq %rax, %rax
je 0x2bcd
movq 0x30(%rbx), %rdi
callq 0xb0a5
testb $0x3, %al
jne 0x2bcd
movq 0x30(%rbx), %rdi
callq 0xb0a5
movq %rax, %rdi
callq 0xb006
movq %rax, %r12
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x2c0b
movq 0x30(%rbx), %rdi
callq 0xb0a5
movq %rax, %rdi
callq 0xb0a5
movq %rax, %r13
notl %eax
testb $0x3, %al
jne 0x2c2a
movq %r14, %rbp
shrq $0x2, %rbp
leaq 0x10dd8(%rip), %rax     # 0x138a0
cmpl $0x0, (%rax)
je 0x2b17
leaq 0x10824(%rip), %rax     # 0x132f8
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0xc4e4
testl %eax, %eax
je 0x2b17
leaq 0x10806(%rip), %rax     # 0x132f8
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x69, 0xc(%rax)
movq %r13, %rdx
shrq $0x2, %rdx
leaq 0xb5c0(%rip), %rdi      # 0xe0ce
movl %ebp, %esi
xorl %eax, %eax
callq 0xcde3
testl %ebp, %ebp
jle 0x2b70
movabsq $0x3fffffffc, %rdx      # imm = 0x3FFFFFFFC
addq %rdx, %r14
orq $0x3, %rdx
andq %r14, %rdx
leaq -0x153(%rip), %rsi      # 0x29e3
movq %rbx, %rdi
callq 0x3c9a
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0xb006
leaq -0x219(%rip), %rsi      # 0x2938
movq %rax, %rdi
movq %r14, %rdx
callq 0x3380
movq 0x30(%rbx), %rdi
callq 0xb0a5
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
jmp 0x2baa
movq 0x30(%rbx), %rdi
callq 0xb006
leaq -0x334(%rip), %rsi      # 0x284c
movq %rax, %rdi
movq %r12, %rdx
callq 0x3380
movq 0x107b6(%rip), %rsi     # 0x13348
leaq 0x106cf(%rip), %rdx     # 0x13268
movq %rbx, %rdi
callq 0x3d77
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3d77
movq %rsp, %rdi
movl $0x75, 0xc(%rdi)
callq 0xcef7
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb4d5(%rip), %rdi      # 0xe0a9
leaq 0xb49c(%rip), %rsi      # 0xe077
leaq 0xb4a2(%rip), %rcx      # 0xe084
movl $0x63, %edx
callq 0x2100
leaq 0xb479(%rip), %rdi      # 0xe06c
leaq 0xb47d(%rip), %rsi      # 0xe077
leaq 0xb483(%rip), %rcx      # 0xe084
movl $0x62, %edx
callq 0x2100
leaq 0xb4a3(%rip), %rdi      # 0xe0b5
leaq 0xb45e(%rip), %rsi      # 0xe077
leaq 0xb464(%rip), %rcx      # 0xe084
movl $0x65, %edx
callq 0x2100
leaq 0xb492(%rip), %rdi      # 0xe0c3
leaq 0xb43f(%rip), %rsi      # 0xe077
leaq 0xb445(%rip), %rcx      # 0xe084
movl $0x67, %edx
callq 0x2100