	.file	"extr_opal-flash.c_validate_store.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	validate_store, @function
validate_store:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	BYTE PTR [rdx], 49
	je	.L2
	mov	rax, QWORD PTR EINVAL[rip]
	neg	rax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	lea	rdi, image_data_mutex[rip]
	mov	rbx, rcx
	call	mutex_lock@PLT
	mov	rax, QWORD PTR IMAGE_READY[rip]
	cmp	QWORD PTR image_data[rip], rax
	je	.L11
.L4:
	mov	eax, DWORD PTR VALIDATE_INVALID_IMG[rip]
	mov	DWORD PTR validate_flash_data[rip+16], eax
	mov	eax, DWORD PTR VALIDATE_IMG_INCOMPLETE[rip]
	mov	DWORD PTR validate_flash_data[rip+8], eax
.L6:
	lea	rdi, image_data_mutex[rip]
	call	mutex_unlock@PLT
	mov	rax, rbx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdx, QWORD PTR VALIDATE_BUF_SIZE[rip]
	cmp	QWORD PTR image_data[rip+8], rdx
	jl	.L4
	mov	esi, DWORD PTR image_data[rip+16]
	mov	edi, DWORD PTR validate_flash_data[rip+12]
	call	memcpy@PLT
	mov	eax, DWORD PTR VALIDATE_IMG_READY[rip]
	mov	DWORD PTR validate_flash_data[rip+8], eax
	mov	rax, QWORD PTR VALIDATE_BUF_SIZE[rip]
	mov	QWORD PTR validate_flash_data[rip], rax
	xor	eax, eax
	call	opal_flash_validate@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	validate_store, .-validate_store
	.comm	validate_flash_data,24,16
	.comm	image_data_mutex,4,4
	.comm	image_data,24,16
	.comm	VALIDATE_INVALID_IMG,4,4
	.comm	VALIDATE_IMG_READY,4,4
	.comm	VALIDATE_IMG_INCOMPLETE,4,4
	.comm	VALIDATE_BUF_SIZE,8,8
	.comm	IMAGE_READY,8,8
	.comm	EINVAL,8,8
	.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_opal-flash.c_validate_store.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	validate_store, %function
validate_store:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldrb	r2, [r2]	@ zero_extendqisi2
	cmp	r2, #49
	beq	.L2
	ldr	r3, .L12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bx	lr
.L2:
	push	{r4, r5, r6, lr}
	ldr	r0, .L12+4
	mov	r4, r3
	bl	mutex_lock
	ldr	r3, .L12+8
	ldr	r2, .L12+12
	ldr	r1, [r3]
	ldr	r2, [r2]
	cmp	r1, r2
	beq	.L11
.L4:
	ldr	r3, .L12+16
	ldr	r2, .L12+20
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, .L12+24
	str	r1, [r3, #12]
	str	r2, [r3, #4]
.L6:
	ldr	r0, .L12+4
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L11:
	ldr	r5, .L12+28
	ldr	r1, [r3, #4]
	ldr	r2, [r5]
	cmp	r1, r2
	blt	.L4
	ldr	r6, .L12+24
	ldr	r1, [r3, #8]
	ldr	r0, [r6, #8]
	bl	memcpy
	ldr	r3, .L12+32
	ldr	r2, [r5]
	ldr	r3, [r3]
	stm	r6, {r2, r3}
	bl	opal_flash_validate
	b	.L6
.L13:
	.align	2
.L12:
	.word	EINVAL
	.word	image_data_mutex
	.word	image_data
	.word	IMAGE_READY
	.word	VALIDATE_INVALID_IMG
	.word	VALIDATE_IMG_INCOMPLETE
	.word	validate_flash_data
	.word	VALIDATE_BUF_SIZE
	.word	VALIDATE_IMG_READY
	.size	validate_store, .-validate_store
	.comm	validate_flash_data,16,4
	.comm	image_data_mutex,4,4
	.comm	image_data,12,4
	.comm	VALIDATE_INVALID_IMG,4,4
	.comm	VALIDATE_IMG_READY,4,4
	.comm	VALIDATE_IMG_INCOMPLETE,4,4
	.comm	VALIDATE_BUF_SIZE,4,4
	.comm	IMAGE_READY,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
