	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvme_setup_prps                ## -- Begin function nvme_setup_prps
	.p2align	4, 0x90
_nvme_setup_prps:                       ## @nvme_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	8(%rdx), %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
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_offset_in_page
	movl	%eax, %ebx
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_iod_list
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edi
	callq	_cpu_to_le64
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, 8(%r14)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, %r12d
	subl	%ebx, %r12d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %r14d
	subl	%r12d, %r14d
	jle	LBB0_6
## %bb.1:
	subl	%r12d, %r13d
	je	LBB0_3
## %bb.2:
	addl	%r12d, %r15d
	cmpl	%esi, %r14d
	jle	LBB0_5
LBB0_7:
	movl	%r14d, %edi
	callq	_DIV_ROUND_UP
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	cmpl	$33, %eax
	setl	%cl
	setge	%dl
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rdi
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movl	%edx, (%rbx)
	leaq	-48(%rbp), %rdx
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_dma_pool_alloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %rcx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, (%rax)
	movl	-48(%rbp), %edi
	movl	%edi, 4(%rbx)
	movq	%rcx, %r12
	callq	_cpu_to_le64
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%ebx, %ebx
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	cmpl	%ecx, %ebx
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movl	%r14d, -56(%rbp)                ## 4-byte Spill
	movl	%r13d, %r14d
	movq	%r12, %r13
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	leaq	-48(%rbp), %rdx
	callq	_dma_pool_alloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	%rax, %r12
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movslq	(%rdx), %rax
	leal	1(%rax), %ecx
	movl	%ecx, (%rdx)
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%r12, (%rcx,%rax,8)
	movslq	%ebx, %rbx
	movq	-8(%r13,%rbx,8), %rax
	movq	%rax, (%r12)
	movl	-48(%rbp), %edi
	callq	_cpu_to_le64
	movq	%rax, -8(%r13,%rbx,8)
	movl	$1, %ebx
	movl	%r14d, %r13d
	movl	-56(%rbp), %r14d                ## 4-byte Reload
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=2
	movl	%r15d, %edi
	callq	_cpu_to_le64
	movslq	%ebx, %rcx
	movq	%rax, (%r12,%rcx,8)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	%eax, %r14d
	jle	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=2
	incl	%ebx
	addl	%eax, %r15d
	subl	%eax, %r13d
	jg	LBB0_11
## %bb.18:                              ##   in Loop: Header=BB0_10 Depth=1
	setne	%al
	movzbl	%al, %edi
	callq	_BUG_ON
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_sg_next
	movq	%r12, %r13
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_sg_dma_address
	movl	%eax, %r15d
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%r13, %r12
	callq	_sg_dma_len
	movl	%eax, %r13d
	jmp	LBB0_10
LBB0_3:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_sg_next
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_sg_dma_address
	movl	%eax, %r15d
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_sg_dma_len
	movl	%eax, %r13d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%esi, %r14d
	jg	LBB0_7
LBB0_5:
	movl	%r15d, %edi
	callq	_cpu_to_le64
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	jmp	LBB0_6
LBB0_16:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_6
LBB0_8:
	movl	%r15d, %edi
	callq	_cpu_to_le64
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	$-1, (%rbx)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %r12d
	movl	%r12d, %ebx
	jmp	LBB0_6
LBB0_13:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	subl	-56(%rbp), %ebx                 ## 4-byte Folded Reload
LBB0_6:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvme_setup_prps                ; -- Begin function nvme_setup_prps
	.p2align	2
_nvme_setup_prps:                       ; @nvme_setup_prps
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	str	w4, [sp, #24]                   ; 4-byte Folded Spill
	mov	x28, x3
	mov	x20, x2
	mov	x19, x1
	mov	x27, x0
	ldr	x22, [x2, #8]
	mov	x0, x22
	bl	_sg_dma_len
	mov	x26, x0
	mov	x0, x22
	bl	_sg_dma_address
	mov	x25, x0
	bl	_offset_in_page
	mov	x24, x0
	mov	x0, x20
	bl	_iod_list
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	mov	x0, x25
	bl	_cpu_to_le64
	str	x0, [x19, #8]
Lloh0:
	adrp	x21, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w1, [x21]
	sub	w23, w1, w24
	sub	w24, w28, w23
	cmp	w24, #1
	b.lt	LBB0_17
; %bb.1:
	subs	w26, w26, w23
	b.eq	LBB0_12
; %bb.2:
	add	w25, w23, w25
	cmp	w24, w1
	b.le	LBB0_13
LBB0_3:
	str	w28, [sp, #12]                  ; 4-byte Folded Spill
	mov	x0, x24
	bl	_DIV_ROUND_UP
	cmp	w0, #32
	cset	w8, gt
	cmp	w0, #33
	cset	w9, lt
	ldr	x27, [x27, w9, uxtw #3]
	str	w8, [x20]
	add	x2, sp, #28
	mov	x0, x27
	ldr	w1, [sp, #24]                   ; 4-byte Folded Reload
	bl	_dma_pool_alloc
	cbz	x0, LBB0_15
; %bb.4:
	mov	x28, x0
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	x0, [x8]
	ldr	w0, [sp, #28]
	str	w0, [x20, #4]
	bl	_cpu_to_le64
	mov	w23, #0
	str	x0, [x19]
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w8, [x21]
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	cmp	w23, w8, asr #3
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x2, sp, #28
	mov	x0, x27
	ldr	w1, [sp, #24]                   ; 4-byte Folded Reload
	bl	_dma_pool_alloc
	cbz	x0, LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x19, x0
	ldrsw	x8, [x20]
	add	w9, w8, #1
	str	w9, [x20]
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	str	x0, [x9, x8, lsl #3]
	sub	w8, w23, #1
	sbfiz	x23, x8, #3, #32
	ldr	x8, [x28, x23]
	str	x8, [x0]
	ldr	w0, [sp, #28]
	bl	_cpu_to_le64
	str	x0, [x28, x23]
	mov	w23, #1
	mov	x28, x19
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x25
	bl	_cpu_to_le64
	str	x0, [x28, w23, sxtw #3]
	ldr	w8, [x21]
	sub	w24, w24, w8
	cmp	w24, #1
	b.lt	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
	sub	w26, w26, w8
	add	w23, w23, #1
	add	w25, w8, w25
	cmp	w26, #0
	b.gt	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	cset	w0, ne
	bl	_BUG_ON
	mov	x0, x22
	bl	_sg_next
	mov	x22, x0
	bl	_sg_dma_address
	mov	x25, x0
	mov	x0, x22
	bl	_sg_dma_len
	mov	x26, x0
	b	LBB0_5
LBB0_12:
	mov	x0, x22
	bl	_sg_next
	mov	x22, x0
	bl	_sg_dma_address
	mov	x25, x0
	mov	x0, x22
	bl	_sg_dma_len
	mov	x26, x0
	ldr	w1, [x21]
	cmp	w24, w1
	b.gt	LBB0_3
LBB0_13:
	mov	x0, x25
	bl	_cpu_to_le64
	str	x0, [x19]
	b	LBB0_17
LBB0_14:
	ldr	w28, [sp, #12]                  ; 4-byte Folded Reload
	b	LBB0_17
LBB0_15:
	mov	x0, x25
	bl	_cpu_to_le64
	str	x0, [x19]
	mov	w8, #-1
	str	w8, [x20]
	ldr	w8, [x21]
	add	w28, w8, w23
	b	LBB0_17
LBB0_16:
	ldr	w28, [sp, #12]                  ; 4-byte Folded Reload
	sub	w28, w28, w24
LBB0_17:
	mov	x0, x28
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
.subsections_via_symbols
