	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hsu_dma_active_desc_size
_hsu_dma_active_desc_size:              ## @hsu_dma_active_desc_size
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rdx
	movslq	(%rdx), %rax
	movslq	4(%rdx), %rcx
	cmpl	%ecx, %eax
	jge	LBB0_1
## %bb.2:
	movq	8(%rdx), %rdx
	movq	%rcx, %r9
	subq	%rax, %r9
	cmpq	$4, %r9
	jae	LBB0_4
## %bb.3:
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_4:
	movq	%r9, %r8
	andq	$-4, %r8
	leaq	-4(%r8), %rsi
	movq	%rsi, %rbx
	shrq	$2, %rbx
	incq	%rbx
	movl	%ebx, %r10d
	andl	$3, %r10d
	cmpq	$12, %rsi
	jae	LBB0_6
## %bb.5:
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	jmp	LBB0_8
LBB0_6:
	andq	$-4, %rbx
	leaq	(%rdx,%rax,8), %rsi
	addq	$112, %rsi
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	-112(%rsi,%rdi,8), %xmm2
	paddq	%xmm0, %xmm2
	movdqu	-96(%rsi,%rdi,8), %xmm0
	paddq	%xmm1, %xmm0
	movdqu	-80(%rsi,%rdi,8), %xmm1
	movdqu	-64(%rsi,%rdi,8), %xmm3
	movdqu	-48(%rsi,%rdi,8), %xmm4
	paddq	%xmm1, %xmm4
	paddq	%xmm2, %xmm4
	movdqu	-32(%rsi,%rdi,8), %xmm2
	paddq	%xmm3, %xmm2
	paddq	%xmm0, %xmm2
	movdqu	-16(%rsi,%rdi,8), %xmm0
	paddq	%xmm4, %xmm0
	movdqu	(%rsi,%rdi,8), %xmm1
	paddq	%xmm2, %xmm1
	addq	$16, %rdi
	addq	$-4, %rbx
	jne	LBB0_7
LBB0_8:
	testq	%r10, %r10
	je	LBB0_11
## %bb.9:
	addq	%rax, %rdi
	leaq	(%rdx,%rdi,8), %rsi
	addq	$16, %rsi
	shlq	$5, %r10
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rsi,%rdi), %xmm2
	paddq	%xmm2, %xmm0
	movdqu	(%rsi,%rdi), %xmm2
	paddq	%xmm2, %xmm1
	addq	$32, %rdi
	cmpq	%rdi, %r10
	jne	LBB0_10
LBB0_11:
	paddq	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddq	%xmm0, %xmm1
	movq	%xmm1, %r15
	cmpq	%r8, %r9
	je	LBB0_14
## %bb.12:
	addq	%r8, %rax
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	addq	(%rdx,%rax,8), %r15
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_13
LBB0_14:
	movq	_HSU_DMA_CHAN_NR_DESC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	incl	%ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %edi
	callq	_HSU_CH_DxTSR
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hsu_chan_readl
	addq	%rax, %r15
	decl	%ebx
	cmpl	$1, %ebx
	jg	LBB0_15
## %bb.16:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HSU_DMA_CHAN_NR_DESC,4,2       ## @HSU_DMA_CHAN_NR_DESC
	.no_dead_strip	_hsu_dma_active_desc_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hsu_dma_active_desc_size
_hsu_dma_active_desc_size:              ; @hsu_dma_active_desc_size
	.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, x0
	ldr	x9, [x0]
	ldpsw	x13, x8, [x9]
	cmp	w13, w8
	b.ge	LBB0_3
; %bb.1:
	ldr	x9, [x9, #8]
	sub	x11, x8, x13
	cmp	x11, #8
	b.hs	LBB0_4
; %bb.2:
	mov	x20, #0
	mov	x10, x13
	b	LBB0_7
LBB0_3:
	mov	x20, #0
	b	LBB0_9
LBB0_4:
	and	x12, x11, #0xfffffffffffffff8
	add	x10, x12, x13
	add	x13, x9, x13, lsl #3
	add	x13, x13, #32
	movi.2d	v0, #0000000000000000
	mov	x14, x12
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x13, #-32]
	ldp	q6, q7, [x13], #64
	add.2d	v0, v4, v0
	add.2d	v1, v5, v1
	add.2d	v2, v6, v2
	add.2d	v3, v7, v3
	subs	x14, x14, #8
	b.ne	LBB0_5
; %bb.6:
	add.2d	v0, v1, v0
	add.2d	v0, v2, v0
	add.2d	v0, v3, v0
	addp.2d	d0, v0
	fmov	x20, d0
	cmp	x11, x12
	b.eq	LBB0_9
LBB0_7:
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #8
	add	x20, x10, x20
	subs	x8, x8, #1
	b.ne	LBB0_8
LBB0_9:
Lloh0:
	adrp	x8, _HSU_DMA_CHAN_NR_DESC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HSU_DMA_CHAN_NR_DESC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w21, w8, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sub	w0, w21, #2
	bl	_HSU_CH_DxTSR
	mov	x1, x0
	mov	x0, x19
	bl	_hsu_chan_readl
	add	x20, x0, x20
	sub	w21, w21, #1
	cmp	w21, #1
	b.gt	LBB0_10
; %bb.11:
	mov	x0, x20
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_HSU_DMA_CHAN_NR_DESC,4,2       ; @HSU_DMA_CHAN_NR_DESC
	.no_dead_strip	_hsu_dma_active_desc_size
.subsections_via_symbols
