	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nd_region_activate             ## -- Begin function nd_region_activate
	.p2align	4, 0x90
_nd_region_activate:                    ## @nd_region_activate
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	4(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_nvdimm_bus_lock
	cmpl	$0, (%r14)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_1
## %bb.2:
	movl	$8, %r15d
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %r12
	movq	_NDD_SECURITY_OVERWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_27
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %esi
	movl	%r13d, %edi
	callq	_min_not_zero
	movl	%eax, %r13d
	movslq	(%r12), %rax
	leaq	(,%rax,8), %rcx
	testq	%rax, %rax
	cmoveq	%rax, %rcx
	addq	%rcx, %r15
	addq	$8, %r15
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
## %bb.5:
	addl	$4, %r15d
	jmp	LBB0_6
LBB0_1:
	xorl	%r13d, %r13d
	movl	$12, %r15d
LBB0_6:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_nvdimm_bus_unlock
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movq	%rax, %r12
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_dev_set_drvdata
	xorl	%r15d, %r15d
	testl	%r13d, %r13d
	je	LBB0_26
## %bb.10:
	movl	%r13d, %edi
	callq	_ilog2
	movl	%eax, (%r12)
	cmpl	$0, (%r14)
	jle	LBB0_26
## %bb.11:
	xorl	%ebx, %ebx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rsi
	movq	%r13, %rdi
	movl	%ebx, %edx
	movq	%r12, %rcx
	callq	_nvdimm_map_flush
	testl	%eax, %eax
	jne	LBB0_28
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
## %bb.14:
	xorl	%r15d, %r15d
	cmpl	$2, %eax
	jl	LBB0_26
## %bb.15:
	xorl	%r15d, %r15d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	(%r14), %eax
	incl	%r15d
	movl	%r15d, %ebx
LBB0_24:                                ##   in Loop: Header=BB0_16 Depth=1
	decl	%eax
	movl	%ebx, %r15d
	cmpl	%eax, %ebx
	jge	LBB0_25
LBB0_16:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_ndrd_get_flush_wpq
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	leal	1(%r15), %ebx
	movl	(%r14), %eax
	cmpl	%eax, %ebx
	jge	LBB0_24
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=2
	incl	%ebx
	movl	(%r14), %eax
	cmpl	%eax, %ebx
	jge	LBB0_23
LBB0_20:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_ndrd_get_flush_wpq
	movq	%rax, %r13
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_ndrd_get_flush_wpq
	cmpq	%rax, %r13
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=2
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ndrd_set_flush_wpq
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_24
LBB0_27:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_nvdimm_bus_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_26:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	movl	%eax, %r15d
	jmp	LBB0_26
LBB0_25:
	xorl	%r15d, %r15d
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_NDD_SECURITY_OVERWRITE,4,2     ## @NDD_SECURITY_OVERWRITE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nd_region_activate             ; -- Begin function nd_region_activate
	.p2align	2
_nd_region_activate:                    ; @nd_region_activate
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	add	x20, x0, #4
	mov	x0, x20
	bl	_nvdimm_bus_lock
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x21, #0
	mov	w22, #0
	mov	w23, #8
Lloh0:
	adrp	x24, _NDD_SECURITY_OVERWRITE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _NDD_SECURITY_OVERWRITE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x25, [x8, x21, lsl #3]
	ldr	w0, [x24]
	add	x1, x25, #4
	bl	_test_bit
	cbnz	x0, LBB0_23
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x25]
	mov	x0, x22
	bl	_min_not_zero
	mov	x22, x0
	ldrsw	x8, [x25]
	lsl	x9, x8, #3
	cmp	w8, #0
	csel	x8, xzr, x9, eq
	add	x8, x23, x8
	add	x23, x8, #8
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.lt	LBB0_2
; %bb.4:
	add	w21, w23, #4
	b	LBB0_6
LBB0_5:
	mov	w22, #0
	mov	w21, #12
LBB0_6:
	mov	x0, x20
	bl	_nvdimm_bus_unlock
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_devm_kzalloc
	cbz	x0, LBB0_24
; %bb.7:
	mov	x21, x0
	mov	x0, x20
	mov	x1, x21
	bl	_dev_set_drvdata
	cbz	w22, LBB0_22
; %bb.8:
	mov	x0, x22
	bl	_ilog2
	str	w0, [x21]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.9:
	mov	x22, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x1, [x8, x22, lsl #3]
	mov	x0, x20
	mov	x2, x22
	mov	x3, x21
	bl	_nvdimm_map_flush
	cbnz	w0, LBB0_26
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.lt	LBB0_10
; %bb.12:
	cmp	w8, #2
	b.lt	LBB0_22
; %bb.13:
	mov	w20, #0
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w8, [x19]
	add	w24, w20, #1
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	sub	w8, w8, #1
	mov	x20, x24
	cmp	w24, w8
	b.ge	LBB0_22
LBB0_16:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	bl	_ndrd_get_flush_wpq
	cbz	x0, LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	w24, w20, #1
	ldr	w8, [x19]
	cmp	w24, w8
	b.ge	LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x22, x24
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=2
	add	w22, w22, #1
	ldr	w8, [x19]
	cmp	w22, w8
	b.ge	LBB0_15
LBB0_20:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	bl	_ndrd_get_flush_wpq
	mov	x23, x0
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	bl	_ndrd_get_flush_wpq
	cmp	x23, x0
	b.ne	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	mov	x3, #0
	bl	_ndrd_set_flush_wpq
	b	LBB0_19
LBB0_22:
	mov	w0, #0
	b	LBB0_26
LBB0_23:
	mov	x0, x20
	bl	_nvdimm_bus_unlock
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_25
LBB0_24:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_26:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NDD_SECURITY_OVERWRITE,4,2     ; @NDD_SECURITY_OVERWRITE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
