	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvdimm_clear_badblocks_region
_nvdimm_clear_badblocks_region:         ## @nvdimm_clear_badblocks_region
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_is_memory
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	callq	_to_nd_region
	movq	(%rax), %rdx
	movq	(%r15), %rsi
	movq	%rsi, %rcx
	subq	%rdx, %rcx
	jl	LBB0_5
## %bb.2:
	movq	%rax, %r14
	addq	8(%rax), %rdx
	movslq	8(%r15), %rax
	addq	%rax, %rsi
	cmpq	%rdx, %rsi
	jge	LBB0_5
## %bb.3:
	leaq	511(%rcx), %rsi
	testq	%rcx, %rcx
	cmovnsq	%rcx, %rsi
	shrq	$9, %rsi
	movq	%r14, %rdi
	addq	$24, %rdi
	leal	511(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$9, %edx
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_badblocks_clear
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_sysfs_notify_dirent
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nvdimm_clear_badblocks_region
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvdimm_clear_badblocks_region
_nvdimm_clear_badblocks_region:         ; @nvdimm_clear_badblocks_region
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_is_memory
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_to_nd_region
	ldr	x9, [x0]
	ldr	x10, [x20]
	subs	x8, x10, x9
	b.lt	LBB0_5
; %bb.2:
	mov	x19, x0
	ldr	x11, [x0, #8]
	add	x11, x11, x9
	ldrsw	x9, [x20, #8]
	add	x10, x10, x9
	cmp	x10, x11
	b.ge	LBB0_5
; %bb.3:
	add	x10, x8, #511
	cmp	x8, #0
	csel	x8, x10, x8, lt
	lsr	x1, x8, #9
	add	x0, x19, #24
	add	w8, w9, #511
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w2, w8, #9
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_badblocks_clear
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_sysfs_notify_dirent
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nvdimm_clear_badblocks_region
.subsections_via_symbols
