// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xfa43(%rip), %rax      # 0x12056
movq %rax, -0x50(%rbp)
leaq 0x14cda(%rip), %rax     # 0x172f8
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x48(%rbp)
movl $0x60, -0x44(%rbp)
leaq 0x118f7(%rip), %rax     # 0x13f30
movq %rax, -0x40(%rbp)
leaq 0x14adc(%rip), %rax     # 0x17120
movq %rax, -0x38(%rbp)
leaq 0x14ca9(%rip), %rax     # 0x172f8
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x30(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x10e70
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xdd60
movq %rax, %rdi
callq 0x2fe0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
andq $0x3, %rax
cmpq $0x3, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x269a
jmp 0x26b9
leaq 0xf9cb(%rip), %rdi      # 0x1206c
leaq 0xf9cf(%rip), %rsi      # 0x12077
movl $0x62, %edx
leaq 0xf9d0(%rip), %rcx      # 0x12084
callq 0x20f0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xdef0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x59(%rbp)
je 0x26ef
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xdef0
andq $0x3, %rax
cmpq $0x0, %rax
sete %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2701
jmp 0x2720
leaq 0xf9a1(%rip), %rdi      # 0x120a9
leaq 0xf968(%rip), %rsi      # 0x12077
movl $0x63, %edx
leaq 0xf969(%rip), %rcx      # 0x12084
callq 0x20f0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xdef0
movq %rax, %rdi
callq 0xdd60
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3, %rax
cmpq $0x1, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2757
jmp 0x2776
leaq 0xf957(%rip), %rdi      # 0x120b5
leaq 0xf912(%rip), %rsi      # 0x12077
movl $0x65, %edx
leaq 0xf913(%rip), %rcx      # 0x12084
callq 0x20f0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xdef0
movq %rax, %rdi
callq 0xdef0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
andq $0x3, %rax
cmpq $0x3, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x27ad
jmp 0x27cc
leaq 0xf90f(%rip), %rdi      # 0x120c3
leaq 0xf8bc(%rip), %rsi      # 0x12077
movl $0x67, %edx
leaq 0xf8bd(%rip), %rcx      # 0x12084
callq 0x20f0
movq -0x10(%rbp), %rax
sarq $0x2, %rax
movl %eax, -0x24(%rbp)
leaq 0x150c2(%rip), %rax     # 0x178a0
cmpl $0x0, (%rax)
je 0x283d
leaq 0x14b0e(%rip), %rax     # 0x172f8
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x11738(%rip), %rcx     # 0x13f30
movq %rcx, 0x10(%rax)
leaq 0x1172d(%rip), %rdi     # 0x13f30
callq 0x10280
cmpl $0x0, %eax
je 0x283d
leaq 0x14ae4(%rip), %rax     # 0x172f8
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x69, 0xc(%rax)
movl -0x24(%rbp), %esi
movq -0x20(%rbp), %rax
sarq $0x2, %rax
movl %eax, %edx
leaq 0xf898(%rip), %rdi      # 0x120ce
movb $0x0, %al
callq 0x10f20
jmp 0x283f
cmpl $0x0, -0x24(%rbp)
jg 0x288f
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xdd60
movq %rax, %rdi
movq -0x18(%rbp), %rdx
leaq -0x430(%rip), %rsi      # 0x2430
callq 0x34c0
movq -0x8(%rbp), %rdi
movq 0x14ad8(%rip), %rsi     # 0x17348
leaq 0x149f1(%rip), %rdx     # 0x17268
callq 0x41f0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x41f0
jmp 0x2901
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
orq $0x3, %rdx
leaq -0x2ab(%rip), %rsi      # 0x2600
callq 0x40d0
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xdd60
movq %rax, %rdi
movq -0x58(%rbp), %rdx
leaq -0x38f(%rip), %rsi      # 0x2540
callq 0x34c0
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xdef0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq %rax, %rdx
callq 0x41f0
movl $0x75, -0x44(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x11040
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)