	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r852_dma_done
_r852_dma_done:                         ## @r852_dma_done
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	sete	%dil
	callq	_WARN_ON
	movq	_R852_DMA_IRQ_STA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_r852_read_reg_dword
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_r852_write_reg_dword
	movq	_R852_DMA_SETTINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_r852_write_reg_dword
	movq	_R852_DMA_IRQ_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_r852_write_reg_dword
	movq	_R852_DMA_ADDR@GOTPCREL(%rip), %r12
	movl	(%r12), %r15d
	movq	8(%rbx), %rdi
	callq	_cpu_to_le32
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_r852_write_reg_dword
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_r852_read_reg_dword
	movl	%r14d, 16(%rbx)
	movq	$0, (%rbx)
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.1:
	cmpq	8(%rbx), %rsi
	jne	LBB0_2
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	40(%rbx), %rdi
	movq	_R852_DMA_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpq	$0, 32(%rbx)
	jne	LBB0_3
## %bb.4:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dma_unmap_single               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_R852_DMA_IRQ_STA,4,2           ## @R852_DMA_IRQ_STA
	.comm	_R852_DMA_SETTINGS,4,2          ## @R852_DMA_SETTINGS
	.comm	_R852_DMA_IRQ_ENABLE,4,2        ## @R852_DMA_IRQ_ENABLE
	.comm	_R852_DMA_ADDR,4,2              ## @R852_DMA_ADDR
	.comm	_R852_DMA_LEN,4,2               ## @R852_DMA_LEN
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_r852_dma_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r852_dma_done
_r852_dma_done:                         ; @r852_dma_done
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
Lloh0:
	adrp	x8, _R852_DMA_IRQ_STA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R852_DMA_IRQ_STA@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_r852_read_reg_dword
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_r852_write_reg_dword
Lloh3:
	adrp	x8, _R852_DMA_SETTINGS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R852_DMA_SETTINGS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_r852_write_reg_dword
Lloh6:
	adrp	x8, _R852_DMA_IRQ_ENABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R852_DMA_IRQ_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_r852_write_reg_dword
Lloh9:
	adrp	x22, _R852_DMA_ADDR@GOTPAGE
Lloh10:
	ldr	x22, [x22, _R852_DMA_ADDR@GOTPAGEOFF]
	ldr	w21, [x22]
	ldr	x0, [x19, #8]
	bl	_cpu_to_le32
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_r852_write_reg_dword
	ldr	w1, [x22]
	mov	x0, x19
	bl	_r852_read_reg_dword
	str	w20, [x19, #16]
	str	xzr, [x19]
	ldr	x1, [x19, #24]
	cbz	x1, LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	cmp	x1, x8
	b.ne	LBB0_3
LBB0_2:
	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
LBB0_3:
Lloh11:
	adrp	x8, _R852_DMA_LEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R852_DMA_LEN@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	ldp	x8, x0, [x19, #32]
Lloh14:
	adrp	x9, _DMA_FROM_DEVICE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh16:
	adrp	x10, _DMA_TO_DEVICE@GOTPAGE
Lloh17:
	ldr	x10, [x10, _DMA_TO_DEVICE@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w3, [x8]
	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
	b	_dma_unmap_single
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_R852_DMA_IRQ_STA,4,2           ; @R852_DMA_IRQ_STA
	.comm	_R852_DMA_SETTINGS,4,2          ; @R852_DMA_SETTINGS
	.comm	_R852_DMA_IRQ_ENABLE,4,2        ; @R852_DMA_IRQ_ENABLE
	.comm	_R852_DMA_ADDR,4,2              ; @R852_DMA_ADDR
	.comm	_R852_DMA_LEN,4,2               ; @R852_DMA_LEN
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_r852_dma_done
.subsections_via_symbols
