	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goodix_check_cfg_8
_goodix_check_cfg_8:                    ## @goodix_check_cfg_8
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movslq	(%rsi), %r9
	leal	-2(%r9), %r8d
	xorl	%eax, %eax
	movq	8(%rsi), %rdx
	cmpq	$3, %r9
	jl	LBB0_12
## %bb.1:
	movl	%r8d, %r11d
	cmpl	$8, %r8d
	jae	LBB0_3
## %bb.2:
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_3:
	movl	%r11d, %esi
	andl	$-8, %esi
	leaq	-8(%rsi), %rcx
	movq	%rcx, %rax
	shrq	$3, %rax
	incq	%rax
	movl	%eax, %r10d
	andl	$3, %r10d
	cmpq	$24, %rcx
	jae	LBB0_5
## %bb.4:
	pxor	%xmm0, %xmm0
	xorl	%ecx, %ecx
	pxor	%xmm1, %xmm1
	jmp	LBB0_7
LBB0_5:
	andq	$-4, %rax
	pxor	%xmm0, %xmm0
	xorl	%ecx, %ecx
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdx,%rcx,4), %xmm2
	paddd	%xmm0, %xmm2
	movdqu	16(%rdx,%rcx,4), %xmm0
	paddd	%xmm1, %xmm0
	movdqu	32(%rdx,%rcx,4), %xmm1
	movdqu	48(%rdx,%rcx,4), %xmm3
	movdqu	64(%rdx,%rcx,4), %xmm4
	paddd	%xmm1, %xmm4
	paddd	%xmm2, %xmm4
	movdqu	80(%rdx,%rcx,4), %xmm2
	paddd	%xmm3, %xmm2
	paddd	%xmm0, %xmm2
	movdqu	96(%rdx,%rcx,4), %xmm0
	paddd	%xmm4, %xmm0
	movdqu	112(%rdx,%rcx,4), %xmm1
	paddd	%xmm2, %xmm1
	addq	$32, %rcx
	addq	$-4, %rax
	jne	LBB0_6
LBB0_7:
	testq	%r10, %r10
	je	LBB0_10
## %bb.8:
	leaq	(%rdx,%rcx,4), %rax
	addq	$16, %rax
	shlq	$5, %r10
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rax,%rcx), %xmm2
	paddd	%xmm2, %xmm0
	movdqu	(%rax,%rcx), %xmm2
	paddd	%xmm2, %xmm1
	addq	$32, %rcx
	cmpq	%rcx, %r10
	jne	LBB0_9
LBB0_10:
	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, %eax
	cmpq	%r11, %rsi
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	addl	(%rdx,%rsi,4), %eax
	incq	%rsi
	cmpq	%rsi, %r11
	jne	LBB0_11
LBB0_12:
	movslq	%r8d, %rcx
	addl	(%rdx,%rcx,4), %eax
	jne	LBB0_13
## %bb.14:
	xorl	%eax, %eax
	cmpl	$1, -4(%rdx,%r9,4)
	je	LBB0_17
## %bb.15:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_16
LBB0_13:
	leaq	L_.str(%rip), %rsi
LBB0_16:
	movq	(%rdi), %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"The checksum of the config fw is not correct"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Config fw must have Config_Fresh register set"

	.no_dead_strip	_goodix_check_cfg_8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goodix_check_cfg_8
_goodix_check_cfg_8:                    ; @goodix_check_cfg_8
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w8, [x1]
	sub	w10, w8, #2
	ldr	x9, [x1, #8]
	cmp	w8, #3
	b.lt	LBB0_3
; %bb.1:
	cmp	w10, #16
	b.hs	LBB0_4
; %bb.2:
	mov	x11, #0
	mov	w12, #0
	b	LBB0_7
LBB0_3:
	mov	w12, #0
	b	LBB0_9
LBB0_4:
	and	x11, x10, #0xfffffff0
	add	x12, x9, #32
	movi.2d	v0, #0000000000000000
	mov	x13, x11
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x12, #-32]
	ldp	q6, q7, [x12], #64
	add.4s	v0, v4, v0
	add.4s	v1, v5, v1
	add.4s	v2, v6, v2
	add.4s	v3, v7, v3
	subs	x13, x13, #16
	b.ne	LBB0_5
; %bb.6:
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w12, s0
	cmp	x11, x10
	b.eq	LBB0_9
LBB0_7:
	add	x13, x9, x11, lsl #2
	sub	x11, x10, x11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x13], #4
	add	w12, w14, w12
	subs	x11, x11, #1
	b.ne	LBB0_8
LBB0_9:
	ldr	w10, [x9, w10, sxtw #2]
	cmn	w10, w12
	b.ne	LBB0_12
; %bb.10:
	sub	w8, w8, #1
	ldr	w8, [x9, w8, sxtw #2]
	cmp	w8, #1
	b.ne	LBB0_13
; %bb.11:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_14:
	ldr	x0, [x0]
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"The checksum of the config fw is not correct"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Config fw must have Config_Fresh register set"

	.no_dead_strip	_goodix_check_cfg_8
.subsections_via_symbols
