	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ffs_extread
_ffs_extread:                           ## @ffs_extread
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_VTOI
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_ITOFS
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	(%rbx), %r15
	movq	8(%r14), %rbx
	movq	%rbx, %rdi
	shrq	$63, %rdi
	xorl	$1, %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_KASSERT
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.1:
	movq	16(%r14), %rdi
	shrq	$63, %rdi
	xorl	$1, %edi
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_KASSERT
	movq	$0, -48(%rbp)
	cmpq	$0, 8(%r14)
	jle	LBB0_13
## %bb.2:
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	-104(%rbp), %r13                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rbx
	movq	16(%r14), %rsi
	subq	%rsi, %rbx
	jle	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	callq	_lblkno
	movq	%rax, %r12
	incq	%rax
	movq	%rax, -64(%rbp)
	movq	(%r15), %rsi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_sblksize
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	16(%r14), %rsi
	movq	%r13, %rdi
	callq	_blkoff
	movq	%r14, %rcx
	movq	8(%r13), %r14
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	subq	%rax, %r14
	movq	8(%rcx), %rax
	cmpq	%r14, %rax
	cmovlq	%rax, %r14
	cmpq	%r14, %rbx
	cmovlq	%rbx, %r14
	movq	-64(%rbp), %rsi
	movq	%r13, %rdi
	callq	_lblktosize
	movq	(%r15), %rsi
	notq	%r12
	cmpq	%rsi, %rax
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdx
	movq	%r13, %rdi
	callq	_sblksize
	movq	%rax, -120(%rbp)
	notq	-64(%rbp)
	movq	_NOCRED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	leaq	-64(%rbp), %rcx
	leaq	-120(%rbp), %r8
	movl	$1, %r9d
	leaq	-48(%rbp), %rbx
	pushq	%rbx
	pushq	%rax
	callq	_breadn
	addq	$16, %rsp
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_NOCRED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	leaq	-48(%rbp), %r8
	callq	_bread
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi
	testl	%eax, %eax
	jne	LBB0_16
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	subq	8(%rdi), %r15
	cmpq	%r14, %r15
	jge	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %r14
	testq	%r15, %r15
	je	LBB0_18
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-112(%rbp), %rax                ## 8-byte Reload
	addq	(%rdi), %rax
	movq	%rax, %rdi
	movl	%r14d, %esi
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_uiomove
	movq	-48(%rbp), %rdi
	testl	%eax, %eax
	jne	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_vfs_bio_brelse
	movq	$0, -48(%rbp)
	cmpq	$0, 8(%r14)
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	jg	LBB0_3
LBB0_13:
	xorl	%ebx, %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	_brelse
	jmp	LBB0_20
LBB0_17:
	movl	%eax, %ebx
	testq	%rdi, %rdi
	jne	LBB0_19
	jmp	LBB0_20
LBB0_18:
	xorl	%ebx, %ebx
LBB0_19:
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_vfs_bio_brelse
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ffs_extread: uio->uio_resid < 0"

L_.str.1:                               ## @.str.1
	.asciz	"ffs_extread: uio->uio_offset < 0"

	.comm	_NOCRED,4,2                     ## @NOCRED
	.comm	_FS_UFS2_MAGIC,8,3              ## @FS_UFS2_MAGIC
	.comm	_UIO_READ,8,3                   ## @UIO_READ
	.no_dead_strip	_ffs_extread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ffs_extread
_ffs_extread:                           ; @ffs_extread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_VTOI
	mov	x23, x0
	bl	_ITOFS
	mov	x22, x0
	ldr	x27, [x23]
	ldr	x23, [x20, #8]
	lsr	x8, x23, #63
	eor	w0, w8, #0x1
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	cbz	x23, LBB0_12
; %bb.1:
	ldr	x8, [x20, #16]
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	str	xzr, [sp, #24]
	ldr	x8, [x20, #8]
	cmp	x8, #1
	b.lt	LBB0_12
; %bb.2:
Lloh4:
	adrp	x28, _NOCRED@GOTPAGE
Lloh5:
	ldr	x28, [x28, _NOCRED@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27]
	ldr	x1, [x20, #16]
	sub	x25, x8, x1
	cmp	x25, #1
	b.lt	LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_lblkno
	mov	x26, x0
	add	x8, x0, #1
	str	x8, [sp, #16]
	ldr	x1, [x27]
	mov	x0, x22
	mov	x2, x26
	bl	_sblksize
	mov	x24, x0
	ldr	x1, [x20, #16]
	mov	x0, x22
	bl	_blkoff
	mov	x23, x0
	ldr	x8, [x22, #8]
	ldr	x9, [x20, #8]
	sub	x8, x8, x0
	cmp	x9, x8
	csel	x8, x9, x8, lt
	cmp	x25, x8
	csel	x25, x25, x8, lt
	ldr	x1, [sp, #16]
	mov	x0, x22
	bl	_lblktosize
	ldr	x1, [x27]
	cmp	x0, x1
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x2, [sp, #16]
	mov	x0, x22
	bl	_sblksize
	ldr	x8, [sp, #16]
	mvn	x8, x8
	stp	x0, x8, [sp, #8]
	mvn	x1, x26
	ldr	w6, [x28]
	add	x3, sp, #16
	add	x4, sp, #8
	add	x7, sp, #24
	mov	x0, x21
	mov	x2, x24
	mov	w5, #1
	bl	_breadn
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mvn	x1, x26
	ldr	w3, [x28]
	add	x4, sp, #24
	mov	x0, x21
	mov	x2, x24
	bl	_bread
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, x0
	ldr	x0, [sp, #24]
	cbnz	w26, LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x0, #8]
	sub	x8, x24, x8
	cmp	x8, x25
	b.ge	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x8
	cbz	x8, LBB0_16
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x0]
	add	x0, x8, x23
	mov	x1, x25
	mov	x2, x20
	bl	_uiomove
	mov	x26, x0
	ldr	x0, [sp, #24]
	cbnz	w26, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, x19
	bl	_vfs_bio_brelse
	str	xzr, [sp, #24]
	ldr	x8, [x20, #8]
	cmp	x8, #0
	b.gt	LBB0_3
LBB0_12:
	mov	w26, #0
LBB0_13:
	mov	x0, x26
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_14:
	bl	_brelse
	b	LBB0_13
LBB0_15:
	cbnz	x0, LBB0_17
	b	LBB0_13
LBB0_16:
	mov	w26, #0
LBB0_17:
	mov	x1, x19
	bl	_vfs_bio_brelse
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ffs_extread: uio->uio_resid < 0"

l_.str.1:                               ; @.str.1
	.asciz	"ffs_extread: uio->uio_offset < 0"

	.comm	_NOCRED,4,2                     ; @NOCRED
	.comm	_FS_UFS2_MAGIC,8,3              ; @FS_UFS2_MAGIC
	.comm	_UIO_READ,8,3                   ; @UIO_READ
	.no_dead_strip	_ffs_extread
.subsections_via_symbols
