	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvmet_p2pmem_ns_enable
_nvmet_p2pmem_ns_enable:                ## @nvmet_p2pmem_ns_enable
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	cmpl	$0, 24(%rdi)
	je	LBB0_14
## %bb.1:
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movl	(%rax), %edi
	callq	_blk_queue_pci_p2pdma
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movq	8(%rbx), %r15
	movq	%rbx, %rdi
	callq	_nvmet_ns_dev
	testq	%r15, %r15
	je	LBB0_8
## %bb.4:
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_pci_p2pdma_distance
	testl	%eax, %eax
	jns	LBB0_14
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_6:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_12
LBB0_7:
	movl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_11
LBB0_8:
	movl	%eax, %edi
	callq	_pci_p2pmem_find
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rax, %rdi
	callq	_pci_dev_put
	jmp	LBB0_14
LBB0_10:
	movl	(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
LBB0_11:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_pr_err
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_13:
	subl	(%rax), %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"peer-to-peer DMA is not supported by non-block device namespaces\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"peer-to-peer DMA is not supported by the driver of %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"no peer-to-peer memory is available for %s\n"

	.no_dead_strip	_nvmet_p2pmem_ns_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvmet_p2pmem_ns_enable
_nvmet_p2pmem_ns_enable:                ; @nvmet_p2pmem_ns_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	w0, [x8]
	bl	_blk_queue_pci_p2pdma
	cbz	w0, LBB0_6
; %bb.3:
	ldr	x20, [x19, #8]
	mov	x0, x19
	bl	_nvmet_ns_dev
	mov	x1, x0
	cbz	x20, LBB0_7
; %bb.4:
	mov	x0, x20
	mov	w2, #1
	bl	_pci_p2pdma_distance
	tbz	w0, #31, LBB0_9
	b	LBB0_12
LBB0_5:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_11
LBB0_6:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_7:
	mov	x0, x1
	bl	_pci_p2pmem_find
	cbz	x0, LBB0_10
; %bb.8:
	bl	_pci_dev_put
LBB0_9:
	mov	w0, #0
	b	LBB0_13
LBB0_10:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_11:
	bl	_pr_err
LBB0_12:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"peer-to-peer DMA is not supported by non-block device namespaces\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"peer-to-peer DMA is not supported by the driver of %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"no peer-to-peer memory is available for %s\n"

	.no_dead_strip	_nvmet_p2pmem_ns_enable
.subsections_via_symbols
