	.file	"124740.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	cmp	DWORD PTR -52[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	.L3
.L2:
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -32[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 2
	jmp	.L3
.L4:
	mov	edi, 512
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	edi, 7
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -44[rbp], 0
	mov	DWORD PTR -48[rbp], 0
	jmp	.L5
.L9:
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, -1
	jne	.L6
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, -40
	jne	.L6
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	cmp	al, -1
	jne	.L6
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	and	eax, 240
	cmp	eax, 224
	jne	.L6
	cmp	DWORD PTR -48[rbp], 0
	jne	.L7
	mov	edx, DWORD PTR -48[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -40[rbp], rax
	add	DWORD PTR -48[rbp], 1
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	edx, DWORD PTR -48[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -40[rbp], rax
	add	DWORD PTR -48[rbp], 1
.L8:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 512
	mov	rdi, rax
	call	fwrite@PLT
	jmp	.L5
.L6:
	cmp	DWORD PTR -48[rbp], 0
	jle	.L5
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 512
	mov	rdi, rax
	call	fwrite@PLT
.L5:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 512
	mov	rdi, rax
	call	fread@PLT
	test	rax, rax
	jne	.L9
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L3:
	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	"124740.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"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, [fp, #-40]
	cmp	r3, #2
	beq	.L2
	ldr	r3, .L10
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L10+4
	bl	fwrite
	mov	r3, #1
	b	.L3
.L2:
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-24]
	ldr	r1, .L10+8
	ldr	r0, [fp, #-24]
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L10
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	ldr	r1, .L10+12
	mov	r0, r3
	bl	fprintf
	mov	r3, #2
	b	.L3
.L4:
	mov	r0, #512
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r0, #7
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L5
.L9:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #255
	bne	.L6
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #216
	bne	.L6
	ldr	r3, [fp, #-16]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #255
	bne	.L6
	ldr	r3, [fp, #-16]
	add	r3, r3, #3
	ldrb	r3, [r3]	@ zero_extendqisi2
	and	r3, r3, #240
	cmp	r3, #224
	bne	.L6
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L7
	ldr	r2, [fp, #-28]
	ldr	r1, .L10+16
	ldr	r0, [fp, #-12]
	bl	sprintf
	ldr	r1, .L10+20
	ldr	r0, [fp, #-12]
	bl	fopen
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	b	.L8
.L7:
	ldr	r0, [fp, #-32]
	bl	fclose
	ldr	r2, [fp, #-28]
	ldr	r1, .L10+16
	ldr	r0, [fp, #-12]
	bl	sprintf
	ldr	r1, .L10+20
	ldr	r0, [fp, #-12]
	bl	fopen
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L8:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	mov	r1, #512
	ldr	r0, [fp, #-16]
	bl	fwrite
	b	.L5
.L6:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	ble	.L5
	ldr	r3, [fp, #-32]
	mov	r2, #1
	mov	r1, #512
	ldr	r0, [fp, #-16]
	bl	fwrite
.L5:
	ldr	r3, [fp, #-20]
	mov	r2, #1
	mov	r1, #512
	ldr	r0, [fp, #-16]
	bl	fread
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	ldr	r0, [fp, #-16]
	bl	free
	ldr	r0, [fp, #-12]
	bl	free
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.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
