	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvdimm_clear_poison            ## -- Begin function nvdimm_clear_poison
	.p2align	4, 0x90
_nvdimm_clear_poison:                   ## @nvdimm_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	$56, %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, %ebx
	callq	_walk_to_nvdimm_bus
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r14
	movq	(%rax), %r15
	cmpq	$0, (%r15)
	je	LBB0_8
## %bb.2:
	leaq	-72(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, -72(%rbp)
	movl	%r12d, -68(%rbp)
	xorl	%eax, %eax
	callq	_memalloc_noio_save
	movl	%eax, %r13d
	movq	_ND_CMD_ARS_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %r9
	movq	%r15, %rdi
	xorl	%esi, %esi
	leaq	-72(%rbp), %rcx
	movl	$24, %r8d
	callq	*(%r15)
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_memalloc_noio_restore
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.3:
	movslq	-44(%rbp), %rax
	testq	%rax, %rax
	js	LBB0_10
## %bb.4:
	movl	-64(%rbp), %r13d
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.5:
	movl	%r13d, %edi
	callq	_is_power_of_2
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	decl	%r13d
	movl	%r12d, %eax
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	orl	%ebx, %eax
	testl	%eax, %r13d
	je	LBB0_11
LBB0_7:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
	jmp	LBB0_10
LBB0_8:
	movl	%r12d, %eax
	jmp	LBB0_10
LBB0_11:
	leaq	-96(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	%ebx, -96(%rbp)
	movl	%r12d, -92(%rbp)
	xorl	%eax, %eax
	callq	_memalloc_noio_save
	movl	%eax, %r12d
	movq	_ND_CMD_CLEAR_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %r9
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r13, %rcx
	movl	$24, %r8d
	callq	*(%r15)
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_memalloc_noio_restore
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.12:
	movslq	-44(%rbp), %rax
	testq	%rax, %rax
	js	LBB0_10
## %bb.13:
	movq	-80(%rbp), %rdx
	movq	%r14, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_nvdimm_account_cleared_poison
	movq	-80(%rbp), %rax
	jmp	LBB0_10
LBB0_9:
	movslq	%ebx, %rax
LBB0_10:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,8,3                      ## @ENXIO
	.comm	_ND_CMD_ARS_CAP,4,2             ## @ND_CMD_ARS_CAP
	.comm	_ND_CMD_CLEAR_ERROR,4,2         ## @ND_CMD_CLEAR_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvdimm_clear_poison            ; -- Begin function nvdimm_clear_poison
	.p2align	2
_nvdimm_clear_poison:                   ; @nvdimm_clear_poison
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x2
	mov	x19, x1
	bl	_walk_to_nvdimm_bus
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	x21, [x0]
	ldr	x8, [x21]
	cbz	x8, LBB0_8
; %bb.2:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	stp	w19, w22, [sp, #16]
	bl	_memalloc_noio_save
	mov	x24, x0
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _ND_CMD_ARS_CAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ND_CMD_ARS_CAP@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
	add	x3, sp, #16
	add	x5, sp, #12
	mov	x0, x21
	mov	x1, #0
	mov	w4, #24
	blr	x8
	mov	x23, x0
	mov	x0, x24
	bl	_memalloc_noio_restore
	tbnz	w23, #31, LBB0_9
; %bb.3:
	ldrsw	x0, [sp, #12]
	tbnz	w0, #31, LBB0_10
; %bb.4:
	ldr	w23, [sp, #24]
	cbz	w23, LBB0_7
; %bb.5:
	mov	x0, x23
	bl	_is_power_of_2
	cbz	w0, LBB0_7
; %bb.6:
	sub	w8, w23, #1
	orr	w9, w22, w19
	tst	w8, w9
	b.eq	LBB0_11
LBB0_7:
Lloh3:
	adrp	x8, _ENXIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	neg	x0, x8
	b	LBB0_10
LBB0_8:
	mov	w0, w22
	b	LBB0_10
LBB0_9:
	sxtw	x0, w23
LBB0_10:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_11:
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	stp	w19, w22, [sp, #40]
	bl	_memalloc_noio_save
	mov	x22, x0
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _ND_CMD_CLEAR_ERROR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ND_CMD_CLEAR_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x9]
	add	x3, sp, #40
	add	x5, sp, #12
	mov	x0, x21
	mov	x1, #0
	mov	w4, #24
	blr	x8
	mov	x21, x0
	mov	x0, x22
	bl	_memalloc_noio_restore
	tbnz	w21, #31, LBB0_14
; %bb.12:
	ldrsw	x0, [sp, #12]
	tbnz	w0, #31, LBB0_10
; %bb.13:
	ldr	x2, [sp, #56]
	mov	x0, x20
	mov	x1, x19
	bl	_nvdimm_account_cleared_poison
	ldr	x0, [sp, #56]
	b	LBB0_10
LBB0_14:
	sxtw	x0, w21
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,8,3                      ; @ENXIO
	.comm	_ND_CMD_ARS_CAP,4,2             ; @ND_CMD_ARS_CAP
	.comm	_ND_CMD_CLEAR_ERROR,4,2         ; @ND_CMD_CLEAR_ERROR
.subsections_via_symbols
