	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jz4780_dma_setup_hwdesc
_jz4780_dma_setup_hwdesc:               ## @jz4780_dma_setup_hwdesc
	.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
	movq	%rcx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rax
	cmpl	%r8d, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	8(%r15), %rdi
	leaq	16(%r15), %rcx
	leaq	24(%r15), %rax
	movq	_JZ_DMA_DCM_SAI@GOTPCREL(%rip), %rbx
	movq	%rdx, %rsi
	jmp	LBB0_3
LBB0_2:
	movq	32(%r15), %rsi
	leaq	40(%r15), %rcx
	leaq	48(%r15), %rax
	movq	_JZ_DMA_DCM_DAI@GOTPCREL(%rip), %rbx
	movq	%rdx, %rdi
LBB0_3:
	movq	(%rbx), %rbx
	movq	%rbx, (%r12)
	movq	%rsi, 8(%r12)
	movq	%rdi, 16(%r12)
	movq	(%rcx), %rbx
	orq	%r14, %rdx
	movq	(%rax), %rsi
	imulq	%rbx, %rsi
	orq	%rdx, %rsi
	movq	%r15, %rdi
	movq	%r15, %rdx
	callq	_jz4780_dma_transfer_size
	leaq	-129(%rbx), %rcx
	cmpq	$2, %rcx
	jb	LBB0_6
## %bb.4:
	cmpq	$128, %rbx
	jne	LBB0_8
## %bb.5:
	movq	_JZ_DMA_WIDTH_32_BIT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
LBB0_6:
	movq	_JZ_DMA_DCM_TSZ_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	orq	(%r12), %rax
	movq	%rax, (%r12)
	movq	_JZ_DMA_DCM_SP_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	%rbx, %rdx
	shlq	%cl, %rdx
	orq	%rax, %rdx
	movq	%rdx, (%r12)
	movq	_JZ_DMA_DCM_DP_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rbx
	orq	%rdx, %rbx
	movq	%rbx, (%r12)
	movb	(%r15), %cl
	shrq	%cl, %r14
	movq	%r14, 24(%r12)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_MEM_TO_DEV,4,2             ## @DMA_MEM_TO_DEV
	.comm	_JZ_DMA_DCM_SAI,8,3             ## @JZ_DMA_DCM_SAI
	.comm	_JZ_DMA_DCM_DAI,8,3             ## @JZ_DMA_DCM_DAI
	.comm	_JZ_DMA_WIDTH_32_BIT,8,3        ## @JZ_DMA_WIDTH_32_BIT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_JZ_DMA_DCM_TSZ_SHIFT,8,3       ## @JZ_DMA_DCM_TSZ_SHIFT
	.comm	_JZ_DMA_DCM_SP_SHIFT,8,3        ## @JZ_DMA_DCM_SP_SHIFT
	.comm	_JZ_DMA_DCM_DP_SHIFT,8,3        ## @JZ_DMA_DCM_DP_SHIFT
	.no_dead_strip	_jz4780_dma_setup_hwdesc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jz4780_dma_setup_hwdesc
_jz4780_dma_setup_hwdesc:               ; @jz4780_dma_setup_hwdesc
	.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
	mov	x21, x0
Lloh0:
	adrp	x8, _DMA_MEM_TO_DEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w4
	b.ne	LBB0_2
; %bb.1:
	ldr	x11, [x21, #8]
	add	x8, x21, #16
	add	x9, x21, #24
Lloh3:
	adrp	x12, _JZ_DMA_DCM_SAI@GOTPAGE
Lloh4:
	ldr	x12, [x12, _JZ_DMA_DCM_SAI@GOTPAGEOFF]
	mov	x10, x2
	b	LBB0_3
LBB0_2:
	ldr	x10, [x21, #32]
	add	x8, x21, #40
	add	x9, x21, #48
Lloh5:
	adrp	x12, _JZ_DMA_DCM_DAI@GOTPAGE
Lloh6:
	ldr	x12, [x12, _JZ_DMA_DCM_DAI@GOTPAGEOFF]
	mov	x11, x2
LBB0_3:
	ldr	x12, [x12]
	stp	x12, x10, [x20]
	str	x11, [x20, #16]
	ldr	x9, [x9]
	ldr	x22, [x8]
	orr	x8, x19, x2
	mul	x9, x22, x9
	orr	x1, x8, x9
	mov	x0, x21
	mov	x2, x21
	bl	_jz4780_dma_transfer_size
	mov	x8, x0
	sub	x9, x22, #129
	cmp	x9, #2
	b.lo	LBB0_6
; %bb.4:
	cmp	x22, #128
	b.ne	LBB0_7
; %bb.5:
Lloh7:
	adrp	x9, _JZ_DMA_WIDTH_32_BIT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _JZ_DMA_WIDTH_32_BIT@GOTPAGEOFF]
Lloh9:
	ldr	x22, [x9]
LBB0_6:
	mov	w0, #0
Lloh10:
	adrp	x9, _JZ_DMA_DCM_TSZ_SHIFT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _JZ_DMA_DCM_TSZ_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	lsl	x8, x8, x9
	ldr	x9, [x20]
	orr	x8, x9, x8
	str	x8, [x20]
Lloh13:
	adrp	x9, _JZ_DMA_DCM_SP_SHIFT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _JZ_DMA_DCM_SP_SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	lsl	x9, x22, x9
	orr	x8, x9, x8
	str	x8, [x20]
Lloh16:
	adrp	x9, _JZ_DMA_DCM_DP_SHIFT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _JZ_DMA_DCM_DP_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	lsl	x9, x22, x9
	orr	x8, x9, x8
	str	x8, [x20]
	ldr	x8, [x21]
	lsr	x8, x19, x8
	str	x8, [x20, #24]
	b	LBB0_8
LBB0_7:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_MEM_TO_DEV,4,2             ; @DMA_MEM_TO_DEV
	.comm	_JZ_DMA_DCM_SAI,8,3             ; @JZ_DMA_DCM_SAI
	.comm	_JZ_DMA_DCM_DAI,8,3             ; @JZ_DMA_DCM_DAI
	.comm	_JZ_DMA_WIDTH_32_BIT,8,3        ; @JZ_DMA_WIDTH_32_BIT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_JZ_DMA_DCM_TSZ_SHIFT,8,3       ; @JZ_DMA_DCM_TSZ_SHIFT
	.comm	_JZ_DMA_DCM_SP_SHIFT,8,3        ; @JZ_DMA_DCM_SP_SHIFT
	.comm	_JZ_DMA_DCM_DP_SHIFT,8,3        ; @JZ_DMA_DCM_DP_SHIFT
	.no_dead_strip	_jz4780_dma_setup_hwdesc
.subsections_via_symbols
