	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max17042_verify_model_lock
_max17042_verify_model_lock:            ## @max17042_verify_model_lock
	.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, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	movl	%eax, %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movl	$8, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_MAX17042_MODELChrTbl@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movl	%r15d, %ecx
	callq	_max17042_read_model_data
	testl	%r15d, %r15d
	jle	LBB0_3
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	movl	%r15d, %ecx
	cmpl	$4, %r15d
	jae	LBB0_6
## %bb.5:
	xorl	%edx, %edx
	jmp	LBB0_13
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_6:
	movl	%ecx, %edx
	andl	$-4, %edx
	movd	%eax, %xmm0
	pshufd	$80, %xmm0, %xmm2               ## xmm2 = xmm0[0,0,1,1]
	leaq	-4(%rdx), %rsi
	movq	%rsi, %rbx
	shrq	$2, %rbx
	incq	%rbx
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.8:
	movq	%rbx, %rsi
	andq	$-2, %rsi
	pxor	%xmm1, %xmm1
	xorl	%edi, %edi
	xorps	%xmm6, %xmm6
	xorps	%xmm5, %xmm5
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%r14,%rdi,8), %xmm0
	movdqu	16(%r14,%rdi,8), %xmm3
	movdqu	32(%r14,%rdi,8), %xmm4
	por	%xmm0, %xmm4
	movdqu	48(%r14,%rdi,8), %xmm7
	por	%xmm3, %xmm7
	pcmpeqq	%xmm1, %xmm4
	pshufd	$232, %xmm4, %xmm0              ## xmm0 = xmm4[0,2,2,3]
	movdqa	%xmm2, %xmm3
	blendvps	%xmm0, %xmm6, %xmm3
	pcmpeqq	%xmm1, %xmm7
	pshufd	$232, %xmm7, %xmm0              ## xmm0 = xmm7[0,2,2,3]
	movdqa	%xmm2, %xmm4
	blendvps	%xmm0, %xmm5, %xmm4
	addq	$8, %rdi
	movaps	%xmm3, %xmm6
	movaps	%xmm4, %xmm5
	addq	$-2, %rsi
	jne	LBB0_9
## %bb.10:
	testb	$1, %bl
	je	LBB0_12
LBB0_11:
	movdqu	(%r14,%rdi,8), %xmm0
	movdqu	16(%r14,%rdi,8), %xmm1
	xorps	%xmm5, %xmm5
	pcmpeqq	%xmm5, %xmm0
	pshufd	$232, %xmm0, %xmm0              ## xmm0 = xmm0[0,2,2,3]
	pcmpeqq	%xmm5, %xmm1
	pshufd	$232, %xmm1, %xmm1              ## xmm1 = xmm1[0,2,2,3]
	movdqa	%xmm2, %xmm5
	blendvps	%xmm0, %xmm3, %xmm5
	movdqa	%xmm1, %xmm0
	blendvps	%xmm0, %xmm4, %xmm2
	movaps	%xmm5, %xmm3
	movaps	%xmm2, %xmm4
LBB0_12:
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm3, %xmm0
	blendvps	%xmm0, %xmm4, %xmm3
	movq	%xmm3, %rsi
	xorl	%ebx, %ebx
	testq	%rsi, %rsi
	cmovnel	%eax, %ebx
	cmpq	%rcx, %rdx
	je	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r14,%rdx,8)
	cmovnel	%eax, %ebx
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_13
LBB0_14:
	movq	%r14, %rdi
	callq	_kfree
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorps	%xmm3, %xmm3
	xorl	%edi, %edi
	xorps	%xmm4, %xmm4
	testb	$1, %bl
	jne	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MAX17042_MODELChrTbl,4,2       ## @MAX17042_MODELChrTbl
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_max17042_verify_model_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max17042_verify_model_lock
_max17042_verify_model_lock:            ; @max17042_verify_model_lock
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kcalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _MAX17042_MODELChrTbl@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX17042_MODELChrTbl@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x19
	mov	x3, x20
	bl	_max17042_read_model_data
	cmp	w20, #1
	b.lt	LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w8, w8
	mov	w9, w20
	cmp	w20, #8
	b.hs	LBB0_6
; %bb.3:
	mov	x10, #0
	mov	w20, #0
	b	LBB0_9
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_5:
	mov	w20, #0
	b	LBB0_11
LBB0_6:
	and	x10, x9, #0xfffffff8
	dup.2s	v1, w8
	movi.2d	v0, #0000000000000000
	add	x11, x19, #32
	mov	x12, x10
	movi.2d	v4, #0000000000000000
	movi.2d	v3, #0000000000000000
	movi.2d	v2, #0000000000000000
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q5, q6, [x11, #-32]
	ldp	q7, q16, [x11], #64
	cmeq.2d	v5, v5, #0
	xtn.2s	v5, v5
	cmeq.2d	v6, v6, #0
	xtn.2s	v6, v6
	cmeq.2d	v7, v7, #0
	xtn.2s	v7, v7
	cmeq.2d	v16, v16, #0
	xtn.2s	v16, v16
	bif.8b	v0, v1, v5
	bif.8b	v4, v1, v6
	bif.8b	v3, v1, v7
	bif.8b	v2, v1, v16
	subs	x12, x12, #8
	b.ne	LBB0_7
; %bb.8:
	cmeq.2s	v1, v0, #0
	bit.8b	v0, v4, v1
	cmeq.2s	v1, v0, #0
	bit.8b	v0, v3, v1
	cmeq.2s	v1, v0, #0
	bit.8b	v0, v2, v1
	fmov	x11, d0
	cmp	x11, #0
	csel	w20, wzr, w8, eq
	cmp	x10, x9
	b.eq	LBB0_11
LBB0_9:
	add	x11, x19, x10, lsl #3
	sub	x9, x9, x10
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x11], #8
	cmp	x10, #0
	csel	w20, w20, w8, eq
	subs	x9, x9, #1
	b.ne	LBB0_10
LBB0_11:
	mov	x0, x19
	bl	_kfree
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MAX17042_MODELChrTbl,4,2       ; @MAX17042_MODELChrTbl
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_max17042_verify_model_lock
.subsections_via_symbols
