	.file	"72162.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"read"
	.text
	.globl	my_getline
	.type	my_getline, @function
my_getline:
.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, 80
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 1
	mov	edi, 32
	call	calloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	QWORD PTR -16[rbp], 32
	mov	DWORD PTR -32[rbp], 0
	cmp	QWORD PTR -64[rbp], 0
	jne	.L4
	mov	eax, -1
	jmp	.L12
.L7:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	cmp	QWORD PTR -16[rbp], rax
	jne	.L5
	add	QWORD PTR -16[rbp], 32
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -24[rbp], rax
.L5:
	mov	eax, DWORD PTR -32[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -32[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -33[rbp]
	mov	BYTE PTR [rdx], al
	movzx	eax, BYTE PTR -33[rbp]
	cmp	al, 10
	je	.L14
.L4:
	lea	rcx, -33[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 1
	je	.L7
	jmp	.L6
.L14:
	nop
.L6:
	cmp	DWORD PTR -28[rbp], -1
	jne	.L8
	lea	rdi, .LC0[rip]
	call	perror@PLT
.L8:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	cmp	QWORD PTR -16[rbp], rax
	jne	.L9
	add	QWORD PTR -16[rbp], 1
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -24[rbp], rax
.L9:
	mov	eax, DWORD PTR -32[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -32[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	cmp	QWORD PTR -16[rbp], rax
	jbe	.L10
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -24[rbp], rax
.L10:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	cmp	QWORD PTR -72[rbp], 0
	je	.L11
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR [rax], rdx
.L11:
	mov	eax, DWORD PTR -32[rbp]
.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	my_getline, .-my_getline
	.section	.rodata
.LC1:
	.string	"scrivi qualcosa:"
	.align 8
.LC2:
	.string	"dimensione buffer=%ld, strlen=%ld, data=*%s*\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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, 56
	.cfi_offset 3, -24
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdx, -32[rbp]
	lea	rax, -40[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	my_getline
	mov	rbx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, rbx
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"72162.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"read\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	my_getline
	.syntax unified
	.arm
	.fpu softvfp
	.type	my_getline, %function
my_getline:
	@ 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, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #1
	mov	r0, #32
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-24]
	mov	r3, #32
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L4
	mvn	r3, #0
	b	.L12
.L7:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bne	.L5
	ldr	r3, [fp, #-20]
	add	r3, r3, #32
	str	r3, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	realloc
	str	r0, [fp, #-24]
.L5:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldrb	r2, [fp, #-25]	@ zero_extendqisi2
	strb	r2, [r3]
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L14
.L4:
	sub	r3, fp, #25
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	read
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	beq	.L7
	b	.L6
.L14:
	nop
.L6:
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L15+4
	bl	perror
.L8:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bne	.L9
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	realloc
	str	r0, [fp, #-24]
.L9:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bls	.L10
	ldr	r3, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	realloc
	str	r0, [fp, #-24]
.L10:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L11
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-40]
	str	r2, [r3]
.L11:
	ldr	r3, [fp, #-16]
.L12:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC1
	.word	.LC0
	.size	my_getline, .-my_getline
	.section	.rodata
	.align	2
.LC2:
	.ascii	"scrivi qualcosa:\000"
	.align	2
.LC3:
	.ascii	"dimensione buffer=%ld, strlen=%ld, data=*%s*\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r0, .L20+4
	bl	puts
	sub	r2, fp, #20
	sub	r3, fp, #24
	mov	r1, r3
	mov	r0, #0
	bl	my_getline
	ldr	r4, [fp, #-20]
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-24]
	mov	r1, r4
	ldr	r0, .L20+8
	bl	printf
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	free
	mov	r3, #0
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC4
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
