	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hsu_dma_chan_start
_hsu_dma_chan_start:                    ## @hsu_dma_chan_start
	.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, %r14
	movq	(%rdi), %rcx
	movq	8(%rdi), %r15
	movq	_HSU_CH_DCR_CHSOE@GOTPCREL(%rip), %rax
	movq	_HSU_CH_DCR_CHEI@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r12d
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.1:
	leaq	16(%r14), %rcx
	leaq	20(%r14), %rdx
	jmp	LBB0_4
LBB0_2:
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rdx
	xorl	%r13d, %r13d
	movl	$0, %ebx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.3:
	leaq	24(%r14), %rcx
	leaq	28(%r14), %rdx
LBB0_4:
	movl	(%rcx), %ebx
	movl	(%rdx), %r13d
LBB0_5:
	orl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_hsu_chan_disable
	movq	_HSU_CH_DCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_hsu_chan_writel
	movq	_HSU_CH_BSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_hsu_chan_writel
	movq	_HSU_CH_MTSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_hsu_chan_writel
	movl	(%r15), %eax
	subl	4(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_10
## %bb.6:
	movq	_HSU_DMA_CHAN_NR_DESC@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_10
## %bb.7:
	movl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_HSU_CH_DxSAR
	movq	8(%r15), %rcx
	movl	(%rcx,%rbx,8), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hsu_chan_writel
	movl	%ebx, %edi
	callq	_HSU_CH_DxTSR
	movq	8(%r15), %rcx
	movl	4(%rcx,%rbx,8), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hsu_chan_writel
	movl	%ebx, %edi
	callq	_HSU_CH_DCR_DESCA
	movl	%eax, %r13d
	orl	%r12d, %r13d
	movl	%ebx, %edi
	callq	_HSU_CH_DCR_CHTOI
	incl	4(%r15)
	movl	%eax, %r12d
	orl	%r13d, %r12d
	incq	%rbx
	cmpq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	jae	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_HSU_DMA_CHAN_NR_DESC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	%rax, %rbx
	jb	LBB0_8
LBB0_10:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	decl	%ebx
	movl	%ebx, %edi
	callq	_HSU_CH_DCR_CHSOD
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_HSU_CH_DCR_CHDI
	orl	%eax, %r12d
	orl	%r15d, %r12d
	movq	_HSU_CH_DCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_hsu_chan_writel
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hsu_chan_enable                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HSU_CH_DCR_CHSOE,4,2           ## @HSU_CH_DCR_CHSOE
	.comm	_HSU_CH_DCR_CHEI,4,2            ## @HSU_CH_DCR_CHEI
	.comm	_DMA_MEM_TO_DEV,8,3             ## @DMA_MEM_TO_DEV
	.comm	_DMA_DEV_TO_MEM,8,3             ## @DMA_DEV_TO_MEM
	.comm	_HSU_CH_DCR,4,2                 ## @HSU_CH_DCR
	.comm	_HSU_CH_BSR,4,2                 ## @HSU_CH_BSR
	.comm	_HSU_CH_MTSR,4,2                ## @HSU_CH_MTSR
	.comm	_HSU_DMA_CHAN_NR_DESC,4,2       ## @HSU_DMA_CHAN_NR_DESC
	.no_dead_strip	_hsu_dma_chan_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hsu_dma_chan_start
_hsu_dma_chan_start:                    ; @hsu_dma_chan_start
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _HSU_CH_DCR_CHSOE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HSU_CH_DCR_CHSOE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _HSU_CH_DCR_CHEI@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HSU_CH_DCR_CHEI@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w22, w9, w8
	ldp	x8, x23, [x0]
Lloh6:
	adrp	x9, _DMA_MEM_TO_DEV@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	add	x8, x19, #16
	add	x9, x19, #20
	b	LBB0_4
LBB0_2:
Lloh9:
	adrp	x9, _DMA_DEV_TO_MEM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	add	x8, x19, #24
	add	x9, x19, #28
LBB0_4:
	ldr	w21, [x8]
	ldr	w20, [x9]
	b	LBB0_6
LBB0_5:
	mov	w20, #0
	mov	w21, #0
LBB0_6:
	mov	x0, x19
	bl	_hsu_chan_disable
Lloh12:
	adrp	x24, _HSU_CH_DCR@GOTPAGE
Lloh13:
	ldr	x24, [x24, _HSU_CH_DCR@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #0
	bl	_hsu_chan_writel
Lloh14:
	adrp	x8, _HSU_CH_BSR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HSU_CH_BSR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_hsu_chan_writel
Lloh17:
	adrp	x8, _HSU_CH_MTSR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HSU_CH_MTSR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_hsu_chan_writel
	ldp	w8, w9, [x23]
	subs	w21, w8, w9
	b.eq	LBB0_11
; %bb.7:
Lloh20:
	adrp	x25, _HSU_DMA_CHAN_NR_DESC@GOTPAGE
Lloh21:
	ldr	x25, [x25, _HSU_DMA_CHAN_NR_DESC@GOTPAGEOFF]
	ldr	w8, [x25]
	cbz	w8, LBB0_11
; %bb.8:
	mov	x26, #0
	mov	x20, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_HSU_CH_DxSAR
	mov	x1, x0
	ldr	x8, [x23, #8]
	ldr	w2, [x8, x26]
	mov	x0, x19
	bl	_hsu_chan_writel
	mov	x0, x20
	bl	_HSU_CH_DxTSR
	mov	x1, x0
	ldr	x8, [x23, #8]
	add	x8, x8, x26
	ldr	w2, [x8, #4]
	mov	x0, x19
	bl	_hsu_chan_writel
	mov	x0, x20
	bl	_HSU_CH_DCR_DESCA
	orr	w22, w0, w22
	mov	x0, x20
	bl	_HSU_CH_DCR_CHTOI
	orr	w22, w22, w0
	ldr	w8, [x23, #4]
	add	w8, w8, #1
	str	w8, [x23, #4]
	add	x20, x20, #1
	cmp	x20, x21
	b.hs	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x25]
	add	x26, x26, #8
	cmp	x20, x8
	b.lo	LBB0_9
LBB0_11:
	sub	w20, w21, #1
	mov	x0, x20
	bl	_HSU_CH_DCR_CHSOD
	orr	w21, w0, w22
	mov	x0, x20
	bl	_HSU_CH_DCR_CHDI
	orr	w2, w21, w0
	ldr	w1, [x24]
	mov	x0, x19
	bl	_hsu_chan_writel
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_hsu_chan_enable
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_HSU_CH_DCR_CHSOE,4,2           ; @HSU_CH_DCR_CHSOE
	.comm	_HSU_CH_DCR_CHEI,4,2            ; @HSU_CH_DCR_CHEI
	.comm	_DMA_MEM_TO_DEV,8,3             ; @DMA_MEM_TO_DEV
	.comm	_DMA_DEV_TO_MEM,8,3             ; @DMA_DEV_TO_MEM
	.comm	_HSU_CH_DCR,4,2                 ; @HSU_CH_DCR
	.comm	_HSU_CH_BSR,4,2                 ; @HSU_CH_BSR
	.comm	_HSU_CH_MTSR,4,2                ; @HSU_CH_MTSR
	.comm	_HSU_DMA_CHAN_NR_DESC,4,2       ; @HSU_DMA_CHAN_NR_DESC
	.no_dead_strip	_hsu_dma_chan_start
.subsections_via_symbols
