	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function space_valid
_space_valid:                           ## @space_valid
	.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	%r9, %r14
	movq	%rdx, %rbx
	movq	%rdi, %r15
	movq	24(%rbp), %r12
	movl	(%rdx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	movq	%rax, %r13
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edx
	callq	_strncmp
	movq	(%r12), %rcx
	cmpq	8(%r12), %rcx
	jge	LBB0_9
## %bb.1:
	testq	%r13, %r13
	je	LBB0_10
## %bb.2:
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	8(%r15), %rax
	movq	%r12, -64(%rbp)
	movl	(%rax), %ecx
	movl	%ecx, -56(%rbp)
	movq	%rax, -48(%rbp)
	movq	%r15, %rdi
	callq	_is_nd_blk
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	%r15, %rdi
	callq	_walk_to_nvdimm_bus
	movq	_alias_dpa_busy@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-64(%rbp), %rsi
	movq	%rax, %rdi
	callq	_device_for_each_child
	jmp	LBB0_10
LBB0_4:
	movq	16(%rbp), %rbx
	movq	%r12, %rdi
	callq	_resource_size
	cmpq	%rbx, %rax
	jge	LBB0_6
## %bb.5:
	movq	(%r12), %rcx
LBB0_9:
	decq	%rcx
	movq	%rcx, 8(%r12)
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	testq	%r14, %r14
	je	LBB0_10
## %bb.7:
	movq	(%r12), %rcx
	movq	8(%r14), %rax
	incq	%rax
	cmpq	%rax, %rcx
	je	LBB0_10
## %bb.8:
	movq	(%r14), %rax
	decq	%rax
	cmpq	%rax, 8(%r12)
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmem-reserve"

L_.str.1:                               ## @.str.1
	.asciz	"pmem"

	.comm	_alias_dpa_busy,4,2             ## @alias_dpa_busy
	.no_dead_strip	_space_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function space_valid
_space_valid:                           ; @space_valid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x7
	mov	x22, x6
	mov	x20, x5
	mov	x24, x2
	mov	x21, x0
	ldr	w0, [x2]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	mov	x23, x0
	ldr	w0, [x24]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #4
	bl	_strncmp
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.1:
	cbz	x23, LBB0_7
; %bb.2:
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x21, #8]
	str	x19, [sp, #8]
	ldr	w9, [x8]
	str	w9, [sp, #16]
	str	x8, [sp, #24]
	mov	x0, x21
	bl	_is_nd_blk
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	mov	x0, x21
	bl	_walk_to_nvdimm_bus
Lloh4:
	adrp	x8, _alias_dpa_busy@GOTPAGE
Lloh5:
	ldr	x8, [x8, _alias_dpa_busy@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	add	x1, sp, #8
	bl	_device_for_each_child
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_resource_size
	cmp	x0, x22
	b.ge	LBB0_8
; %bb.5:
	ldr	x8, [x19]
LBB0_6:
	sub	x8, x8, #1
	str	x8, [x19, #8]
LBB0_7:
	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
	add	sp, sp, #96
	ret
LBB0_8:
	cbz	x20, LBB0_7
; %bb.9:
	ldr	x8, [x19]
	ldr	x9, [x20, #8]
	add	x9, x9, #1
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.10:
	ldr	x9, [x19, #8]
	ldr	x10, [x20]
	sub	x10, x10, #1
	cmp	x9, x10
	b.ne	LBB0_6
	b	LBB0_7
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmem-reserve"

l_.str.1:                               ; @.str.1
	.asciz	"pmem"

	.comm	_alias_dpa_busy,4,2             ; @alias_dpa_busy
	.no_dead_strip	_space_valid
.subsections_via_symbols
