	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msdc_dma_calcs
_msdc_dma_calcs:                        ## @msdc_dma_calcs
	.cfi_startproc
## %bb.0:
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpq	$4, %rsi
	jae	LBB0_4
## %bb.3:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_1:
	movl	$255, %eax
	retq
LBB0_4:
	movq	%rsi, %rax
	andq	$-4, %rax
	leaq	-4(%rax), %rdx
	movq	%rdx, %rcx
	shrq	$2, %rcx
	incq	%rcx
	movl	%ecx, %r8d
	andl	$3, %r8d
	cmpq	$12, %rdx
	jae	LBB0_6
## %bb.5:
	pxor	%xmm0, %xmm0
	xorl	%edx, %edx
	pxor	%xmm1, %xmm1
	jmp	LBB0_8
LBB0_6:
	andq	$-4, %rcx
	pxor	%xmm0, %xmm0
	xorl	%edx, %edx
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdi,%rdx,8), %xmm2
	paddq	%xmm0, %xmm2
	movdqu	16(%rdi,%rdx,8), %xmm0
	paddq	%xmm1, %xmm0
	movdqu	32(%rdi,%rdx,8), %xmm1
	movdqu	48(%rdi,%rdx,8), %xmm3
	movdqu	64(%rdi,%rdx,8), %xmm4
	paddq	%xmm1, %xmm4
	paddq	%xmm2, %xmm4
	movdqu	80(%rdi,%rdx,8), %xmm2
	paddq	%xmm3, %xmm2
	paddq	%xmm0, %xmm2
	movdqu	96(%rdi,%rdx,8), %xmm0
	paddq	%xmm4, %xmm0
	movdqu	112(%rdi,%rdx,8), %xmm1
	paddq	%xmm2, %xmm1
	addq	$16, %rdx
	addq	$-4, %rcx
	jne	LBB0_7
LBB0_8:
	testq	%r8, %r8
	je	LBB0_11
## %bb.9:
	leaq	(%rdi,%rdx,8), %rcx
	addq	$16, %rcx
	shlq	$5, %r8
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rcx,%rdx), %xmm2
	paddq	%xmm2, %xmm0
	movdqu	(%rcx,%rdx), %xmm2
	paddq	%xmm2, %xmm1
	addq	$32, %rdx
	cmpq	%rdx, %r8
	jne	LBB0_10
LBB0_11:
	paddq	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rcx
	cmpq	%rsi, %rax
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	addq	(%rdi,%rax,8), %rcx
	incq	%rax
	cmpq	%rax, %rsi
	jne	LBB0_12
LBB0_13:
	movl	$255, %eax
	subq	%rcx, %rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_msdc_dma_calcs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msdc_dma_calcs
_msdc_dma_calcs:                        ; @msdc_dma_calcs
	.cfi_startproc
; %bb.0:
	cbz	x1, LBB0_3
; %bb.1:
	cmp	x1, #8
	b.hs	LBB0_4
; %bb.2:
	mov	x9, #0
	mov	x8, #0
	b	LBB0_7
LBB0_3:
	mov	w0, #255
	ret
LBB0_4:
	and	x8, x1, #0xfffffffffffffff8
	add	x9, x0, #32
	movi.2d	v0, #0000000000000000
	mov	x10, x8
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x9, #-32]
	ldp	q6, q7, [x9], #64
	add.2d	v0, v4, v0
	add.2d	v1, v5, v1
	add.2d	v2, v6, v2
	add.2d	v3, v7, v3
	subs	x10, x10, #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	x9, d0
	cmp	x8, x1
	b.eq	LBB0_9
LBB0_7:
	sub	x10, x1, x8
	add	x8, x0, x8, lsl #3
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x8], #8
	add	x9, x11, x9
	subs	x10, x10, #1
	b.ne	LBB0_8
LBB0_9:
	mov	w8, #255
	sub	x0, x8, x9
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_msdc_dma_calcs
.subsections_via_symbols
