	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r852_dma_enable
_r852_dma_enable:                       ## @r852_dma_enable
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_R852_DMA_SETTINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_r852_read_reg_dword
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_R852_DMA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	_R852_DMA_INTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_R852_DMA_MEMORY@GOTPCREL(%rip), %rax
	movq	(%r15), %rcx
	movq	_DMA_INTERNAL@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	cmpq	(%rdi), %rcx
	movl	(%rax), %r14d
	sete	%sil
	movq	_R852_DMA_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r14d, %r12d
	cmovel	%r13d, %r12d
	movl	8(%r15,%rsi,4), %edi
	xorl	%ebx, %ebx
	cmpq	$0, 16(%r15)
	cmovnel	%edx, %ebx
	callq	_cpu_to_le32
	movq	%r15, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_r852_write_reg_dword
	orl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	orl	%r14d, %r13d
	notl	%r13d
	andl	-52(%rbp), %r13d                ## 4-byte Folded Reload
	orl	%r12d, %ebx
	orl	%r13d, %ebx
	movq	_R852_DMA_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_r852_read_reg_dword
	movq	_R852_DMA_SETTINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_r852_write_reg_dword
	movq	_R852_DMA_IRQ_ENABLE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_r852_read_reg_dword
	movq	_R852_DMA_IRQ_INTERNAL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_R852_DMA_IRQ_ERROR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %esi
	movq	_R852_DMA_IRQ_MEMORY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r15, %rdi
	movl	%eax, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_r852_write_reg_dword           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_R852_DMA_SETTINGS,4,2          ## @R852_DMA_SETTINGS
	.comm	_R852_DMA_READ,4,2              ## @R852_DMA_READ
	.comm	_R852_DMA_INTERNAL,4,2          ## @R852_DMA_INTERNAL
	.comm	_R852_DMA_MEMORY,4,2            ## @R852_DMA_MEMORY
	.comm	_DMA_INTERNAL,8,3               ## @DMA_INTERNAL
	.comm	_R852_DMA_ADDR,4,2              ## @R852_DMA_ADDR
	.comm	_R852_DMA_IRQ_ENABLE,4,2        ## @R852_DMA_IRQ_ENABLE
	.comm	_R852_DMA_IRQ_INTERNAL,4,2      ## @R852_DMA_IRQ_INTERNAL
	.comm	_R852_DMA_IRQ_ERROR,4,2         ## @R852_DMA_IRQ_ERROR
	.comm	_R852_DMA_IRQ_MEMORY,4,2        ## @R852_DMA_IRQ_MEMORY
	.no_dead_strip	_r852_dma_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r852_dma_enable
_r852_dma_enable:                       ; @r852_dma_enable
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
Lloh0:
	adrp	x22, _R852_DMA_SETTINGS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _R852_DMA_SETTINGS@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_r852_read_reg_dword
	mov	x20, x0
Lloh2:
	adrp	x8, _R852_DMA_READ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _R852_DMA_READ@GOTPAGEOFF]
Lloh4:
	ldr	w23, [x8]
Lloh5:
	adrp	x8, _R852_DMA_INTERNAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R852_DMA_INTERNAL@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
Lloh8:
	adrp	x8, _R852_DMA_MEMORY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _R852_DMA_MEMORY@GOTPAGEOFF]
Lloh10:
	ldr	w25, [x8]
	ldr	x26, [x19, #16]
Lloh11:
	adrp	x8, _DMA_INTERNAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DMA_INTERNAL@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x27, _R852_DMA_ADDR@GOTPAGE
Lloh15:
	ldr	x27, [x27, _R852_DMA_ADDR@GOTPAGEOFF]
	ldr	w21, [x27]
	mov	w10, #8
	mov	w11, #12
	cmp	x9, x8
	csel	x8, x11, x10, eq
	csel	w28, w24, w25, eq
	ldr	w0, [x19, x8]
	bl	_cpu_to_le32
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_r852_write_reg_dword
	orr	w8, w24, w23
	orr	w8, w8, w25
	bic	w8, w20, w8
	cmp	x26, #0
	csel	w9, wzr, w23, eq
	orr	w8, w9, w8
	orr	w20, w8, w28
	ldr	w1, [x27]
	mov	x0, x19
	bl	_r852_read_reg_dword
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_r852_write_reg_dword
Lloh16:
	adrp	x20, _R852_DMA_IRQ_ENABLE@GOTPAGE
Lloh17:
	ldr	x20, [x20, _R852_DMA_IRQ_ENABLE@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_r852_read_reg_dword
	ldr	w1, [x20]
Lloh18:
	adrp	x8, _R852_DMA_IRQ_INTERNAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _R852_DMA_IRQ_INTERNAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh21:
	adrp	x9, _R852_DMA_IRQ_ERROR@GOTPAGE
Lloh22:
	ldr	x9, [x9, _R852_DMA_IRQ_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
Lloh24:
	adrp	x10, _R852_DMA_IRQ_MEMORY@GOTPAGE
Lloh25:
	ldr	x10, [x10, _R852_DMA_IRQ_MEMORY@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh26:
	ldr	w9, [x10]
	orr	w2, w8, w9
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_r852_write_reg_dword
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_R852_DMA_SETTINGS,4,2          ; @R852_DMA_SETTINGS
	.comm	_R852_DMA_READ,4,2              ; @R852_DMA_READ
	.comm	_R852_DMA_INTERNAL,4,2          ; @R852_DMA_INTERNAL
	.comm	_R852_DMA_MEMORY,4,2            ; @R852_DMA_MEMORY
	.comm	_DMA_INTERNAL,8,3               ; @DMA_INTERNAL
	.comm	_R852_DMA_ADDR,4,2              ; @R852_DMA_ADDR
	.comm	_R852_DMA_IRQ_ENABLE,4,2        ; @R852_DMA_IRQ_ENABLE
	.comm	_R852_DMA_IRQ_INTERNAL,4,2      ; @R852_DMA_IRQ_INTERNAL
	.comm	_R852_DMA_IRQ_ERROR,4,2         ; @R852_DMA_IRQ_ERROR
	.comm	_R852_DMA_IRQ_MEMORY,4,2        ; @R852_DMA_IRQ_MEMORY
	.no_dead_strip	_r852_dma_enable
.subsections_via_symbols
