	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_pci_setup_prps
_nvme_pci_setup_prps:                   ## @nvme_pci_setup_prps
	.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	%rdx, -128(%rbp)                ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_blk_mq_rq_to_pdu
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_blk_rq_payload_bytes
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	16(%r14), %rbx
	movq	%rbx, %rdi
	callq	_sg_dma_len
	movl	%eax, %r13d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_sg_dma_address
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movl	16(%r12), %r12d
	leal	-1(%r12), %r14d
	movl	%eax, -96(%rbp)                 ## 4-byte Spill
	andl	%eax, %r14d
	movq	%r15, -120(%rbp)                ## 8-byte Spill
	movq	%r15, %rdi
	callq	_nvme_pci_iod_list
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r15d
	subl	%r14d, %r15d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	subl	%r15d, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_3
## %bb.1:
	subl	%r15d, %r13d
	je	LBB0_4
## %bb.2:
	addl	-96(%rbp), %r15d                ## 4-byte Folded Reload
	jmp	LBB0_5
LBB0_3:
	xorl	%r15d, %r15d
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_4:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_sg_next
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_sg_dma_address
	movl	%eax, %r15d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_sg_dma_len
	movl	%eax, %r13d
LBB0_5:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	cmpl	%r12d, -48(%rbp)                ## 4-byte Folded Reload
	jle	LBB0_16
## %bb.6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%r12d, %esi
	callq	_DIV_ROUND_UP
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	cmpl	$33, %eax
	setl	%cl
	setge	%dl
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rdi
	movl	%edx, 4(%r14)
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%rdi, -144(%rbp)                ## 8-byte Spill
	callq	_dma_pool_alloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.7:
	movq	%rax, %rcx
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	%rcx, (%rax)
	movl	-52(%rbp), %eax
	movl	%eax, (%r14)
	movl	%r12d, %eax
	sarl	$3, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	decl	%eax
	cltq
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movl	%r12d, %eax
	negl	%eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	-96(%rbp), %r14d                ## 4-byte Folded Reload
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rcx, %rbx
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-144(%rbp), %rdi                ## 8-byte Reload
	leaq	-52(%rbp), %rdx
	callq	_dma_pool_alloc
	testq	%rax, %rax
	je	LBB0_20
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, %r12
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movslq	4(%rdx), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 4(%rdx)
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movq	%r12, (%rcx,%rax,8)
	movq	-136(%rbp), %r14                ## 8-byte Reload
	movq	(%rbx,%r14,8), %rax
	movq	%rax, (%r12)
	movl	-52(%rbp), %edi
	callq	_cpu_to_le64
	movq	%rax, (%rbx,%r14,8)
	movl	$1, %r14d
	movq	%r12, %rbx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rcx, %rbx
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%r15d, %edi
	callq	_cpu_to_le64
	movslq	%r14d, %rcx
	movq	%rax, (%rbx,%rcx,8)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	addl	%ecx, %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rcx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	subl	%r12d, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	subl	%r12d, %r13d
	incl	%r14d
	addl	%r12d, %r15d
	testl	%r13d, %r13d
	jg	LBB0_8
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	setne	%al
	movzbl	%al, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_21
## %bb.15:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_sg_next
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_sg_dma_address
	movl	%eax, %r15d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	callq	_sg_dma_len
	movl	%eax, %r13d
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	jmp	LBB0_8
LBB0_16:
	movl	%r15d, (%r14)
LBB0_17:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	16(%r14), %rdi
	callq	_sg_dma_address
	movl	%eax, %edi
	callq	_cpu_to_le64
	movq	-128(%rbp), %rbx                ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movl	(%r14), %edi
	callq	_cpu_to_le64
	movq	%rax, (%rbx)
	movq	_BLK_STS_OK@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movl	%r15d, (%r14)
	movl	$-1, 4(%r14)
