	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function file_read
_file_read:                             ## @file_read
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r14
	cmpq	$0, 16(%rdi)
	je	LBB0_11
## %bb.2:
	movq	_BIO_FLAGS_UPLINK@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movq	8(%r14), %rcx
	testl	%eax, (%r14)
	je	LBB0_4
## %bb.3:
	movq	%rsi, %rdi
	movl	$1, %esi
	callq	_UP_fread
	jmp	LBB0_5
LBB0_4:
	movq	%rsi, %rdi
	movl	$1, %esi
	callq	_fread
LBB0_5:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
LBB0_8:
	movq	8(%r14), %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_11
LBB0_10:
	movq	_SYS_F_FREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_get_last_sys_error
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_SYSerr
	movq	_BIO_F_FILE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_SYS_LIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_BIOerr
	movl	$-1, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r15), %eax
	testl	%eax, (%r14)
	je	LBB0_8
## %bb.7:
	movq	8(%r14), %rdi
	callq	_UP_ferror
	movl	$0, %ebx
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_BIO_FLAGS_UPLINK,4,2           ## @BIO_FLAGS_UPLINK
	.comm	_SYS_F_FREAD,4,2                ## @SYS_F_FREAD
	.comm	_BIO_F_FILE_READ,4,2            ## @BIO_F_FILE_READ
	.comm	_ERR_R_SYS_LIB,4,2              ## @ERR_R_SYS_LIB
	.no_dead_strip	_file_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function file_read
_file_read:                             ; @file_read
	.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	w20, #0
	cbz	x1, LBB0_10
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_10
; %bb.2:
	ldr	w8, [x19]
Lloh0:
	adrp	x21, _BIO_FLAGS_UPLINK@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BIO_FLAGS_UPLINK@GOTPAGEOFF]
	ldr	w9, [x21]
	ldr	x3, [x19, #8]
	mov	x0, x1
	mov	w1, #1
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	bl	_UP_fread
	mov	x20, x0
	cbnz	w0, LBB0_8
	b	LBB0_5
LBB0_4:
	bl	_fread
	mov	x20, x0
	cbnz	w0, LBB0_8
LBB0_5:
	ldr	w8, [x19]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	ldr	x0, [x19, #8]
	bl	_UP_ferror
	cbnz	x0, LBB0_9
; %bb.7:
	mov	w20, #0
	b	LBB0_10
LBB0_8:
	ldr	x0, [x19, #8]
	bl	_ferror
	cbz	x0, LBB0_10
LBB0_9:
Lloh2:
	adrp	x8, _SYS_F_FREAD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SYS_F_FREAD@GOTPAGEOFF]
Lloh4:
	ldr	w19, [x8]
	bl	_get_last_sys_error
	mov	x1, x0
	mov	x0, x19
	bl	_SYSerr
Lloh5:
	adrp	x8, _BIO_F_FILE_READ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BIO_F_FILE_READ@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _ERR_R_SYS_LIB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERR_R_SYS_LIB@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_BIOerr
	mov	w20, #-1
LBB0_10:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BIO_FLAGS_UPLINK,4,2           ; @BIO_FLAGS_UPLINK
	.comm	_SYS_F_FREAD,4,2                ; @SYS_F_FREAD
	.comm	_BIO_F_FILE_READ,4,2            ; @BIO_F_FILE_READ
	.comm	_ERR_R_SYS_LIB,4,2              ; @ERR_R_SYS_LIB
	.no_dead_strip	_file_read
.subsections_via_symbols
