// File: /workspace/github_c_makefile_star2_O0/dalnefre[P]kernel_abe/sample.c
// Function: each_second
BEH_DECL(each_second)
{
	CONS* count = map_get(MINE, ATOM("count"));
	CONS* tick = map_get(WHAT, ATOM("time"));
	CONS* ticker = map_get(WHAT, ATOM("from"));

	DBUG_ENTER("each_second");
	DBUG_PRINT("", ("count=%d tick=%d", MK_INT(count), MK_INT(tick)));
	SEND(ACTOR(print_line, NIL), map_put(NIL, ATOM("text"), tick));
	if (numberp(count)) {
		int n = MK_INT(count);
		if (n <= 0) {
			if (consp(ticker) && funcp(car(ticker)) && consp(cdr(ticker))) {
				SEND(ticker, map_put(NIL, ATOM("op"), ATOM("stop")));
			}
			BECOME(sink_beh, NIL);
			DBUG_RETURN;
		}
		count = NUMBER(--n);
		BECOME(THIS, map_put(NIL, ATOM("count"), count));
	}
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xecf0
movq %rax, %rdi
callq 0x3f70
movq %rax, -0x68(%rbp)
leaq 0x1087b(%rip), %rdi     # 0x1373a
callq 0xb050
movq -0x68(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf6a0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xee80
movq %rax, -0x60(%rbp)
leaq 0x102bf(%rip), %rdi     # 0x131af
callq 0xb050
movq -0x60(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf6a0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xee80
movq %rax, -0x58(%rbp)
leaq 0x102a9(%rip), %rdi     # 0x131ca
callq 0xb050
movq -0x58(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf6a0
movq %rax, -0x20(%rbp)
leaq 0x1028e(%rip), %rax     # 0x131cf
movq %rax, -0x48(%rbp)
leaq 0x153c4(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movl $0x44, -0x3c(%rbp)
leaq 0x120f9(%rip), %rax     # 0x15060
movq %rax, -0x38(%rbp)
leaq 0x15206(%rip), %rax     # 0x18178
movq %rax, -0x30(%rbp)
leaq 0x15393(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x28(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x11e00
leaq 0x15928(%rip), %rax     # 0x188c0
cmpl $0x0, (%rax)
je 0x2ffe
leaq 0x1536c(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x120ae(%rip), %rcx     # 0x15060
movq %rcx, 0x10(%rax)
leaq 0x120a3(%rip), %rdi     # 0x15060
callq 0x11210
cmpl $0x0, %eax
je 0x2ffe
leaq 0x15342(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x45, 0xc(%rax)
movq -0x10(%rbp), %rax
sarq $0x2, %rax
movl %eax, %esi
movq -0x18(%rbp), %rax
sarq $0x2, %rax
movl %eax, %edx
leaq 0x101e4(%rip), %rdi     # 0x131db
movb $0x0, %al
callq 0x11eb0
jmp 0x3000
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x283(%rip), %rsi      # 0x2d90
leaq 0x15266(%rip), %rdx     # 0x18280
callq 0x5060
movq %rax, -0x70(%rbp)
leaq 0x10190(%rip), %rdi     # 0x131ba
callq 0xb050
movq %rax, %rsi
movq -0x18(%rbp), %rdx
leaq 0x15243(%rip), %rdi     # 0x18280
callq 0xf790
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq %rax, %rdx
callq 0x5180
movq -0x10(%rbp), %rax
andq $0x3, %rax
cmpq $0x3, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3252
movq -0x10(%rbp), %rax
sarq $0x2, %rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jg 0x31d6
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x79(%rbp)
je 0x30a5
movq -0x20(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
sete %al
movb %al, -0x79(%rbp)
movb -0x79(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x319e
movq -0x20(%rbp), %rdi
callq 0xecf0
movq %rax, %rcx
xorl %eax, %eax
movl $0x1, %edx
cmpq %rdx, %rcx
movb %al, -0x7a(%rbp)
je 0x30eb
movq -0x20(%rbp), %rdi
callq 0xecf0
andq $0x3, %rax
cmpq $0x3, %rax
sete %al
movb %al, -0x7a(%rbp)
movb -0x7a(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x319e
movq -0x20(%rbp), %rdi
callq 0xee80
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x7b(%rbp)
je 0x312d
movq -0x20(%rbp), %rdi
callq 0xee80
andq $0x3, %rax
cmpq $0x0, %rax
sete %al
movb %al, -0x7b(%rbp)
movb -0x7b(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x319e
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq 0x10094(%rip), %rdi     # 0x131ee
callq 0xb050
movq %rax, -0x98(%rbp)
leaq 0x1007f(%rip), %rdi     # 0x131ec
callq 0xb050
movq -0x98(%rbp), %rsi
movq %rax, %rdx
leaq 0x150fd(%rip), %rdi     # 0x18280
callq 0xf790
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq %rax, %rdx
callq 0x5180
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xecf0
movq %rax, %rdi
leaq 0xe2b(%rip), %rsi       # 0x3fe0
leaq 0x150c4(%rip), %rdx     # 0x18280
callq 0x4450
movl $0x4e, -0x3c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x11fd0
jmp 0x3262
movl -0x4c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4c(%rbp)
cltq
shlq $0x2, %rax
orq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xecf0
movq %rax, -0xa8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xecf0
movq %rax, %rdi
callq 0x3f00
movq %rax, -0xa0(%rbp)
leaq 0x10516(%rip), %rdi     # 0x1373a
callq 0xb050
movq %rax, %rsi
movq -0x10(%rbp), %rdx
leaq 0x15049(%rip), %rdi     # 0x18280
callq 0xf790
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movq %rax, %rdx
callq 0x4450
movl $0x53, -0x3c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x11fd0
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax,%rax)