	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qed_nvm_flash_image_validate
_qed_nvm_flash_image_validate:          ## @qed_nvm_flash_image_validate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movslq	(%rsi), %rax
	cmpq	$11, %rax
	jg	LBB0_5
## %bb.1:
	leaq	L_.str(%rip), %rsi
LBB0_2:
	xorl	%ebx, %ebx
	movq	%rax, %rdx
	jmp	LBB0_3
LBB0_5:
	movq	(%rdx), %rsi
	movq	(%rsi), %rcx
	movq	_QED_NVM_SIGNATURE@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rcx
	jne	LBB0_6
## %bb.7:
	leaq	16(%rsi), %rcx
	movq	%rcx, (%rdx)
	movq	16(%rsi), %r8
	movl	%eax, %ecx
	cmpq	%rcx, %r8
	jne	LBB0_8
## %bb.9:
	leaq	32(%rsi), %rax
	movq	%rax, (%rdx)
	movq	32(%rsi), %rax
	movq	_QED_NVM_FLASH_CMD_NVM_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_10
## %bb.11:
	addq	$48, %rsi
	movq	%rsi, (%rdx)
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rcx, %rdx
LBB0_3:
	xorl	%eax, %eax
	callq	_DP_ERR
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r8, %rdx
	xorl	%eax, %eax
	callq	_DP_ERR
	jmp	LBB0_4
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Image is too short [%08x]\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_QED_NVM_SIGNATURE,8,3          ## @QED_NVM_SIGNATURE
L_.str.1:                               ## @.str.1
	.asciz	"Wrong signature '%08x'\n"

L_.str.2:                               ## @.str.2
	.asciz	"Size mismatch: internal = %08x image = %08x\n"

	.comm	_QED_NVM_FLASH_CMD_NVM_MAX,8,3  ## @QED_NVM_FLASH_CMD_NVM_MAX
L_.str.3:                               ## @.str.3
	.asciz	"File contains unsupported commands [Need %04x]\n"

	.no_dead_strip	_qed_nvm_flash_image_validate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qed_nvm_flash_image_validate
_qed_nvm_flash_image_validate:          ; @qed_nvm_flash_image_validate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldrsw	x8, [x1]
	cmp	w8, #11
	b.gt	LBB0_3
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	mov	x2, x8
	b	LBB0_10
LBB0_3:
	ldr	x10, [x2]
	ldr	x9, [x10]
Lloh2:
	adrp	x11, _QED_NVM_SIGNATURE@GOTPAGE
Lloh3:
	ldr	x11, [x11, _QED_NVM_SIGNATURE@GOTPAGEOFF]
Lloh4:
	ldr	x11, [x11]
	cmp	x9, x11
	b.ne	LBB0_7
; %bb.4:
	mov	x11, x10
	ldr	x9, [x11, #16]!
	str	x11, [x2]
	and	x8, x8, #0xffffffff
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.5:
	mov	x9, x10
	ldr	x8, [x9, #32]!
	str	x9, [x2]
Lloh5:
	adrp	x9, _QED_NVM_FLASH_CMD_NVM_MAX@GOTPAGE
Lloh6:
	ldr	x9, [x9, _QED_NVM_FLASH_CMD_NVM_MAX@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_12
; %bb.6:
	mov	w0, #0
	add	x8, x10, #48
	str	x8, [x2]
	b	LBB0_11
LBB0_7:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_8:
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	mov	x2, x9
LBB0_10:
	bl	_DP_ERR
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
LBB0_12:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Image is too short [%08x]\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QED_NVM_SIGNATURE,8,3          ; @QED_NVM_SIGNATURE
l_.str.1:                               ; @.str.1
	.asciz	"Wrong signature '%08x'\n"

l_.str.2:                               ; @.str.2
	.asciz	"Size mismatch: internal = %08x image = %08x\n"

	.comm	_QED_NVM_FLASH_CMD_NVM_MAX,8,3  ; @QED_NVM_FLASH_CMD_NVM_MAX
l_.str.3:                               ; @.str.3
	.asciz	"File contains unsupported commands [Need %04x]\n"

	.no_dead_strip	_qed_nvm_flash_image_validate
.subsections_via_symbols
