	.file	"1029847.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Error processing %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -20[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	parse
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	test	eax, eax
	je	.L2
	call	printhelp
	mov	eax, 0
	jmp	.L11
.L2:
	cmp	DWORD PTR -24[rbp], 0
	jns	.L4
	mov	eax, -1
	jmp	.L11
.L4:
	cmp	DWORD PTR -24[rbp], 0
	jne	.L5
	lea	rax, -20[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	process
	jmp	.L6
.L5:
	cmp	DWORD PTR -24[rbp], 0
	je	.L6
	mov	DWORD PTR -32[rbp], 1
	jmp	.L7
.L10:
	mov	DWORD PTR -28[rbp], 0
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	je	.L8
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rdx, -20[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	process
	mov	DWORD PTR -28[rbp], eax
.L8:
	cmp	DWORD PTR -28[rbp], 0
	je	.L9
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L9:
	add	DWORD PTR -32[rbp], 1
.L7:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L10
.L6:
	mov	eax, 0
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"-h"
.LC2:
	.string	"-?"
.LC3:
	.string	"--help"
.LC4:
	.string	"-r"
.LC5:
	.string	"--reverse"
.LC6:
	.string	"-c"
.LC7:
	.string	"--count"
.LC8:
	.string	"Unknown option %s\n"
	.text
	.globl	parse
	.type	parse, @function
parse:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	DWORD PTR -4[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	DWORD PTR -8[rbp], 1
	jmp	.L14
.L24:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L15
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L15
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L16
.L15:
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], 1
	jmp	.L17
.L16:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L18
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L19
.L18:
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], 1
	jmp	.L17
.L19:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L20
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L21
.L20:
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 8[rax], 1
	jmp	.L17
.L21:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	jne	.L22
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L23
.L22:
	add	DWORD PTR -4[rbp], 1
.L17:
	add	DWORD PTR -8[rbp], 1
.L14:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L24
	mov	eax, DWORD PTR -4[rbp]
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	parse, .-parse
	.section	.rodata
	.align 8
.LC9:
	.string	"usage: cr [option] ... [file] ...\nstrips carriage returns from input\noptions:"
.LC10:
	.string	"-r, --reverse"
	.align 8
.LC11:
	.string	"%-20sConvert to DOS format by adding carriage returns before newlines\n"
.LC12:
	.string	"-c, --count"
	.align 8
.LC13:
	.string	"%-20sDisplay the number of carriage returns processed\n"
.LC14:
	.string	"-h, -?, --help"
.LC15:
	.string	"%-20sShow this help message\n"
	.text
	.globl	printhelp
	.type	printhelp, @function
printhelp:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rsi, .LC10[rip]
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, .LC12[rip]
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, .LC14[rip]
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	printhelp, .-printhelp
	.section	.rodata
.LC16:
	.string	"%s:\t"
.LC17:
	.string	"%d\n"
	.text
	.globl	process
	.type	process, @function
process:
.LFB3:
	.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	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	QWORD PTR -56[rbp], 0
	je	.L27
	lea	rcx, -16[rbp]
	lea	rdx, -24[rbp]
	lea	rsi, -32[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	getfd
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	je	.L28
	mov	eax, DWORD PTR -36[rbp]
	jmp	.L35
.L27:
	mov	rax, QWORD PTR stdin[rip]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR stdout[rip]
	mov	QWORD PTR -16[rbp], rax
.L28:
	mov	rax, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	je	.L30
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	reversecr
	mov	DWORD PTR -40[rbp], eax
	jmp	.L31
.L30:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stripcr
	mov	DWORD PTR -40[rbp], eax
.L31:
	mov	rax, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR 8[rax]
	test	eax, eax
	je	.L32
	cmp	QWORD PTR -56[rbp], 0
	je	.L33
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
.L33:
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
.L32:
	cmp	QWORD PTR -56[rbp], 0
	je	.L34
	mov	rcx, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	closefiles
.L34:
	mov	eax, 0
.L35:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	process, .-process
	.section	.rodata
.LC18:
	.string	"rb"
	.align 8
.LC19:
	.string	"Error opening file %s for input\n"
.LC20:
	.string	"wb"
	.align 8
.LC21:
	.string	"Error opening temporary output file\n"
	.text
	.globl	getfd
	.type	getfd, @function
getfd:
.LFB4:
	.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
	mov	QWORD PTR -32[rbp], rcx
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L38
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L39
.L38:
	lea	rdi, temp.0[rip]
	mov	eax, 0
	call	mktemp@PLT
	cdqe
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L40
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 36
	mov	esi, 1
	lea	rdi, .LC21[rip]
	call	fwrite@PLT
	mov	eax, -2
	jmp	.L39
.L40:
	mov	eax, 0
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	getfd, .-getfd
	.globl	stripcr
	.type	stripcr, @function
stripcr:
.LFB5:
	.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L42
.L44:
	cmp	DWORD PTR -4[rbp], 13
	je	.L43
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	jmp	.L42
.L43:
	add	DWORD PTR -8[rbp], 1
.L42:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L44
	mov	eax, DWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	stripcr, .-stripcr
	.globl	reversecr
	.type	reversecr, @function
reversecr:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -12[rbp], 0
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -8[rbp], eax
	jmp	.L47
.L49:
	cmp	DWORD PTR -4[rbp], 10
	jne	.L48
	cmp	DWORD PTR -12[rbp], 13
	je	.L48
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	mov	edi, 13
	call	fputc@PLT
	add	DWORD PTR -8[rbp], 1
.L48:
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -12[rbp], eax
.L47:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L49
	mov	eax, DWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	reversecr, .-reversecr
	.section	.rodata
.LC22:
	.string	"Error removing %s\n"
.LC23:
	.string	"Error renaming file.\n"
	.text
	.globl	closefiles
	.type	closefiles, @function
closefiles:
.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
	mov	QWORD PTR -32[rbp], rcx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	remove@PLT
	test	eax, eax
	je	.L52
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -3
	jmp	.L53
.L52:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	rename@PLT
	test	eax, eax
	je	.L54
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC23[rip]
	call	fwrite@PLT
	mov	eax, -4
	jmp	.L53
.L54:
	mov	eax, 0
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	closefiles, .-closefiles
	.data
	.type	temp.0, @object
	.size	temp.0, 7
temp.0:
	.string	"XXXXXX"
	.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	"1029847.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Error processing %s\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.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, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #20
	mov	r2, r3
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-40]
	bl	parse
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L2
	bl	printhelp
	mov	r3, #0
	b	.L11
.L2:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L4
	mvn	r3, #0
	b	.L11
.L4:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L5
	sub	r3, fp, #20
	mov	r1, r3
	mov	r0, #0
	bl	process
	b	.L6
.L5:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L6
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L7
.L10:
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	beq	.L8
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #20
	mov	r1, r2
	mov	r0, r3
	bl	process
	str	r0, [fp, #-28]
.L8:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L13+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L13+8
	bl	fprintf
.L9:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L7:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	blt	.L10
.L6:
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC1
	.word	stderr
	.word	.LC0
	.size	main, .-main
	.section	.rodata
	.align	2
.LC2:
	.ascii	"-h\000"
	.align	2
.LC3:
	.ascii	"-?\000"
	.align	2
.LC4:
	.ascii	"--help\000"
	.align	2
.LC5:
	.ascii	"-r\000"
	.align	2
.LC6:
	.ascii	"--reverse\000"
	.align	2
.LC7:
	.ascii	"-c\000"
	.align	2
.LC8:
	.ascii	"--count\000"
	.align	2
.LC9:
	.ascii	"Unknown option %s\012\000"
	.text
	.align	2
	.global	parse
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse, %function
parse:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L16
.L26:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L27
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L17
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L27+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L17
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L27+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L18
.L17:
	ldr	r3, [fp, #-24]
	mov	r2, #1
	str	r2, [r3]
	b	.L19
.L18:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L27+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L27+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L21
.L20:
	ldr	r3, [fp, #-24]
	mov	r2, #1
	str	r2, [r3, #4]
	b	.L19
.L21:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L27+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L27+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L23
.L22:
	ldr	r3, [fp, #-24]
	mov	r2, #1
	str	r2, [r3, #8]
	b	.L19
.L23:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L24
	ldr	r3, .L27+28
	ldr	r0, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L27+32
	bl	fprintf
	mvn	r3, #0
	b	.L25
.L24:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L19:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L16:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L26
	ldr	r3, [fp, #-8]
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	stderr
	.word	.LC9
	.size	parse, .-parse
	.section	.rodata
	.align	2
.LC10:
	.ascii	"usage: cr [option] ... [file] ...\012strips carriag"
	.ascii	"e returns from input\012options:\000"
	.align	2
.LC11:
	.ascii	"-r, --reverse\000"
	.align	2
.LC12:
	.ascii	"%-20sConvert to DOS format by adding carriage retur"
	.ascii	"ns before newlines\012\000"
	.align	2
.LC13:
	.ascii	"-c, --count\000"
	.align	2
.LC14:
	.ascii	"%-20sDisplay the number of carriage returns process"
	.ascii	"ed\012\000"
	.align	2
.LC15:
	.ascii	"-h, -?, --help\000"
	.align	2
.LC16:
	.ascii	"%-20sShow this help message\012\000"
	.text
	.align	2
	.global	printhelp
	.syntax unified
	.arm
	.fpu softvfp
	.type	printhelp, %function
printhelp:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L30
	bl	puts
	ldr	r1, .L30+4
	ldr	r0, .L30+8
	bl	printf
	ldr	r1, .L30+12
	ldr	r0, .L30+16
	bl	printf
	ldr	r1, .L30+20
	ldr	r0, .L30+24
	bl	printf
	nop
	mov	r0, r3
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.size	printhelp, .-printhelp
	.section	.rodata
	.align	2
.LC17:
	.ascii	"%s:\011\000"
	.align	2
.LC18:
	.ascii	"%d\012\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	process
	.syntax unified
	.arm
	.fpu softvfp
	.type	process, %function
process:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L43
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L33
	sub	r3, fp, #20
	sub	r2, fp, #24
	sub	r1, fp, #28
	ldr	r0, [fp, #-32]
	bl	getfd
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L34
	ldr	r3, [fp, #-12]
	b	.L41
.L33:
	ldr	r3, .L43+4
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r3, .L43+8
	ldr	r3, [r3]
	str	r3, [fp, #-20]
.L34:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L36
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	mov	r1, r2
	mov	r0, r3
	bl	reversecr
	str	r0, [fp, #-16]
	b	.L37
.L36:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	mov	r1, r2
	mov	r0, r3
	bl	stripcr
	str	r0, [fp, #-16]
.L37:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L38
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L39
	ldr	r1, [fp, #-32]
	ldr	r0, .L43+12
	bl	printf
.L39:
	ldr	r1, [fp, #-16]
	ldr	r0, .L43+16
	bl	printf
.L38:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L40
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	ldr	r0, [fp, #-32]
	bl	closefiles
.L40:
	mov	r3, #0
.L41:
	ldr	r2, .L43
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L42
	bl	__stack_chk_fail
.L42:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L44:
	.align	2
.L43:
	.word	.LC19
	.word	stdin
	.word	stdout
	.word	.LC17
	.word	.LC18
	.size	process, .-process
	.section	.rodata
	.align	2
.LC20:
	.ascii	"rb\000"
	.align	2
.LC21:
	.ascii	"Error opening file %s for input\012\000"
	.align	2
.LC22:
	.ascii	"wb\000"
	.align	2
.LC23:
	.ascii	"Error opening temporary output file\012\000"
	.text
	.align	2
	.global	getfd
	.syntax unified
	.arm
	.fpu softvfp
	.type	getfd, %function
getfd:
	@ 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]
	str	r3, [fp, #-20]
	ldr	r1, .L49
	ldr	r0, [fp, #-8]
	bl	fopen
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L46
	ldr	r3, .L49+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L49+8
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L47
.L46:
	ldr	r0, .L49+12
	bl	mktemp
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r1, .L49+16
	mov	r0, r3
	bl	fopen
	mov	r2, r0
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L48
	ldr	r3, .L49+4
	ldr	r3, [r3]
	mov	r2, #36
	mov	r1, #1
	ldr	r0, .L49+20
	bl	fwrite
	mvn	r3, #1
	b	.L47
.L48:
	mov	r3, #0
.L47:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L50:
	.align	2
.L49:
	.word	.LC20
	.word	stderr
	.word	.LC21
	.word	temp.4846
	.word	.LC22
	.word	.LC23
	.size	getfd, .-getfd
	.align	2
	.global	stripcr
	.syntax unified
	.arm
	.fpu softvfp
	.type	stripcr, %function
stripcr:
	@ 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, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L52
.L54:
	ldr	r3, [fp, #-8]
	cmp	r3, #13
	beq	.L53
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	fputc
	b	.L52
.L53:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L52:
	ldr	r0, [fp, #-16]
	bl	fgetc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L54
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	stripcr, .-stripcr
	.align	2
	.global	reversecr
	.syntax unified
	.arm
	.fpu softvfp
	.type	reversecr, %function
reversecr:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	b	.L57
.L59:
	ldr	r3, [fp, #-8]
	cmp	r3, #10
	bne	.L58
	ldr	r3, [fp, #-16]
	cmp	r3, #13
	beq	.L58
	ldr	r1, [fp, #-28]
	mov	r0, #13
	bl	fputc
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L58:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-8]
	bl	fputc
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-16]
.L57:
	ldr	r0, [fp, #-24]
	bl	fgetc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L59
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	reversecr, .-reversecr
	.section	.rodata
	.align	2
.LC24:
	.ascii	"Error removing %s\012\000"
	.align	2
.LC25:
	.ascii	"Error renaming file.\012\000"
	.text
	.align	2
	.global	closefiles
	.syntax unified
	.arm
	.fpu softvfp
	.type	closefiles, %function
closefiles:
	@ 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]
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	fclose
	ldr	r0, [fp, #-20]
	bl	fclose
	ldr	r0, [fp, #-8]
	bl	remove
	mov	r3, r0
	cmp	r3, #0
	beq	.L62
	ldr	r3, .L65
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L65+4
	mov	r0, r3
	bl	fprintf
	mvn	r3, #2
	b	.L63
.L62:
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	rename
	mov	r3, r0
	cmp	r3, #0
	beq	.L64
	ldr	r3, .L65
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L65+8
	bl	fwrite
	mvn	r3, #3
	b	.L63
.L64:
	mov	r3, #0
.L63:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L66:
	.align	2
.L65:
	.word	stderr
	.word	.LC24
	.word	.LC25
	.size	closefiles, .-closefiles
	.data
	.align	2
	.type	temp.4846, %object
	.size	temp.4846, 7
temp.4846:
	.ascii	"XXXXXX\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
