	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdev_write
_vdev_write:                            ## @vdev_write
	.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	%rcx, %r15
	movq	_DEV_BSIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	leaq	-1(%rcx), %rdi
	movl	$-1, %eax
	testl	%edx, %edi
	jne	LBB0_11
## %bb.1:
	movq	%r8, %rbx
	testq	%r8, %rdi
	jne	LBB0_11
## %bb.2:
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.3:
	movl	%edx, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r13d
	addl	(%rsi), %r13d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ecx, %rsi
	movq	%rbx, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rsi
	movq	%rax, %r14
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r14d
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_READ_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	%ecx
	cmpl	%r14d, %eax
	cmovbl	%eax, %r14d
	movq	_dmadat@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	(%rax), %edi
	imull	%r14d, %ecx
	movq	%r15, %rsi
	movl	%ecx, %edx
	callq	_memcpy
	movq	(%r12), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %edx
	movl	%r14d, %ecx
	callq	_drvwrite
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_DEV_BSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	imull	%r14d, %eax
	addq	%rax, %r15
	addl	%r14d, %r13d
	subq	%rax, %rbx
	jne	LBB0_4
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_8:
	movl	$-1, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEV_BSIZE,4,2                  ## @DEV_BSIZE
	.comm	_READ_BUF_SIZE,4,2              ## @READ_BUF_SIZE
	.comm	_dmadat,8,3                     ## @dmadat
	.no_dead_strip	_vdev_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdev_write
_vdev_write:                            ; @vdev_write
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x24, _DEV_BSIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DEV_BSIZE@GOTPAGEOFF]
	ldrsw	x8, [x24]
	sub	x9, x8, #1
	tst	w9, w2
	b.ne	LBB0_2
; %bb.1:
	mov	x19, x4
	tst	x9, x4
	b.eq	LBB0_4
LBB0_2:
	mov	w0, #-1
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
	cbz	x19, LBB0_8
; %bb.5:
	mov	x20, x3
	mov	x21, x1
	sdiv	w9, w2, w8
	ldr	w10, [x1]
	add	w22, w9, w10
Lloh2:
	adrp	x25, _READ_BUF_SIZE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _READ_BUF_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x26, _dmadat@GOTPAGE
Lloh5:
	ldr	x26, [x26, _dmadat@GOTPAGEOFF]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x9, w8
	ldr	w10, [x25]
	sdiv	w10, w10, w8
	udiv	x9, x19, x9
	cmp	w10, w9
	csel	w23, w10, w9, lo
	ldr	x9, [x26]
	ldr	w0, [x9]
	mul	w2, w23, w8
	mov	x1, x20
	bl	_memcpy
	ldr	x8, [x26]
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x22
	mov	x3, x23
	bl	_drvwrite
	cbnz	x0, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x24]
	mul	w9, w8, w23
	add	x20, x20, x9
	add	w22, w23, w22
	subs	x19, x19, x9
	b.ne	LBB0_6
LBB0_8:
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_DEV_BSIZE,4,2                  ; @DEV_BSIZE
	.comm	_READ_BUF_SIZE,4,2              ; @READ_BUF_SIZE
	.comm	_dmadat,8,3                     ; @dmadat
	.no_dead_strip	_vdev_write
.subsections_via_symbols
