	.file	"174537.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	getline
	.type	getline, @function
getline:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 16
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	r12, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L8:
	mov	eax, 0
	call	cngetc@PLT
	and	eax, 127
	mov	ebx, eax
	cmp	ebx, 127
	je	.L2
	cmp	ebx, 127
	jg	.L3
	cmp	ebx, 13
	je	.L4
	cmp	ebx, 13
	jg	.L3
	cmp	ebx, 8
	je	.L2
	cmp	ebx, 10
	jne	.L3
.L4:
	mov	edi, 13
	mov	eax, 0
	call	cnputc@PLT
	mov	edi, 10
	mov	eax, 0
	call	cnputc@PLT
	mov	BYTE PTR [r12], 0
	jmp	.L10
.L2:
	cmp	r12, QWORD PTR -32[rbp]
	jbe	.L11
	mov	edi, 8
	mov	eax, 0
	call	cnputc@PLT
	mov	edi, 32
	mov	eax, 0
	call	cnputc@PLT
	mov	edi, 8
	mov	eax, 0
	call	cnputc@PLT
	sub	r12, 1
	jmp	.L11
.L3:
	mov	rax, r12
	lea	r12, 1[rax]
	mov	edx, ebx
	mov	BYTE PTR [rax], dl
	mov	edi, ebx
	mov	eax, 0
	call	cnputc@PLT
	jmp	.L7
.L11:
	nop
.L7:
	jmp	.L8
.L10:
.L5:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rsp, 16
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getline, .-getline
	.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	"174537.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s\000"
	.text
	.align	2
	.global	getline
	.syntax unified
	.arm
	.fpu softvfp
	.type	getline, %function
getline:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r5, [fp, #-20]
	ldr	r1, [fp, #-16]
	ldr	r0, .L12
	bl	printf
.L8:
	bl	cngetc
	mov	r3, r0
	and	r4, r3, #127
	cmp	r4, #127
	beq	.L2
	cmp	r4, #127
	bgt	.L3
	cmp	r4, #13
	beq	.L4
	cmp	r4, #13
	bgt	.L3
	cmp	r4, #8
	beq	.L2
	cmp	r4, #10
	bne	.L3
.L4:
	mov	r0, #13
	bl	cnputc
	mov	r0, #10
	bl	cnputc
	mov	r3, #0
	strb	r3, [r5]
	b	.L10
.L2:
	ldr	r3, [fp, #-20]
	cmp	r5, r3
	bls	.L11
	mov	r0, #8
	bl	cnputc
	mov	r0, #32
	bl	cnputc
	mov	r0, #8
	bl	cnputc
	sub	r5, r5, #1
	b	.L11
.L3:
	mov	r3, r5
	add	r5, r3, #1
	and	r2, r4, #255
	strb	r2, [r3]
	mov	r0, r4
	bl	cnputc
	b	.L7
.L11:
	nop
.L7:
	b	.L8
.L10:
.L5:
	ldr	r0, [fp, #-20]
	bl	strlen
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.size	getline, .-getline
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
