	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nsio_rw_bytes
_nsio_rw_bytes:                         ## @nsio_rw_bytes
	.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	%r9, -64(%rbp)                  ## 8-byte Spill
	movl	%r8d, -72(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r14
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r15
	callq	_to_nd_namespace_io
	movq	%rax, %rbx
	movl	%r13d, %edi
	andl	$511, %edi                      ## imm = 0x1FF
	addq	%r14, %rdi
	movl	$512, %esi                      ## imm = 0x200
	callq	_ALIGN
	movl	%eax, %r12d
	xorl	%edi, %edi
	testq	%r14, %r14
	sete	%dil
	callq	_unlikely
	xorl	%ecx, %ecx
	testq	%rax, %rax
	jne	LBB0_18
## %bb.1:
	movl	%r12d, -80(%rbp)                ## 4-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movslq	%r13d, %r12
	leaq	(%r12,%r14), %rax
	movslq	(%rbx), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	seta	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_dev_WARN_ONCE
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	movl	%r13d, %r15d
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movl	%r13d, %r12d
	sarl	$9, %r12d
	movq	_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	%rbx, %r13
	addq	$8, %r13
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	-80(%rbp), %edx                 ## 4-byte Reload
	callq	_is_bad_pmem
	movl	%eax, %edi
	callq	_unlikely
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	cmpl	-72(%rbp), %ecx                 ## 4-byte Folded Reload
	jne	LBB0_8
## %bb.4:
	testq	%rax, %rax
	jne	LBB0_5
## %bb.7:
	addl	4(%rbx), %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movq	%r14, %rdx
	callq	_memcpy_mcsafe
	testq	%rax, %rax
	movl	$0, %ecx
	je	LBB0_18
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_18:
	movl	%ecx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, %r13
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movl	%r12d, %r14d
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	$512, %esi                      ## imm = 0x200
	callq	_IS_ALIGNED
	testq	%rax, %rax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_16
## %bb.11:
	movq	%r13, %rdi
	movl	$512, %esi                      ## imm = 0x200
	callq	_IS_ALIGNED
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:
	movq	_NVDIMM_IO_ATOMIC@GOTPCREL(%rip), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, (%rax)
	je	LBB0_13
LBB0_16:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_9:
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_17:
	addl	4(%rbx), %r15d
	movl	%r15d, %edi
	movq	%r13, %rdx
	callq	_memcpy_flushcache
	movl	(%r12), %edi
	callq	_to_nd_region
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_nvdimm_flush
	testl	%eax, %eax
	cmovnel	%eax, %r14d
	movl	%r14d, %ecx
	jmp	LBB0_18
LBB0_13:
	xorl	%eax, %eax
	callq	_might_sleep
	movl	12(%rbx), %esi
	addl	%r15d, %esi
	movq	%r12, %rdi
	movq	%r13, %rdx
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	callq	_nvdimm_clear_poison
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	subl	(%rcx), %edx
	cmpq	-88(%rbp), %rax                 ## 8-byte Folded Reload
	movl	$0, %ecx
	cmovael	%ecx, %edx
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	cmpq	$512, %rax                      ## imm = 0x200
	jl	LBB0_15
## %bb.14:
	shrq	$9, %rax
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movq	%rax, %rdx
	callq	_badblocks_clear
LBB0_15:
	movl	4(%rbx), %edi
	addl	%r15d, %edi
	movq	%r13, %rsi
	callq	_arch_invalidate_pmem
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	-64(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"request out of range\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_READ,4,2                       ## @READ
	.comm	_EIO,4,2                        ## @EIO
	.comm	_NVDIMM_IO_ATOMIC,8,3           ## @NVDIMM_IO_ATOMIC
	.no_dead_strip	_nsio_rw_bytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nsio_rw_bytes
_nsio_rw_bytes:                         ; @nsio_rw_bytes
	.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	x24, x5
	mov	x27, x4
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	bl	_to_nd_namespace_io
	mov	x23, x0
	and	w8, w22, #0x1ff
	add	x0, x8, x19
	mov	w1, #512
	bl	_ALIGN
	mov	x25, x0
	cmp	x19, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_9
LBB0_2:
	sxtw	x28, w22
	ldrsw	x8, [x23]
	add	x9, x28, x19
	cmp	x9, x8
	cset	w0, hi
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	w1, #1
	bl	_dev_WARN_ONCE
Lloh2:
	adrp	x8, _EFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	str	x20, [sp]                       ; 8-byte Folded Spill
	asr	w20, w22, #9
Lloh4:
	adrp	x8, _READ@GOTPAGE
Lloh5:
	ldr	x8, [x8, _READ@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	add	x26, x23, #8
	mov	x0, x26
	mov	x1, x20
	mov	x2, x25
	bl	_is_bad_pmem
	bl	_unlikely
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, w27
	b.ne	LBB0_10
; %bb.5:
	cbnz	x0, LBB0_7
; %bb.6:
	ldr	w8, [x23, #4]
	add	w1, w8, w22
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	mov	x2, x19
	bl	_memcpy_mcsafe
	cbz	x0, LBB0_9
LBB0_7:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
LBB0_10:
	cbz	x0, LBB0_15
; %bb.11:
	mov	x25, x20
	mov	x0, x28
	mov	w1, #512
	bl	_IS_ALIGNED
	ldr	x20, [sp]                       ; 8-byte Folded Reload
	cbz	x0, LBB0_14
; %bb.12:
	mov	x0, x19
	mov	w1, #512
	bl	_IS_ALIGNED
	cbz	x0, LBB0_14
; %bb.13:
Lloh9:
	adrp	x8, _NVDIMM_IO_ATOMIC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NVDIMM_IO_ATOMIC@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	tst	x8, x24
	b.eq	LBB0_17
LBB0_14:
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_16
LBB0_15:
	mov	w24, #0
	ldr	x20, [sp]                       ; 8-byte Folded Reload
LBB0_16:
	ldr	w8, [x23, #4]
	add	w0, w8, w22
	mov	x1, x20
	mov	x2, x19
	bl	_memcpy_flushcache
	ldr	w0, [x21]
	bl	_to_nd_region
	mov	x1, #0
	bl	_nvdimm_flush
	cmp	w0, #0
	csel	w0, w24, w0, eq
	b	LBB0_9
LBB0_17:
	bl	_might_sleep
	ldr	w8, [x23, #12]
	add	w1, w8, w22
	mov	x0, x21
	mov	x2, x19
	bl	_nvdimm_clear_poison
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	x0, x19
	csneg	w24, wzr, w8, hs
	cmp	x0, #512
	b.lt	LBB0_19
; %bb.18:
	lsr	x2, x0, #9
	mov	x0, x26
	mov	x1, x25
	bl	_badblocks_clear
LBB0_19:
	ldr	w8, [x23, #4]
	add	w0, w8, w22
	mov	x1, x19
	bl	_arch_invalidate_pmem
	b	LBB0_16
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"request out of range\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_READ,4,2                       ; @READ
	.comm	_EIO,4,2                        ; @EIO
	.comm	_NVDIMM_IO_ATOMIC,8,3           ; @NVDIMM_IO_ATOMIC
	.no_dead_strip	_nsio_rw_bytes
.subsections_via_symbols
