	.file	"86075551.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: copy infile outfile\n"
.LC1:
	.string	"r"
.LC2:
	.string	"Could not open %s.\n"
.LC3:
	.string	"w"
.LC4:
	.string	"outfile.jpeg"
	.align 8
.LC5:
	.string	"Could not create outfile.jpeg.\n"
	.align 8
.LC6:
	.string	"\n\n\n\n\n\n\n ------------ NEW JPEG ------------ \n\n\n\n\n\n"
.LC7:
	.string	"%X "
.LC8:
	.string	"Jpegs Found: %i\n"
	.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, 608
	mov	DWORD PTR -596[rbp], edi
	mov	QWORD PTR -608[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -596[rbp], 2
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L14
.L2:
	mov	rax, QWORD PTR -608[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -560[rbp], rax
	mov	rax, QWORD PTR -560[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -552[rbp], rax
	mov	rax, QWORD PTR -560[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -544[rbp], rax
	cmp	QWORD PTR -552[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -560[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 2
	jmp	.L14
.L4:
	lea	rsi, .LC3[rip]
	lea	rdi, .LC4[rip]
	call	fopen@PLT
	mov	QWORD PTR -536[rbp], rax
	cmp	QWORD PTR -536[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -552[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	mov	eax, 3
	jmp	.L14
.L5:
	mov	DWORD PTR -588[rbp], 0
	mov	DWORD PTR -584[rbp], 0
	mov	DWORD PTR -568[rbp], 0
	mov	DWORD PTR -580[rbp], 0
	jmp	.L6
.L13:
	mov	DWORD PTR -576[rbp], 0
	jmp	.L7
.L8:
	lea	rdx, -528[rbp]
	mov	eax, DWORD PTR -576[rbp]
	cdqe
	lea	rdi, [rdx+rax]
	mov	rax, QWORD PTR -552[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 1
	call	fread@PLT
	add	DWORD PTR -576[rbp], 1
.L7:
	cmp	DWORD PTR -576[rbp], 511
	jle	.L8
	mov	DWORD PTR -572[rbp], 0
	jmp	.L9
.L12:
	mov	eax, DWORD PTR -572[rbp]
	cdqe
	movzx	eax, BYTE PTR -528[rbp+rax]
	cmp	al, -1
	jne	.L10
	mov	eax, DWORD PTR -572[rbp]
	add	eax, 1
	cdqe
	movzx	eax, BYTE PTR -528[rbp+rax]
	cmp	al, -40
	jne	.L10
	mov	eax, DWORD PTR -572[rbp]
	add	eax, 2
	cdqe
	movzx	eax, BYTE PTR -528[rbp+rax]
	cmp	al, -1
	jne	.L10
	cmp	DWORD PTR -584[rbp], 0
	jne	.L10
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	DWORD PTR -568[rbp], 0
	mov	DWORD PTR -584[rbp], 1
	add	DWORD PTR -580[rbp], 1
.L10:
	cmp	DWORD PTR -584[rbp], 1
	jne	.L11
	mov	eax, DWORD PTR -572[rbp]
	cdqe
	movzx	eax, BYTE PTR -528[rbp+rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -528[rbp]
	mov	eax, DWORD PTR -572[rbp]
	cdqe
	lea	rdi, [rdx+rax]
	mov	rax, QWORD PTR -536[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 1
	call	fwrite@PLT
.L11:
	add	DWORD PTR -572[rbp], 1
.L9:
	cmp	DWORD PTR -572[rbp], 511
	jle	.L12
	mov	eax, DWORD PTR -588[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -544[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	add	DWORD PTR -588[rbp], 512
.L6:
	mov	rax, QWORD PTR -544[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -564[rbp], eax
	cmp	DWORD PTR -564[rbp], -1
	jne	.L13
	mov	edi, 10
	call	putchar@PLT
	mov	eax, DWORD PTR -580[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -552[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -544[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -536[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
.L14:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	"86075551.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: copy infile outfile\012\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"Could not open %s.\012\000"
	.align	2
.LC3:
	.ascii	"w\000"
	.align	2
.LC4:
	.ascii	"outfile.jpeg\000"
	.align	2
.LC5:
	.ascii	"Could not create outfile.jpeg.\012\000"
	.align	2
.LC6:
	.ascii	"\012\012\012\012\012\012\012 ------------ NEW JPEG "
	.ascii	"------------ \012\012\012\012\012\012\000"
	.align	2
.LC7:
	.ascii	"%X \000"
	.align	2
.LC8:
	.ascii	"Jpegs Found: %i\012\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 = 576
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #576
	str	r0, [fp, #-576]
	str	r1, [fp, #-580]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-576]
	cmp	r3, #2
	beq	.L2
	ldr	r3, .L16+4
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L16+8
	bl	fwrite
	mov	r3, #1
	b	.L14
.L2:
	ldr	r3, [fp, #-580]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-548]
	ldr	r1, .L16+12
	ldr	r0, [fp, #-548]
	bl	fopen
	str	r0, [fp, #-544]
	ldr	r1, .L16+12
	ldr	r0, [fp, #-548]
	bl	fopen
	str	r0, [fp, #-540]
	ldr	r3, [fp, #-544]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L16+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-548]
	ldr	r1, .L16+16
	mov	r0, r3
	bl	fprintf
	mov	r3, #2
	b	.L14
.L4:
	ldr	r1, .L16+20
	ldr	r0, .L16+24
	bl	fopen
	str	r0, [fp, #-536]
	ldr	r3, [fp, #-536]
	cmp	r3, #0
	bne	.L5
	ldr	r0, [fp, #-544]
	bl	fclose
	ldr	r3, .L16+4
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L16+28
	bl	fwrite
	mov	r3, #3
	b	.L14
.L5:
	mov	r3, #0
	str	r3, [fp, #-568]
	mov	r3, #0
	str	r3, [fp, #-564]
	mov	r3, #0
	str	r3, [fp, #-532]
	mov	r3, #0
	str	r3, [fp, #-560]
	b	.L6
.L13:
	mov	r3, #0
	str	r3, [fp, #-556]
	b	.L7
.L8:
	sub	r2, fp, #524
	ldr	r3, [fp, #-556]
	add	r0, r2, r3
	ldr	r3, [fp, #-544]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	ldr	r3, [fp, #-556]
	add	r3, r3, #1
	str	r3, [fp, #-556]
.L7:
	ldr	r3, [fp, #-556]
	cmp	r3, #512
	blt	.L8
	mov	r3, #0
	str	r3, [fp, #-552]
	b	.L9
.L12:
	sub	r2, fp, #524
	ldr	r3, [fp, #-552]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #255
	bne	.L10
	ldr	r3, [fp, #-552]
	add	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-520]	@ zero_extendqisi2
	cmp	r3, #216
	bne	.L10
	ldr	r3, [fp, #-552]
	add	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-520]	@ zero_extendqisi2
	cmp	r3, #255
	bne	.L10
	ldr	r3, [fp, #-564]
	cmp	r3, #0
	bne	.L10
	ldr	r0, .L16+32
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-532]
	mov	r3, #1
	str	r3, [fp, #-564]
	ldr	r3, [fp, #-560]
	add	r3, r3, #1
	str	r3, [fp, #-560]
.L10:
	ldr	r3, [fp, #-564]
	cmp	r3, #1
	bne	.L11
	sub	r2, fp, #524
	ldr	r3, [fp, #-552]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L16+36
	bl	printf
	sub	r2, fp, #524
	ldr	r3, [fp, #-552]
	add	r0, r2, r3
	ldr	r3, [fp, #-536]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
.L11:
	ldr	r3, [fp, #-552]
	add	r3, r3, #1
	str	r3, [fp, #-552]
.L9:
	ldr	r3, [fp, #-552]
	cmp	r3, #512
	blt	.L12
	mov	r2, #0
	ldr	r1, [fp, #-568]
	ldr	r0, [fp, #-540]
	bl	fseek
	ldr	r3, [fp, #-568]
	add	r3, r3, #512
	str	r3, [fp, #-568]
.L6:
	ldr	r0, [fp, #-540]
	bl	fgetc
	str	r0, [fp, #-528]
	ldr	r3, [fp, #-528]
	cmn	r3, #1
	bne	.L13
	mov	r0, #10
	bl	putchar
	ldr	r1, [fp, #-560]
	ldr	r0, .L16+40
	bl	printf
	ldr	r0, [fp, #-544]
	bl	fclose
	ldr	r0, [fp, #-540]
	bl	fclose
	ldr	r0, [fp, #-536]
	bl	fclose
	mov	r0, #10
	bl	putchar
	mov	r3, #0
.L14:
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC9
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.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
