	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function __nvdimm_setup_pfn
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
___nvdimm_setup_pfn:                    ## @__nvdimm_setup_pfn
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	leaq	56(%rsi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r14
	movq	%rdi, %r15
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	12(%r14), %edi
	callq	_le64_to_cpu
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	8(%r14), %edi
	callq	___le32_to_cpu
	movq	%rax, %r12
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r14), %edi
	callq	___le32_to_cpu
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_info_block_reserve
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	32(%r15), %rdi
	callq	_to_nd_namespace_io
	movq	%rax, %r13
	movq	(%rax), %r15
	addq	%r12, %r15
	movq	8(%rax), %rdi
	subq	%rbx, %rdi
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -144(%rbp)
	callq	_PHYS_PFN
	movq	%rax, -128(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -120(%rbp)
	movq	%r15, %rdi
	callq	_init_altmap_reserve
	movl	%eax, -104(%rbp)
	movq	%r15, %rdi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	callq	_init_altmap_base
	movl	%eax, -100(%rbp)
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movl	$48, %edx
	callq	_memcpy
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, 56(%r12)
	subq	%rbx, 64(%r12)
	movq	(%r13), %rax
	movq	_PFN_MODE_RAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	jle	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_4:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	_PFN_MODE_PMEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.5:
	leaq	8(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_resource_size
	subq	%rbx, %rax
	movq	%rax, %rdi
	callq	_PHYS_PFN
	movq	%rax, 8(%r13)
	movq	16(%r13), %rax
	movl	(%rax), %edi
	callq	_le64_to_cpu
	cmpq	8(%r13), %rax
	jbe	LBB0_7
## %bb.6:
	leaq	24(%r13), %r15
	movq	16(%r13), %rax
	movl	(%rax), %edi
	callq	_le64_to_cpu
	movq	8(%r13), %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	%rax, %rdx
	callq	_dev_info
LBB0_7:
	leaq	-144(%rbp), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$48, %edx
	callq	_memcpy
	subq	%r14, %rbx
	movq	%rbx, %rdi
	callq	_PHYS_PFN
	movq	%rax, 40(%r12)
	movq	$0, 32(%r12)
	movq	_PGMAP_ALTMAP_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_3:
	movl	(%r14), %edi
	callq	_le64_to_cpu
	movq	%rax, 8(%r13)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_8:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PFN_MODE_RAM,8,3               ## @PFN_MODE_RAM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PFN_MODE_PMEM,8,3              ## @PFN_MODE_PMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"number of pfns truncated from %lld to %ld\n"

	.comm	_PGMAP_ALTMAP_VALID,4,2         ## @PGMAP_ALTMAP_VALID
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	___nvdimm_setup_pfn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __nvdimm_setup_pfn
___nvdimm_setup_pfn:                    ; @__nvdimm_setup_pfn
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x20, x0
	add	x23, x1, #56
	ldr	x28, [x0, #16]
	ldr	w0, [x28, #12]
	bl	_le64_to_cpu
	mov	x21, x0
	ldr	w0, [x28, #8]
	bl	___le32_to_cpu
	mov	x24, x0
	ldr	w0, [x28, #4]
	bl	___le32_to_cpu
	mov	x25, x0
	bl	_info_block_reserve
	mov	x22, x0
	ldr	x0, [x20, #32]
	bl	_to_nd_namespace_io
	mov	x26, x0
	ldp	x8, x9, [x0]
	add	x27, x8, x24
	sub	x0, x9, x25
	stp	xzr, xzr, [sp]
	bl	_PHYS_PFN
	stp	xzr, xzr, [sp, #24]
	str	x0, [sp, #16]
	mov	x0, x27
	bl	_init_altmap_reserve
	str	w0, [sp, #40]
	mov	x0, x27
	bl	_init_altmap_base
	str	w0, [sp, #44]
	mov	x0, x23
	mov	x1, x26
	mov	w2, #48
	bl	_memcpy
	ldp	x8, x9, [x19, #56]
	add	x8, x8, x24
	sub	x9, x9, x25
	stp	x8, x9, [x19, #56]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _PFN_MODE_RAM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PFN_MODE_RAM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	cmp	x22, x21
	b.le	LBB0_7
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
Lloh5:
	adrp	x9, _PFN_MODE_PMEM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PFN_MODE_PMEM@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.4:
	add	x24, x19, #8
	mov	x0, x23
	bl	_resource_size
	sub	x0, x0, x21
	bl	_PHYS_PFN
	str	x0, [x20, #8]
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	bl	_le64_to_cpu
	ldr	x8, [x20, #8]
	cmp	x0, x8
	b.ls	LBB0_6
; %bb.5:
	add	x23, x20, #24
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	bl	_le64_to_cpu
	mov	x2, x0
	ldr	x3, [x20, #8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_dev_info
LBB0_6:
	mov	x1, sp
	mov	x0, x24
	mov	w2, #48
	bl	_memcpy
	sub	x0, x21, x22
	bl	_PHYS_PFN
	mov	x8, x0
	mov	w0, #0
	stp	xzr, x8, [x19, #32]
Lloh10:
	adrp	x8, _PGMAP_ALTMAP_VALID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PGMAP_ALTMAP_VALID@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_10
LBB0_7:
	ldr	w0, [x28]
	bl	_le64_to_cpu
	mov	x8, x0
	mov	w0, #0
	str	x8, [x20, #8]
	b	LBB0_10
LBB0_8:
Lloh13:
	adrp	x8, _ENXIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PFN_MODE_RAM,8,3               ; @PFN_MODE_RAM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PFN_MODE_PMEM,8,3              ; @PFN_MODE_PMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"number of pfns truncated from %lld to %ld\n"

	.comm	_PGMAP_ALTMAP_VALID,4,2         ; @PGMAP_ALTMAP_VALID
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	___nvdimm_setup_pfn
.subsections_via_symbols
