	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a3d_csum
_a3d_csum:                              ## @a3d_csum
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	leal	-2(%rsi), %r8d
	xorl	%ecx, %ecx
	cmpl	$3, %esi
	jl	LBB0_12
## %bb.1:
	movl	%r8d, %r10d
	cmpl	$8, %r8d
	jae	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	LBB0_10
LBB0_3:
	movl	%r10d, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rax
	movq	%rax, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%r9, %rcx
	andq	$-2, %rcx
	pxor	%xmm0, %xmm0
	xorl	%eax, %eax
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	pmovzxbd	(%rdi,%rax), %xmm2              ## xmm2 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	paddd	%xmm0, %xmm2
	pmovzxbd	4(%rdi,%rax), %xmm3             ## xmm3 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	paddd	%xmm1, %xmm3
	pmovzxbd	8(%rdi,%rax), %xmm0             ## xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	pmovzxbd	12(%rdi,%rax), %xmm1            ## xmm1 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	paddd	%xmm2, %xmm0
	paddd	%xmm3, %xmm1
	addq	$16, %rax
	addq	$-2, %rcx
	jne	LBB0_6
## %bb.7:
	testb	$1, %r9b
	je	LBB0_9
LBB0_8:
	pmovzxbd	(%rdi,%rax), %xmm2              ## xmm2 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	paddd	%xmm2, %xmm0
	pmovzxbd	4(%rdi,%rax), %xmm2             ## xmm2 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	paddd	%xmm2, %xmm1
LBB0_9:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ecx
	cmpq	%r10, %rdx
	je	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rdi,%rdx), %eax
	addl	%eax, %ecx
	incq	%rdx
	cmpq	%rdx, %r10
	jne	LBB0_10
LBB0_11:
	andl	$63, %ecx
LBB0_12:
	movslq	%r8d, %rax
	movsbl	(%rdi,%rax), %eax
	shll	$3, %eax
	movslq	%esi, %rdx
	movsbl	-1(%rdx,%rdi), %edx
	orl	%eax, %edx
	xorl	%eax, %eax
	cmpl	%edx, %ecx
	setne	%al
	popq	%rbp
	retq
LBB0_4:
	pxor	%xmm0, %xmm0
	xorl	%eax, %eax
	pxor	%xmm1, %xmm1
	testb	$1, %r9b
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_a3d_csum
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function a3d_csum
lCPI0_0:
	.byte	12                              ; 0xc
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	13                              ; 0xd
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	14                              ; 0xe
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	15                              ; 0xf
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
lCPI0_1:
	.byte	0                               ; 0x0
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	1                               ; 0x1
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	2                               ; 0x2
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	3                               ; 0x3
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
lCPI0_2:
	.byte	4                               ; 0x4
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	5                               ; 0x5
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	6                               ; 0x6
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	7                               ; 0x7
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
lCPI0_3:
	.byte	8                               ; 0x8
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	9                               ; 0x9
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	10                              ; 0xa
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	11                              ; 0xb
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_a3d_csum:                              ; @a3d_csum
	.cfi_startproc
; %bb.0:
	sub	w8, w1, #2
	cmp	w1, #3
	b.lt	LBB0_3
; %bb.1:
	cmp	w8, #8
	b.hs	LBB0_4
; %bb.2:
	mov	x9, #0
	mov	w12, #0
	b	LBB0_13
LBB0_3:
	mov	w9, #0
	b	LBB0_16
LBB0_4:
	adrp	x10, lCPI0_1@PAGE
	adrp	x11, lCPI0_2@PAGE
	cmp	w8, #32
	b.hs	LBB0_6
; %bb.5:
	mov	w12, #0
	mov	x9, #0
	b	LBB0_10
LBB0_6:
	and	x9, x8, #0xffffffe0
	add	x12, x0, #16
	movi.2d	v0, #0000000000000000
Lloh0:
	adrp	x13, lCPI0_0@PAGE
Lloh1:
	ldr	q1, [x13, lCPI0_0@PAGEOFF]
	ldr	q2, [x10, lCPI0_1@PAGEOFF]
	ldr	q3, [x11, lCPI0_2@PAGEOFF]
	movi.2d	v5, #0000000000000000
Lloh2:
	adrp	x13, lCPI0_3@PAGE
Lloh3:
	ldr	q17, [x13, lCPI0_3@PAGEOFF]
	mov	x13, x9
	movi.2d	v4, #0000000000000000
	movi.2d	v7, #0000000000000000
	movi.2d	v6, #0000000000000000
	movi.2d	v18, #0000000000000000
	movi.2d	v16, #0000000000000000
	movi.2d	v19, #0000000000000000
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q20, q24, [x12, #-16]
	tbl.16b	v21, { v20 }, v1
	tbl.16b	v22, { v20 }, v2
	tbl.16b	v23, { v20 }, v3
	tbl.16b	v20, { v20 }, v17
	tbl.16b	v25, { v24 }, v1
	tbl.16b	v26, { v24 }, v2
	tbl.16b	v27, { v24 }, v3
	tbl.16b	v24, { v24 }, v17
	add.4s	v4, v4, v20
	add.4s	v5, v5, v23
	add.4s	v0, v0, v22
	add.4s	v7, v7, v21
	add.4s	v16, v16, v24
	add.4s	v18, v18, v27
	add.4s	v6, v6, v26
	add.4s	v19, v19, v25
	add	x12, x12, #32
	subs	x13, x13, #32
	b.ne	LBB0_7
; %bb.8:
	add.4s	v1, v18, v5
	add.4s	v2, v19, v7
	add.4s	v0, v6, v0
	add.4s	v3, v16, v4
	add.4s	v0, v0, v3
	add.4s	v1, v1, v2
	add.4s	v0, v0, v1
	addv.4s	s0, v0
	fmov	w12, s0
	cmp	x9, x8
	b.eq	LBB0_15
; %bb.9:
	tst	x8, #0x18
	b.eq	LBB0_13
LBB0_10:
	mov	x13, x9
	and	x9, x8, #0xfffffff8
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	mov.s	v1[0], w12
	add	x12, x0, x13
	sub	x13, x13, x9
	ldr	q2, [x10, lCPI0_1@PAGEOFF]
	ldr	q3, [x11, lCPI0_2@PAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	d4, [x12], #8
	tbl.16b	v5, { v4 }, v2
	tbl.16b	v4, { v4 }, v3
	add.4s	v0, v0, v4
	add.4s	v1, v1, v5
	adds	x13, x13, #8
	b.ne	LBB0_11
; %bb.12:
	add.4s	v0, v1, v0
	addv.4s	s0, v0
	fmov	w12, s0
	cmp	x9, x8
	b.eq	LBB0_15
LBB0_13:
	add	x10, x0, x9
	sub	x9, x8, x9
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x10], #1
	add	w12, w12, w11
	subs	x9, x9, #1
	b.ne	LBB0_14
LBB0_15:
	and	w9, w12, #0x3f
LBB0_16:
	ldrsb	w8, [x0, w8, sxtw]
	add	x10, x0, w1, sxtw
	ldursb	w10, [x10, #-1]
	orr	w8, w10, w8, lsl #3
	cmp	w9, w8
	cset	w0, ne
	ret
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_a3d_csum
.subsections_via_symbols
