	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nd_region_register_namespaces  ## -- Begin function nd_region_register_namespaces
	.p2align	4, 0x90
_nd_region_register_namespaces:         ## @nd_region_register_namespaces
	.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	%rsi, %rbx
	movq	%rdi, %r12
	movl	$0, (%rsi)
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_nvdimm_bus_lock
	movq	%r12, %rdi
	callq	_init_active_labels
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_nvdimm_bus_unlock
	jmp	LBB0_28
LBB0_2:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_nd_region_to_nstype
	movl	%eax, %r13d
	cmpl	$128, %eax
	je	LBB0_5
## %bb.3:
	cmpl	$129, %r13d
	je	LBB0_6
## %bb.4:
	cmpl	$130, %r13d
	jne	LBB0_23
LBB0_5:
	movq	%r12, %rdi
	callq	_create_namespaces
	jmp	LBB0_7
LBB0_6:
	movq	%r12, %rdi
	callq	_create_namespace_io
LBB0_7:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_nvdimm_bus_unlock
	testq	%rbx, %rbx
	je	LBB0_24
## %bb.8:
	movq	(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_25
## %bb.9:
	leaq	12(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%r15d, %ecx
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	8(%r12), %edx
	movq	%r14, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_set_name
	movq	_nd_namespace_attribute_groups@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_nd_device_register
	movq	8(%rbx,%r15,8), %r14
	incq	%r15
	testq	%r14, %r14
	je	LBB0_17
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$128, %r13d
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$130, %r13d
	jne	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r14, %rdi
	callq	_to_nd_namespace_blk
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	%r14, %rdi
	callq	_to_nd_namespace_pmem
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	%rax, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ida_simple_get
	movl	%eax, %ecx
	movl	%eax, (%rbx)
	testl	%eax, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jns	LBB0_11
LBB0_17:
	movl	%r15d, %eax
	testl	%r15d, %r15d
	je	LBB0_19
## %bb.18:
	movq	(%rbx), %rcx
	movq	%rcx, (%r12)
LBB0_19:
	movq	(%rbx,%rax,8), %r14
	testq	%r14, %r14
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_26
## %bb.20:
	leaq	(%rbx,%rax,8), %r12
	addq	$8, %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_device_initialize
	movq	%r14, %rdi
	callq	_put_device
	movq	(%r12,%rbx,8), %r14
	incq	%rbx
	testq	%r14, %r14
	jne	LBB0_21
## %bb.22:
	movl	%ebx, (%r13)
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	xorl	%eax, %eax
	testl	%ebx, %ebx
	cmovnel	%eax, %r14d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_27
LBB0_23:
	movq	%r14, %rdi
	callq	_nvdimm_bus_unlock
LBB0_24:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_28
LBB0_25:
	xorl	%r15d, %r15d
LBB0_26:
	xorl	%r14d, %r14d
LBB0_27:
	movq	%rbx, %rdi
	callq	_kfree
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r14d, %eax
	cmovel	%r14d, %r15d
LBB0_28:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"namespace%d.%d"

	.comm	_nd_namespace_attribute_groups,4,2 ## @nd_namespace_attribute_groups
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nd_region_register_namespaces  ; -- Begin function nd_region_register_namespaces
	.p2align	2
_nd_region_register_namespaces:         ; @nd_region_register_namespaces
	.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, x1
	mov	x21, x0
	str	wzr, [x1]
	add	x23, x0, #16
	mov	x0, x23
	bl	_nvdimm_bus_lock
	mov	x0, x21
	bl	_init_active_labels
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	mov	x0, x23
	bl	_nvdimm_bus_unlock
	b	LBB0_29
LBB0_2:
	mov	x0, x21
	bl	_nd_region_to_nstype
	mov	x22, x0
	cmp	w0, #128
	b.eq	LBB0_5
; %bb.3:
	cmp	w22, #129
	b.eq	LBB0_6
; %bb.4:
	cmp	w22, #130
	b.ne	LBB0_24
LBB0_5:
	mov	x0, x21
	bl	_create_namespaces
	b	LBB0_7
LBB0_6:
	mov	x0, x21
	bl	_create_namespace_io
LBB0_7:
	mov	x20, x0
	mov	x0, x23
	bl	_nvdimm_bus_unlock
	cbz	x20, LBB0_25
; %bb.8:
	ldr	x24, [x20]
	cbz	x24, LBB0_26
; %bb.9:
	mov	x27, #0
	add	x23, x21, #12
Lloh0:
	adrp	x28, _nd_namespace_attribute_groups@GOTPAGE
Lloh1:
	ldr	x28, [x28, _nd_namespace_attribute_groups@GOTPAGEOFF]
Lloh2:
	adrp	x25, l_.str@PAGE
Lloh3:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x3, x27
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w2, [x21, #8]
	mov	x0, x24
	mov	x1, x25
	bl	_dev_set_name
	ldr	w8, [x28]
	str	w8, [x24]
	mov	x0, x24
	bl	_nd_device_register
	add	x26, x27, #1
	add	x8, x20, x27, lsl #3
	ldr	x24, [x8, #8]
	mov	x27, x26
	cbz	x24, LBB0_18
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	cmp	w22, #128
	b.eq	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w22, #130
	b.ne	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x24
	bl	_to_nd_namespace_blk
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x24
	bl	_to_nd_namespace_pmem
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x26, x0
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	mov	x0, x23
	mov	w1, #0
	mov	w2, #0
	bl	_ida_simple_get
	mov	x3, x0
	str	w0, [x26]
	tbz	w0, #31, LBB0_11
; %bb.17:
	mov	x26, x27
LBB0_18:
	and	x8, x26, #0xffffffff
	cbz	w26, LBB0_20
; %bb.19:
	ldr	x9, [x20]
	str	x9, [x21]
LBB0_20:
	ldr	x21, [x20, x8, lsl #3]
	cbz	x21, LBB0_27
; %bb.21:
	mov	x22, #0
	add	x8, x20, x8, lsl #3
	add	x23, x8, #8
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_device_initialize
	mov	x0, x21
	bl	_put_device
	ldr	x21, [x23, x22, lsl #3]
	add	x22, x22, #1
	cbnz	x21, LBB0_22
; %bb.23:
	str	w22, [x19]
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w22, #0
	csneg	w19, wzr, w8, ne
	b	LBB0_28
LBB0_24:
	mov	x0, x23
	bl	_nvdimm_bus_unlock
LBB0_25:
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_29
LBB0_26:
	mov	w26, #0
LBB0_27:
	mov	w19, #0
LBB0_28:
	mov	x0, x20
	bl	_kfree
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmn	w19, w8
	csel	w20, w19, w26, eq
LBB0_29:
	mov	x0, x20
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"namespace%d.%d"

	.comm	_nd_namespace_attribute_groups,4,2 ; @nd_namespace_attribute_groups
.subsections_via_symbols
