	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vn_rdwr                        ## -- Begin function vn_rdwr
	.p2align	4, 0x90
_vn_rdwr:                               ## @vn_rdwr
	.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	%r8, %r15
	movl	%ecx, %r14d
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	_UIO_READ@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_3
## %bb.1:
	movl	4(%r12), %edi
	movq	%r13, %rsi
	movl	%r14d, %edx
	movq	%r15, %rcx
	callq	_pread64
	movl	%eax, %ebx
	movl	(%r12), %edi
	cmpl	$-1, %edi
	je	LBB0_7
## %bb.2:
	movq	%r13, %rsi
	movl	%ebx, %edx
	movq	%r15, %rcx
	callq	_pwrite64
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	callq	_ASSERT
LBB0_7:
	cmpl	$-1, %ebx
	je	LBB0_8
LBB0_9:
	movq	40(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	subl	%ebx, %r14d
	movl	%r14d, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_3:
	movq	_SPA_MINBLOCKSHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %ebx
	sarl	%cl, %ebx
	testl	%ebx, %ebx
	jle	LBB0_4
## %bb.5:
	xorl	%eax, %eax
	callq	_rand
	cltd
	idivl	%ebx
	movl	%edx, %ebx
	movq	_SPA_MINBLOCKSHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_6
LBB0_11:
	xorl	%eax, %eax
	cmpl	%r14d, %ebx
	je	LBB0_14
## %bb.12:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_4:
	xorl	%ebx, %ebx
LBB0_6:
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	movl	4(%r12), %edi
	movq	%r13, %rsi
	movl	%ebx, %edx
	movq	%r15, %rcx
	callq	_pwrite64
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%r12), %edi
	movslq	%ebx, %rcx
	addq	%rcx, %r13
	movl	%r14d, %edx
	subl	%ecx, %edx
	addq	%r15, %rcx
	movq	%r13, %rsi
	callq	_pwrite64
	movl	%eax, %ebx
	addl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	cmpl	$-1, %ebx
	jne	LBB0_9
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UIO_READ,4,2                   ## @UIO_READ
	.comm	_SPA_MINBLOCKSHIFT,4,2          ## @SPA_MINBLOCKSHIFT
	.comm	_errno,4,2                      ## @errno
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vn_rdwr                        ; -- Begin function vn_rdwr
	.p2align	2
_vn_rdwr:                               ; @vn_rdwr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x4
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
Lloh0:
	adrp	x8, _UIO_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UIO_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ne	LBB0_6
; %bb.1:
	ldr	w0, [x22, #4]
	mov	x1, x21
	mov	x2, x19
	mov	x3, x20
	bl	_pread64
	mov	x23, x0
	ldr	w0, [x22]
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.2:
	mov	x1, x21
	mov	x2, x23
	mov	x3, x20
	bl	_pwrite64
	cmn	w0, #1
	cset	w0, ne
	bl	_ASSERT
LBB0_3:
	cmn	w23, #1
	b.eq	LBB0_11
LBB0_4:
	ldr	x8, [x29, #24]
	cbz	x8, LBB0_8
; %bb.5:
	mov	w0, #0
	sub	w9, w19, w23
	str	w9, [x8]
	b	LBB0_12
LBB0_6:
Lloh3:
	adrp	x23, _SPA_MINBLOCKSHIFT@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SPA_MINBLOCKSHIFT@GOTPAGEOFF]
	ldr	w8, [x23]
	asr	w24, w19, w8
	cmp	w24, #1
	b.lt	LBB0_9
; %bb.7:
	bl	_rand
	sdiv	w8, w0, w24
	msub	w9, w8, w24, w0
	ldr	w8, [x23]
	b	LBB0_10
LBB0_8:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w23, w19
	csel	w0, wzr, w8, eq
	b	LBB0_12
LBB0_9:
	mov	w9, #0
LBB0_10:
	lsl	w23, w9, w8
	ldr	w0, [x22, #4]
	mov	x1, x21
	mov	x2, x23
	mov	x3, x20
	bl	_pwrite64
	mov	x24, x0
	ldr	w0, [x22, #4]
	sxtw	x8, w23
	add	x1, x21, x8
	sub	w2, w19, w23
	add	x3, x8, x20
	bl	_pwrite64
	add	w23, w0, w24
	cmn	w23, #1
	b.ne	LBB0_4
LBB0_11:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_UIO_READ,4,2                   ; @UIO_READ
	.comm	_SPA_MINBLOCKSHIFT,4,2          ; @SPA_MINBLOCKSHIFT
	.comm	_errno,4,2                      ; @errno
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
