	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvmet_req_alloc_sgl            ## -- Begin function nvmet_req_alloc_sgl
	.p2align	4, 0x90
_nvmet_req_alloc_sgl:                   ## @nvmet_req_alloc_sgl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_CONFIG_PCI_P2PDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	24(%rbx), %rax
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	movq	32(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:
	movl	(%rax), %esi
	callq	_radix_tree_lookup
	movq	%rax, %r14
	movq	$0, 16(%rbx)
	movq	24(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.7:
	testq	%r14, %r14
	je	LBB0_4
## %bb.8:
	leaq	4(%rbx), %rsi
	movl	8(%rbx), %edx
	movq	%r14, %rdi
	callq	_pci_p2pmem_alloc_sgl
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_4
## %bb.9:
	movq	%r14, 16(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_3:
	movq	$0, 16(%rbx)
LBB0_4:
	movl	8(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	4(%rbx), %rdx
	callq	_sgl_alloc
	movl	%eax, %ecx
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_10
## %bb.5:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_PCI_P2PDMA,4,2          ## @CONFIG_PCI_P2PDMA
	.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	_nvmet_req_alloc_sgl            ; -- Begin function nvmet_req_alloc_sgl
	.p2align	2
_nvmet_req_alloc_sgl:                   ; @nvmet_req_alloc_sgl
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _CONFIG_PCI_P2PDMA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_PCI_P2PDMA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_7
; %bb.1:
	ldr	x8, [x19, #24]
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	w1, [x8]
	bl	_radix_tree_lookup
	str	xzr, [x19, #16]
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cmp	x8, #0
	ccmp	x0, #0, #4, ne
	b.eq	LBB0_7
; %bb.4:
	mov	x20, x0
	add	x1, x19, #4
	ldr	w2, [x19, #8]
	bl	_pci_p2pmem_alloc_sgl
	str	w0, [x19]
	cbz	w0, LBB0_7
; %bb.5:
	mov	w0, #0
	str	x20, [x19, #16]
	b	LBB0_10
LBB0_6:
	str	xzr, [x19, #16]
LBB0_7:
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, x19, #4
	bl	_sgl_alloc
	str	w0, [x19]
	cbz	w0, LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_PCI_P2PDMA,4,2          ; @CONFIG_PCI_P2PDMA
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
