	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv_adma_fill_aprd
_nv_adma_fill_aprd:                     ## @nv_adma_fill_aprd
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rsi, %r14
	movq	_ATA_TFLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	4(%rdi), %ebx
	je	LBB0_2
## %bb.1:
	movq	_NV_APRD_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_2:
	movl	(%rdi), %eax
	decl	%eax
	cmpl	%edx, %eax
	jne	LBB0_4
## %bb.3:
	movq	_NV_APRD_END@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	cmpl	$4, %edx
	je	LBB0_7
## %bb.5:
	movq	_NV_APRD_CONT@GOTPCREL(%rip), %rax
LBB0_6:
	orl	(%rax), %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_sg_dma_address
	movl	%eax, %edi
	callq	_cpu_to_le64
	movl	%eax, 16(%r15)
	movq	%r14, %rdi
	callq	_sg_dma_len
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, 12(%r15)
	movl	%ebx, 8(%r15)
	movq	$0, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_TFLAG_WRITE,4,2            ## @ATA_TFLAG_WRITE
	.comm	_NV_APRD_WRITE,4,2              ## @NV_APRD_WRITE
	.comm	_NV_APRD_END,4,2                ## @NV_APRD_END
	.comm	_NV_APRD_CONT,4,2               ## @NV_APRD_CONT
	.no_dead_strip	_nv_adma_fill_aprd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv_adma_fill_aprd
_nv_adma_fill_aprd:                     ; @nv_adma_fill_aprd
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x3
	mov	x20, x1
Lloh0:
	adrp	x8, _ATA_TFLAG_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATA_TFLAG_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _NV_APRD_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NV_APRD_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldp	w11, w10, [x0]
	tst	w8, w10
	csel	w21, wzr, w9, eq
	sub	w8, w11, #1
	cmp	w8, w2
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _NV_APRD_END@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NV_APRD_END@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	cmp	w2, #4
	b.eq	LBB0_5
; %bb.3:
Lloh8:
	adrp	x8, _NV_APRD_CONT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NV_APRD_CONT@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_5:
	mov	x0, x20
	bl	_sg_dma_address
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_cpu_to_le64
	str	w0, [x19, #16]
	mov	x0, x20
	bl	_sg_dma_len
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_cpu_to_le32
	stp	w21, w0, [x19, #8]
	str	xzr, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_TFLAG_WRITE,4,2            ; @ATA_TFLAG_WRITE
	.comm	_NV_APRD_WRITE,4,2              ; @NV_APRD_WRITE
	.comm	_NV_APRD_END,4,2                ; @NV_APRD_END
	.comm	_NV_APRD_CONT,4,2               ; @NV_APRD_CONT
	.no_dead_strip	_nv_adma_fill_aprd
.subsections_via_symbols
