// File: /workspace/github_c_makefile_star2_O0/dalnefre[P]kernel_abe/schemer.c
// Function: apply_sleep_beh
BEH_DECL(apply_sleep_beh)
{
	CONS* args = WHAT;
	CONS* to = pr_head(MINE);
	CONS* env = pr_tail(MINE);
	CONS* msg;
	CONS* a;

	DBUG_ENTER("apply_sleep_beh");
	DBUG_PRINT("", ("args = %s", cons_to_str(args)));
	if (have_n_args(1, args) && is_number(lst_first(args))) {
		int n = MK_INT(lst_first(args));
		
		n *= 1000;		/* convert ms to us */
		DBUG_PRINT("", ("sleep %dus", n));
		a = ACTOR(eval_time_beh, NIL);
		msg = mk_pair(NIL, env);
		msg = mk_pair(to, msg);
		SEND_AFTER(NUMBER(n), a, msg);
	} else {
		DBUG_PRINT("", ("error"));
		FAIL(env, mk_list(ATOM("sleep"), args));
	}
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x1c340
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x1c1b0
movq %rax, %rdi
callq 0x11430
movq %rax, %rdi
callq 0x1c1b0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x1c1b0
movq %rax, %rdi
callq 0x11430
movq %rax, %rdi
callq 0x1c340
movq %rax, -0x20(%rbp)
leaq 0x12632(%rip), %rax     # 0x204eb
movq %rax, -0x58(%rbp)
leaq 0x1844c(%rip), %rax     # 0x26310
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x50(%rbp)
movl $0x8a7, -0x4c(%rbp)     # imm = 0x8A7
leaq 0x14cad(%rip), %rax     # 0x22b8c
movq %rax, -0x48(%rbp)
leaq 0x18246(%rip), %rax     # 0x26130
movq %rax, -0x40(%rbp)
leaq 0x1841b(%rip), %rax     # 0x26310
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x1f2c0
leaq 0x189d0(%rip), %rax     # 0x268e0
cmpl $0x0, (%rax)
je 0xdf6e
leaq 0x183f4(%rip), %rax     # 0x26310
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x14c62(%rip), %rcx     # 0x22b8c
movq %rcx, 0x10(%rax)
leaq 0x14c57(%rip), %rdi     # 0x22b8c
callq 0x1e6d0
cmpl $0x0, %eax
je 0xdf6e
leaq 0x183ca(%rip), %rax     # 0x26310
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x8a8, 0xc(%rax)       # imm = 0x8A8
movq -0x10(%rbp), %rdi
callq 0x14080
movq %rax, %rsi
leaq 0x121b7(%rip), %rdi     # 0x2011e
movb $0x0, %al
callq 0x1f370
jmp 0xdf70
movq -0x10(%rbp), %rsi
movl $0x1, %edi
callq 0x5ec0
cmpq $0x0, %rax
je 0xe087
movq -0x10(%rbp), %rdi
callq 0x1c1b0
andq $0x3, %rax
cmpq $0x3, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xe087
movq -0x10(%rbp), %rdi
callq 0x1c1b0
sarq $0x2, %rax
movl %eax, -0x5c(%rbp)
imull $0x3e8, -0x5c(%rbp), %eax # imm = 0x3E8
movl %eax, -0x5c(%rbp)
leaq 0x18912(%rip), %rax     # 0x268e0
cmpl $0x0, (%rax)
je 0xe023
leaq 0x18336(%rip), %rax     # 0x26310
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x14ba4(%rip), %rcx     # 0x22b8c
movq %rcx, 0x10(%rax)
leaq 0x14b99(%rip), %rdi     # 0x22b8c
callq 0x1e6d0
cmpl $0x0, %eax
je 0xe023
leaq 0x1830c(%rip), %rax     # 0x26310
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x8ad, 0xc(%rax)       # imm = 0x8AD
movl -0x5c(%rbp), %esi
leaq 0x124df(%rip), %rdi     # 0x204fb
movb $0x0, %al
callq 0x1f370
jmp 0xe025
movq -0x8(%rbp), %rdi
leaq -0x7d90(%rip), %rsi     # 0x62a0
leaq 0x18249(%rip), %rdx     # 0x26280
callq 0x12520
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rsi
leaq 0x18235(%rip), %rdi     # 0x26280
callq 0x1c0c0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1c0c0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x5c(%rbp), %rsi
shlq $0x2, %rsi
orq $0x3, %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x129f0
jmp 0xe189
jmp 0xe089
leaq 0x18850(%rip), %rax     # 0x268e0
cmpl $0x0, (%rax)
je 0xe0e2
leaq 0x18274(%rip), %rax     # 0x26310
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x14ae2(%rip), %rcx     # 0x22b8c
movq %rcx, 0x10(%rax)
leaq 0x14ad7(%rip), %rdi     # 0x22b8c
callq 0x1e6d0
cmpl $0x0, %eax
je 0xe0e2
leaq 0x1824a(%rip), %rax     # 0x26310
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x8b3, 0xc(%rax)       # imm = 0x8B3
leaq 0x12152(%rip), %rdi     # 0x2022d
movb $0x0, %al
callq 0x1f370
jmp 0xe0e4
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq 0x12400(%rip), %rdi     # 0x20506
callq 0x18510
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x1c0c0
movq -0x88(%rbp), %rdi
movq %rax, %rdx
leaq -0xb998(%rip), %rsi     # 0x2790
callq 0x12520
movq %rax, -0x78(%rbp)
leaq 0x11f52(%rip), %rdi     # 0x2008a
callq 0x18510
movq %rax, -0x80(%rbp)
callq 0x11360
movq %rax, %rdi
leaq 0x18130(%rip), %rsi     # 0x26280
callq 0x1c0c0
movq -0x80(%rbp), %rdi
movq %rax, %rsi
callq 0x1c0c0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x1c0c0
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x1c0c0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq %rax, %rdx
callq 0x12640
movl $0x8b6, -0x4c(%rbp)     # imm = 0x8B6
leaq -0x58(%rbp), %rdi
callq 0x1f490
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)