	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nd_region_probe
_nd_region_probe:                       ## @nd_region_probe
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_to_nd_region
	movq	%rax, %r12
	movq	%rax, %r15
	movq	(%rax), %rbx
	xorl	%eax, %eax
	callq	_num_online_cpus
	cmpq	%rax, %rbx
	jle	LBB0_4
## %bb.1:
	movq	(%r15), %rbx
	xorl	%eax, %eax
	callq	_num_possible_cpus
	cmpq	%rax, %rbx
	jge	LBB0_4
## %bb.2:
	leaq	_nd_region_probe.once(%rip), %rsi
	xorl	%edi, %edi
	callq	_test_and_set_bit
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_num_online_cpus
	movq	%rax, %rbx
	movq	(%r15), %r13
	xorl	%eax, %eax
	callq	_num_possible_cpus
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movq	%r13, %rcx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r15), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_4:
	movq	%r15, %rdi
	callq	_nd_region_activate
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.5:
	movq	%r15, %rdi
	callq	_nd_blk_region_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.6:
	leaq	40(%r12), %rbx
	movq	%rbx, %rdi
	callq	_is_memory
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	addq	$20, %r12
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_devm_init_badblocks
	testq	%rax, %rax
	jne	LBB0_15
## %bb.8:
	movl	40(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_sysfs_get_dirent
	movl	%eax, 44(%r15)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
LBB0_10:
	movq	32(%r15), %rax
	movq	%rax, -48(%rbp)
	movq	24(%r15), %rcx
	addq	%rcx, %rax
	decq	%rax
	movq	%rax, -56(%rbp)
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_nvdimm_badblocks_populate
LBB0_11:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_nd_region_register_namespaces
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_18
## %bb.12:
	movq	%r14, %rdi
	callq	_dev_get_drvdata
	movl	%ebx, (%rax)
	movl	-56(%rbp), %ecx
	leal	(%rcx,%rbx), %edx
	movl	%edx, 4(%rax)
	testl	%ebx, %ebx
	je	LBB0_16
## %bb.13:
	testl	%ecx, %ecx
	je	LBB0_16
## %bb.14:
	cmpl	%ecx, %ebx
	jne	LBB0_16
LBB0_15:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%r15, %rdi
	callq	_nd_btt_create
	movl	%eax, 16(%r15)
	movq	%r15, %rdi
	callq	_nd_pfn_create
	movl	%eax, 12(%r15)
	movq	%r15, %rdi
	callq	_nd_dax_create
	movl	%eax, 8(%r15)
	movl	-56(%rbp), %edx
	xorl	%ebx, %ebx
	testl	%edx, %edx
	je	LBB0_18
## %bb.17:
	cmpl	$1, %edx
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.6(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_nd_region_probe.once,8,3 ## @nd_region_probe.once
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"online cpus (%d) < concurrent i/o lanes (%d) < possible cpus (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"setting nr_cpus=%d may yield better libnvdimm device performance\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"badblocks"

L_.str.3:                               ## @.str.3
	.asciz	"'badblocks' notification disabled\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to register %d namespace%s, continuing...\n"

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

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

	.no_dead_strip	_nd_region_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nd_region_probe
_nd_region_probe:                       ; @nd_region_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	bl	_to_nd_region
	mov	x20, x0
	ldr	x21, [x0]
	bl	_num_online_cpus
	cmp	x21, x0
	b.le	LBB0_4
; %bb.1:
	ldr	x21, [x20]
	bl	_num_possible_cpus
	cmp	x21, x0
	b.ge	LBB0_4
; %bb.2:
Lloh0:
	adrp	x1, _nd_region_probe.once@PAGE
Lloh1:
	add	x1, x1, _nd_region_probe.once@PAGEOFF
	mov	w0, #0
	bl	_test_and_set_bit
	cbnz	w0, LBB0_4
; %bb.3:
	bl	_num_online_cpus
	mov	x21, x0
	ldr	x22, [x20]
	bl	_num_possible_cpus
	stp	x22, x0, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_dbg
	ldr	x2, [x20]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_4:
	mov	x0, x20
	bl	_nd_region_activate
	mov	x21, x0
	cbnz	w0, LBB0_19
; %bb.5:
	mov	x0, x20
	bl	_nd_blk_region_init
	mov	x21, x0
	cbnz	w0, LBB0_19
; %bb.6:
	add	x22, x20, #40
	mov	x0, x22
	bl	_is_memory
	cbz	x0, LBB0_11
; %bb.7:
	add	x21, x20, #20
	mov	x0, x19
	mov	x1, x21
	bl	_devm_init_badblocks
	cbnz	x0, LBB0_15
; %bb.8:
	ldr	w0, [x20, #40]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_sysfs_get_dirent
	str	w0, [x20, #44]
	cbnz	w0, LBB0_10
; %bb.9:
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	bl	_dev_warn
LBB0_10:
	ldp	x9, x8, [x20, #24]
	add	x9, x8, x9
	sub	x9, x9, #1
	stp	x9, x8, [sp, #16]
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x21
	bl	_nvdimm_badblocks_populate
LBB0_11:
	add	x1, sp, #16
	mov	x0, x20
	bl	_nd_region_register_namespaces
	mov	x21, x0
	tbnz	w0, #31, LBB0_19
; %bb.12:
	mov	x0, x19
	bl	_dev_get_drvdata
	str	w21, [x0]
	ldr	w8, [sp, #16]
	add	w9, w8, w21
	str	w9, [x0, #4]
	cbz	w21, LBB0_16
; %bb.13:
	cbz	w8, LBB0_16
; %bb.14:
	cmp	w21, w8
	b.ne	LBB0_16
LBB0_15:
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_19
LBB0_16:
	mov	x0, x20
	bl	_nd_btt_create
	str	w0, [x20, #16]
	mov	x0, x20
	bl	_nd_pfn_create
	str	w0, [x20, #12]
	mov	x0, x20
	bl	_nd_dax_create
	str	w0, [x20, #8]
	ldr	w2, [sp, #16]
	cbz	w2, LBB0_18
; %bb.17:
Lloh13:
	adrp	x8, l_.str.6@PAGE
Lloh14:
	add	x8, x8, l_.str.6@PAGEOFF
Lloh15:
	adrp	x9, l_.str.5@PAGE
Lloh16:
	add	x9, x9, l_.str.5@PAGEOFF
	cmp	w2, #1
	csel	x3, x9, x8, eq
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_18:
	mov	w21, #0
LBB0_19:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_nd_region_probe.once,8,3 ; @nd_region_probe.once
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"online cpus (%d) < concurrent i/o lanes (%d) < possible cpus (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"setting nr_cpus=%d may yield better libnvdimm device performance\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"badblocks"

l_.str.3:                               ; @.str.3
	.asciz	"'badblocks' notification disabled\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to register %d namespace%s, continuing...\n"

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

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

	.no_dead_strip	_nd_region_probe
.subsections_via_symbols
