	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function validate_fw
_validate_fw:                           ## @validate_fw
	.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
	cmpq	$24, %rsi
	jae	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rax
	jmp	LBB0_13
LBB0_2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	20(%rdi), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$3, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rax
	jmp	LBB0_13
LBB0_4:
	movl	16(%r14), %edi
	callq	_le16_to_cpu
	cmpq	%rbx, %rax
	jbe	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rax
	jmp	LBB0_13
LBB0_6:
	movq	%rax, %r15
	movl	12(%r14), %edi
	callq	_le32_to_cpu
	addq	%r15, %rax
	cmpq	%rbx, %rax
	jbe	LBB0_8
## %bb.7:
	leaq	L_.str.4(%rip), %rax
	jmp	LBB0_13
LBB0_8:
	movl	8(%r14), %edi
	callq	_le32_to_cpu
	addq	%r15, %rax
	cmpq	%rbx, %rax
	jbe	LBB0_10
## %bb.9:
	leaq	L_.str.5(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movl	4(%r14), %edi
	callq	_le32_to_cpu
	addq	%r15, %rax
	cmpq	%rbx, %rax
	jbe	LBB0_12
## %bb.11:
	leaq	L_.str.6(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movl	(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, %rcx
	addq	%r15, %rcx
	xorl	%eax, %eax
	cmpq	%rbx, %rcx
	leaq	L_.str.7(%rip), %rcx
	cmovaq	%rcx, %rax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"image too small"

L_.str.1:                               ## @.str.1
	.asciz	"HFW"

L_.str.2:                               ## @.str.2
	.asciz	"format not recognised"

L_.str.3:                               ## @.str.3
	.asciz	"bad headersize"

L_.str.4:                               ## @.str.4
	.asciz	"bad block offset"

L_.str.5:                               ## @.str.5
	.asciz	"bad PDR offset"

L_.str.6:                               ## @.str.6
	.asciz	"bad PRI offset"

L_.str.7:                               ## @.str.7
	.asciz	"bad compat offset"

	.no_dead_strip	_validate_fw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function validate_fw
_validate_fw:                           ; @validate_fw
	.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
	cmp	x1, #24
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_13
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #20]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #3
	bl	_memcmp
	cbz	x0, LBB0_4
; %bb.3:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_4:
	ldr	w0, [x20, #16]
	bl	_le16_to_cpu
	cmp	x0, x19
	b.ls	LBB0_6
; %bb.5:
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_13
LBB0_6:
	mov	x21, x0
	ldr	w0, [x20, #12]
	bl	_le32_to_cpu
	add	x8, x0, x21
	cmp	x8, x19
	b.ls	LBB0_8
; %bb.7:
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_13
LBB0_8:
	ldr	w0, [x20, #8]
	bl	_le32_to_cpu
	add	x8, x0, x21
	cmp	x8, x19
	b.ls	LBB0_10
; %bb.9:
Lloh10:
	adrp	x0, l_.str.5@PAGE
Lloh11:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_13
LBB0_10:
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
	add	x8, x0, x21
	cmp	x8, x19
	b.ls	LBB0_12
; %bb.11:
Lloh12:
	adrp	x0, l_.str.6@PAGE
Lloh13:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_13
LBB0_12:
	ldr	w0, [x20]
	bl	_le32_to_cpu
Lloh14:
	adrp	x8, l_.str.7@PAGE
Lloh15:
	add	x8, x8, l_.str.7@PAGEOFF
	add	x9, x0, x21
	cmp	x9, x19
	csel	x0, x8, xzr, hi
LBB0_13:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"image too small"

l_.str.1:                               ; @.str.1
	.asciz	"HFW"

l_.str.2:                               ; @.str.2
	.asciz	"format not recognised"

l_.str.3:                               ; @.str.3
	.asciz	"bad headersize"

l_.str.4:                               ; @.str.4
	.asciz	"bad block offset"

l_.str.5:                               ; @.str.5
	.asciz	"bad PDR offset"

l_.str.6:                               ; @.str.6
	.asciz	"bad PRI offset"

l_.str.7:                               ; @.str.7
	.asciz	"bad compat offset"

	.no_dead_strip	_validate_fw
.subsections_via_symbols
