	.file	"648715.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"usage: endian <input-file> <output-file>\n"
.LC1:
	.string	"rb"
	.align 8
.LC2:
	.string	"endian unable to open input file for reading\n"
.LC3:
	.string	"wb"
	.align 8
.LC4:
	.string	"endian unable to open output file for writing\n"
.LC5:
	.string	"error reading input file %d\n"
.LC6:
	.string	"error writing output file %d\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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 64
	mov	DWORD PTR -8244[rbp], edi
	mov	QWORD PTR -8256[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -8244[rbp], 3
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 41
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L12
.L2:
	mov	rax, QWORD PTR -8256[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8224[rbp], rax
	cmp	QWORD PTR -8224[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 45
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	eax, 2
	jmp	.L12
.L4:
	mov	rax, QWORD PTR -8256[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8216[rbp], rax
	cmp	QWORD PTR -8216[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 46
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	eax, 3
	jmp	.L12
.L5:
	mov	rdx, QWORD PTR -8224[rbp]
	lea	rax, -8208[rbp]
	mov	rcx, rdx
	mov	edx, 8192
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -8228[rbp], eax
	cmp	DWORD PTR -8228[rbp], 3
	jg	.L6
	mov	rax, QWORD PTR -8224[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L15
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -8224[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -8216[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 4
	jmp	.L12
.L6:
	mov	DWORD PTR -8232[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -8232[rbp]
	cdqe
	movzx	eax, BYTE PTR -8208[rbp+rax]
	mov	BYTE PTR -8233[rbp], al
	mov	eax, DWORD PTR -8232[rbp]
	add	eax, 3
	cdqe
	movzx	edx, BYTE PTR -8208[rbp+rax]
	mov	eax, DWORD PTR -8232[rbp]
	cdqe
	mov	BYTE PTR -8208[rbp+rax], dl
	mov	eax, DWORD PTR -8232[rbp]
	add	eax, 3
	cdqe
	movzx	edx, BYTE PTR -8233[rbp]
	mov	BYTE PTR -8208[rbp+rax], dl
	mov	eax, DWORD PTR -8232[rbp]
	add	eax, 1
	cdqe
	movzx	eax, BYTE PTR -8208[rbp+rax]
	mov	BYTE PTR -8233[rbp], al
	mov	eax, DWORD PTR -8232[rbp]
	lea	edx, 2[rax]
	mov	eax, DWORD PTR -8232[rbp]
	lea	ecx, 1[rax]
	movsx	rax, edx
	movzx	edx, BYTE PTR -8208[rbp+rax]
	movsx	rax, ecx
	mov	BYTE PTR -8208[rbp+rax], dl
	mov	eax, DWORD PTR -8232[rbp]
	add	eax, 2
	cdqe
	movzx	edx, BYTE PTR -8233[rbp]
	mov	BYTE PTR -8208[rbp+rax], dl
	add	DWORD PTR -8232[rbp], 4
.L9:
	mov	eax, DWORD PTR -8232[rbp]
	cmp	eax, DWORD PTR -8228[rbp]
	jl	.L10
	mov	eax, DWORD PTR -8228[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -8216[rbp]
	lea	rax, -8208[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	edx, DWORD PTR -8228[rbp]
	movsx	rdx, edx
	cmp	rax, rdx
	je	.L5
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -8224[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -8216[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 6
	jmp	.L12
.L15:
	nop
	mov	rax, QWORD PTR -8224[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -8216[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L12:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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	"648715.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: endian <input-file> <output-file>\012\000"
	.align	2
.LC1:
	.ascii	"rb\000"
	.align	2
.LC2:
	.ascii	"endian unable to open input file for reading\012\000"
	.align	2
.LC3:
	.ascii	"wb\000"
	.align	2
.LC4:
	.ascii	"endian unable to open output file for writing\012\000"
	.align	2
.LC5:
	.ascii	"error reading input file %d\012\000"
	.align	2
.LC6:
	.ascii	"error writing output file %d\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8224
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #8192
	sub	sp, sp, #36
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r0, [r3, #-28]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r1, [r3, #-32]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-28]
	cmp	r3, #3
	beq	.L2
	ldr	r3, .L16+4
	ldr	r3, [r3]
	mov	r2, #41
	mov	r1, #1
	ldr	r0, .L16+8
	bl	fwrite
	mov	r3, #1
	b	.L12
.L2:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r4, r2
	ldr	r1, .L16+12
	mov	r0, r3
	bl	fopen
	str	r0, [r4, #-16]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L16+4
	ldr	r3, [r3]
	mov	r2, #45
	mov	r1, #1
	ldr	r0, .L16+16
	bl	fwrite
	mov	r3, #2
	b	.L12
.L4:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #8
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r4, r2
	ldr	r1, .L16+20
	mov	r0, r3
	bl	fopen
	str	r0, [r4, #-12]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L16+4
	ldr	r3, [r3]
	mov	r2, #46
	mov	r1, #1
	ldr	r0, .L16+24
	bl	fwrite
	mov	r3, #3
	b	.L12
.L5:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r0, fp, #8192
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, [r3, #-16]
	mov	r2, #8192
	mov	r1, #1
	bl	fread
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-8]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #3
	bgt	.L6
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L15
	ldr	r3, .L16+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L16+28
	mov	r0, r4
	bl	fprintf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	fclose
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	fclose
	mov	r3, #4
	b	.L12
.L6:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-20]
	b	.L9
.L10:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	add	r3, r1, r3
	sub	r3, r3, #4
	ldrb	r3, [r3]
	strb	r3, [r2, #-21]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	add	r3, r3, #3
	sub	r2, fp, #8192
	sub	r2, r2, #12
	add	r3, r2, r3
	ldrb	r2, [r3, #-4]	@ zero_extendqisi2
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	add	r3, r1, r3
	sub	r3, r3, #4
	strb	r2, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	add	r3, r3, #3
	sub	r2, fp, #8192
	sub	r2, r2, #12
	add	r3, r2, r3
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldrb	r2, [r2, #-21]
	strb	r2, [r3, #-4]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	add	r3, r3, #1
	sub	r2, fp, #8192
	sub	r2, r2, #12
	sub	r1, fp, #8192
	sub	r1, r1, #12
	add	r3, r1, r3
	ldrb	r3, [r3, #-4]
	strb	r3, [r2, #-21]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	add	r2, r3, #2
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	add	r3, r3, #1
	sub	r1, fp, #8192
	sub	r1, r1, #12
	add	r2, r1, r2
	ldrb	r2, [r2, #-4]	@ zero_extendqisi2
	sub	r1, fp, #8192
	sub	r1, r1, #12
	add	r3, r1, r3
	strb	r2, [r3, #-4]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	add	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	add	r3, r2, r3
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldrb	r2, [r2, #-21]
	strb	r2, [r3, #-4]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	add	r3, r3, #4
	str	r3, [r2, #-20]
.L9:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r2, #-20]
	ldr	r3, [r3, #-8]
	cmp	r2, r3
	blt	.L10
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r3, #-8]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r0, fp, #8192
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, [r3, #-12]
	mov	r1, #1
	bl	fwrite
	mov	r2, r0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r2, r3
	beq	.L5
	ldr	r3, .L16+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L16+32
	mov	r0, r4
	bl	fprintf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	fclose
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	fclose
	mov	r3, #6
	b	.L12
.L15:
	nop
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	fclose
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	fclose
	mov	r3, #0
.L12:
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC7
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
