// File: /workspace/github_c_makefile_star2_O0/dalnefre[P]kernel_abe/abe.c
// Function: main
int
main(int argc, char** argv)
{
	int c;
	int	counter = 5;			/* default 5 second counter for ticker */

	DBUG_ENTER("main");
	DBUG_PROCESS(argv[0]);
	while ((c = getopt(argc, argv, "tsn:#:V")) != EOF) {
		switch(c) {
		case 't':	test_mode = TRUE;		break;
		case 's':	init_sample = TRUE;		break;
		case 'n':	counter = atoi(optarg);	break;
		case '#':	DBUG_PUSH(optarg);		break;
		case 'V':	banner();				exit(EXIT_SUCCESS);
		case '?':							usage();
		default:							usage();
		}
	}
	banner();
	if (test_mode) {
		DBUG_PRINT("", ("_nilp()@%p, main()@%p", _nilp, main));
		test_pre();
		test_number();
		test_gc();
		test_cons();
		test_atom();
		test_emit();
	}
	if (init_sample) {
		int limit = 100;
		int	budget = 1000000;
		int n;
		CONFIG* cfg = new_configuration(limit);

		tick_init();
		test_sample(cfg);
		start_ticker(cfg, counter);
		DBUG_PRINT("", ("--begin--"));
		TRACE(printf("sample running with %d queue limit and %d budget\n", limit, budget));
		sample_done = FALSE;
		do {
			n = run_configuration(cfg, budget);
			if (cfg->q_count > 0) {
				TRACE(printf("queue length %d with %d budget remaining\n", cfg->q_count, n));
			}
			if (cfg->t_count > 0) {
				usleep(TICK_FREQ / 10);	/* delayed messages pending... sleep for a while */
			}
		} while ((cfg->q_count < cfg->q_limit) && !sample_done);
		DBUG_PRINT("", ("n=%d q_count=%d q_limit=%d t_count=%d sample_done=%s",
			n, cfg->q_count, cfg->q_limit, cfg->t_count, (sample_done ? "TRUE" : "FALSE")));
		DBUG_PRINT("", ("--end--"));
		report_actor_usage(cfg);
	}
	report_cons_stats();
	DBUG_RETURN (exit(EXIT_SUCCESS), 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x5, -0x18(%rbp)
leaq 0x10a76(%rip), %rax     # 0x130ca
movq %rax, -0x40(%rbp)
leaq 0x15cb1(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x38(%rbp)
movl $0x72, -0x34(%rbp)
leaq 0x129e6(%rip), %rax     # 0x15060
movq %rax, -0x30(%rbp)
leaq 0x15aab(%rip), %rax     # 0x18130
movq %rax, -0x28(%rbp)
leaq 0x15c80(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x20(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x11e00
leaq 0x15c65(%rip), %rax     # 0x18310
movq (%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x26c9
leaq 0x15c54(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x26d7
movq 0x15928(%rip), %rax     # 0x17ff8
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rcx
leaq 0x15c2e(%rip), %rax     # 0x18310
movq (%rax), %rax
movq %rcx, 0x18(%rax)
callq 0x20b0
movl %eax, %ecx
leaq 0x15c19(%rip), %rax     # 0x18310
movq (%rax), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
leaq 0x15c05(%rip), %rax     # 0x18310
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x109af(%rip), %rdx     # 0x130cf
callq 0x21c0
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
je 0x27e7
movl -0x14(%rbp), %eax
movl %eax, -0x64(%rbp)
subl $0x23, %eax
je 0x27a4
jmp 0x273e
movl -0x64(%rbp), %eax
subl $0x3f, %eax
je 0x27d8
jmp 0x274c
movl -0x64(%rbp), %eax
subl $0x56, %eax
je 0x27cc
jmp 0x2756
movl -0x64(%rbp), %eax
subl $0x6e, %eax
je 0x2790
jmp 0x2760
movl -0x64(%rbp), %eax
subl $0x73, %eax
je 0x2782
jmp 0x276a
movl -0x64(%rbp), %eax
subl $0x74, %eax
jne 0x27dd
jmp 0x2774
movl $0x1, %eax
movq %rax, 0x15bd8(%rip)     # 0x18358
jmp 0x27e2
movl $0x1, %eax
movq %rax, 0x15bd2(%rip)     # 0x18360
jmp 0x27e2
movq 0x15841(%rip), %rax     # 0x17fd8
movq (%rax), %rdi
callq 0x21e0
movl %eax, -0x18(%rbp)
jmp 0x27e2
jmp 0x27a6
leaq 0x15b63(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x79, 0xc(%rax)
movq 0x15816(%rip), %rax     # 0x17fd8
movq (%rax), %rdi
callq 0x114a0
jmp 0x27e2
callq 0x2600
xorl %edi, %edi
callq 0x2200
callq 0x25d0
callq 0x25d0
jmp 0x2712
callq 0x2600
cmpq $0x0, 0x15b64(%rip)     # 0x18358
je 0x288d
jmp 0x27fc
leaq 0x160bd(%rip), %rax     # 0x188c0
cmpl $0x0, (%rax)
je 0x2863
leaq 0x15b01(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x12843(%rip), %rcx     # 0x15060
movq %rcx, 0x10(%rax)
leaq 0x12838(%rip), %rdi     # 0x15060
callq 0x11210
cmpl $0x0, %eax
je 0x2863
leaq 0x15ad7(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x81, 0xc(%rax)
leaq 0x10889(%rip), %rdi     # 0x130d7
leaq 0xc38b(%rip), %rsi      # 0xebe0
leaq -0x22c(%rip), %rdx      # 0x2630
movb $0x0, %al
callq 0x11eb0
jmp 0x2865
callq 0x2330
movb $0x0, %al
callq 0xb5f0
movb $0x0, %al
callq 0xd190
movb $0x0, %al
callq 0xfd90
movb $0x0, %al
callq 0xb240
movb $0x0, %al
callq 0x7e60
cmpq $0x0, 0x15acb(%rip)     # 0x18360
je 0x2ac4
movl $0x64, -0x44(%rbp)
movl $0xf4240, -0x48(%rbp)   # imm = 0xF4240
movl -0x44(%rbp), %edi
callq 0x4730
movq %rax, -0x58(%rbp)
movb $0x0, %al
callq 0x2ae0
movq -0x58(%rbp), %rdi
callq 0x3d70
movq -0x58(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x39d0
leaq 0x15fe8(%rip), %rax     # 0x188c0
cmpl $0x0, (%rax)
je 0x292a
leaq 0x15a2c(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x1276e(%rip), %rcx     # 0x15060
movq %rcx, 0x10(%rax)
leaq 0x12763(%rip), %rdi     # 0x15060
callq 0x11210
cmpl $0x0, %eax
je 0x292a
leaq 0x15a02(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x92, 0xc(%rax)
leaq 0x107ca(%rip), %rdi     # 0x130ed
movb $0x0, %al
callq 0x11eb0
jmp 0x292c
movl -0x44(%rbp), %esi
movl -0x48(%rbp), %edx
leaq 0x107be(%rip), %rdi     # 0x130f7
movb $0x0, %al
callq 0x20e0
leaq 0x15a21(%rip), %rax     # 0x18368
movq $0x0, (%rax)
movq -0x58(%rbp), %rdi
movl -0x48(%rbp), %esi
callq 0x5a80
movl %eax, -0x4c(%rbp)
movq -0x58(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jle 0x297f
movq -0x58(%rbp), %rax
movl 0x28(%rax), %esi
movl -0x4c(%rbp), %edx
leaq 0x107b1(%rip), %rdi     # 0x13129
movb $0x0, %al
callq 0x20e0
movq -0x58(%rbp), %rax
cmpl $0x0, 0x68(%rax)
jle 0x2993
movl $0x186a0, %edi          # imm = 0x186A0
callq 0x2220
jmp 0x2995
movq -0x58(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x58(%rbp), %rdx
xorl %eax, %eax
cmpl 0x40(%rdx), %ecx
movb %al, -0x65(%rbp)
jge 0x29bd
leaq 0x159b7(%rip), %rax     # 0x18368
cmpq $0x0, (%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x65(%rbp)
movb -0x65(%rbp), %al
testb $0x1, %al
jne 0x294e
jmp 0x29c6
leaq 0x15ef3(%rip), %rax     # 0x188c0
cmpl $0x0, (%rax)
je 0x2a5c
leaq 0x15933(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x12675(%rip), %rcx     # 0x15060
movq %rcx, 0x10(%rax)
leaq 0x1266a(%rip), %rdi     # 0x15060
callq 0x11210
cmpl $0x0, %eax
je 0x2a5c
leaq 0x15909(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x9f, 0xc(%rax)
movl -0x4c(%rbp), %esi
movq -0x58(%rbp), %rax
movl 0x28(%rax), %edx
movq -0x58(%rbp), %rax
movl 0x40(%rax), %ecx
movq -0x58(%rbp), %rax
movl 0x68(%rax), %r8d
leaq 0x15933(%rip), %rax     # 0x18368
movq (%rax), %rdi
leaq 0x11c05(%rip), %r9      # 0x14644
leaq 0x11bc8(%rip), %rax     # 0x1460e
cmpq $0x0, %rdi
cmovneq %rax, %r9
leaq 0x106fe(%rip), %rdi     # 0x13153
movb $0x0, %al
callq 0x11eb0
jmp 0x2a5e
jmp 0x2a60
leaq 0x15e59(%rip), %rax     # 0x188c0
cmpl $0x0, (%rax)
je 0x2ab9
leaq 0x1589d(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x125df(%rip), %rcx     # 0x15060
movq %rcx, 0x10(%rax)
leaq 0x125d4(%rip), %rdi     # 0x15060
callq 0x11210
cmpl $0x0, %eax
je 0x2ab9
leaq 0x15873(%rip), %rax     # 0x18310
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0xa0, 0xc(%rax)
leaq 0x106d6(%rip), %rdi     # 0x13188
movb $0x0, %al
callq 0x11eb0
jmp 0x2abb
movq -0x58(%rbp), %rdi
callq 0x6a80
callq 0x25b0
movl $0xa4, -0x34(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x11fd0
xorl %edi, %edi
callq 0x2200