	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmem_clear_poison
_pmem_clear_poison:                     ## @pmem_clear_poison
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_to_dev
	movq	%rax, %rdi
	movq	_BLK_STS_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	(%r14), %ebx
	movl	4(%r14), %esi
	addl	%r15d, %esi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	%r12d, %edx
	callq	_nvdimm_clear_poison
	movq	%rax, %r13
	movq	_BLK_STS_IOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpq	$512, %r13                      ## imm = 0x200
	jl	LBB0_3
## %bb.1:
	movl	%r15d, %eax
	subl	%ebx, %eax
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	leal	511(%rax), %r12d
	testl	%eax, %eax
	cmovnsl	%eax, %r12d
	sarl	$9, %r12d
	movq	%r13, %rbx
	shrq	$9, %rbx
	movl	4(%r14), %esi
	addl	%r15d, %esi
	movq	%r14, %rdi
	movq	%r13, %rdx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_hwpoison_clear
	movslq	%r12d, %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	cmpq	$1024, %r13                     ## imm = 0x400
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %r8
	cmovaeq	%rax, %r8
	leaq	L_.str(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_dev_dbg
	leaq	24(%r14), %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%rbx, %rdx
	callq	_badblocks_clear
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_sysfs_notify_dirent
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
LBB0_3:
	movl	%r12d, %eax
	cmpq	%rax, %r13
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	cmovll	%ecx, %ebx
	addl	8(%r14), %r15d
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_arch_invalidate_pmem
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLK_STS_OK,4,2                 ## @BLK_STS_OK
	.comm	_BLK_STS_IOERR,4,2              ## @BLK_STS_IOERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%#llx clear %ld sector%s\n"

L_.str.1:                               ## @.str.1
	.asciz	"s"

L_.str.2:                               ## @.str.2
	.space	1

	.no_dead_strip	_pmem_clear_poison
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmem_clear_poison
_pmem_clear_poison:                     ; @pmem_clear_poison
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	_to_dev
	mov	x23, x0
Lloh0:
	adrp	x8, _BLK_STS_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLK_STS_OK@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	ldp	w24, w8, [x21]
	add	w1, w8, w20
	mov	x2, x19
	bl	_nvdimm_clear_poison
	mov	x22, x0
Lloh3:
	adrp	x8, _BLK_STS_IOERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BLK_STS_IOERR@GOTPAGEOFF]
Lloh5:
	ldr	w27, [x8]
	cmp	x0, #512
	b.lt	LBB0_3
; %bb.1:
	sub	w8, w20, w24
	add	w9, w8, #511
	cmp	w8, #0
	csel	w28, w9, w8, lt
	asr	w24, w28, #9
	lsr	x25, x22, #9
	ldr	w8, [x21, #4]
	add	w1, w8, w20
	mov	x0, x21
	mov	x2, x22
	bl	_hwpoison_clear
	sbfx	x2, x28, #9, #23
Lloh6:
	adrp	x8, l_.str.2@PAGE
Lloh7:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh8:
	adrp	x9, l_.str.1@PAGE
Lloh9:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x22, #1023
	csel	x4, x9, x8, hi
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x3, x25
	bl	_dev_dbg
	add	x0, x21, #24
	mov	x1, x24
	mov	x2, x25
	bl	_badblocks_clear
	ldr	x0, [x21, #16]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_sysfs_notify_dirent
LBB0_3:
	cmp	x22, w19, uxtw
	csel	w22, w27, w26, lt
	ldr	w8, [x21, #8]
	add	w0, w8, w20
	mov	x1, x19
	bl	_arch_invalidate_pmem
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_BLK_STS_OK,4,2                 ; @BLK_STS_OK
	.comm	_BLK_STS_IOERR,4,2              ; @BLK_STS_IOERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%#llx clear %ld sector%s\n"

l_.str.1:                               ; @.str.1
	.asciz	"s"

l_.str.2:                               ; @.str.2
	.space	1

	.no_dead_strip	_pmem_clear_poison
.subsections_via_symbols
