	.file	"extr_mtd.c_image_check.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Could not get image magic\n"
	.text
	.p2align 4
	.type	image_check, @function
image_check:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR buflen[rip]
	cmp	eax, 3
	ja	.L5
	mov	ebx, 4
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	add	eax, DWORD PTR buflen[rip]
	mov	DWORD PTR buflen[rip], eax
	cmp	eax, 3
	ja	.L5
.L4:
	mov	edx, ebx
	mov	edi, ebp
	sub	edx, eax
	cdqe
	add	rax, QWORD PTR buf[rip]
	mov	rsi, rax
	call	read@PLT
	test	eax, eax
	jg	.L18
	cmp	DWORD PTR buflen[rip], 3
	ja	.L5
	mov	edi, DWORD PTR stdout[rip]
	lea	rsi, .LC0[rip]
	call	fprintf@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rax, QWORD PTR buf[rip]
	mov	r13d, DWORD PTR [rax]
	mov	edi, r13d
	call	be32_to_cpu@PLT
	cmp	rax, QWORD PTR TRX_MAGIC[rip]
	jne	.L19
	mov	DWORD PTR imageformat[rip], 130
.L7:
	mov	rdx, QWORD PTR buf[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, r12
	mov	edi, ebp
	pop	rbx
	.cfi_def_cfa_offset 32
	lea	rcx, buflen[rip]
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	trx_check@PLT
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	edi, r13d
	call	be32_to_cpu@PLT
	cmp	rax, QWORD PTR SEAMA_MAGIC[rip]
	jne	.L8
	mov	DWORD PTR imageformat[rip], 131
.L9:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	edi, r13d
	call	le32_to_cpu@PLT
	cmp	rax, QWORD PTR WRG_MAGIC[rip]
	jne	.L10
	mov	DWORD PTR imageformat[rip], 129
	jmp	.L9
.L10:
	mov	edi, r13d
	call	le32_to_cpu@PLT
	cmp	rax, QWORD PTR WRGG03_MAGIC[rip]
	je	.L20
	cmp	DWORD PTR imageformat[rip], 130
	jne	.L9
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	mov	DWORD PTR imageformat[rip], 128
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	image_check, .-image_check
	.comm	stdout,4,4
	.comm	imageformat,4,4
	.comm	buflen,4,4
	.comm	buf,8,8
	.comm	WRG_MAGIC,8,8
	.comm	WRGG03_MAGIC,8,8
	.comm	TRX_MAGIC,8,8
	.comm	SEAMA_MAGIC,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_mtd.c_image_check.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Could not get image magic\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	image_check, %function
image_check:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, .L24
	mov	r5, r0
	ldr	r3, [r4]
	mov	r6, r1
	cmp	r3, #3
	ldr	r7, .L24+4
	bls	.L4
	b	.L5
.L21:
	add	r3, r0, r3
	cmp	r3, #3
	str	r3, [r4]
	bhi	.L5
.L4:
	ldr	r1, [r7]
	rsb	r2, r3, #4
	add	r1, r3, r1
	mov	r0, r5
	bl	read
	cmp	r0, #0
	ldr	r3, [r4]
	bgt	.L21
	cmp	r3, #3
	bhi	.L5
	ldr	r3, .L24+8
	ldr	r1, .L24+12
	ldr	r0, [r3]
	bl	fprintf
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	ldr	r3, [r7]
	ldr	r4, [r3]
	mov	r0, r4
	bl	be32_to_cpu
	ldr	r3, .L24+16
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L22
	mov	r2, #130
	ldr	r3, .L24+20
	str	r2, [r3]
.L7:
	mov	r1, r6
	mov	r0, r5
	ldr	r2, [r7]
	ldr	r3, .L24
	pop	{r4, r5, r6, r7, r8, lr}
	b	trx_check
.L22:
	mov	r0, r4
	bl	be32_to_cpu
	ldr	r3, .L24+24
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L8
	mov	r2, #131
	ldr	r3, .L24+20
	str	r2, [r3]
.L9:
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	r0, r4
	bl	le32_to_cpu
	ldr	r3, .L24+28
	ldr	r3, [r3]
	cmp	r0, r3
	moveq	r2, #129
	ldreq	r3, .L24+20
	streq	r2, [r3]
	beq	.L9
.L10:
	mov	r0, r4
	bl	le32_to_cpu
	ldr	r3, .L24+32
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L23
	ldr	r3, .L24+20
	ldr	r3, [r3]
	cmp	r3, #130
	beq	.L7
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, pc}
.L23:
	mov	r2, #128
	ldr	r3, .L24+20
	str	r2, [r3]
	b	.L9
.L25:
	.align	2
.L24:
	.word	buflen
	.word	buf
	.word	stdout
	.word	.LC0
	.word	TRX_MAGIC
	.word	imageformat
	.word	SEAMA_MAGIC
	.word	WRG_MAGIC
	.word	WRGG03_MAGIC
	.size	image_check, .-image_check
	.comm	stdout,4,4
	.comm	imageformat,4,4
	.comm	buflen,4,4
	.comm	buf,4,4
	.comm	WRG_MAGIC,4,4
	.comm	WRGG03_MAGIC,4,4
	.comm	TRX_MAGIC,4,4
	.comm	SEAMA_MAGIC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
