	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx18_av_verifyfw
_cx18_av_verifyfw:                      ## @cx18_av_verifyfw
	.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
	pushq	%rax
	.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, %r13
	movq	_CXADEC_DL_CTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_cx18_av_read4
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	andl	$16777215, %eax                 ## imm = 0xFFFFFF
	orl	$251658240, %eax                ## imm = 0xF000000
	movl	(%r12), %esi
	movq	%r13, %rdi
	movl	%eax, %edx
	callq	_cx18_av_write4_noretry
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_cx18_av_read4
	movl	%eax, %ecx
	andl	$-16777216, %ecx                ## imm = 0xFF000000
	cmpl	$251658240, %ecx                ## imm = 0xF000000
	jne	LBB0_1
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_cx18_av_read4
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testl	$16383, %eax                    ## imm = 0x3FFF
	jne	LBB0_2
## %bb.4:
	movl	(%r15), %r14d
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.5:
	movq	8(%r15), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	andl	$-49153, %eax                   ## imm = 0xFFFF3FFF
	movl	(%r15,%rbx,8), %edx
	shll	$16, %edx
	movl	%ebx, %ecx
	orl	%edx, %ecx
	orl	$251658240, %ecx                ## imm = 0xF000000
	cmpl	%eax, %ecx
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_cx18_av_read4
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_6
	jmp	LBB0_8
LBB0_9:
	movq	_FWFILE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	%eax, %r8d
	callq	_CX18_ERR_DEV
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.10:
	negl	%eax
	jmp	LBB0_11
LBB0_8:
	movq	_FWFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %ecx
	callq	_CX18_INFO_DEV
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CXADEC_DL_CTL,4,2              ## @CXADEC_DL_CTL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"verification of %s firmware load failed: expected %#010x got %#010x\n"

	.comm	_FWFILE,4,2                     ## @FWFILE
	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"verified load of %s firmware (%d bytes)\n"

	.no_dead_strip	_cx18_av_verifyfw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx18_av_verifyfw
_cx18_av_verifyfw:                      ; @cx18_av_verifyfw
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _CXADEC_DL_CTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CXADEC_DL_CTL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_cx18_av_read4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w2, #251658240
	bfxil	w2, w0, #0, #24
	ldr	w1, [x22]
	mov	x0, x19
	bl	_cx18_av_write4_noretry
	ldr	w1, [x22]
	mov	x0, x19
	bl	_cx18_av_read4
	lsr	w8, w0, #24
	cmp	w8, #15
	b.ne	LBB0_1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_cx18_av_read4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	tst	w0, #0x3fff
	b.ne	LBB0_2
; %bb.4:
	ldr	w20, [x21]
Lloh2:
	adrp	x23, _FWFILE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _FWFILE@GOTPAGEOFF]
	cmp	w20, #1
	b.lt	LBB0_10
; %bb.5:
	mov	x24, #0
	ldr	x21, [x21, #8]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	and	w4, w0, #0xffff3fff
	ldr	x8, [x21, x24, lsl #3]
	orr	w8, w24, w8, lsl #16
	orr	w3, w8, #0xf000000
	cmp	w3, w4
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_cx18_av_read4
	add	x24, x24, #1
	cmp	x20, x24
	b.ne	LBB0_6
	b	LBB0_10
LBB0_8:
	ldr	w2, [x23]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_CX18_ERR_DEV
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cbz	w8, LBB0_10
; %bb.9:
	neg	w0, w8
	b	LBB0_11
LBB0_10:
	ldr	w2, [x23]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_CX18_INFO_DEV
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CXADEC_DL_CTL,4,2              ; @CXADEC_DL_CTL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"verification of %s firmware load failed: expected %#010x got %#010x\n"

	.comm	_FWFILE,4,2                     ; @FWFILE
	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"verified load of %s firmware (%d bytes)\n"

	.no_dead_strip	_cx18_av_verifyfw
.subsections_via_symbols
