	.file	"extr_firmware.c_vnt_check_firmware_version.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Could not get firmware version: %d.\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Firmware Version [%04x]\n"
.LC2:
	.string	"In Loader.\n"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"Could not branch to SRAM: %d.\n"
	.text
	.p2align 4
	.globl	vnt_check_firmware_version
	.type	vnt_check_firmware_version, @function
vnt_check_firmware_version:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r9, rdi
	mov	r8d, 2
	xor	edx, edx
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	ecx, DWORD PTR MESSAGE_REQUEST_VERSION[rip]
	mov	esi, DWORD PTR MESSAGE_TYPE_READ[rip]
	call	vnt_control_in@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	r12d, eax
	test	eax, eax
	jne	.L8
	mov	edx, DWORD PTR [rbx]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	eax, DWORD PTR [rbx]
	cmp	eax, 65535
	je	.L9
	cmp	eax, DWORD PTR FIRMWARE_VERSION[rip]
	jl	.L10
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	edx, eax
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, rbx
	call	vnt_firmware_branch_to_sram@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L11
.L3:
	endbr64
	mov	r12d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbx]
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, QWORD PTR 8[rbx]
	mov	edx, eax
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	vnt_check_firmware_version, .-vnt_check_firmware_version
	.comm	MESSAGE_TYPE_READ,4,4
	.comm	MESSAGE_REQUEST_VERSION,4,4
	.comm	FIRMWARE_VERSION,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_firmware.c_vnt_check_firmware_version.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Could not get firmware version: %d.\012\000"
	.align	2
.LC1:
	.ascii	"Firmware Version [%04x]\012\000"
	.align	2
.LC2:
	.ascii	"In Loader.\012\000"
	.align	2
.LC3:
	.ascii	"Could not branch to SRAM: %d.\012\000"
	.text
	.align	2
	.global	vnt_check_firmware_version
	.syntax unified
	.arm
	.fpu softvfp
	.type	vnt_check_firmware_version, %function
vnt_check_firmware_version:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r1, #2
	push	{r4, r5, lr}
	ldr	r2, .L12
	sub	sp, sp, #12
	ldr	r3, .L12+4
	str	r0, [sp, #4]
	str	r1, [sp]
	ldr	r1, [r2]
	ldr	r3, [r3]
	mov	r2, #0
	mov	r5, r0
	bl	vnt_control_in
	subs	r4, r0, #0
	bne	.L8
	ldr	r2, [r5]
	ldr	r1, .L12+8
	ldr	r0, [r5, #4]
	bl	dev_dbg
	ldr	r3, [r5]
	ldr	r2, .L12+12
	cmp	r3, r2
	beq	.L9
	ldr	r2, .L12+16
	ldr	r2, [r2]
	cmp	r3, r2
	blt	.L10
.L1:
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L8:
	mov	r2, r4
	ldr	r0, [r5, #4]
	ldr	r1, .L12+20
	bl	dev_dbg
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L10:
	mov	r0, r5
	bl	vnt_firmware_branch_to_sram
	subs	r4, r0, #0
	bne	.L11
.L3:
	ldr	r3, .L12+24
	ldr	r0, [r3]
	rsb	r4, r0, #0
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L9:
	ldr	r0, [r5, #4]
	ldr	r1, .L12+28
	bl	dev_dbg
	ldr	r3, .L12+24
	ldr	r0, [r3]
	rsb	r4, r0, #0
	b	.L1
.L11:
	mov	r2, r4
	ldr	r0, [r5, #4]
	ldr	r1, .L12+32
	bl	dev_dbg
	b	.L1
.L13:
	.align	2
.L12:
	.word	MESSAGE_TYPE_READ
	.word	MESSAGE_REQUEST_VERSION
	.word	.LC1
	.word	65535
	.word	FIRMWARE_VERSION
	.word	.LC0
	.word	EINVAL
	.word	.LC2
	.word	.LC3
	.size	vnt_check_firmware_version, .-vnt_check_firmware_version
	.comm	MESSAGE_TYPE_READ,4,4
	.comm	MESSAGE_REQUEST_VERSION,4,4
	.comm	FIRMWARE_VERSION,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
