	.file	"954293.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"[figlio %d]"
.LC1:
	.string	"fork error"
.LC2:
	.string	"wait error"
.LC3:
	.string	"[padre] Ho generato %d figli\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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	esi, 1
	mov	edi, 80
	call	calloc@PLT
	mov	QWORD PTR -8[rbp], rax
	call	getchar@PLT
	mov	BYTE PTR -17[rbp], al
	jmp	.L2
.L8:
	cmp	DWORD PTR -16[rbp], 79
	jg	.L3
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -17[rbp]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -16[rbp], 1
	call	getchar@PLT
	mov	BYTE PTR -17[rbp], al
	jmp	.L2
.L3:
	add	DWORD PTR -12[rbp], 1
	call	fork@PLT
	cmp	eax, -1
	je	.L4
	test	eax, eax
	jne	.L5
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 80
	mov	rdi, rax
	call	conta_caratteri
	mov	edi, 0
	call	exit@PLT
.L4:
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	edi, 0
	call	wait@PLT
	cmp	eax, -1
	jne	.L10
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L7
.L10:
	nop
	mov	DWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 80
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
.L2:
	cmp	BYTE PTR -17[rbp], -1
	jne	.L8
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC4:
	.string	"\n\tCarattere massimo: '%c'\n\t Carattere minimo: '%c'\n"
	.align 8
.LC5:
	.string	"\tCarattere con pi\303\271 occorrenze: '%c', %dvolte\n"
	.align 8
.LC6:
	.string	"\tCarattere con meno occorrenze: '%c', %dvolte\n\n"
	.text
	.globl	conta_caratteri
	.type	conta_caratteri, @function
conta_caratteri:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -12[rbp], al
	mov	DWORD PTR -16[rbp], 1
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -4[rbp], al
	mov	DWORD PTR -8[rbp], 1000
	mov	edx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	bubble_sort
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 1
	jmp	.L12
.L17:
	mov	DWORD PTR -24[rbp], 1
	jmp	.L13
.L14:
	add	DWORD PTR -20[rbp], 1
	add	DWORD PTR -24[rbp], 1
.L13:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rcx, -1[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	je	.L14
	mov	eax, DWORD PTR -16[rbp]
	cmp	DWORD PTR -24[rbp], eax
	jle	.L15
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -12[rbp], al
.L15:
	mov	eax, DWORD PTR -8[rbp]
	cmp	DWORD PTR -24[rbp], eax
	jge	.L16
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -4[rbp], al
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, 1
	cmp	DWORD PTR -20[rbp], eax
	jne	.L16
	mov	DWORD PTR -8[rbp], 1
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -4[rbp], al
.L16:
	add	DWORD PTR -20[rbp], 1
.L12:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L17
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	edx, al
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -16[rbp]
	movzx	eax, BYTE PTR -12[rbp]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -8[rbp]
	movzx	eax, BYTE PTR -4[rbp]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	conta_caratteri, .-conta_caratteri
	.globl	swap_int
	.type	swap_int, @function
swap_int:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	BYTE PTR [rax], dl
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	swap_int, .-swap_int
	.globl	bubble_sort
	.type	bubble_sort, @function
bubble_sort:
.LFB9:
	.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	DWORD PTR -28[rbp], esi
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -12[rbp], eax
.L24:
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 1
	jmp	.L21
.L23:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jge	.L22
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	rsi, rdx
	mov	rdi, rax
	call	swap_int
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -8[rbp], eax
.L22:
	add	DWORD PTR -4[rbp], 1
.L21:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L23
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jg	.L24
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	bubble_sort, .-bubble_sort
	.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	"954293.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"[figlio %d]\000"
	.align	2
.LC1:
	.ascii	"fork error\000"
	.align	2
.LC2:
	.ascii	"wait error\000"
	.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	{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]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r1, #1
	mov	r0, #80
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-8]
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-17]
.L8:
	ldr	r3, [fp, #-16]
	cmp	r3, #79
	bgt	.L2
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [fp, #-17]
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-17]
	b	.L8
.L2:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	bl	fork
	mov	r3, r0
	cmn	r3, #1
	beq	.L4
	cmp	r3, #0
	bne	.L5
	ldr	r1, [fp, #-12]
	ldr	r0, .L12
	bl	printf
	mov	r1, #80
	ldr	r0, [fp, #-8]
	bl	conta_caratteri
	mov	r0, #0
	bl	exit
.L4:
	ldr	r0, .L12+4
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	mov	r0, #0
	bl	wait
	mov	r3, r0
	cmn	r3, #1
	bne	.L11
	ldr	r0, .L12+8
	bl	perror
	mov	r3, #1
	b	.L10
.L11:
	nop
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r2, #80
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	memset
	b	.L8
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
.LC3:
	.ascii	"\012\011Carattere massimo: '%c'\012\011 Carattere m"
	.ascii	"inimo: '%c'\012\000"
	.align	2
.LC4:
	.ascii	"\011Carattere con pi\303\271 occorrenze: '%c', %dvo"
	.ascii	"lte\012\000"
	.align	2
.LC5:
	.ascii	"\011Carattere con meno occorrenze: '%c', %dvolte\012"
	.ascii	"\012\000"
	.text
	.align	2
	.global	conta_caratteri
	.syntax unified
	.arm
	.fpu softvfp
	.type	conta_caratteri, %function
conta_caratteri:
	@ 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, [fp, #-32]
	ldrb	r3, [r3]	@ zero_extendqisi2
	strb	r3, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3]	@ zero_extendqisi2
	strb	r3, [fp, #-8]
	mov	r3, #1000
	str	r3, [fp, #-12]
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	bubble_sort
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L15
.L20:
	mov	r3, #1
	str	r3, [fp, #-28]
	b	.L16
.L17:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L16:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L17
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L18
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	strb	r3, [fp, #-16]
.L18:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bge	.L19
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	strb	r3, [fp, #-8]
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bne	.L19
	mov	r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	strb	r3, [fp, #-8]
.L19:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L15:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L20
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r0, .L22
	bl	printf
	ldrb	r3, [fp, #-16]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r0, .L22+4
	bl	printf
	ldrb	r3, [fp, #-8]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-12]
	mov	r2, r3
	ldr	r0, .L22+8
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	conta_caratteri, .-conta_caratteri
	.align	2
	.global	swap_int
	.syntax unified
	.arm
	.fpu softvfp
	.type	swap_int, %function
swap_int:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	and	r2, r3, #255
	ldr	r3, [fp, #-20]
	strb	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	swap_int, .-swap_int
	.align	2
	.global	bubble_sort
	.syntax unified
	.arm
	.fpu softvfp
	.type	bubble_sort, %function
bubble_sort:
	@ 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]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-16]
.L29:
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L26
.L28:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bcs	.L27
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	add	r0, r2, r3
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r1, r3
	bl	swap_int
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-12]
.L27:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L26:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L28
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bgt	.L29
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	bubble_sort, .-bubble_sort
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
