	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_fw
_check_fw:                              ## @check_fw
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str(%rip), %r8
	cmpb	$77, 8(%rsi)
	jne	LBB0_18
## %bb.1:
	cmpb	$49, 9(%rsi)
	jne	LBB0_18
## %bb.2:
	movq	(%rsi), %rcx
	movl	(%rcx), %edx
	movl	4(%rcx), %eax
	shll	$16, %edx
	shll	$8, %eax
	orl	%edx, %eax
	movl	8(%rcx), %r9d
	orq	%rax, %r9
	cmpl	$262128, %r9d                   ## imm = 0x3FFF0
	jg	LBB0_18
## %bb.3:
	xorl	%eax, %eax
	testl	%r9d, %r9d
	jle	LBB0_4
## %bb.5:
	cmpl	$4, %r9d
	jae	LBB0_7
## %bb.6:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	LBB0_15
LBB0_4:
	xorl	%ecx, %ecx
	jmp	LBB0_16
LBB0_7:
	movl	%r9d, %edx
	andl	$-4, %edx
	leaq	-4(%rdx), %rcx
	movq	%rcx, %r10
	shrq	$2, %r10
	incq	%r10
	movl	%r10d, %r8d
	andl	$3, %r8d
	cmpq	$12, %rcx
	jae	LBB0_9
## %bb.8:
	pxor	%xmm0, %xmm0
	xorl	%ecx, %ecx
	pxor	%xmm1, %xmm1
	jmp	LBB0_11
LBB0_9:
	andq	$-4, %r10
	pxor	%xmm0, %xmm0
	xorl	%ecx, %ecx
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movdqu	192(%rsi,%rcx,8), %xmm2
	paddq	%xmm0, %xmm2
	movdqu	208(%rsi,%rcx,8), %xmm0
	paddq	%xmm1, %xmm0
	movdqu	224(%rsi,%rcx,8), %xmm1
	movdqu	240(%rsi,%rcx,8), %xmm3
	movdqu	256(%rsi,%rcx,8), %xmm4
	paddq	%xmm1, %xmm4
	paddq	%xmm2, %xmm4
	movdqu	272(%rsi,%rcx,8), %xmm2
	paddq	%xmm3, %xmm2
	paddq	%xmm0, %xmm2
	movdqu	288(%rsi,%rcx,8), %xmm0
	paddq	%xmm4, %xmm0
	movdqu	304(%rsi,%rcx,8), %xmm1
	paddq	%xmm2, %xmm1
	addq	$16, %rcx
	addq	$-4, %r10
	jne	LBB0_10
LBB0_11:
	testq	%r8, %r8
	je	LBB0_14
## %bb.12:
	leaq	(%rsi,%rcx,8), %r10
	addq	$208, %r10
	shlq	$5, %r8
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%r10,%rcx), %xmm2
	paddq	%xmm2, %xmm0
	movdqu	(%r10,%rcx), %xmm2
	paddq	%xmm2, %xmm1
	addq	$32, %rcx
	cmpq	%rcx, %r8
	jne	LBB0_13
LBB0_14:
	paddq	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rcx
	cmpq	%r9, %rdx
	je	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	addq	192(%rsi,%rdx,8), %rcx
	incq	%rdx
	cmpq	%rdx, %r9
	jne	LBB0_15
LBB0_16:
	cmpq	16(%rsi), %rcx
	je	LBB0_19
## %bb.17:
	leaq	L_.str.1(%rip), %r8
LBB0_18:
	movl	(%rdi), %edi
	movq	%r8, %rsi
	callq	_dev_info
	movl	$-1, %eax
LBB0_19:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid FW Header\n"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid FW Checksum\n"

	.no_dead_strip	_check_fw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_fw
_check_fw:                              ; @check_fw
	.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
	ldrb	w8, [x1, #8]
	cmp	w8, #77
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x1]
	ldp	w9, w10, [x8]
	lsl	w10, w10, #8
	orr	w9, w10, w9, lsl #16
	ldr	w8, [x8, #8]
	orr	x8, x9, x8
	ldrb	w9, [x1, #9]
	cmp	w9, #49
	mov	w9, #262128
	ccmp	w8, w9, #0, eq
	b.le	LBB0_4
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	ldr	w0, [x0]
	bl	_dev_info
	mov	w0, #-1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	cmp	w8, #8
	b.hs	LBB0_8
; %bb.6:
	mov	x9, #0
	mov	x10, #0
	b	LBB0_11
LBB0_7:
	mov	x10, #0
	b	LBB0_13
LBB0_8:
	and	x9, x8, #0xfffffff8
	add	x10, x1, #240
	movi.2d	v0, #0000000000000000
	mov	x11, x9
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x10, #-48]
	ldp	q6, q7, [x10, #-16]
	add.2d	v0, v4, v0
	add.2d	v1, v5, v1
	add.2d	v2, v6, v2
	add.2d	v3, v7, v3
	add	x10, x10, #64
	subs	x11, x11, #8
	b.ne	LBB0_9
; %bb.10:
	add.2d	v0, v1, v0
	add.2d	v0, v2, v0
	add.2d	v0, v3, v0
	addp.2d	d0, v0
	fmov	x10, d0
	cmp	x9, x8
	b.eq	LBB0_13
LBB0_11:
	add	x11, x1, x9, lsl #3
	add	x11, x11, #192
	sub	x8, x8, x9
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x11], #8
	add	x10, x9, x10
	subs	x8, x8, #1
	b.ne	LBB0_12
LBB0_13:
	ldr	x8, [x1, #16]
	cmp	x10, x8
	b.ne	LBB0_15
; %bb.14:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid FW Header\n"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid FW Checksum\n"

	.no_dead_strip	_check_fw
.subsections_via_symbols
