// File: /workspace/github_c_makefile_star2_O3/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, %r12
movq %rdx, (%rsp)
movq %rsi, %r13
movq %rdi, %rbp
leaq 0xa16e(%rip), %rax      # 0x1cdb6
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x106d9(%rip), %rbx     # 0x23330
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x190, 0xc(%rdi)       # imm = 0x190
leaq 0x96d8(%rip), %r14      # 0x1c34a
movq %r14, 0x10(%rdi)
leaq 0x1052b(%rip), %rcx     # 0x231a8
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1ba26
movl %r13d, %eax
notl %eax
testb $0x3, %al
jne 0x12fd1
leaq 0x10c92(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x12d7a
movq (%rbx), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0x1b188
testl %eax, %eax
je 0x12ce1
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x192, 0xc(%rax)       # imm = 0x192
movq %r13, %rsi
shrq $0x2, %rsi
leaq 0xa12d(%rip), %rdi      # 0x1ce07
xorl %eax, %eax
callq 0x1ba97
leaq 0x10c48(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x12d7a
movq (%rbx), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0x1b188
testl %eax, %eax
je 0x12d30
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x193, 0xc(%rax)       # imm = 0x193
movq (%rsp), %rdi
callq 0x13c40
leaq 0xa032(%rip), %rdi      # 0x1cd58
movq %rax, %rsi
xorl %eax, %eax
callq 0x1ba97
leaq 0x10bf9(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x12d7a
movq (%rbx), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0x1b188
testl %eax, %eax
je 0x12d7a
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x194, 0xc(%rax)       # imm = 0x194
movq %r12, %rdi
callq 0x13c40
leaq 0xa02a(%rip), %rdi      # 0x1cd9a
movq %rax, %rsi
xorl %eax, %eax
callq 0x1ba97
movq (%rsp), %rax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x12ff0
movq 0x50(%rbp), %rdi
movq 0x58(%rbp), %rsi
shrq $0x2, %r13
movslq %r13d, %rdx
callq 0x1217c
movq %rax, %r15
leaq 0xa7ad(%rip), %rdi      # 0x1d555
callq 0x170ff
movl $0x3, %edx
movq %r15, %rdi
movq %rax, %rsi
callq 0x1a146
shrq $0x2, %rax
movslq %eax, %r13
leaq 0x9f03(%rip), %rdi      # 0x1ccce
callq 0x170ff
movl $0x3, %edx
movq %r15, %rdi
movq %rax, %rsi
callq 0x1a146
shrq $0x2, %rax
cltq
movq %rax, 0x18(%rsp)
leaq 0x10b3e(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x12e32
movq (%rbx), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0x1b188
testl %eax, %eax
je 0x12e32
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x199, 0xc(%rax)       # imm = 0x199
leaq 0x9e9f(%rip), %rdi      # 0x1ccc2
movq %r13, %rsi
movq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x1ba97
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x12b85
movq %r15, %rdi
movq %rax, %rsi
callq 0x12b85
movq %rax, %rdi
leaq 0x60(%rbp), %rcx
movq %rbp, (%rsp)
movq 0x60(%rbp), %rax
leaq 0x10441(%rip), %r12     # 0x232a0
movq %rcx, 0x10(%rsp)
movq %rcx, %rbp
cmpq %r12, %rax
je 0x12f07
movq %rdi, 0x8(%rsp)
leaq 0x9e52(%rip), %r14      # 0x1ccce
leaq 0x1041d(%rip), %r12     # 0x232a0
movq 0x10(%rsp), %rbp
movq (%rax), %rax
movq (%rax), %r15
leaq 0xa6c0(%rip), %rdi      # 0x1d555
callq 0x170ff
movl $0x3, %edx
movq %r15, %rdi
movq %rax, %rsi
callq 0x1a146
shrq $0x2, %rax
movslq %eax, %rbx
movq %r14, %rdi
callq 0x170ff
movl $0x3, %edx
movq %r15, %rdi
movq %rax, %rsi
callq 0x1a146
cmpq %r13, %rbx
jg 0x12edd
jl 0x12ef0
shrq $0x2, %rax
cltq
cmpq 0x18(%rsp), %rax
jl 0x12ef0
movq (%rbp), %rbp
movq 0x8(%rbp), %rax
addq $0x8, %rbp
cmpq %r12, %rax
jne 0x12e88
jmp 0x12ef4
movq (%rbp), %r12
leaq 0x10435(%rip), %rbx     # 0x23330
leaq 0x9448(%rip), %r14      # 0x1c34a
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x12b85
movq %rax, (%rbp)
movq (%rsp), %r15
incl 0x68(%r15)
leaq 0x10a0e(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x12fb1
movq (%rbx), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0x1b188
testl %eax, %eax
je 0x12f62
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x19d, 0xc(%rax)       # imm = 0x19D
movl 0x68(%r15), %esi
leaq 0xa0ca(%rip), %rdi      # 0x1d025
xorl %eax, %eax
callq 0x1ba97
leaq 0x109c7(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x12fb1
movq (%rbx), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0x1b188
testl %eax, %eax
je 0x12fb1
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x19e, 0xc(%rax)       # imm = 0x19E
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x13c40
leaq 0x9e69(%rip), %rdi      # 0x1ce10
movq %rax, %rsi
xorl %eax, %eax
callq 0x1ba97
leaq 0x20(%rsp), %rdi
movl $0x1a3, 0xc(%rdi)       # imm = 0x1A3
callq 0x1bbab
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9de9(%rip), %rdi      # 0x1cdc1
leaq 0x9bf9(%rip), %rsi      # 0x1cbd8
leaq 0x9dea(%rip), %rcx      # 0x1cdd0
movl $0x191, %edx            # imm = 0x191
callq 0x2100
leaq 0x9d6b(%rip), %rdi      # 0x1cd62
leaq 0x9bda(%rip), %rsi      # 0x1cbd8
leaq 0x9dcb(%rip), %rcx      # 0x1cdd0
movl $0x195, %edx            # imm = 0x195
callq 0x2100