// File: /workspace/github_c_makefile_star2_O3/azhai[P]mlite/mlite.c
// Function: load
int load(char *file) {
	int	n;
	int	outer_lno;
	int	new_stream, old_stream;
	int	outer_loading;
	int	outer_tok;

	new_stream = open_stream(file, "r");
	if (new_stream == -1)
		return -1;
	Stream_flags[new_stream] |= LOCK_TAG;
	File_list = node(make_string(file, (int) strlen(file)), File_list);
	save(Environment);
	while (cdr(Environment) != NIL)
		Environment = cdr(Environment);
	outer_loading = box_value(S_loading);
	box_value(S_loading) = TRUE;
	old_stream = Instream;
	outer_lno = Line_no;
	Line_no = 1;
	Instream = new_stream;
	outer_tok = Token;
	Token = scan();
	while (!Error_flag) {
		Instream = new_stream;
		if (Token == TOK_SEMI)
			Token = scan();
		n = prog();
		Instream = old_stream;
		if (n == END_OF_FILE)
			break;
		if (!isfirst(Token) && Token != TOK_SEMI)
			error("syntax error at", Attr);
		if (!Error_flag)
			n = eval(n);
	}
	Token = outer_tok;
	close_stream(new_stream);
	Line_no = outer_lno;
	box_value(S_loading) = outer_loading;
	File_list = cdr(File_list);
	rehash(car(Environment));
	Environment = unsave(1);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x57be(%rip), %rsi      # 0x17029
callq 0x117dc
cmpl $-0x1, %eax
je 0x11a4b
movl %eax, %ebx
movl %eax, %r13d
leaq 0xcd7b(%rip), %rax      # 0x1e600
orb $-0x80, (%r13,%rax)
movq %r14, %rdi
callq 0x30a0
movq %rax, %r15
incl %r15d
movq $-0x21, %rdi
movl %r15d, %esi
callq 0x416e
movq %rax, %r12
movq 0xcd0e(%rip), %rax      # 0x1e5c0
movq (%rax,%r12,8), %rdi
shlq $0x3, %rdi
addq 0xcd27(%rip), %rdi      # 0x1e5e8
movslq %r15d, %rdx
movq %r14, %rsi
callq 0x3050
movq 0xc875(%rip), %rsi      # 0x1e148
movq %r12, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0xc864(%rip)      # 0x1e148
movq 0xc81d(%rip), %rdi      # 0x1e108
movq 0xc836(%rip), %rsi      # 0x1e128
xorl %edx, %edx
callq 0x36e8
movq %rax, 0xc828(%rip)      # 0x1e128
movq 0xccb9(%rip), %rax      # 0x1e5c0
movq 0xc7fa(%rip), %rcx      # 0x1e108
movq (%rax,%rcx,8), %rcx
cmpq $-0x1, %rcx
je 0x11921
movq %rcx, 0xc7e9(%rip)      # 0x1e108
jmp 0x1190e
movq 0xcca0(%rip), %rcx      # 0x1e5c8
movq (%rax,%rcx,8), %rdx
movq %rdx, -0x30(%rbp)
movq $-0x2, (%rax,%rcx,8)
movl 0xcd59(%rip), %r12d     # 0x1e698
movl 0xcc8a(%rip), %r15d     # 0x1e5d0
movl $0x1, 0xcc80(%rip)      # 0x1e5d0
movl %ebx, 0xcd42(%rip)      # 0x1e698
movl 0xcd73(%rip), %r14d     # 0x1e6d0
callq 0x9ac4
movl %eax, 0xcd68(%rip)      # 0x1e6d0
cmpl $0x0, 0xcc45(%rip)      # 0x1e5b4
jne 0x119ba
jmp 0x11993
cmpl $0x0, 0xcc3a(%rip)      # 0x1e5b4
jne 0x11984
movslq %eax, %rdi
callq 0x11a6a
cmpl $0x0, 0xcc29(%rip)      # 0x1e5b4
jne 0x119ba
movl 0xcd3d(%rip), %eax      # 0x1e6d0
movl %ebx, 0xccff(%rip)      # 0x1e698
cmpl $-0x65, %eax
jne 0x119a9
callq 0x9ac4
movl %eax, 0xcd27(%rip)      # 0x1e6d0
callq 0xb8b1
movl %r12d, 0xcce3(%rip)     # 0x1e698
cmpl $-0x4, %eax
jne 0x11973
movl %r14d, 0xcd0f(%rip)     # 0x1e6d0
cmpl $0x1f, %ebx
ja 0x119f0
leaq 0xc7b3(%rip), %rbx      # 0x1e180
movq (%rbx,%r13,8), %rdi
testq %rdi, %rdi
je 0x119e3
callq 0x3090
movq $0x0, (%rbx,%r13,8)
leaq 0xcc16(%rip), %rax      # 0x1e600
movb $0x0, (%r13,%rax)
movl %r15d, 0xcbd9(%rip)     # 0x1e5d0
movslq -0x30(%rbp), %rax
movq 0xcbbe(%rip), %rcx      # 0x1e5c0
movq 0xcbbf(%rip), %rdx      # 0x1e5c8
movq %rax, (%rcx,%rdx,8)
movq 0xc734(%rip), %rax      # 0x1e148
movq (%rcx,%rax,8), %rax
movq %rax, 0xc729(%rip)      # 0x1e148
movq 0xc74a(%rip), %rax      # 0x1e170
movq 0xc6db(%rip), %rcx      # 0x1e108
movq (%rax,%rcx,8), %rdi
callq 0xd8da
movl $0x1, %edi
callq 0x384f
movq %rax, 0xc6c1(%rip)      # 0x1e108
xorl %eax, %eax
jmp 0x11a50
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq