	.file	"481243.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: ./recover image\n"
.LC1:
	.string	"r"
.LC2:
	.string	"Could not open %s.\n"
.LC3:
	.string	"%03i.jpg"
.LC4:
	.string	"w"
	.text
	.globl	main
	.type	main, @function
main:
.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, 1104
	mov	DWORD PTR -1092[rbp], edi
	mov	QWORD PTR -1104[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1076[rbp], 0
	mov	QWORD PTR -1072[rbp], 0
	cmp	DWORD PTR -1092[rbp], 2
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L9
.L2:
	mov	rax, QWORD PTR -1104[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1064[rbp], rax
	cmp	QWORD PTR -1064[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -1104[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 2
	jmp	.L9
.L8:
	movzx	eax, BYTE PTR -1040[rbp]
	movsx	eax, al
	movzx	eax, al
	cmp	eax, 255
	jne	.L6
	movzx	eax, BYTE PTR -1039[rbp]
	movsx	eax, al
	movzx	eax, al
	cmp	eax, 216
	jne	.L6
	movzx	eax, BYTE PTR -1038[rbp]
	movsx	eax, al
	movzx	eax, al
	cmp	eax, 255
	jne	.L6
	movzx	eax, BYTE PTR -1037[rbp]
	movsx	eax, al
	and	eax, 240
	cmp	eax, 224
	jne	.L6
	cmp	QWORD PTR -1072[rbp], 0
	je	.L7
	mov	rax, QWORD PTR -1072[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L7:
	mov	eax, DWORD PTR -1076[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -1076[rbp], edx
	lea	rcx, -1050[rbp]
	mov	edx, eax
	lea	rsi, .LC3[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1050[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1072[rbp], rax
	mov	rdx, QWORD PTR -1072[rbp]
	lea	rax, -1040[rbp]
	mov	rcx, rdx
	mov	edx, 512
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	jmp	.L5
.L6:
	cmp	QWORD PTR -1072[rbp], 0
	je	.L5
	mov	rdx, QWORD PTR -1072[rbp]
	lea	rax, -1040[rbp]
	mov	rcx, rdx
	mov	edx, 512
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
.L5:
	mov	rdx, QWORD PTR -1064[rbp]
	lea	rax, -1040[rbp]
	mov	rcx, rdx
	mov	edx, 512
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 512
	je	.L8
	mov	rax, QWORD PTR -1072[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L9:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"481243.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: ./recover image\012\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"Could not open %s.\012\000"
	.align	2
.LC3:
	.ascii	"%03i.jpg\000"
	.align	2
.LC4:
	.ascii	"w\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1064
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	sub	sp, sp, #8
	str	r0, [fp, #-1064]
	str	r1, [fp, #-1068]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1056]
	mov	r3, #0
	str	r3, [fp, #-1052]
	ldr	r3, [fp, #-1064]
	cmp	r3, #2
	beq	.L2
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L11+8
	bl	fwrite
	mov	r3, #1
	b	.L9
.L2:
	ldr	r3, [fp, #-1068]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L11+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1048]
	ldr	r3, [fp, #-1048]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L11+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-1068]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L11+16
	bl	fprintf
	mov	r3, #2
	b	.L9
.L8:
	ldrb	r3, [fp, #-1032]	@ zero_extendqisi2
	cmp	r3, #255
	bne	.L6
	ldrb	r3, [fp, #-1031]	@ zero_extendqisi2
	cmp	r3, #216
	bne	.L6
	ldrb	r3, [fp, #-1030]	@ zero_extendqisi2
	cmp	r3, #255
	bne	.L6
	ldrb	r3, [fp, #-1029]	@ zero_extendqisi2
	and	r3, r3, #240
	cmp	r3, #224
	bne	.L6
	ldr	r3, [fp, #-1052]
	cmp	r3, #0
	beq	.L7
	ldr	r0, [fp, #-1052]
	bl	fclose
.L7:
	ldr	r3, [fp, #-1056]
	add	r2, r3, #1
	str	r2, [fp, #-1056]
	sub	r0, fp, #1040
	sub	r0, r0, #4
	mov	r2, r3
	ldr	r1, .L11+20
	bl	sprintf
	sub	r3, fp, #1040
	sub	r3, r3, #4
	ldr	r1, .L11+24
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1052]
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-1052]
	mov	r2, #512
	mov	r1, #1
	bl	fwrite
	b	.L5
.L6:
	ldr	r3, [fp, #-1052]
	cmp	r3, #0
	beq	.L5
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-1052]
	mov	r2, #512
	mov	r1, #1
	bl	fwrite
.L5:
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-1048]
	mov	r2, #512
	mov	r1, #1
	bl	fread
	mov	r3, r0
	cmp	r3, #512
	beq	.L8
	ldr	r0, [fp, #-1052]
	bl	fclose
	mov	r3, #0
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC5
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
