// File: /workspace/github_c_makefile_star2_O0/ArtifexSoftware[P]mujs/pp.c
// Function: js_ppfile
static void js_ppfile(js_State *J, const char *filename)
{
	FILE * volatile f = NULL;
	char * volatile s = NULL;
	int n, t;

	if (js_try(J)) {
		js_free(J, s);
		if (f) fclose(f);
		js_throw(J);
	}

	f = fopen(filename, "rb");
	if (!f) {
		js_error(J, "cannot open file: '%s'", filename);
	}

	if (fseek(f, 0, SEEK_END) < 0) {
		js_error(J, "cannot seek in file: '%s'", filename);
	}

	n = ftell(f);
	if (n < 0) {
		js_error(J, "cannot tell in file: '%s'", filename);
	}

	if (fseek(f, 0, SEEK_SET) < 0) {
		js_error(J, "cannot seek in file: '%s'", filename);
	}

	s = js_malloc(J, n + 1); /* add space for string terminator */
	if (!s) {
		js_error(J, "cannot allocate storage for file contents: '%s'", filename);
	}

	t = fread(s, 1, (size_t)n, f);
	if (t != n) {
		js_error(J, "cannot read data from file: '%s'", filename);
	}

	s[n] = 0; /* zero-terminate string containing file data */

	js_ppstring(J, filename, s);

	js_endtry(J);
	js_free(J, s);
	fclose(f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x16c00
movq %rax, %rdi
callq 0x41d0
cmpl $0x0, %eax
je 0x470f
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x100a0
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
je 0x4706
movq -0x18(%rbp), %rdi
callq 0x40e0
movq -0x8(%rbp), %rdi
callq 0xb640
movq -0x10(%rbp), %rdi
leaq 0x31fa8(%rip), %rsi     # 0x366c2
callq 0x4290
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x4743
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x31f89(%rip), %rsi     # 0x366c5
movb $0x0, %al
callq 0xe4a0
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x4260
cmpl $0x0, %eax
jge 0x4770
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x31f73(%rip), %rsi     # 0x366dc
movb $0x0, %al
callq 0xe4a0
movq -0x18(%rbp), %rdi
callq 0x4200
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x4798
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x31f65(%rip), %rsi     # 0x366f6
movb $0x0, %al
callq 0xe4a0
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x4260
cmpl $0x0, %eax
jge 0x47c2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x31f21(%rip), %rsi     # 0x366dc
movb $0x0, %al
callq 0xe4a0
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
addl $0x1, %esi
callq 0x10360
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, %rax
jne 0x47f5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x31f22(%rip), %rsi     # 0x36710
movb $0x0, %al
callq 0xe4a0
movq -0x20(%rbp), %rdi
movslq -0x24(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %esi
callq 0x40a0
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x482c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x31f1b(%rip), %rsi     # 0x36740
movb $0x0, %al
callq 0xe4a0
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4870
movq -0x8(%rbp), %rdi
callq 0x173a0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x100a0
movq -0x18(%rbp), %rdi
callq 0x40e0
addq $0x30, %rsp
popq %rbp
retq
nop