	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goodix_check_cfg_16
_goodix_check_cfg_16:                   ## @goodix_check_cfg_16
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movslq	(%rsi), %rcx
	leaq	-3(%rcx), %r13
	xorl	%ebx, %ebx
	movq	%rcx, %rax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	cmpq	$4, %rcx
	jl	LBB0_3
## %bb.1:
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rdi
	addq	%r12, %rdi
	callq	_get_unaligned_be16
	addl	%eax, %ebx
	addq	$8, %r12
	addl	$2, %r14d
	cmpl	%r14d, %r13d
	jg	LBB0_2
LBB0_3:
	shlq	$2, %r13
	addq	8(%r15), %r13
	movq	%r13, %rdi
	callq	_get_unaligned_be16
	addl	%ebx, %eax
	jne	LBB0_4
## %bb.5:
	movq	8(%r15), %rcx
	xorl	%eax, %eax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	cmpl	$1, -4(%rcx,%rdx,4)
	je	LBB0_8
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str(%rip), %rsi
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	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_16
.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_16
_goodix_check_cfg_16:                   ; @goodix_check_cfg_16
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldr	w21, [x1]
	sub	w22, w21, #3
	cmp	w21, #4
	b.lt	LBB0_3
; %bb.1:
	mov	w24, #0
	mov	x25, #0
	mov	w23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x0, x8, x25
	bl	_get_unaligned_be16
	add	w23, w0, w23
	add	x25, x25, #8
	add	w24, w24, #2
	cmp	w22, w24
	b.gt	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w23, #0
LBB0_4:
	ldr	x8, [x20, #8]
	add	x0, x8, w22, sxtw #2
	bl	_get_unaligned_be16
	cmn	w0, w23
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x20, #8]
	sub	w9, w21, #1
	ldr	w8, [x8, w9, sxtw #2]
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.6:
	mov	w0, #0
	b	LBB0_10
LBB0_7:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	ldr	x0, [x19]
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 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_16
.subsections_via_symbols
