// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movl %edi, %ebp
leaq 0xb7a1(%rip), %rax      # 0xe0ca
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x109da(%rip), %r13     # 0x13310
movq (%r13), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x72, 0xc(%rdi)
leaq 0xd55a(%rip), %rcx      # 0xfeac
movq %rcx, 0x10(%rdi)
leaq 0x107d3(%rip), %rcx     # 0x13130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0xd87e
movq (%r13), %rax
movq 0x18(%rax), %rcx
movq 0x1067f(%rip), %rdx     # 0x12ff8
testq %rcx, %rcx
jne 0x2981
movq (%rdx), %rcx
movq %rcx, 0x18(%rax)
callq 0x20c0
movq (%r13), %rcx
movl %eax, 0x10(%rcx)
movq (%r14), %rax
movq %rax, 0x8(%rcx)
movl $0x5, %r15d
leaq 0xb72a(%rip), %r12      # 0xe0cf
movq 0x1062c(%rip), %rbx     # 0x12fd8
movl %ebp, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x21c0
cmpl $0x72, %eax
jle 0x29d9
cmpl $0x73, %eax
je 0x29fc
cmpl $0x74, %eax
jne 0x2c29
movq $0x1, 0x10981(%rip) # 0x13358
jmp 0x29ac
cmpl $0x3e, %eax
jg 0x2a09
cmpl $0x23, %eax
jne 0x2a37
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x79, 0xc(%rax)
movq (%rbx), %rdi
callq 0xd13d
jmp 0x29ac
movq $0x1, 0x10959(%rip) # 0x13360
jmp 0x29ac
cmpl $0x6e, %eax
jne 0x2a1b
movq (%rbx), %rdi
callq 0x21e0
movl %eax, %r15d
jmp 0x29ac
cmpl $0x3f, %eax
je 0x2c29
cmpl $0x56, %eax
jne 0x2c29
callq 0x28ec
jmp 0x2c22
cmpl $-0x1, %eax
jne 0x2c29
leaq 0xb675(%rip), %rdi      # 0xe0bc
leaq 0x106f2(%rip), %rsi     # 0x13140
leaq 0x106ef(%rip), %rdx     # 0x13144
leaq 0x106f4(%rip), %rcx     # 0x13150
xorl %eax, %eax
callq 0x20f0
cmpq $0x0, 0x108ed(%rip)     # 0x13358
jne 0x2c52
cmpq $0x0, 0x108e7(%rip)     # 0x13360
je 0x2c0e
movl $0x64, %edi
callq 0x4051
movq %rax, %r14
xorl %eax, %eax
callq 0x2cac
movq %r14, %rdi
callq 0x3a33
movq %r14, %rdi
movl %r15d, %esi
callq 0x3764
leaq 0x10e13(%rip), %r12     # 0x138c0
cmpl $0x0, (%r12)
je 0x2aed
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0xd3e9(%rip), %rdi      # 0xfeac
movq %rdi, 0x10(%rax)
callq 0xcfe0
testl %eax, %eax
je 0x2aed
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x92, 0xc(%rax)
leaq 0xb607(%rip), %rdi      # 0xe0ed
xorl %eax, %eax
callq 0xd8ef
leaq 0xb603(%rip), %rdi      # 0xe0f7
movl $0x64, %esi
movl $0xf4240, %edx          # imm = 0xF4240
xorl %eax, %eax
callq 0x20f0
leaq 0x1085c(%rip), %rbx     # 0x13368
movq $0x0, (%rbx)
leaq 0xb60f(%rip), %r15      # 0xe129
movq %r14, %rdi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x4e67
movl %eax, %ebp
movl 0x28(%r14), %esi
testl %esi, %esi
jle 0x2b3d
movq %r15, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x20f0
cmpl $0x0, 0x68(%r14)
jle 0x2b4e
movl $0x186a0, %edi          # imm = 0x186A0
callq 0x2230
movl 0x28(%r14), %eax
cmpl 0x40(%r14), %eax
jge 0x2b5e
cmpq $0x0, (%rbx)
je 0x2b1a
cmpl $0x0, (%r12)
je 0x2c06
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0xd334(%rip), %rdi      # 0xfeac
movq %rdi, 0x10(%rax)
callq 0xcfe0
testl %eax, %eax
je 0x2bc6
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x9f, 0xc(%rax)
movl 0x28(%r14), %edx
movl 0x40(%r14), %ecx
movl 0x68(%r14), %r8d
cmpq $0x0, (%rbx)
leaq 0xca98(%rip), %rax      # 0xf643
leaq 0xca5b(%rip), %r9       # 0xf60d
cmoveq %rax, %r9
leaq 0xb596(%rip), %rdi      # 0xe153
movl %ebp, %esi
xorl %eax, %eax
callq 0xd8ef
cmpl $0x0, (%r12)
je 0x2c06
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0xd2d0(%rip), %rdi      # 0xfeac
movq %rdi, 0x10(%rax)
callq 0xcfe0
testl %eax, %eax
je 0x2c06
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0xa0, 0xc(%rax)
leaq 0xb589(%rip), %rdi      # 0xe188
xorl %eax, %eax
callq 0xd8ef
movq %r14, %rdi
callq 0x59d8
callq 0x28b2
movq %rsp, %rdi
movl $0xa4, 0xc(%rdi)
callq 0xda03
xorl %edi, %edi
callq 0x2200
movq 0x103c8(%rip), %rax     # 0x12ff8
movq (%rax), %rdi
leaq 0xb44f(%rip), %rsi      # 0xe089
leaq 0x104ff(%rip), %rdx     # 0x13140
xorl %eax, %eax
callq 0x2170
movl $0x1, %edi
callq 0x2200
leaq 0x10c67(%rip), %rax     # 0x138c0
cmpl $0x0, (%rax)
je 0x2ca5
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0xd23f(%rip), %rdi      # 0xfeac
movq %rdi, 0x10(%rax)
callq 0xcfe0
testl %eax, %eax
je 0x2ca5
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x81, 0xc(%rax)
leaq 0xb447(%rip), %rdi      # 0xe0d7
leaq 0x8e01(%rip), %rsi      # 0xba98
leaq -0x38f(%rip), %rdx      # 0x290f
xorl %eax, %eax
callq 0xd8ef
callq 0x26ec
nop