// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x753b(%rip), %rsi      # 0x21122
callq 0x19b60
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
jne 0x19c01
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x19e0f
movslq -0x1c(%rbp), %rcx
leaq 0xea04(%rip), %rax      # 0x28610
movzbl (%rax,%rcx), %eax
orl $0x80, %eax
movb %al, %dl
leaq 0xe9f2(%rip), %rax      # 0x28610
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x30a0
movq -0x30(%rbp), %rdi
movl %eax, %esi
callq 0xa160
movq %rax, %rdi
movq 0xe511(%rip), %rsi      # 0x28158
xorl %edx, %edx
callq 0x3780
movq %rax, 0xe503(%rip)      # 0x28158
movq 0xe4bc(%rip), %rdi      # 0x28118
movq 0xe4d5(%rip), %rsi      # 0x28138
xorl %edx, %edx
callq 0x3780
movq %rax, 0xe4c7(%rip)      # 0x28138
movq 0xe958(%rip), %rax      # 0x285d0
movq 0xe499(%rip), %rcx      # 0x28118
cmpq $-0x1, (%rax,%rcx,8)
je 0x19ca1
movq 0xe943(%rip), %rax      # 0x285d0
movq 0xe484(%rip), %rcx      # 0x28118
movq (%rax,%rcx,8), %rax
movq %rax, 0xe479(%rip)      # 0x28118
jmp 0x19c71
movq 0xe928(%rip), %rax      # 0x285d0
movq 0xe929(%rip), %rcx      # 0x285d8
movq (%rax,%rcx,8), %rax
movl %eax, -0x24(%rbp)
movq 0xe913(%rip), %rax      # 0x285d0
movq 0xe914(%rip), %rcx      # 0x285d8
movq $-0x2, (%rax,%rcx,8)
movl 0xe9d6(%rip), %eax      # 0x286a8
movl %eax, -0x20(%rbp)
movl 0xe905(%rip), %eax      # 0x285e0
movl %eax, -0x18(%rbp)
movl $0x1, 0xe8f8(%rip)      # 0x285e0
movl -0x1c(%rbp), %eax
movl %eax, 0xe9b7(%rip)      # 0x286a8
movl 0xe9e9(%rip), %eax      # 0x286e0
movl %eax, -0x28(%rbp)
callq 0xcc90
movl %eax, 0xe9db(%rip)      # 0x286e0
movl 0xe8b9(%rip), %eax      # 0x285c4
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x19d19
jmp 0x19d97
movl -0x1c(%rbp), %eax
movl %eax, 0xe986(%rip)      # 0x286a8
cmpl $-0x65, 0xe9b7(%rip)    # 0x286e0
jne 0x19d36
callq 0xcc90
movl %eax, 0xe9aa(%rip)      # 0x286e0
callq 0xf860
movl %eax, -0x14(%rbp)
movl -0x20(%rbp), %eax
movl %eax, 0xe961(%rip)      # 0x286a8
cmpl $-0x4, -0x14(%rbp)
jne 0x19d4f
jmp 0x19d97
movl 0xe98b(%rip), %edi      # 0x286e0
callq 0x19e20
cmpl $0x0, %eax
jne 0x19d7b
cmpl $-0x65, 0xe97a(%rip)    # 0x286e0
je 0x19d7b
movq 0xe3f9(%rip), %rsi      # 0x28168
leaq 0x6ae7(%rip), %rdi      # 0x2085d
callq 0x34b0
movl 0xe843(%rip), %eax      # 0x285c4
cmpl $0x0, %eax
jne 0x19d92
movslq -0x14(%rbp), %rdi
callq 0x19ed0
movl %eax, -0x14(%rbp)
jmp 0x19d05
movl -0x28(%rbp), %eax
movl %eax, 0xe940(%rip)      # 0x286e0
movl -0x1c(%rbp), %edi
callq 0x198d0
movl -0x18(%rbp), %eax
movl %eax, 0xe82f(%rip)      # 0x285e0
movslq -0x24(%rbp), %rdx
movq 0xe814(%rip), %rax      # 0x285d0
movq 0xe815(%rip), %rcx      # 0x285d8
movq %rdx, (%rax,%rcx,8)
movq 0xe802(%rip), %rax      # 0x285d0
movq 0xe383(%rip), %rcx      # 0x28158
movq (%rax,%rcx,8), %rax
movq %rax, 0xe378(%rip)      # 0x28158
movq 0xe399(%rip), %rax      # 0x28180
movq 0xe32a(%rip), %rcx      # 0x28118
movq (%rax,%rcx,8), %rdi
callq 0x12600
movl $0x1, %edi
callq 0x3950
movq %rax, 0xe310(%rip)      # 0x28118
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)