	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvmet_fc_alloc_tgt_pgs
_nvmet_fc_alloc_tgt_pgs:                ## @nvmet_fc_alloc_tgt_pgs
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	40(%rdi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_sgl_alloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, 16(%rbx)
	movl	-12(%rbp), %edx
	movl	%edx, (%rbx)
	movq	8(%rbx), %rcx
	movq	32(%rbx), %rsi
	movl	(%rsi), %edi
	movq	_NVMET_FCP_WRITE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_2
## %bb.3:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_5:
	movq	_NVME_SC_INTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_2:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
LBB0_4:
	movl	(%rcx), %ecx
	movq	%rax, %rsi
	callq	_fc_dma_map_sg
	movl	%eax, (%rbx)
	movq	16(%rbx), %rax
	movq	%rax, 24(%rbx)
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_NVMET_FCP_WRITE,8,3            ## @NVMET_FCP_WRITE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_NVME_SC_INTERNAL,4,2           ## @NVME_SC_INTERNAL
	.no_dead_strip	_nvmet_fc_alloc_tgt_pgs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvmet_fc_alloc_tgt_pgs
_nvmet_fc_alloc_tgt_pgs:                ; @nvmet_fc_alloc_tgt_pgs
	.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
	mov	x19, x0
	ldr	w0, [x0, #40]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_sgl_alloc
	cbz	x0, LBB0_2
; %bb.1:
	mov	x1, x0
	str	x0, [x19, #16]
	ldr	w2, [sp, #12]
	str	w2, [x19]
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _NVMET_FCP_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NVMET_FCP_WRITE@GOTPAGEOFF]
Lloh5:
	adrp	x10, _DMA_FROM_DEVICE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x11, _DMA_TO_DEVICE@GOTPAGE
Lloh9:
	ldr	x11, [x11, _DMA_TO_DEVICE@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w3, [x8]
	bl	_fc_dma_map_sg
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	ldr	x8, [x19, #16]
	str	x8, [x19, #24]
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x8, _NVME_SC_INTERNAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NVME_SC_INTERNAL@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_NVMET_FCP_WRITE,8,3            ; @NVMET_FCP_WRITE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_NVME_SC_INTERNAL,4,2           ; @NVME_SC_INTERNAL
	.no_dead_strip	_nvmet_fc_alloc_tgt_pgs
.subsections_via_symbols
