// File: /workspace/github_c_makefile_star2_O2/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 $0x78, %rsp
movl %esi, %ebx
movq %rdi, %r15
leaq 0xa31a(%rip), %rax      # 0x1ce1b
leaq 0x50(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x11820(%rip), %rbp     # 0x24330
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x207, 0xc(%rdi)       # imm = 0x207
leaq 0x981e(%rip), %r12      # 0x1c34a
movq %r12, 0x10(%rdi)
leaq 0x11671(%rip), %rcx     # 0x241a8
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1b079
movl %ebx, %eax
sarl $0x1f, %eax
andl %ebx, %eax
movl %eax, 0x14(%rsp)
leaq 0x18(%rsp), %r13
xorl %eax, %eax
testl %ebx, %ebx
jle 0x12fd1
cmpl $0x1, %eax
movl %ebx, 0x4(%rsp)
jg 0x12cc4
movq %r13, %rdi
xorl %esi, %esi
callq 0x20f0
testl %eax, %eax
je 0x12f61
movq 0x60(%r15), %rbx
cmpq 0x11438(%rip), %rbx     # 0x23fc0
je 0x12ccc
movq %rbx, %rdi
callq 0x191fb
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x191fb
movq %rax, %r13
leaq 0xa988(%rip), %rdi      # 0x1d535
callq 0x1691f
movq %r13, %rdi
movq %rax, %rsi
movq %r15, %r14
pushq $0x3
popq %r15
movq %r15, %rdx
callq 0x19787
shrq $0x2, %rax
movq %rbp, %r12
movslq %eax, %rbp
leaq 0xa0f6(%rip), %rdi      # 0x1ccce
callq 0x1691f
movq %r13, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %r15
callq 0x19787
movq 0x50(%r14), %rcx
cmpq %rcx, %rbp
movq %r12, %rbp
jl 0x12c10
jg 0x12ccc
shrq $0x2, %rax
cltq
cmpq 0x58(%r15), %rax
jg 0x12ccc
decl 0x68(%r15)
leaq 0x11d15(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x12c5d
movq (%rbp), %rax
movq 0x50(%rax), %rax
leaq 0xa084(%rip), %rdi      # 0x1ccb3
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x12c5d
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x1ef, 0xc(%rax)       # imm = 0x1EF
movl 0x68(%r15), %esi
leaq 0xa3cf(%rip), %rdi      # 0x1d025
xorl %eax, %eax
callq 0x1b0f0
movq %rbx, %rdi
callq 0x19306
movq %rax, 0x60(%r15)
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x19306
movq %rax, %rdi
callq 0x191fb
movq %rax, %r13
movq %r14, %rdi
callq 0x19306
movq %rax, %rdi
callq 0x19306
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x12494
movq %r14, %rdi
callq 0x19306
movq %rax, %rdi
callq 0x13684
movq %r14, %rdi
callq 0x13684
movq %rbx, %rdi
callq 0x13684
jmp 0x12b7d
decl %eax
movl %eax, 0x8(%rsp)
jmp 0x12ce0
movl $0x100, 0x8(%rsp)       # imm = 0x100
leaq 0x966f(%rip), %r12      # 0x1c34a
leaq 0x18(%rsp), %r13
leaq 0xa3a8(%rip), %rax      # 0x1d08f
movq %rax, 0x18(%rsp)
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x20(%rsp)
movl $0x1b0, 0x24(%rsp)      # imm = 0x1B0
movq %r12, 0x28(%rsp)
leaq 0x11499(%rip), %rcx     # 0x241a8
movq %rcx, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq %r13, %rdi
callq 0x1b079
leaq 0x11c08(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x12d66
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x12d66
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x1b1, 0xc(%rax)       # imm = 0x1B1
movl 0x28(%r15), %esi
leaq 0xa042(%rip), %rdi      # 0x1cda1
xorl %eax, %eax
callq 0x1b0f0
movq %r15, %rdi
callq 0x191fb
movq %rax, %rbx
cmpq 0x11248(%rip), %rax     # 0x23fc0
je 0x12f18
movq %r15, %rdi
callq 0x191fb
movq %rax, %r13
movq %rax, %rdi
callq 0x191fb
movq %rax, %r14
movq %r15, %rdi
callq 0x191fb
movq %rax, %rdi
callq 0x19306
movq %r15, %rdi
movq %rax, %rsi
callq 0x19411
movq %r13, %rdi
callq 0x13684
testq %r14, %r14
je 0x1323b
movl %r14d, %eax
andl $0x3, %eax
jne 0x1323b
movq %r14, %rdi
callq 0x191fb
movq %rax, %r13
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x1321c
movq %r13, %rdi
callq 0x11724
movq %rax, 0x48(%rsp)
movq %r14, %rdi
callq 0x19306
decl 0x28(%r15)
movq %rax, 0x40(%rsp)
leaq 0x11b28(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x12e9f
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x12e51
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x1c4, 0xc(%rax)       # imm = 0x1C4
movq %r13, %rdi
callq 0x13708
leaq 0x9ecd(%rip), %rdi      # 0x1cd14
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
leaq 0x11ad8(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x12e9f
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x12e9f
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x1c5, 0xc(%rax)       # imm = 0x1C5
movq 0x40(%rsp), %rdi
callq 0x13708
leaq 0x9f05(%rip), %rdi      # 0x1cd9a
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
movq %r14, 0x30(%r15)
movq %r15, %rdi
callq *0x48(%rsp)
leaq 0x113ef(%rip), %rax     # 0x242a0
movq %rax, 0x30(%r15)
movq %r14, %rdi
callq 0x13684
movl 0x3c(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x3c(%r15)
movl $0x1ce, %r14d           # imm = 0x1CE
cmpl $-0x2, %eax
jg 0x12edc
incl 0x38(%r15)
andl $0x0, 0x3c(%r15)
leaq 0x18(%rsp), %r13
movl %r14d, 0x24(%rsp)
movq %r13, %rdi
callq 0x1b1f2
cmpq 0x110cb(%rip), %rbx     # 0x23fc0
je 0x12fd7
movl 0x4(%rsp), %ebx
decl %ebx
movl 0x28(%r15), %eax
cmpl 0x40(%r15), %eax
movl 0x8(%rsp), %eax
jle 0x12b56
jmp 0x12fdd
movl $0x1d1, %r14d           # imm = 0x1D1
leaq 0x11a0b(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x12ee1
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x12ee1
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x1d0, 0xc(%rax)       # imm = 0x1D0
leaq 0xa178(%rip), %rdi      # 0x1d0d0
xorl %eax, %eax
callq 0x1b0f0
jmp 0x12ee1
movq 0x18(%rsp), %rax
subq 0x48(%r15), %rax
movq %rax, 0x50(%r15)
movq 0x20(%rsp), %rax
movq %rax, 0x58(%r15)
leaq 0x119b2(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x12b7d
movq (%rbp), %rax
movq 0x50(%rax), %rax
leaq 0x9d1d(%rip), %rdi      # 0x1ccb3
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x12b7d
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x1e0, 0xc(%rax)       # imm = 0x1E0
movq 0x50(%r15), %rsi
movq 0x58(%r15), %rdx
leaq 0x9cfd(%rip), %rdi      # 0x1ccc2
xorl %eax, %eax
callq 0x1b0f0
jmp 0x12b7d
movl 0x14(%rsp), %ebx
jmp 0x13025
movl 0x4(%rsp), %ebx
jmp 0x13025
leaq 0x1194c(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x131f7
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x1a7f4
pushq $-0x1
popq %rbx
testl %eax, %eax
je 0x13025
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x212, 0xc(%rax)       # imm = 0x212
leaq 0x9e0f(%rip), %rdi      # 0x1ce2d
xorl %eax, %eax
callq 0x1b0f0
leaq 0x11904(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x131fa
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13076
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x217, 0xc(%rax)       # imm = 0x217
movl 0x68(%r15), %esi
movq 0x50(%r15), %rdx
movq 0x58(%r15), %rcx
leaq 0x9ddc(%rip), %rdi      # 0x1ce4b
xorl %eax, %eax
callq 0x1b0f0
leaq 0x118b3(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x131fa
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x130c7
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x218, 0xc(%rax)       # imm = 0x218
movq 0x60(%r15), %rdi
callq 0x13708
leaq 0x9d53(%rip), %rdi      # 0x1ce10
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
leaq 0x11862(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x131fa
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13116
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x219, 0xc(%rax)       # imm = 0x219
movl 0x28(%r15), %esi
movl 0x40(%r15), %edx
leaq 0x9d58(%rip), %rdi      # 0x1ce65
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1b0f0
leaq 0x11813(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x131fa
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13163
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x21a, 0xc(%rax)       # imm = 0x21A
movl 0x38(%r15), %esi
movl 0x3c(%r15), %edx
leaq 0x9d2c(%rip), %rdi      # 0x1ce88
xorl %eax, %eax
callq 0x1b0f0
leaq 0x117c6(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x131fa
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x131ae
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x21b, 0xc(%rax)       # imm = 0x21B
movl 0x11248(%rip), %esi     # 0x243e8
leaq 0x9cfd(%rip), %rdi      # 0x1cea4
xorl %eax, %eax
callq 0x1b0f0
leaq 0x1177b(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x131fa
movq (%rbp), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x131fa
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x21c, 0xc(%rax)       # imm = 0x21C
movl 0x11205(%rip), %esi     # 0x243ec
leaq 0x9cc9(%rip), %rdi      # 0x1ceb7
xorl %eax, %eax
callq 0x1b0f0
jmp 0x131fa
pushq $-0x1
popq %rbx
leaq 0x50(%rsp), %rdi
movl $0x21d, 0xc(%rdi)       # imm = 0x21D
callq 0x1b1f2
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9e9f(%rip), %rdi      # 0x1d0c2
leaq 0x99ae(%rip), %rsi      # 0x1cbd8
leaq 0x9e74(%rip), %rcx      # 0x1d0a5
movl $0x1c0, %edx            # imm = 0x1C0
callq 0x2100
leaq 0x9e56(%rip), %rdi      # 0x1d098
leaq 0x998f(%rip), %rsi      # 0x1cbd8
leaq 0x9e55(%rip), %rcx      # 0x1d0a5
movl $0x1be, %edx            # imm = 0x1BE
callq 0x2100