// File: /workspace/github_c_makefile_star2_O1/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, %ebp
movq %rdi, %r15
leaq 0x9ea2(%rip), %rax      # 0x1ce1b
leaq 0x40(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x103a8(%rip), %r13     # 0x23330
movq (%r13), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x207, 0xc(%rdi)       # imm = 0x207
leaq 0x93a6(%rip), %rcx      # 0x1c34a
movq %rcx, 0x10(%rdi)
leaq 0x101f9(%rip), %rcx     # 0x231a8
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1b912
movl %ebp, %eax
sarl $0x1f, %eax
andl %ebp, %eax
movl %eax, 0xc(%rsp)
leaq 0x10(%rsp), %r12
xorl %eax, %eax
testl %ebp, %ebp
jle 0x1346f
cmpl $0x1, %eax
jg 0x1315a
movq %r12, %rdi
xorl %esi, %esi
callq 0x20f0
testl %eax, %eax
je 0x133ff
movq 0x60(%r15), %r14
cmpq 0xffc4(%rip), %r14      # 0x22fc0
je 0x13144
movq %r14, %rdi
callq 0x19ba6
movq %rax, %rbx
movq %rax, %rdi
callq 0x19ba6
movq %rax, %r12
leaq 0xa536(%rip), %rdi      # 0x1d555
callq 0x1707c
movl $0x3, %edx
movq %r12, %rdi
movq %rax, %rsi
callq 0x1a07a
shrq $0x2, %rax
movslq %eax, %r13
leaq 0x9c8c(%rip), %rdi      # 0x1ccce
callq 0x1707c
movl $0x3, %edx
movq %r12, %rdi
movq %rax, %rsi
callq 0x1a07a
movq 0x50(%r15), %rcx
cmpq %rcx, %r13
jge 0x13065
xorl %r13d, %r13d
jmp 0x1307c
shrq $0x2, %rax
cltq
cmpq %rcx, %r13
setg %cl
cmpq 0x58(%r15), %rax
setg %r13b
orb %cl, %r13b
testb %r13b, %r13b
jne 0x13144
decl 0x68(%r15)
leaq 0x108a0(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x130de
leaq 0x10294(%rip), %rax     # 0x23330
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x9c09(%rip), %rdi      # 0x1ccb3
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x130de
leaq 0x10272(%rip), %rax     # 0x23330
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x1ef, 0xc(%rax)       # imm = 0x1EF
movl 0x68(%r15), %esi
leaq 0x9f4e(%rip), %rdi      # 0x1d025
xorl %eax, %eax
callq 0x1b983
movq %r14, %rdi
callq 0x19c45
movq %rax, 0x60(%r15)
movq %rbx, %rdi
callq 0x19c45
movq %rax, %rdi
callq 0x19ba6
movq %rax, %r12
movq %rbx, %rdi
callq 0x19c45
movq %rax, %rdi
callq 0x19c45
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x12917
movq %rbx, %rdi
callq 0x19c45
movq %rax, %rdi
callq 0x13b19
movq %rbx, %rdi
callq 0x13b19
movq %r14, %rdi
callq 0x13b19
testb %r13b, %r13b
je 0x12ff1
movl $0x100, 0x8(%rsp)       # imm = 0x100
leaq 0x101dd(%rip), %r13     # 0x23330
leaq 0x10(%rsp), %r12
jmp 0x13160
decl %eax
movl %eax, 0x8(%rsp)
leaq 0x9f28(%rip), %rax      # 0x1d08f
movq %rax, 0x10(%rsp)
movq (%r13), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x18(%rsp)
movl $0x1b0, 0x1c(%rsp)      # imm = 0x1B0
leaq 0x91c0(%rip), %rcx      # 0x1c34a
movq %rcx, 0x20(%rsp)
leaq 0x10012(%rip), %rcx     # 0x231a8
movq %rcx, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movq %r12, %rdi
callq 0x1b912
leaq 0x10781(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x131f1
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x9187(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x131f1
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x1b1, 0xc(%rax)       # imm = 0x1B1
movl 0x28(%r15), %esi
leaq 0x9bb7(%rip), %rdi      # 0x1cda1
xorl %eax, %eax
callq 0x1b983
movq %r15, %rdi
callq 0x19ba6
movq %rax, %r14
cmpq 0xfdbd(%rip), %rax      # 0x22fc0
je 0x133b3
movq %r15, %rdi
callq 0x19ba6
movq %rax, %r12
movq %rax, %rdi
callq 0x19ba6
movq %rax, %rbx
movq %r15, %rdi
callq 0x19ba6
movq %rax, %rdi
callq 0x19c45
movq %r15, %rdi
movq %rax, %rsi
callq 0x19ce4
movq %r12, %rdi
callq 0x13b19
testq %rbx, %rbx
je 0x136d4
movl %ebx, %eax
andl $0x3, %eax
jne 0x136d4
movq %rbx, %rdi
callq 0x19ba6
movq %rax, %r13
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x136b5
movq %r13, %rdi
callq 0x11cd8
movq %rax, %r12
movq %rbx, %rdi
callq 0x19c45
decl 0x28(%r15)
movq %rax, 0x38(%rsp)
leaq 0x106a0(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x132e5
leaq 0x10094(%rip), %rax     # 0x23330
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x90a0(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x132e5
leaq 0x10072(%rip), %rax     # 0x23330
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x1c4, 0xc(%rax)       # imm = 0x1C4
movq %r13, %rdi
callq 0x13b9c
leaq 0x9a39(%rip), %rdi      # 0x1cd14
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b983
leaq 0x10644(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
leaq 0x1003a(%rip), %r13     # 0x23330
je 0x1333e
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x9043(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x1333e
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x1c5, 0xc(%rax)       # imm = 0x1C5
movq 0x38(%rsp), %rdi
callq 0x13b9c
leaq 0x9a66(%rip), %rdi      # 0x1cd9a
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b983
movq %rbx, 0x30(%r15)
movq %r15, %rdi
callq *%r12
leaq 0xff51(%rip), %rax      # 0x232a0
movq %rax, 0x30(%r15)
movq %rbx, %rdi
callq 0x13b19
movl 0x3c(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x3c(%r15)
movl $0x1ce, %ebx            # imm = 0x1CE
cmpl $-0x2, %eax
jg 0x1337c
incl 0x38(%r15)
movl $0x0, 0x3c(%r15)
leaq 0x10(%rsp), %r12
movl %ebx, 0x1c(%rsp)
movq %r12, %rdi
callq 0x1ba97
cmpq 0xfc2c(%rip), %r14      # 0x22fc0
je 0x134bf
decl %ebp
movl 0x28(%r15), %eax
cmpl 0x40(%r15), %eax
movl 0x8(%rsp), %eax
jle 0x12fce
jmp 0x13475
movl $0x1d1, %ebx            # imm = 0x1D1
leaq 0x10571(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13381
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x8f77(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x13381
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x1d0, 0xc(%rax)       # imm = 0x1D0
leaq 0x9cda(%rip), %rdi      # 0x1d0d0
xorl %eax, %eax
callq 0x1b983
jmp 0x13381
movq 0x10(%rsp), %rax
subq 0x48(%r15), %rax
movq %rax, 0x50(%r15)
movq 0x18(%rsp), %rax
movq %rax, 0x58(%r15)
leaq 0x10514(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x12ff1
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x987f(%rip), %rdi      # 0x1ccb3
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x12ff1
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x1e0, 0xc(%rax)       # imm = 0x1E0
movq 0x50(%r15), %rsi
movq 0x58(%r15), %rdx
leaq 0x985f(%rip), %rdi      # 0x1ccc2
xorl %eax, %eax
callq 0x1b983
jmp 0x12ff1
movl 0xc(%rsp), %ebp
jmp 0x134bf
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x104af(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x134bf
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x8eb5(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x134bf
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x212, 0xc(%rax)       # imm = 0x212
leaq 0x9975(%rip), %rdi      # 0x1ce2d
xorl %eax, %eax
callq 0x1b983
leaq 0x1046a(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13510
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x8e70(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x13510
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x217, 0xc(%rax)       # imm = 0x217
movl 0x68(%r15), %esi
movq 0x50(%r15), %rdx
movq 0x58(%r15), %rcx
leaq 0x9942(%rip), %rdi      # 0x1ce4b
xorl %eax, %eax
callq 0x1b983
leaq 0x10419(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13561
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x8e1f(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x13561
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x218, 0xc(%rax)       # imm = 0x218
movq 0x60(%r15), %rdi
callq 0x13b9c
leaq 0x98b9(%rip), %rdi      # 0x1ce10
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b983
leaq 0x103c8(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x135b0
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x8dce(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x135b0
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x219, 0xc(%rax)       # imm = 0x219
movl 0x28(%r15), %esi
movl 0x40(%r15), %edx
leaq 0x98be(%rip), %rdi      # 0x1ce65
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1b983
leaq 0x10379(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x135fd
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x8d7f(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x135fd
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x21a, 0xc(%rax)       # imm = 0x21A
movl 0x38(%r15), %esi
movl 0x3c(%r15), %edx
leaq 0x9892(%rip), %rdi      # 0x1ce88
xorl %eax, %eax
callq 0x1b983
leaq 0x1032c(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13648
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x8d32(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x13648
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x21b, 0xc(%rax)       # imm = 0x21B
movl 0xfdae(%rip), %esi      # 0x233e8
leaq 0x9863(%rip), %rdi      # 0x1cea4
xorl %eax, %eax
callq 0x1b983
leaq 0x102e1(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x13693
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x8ce7(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x13693
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x21c, 0xc(%rax)       # imm = 0x21C
movl 0xfd67(%rip), %esi      # 0x233ec
leaq 0x982b(%rip), %rdi      # 0x1ceb7
xorl %eax, %eax
callq 0x1b983
leaq 0x40(%rsp), %rdi
movl $0x21d, 0xc(%rdi)       # imm = 0x21D
callq 0x1ba97
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9a06(%rip), %rdi      # 0x1d0c2
leaq 0x9515(%rip), %rsi      # 0x1cbd8
leaq 0x99db(%rip), %rcx      # 0x1d0a5
movl $0x1c0, %edx            # imm = 0x1C0
callq 0x2100
leaq 0x99bd(%rip), %rdi      # 0x1d098
leaq 0x94f6(%rip), %rsi      # 0x1cbd8
leaq 0x99bc(%rip), %rcx      # 0x1d0a5
movl $0x1be, %edx            # imm = 0x1BE
callq 0x2100