// File: /workspace/github_c_makefile_star2_O1/dalnefre[P]kernel_abe/actor.c
// Function: abe__send_after
void
abe__send_after(CONFIG* cfg, CONS* delay, CONS* target, CONS* msg)
/*
 * Queue a message for delayed delivery to the target actor.
 */
{
	CONS* t;
	time_t s;
	time_t us;

	DBUG_ENTER("send_after");
	assert(numberp(delay));
	DBUG_PRINT("", ("delay=%d", MK_INT(delay)));
	DBUG_PRINT("", ("target=%s", cons_to_str(target)));
	DBUG_PRINT("", ("msg=%s", cons_to_str(msg)));
	assert(actorp(target));
	t = tv_increment(cfg->t_now_s, cfg->t_now_us, MK_INT(delay));
	s = MK_INT(map_get_def(t, ATOM("s"), NUMBER(0)));
	us = MK_INT(map_get_def(t, ATOM("us"), NUMBER(0)));
	DBUG_PRINT("", ("t = %lus %luus", s, us));
	t = cq_cons(t, cq_cons(target, msg));
	t_queue_insert(&cfg->t_queue, t, s, us);
	++cfg->t_count;
	DBUG_PRINT("", ("t_count=%d", cfg->t_count));
	DBUG_PRINT("", ("t_queue=%s", cons_to_str(cfg->t_queue)));
#if 0	/* HACK: ignore delay */
	DBUG_PRINT("WARNING", ("SEND_AFTER DOES NOT DELAY"));
	abe__send(cfg, target, msg);
#endif
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, (%rsp)
leaq 0xa1f2(%rip), %rax      # 0x1cdb6
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x1075d(%rip), %r14     # 0x23330
movq (%r14), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x190, 0xc(%rdi)       # imm = 0x190
leaq 0x975c(%rip), %rbp      # 0x1c34a
movq %rbp, 0x10(%rdi)
leaq 0x105af(%rip), %rcx     # 0x231a8
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1b912
movl %r13d, %eax
notl %eax
testb $0x3, %al
jne 0x12f21
leaq 0x10d16(%rip), %rbx     # 0x23930
cmpl $0x0, (%rbx)
je 0x12c59
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %rbp, 0x10(%rax)
movq %rbp, %rdi
callq 0x1b084
testl %eax, %eax
je 0x12c59
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x192, 0xc(%rax)       # imm = 0x192
movq %r13, %rsi
shrq $0x2, %rsi
leaq 0xa1b5(%rip), %rdi      # 0x1ce07
xorl %eax, %eax
callq 0x1b983
cmpl $0x0, (%rbx)
je 0x12c9c
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %rbp, 0x10(%rax)
movq %rbp, %rdi
callq 0x1b084
testl %eax, %eax
je 0x12c9c
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x193, 0xc(%rax)       # imm = 0x193
movq %r12, %rdi
callq 0x13b9c
leaq 0xa0c6(%rip), %rdi      # 0x1cd58
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b983
cmpl $0x0, (%rbx)
je 0x12cdf
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %rbp, 0x10(%rax)
movq %rbp, %rdi
callq 0x1b084
testl %eax, %eax
je 0x12cdf
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x194, 0xc(%rax)       # imm = 0x194
movq %r15, %rdi
callq 0x13b9c
leaq 0xa0c5(%rip), %rdi      # 0x1cd9a
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b983
movl %r12d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x12f40
movq (%rsp), %rax
movq 0x50(%rax), %rdi
movq 0x58(%rax), %rsi
shrq $0x2, %r13
movslq %r13d, %rdx
callq 0x120e0
movq %rax, %rbx
leaq 0xa845(%rip), %rdi      # 0x1d555
callq 0x1707c
movl $0x3, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1a07a
shrq $0x2, %rax
movslq %eax, %r13
leaq 0x9f9b(%rip), %rdi      # 0x1ccce
callq 0x1707c
movl $0x3, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1a07a
shrq $0x2, %rax
cltq
movq %rax, 0x8(%rsp)
leaq 0x10bd6(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x12d9a
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %rbp, 0x10(%rax)
movq %rbp, %rdi
callq 0x1b084
testl %eax, %eax
je 0x12d9a
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x199, 0xc(%rax)       # imm = 0x199
leaq 0x9f37(%rip), %rdi      # 0x1ccc2
movq %r13, %rsi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x1b983
movq %r12, %rdi
movq %r15, %rsi
callq 0x12b01
movq %rbx, %rdi
movq %rax, %rsi
callq 0x12b01
movq %rax, 0x18(%rsp)
movq (%rsp), %rax
leaq 0x60(%rax), %r15
leaq 0x104dc(%rip), %rbp     # 0x232a0
leaq 0x9f03(%rip), %rbx      # 0x1ccce
movq %r15, 0x10(%rsp)
movq (%r15), %rax
cmpq %rbp, %rax
je 0x12e47
movq (%rax), %rax
movq (%rax), %r14
leaq 0xa770(%rip), %rdi      # 0x1d555
callq 0x1707c
movl $0x3, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1a07a
shrq $0x2, %rax
movslq %eax, %r12
movq %rbx, %rdi
callq 0x1707c
movl $0x3, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1a07a
cmpq %r13, %r12
jle 0x12e22
xorl %eax, %eax
jmp 0x12e38
shrq $0x2, %rax
cltq
cmpq %r13, %r12
setl %cl
cmpq 0x8(%rsp), %rax
setl %al
orb %cl, %al
testb %al, %al
jne 0x12e43
movq (%r15), %r15
addq $0x8, %r15
testb %al, %al
je 0x12dd0
movq (%r15), %rsi
movq 0x18(%rsp), %rdi
callq 0x12b01
movq %rax, (%r15)
movq (%rsp), %rax
incl 0x68(%rax)
leaq 0x10acb(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
leaq 0x104c1(%rip), %rbx     # 0x23330
leaq 0x94d4(%rip), %r14      # 0x1c34a
je 0x12eb2
movq (%rbx), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0x1b084
testl %eax, %eax
je 0x12eb2
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x19d, 0xc(%rax)       # imm = 0x19D
movq (%rsp), %rax
movl 0x68(%rax), %esi
leaq 0xa17a(%rip), %rdi      # 0x1d025
xorl %eax, %eax
callq 0x1b983
leaq 0x10a77(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x12f01
movq (%rbx), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0x1b084
testl %eax, %eax
je 0x12f01
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x19e, 0xc(%rax)       # imm = 0x19E
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x13b9c
leaq 0x9f19(%rip), %rdi      # 0x1ce10
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b983
leaq 0x20(%rsp), %rdi
movl $0x1a3, 0xc(%rdi)       # imm = 0x1A3
callq 0x1ba97
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9e99(%rip), %rdi      # 0x1cdc1
leaq 0x9ca9(%rip), %rsi      # 0x1cbd8
leaq 0x9e9a(%rip), %rcx      # 0x1cdd0
movl $0x191, %edx            # imm = 0x191
callq 0x2100
leaq 0x9e1b(%rip), %rdi      # 0x1cd62
leaq 0x9c8a(%rip), %rsi      # 0x1cbd8
leaq 0x9e7b(%rip), %rcx      # 0x1cdd0
movl $0x195, %edx            # imm = 0x195
callq 0x2100