	.file	"797680.c"
	.intel_syntax noprefix
	.text
	.local	buf
	.comm	buf,4097,32
	.local	carry
	.comm	carry,4096,32
	.section	.rodata
.LC0:
	.string	"-n"
.LC1:
	.string	"ascii: cannot open "
.LC2:
	.string	"\n"
.LC3:
	.string	"Usage: ascii [-n] file\n"
.LC4:
	.string	"ascii: line too long\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
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -44[rbp], 1
	sub	DWORD PTR -68[rbp], 1
	add	QWORD PTR -80[rbp], 8
	cmp	DWORD PTR -68[rbp], 0
	jle	.L2
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L2
	mov	DWORD PTR -52[rbp], 1
	sub	DWORD PTR -68[rbp], 1
	add	QWORD PTR -80[rbp], 8
.L2:
	cmp	DWORD PTR -68[rbp], 0
	je	.L25
	cmp	DWORD PTR -68[rbp], 1
	jne	.L23
	mov	edi, 0
	call	close@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	test	eax, eax
	je	.L26
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	std_err@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	std_err@PLT
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	std_err@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	std_err@PLT
	mov	edi, 1
	call	exit@PLT
.L25:
	nop
	jmp	.L6
.L26:
	nop
.L6:
	mov	edx, 4096
	lea	rsi, buf[rip]
	mov	edi, 0
	call	read@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jg	.L8
	mov	edi, 0
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, buf[rip]
	add	rax, rdx
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], 10
	lea	rax, buf[rip]
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -48[rbp], 1
	mov	DWORD PTR -40[rbp], 0
.L21:
	mov	rbx, QWORD PTR -32[rbp]
	jmp	.L9
.L12:
	movzx	eax, BYTE PTR [rbx]
	test	al, al
	jns	.L10
	mov	DWORD PTR -48[rbp], 0
	mov	DWORD PTR -44[rbp], 0
	mov	edx, 4096
	mov	esi, 10
	mov	rdi, rbx
	call	memchr@PLT
	mov	rbx, rax
	jmp	.L11
.L10:
	add	rbx, 1
.L9:
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 10
	jne	.L12
.L11:
	cmp	rbx, QWORD PTR -24[rbp]
	je	.L13
	add	rbx, 1
	mov	eax, DWORD PTR -48[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	je	.L14
	cmp	DWORD PTR -40[rbp], 0
	je	.L15
	mov	rdx, QWORD PTR stdout[rip]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	mov	rcx, rdx
	mov	edx, 1
	mov	rsi, rax
	lea	rdi, carry[rip]
	call	fwrite@PLT
.L15:
	mov	rdx, QWORD PTR stdout[rip]
	mov	rax, rbx
	sub	rax, QWORD PTR -32[rbp]
	movsx	rsi, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
.L14:
	mov	DWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], rbx
	mov	DWORD PTR -48[rbp], 1
	jmp	.L21
.L13:
	cmp	DWORD PTR -40[rbp], 0
	je	.L17
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	std_err@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	mov	eax, DWORD PTR -48[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	je	.L18
	mov	rax, rbx
	sub	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, carry[rip]
	call	memcpy@PLT
.L18:
	mov	edx, 4096
	lea	rsi, buf[rip]
	mov	edi, 0
	call	read@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jle	.L27
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, buf[rip]
	add	rax, rdx
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], 10
	lea	rax, buf[rip]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L21
.L27:
	nop
	mov	eax, DWORD PTR -48[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	je	.L22
	cmp	DWORD PTR -40[rbp], 0
	je	.L22
	mov	rdx, QWORD PTR stdout[rip]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	mov	rcx, rdx
	mov	edx, 1
	mov	rsi, rax
	lea	rdi, carry[rip]
	call	fwrite@PLT
.L22:
	cmp	DWORD PTR -44[rbp], 0
	sete	al
	movzx	eax, al
	mov	edi, eax
	call	exit@PLT
	.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	"797680.c"
	.text
	.local	buf
	.comm	buf,4097,4
	.local	carry
	.comm	carry,4096,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"-n\000"
	.align	2
.LC1:
	.ascii	"ascii: cannot open \000"
	.align	2
.LC2:
	.ascii	"\012\000"
	.align	2
.LC3:
	.ascii	"Usage: ascii [-n] file\012\000"
	.align	2
.LC4:
	.ascii	"ascii: line too long\012\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	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #1
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	ble	.L2
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	ldr	r1, .L28
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	mov	r3, #1
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	str	r3, [fp, #-52]
.L2:
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L25
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	bne	.L23
	mov	r0, #0
	bl	close
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	mov	r3, r0
	cmp	r3, #0
	beq	.L26
	ldr	r0, .L28+4
	bl	std_err
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r0, r3
	bl	std_err
	ldr	r0, .L28+8
	bl	std_err
	mov	r0, #1
	bl	exit
.L23:
	ldr	r0, .L28+12
	bl	std_err
	mov	r0, #1
	bl	exit
.L25:
	nop
	b	.L6
.L26:
	nop
.L6:
	mov	r2, #4096
	ldr	r1, .L28+16
	mov	r0, #0
	bl	read
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bgt	.L8
	mov	r0, #0
	bl	exit
.L8:
	ldr	r3, [fp, #-16]
	ldr	r2, .L28+16
	add	r3, r3, r2
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r2, #10
	strb	r2, [r3]
	ldr	r3, .L28+16
	str	r3, [fp, #-28]
	mov	r3, #1
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-20]
.L21:
	ldr	r4, [fp, #-28]
	b	.L9
.L12:
	ldrb	r3, [r4]	@ zero_extendqisi2
	lsl	r3, r3, #24
	asr	r3, r3, #24
	cmp	r3, #0
	bge	.L10
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r2, #4096
	mov	r1, #10
	mov	r0, r4
	bl	memchr
	mov	r4, r0
	b	.L11
.L10:
	add	r4, r4, #1
.L9:
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L12
.L11:
	ldr	r3, [fp, #-24]
	cmp	r4, r3
	beq	.L13
	add	r4, r4, #1
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	beq	.L14
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L15
	ldr	r1, [fp, #-20]
	ldr	r3, .L28+20
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r0, .L28+24
	bl	fwrite
.L15:
	ldr	r3, [fp, #-28]
	sub	r3, r4, r3
	mov	r1, r3
	ldr	r3, .L28+20
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r0, [fp, #-28]
	bl	fwrite
.L14:
	mov	r3, #0
	str	r3, [fp, #-20]
	str	r4, [fp, #-28]
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L21
.L13:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L17
	ldr	r0, .L28+28
	bl	std_err
	mov	r0, #1
	bl	exit
.L17:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	beq	.L18
	ldr	r3, [fp, #-28]
	sub	r3, r4, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, .L28+24
	bl	memcpy
.L18:
	mov	r2, #4096
	ldr	r1, .L28+16
	mov	r0, #0
	bl	read
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	ble	.L27
	ldr	r3, [fp, #-16]
	ldr	r2, .L28+16
	add	r3, r3, r2
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r2, #10
	strb	r2, [r3]
	ldr	r3, .L28+16
	str	r3, [fp, #-28]
	b	.L21
.L27:
	nop
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	beq	.L22
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L22
	ldr	r1, [fp, #-20]
	ldr	r3, .L28+20
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r0, .L28+24
	bl	fwrite
.L22:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	bl	exit
.L29:
	.align	2
.L28:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	buf
	.word	stdout
	.word	carry
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
