	.file	"809663.c"
	.intel_syntax noprefix
	.text
	.globl	InsydeFlash_BIOSIMG_Signature
	.section	.rodata
	.align 16
	.type	InsydeFlash_BIOSIMG_Signature, @object
	.size	InsydeFlash_BIOSIMG_Signature, 16
InsydeFlash_BIOSIMG_Signature:
	.ascii	"$_IFLASH_BIOSIMG"
	.text
	.globl	find_pattern
	.type	find_pattern, @function
find_pattern:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1088
	mov	QWORD PTR -1064[rbp], rdi
	mov	QWORD PTR -1072[rbp], rsi
	mov	QWORD PTR -1080[rbp], rdx
	mov	QWORD PTR -1088[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	QWORD PTR -1064[rbp], 0
	je	.L2
	cmp	QWORD PTR -1072[rbp], 0
	je	.L2
	cmp	QWORD PTR -1080[rbp], 0
	je	.L2
	cmp	QWORD PTR -1088[rbp], 0
	je	.L2
	mov	rax, QWORD PTR -1072[rbp]
	cmp	rax, QWORD PTR -1064[rbp]
	jbe	.L2
	mov	DWORD PTR -1052[rbp], 0
	mov	rax, QWORD PTR -1088[rbp]
	sub	eax, 1
	mov	DWORD PTR -1044[rbp], eax
	mov	rax, QWORD PTR -1072[rbp]
	sub	rax, QWORD PTR -1064[rbp]
	mov	DWORD PTR -1048[rbp], eax
	mov	DWORD PTR -1052[rbp], 0
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -1088[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -1052[rbp]
	mov	DWORD PTR -1040[rbp+rax*4], edx
	add	DWORD PTR -1052[rbp], 1
.L3:
	cmp	DWORD PTR -1052[rbp], 255
	jbe	.L4
	mov	DWORD PTR -1052[rbp], 0
	jmp	.L5
.L6:
	mov	edx, DWORD PTR -1052[rbp]
	mov	rax, QWORD PTR -1080[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	ecx, al
	mov	eax, DWORD PTR -1044[rbp]
	sub	eax, DWORD PTR -1052[rbp]
	mov	edx, eax
	movsx	rax, ecx
	mov	DWORD PTR -1040[rbp+rax*4], edx
	add	DWORD PTR -1052[rbp], 1
.L5:
	mov	eax, DWORD PTR -1052[rbp]
	cmp	eax, DWORD PTR -1044[rbp]
	jb	.L6
	jmp	.L7
.L12:
	mov	eax, DWORD PTR -1044[rbp]
	mov	DWORD PTR -1052[rbp], eax
	jmp	.L8
.L11:
	cmp	DWORD PTR -1052[rbp], 0
	jne	.L9
	mov	rax, QWORD PTR -1064[rbp]
	jmp	.L13
.L9:
	sub	DWORD PTR -1052[rbp], 1
.L8:
	mov	edx, DWORD PTR -1052[rbp]
	mov	rax, QWORD PTR -1064[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	ecx, DWORD PTR -1052[rbp]
	mov	rax, QWORD PTR -1080[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	je	.L11
	mov	edx, DWORD PTR -1044[rbp]
	mov	rax, QWORD PTR -1064[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	cdqe
	mov	eax, DWORD PTR -1040[rbp+rax*4]
	sub	DWORD PTR -1048[rbp], eax
	mov	edx, DWORD PTR -1044[rbp]
	mov	rax, QWORD PTR -1064[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	cdqe
	mov	eax, DWORD PTR -1040[rbp+rax*4]
	mov	eax, eax
	add	QWORD PTR -1064[rbp], rax
.L7:
	mov	eax, DWORD PTR -1048[rbp]
	cmp	QWORD PTR -1088[rbp], rax
	jbe	.L12
	mov	eax, 0
	jmp	.L13
.L2:
	mov	eax, 0
.L13:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find_pattern, .-find_pattern
	.globl	read_file
	.type	read_file, @function
read_file:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	cmp	QWORD PTR -8[rbp], 0
	je	.L16
	cmp	QWORD PTR -24[rbp], 0
	je	.L16
	cmp	QWORD PTR -16[rbp], 0
	je	.L17
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	jmp	.L18
.L17:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
.L18:
	mov	eax, 1
	jmp	.L19
.L16:
	mov	eax, 0
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	read_file, .-read_file
	.section	.rodata
	.align 8
.LC0:
	.string	"Insyde UEFI Firmware Extractor v1.0.2"
	.align 8
.LC1:
	.string	"Usage: input_file [output_file]"
.LC2:
	.string	"rb"
.LC3:
	.string	"wb"
	.align 8
.LC4:
	.string	"InsydeFlash firmware signature not found in the file!"
.LC5:
	.string	"Failed to read file \"%s\""
.LC6:
	.string	"Input file does not exist!"
.LC7:
	.string	"Too many arguments provided!"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	cmp	DWORD PTR -100[rbp], 1
	jne	.L21
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L22
.L21:
	cmp	DWORD PTR -100[rbp], 2
	je	.L23
	cmp	DWORD PTR -100[rbp], 3
	jne	.L24
.L23:
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -88[rbp], 0
	cmp	DWORD PTR -100[rbp], 3
	jne	.L25
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -88[rbp], rax
	jmp	.L26
.L25:
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -88[rbp], rax
.L26:
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -72[rbp], 0
	je	.L27
	mov	DWORD PTR -92[rbp], 0
	lea	rdx, -92[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	read_file
	mov	eax, DWORD PTR -92[rbp]
	mov	eax, eax
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -64[rbp], rax
	lea	rdx, -92[rbp]
	mov	rcx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	read_file
	mov	BYTE PTR -93[rbp], al
	cmp	BYTE PTR -93[rbp], 0
	je	.L28
	mov	eax, DWORD PTR -92[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, [rdx+rax]
	mov	rax, QWORD PTR -64[rbp]
	mov	ecx, 16
	lea	rdx, InsydeFlash_BIOSIMG_Signature[rip]
	mov	rdi, rax
	call	find_pattern
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	je	.L29
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 20[rax]
	mov	eax, eax
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 24
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -88[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rcx, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	jmp	.L22
.L29:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 1
	jmp	.L22
.L28:
	mov	rax, QWORD PTR -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L22
.L27:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L22
.L24:
	cmp	DWORD PTR -100[rbp], 3
	jle	.L31
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L22
.L31:
	mov	eax, 0
.L22:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"809663.c"
	.text
	.global	InsydeFlash_BIOSIMG_Signature
	.section	.rodata
	.align	2
	.type	InsydeFlash_BIOSIMG_Signature, %object
	.size	InsydeFlash_BIOSIMG_Signature, 16
InsydeFlash_BIOSIMG_Signature:
	.ascii	"$_IFLASH_BIOSIMG"
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	find_pattern
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_pattern, %function
find_pattern:
	@ args = 0, pretend = 0, frame = 1056
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	str	r0, [fp, #-1048]
	str	r1, [fp, #-1052]
	str	r2, [fp, #-1056]
	str	r3, [fp, #-1060]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1048]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-1052]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-1056]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-1060]
	cmp	r3, #0
	beq	.L2
	ldr	r2, [fp, #-1052]
	ldr	r3, [fp, #-1048]
	cmp	r2, r3
	bls	.L2
	mov	r3, #0
	str	r3, [fp, #-1044]
	ldr	r3, [fp, #-1060]
	sub	r3, r3, #1
	str	r3, [fp, #-1036]
	ldr	r2, [fp, #-1052]
	ldr	r3, [fp, #-1048]
	sub	r3, r2, r3
	str	r3, [fp, #-1040]
	mov	r3, #0
	str	r3, [fp, #-1044]
	b	.L3
.L4:
	ldr	r3, [fp, #-1044]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-1060]
	str	r2, [r3, #-1028]
	ldr	r3, [fp, #-1044]
	add	r3, r3, #1
	str	r3, [fp, #-1044]
.L3:
	ldr	r3, [fp, #-1044]
	cmp	r3, #255
	bls	.L4
	mov	r3, #0
	str	r3, [fp, #-1044]
	b	.L5
.L6:
	ldr	r2, [fp, #-1056]
	ldr	r3, [fp, #-1044]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r2, [fp, #-1036]
	ldr	r3, [fp, #-1044]
	sub	r2, r2, r3
	lsl	r3, r1, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-1028]
	ldr	r3, [fp, #-1044]
	add	r3, r3, #1
	str	r3, [fp, #-1044]
.L5:
	ldr	r2, [fp, #-1044]
	ldr	r3, [fp, #-1036]
	cmp	r2, r3
	bcc	.L6
	b	.L7
.L12:
	ldr	r3, [fp, #-1036]
	str	r3, [fp, #-1044]
	b	.L8
.L11:
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	bne	.L9
	ldr	r3, [fp, #-1048]
	b	.L13
.L9:
	ldr	r3, [fp, #-1044]
	sub	r3, r3, #1
	str	r3, [fp, #-1044]
.L8:
	ldr	r2, [fp, #-1048]
	ldr	r3, [fp, #-1044]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, [fp, #-1056]
	ldr	r3, [fp, #-1044]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L11
	ldr	r2, [fp, #-1048]
	ldr	r3, [fp, #-1036]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1028]
	ldr	r2, [fp, #-1040]
	sub	r3, r2, r3
	str	r3, [fp, #-1040]
	ldr	r2, [fp, #-1048]
	ldr	r3, [fp, #-1036]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1028]
	ldr	r2, [fp, #-1048]
	add	r3, r2, r3
	str	r3, [fp, #-1048]
.L7:
	ldr	r2, [fp, #-1040]
	ldr	r3, [fp, #-1060]
	cmp	r2, r3
	bcs	.L12
	mov	r3, #0
	b	.L13
.L2:
	mov	r3, #0
.L13:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC0
	.size	find_pattern, .-find_pattern
	.align	2
	.global	read_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_file, %function
read_file:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L19
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	fseek
	ldr	r0, [fp, #-8]
	bl	ftell
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	fseek
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r1, #1
	ldr	r0, [fp, #-12]
	bl	fread
	b	.L20
.L19:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	fseek
	ldr	r0, [fp, #-8]
	bl	ftell
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	fseek
.L20:
	mov	r3, #1
	b	.L21
.L18:
	mov	r3, #0
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	read_file, .-read_file
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Insyde UEFI Firmware Extractor v1.0.2\000"
	.align	2
.LC2:
	.ascii	"Usage: input_file [output_file]\000"
	.align	2
.LC3:
	.ascii	"rb\000"
	.align	2
.LC4:
	.ascii	"wb\000"
	.align	2
.LC5:
	.ascii	"InsydeFlash firmware signature not found in the fil"
	.ascii	"e!\000"
	.align	2
.LC6:
	.ascii	"Failed to read file \"%s\"\000"
	.align	2
.LC7:
	.ascii	"Input file does not exist!\000"
	.align	2
.LC8:
	.ascii	"Too many arguments provided!\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L35
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L35+4
	bl	puts
	ldr	r3, [fp, #-64]
	cmp	r3, #1
	bne	.L23
	ldr	r0, .L35+8
	bl	puts
	mov	r3, #0
	b	.L24
.L23:
	ldr	r3, [fp, #-64]
	cmp	r3, #2
	beq	.L25
	ldr	r3, [fp, #-64]
	cmp	r3, #3
	bne	.L26
.L25:
	ldr	r3, [fp, #-68]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-64]
	cmp	r3, #3
	bne	.L27
	ldr	r3, [fp, #-68]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-48]
	b	.L28
.L27:
	ldr	r3, [fp, #-68]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-48]
.L28:
	ldr	r1, .L35+12
	ldr	r0, [fp, #-44]
	bl	fopen
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L29
	mov	r3, #0
	str	r3, [fp, #-52]
	sub	r3, fp, #52
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-40]
	bl	read_file
	ldr	r3, [fp, #-52]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	sub	r3, fp, #52
	mov	r2, r3
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-40]
	bl	read_file
	mov	r3, r0
	strb	r3, [fp, #-53]
	ldrb	r3, [fp, #-53]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L30
	ldr	r3, [fp, #-52]
	ldr	r2, [fp, #-36]
	add	r1, r2, r3
	mov	r3, #16
	ldr	r2, .L35+16
	ldr	r0, [fp, #-36]
	bl	find_pattern
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L31
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #20]
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-24]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-32]
	add	r3, r3, #24
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-20]
	bl	memcpy
	ldr	r1, .L35+20
	ldr	r0, [fp, #-48]
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	mov	r1, #1
	ldr	r0, [fp, #-20]
	bl	fwrite
	ldr	r0, [fp, #-20]
	bl	free
	ldr	r0, [fp, #-36]
	bl	free
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r0, [fp, #-40]
	bl	fclose
	mov	r3, #0
	b	.L24
.L31:
	ldr	r0, .L35+24
	bl	puts
	ldr	r0, [fp, #-40]
	bl	fclose
	mov	r3, #1
	b	.L24
.L30:
	ldr	r1, [fp, #-44]
	ldr	r0, .L35+28
	bl	printf
	mov	r3, #1
	b	.L24
.L29:
	ldr	r0, .L35+32
	bl	puts
	mov	r3, #1
	b	.L24
.L26:
	ldr	r3, [fp, #-64]
	cmp	r3, #3
	ble	.L33
	ldr	r0, .L35+36
	bl	puts
	mov	r3, #1
	b	.L24
.L33:
	mov	r3, #0
.L24:
	ldr	r2, .L35
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L34
	bl	__stack_chk_fail
.L34:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC9
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	InsydeFlash_BIOSIMG_Signature
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
