// File: /workspace/github_c_makefile_star2_O3/dalnefre[P]kernel_abe/actor.c
// Function: run_configuration
int
run_configuration(CONFIG* cfg, int msg_limit)
/*
 * Dispatch messages until the message queue is empty.
 * No more than <msg_limit> messages will be delivered.
 * Dispatch is aborted if the queue of waiting messages
 * exceeds the configuration limit.
 * 
 * returns: unused message budget or -1 if aborted
 */
{
	int clock_step = 0;

	DBUG_ENTER("run_configuration");
	while (msg_limit > 0) {
		if (--clock_step <= 0) {
			abe__clock_tick(cfg);
			clock_step = CLOCK_STEP_SIZE;
		}
		if (!abe__dispatch(cfg)) {
			break;
		}
		--msg_limit;
		if (cfg->q_count > cfg->q_limit) {
			DBUG_PRINT("", ("message queue limit exceeded!"));
			msg_limit = -1;
			break;
		}
	}
	DBUG_PRINT("", ("t_count=%d now=%lus %luus", cfg->t_count, cfg->t_now_s, cfg->t_now_us));
	DBUG_PRINT("", ("t_queue=%s", cons_to_str(cfg->t_queue)));
	DBUG_PRINT("", ("q_count=%d q_limit=%d msg_limit=%d", cfg->q_count, cfg->q_limit, msg_limit));
	DBUG_PRINT("", ("msg_cnt_hi=%d msg_cnt_lo=%d", cfg->msg_cnt_hi, cfg->msg_cnt_lo));
	DBUG_PRINT("", ("free_config_cnt=%d", free_config_cnt));
	DBUG_PRINT("", ("free_config_max=%d", free_config_max));
	DBUG_RETURN msg_limit;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, %r13d
movq %rdi, %r15
leaq 0x9df1(%rip), %rax      # 0x1ce1b
leaq 0x40(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x102f7(%rip), %rbx     # 0x23330
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x207, 0xc(%rdi)       # imm = 0x207
leaq 0x92f6(%rip), %rcx      # 0x1c34a
movq %rcx, 0x10(%rdi)
leaq 0x10149(%rip), %rcx     # 0x231a8
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1ba26
movl %r13d, %eax
sarl $0x1f, %eax
andl %r13d, %eax
movl %eax, 0x8(%rsp)
xorl %ebp, %ebp
testl %r13d, %r13d
jle 0x134a1
cmpl $0x1, %ebp
jg 0x131da
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x20f0
testl %eax, %eax
je 0x13433
movq 0x60(%r15), %r14
cmpq 0xff14(%rip), %r14      # 0x22fc0
je 0x131de
movq %r14, %rdi
callq 0x19c72
movq %rax, %rbp
movq %rax, %rdi
callq 0x19c72
movq %rax, %r12
leaq 0xa486(%rip), %rdi      # 0x1d555
callq 0x170ff
movl $0x3, %edx
movq %r12, %rdi
movq %rax, %rsi
callq 0x1a146
shrq $0x2, %rax
movslq %eax, %rbx
leaq 0x9bdc(%rip), %rdi      # 0x1ccce
callq 0x170ff
movl $0x3, %edx
movq %r12, %rdi
movq %rax, %rsi
callq 0x1a146
movq 0x50(%r15), %rcx
cmpq %rcx, %rbx
leaq 0x1021b(%rip), %rbx     # 0x23330
jl 0x1312d
jg 0x131de
shrq $0x2, %rax
cltq
cmpq 0x58(%r15), %rax
jg 0x131de
decl 0x68(%r15)
leaq 0x107f8(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13178
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x9b68(%rip), %rdi      # 0x1ccb3
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x13178
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x1ef, 0xc(%rax)       # imm = 0x1EF
movl 0x68(%r15), %esi
leaq 0x9eb4(%rip), %rdi      # 0x1d025
xorl %eax, %eax
callq 0x1ba97
movq %r14, %rdi
callq 0x19d11
movq %rax, 0x60(%r15)
movq %rbp, %rdi
callq 0x19d11
movq %rax, %rdi
callq 0x19c72
movq %rax, %r12
movq %rbp, %rdi
callq 0x19d11
movq %rax, %rdi
callq 0x19d11
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x1299b
movq %rbp, %rdi
callq 0x19d11
movq %rax, %rdi
callq 0x13bbe
movq %rbp, %rdi
callq 0x13bbe
movq %r14, %rdi
callq 0x13bbe
jmp 0x130a1
decl %ebp
jmp 0x131e3
movl $0x100, %ebp            # imm = 0x100
leaq 0x9ea5(%rip), %rax      # 0x1d08f
movq %rax, 0x10(%rsp)
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x18(%rsp)
movl $0x1b0, 0x1c(%rsp)      # imm = 0x1B0
leaq 0x913e(%rip), %rcx      # 0x1c34a
movq %rcx, 0x20(%rsp)
leaq 0xff90(%rip), %rcx      # 0x231a8
movq %rcx, 0x28(%rsp)
movq %rax, 0x30(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x1ba26
leaq 0x106fd(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13273
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x9104(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x13273
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x1b1, 0xc(%rax)       # imm = 0x1B1
movl 0x28(%r15), %esi
leaq 0x9b35(%rip), %rdi      # 0x1cda1
xorl %eax, %eax
callq 0x1ba97
movq %r15, %rdi
callq 0x19c72
cmpq 0xfd3e(%rip), %rax      # 0x22fc0
je 0x134ab
movl %r13d, 0xc(%rsp)
movq %r15, %rdi
callq 0x19c72
movq %rax, %r12
movq %rax, %rdi
callq 0x19c72
movq %rax, %r14
movq %r15, %rdi
callq 0x19c72
movq %rax, %rdi
callq 0x19d11
movq %r15, %rdi
movq %rax, %rsi
callq 0x19db0
movq %r12, %rdi
callq 0x13bbe
testq %r14, %r14
je 0x13775
movl %r14d, %eax
andl $0x3, %eax
jne 0x13775
movq %r14, %rdi
callq 0x19c72
movq %rax, %r13
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x13756
movq %r13, %rdi
callq 0x11d2c
movq %rax, %rbx
movq %r14, %rdi
callq 0x19d11
decl 0x28(%r15)
movq %rax, 0x38(%rsp)
leaq 0x1061b(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x133c7
leaq 0x1000b(%rip), %r12     # 0x23330
movq (%r12), %rax
movq 0x50(%rax), %rax
leaq 0x9016(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x13369
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x1c4, 0xc(%rax)       # imm = 0x1C4
movq %r13, %rdi
callq 0x13c40
leaq 0x99b5(%rip), %rdi      # 0x1cd14
movq %rax, %rsi
xorl %eax, %eax
callq 0x1ba97
leaq 0x105c0(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x133c7
leaq 0xffb4(%rip), %rax      # 0x23330
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x8fc0(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x133c7
leaq 0xff92(%rip), %rax      # 0x23330
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x1c5, 0xc(%rax)       # imm = 0x1C5
movq 0x38(%rsp), %rdi
callq 0x13c40
leaq 0x99dd(%rip), %rdi      # 0x1cd9a
movq %rax, %rsi
xorl %eax, %eax
callq 0x1ba97
movq %r14, 0x30(%r15)
movq %r15, %rdi
callq *%rbx
leaq 0xfec9(%rip), %rax      # 0x232a0
movq %rax, 0x30(%r15)
movq %r14, %rdi
callq 0x13bbe
movl 0x3c(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x3c(%r15)
cmpl $-0x2, %eax
jg 0x133ff
incl 0x38(%r15)
movl $0x0, 0x3c(%r15)
movl $0x1ce, 0x1c(%rsp)      # imm = 0x1CE
leaq 0x10(%rsp), %rdi
callq 0x1bbab
movl 0xc(%rsp), %r13d
decl %r13d
movl 0x28(%r15), %eax
cmpl 0x40(%r15), %eax
leaq 0xff08(%rip), %rbx      # 0x23330
jle 0x1307b
jmp 0x13501
movq 0x10(%rsp), %rax
subq 0x48(%r15), %rax
movq %rax, 0x50(%r15)
movq 0x18(%rsp), %rax
movq %rax, 0x58(%r15)
leaq 0x104e0(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x130a1
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x984c(%rip), %rdi      # 0x1ccb3
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x130a1
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x1e0, 0xc(%rax)       # imm = 0x1E0
movq 0x50(%r15), %rsi
movq 0x58(%r15), %rdx
leaq 0x982d(%rip), %rdi      # 0x1ccc2
xorl %eax, %eax
callq 0x1ba97
jmp 0x130a1
movl 0x8(%rsp), %r13d
jmp 0x1354e
leaq 0x1047e(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x134ee
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x8e85(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x134ee
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x1d0, 0xc(%rax)       # imm = 0x1D0
leaq 0x9be9(%rip), %rdi      # 0x1d0d0
xorl %eax, %eax
callq 0x1ba97
leaq 0x10(%rsp), %rdi
movl $0x1d1, 0xc(%rdi)       # imm = 0x1D1
callq 0x1bbab
jmp 0x1354e
leaq 0x10428(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x1372d
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x8e2b(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x1354e
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x212, 0xc(%rax)       # imm = 0x212
leaq 0x98e6(%rip), %rdi      # 0x1ce2d
xorl %eax, %eax
callq 0x1ba97
leaq 0x103db(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13733
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x8dde(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x135a1
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x217, 0xc(%rax)       # imm = 0x217
movl 0x68(%r15), %esi
movq 0x50(%r15), %rdx
movq 0x58(%r15), %rcx
leaq 0x98b1(%rip), %rdi      # 0x1ce4b
xorl %eax, %eax
callq 0x1ba97
leaq 0x10388(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13733
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x8d8b(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x135f4
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x218, 0xc(%rax)       # imm = 0x218
movq 0x60(%r15), %rdi
callq 0x13c40
leaq 0x9826(%rip), %rdi      # 0x1ce10
movq %rax, %rsi
xorl %eax, %eax
callq 0x1ba97
leaq 0x10335(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13733
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x8d38(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x13646
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x219, 0xc(%rax)       # imm = 0x219
movl 0x28(%r15), %esi
movl 0x40(%r15), %edx
leaq 0x9829(%rip), %rdi      # 0x1ce65
movl %r13d, %ecx
xorl %eax, %eax
callq 0x1ba97
leaq 0x102e3(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13733
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x8ce6(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x13695
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x21a, 0xc(%rax)       # imm = 0x21A
movl 0x38(%r15), %esi
movl 0x3c(%r15), %edx
leaq 0x97fa(%rip), %rdi      # 0x1ce88
xorl %eax, %eax
callq 0x1ba97
leaq 0x10294(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13733
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x8c97(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x136e2
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x21b, 0xc(%rax)       # imm = 0x21B
movl 0xfd14(%rip), %esi      # 0x233e8
leaq 0x97c9(%rip), %rdi      # 0x1cea4
xorl %eax, %eax
callq 0x1ba97
leaq 0x10247(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13733
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0x8c4e(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x13733
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x21c, 0xc(%rax)       # imm = 0x21C
movl 0xfccf(%rip), %esi      # 0x233ec
leaq 0x9793(%rip), %rdi      # 0x1ceb7
xorl %eax, %eax
callq 0x1ba97
jmp 0x13733
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
leaq 0x40(%rsp), %rdi
movl $0x21d, 0xc(%rdi)       # imm = 0x21D
callq 0x1bbab
movl %r13d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9965(%rip), %rdi      # 0x1d0c2
leaq 0x9474(%rip), %rsi      # 0x1cbd8
leaq 0x993a(%rip), %rcx      # 0x1d0a5
movl $0x1c0, %edx            # imm = 0x1C0
callq 0x2100
leaq 0x991c(%rip), %rdi      # 0x1d098
leaq 0x9455(%rip), %rsi      # 0x1cbd8
leaq 0x991b(%rip), %rcx      # 0x1d0a5
movl $0x1be, %edx            # imm = 0x1BE
callq 0x2100