	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mxms_checksum                  ## -- Begin function mxms_checksum
	.p2align	4, 0x90
_mxms_checksum:                         ## @mxms_checksum
	.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
	callq	_mxms_headerlen
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_mxms_structlen
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_mxms_data
	movq	%rax, %rcx
	movl	$1, %eax
	addq	%r15, %rbx
	je	LBB0_16
## %bb.1:
	cmpq	$4, %rbx
	jae	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	jmp	LBB0_12
LBB0_3:
	movq	%rbx, %r8
	andq	$-4, %r8
	leaq	-4(%r8), %rdi
	movq	%rdi, %rsi
	shrq	$2, %rsi
	incq	%rsi
	movl	%esi, %edx
	andl	$3, %edx
	cmpq	$12, %rdi
	jae	LBB0_5
## %bb.4:
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	jmp	LBB0_7
LBB0_5:
	andq	$-4, %rsi
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rdi,8), %xmm2
	paddq	%xmm0, %xmm2
	movdqu	16(%rcx,%rdi,8), %xmm0
	paddq	%xmm1, %xmm0
	movdqu	32(%rcx,%rdi,8), %xmm1
	movdqu	48(%rcx,%rdi,8), %xmm3
	movdqu	64(%rcx,%rdi,8), %xmm4
	paddq	%xmm1, %xmm4
	paddq	%xmm2, %xmm4
	movdqu	80(%rcx,%rdi,8), %xmm2
	paddq	%xmm3, %xmm2
	paddq	%xmm0, %xmm2
	movdqu	96(%rcx,%rdi,8), %xmm0
	paddq	%xmm4, %xmm0
	movdqu	112(%rcx,%rdi,8), %xmm1
	paddq	%xmm2, %xmm1
	addq	$16, %rdi
	addq	$-4, %rsi
	jne	LBB0_6
LBB0_7:
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.8:
	leaq	(%rcx,%rdi,8), %rsi
	addq	$16, %rsi
	shlq	$5, %rdx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>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, %rdx
	jne	LBB0_9
LBB0_10:
	paddq	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rdx
	cmpq	%r8, %rbx
	je	LBB0_14
## %bb.11:
	andl	$3, %ebx
	leaq	(%rcx,%r8,8), %rcx
LBB0_12:
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	addq	(%rcx,%rsi,8), %rdx
	incq	%rsi
	cmpq	%rsi, %rbx
	jne	LBB0_13
LBB0_14:
	testq	%rdx, %rdx
	je	LBB0_16
## %bb.15:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_nvkm_debug
	xorl	%eax, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"checksum invalid\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mxms_checksum                  ; -- Begin function mxms_checksum
	.p2align	2
_mxms_checksum:                         ; @mxms_checksum
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_mxms_headerlen
	mov	x20, x0
	mov	x0, x19
	bl	_mxms_structlen
	add	x20, x0, x20
	mov	x0, x19
	bl	_mxms_data
	cbz	x20, LBB0_9
; %bb.1:
	cmp	x20, #8
	b.hs	LBB0_3
; %bb.2:
	mov	x11, #0
	mov	x8, x0
	mov	x9, x20
	b	LBB0_6
LBB0_3:
	and	x10, x20, #0xfffffffffffffff8
	add	x8, x0, x10, lsl #3
	and	x9, x20, #0x7
	add	x11, x0, #32
	movi.2d	v0, #0000000000000000
	mov	x12, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	add.2d	v0, v4, v0
	add.2d	v1, v5, v1
	add.2d	v2, v6, v2
	add.2d	v3, v7, v3
	subs	x12, x12, #8
	b.ne	LBB0_4
; %bb.5:
	add.2d	v0, v1, v0
	add.2d	v0, v2, v0
	add.2d	v0, v3, v0
	addp.2d	d0, v0
	fmov	x11, d0
	cmp	x20, x10
	b.eq	LBB0_7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8], #8
	add	x11, x10, x11
	subs	x9, x9, #1
	b.ne	LBB0_6
LBB0_7:
	cbz	x11, LBB0_9
; %bb.8:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_nvkm_debug
	mov	w0, #0
	b	LBB0_10
LBB0_9:
	mov	w0, #1
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"checksum invalid\n"

.subsections_via_symbols
