	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grow_dpa_allocation
_grow_dpa_allocation:                   ## @grow_dpa_allocation
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	addq	$4, %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_walk_to_nvdimm_bus
	movq	%rax, %rbx
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_strncmp
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%al
	cmpl	$0, (%r13)
	jle	LBB0_10
## %bb.1:
	movb	%al, %cl
	xorl	%edx, %edx
	movl	%ecx, %eax
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	leaq	(,%rdx,4), %r14
	addq	8(%r13), %r14
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_reserve_free_pmem
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_scan_allocate
	movq	%rax, %r15
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_release_free_pmem
	movl	$1, %eax
	testq	%r15, %r15
	jne	LBB0_3
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_scan_allocate
	testq	%rax, %rax
	jne	LBB0_12
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rcx
	movq	%r15, %r8
	callq	_dev_WARN_ONCE
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_merge_dpa
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	incq	%rdx
	movslq	(%r13), %rax
	cmpq	%rax, %rdx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jl	LBB0_2
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%r8, %rcx
	subq	%rax, %rcx
	leaq	L_.str.1(%rip), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	callq	_dev_WARN_ONCE
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmem"

L_.str.1:                               ## @.str.1
	.asciz	"allocation underrun: %#llx of %#llx bytes\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_grow_dpa_allocation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grow_dpa_allocation
_grow_dpa_allocation:                   ; @grow_dpa_allocation
	.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, x2
	mov	x21, x1
	mov	x22, x0
	add	x20, x0, #4
	mov	x0, x20
	bl	_walk_to_nvdimm_bus
	mov	x23, x0
	ldr	w0, [x21]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_strncmp
	cmp	x0, #0
	cset	w27, eq
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x28, #0
Lloh2:
	adrp	x24, l_.str.1@PAGE
Lloh3:
	add	x24, x24, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	ldr	x8, [x22, #8]
	add	x25, x8, x28, lsl #2
	mov	x8, x27
	mov	x26, x19
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbnz	w8, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	mov	x0, x23
	mov	x1, x25
	bl	_reserve_free_pmem
	cbnz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=2
	mov	x0, x22
	mov	x1, x25
	mov	x2, x21
	mov	x3, x26
	bl	_scan_allocate
	mov	x26, x0
	mov	x0, x23
	mov	x1, x25
	bl	_release_free_pmem
	mov	w8, #1
	cbnz	x26, LBB0_3
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	mov	x1, x25
	mov	x2, x21
	mov	x3, x26
	bl	_scan_allocate
	cbnz	x0, LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, #0
	mov	x2, x24
	mov	x3, x19
	mov	x4, x19
	bl	_dev_WARN_ONCE
	mov	x0, x22
	mov	x1, x25
	mov	x2, x21
	bl	_merge_dpa
	cbnz	w0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x28, x28, #1
	ldrsw	x8, [x22]
	cmp	x28, x8
	b.lt	LBB0_2
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
LBB0_11:
	mov	x1, x0
	sub	x3, x19, x0
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x4, x19
	bl	_dev_WARN_ONCE
Lloh6:
	adrp	x8, _ENXIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmem"

l_.str.1:                               ; @.str.1
	.asciz	"allocation underrun: %#llx of %#llx bytes\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_grow_dpa_allocation
.subsections_via_symbols
