	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d40_prep_sg_phy
_d40_prep_sg_phy:                       ## @d40_prep_sg_phy
	.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	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_LLI_CYCLIC@GOTPCREL(%rip), %rax
	movq	_LLI_TERM_INT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	orq	(%rax), %r15
	movq	16(%rsi), %rax
	testq	%rax, %rax
	cmoveq	%rax, %r15
	leaq	16(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	20(%rdi), %rbx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	12(%rsi), %r13d
	movl	%r13d, %edi
	callq	_virt_to_phys
	movl	12(%r12), %r9d
	subq	$8, %rsp
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	movl	%eax, %r8d
	pushq	%r15
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	pushq	%r13
	pushq	%rbx
	callq	_d40_phy_sg_to_lli
	addq	$32, %rsp
	movl	8(%r14), %ebx
	movl	%ebx, %edi
	callq	_virt_to_phys
	movl	8(%r12), %r9d
	subq	$8, %rsp
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	16(%rbp), %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	pushq	%r15
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	%r13
	callq	_d40_phy_sg_to_lli
	addq	$32, %rsp
	movl	%eax, %ebx
	movq	(%r12), %rax
	movl	(%rax), %edi
	movl	(%r14), %edx
	movl	4(%r14), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_sync_single_for_device
	movl	%ebx, %eax
	sarl	$31, %eax
	andl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LLI_CYCLIC,8,3                 ## @LLI_CYCLIC
	.comm	_LLI_TERM_INT,8,3               ## @LLI_TERM_INT
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_d40_prep_sg_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d40_prep_sg_phy
_d40_prep_sg_phy:                       ; @d40_prep_sg_phy
	.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
	str	w6, [sp, #12]                   ; 4-byte Folded Spill
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
	ldr	x8, [x1, #16]
Lloh0:
	adrp	x9, _LLI_CYCLIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LLI_CYCLIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _LLI_TERM_INT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _LLI_TERM_INT@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	orr	x9, x10, x9
	cmp	x8, #0
	csel	x19, xzr, x9, eq
	add	x26, x0, #16
	add	x27, x0, #20
	ldr	w28, [x1, #12]
	mov	x0, x28
	bl	_virt_to_phys
	mov	x4, x0
	ldr	w5, [x25, #12]
	str	x19, [sp]
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	mov	x3, x28
	mov	x6, x27
	mov	x7, x26
	bl	_d40_phy_sg_to_lli
	ldr	w20, [x24, #8]
	mov	x0, x20
	bl	_virt_to_phys
	mov	x4, x0
	ldr	w5, [x25, #8]
	str	x19, [sp]
	mov	x0, x22
	mov	x1, x21
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	mov	x3, x20
	mov	x6, x26
	mov	x7, x27
	bl	_d40_phy_sg_to_lli
	mov	x19, x0
	ldr	x8, [x25]
	ldr	w0, [x8]
	ldp	w2, w1, [x24]
Lloh6:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	bl	_dma_sync_single_for_device
	cmp	w19, #0
	csel	w0, w19, wzr, lt
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LLI_CYCLIC,8,3                 ; @LLI_CYCLIC
	.comm	_LLI_TERM_INT,8,3               ; @LLI_TERM_INT
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_d40_prep_sg_phy
.subsections_via_symbols
