// File: /workspace/github_c_makefile_star2_O2/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, %rbp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, (%rsp)
leaq 0xa677(%rip), %rax      # 0x1cdb6
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x11be2(%rip), %r14     # 0x24330
movq (%r14), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x190, 0xc(%rdi)       # imm = 0x190
leaq 0x9be1(%rip), %rbx      # 0x1c34a
movq %rbx, 0x10(%rdi)
leaq 0x11a34(%rip), %rcx     # 0x241a8
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1b079
movl %r13d, %eax
notl %eax
testb $0x3, %al
jne 0x12aa9
leaq 0x1219b(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x12870
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x127d8
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x192, 0xc(%rax)       # imm = 0x192
movq %r13, %rsi
shrq $0x2, %rsi
leaq 0xa636(%rip), %rdi      # 0x1ce07
xorl %eax, %eax
callq 0x1b0f0
leaq 0x12151(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x12870
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x12826
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x193, 0xc(%rax)       # imm = 0x193
movq %r12, %rdi
callq 0x13708
leaq 0xa53c(%rip), %rdi      # 0x1cd58
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
leaq 0x12103(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x12870
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x12870
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x194, 0xc(%rax)       # imm = 0x194
movq %rbp, %rdi
callq 0x13708
leaq 0xa534(%rip), %rdi      # 0x1cd9a
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
movl %r12d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x12ac8
movq (%rsp), %rax
movq 0x50(%rax), %rdi
movq 0x58(%rax), %rsi
shrq $0x2, %r13
movslq %r13d, %rdx
callq 0x11cba
movq %rax, %r15
leaq 0xac94(%rip), %rdi      # 0x1d535
callq 0x1691f
pushq $0x3
popq %rbx
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x19787
shrq $0x2, %rax
movslq %eax, %r13
leaq 0xa409(%rip), %rdi      # 0x1ccce
callq 0x1691f
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x19787
shrq $0x2, %rax
cltq
movq %rax, 0x8(%rsp)
leaq 0x12046(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x1292e
movq (%r14), %rax
movq 0x50(%rax), %rax
leaq 0x9a4d(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x1292e
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x199, 0xc(%rax)       # imm = 0x199
leaq 0xa3a3(%rip), %rdi      # 0x1ccc2
movq %r13, %rsi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x1b0f0
movq %r12, %rdi
movq %rbp, %rsi
callq 0x1267e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1267e
movq %rax, 0x18(%rsp)
movq (%rsp), %rax
leaq 0x60(%rax), %rbx
leaq 0x11948(%rip), %r12     # 0x242a0
pushq $0x3
popq %r14
movq %rbx, 0x10(%rsp)
movq (%rbx), %rax
cmpq %r12, %rax
je 0x129ca
movq (%rax), %rax
movq (%rax), %rbp
leaq 0xabbf(%rip), %rdi      # 0x1d535
callq 0x1691f
movq %rbp, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x19787
shrq $0x2, %rax
movslq %eax, %r15
leaq 0xa337(%rip), %rdi      # 0x1ccce
callq 0x1691f
movq %rbp, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x19787
cmpq %r13, %r15
jg 0x129be
jl 0x129c7
shrq $0x2, %rax
cltq
cmpq 0x8(%rsp), %rax
jl 0x129c7
movq (%rbx), %rbx
addq $0x8, %rbx
jmp 0x12961
movq (%rbx), %r12
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x1267e
movq %rax, (%rbx)
movq (%rsp), %rax
incl 0x68(%rax)
leaq 0x11f48(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
leaq 0x1193e(%rip), %rbx     # 0x24330
je 0x12a89
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x9944(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x12a36
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x19d, 0xc(%rax)       # imm = 0x19D
movq (%rsp), %rax
movl 0x68(%rax), %esi
leaq 0xa5f6(%rip), %rdi      # 0x1d025
xorl %eax, %eax
callq 0x1b0f0
leaq 0x11ef3(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x12a89
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x98fa(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x12a89
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x19e, 0xc(%rax)       # imm = 0x19E
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x13708
leaq 0xa391(%rip), %rdi      # 0x1ce10
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
leaq 0x20(%rsp), %rdi
movl $0x1a3, 0xc(%rdi)       # imm = 0x1A3
callq 0x1b1f2
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa311(%rip), %rdi      # 0x1cdc1
leaq 0xa121(%rip), %rsi      # 0x1cbd8
leaq 0xa312(%rip), %rcx      # 0x1cdd0
movl $0x191, %edx            # imm = 0x191
callq 0x2100
leaq 0xa293(%rip), %rdi      # 0x1cd62
leaq 0xa102(%rip), %rsi      # 0x1cbd8
leaq 0xa2f3(%rip), %rcx      # 0x1cdd0
movl $0x195, %edx            # imm = 0x195
callq 0x2100