	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdev_read
_vdev_read:                             ## @vdev_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, %r12
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	_DIOCGSECTORSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movl	%r15d, %edi
	callq	_ioctl
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.1:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %esi
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%r13), %r14
	movq	%r14, %rdi
	callq	_roundup2
	movq	%r14, %rcx
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	subq	%rax, %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	setne	%al
	movl	-44(%rbp), %esi
	cmpq	%rsi, %r14
	seta	%r14b
	andb	%al, %r14b
	testl	%r12d, %r12d
	movl	$0, %ebx
	cmovneq	%rsi, %rbx
	testb	%r14b, %r14b
	movl	$0, %r13d
	cmovneq	%rsi, %r13
	testl	%r12d, %r12d
	jne	LBB0_3
## %bb.2:
	testb	%r14b, %r14b
	je	LBB0_5
LBB0_3:
	movl	%esi, %edi
	callq	_zfs_alloc
	movq	%rax, %rcx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_22
## %bb.4:
	movl	-44(%rbp), %esi
LBB0_5:
	imull	-72(%rbp), %esi                 ## 4-byte Folded Reload
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_lseek
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.6:
	testq	%r12, %r12
	je	LBB0_10
## %bb.7:
	movl	-44(%rbp), %edx
	movl	%r15d, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	callq	_read
	movl	-44(%rbp), %edi
	cmpq	%rdi, %rax
	jne	LBB0_17
## %bb.8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%r12, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	subl	%r12d, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_min
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_memcpy
	movl	-44(%rbp), %edi
	subl	%r12d, %edi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_min
	movl	%eax, %eax
	addq	%rax, %r12
	jmp	LBB0_11
LBB0_9:
	movq	_errno@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_10:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_11:
	addq	%rbx, %r13
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	cmpq	%r13, %rbx
	je	LBB0_14
## %bb.12:
	subq	%r13, %rbx
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_read
	cmpq	%rbx, %rax
	jne	LBB0_17
## %bb.13:
	addq	%rbx, %r12
LBB0_14:
	xorl	%ebx, %ebx
	testb	%r14b, %r14b
	je	LBB0_19
## %bb.15:
	movl	-44(%rbp), %edx
	movl	%r15d, %edi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_read
	movl	-44(%rbp), %ecx
	cmpq	%rcx, %rax
	jne	LBB0_25
## %bb.16:
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	addl	%ecx, %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	testq	%r14, %r14
	jne	LBB0_21
	jmp	LBB0_23
LBB0_17:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %ebx
LBB0_19:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_23
LBB0_21:
	movl	-44(%rbp), %esi
	movq	%r14, %rdi
	callq	_zfs_free
	jmp	LBB0_23
LBB0_22:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testq	%r14, %r14
	jne	LBB0_21
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_DIOCGSECTORSIZE,4,2            ## @DIOCGSECTORSIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_errno,4,2                      ## @errno
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"vdev_read: out of memory"

	.no_dead_strip	_vdev_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdev_read
_vdev_read:                             ; @vdev_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
Lloh0:
	adrp	x8, _DIOCGSECTORSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DIOCGSECTORSIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x21
	bl	_ioctl
	mov	x23, x0
	cbnz	w0, LBB0_21
; %bb.1:
	ldr	w1, [sp, #12]
	udiv	w24, w20, w1
	msub	w27, w24, w1, w20
	add	x20, x27, x22
	mov	x0, x20
	bl	_roundup2
	mov	x23, x0
	subs	x8, x20, x0
	str	x8, [sp]                        ; 8-byte Folded Spill
	cset	w8, ne
	ldr	w0, [sp, #12]
	cmp	x20, x0
	cset	w9, hi
	cmp	w27, #0
	csel	x28, x0, xzr, ne
	ands	w26, w8, w9
	csel	x25, x0, xzr, ne
	cbnz	w27, LBB0_4
; %bb.2:
	tbnz	w26, #0, LBB0_4
; %bb.3:
	mov	x20, #0
	b	LBB0_6
LBB0_4:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_zfs_alloc
	cbz	x0, LBB0_20
; %bb.5:
	mov	x20, x0
	ldr	w0, [sp, #12]
LBB0_6:
	mul	w1, w0, w24
Lloh3:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_lseek
	cmn	w0, #1
	b.eq	LBB0_18
; %bb.7:
	cbz	w27, LBB0_10
; %bb.8:
	ldr	w2, [sp, #12]
	mov	x0, x21
	mov	x1, x20
	bl	_read
	ldr	w8, [sp, #12]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.9:
	add	x24, x20, x27
	sub	w0, w8, w27
	mov	x1, x22
	bl	_min
	mov	x2, x0
	mov	x0, x19
	mov	x1, x24
	bl	_memcpy
	ldr	w8, [sp, #12]
	sub	w0, w8, w27
	mov	x1, x22
	bl	_min
	add	x19, x19, w0, uxtw
LBB0_10:
	add	x8, x25, x28
	cmp	x23, x8
	b.eq	LBB0_13
; %bb.11:
	sub	x22, x23, x8
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_read
	cmp	x0, x22
	b.ne	LBB0_17
; %bb.12:
	add	x19, x19, x22
LBB0_13:
	tbz	w26, #0, LBB0_16
; %bb.14:
	ldr	w2, [sp, #12]
	mov	x0, x21
	mov	x1, x20
	bl	_read
	ldr	w8, [sp, #12]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.15:
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	add	w2, w8, w9
	mov	x0, x19
	mov	x1, x20
	bl	_memcpy
LBB0_16:
	mov	w23, #0
	cbnz	x20, LBB0_19
	b	LBB0_21
LBB0_17:
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
	cbnz	x20, LBB0_19
	b	LBB0_21
LBB0_18:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	w23, [x8]
	cbz	x20, LBB0_21
LBB0_19:
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_zfs_free
	b	LBB0_21
LBB0_20:
Lloh12:
	adrp	x0, l_str@PAGE
Lloh13:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w23, [x8]
LBB0_21:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DIOCGSECTORSIZE,4,2            ; @DIOCGSECTORSIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_errno,4,2                      ; @errno
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"vdev_read: out of memory"

	.no_dead_strip	_vdev_read
.subsections_via_symbols