LBB0_20:
	movq	_BLK_STS_RESOURCE@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_21:
	movq	_nvme_print_sgl@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %rsi
	movl	8(%rbx), %edx
	callq	_DO_ONCE
	movl	%eax, %r14d
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	callq	_blk_rq_payload_bytes
	movl	8(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_WARN
	movq	_BLK_STS_IOERR@GOTPCREL(%rip), %rax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_BLK_STS_RESOURCE,4,2           ## @BLK_STS_RESOURCE
	.comm	_BLK_STS_OK,4,2                 ## @BLK_STS_OK
	.comm	_nvme_print_sgl,4,2             ## @nvme_print_sgl
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid SGL for payload:%d nents:%d\n"

	.comm	_BLK_STS_IOERR,4,2              ## @BLK_STS_IOERR
	.no_dead_strip	_nvme_pci_setup_prps
.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_prps
_nvme_pci_setup_prps:                   ; @nvme_pci_setup_prps
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x22, x2
	mov	x25, x1
	mov	x20, x0
	mov	x0, x1
	bl	_blk_mq_rq_to_pdu
	mov	x19, x0
	mov	x0, x25
	bl	_blk_rq_payload_bytes
	mov	x24, x0
	ldr	x27, [x19, #16]
	mov	x0, x27
	bl	_sg_dma_len
	mov	x26, x0
	mov	x0, x27
	bl	_sg_dma_address
	mov	x28, x0
	ldr	w23, [x20, #16]
	sub	w8, w23, #1
	and	w21, w8, w0
	mov	x0, x25
	bl	_nvme_pci_iod_list
	str	x0, [sp, #48]                   ; 8-byte Folded Spill
	sub	w8, w23, w21
	sub	w21, w24, w8
	cmp	w21, #1
	b.lt	LBB0_13
; %bb.1:
	subs	w9, w26, w8
	str	w9, [sp, #56]                   ; 4-byte Folded Spill
	b.eq	LBB0_14
; %bb.2:
	add	w26, w8, w28
	cmp	w21, w23
	b.le	LBB0_15
LBB0_3:
	mov	x0, x21
	mov	x1, x23
	bl	_DIV_ROUND_UP
	cmp	w0, #32
	cset	w8, gt
	cmp	w0, #33
	cset	w9, lt
	ldr	x0, [x20, w9, uxtw #3]
	str	w8, [x19, #4]
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #60
	str	x0, [sp, #40]                   ; 8-byte Folded Spill
	bl	_dma_pool_alloc
	cbz	x0, LBB0_19
; %bb.4:
	mov	x24, x0
	str	x27, [sp, #16]                  ; 8-byte Folded Spill
	str	x25, [sp]                       ; 8-byte Folded Spill
	str	x22, [sp, #32]                  ; 8-byte Folded Spill
	mov	w28, #0
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	str	x0, [x8]
	ldr	w8, [sp, #60]
	str	w8, [x19]
	mov	x27, x21
	asr	w21, w23, #3
	sub	w8, w21, #1
	sxtw	x8, w8
	neg	w9, w23
	lsl	x25, x8, #3
	mov	x8, x9
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	mov	w22, #0
	str	w27, [sp, #28]                  ; 4-byte Folded Spill
	add	w27, w8, w27
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w28, w21
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
Lloh3:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #60
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	bl	_dma_pool_alloc
	cbz	x0, LBB0_20
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x20, x0
	ldrsw	x8, [x19, #4]
	add	w9, w8, #1
	str	w9, [x19, #4]
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	str	x0, [x9, x8, lsl #3]
	ldr	x8, [x24, x25]
	str	x8, [x0]
	ldr	w0, [sp, #60]
	bl	_cpu_to_le64
	str	x0, [x24, x25]
	mov	w28, #1
	mov	x24, x20
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x26
	bl	_cpu_to_le64
	str	x0, [x24, w28, sxtw #3]
	add	w8, w27, w22
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
	add	w28, w28, #1
	add	w26, w26, w23
	sub	w22, w22, w23
	ldr	w8, [sp, #56]                   ; 4-byte Folded Reload
	add	w8, w8, w22
	cmp	w8, #0
	b.gt	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_21
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w27, [sp, #28]                  ; 4-byte Folded Reload
	add	w27, w27, w22
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_sg_next
	mov	x20, x0
	bl	_sg_dma_address
	mov	x26, x0
	str	x20, [sp, #16]                  ; 8-byte Folded Spill
	mov	x0, x20
	bl	_sg_dma_len
	str	w0, [sp, #56]                   ; 4-byte Folded Spill
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	b	LBB0_5
LBB0_13:
	str	x22, [sp, #32]                  ; 8-byte Folded Spill
	mov	w26, #0
	b	LBB0_16
LBB0_14:
	mov	x0, x27
	bl	_sg_next
	mov	x27, x0
	bl	_sg_dma_address
	mov	x26, x0
	mov	x0, x27
	bl	_sg_dma_len
	str	w0, [sp, #56]                   ; 4-byte Folded Spill
	cmp	w21, w23
	b.gt	LBB0_3
LBB0_15:
	str	x22, [sp, #32]                  ; 8-byte Folded Spill
LBB0_16:
	str	w26, [x19]
LBB0_17:
	ldr	x0, [x19, #16]
	bl	_sg_dma_address
	bl	_cpu_to_le64
	ldr	x20, [sp, #32]                  ; 8-byte Folded Reload
	str	x0, [x20, #8]
	ldr	w0, [x19]
	bl	_cpu_to_le64
	str	x0, [x20]
Lloh6:
	adrp	x8, _BLK_STS_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BLK_STS_OK@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_19:
	mov	w8, #-1
	stp	w26, w8, [x19]
LBB0_20:
Lloh8:
	adrp	x8, _BLK_STS_RESOURCE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BLK_STS_RESOURCE@GOTPAGEOFF]
	b	LBB0_18
LBB0_21:
Lloh10:
	adrp	x8, _nvme_print_sgl@GOTPAGE
Lloh11:
	ldr	x8, [x8, _nvme_print_sgl@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	x1, [x19, #16]
	ldr	w2, [x19, #8]
	bl	_DO_ONCE
	mov	x20, x0
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_blk_rq_payload_bytes
	mov	x2, x0
	ldr	w3, [x19, #8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_WARN
Lloh15:
	adrp	x8, _BLK_STS_IOERR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BLK_STS_IOERR@GOTPAGEOFF]
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_BLK_STS_RESOURCE,4,2           ; @BLK_STS_RESOURCE
	.comm	_BLK_STS_OK,4,2                 ; @BLK_STS_OK
	.comm	_nvme_print_sgl,4,2             ; @nvme_print_sgl
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid SGL for payload:%d nents:%d\n"

	.comm	_BLK_STS_IOERR,4,2              ; @BLK_STS_IOERR
	.no_dead_strip	_nvme_pci_setup_prps
.subsections_via_symbols
