	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_pci_setup_sgls
_nvme_pci_setup_sgls:                   ## @nvme_pci_setup_sgls
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %rbx
	movq	%rdi, %r13
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_blk_mq_rq_to_pdu
	movq	8(%rax), %r12
	movq	_NVME_CMD_SGL_METABUF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rbx)
	cmpl	$1, %r14d
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_nvme_pci_sgl_set_data
LBB0_2:
	movq	_BLK_STS_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_3:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	cmpl	$65, %r14d
	setb	%dl
	setae	%cl
	movq	(%r13,%rdx,8), %rdi
	movl	%ecx, (%rax)
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %r15
	leaq	-44(%rbp), %rdx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_dma_pool_alloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movq	%rax, %r13
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_nvme_pci_iod_list
	movq	%r13, (%rax)
	movl	-44(%rbp), %esi
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, 4(%r15)
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_nvme_pci_sgl_set_seg
	xorl	%ebx, %ebx
	movq	%r13, %r15
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	movslq	%ebx, %rax
	incl	%ebx
	leaq	(%r15,%rax,4), %rdi
	movq	%r12, %rsi
	callq	_nvme_pci_sgl_set_data
	movq	%r12, %rdi
	callq	_sg_next
	movq	%rax, %r12
	leal	-1(%r14), %eax
	cmpl	$1, %r14d
	movl	%eax, %r14d
	jle	LBB0_2
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SGES_PER_PAGE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	leaq	-44(%rbp), %rdx
	callq	_dma_pool_alloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %r13
	movslq	%ebx, %rbx
	leaq	(%r15,%rbx,4), %rax
	addq	$-4, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_nvme_pci_iod_list
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movslq	(%rsi), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%rsi)
	movq	%r13, (%rax,%rcx,8)
	movl	-4(%r15,%rbx,4), %eax
	movl	%eax, (%r13)
	movl	-44(%rbp), %esi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_nvme_pci_sgl_set_seg
	movl	$1, %ebx
	movq	%r13, %r15
	jmp	LBB0_5
LBB0_9:
	movl	$-1, (%r15)
LBB0_10:
	movq	_BLK_STS_RESOURCE@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVME_CMD_SGL_METABUF,4,2       ## @NVME_CMD_SGL_METABUF
	.comm	_BLK_STS_OK,4,2                 ## @BLK_STS_OK
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_BLK_STS_RESOURCE,4,2           ## @BLK_STS_RESOURCE
	.comm	_SGES_PER_PAGE,4,2              ## @SGES_PER_PAGE
	.no_dead_strip	_nvme_pci_setup_sgls
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_pci_setup_sgls
_nvme_pci_setup_sgls:                   ; @nvme_pci_setup_sgls
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x3
	mov	x25, x2
	mov	x20, x1
	mov	x23, x0
	mov	x0, x1
	bl	_blk_mq_rq_to_pdu
	ldr	x22, [x0, #8]
Lloh0:
	adrp	x8, _NVME_CMD_SGL_METABUF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVME_CMD_SGL_METABUF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x25, #4]
	cmp	w19, #1
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x25
	mov	x1, x22
	bl	_nvme_pci_sgl_set_data
LBB0_2:
Lloh3:
	adrp	x27, _BLK_STS_OK@GOTPAGE
Lloh4:
	ldr	x27, [x27, _BLK_STS_OK@GOTPAGEOFF]
	b	LBB0_10
LBB0_3:
	mov	x21, x0
	cmp	w19, #64
	cset	w8, hi
	cmp	w19, #65
	cset	w9, lo
	ldr	x23, [x23, w9, uxtw #3]
	str	w8, [x0]
Lloh5:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x23
	bl	_dma_pool_alloc
	cbz	x0, LBB0_9
; %bb.4:
	mov	x24, x0
	mov	x0, x20
	bl	_nvme_pci_iod_list
	str	x24, [x0]
	ldr	w1, [sp, #12]
	str	w1, [x21, #4]
	mov	x0, x25
	mov	x2, x19
	bl	_nvme_pci_sgl_set_seg
	mov	w26, #0
Lloh8:
	adrp	x28, _SGES_PER_PAGE@GOTPAGE
Lloh9:
	ldr	x28, [x28, _SGES_PER_PAGE@GOTPAGEOFF]
Lloh10:
	adrp	x27, _BLK_STS_RESOURCE@GOTPAGE
Lloh11:
	ldr	x27, [x27, _BLK_STS_RESOURCE@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x25, x0
	sub	w8, w26, #1
	add	x24, x24, w8, sxtw #2
	mov	x0, x20
	bl	_nvme_pci_iod_list
	ldrsw	x8, [x21]
	add	w9, w8, #1
	str	w9, [x21]
	str	x25, [x0, x8, lsl #3]
	ldr	w8, [x24]
	str	w8, [x25]
	ldr	w1, [sp, #12]
	mov	x0, x24
	mov	x2, x19
	bl	_nvme_pci_sgl_set_seg
	mov	w26, #1
	mov	x24, x25
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w25, w26, #1
	add	x0, x24, w26, sxtw #2
	mov	x1, x22
	bl	_nvme_pci_sgl_set_data
	mov	x0, x22
	bl	_sg_next
	mov	x22, x0
	mov	x26, x25
	subs	w19, w19, #1
	b.le	LBB0_2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x28]
	cmp	w26, w8
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh12:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x23
	bl	_dma_pool_alloc
	cbnz	x0, LBB0_5
	b	LBB0_10
LBB0_9:
	mov	w8, #-1
	str	w8, [x21]
Lloh15:
	adrp	x27, _BLK_STS_RESOURCE@GOTPAGE
Lloh16:
	ldr	x27, [x27, _BLK_STS_RESOURCE@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x27]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_NVME_CMD_SGL_METABUF,4,2       ; @NVME_CMD_SGL_METABUF
	.comm	_BLK_STS_OK,4,2                 ; @BLK_STS_OK
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_BLK_STS_RESOURCE,4,2           ; @BLK_STS_RESOURCE
	.comm	_SGES_PER_PAGE,4,2              ; @SGES_PER_PAGE
	.no_dead_strip	_nvme_pci_setup_sgls
.subsections_via_symbols
