	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_FileReader_ReadFunc       ## -- Begin function HPDF_FileReader_ReadFunc
	.p2align	4, 0x90
_HPDF_FileReader_ReadFunc:              ## @HPDF_FileReader_ReadFunc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	4(%rdi), %r14d
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	movq	(%r13), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_HPDF_MemSet
	movq	(%r13), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	%r14d, %ecx
	callq	_HPDF_FREAD
	cmpq	(%r13), %rax
	jne	LBB0_1
## %bb.4:
	movq	_HPDF_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	%rax, %r12
	movl	%r14d, %edi
	callq	_HPDF_FEOF
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r12, (%r13)
	movq	_HPDF_STREAM_EOF@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	(%r15), %r15d
	movq	_HPDF_FILE_IO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r14d, %edi
	callq	_HPDF_FERROR
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HPDF_SetError                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" HPDF_FileReader_ReadFunc\n"

	.comm	_HPDF_STREAM_EOF,4,2            ## @HPDF_STREAM_EOF
	.comm	_HPDF_FILE_IO_ERROR,4,2         ## @HPDF_FILE_IO_ERROR
	.comm	_HPDF_OK,4,2                    ## @HPDF_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_FileReader_ReadFunc       ; -- Begin function HPDF_FileReader_ReadFunc
	.p2align	2
_HPDF_FileReader_ReadFunc:              ; @HPDF_FileReader_ReadFunc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldr	w19, [x0, #4]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
	ldr	x2, [x20]
	mov	x0, x22
	mov	w1, #0
	bl	_HPDF_MemSet
	ldr	x2, [x20]
	mov	x0, x22
	mov	w1, #1
	mov	x3, x19
	bl	_HPDF_FREAD
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _HPDF_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HPDF_OK@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x22, x0
	mov	x0, x19
	bl	_HPDF_FEOF
	cbz	x0, LBB0_5
; %bb.3:
	str	x22, [x20]
Lloh4:
	adrp	x8, _HPDF_STREAM_EOF@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HPDF_STREAM_EOF@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w20, [x21]
Lloh6:
	adrp	x8, _HPDF_FILE_IO_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HPDF_FILE_IO_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_HPDF_FERROR
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_HPDF_SetError
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_FileReader_ReadFunc\n"

	.comm	_HPDF_STREAM_EOF,4,2            ; @HPDF_STREAM_EOF
	.comm	_HPDF_FILE_IO_ERROR,4,2         ; @HPDF_FILE_IO_ERROR
	.comm	_HPDF_OK,4,2                    ; @HPDF_OK
.subsections_via_symbols
