// File: /workspace/github_c_makefile_star2_O1/azhai[P]mlite/mlite.c
// Function: main
int main(int argc, char **argv) {
	int	run_script;
	char	*argv0;

	if (argc > 1 && !strcmp(argv[1], "-i")) {
		if (argc < 2) {
			usage(1);
			bye(1);
		}
		argv += 2;
	}
	init();
	signal(SIGQUIT, keyboard_quit);
	signal(SIGTERM, terminated);
	load_library(argv[0]);
	argv0 = *argv++;
	init_extensions();
	while (*argv != NULL) {
		if (**argv != '-')
			break;
		(*argv)++;
		while (**argv) {
			switch (**argv)  {
			case '-':
				Command_line = ++argv;
				break;
			case 'd':
				if (argv[1] == NULL)
					usage(1);
				dump_image(argv[1]);
				bye(Error_flag? 1: 0);
				break;
			case 'f':
			case 'l':
				if (argv[1] == NULL)
					usage(1);
				run_script = **argv == 'f';
				if (run_script) {
					Quiet_mode = 1;
					Command_line = &argv[2];
				}
				if (load(argv[1]))
					error("program file not found",
						make_string(argv[1],
							(int)strlen(argv[1])));
				if (Error_flag)
					bye(1);
				if (run_script)
					bye(0);
				argv++;
				*argv = &(*argv)[strlen(*argv)];
				break;
			case 'g':
				Verbose_GC++;
				(*argv)++;
				break;
			case 'm':
				if (argv[1] == NULL)
					usage(1);
				Memory_limit_kn = get_size_k(argv[1]);
				argv++;
				*argv += strlen(*argv);
				break;
			case 'q':
				Quiet_mode = 1;
				(*argv)++;
				break;
			case 't':
				if (argv[1] == NULL)
					usage(1);
				Proc_max = atoi(argv[1]);
				if (Proc_max > MAX_CALL_TRACE)
					Proc_max = MAX_CALL_TRACE;
				argv++;
				*argv += strlen(*argv);
				break;
			case 'v':
				version_info(argv0);
				bye(0);
				break;
			case 'h':
			case '?':
				long_usage();
				bye(0);
				break;
			default:
				usage(1);
				break;
			}
			if (Command_line)
				break;
		}
		if (Command_line)
			break;
		argv++;
	}
	if (!Command_line && argv[0] != NULL)
		usage(1);
	if (!Quiet_mode)
		pr("mLite\n");
	repl();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x2, %edi
jl 0x159fb
movq 0x8(%rbx), %rdi
leaq 0x1eed(%rip), %rsi      # 0x178d6
callq 0x3110
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
shll $0x4, %ecx
addq %rcx, %rbx
callq 0x15029
leaq -0x161d(%rip), %rsi     # 0x143ea
movl $0x3, %edi
callq 0x3120
leaq -0x161e(%rip), %rsi     # 0x143fa
movl $0xf, %edi
callq 0x3120
movq (%rbx), %rdi
callq 0x14a6a
movq (%rbx), %rax
movq %rax, -0x30(%rbp)
callq 0x154ad
leaq 0x70f(%rip), %r12       # 0x1614c
movq 0x8(%rbx), %rax
addq $0x8, %rbx
testq %rax, %rax
je 0x15bfd
cmpb $0x2d, (%rax)
jne 0x15bfd
incq %rax
movq %rax, (%rbx)
movq (%rbx), %rax
movzbl (%rax), %ecx
cmpl $0x63, %ecx
jle 0x15b35
addl $-0x64, %ecx
cmpl $0x12, %ecx
ja 0x15be3
movslq (%r12,%rcx,4), %rcx
addq %r12, %rcx
jmpq *%rcx
cmpq $0x0, 0x8(%rbx)
jne 0x15a92
movl $0x1, %edi
callq 0x155a5
movq (%rbx), %rax
movb (%rax), %r15b
cmpb $0x66, %r15b
jne 0x15ab3
movl $0x1, 0x8b10(%rip)      # 0x1e5b8
leaq 0x10(%rbx), %rax
movq %rax, 0x9125(%rip)      # 0x1ebd8
addq $0x8, %rbx
movq (%rbx), %rdi
callq 0x11b3b
testl %eax, %eax
je 0x15b1d
movq (%rbx), %r12
movq %r12, %rdi
callq 0x30a0
movq %rax, %r13
incl %r13d
movq $-0x21, %rdi
movl %r13d, %esi
callq 0x417e
movq %rax, %r14
movq 0x8ad3(%rip), %rax      # 0x1e5c0
movq (%rax,%r14,8), %rdi
shlq $0x3, %rdi
addq 0x8aec(%rip), %rdi      # 0x1e5e8
movslq %r13d, %rdx
movq %r12, %rsi
leaq 0x643(%rip), %r12       # 0x1614c
callq 0x3050
leaq 0x1dc4(%rip), %rdi      # 0x178d9
movq %r14, %rsi
callq 0x33eb
cmpl $0x0, 0x8a90(%rip)      # 0x1e5b4
jne 0x15c42
cmpb $0x66, %r15b
jne 0x15ba2
jmp 0x15c88
cmpl $0x2d, %ecx
jne 0x15bda
addq $0x8, %rbx
movq %rbx, 0x908f(%rip)      # 0x1ebd8
jmp 0x15bca
cmpq $0x0, 0x8(%rbx)
jne 0x15b5c
movl $0x1, %edi
callq 0x155a5
addq $0x8, %rbx
movq (%rbx), %r14
movq %r14, %rdi
callq 0x31e0
cmpl $0x64, %eax
movl $0x64, %ecx
cmovgel %ecx, %eax
movl %eax, 0x8710(%rip)      # 0x1e28c
jmp 0x15ba5
cmpq $0x0, 0x8(%rbx)
jne 0x15b8f
movl $0x1, %edi
callq 0x155a5
addq $0x8, %rbx
movq (%rbx), %rdi
callq 0x15972
movq %rax, 0x8ace(%rip)      # 0x1e670
movq (%rbx), %r14
movq %r14, %rdi
callq 0x30a0
addq %r14, %rax
jmp 0x15bc7
movl $0x1, 0x89fc(%rip)      # 0x1e5b8
jmp 0x15bc4
incl 0x852c(%rip)            # 0x1e0f0
incq %rax
movq %rax, (%rbx)
cmpq $0x0, 0x9006(%rip)      # 0x1ebd8
je 0x15a5d
jmp 0x15bef
testl %ecx, %ecx
je 0x15bef
cmpl $0x3f, %ecx
je 0x15c4c
movl $0x1, %edi
callq 0x155a5
jmp 0x15bca
cmpq $0x0, 0x8fe1(%rip)      # 0x1ebd8
je 0x15a3d
cmpq $0x0, 0x8fd3(%rip)      # 0x1ebd8
jne 0x15c17
cmpq $0x0, (%rbx)
je 0x15c17
movl $0x1, %edi
callq 0x155a5
cmpl $0x0, 0x899a(%rip)      # 0x1e5b8
jne 0x15c2c
leaq 0x1cc9(%rip), %rdi      # 0x178f0
callq 0x3965
callq 0x1440e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x3200
callq 0x155fc
jmp 0x15c88
cmpq $0x0, 0x8(%rbx)
jne 0x15c64
movl $0x1, %edi
callq 0x155a5
movq 0x8(%rbx), %rdi
callq 0x121ff
xorl %edi, %edi
cmpl $0x0, 0x893e(%rip)      # 0x1e5b4
setne %dil
callq 0x3200
movq -0x30(%rbp), %rdi
callq 0x1571e
xorl %edi, %edi
callq 0x3200