// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jle 0x1fb4b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x1e99(%rip), %rsi      # 0x219b4
callq 0x3120
cmpl $0x0, %eax
jne 0x1fb4b
cmpl $0x2, -0x8(%rbp)
jge 0x1fb3f
movl $0x1, %edi
callq 0x1f600
movl $0x1, %edi
callq 0x3b10
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
callq 0x1ef50
movl $0x3, %edi
leaq -0x1acc(%rip), %rsi     # 0x1e090
callq 0x3130
movl $0xf, %edi
leaq -0x1abd(%rip), %rsi     # 0x1e0b0
callq 0x3130
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1e820
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq (%rax), %rax
movq %rax, -0x20(%rbp)
callq 0x1f470
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1fe95
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x1fbbb
jmp 0x1fe95
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, (%rax)
je 0x1fe78
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
addl $-0x2d, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x49, %eax
ja 0x1fe5d
movq -0x28(%rbp), %rax
leaq 0x538(%rip), %rcx       # 0x20138
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movq %rax, 0x8fcc(%rip)      # 0x28be8
jmp 0x1fe67
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1fc36
movl $0x1, %edi
callq 0x1f600
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1a470
movl 0x897b(%rip), %ecx      # 0x285c4
xorl %edi, %edi
movl $0x1, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edi
callq 0x3b10
jmp 0x1fe67
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1fc75
movl $0x1, %edi
callq 0x1f600
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x66, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x1fcac
movl $0x1, 0x892b(%rip)      # 0x285c8
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, 0x8f3c(%rip)      # 0x28be8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x19bd0
cmpl $0x0, %eax
je 0x1fcf1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x30a0
movq -0x30(%rbp), %rdi
movl %eax, %esi
callq 0xa160
movq %rax, %rsi
leaq 0x1ccb(%rip), %rdi      # 0x219b7
callq 0x34b0
movl 0x88cd(%rip), %eax      # 0x285c4
cmpl $0x0, %eax
je 0x1fd06
movl $0x1, %edi
callq 0x3b10
cmpl $0x0, -0x14(%rbp)
je 0x1fd13
xorl %edi, %edi
callq 0x3b10
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x30a0
movq -0x38(%rbp), %rcx
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1fe67
movl 0x83b1(%rip), %eax      # 0x28100
addl $0x1, %eax
movl %eax, 0x83a8(%rip)      # 0x28100
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x1fe67
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1fd80
movl $0x1, %edi
callq 0x1f600
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1fa60
movq %rax, 0x88ec(%rip)      # 0x28680
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x30a0
movq %rax, %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x1fe67
movl $0x1, 0x8800(%rip)      # 0x285c8
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x1fe67
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1fdf0
movl $0x1, %edi
callq 0x1f600
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x31e0
movl %eax, 0x8499(%rip)      # 0x2829c
cmpl $0x64, 0x8492(%rip)     # 0x2829c
jle 0x1fe16
movl $0x64, 0x8486(%rip)     # 0x2829c
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x30a0
movq %rax, %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x1fe67
movq -0x20(%rbp), %rdi
callq 0x1f7c0
xorl %edi, %edi
callq 0x3b10
jmp 0x1fe67
callq 0x1f660
xorl %edi, %edi
callq 0x3b10
jmp 0x1fe67
movl $0x1, %edi
callq 0x1f600
cmpq $0x0, 0x8d79(%rip)      # 0x28be8
je 0x1fe73
jmp 0x1fe78
jmp 0x1fbc9
cmpq $0x0, 0x8d68(%rip)      # 0x28be8
je 0x1fe84
jmp 0x1fe95
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x1fb99
cmpq $0x0, 0x8d4b(%rip)      # 0x28be8
jne 0x1feb3
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1feb3
movl $0x1, %edi
callq 0x1f600
cmpl $0x0, 0x870e(%rip)      # 0x285c8
jne 0x1fec8
leaq 0x1b0b(%rip), %rdi      # 0x219ce
callq 0x3ab0
callq 0x1e130
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq