	.file	"28261983.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"input non corretto."
	.align 8
.LC1:
	.string	"----------------------------------"
.LC2:
	.string	"ho letto %d tests\n"
.LC3:
	.string	"%d "
.LC4:
	.string	""
.LC5:
	.string	"ho letto %d studenti\n"
.LC6:
	.string	"miglior studente: %d"
	.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -52[rbp]
	mov	rdi, rax
	call	readNumberOfTests
	cmp	eax, -1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L3
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	edx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	readTests
	cmp	eax, -1
	jne	.L4
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	readNumberOfStudents
	cmp	eax, -1
	jne	.L5
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	edx, DWORD PTR -52[rbp]
	mov	eax, DWORD PTR -48[rbp]
	mov	esi, edx
	mov	edi, eax
	call	createMatrixForGrades
	mov	QWORD PTR -24[rbp], rax
	mov	edx, DWORD PTR -52[rbp]
	mov	ecx, DWORD PTR -48[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	readGrades
	cmp	eax, -1
	jne	.L6
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -44[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -44[rbp], 1
.L7:
	mov	eax, DWORD PTR -52[rbp]
	cmp	DWORD PTR -44[rbp], eax
	jl	.L8
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -48[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -40[rbp], 0
	jmp	.L9
.L12:
	mov	DWORD PTR -36[rbp], 0
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -36[rbp], 1
.L10:
	mov	eax, DWORD PTR -52[rbp]
	cmp	DWORD PTR -36[rbp], eax
	jl	.L11
	lea	rdi, .LC4[rip]
	call	puts@PLT
	add	DWORD PTR -40[rbp], 1
.L9:
	mov	eax, DWORD PTR -48[rbp]
	cmp	DWORD PTR -40[rbp], eax
	jl	.L12
	mov	edx, DWORD PTR -52[rbp]
	mov	ecx, DWORD PTR -48[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	findBestStudent
	mov	QWORD PTR -16[rbp], rax
	mov	ecx, DWORD PTR -52[rbp]
	mov	edx, DWORD PTR -48[rbp]
	mov	rsi, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	findBestStudentForEachCategory
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC7:
	.string	"%d"
	.text
	.globl	readNumberOfTests
	.type	readNumberOfTests, @function
readNumberOfTests:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, 1
	jne	.L16
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jg	.L17
.L16:
	mov	eax, -1
	jmp	.L18
.L17:
	mov	eax, 0
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	readNumberOfTests, .-readNumberOfTests
	.globl	readTests
	.type	readTests, @function
readTests:
.LFB8:
	.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	DWORD PTR -4[rbp], 0
	jmp	.L20
.L24:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, 1
	jne	.L21
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jg	.L22
.L21:
	mov	eax, -1
	jmp	.L23
.L22:
	add	DWORD PTR -4[rbp], 1
.L20:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L24
	mov	eax, 0
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	readTests, .-readTests
	.globl	readNumberOfStudents
	.type	readNumberOfStudents, @function
readNumberOfStudents:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, 1
	jne	.L26
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jg	.L27
.L26:
	mov	eax, -1
	jmp	.L28
.L27:
	mov	eax, 0
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	readNumberOfStudents, .-readNumberOfStudents
	.globl	createMatrixForGrades
	.type	createMatrixForGrades, @function
createMatrixForGrades:
.LFB10:
	.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, 40
	.cfi_offset 3, -24
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L30
	mov	edi, 1
	call	exit@PLT
.L30:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L31
.L33:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L32
	mov	edi, 1
	call	exit@PLT
.L32:
	add	DWORD PTR -28[rbp], 1
.L31:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L33
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	createMatrixForGrades, .-createMatrixForGrades
	.globl	readGrades
	.type	readGrades, @function
readGrades:
.LFB11:
	.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	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -8[rbp], 0
	jmp	.L36
.L42:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L37
.L41:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, 1
	jne	.L38
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	js	.L38
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 100
	jle	.L39
.L38:
	mov	eax, -1
	jmp	.L40
.L39:
	add	DWORD PTR -4[rbp], 1
.L37:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jl	.L41
	add	DWORD PTR -8[rbp], 1
.L36:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L42
	mov	eax, 0
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	readGrades, .-readGrades
	.globl	findBestStudent
	.type	findBestStudent, @function
findBestStudent:
.LFB12:
	.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 -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -48[rbp], edx
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L44
.L48:
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L45
.L46:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	add	DWORD PTR -16[rbp], eax
	add	DWORD PTR -12[rbp], 1
.L45:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jl	.L46
	mov	eax, DWORD PTR -16[rbp]
	cdq
	idiv	DWORD PTR -48[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cmp	DWORD PTR -16[rbp], eax
	jle	.L47
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
.L47:
	add	DWORD PTR -20[rbp], 1
.L44:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L48
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	findBestStudent, .-findBestStudent
	.section	.rodata
	.align 8
.LC8:
	.string	"il miglior studente della categoria %d e' %d\n"
	.text
	.globl	findBestStudentForEachCategory
	.type	findBestStudentForEachCategory, @function
findBestStudentForEachCategory:
.LFB13:
	.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -40[rbp], ecx
	mov	DWORD PTR -12[rbp], 0
	jmp	.L51
.L53:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edi, DWORD PTR -40[rbp]
	mov	ecx, DWORD PTR -36[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rsi, QWORD PTR -24[rbp]
	mov	r8d, edi
	mov	edi, eax
	call	findBestStudentForCategory
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, -1
	je	.L52
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
.L52:
	add	DWORD PTR -12[rbp], 1
.L51:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -40[rbp]
	jl	.L53
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	findBestStudentForEachCategory, .-findBestStudentForEachCategory
	.globl	findBestStudentForCategory
	.type	findBestStudentForCategory, @function
findBestStudentForCategory:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	DWORD PTR -40[rbp], ecx
	mov	DWORD PTR -60[rbp], r8d
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	jmp	.L55
.L62:
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L56
.L60:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -36[rbp], eax
	jne	.L57
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	jne	.L58
	mov	DWORD PTR -8[rbp], -1
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L63
.L58:
	add	DWORD PTR -16[rbp], 1
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	add	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], -1
.L57:
	add	DWORD PTR -12[rbp], 1
.L56:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L60
	mov	eax, DWORD PTR -20[rbp]
	cdq
	idiv	DWORD PTR -16[rbp]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jle	.L61
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
.L61:
	add	DWORD PTR -24[rbp], 1
.L55:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -40[rbp]
	jl	.L62
	mov	rax, QWORD PTR -8[rbp]
.L63:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	findBestStudentForCategory, .-findBestStudentForCategory
	.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	"28261983.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"input non corretto.\000"
	.align	2
.LC1:
	.ascii	"----------------------------------\000"
	.align	2
.LC2:
	.ascii	"ho letto %d tests\012\000"
	.align	2
.LC3:
	.ascii	"%d \000"
	.align	2
.LC4:
	.ascii	"\000"
	.align	2
.LC5:
	.ascii	"ho letto %d studenti\012\000"
	.align	2
.LC6:
	.ascii	"miglior studente: %d\000"
	.align	2
.LC7:
	.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
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #44
	mov	r0, r3
	bl	readNumberOfTests
	mov	r3, r0
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L15+4
	bl	puts
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L15+4
	bl	puts
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-44]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	readTests
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L15+4
	bl	puts
	mov	r0, #1
	bl	exit
.L4:
	sub	r3, fp, #40
	mov	r0, r3
	bl	readNumberOfStudents
	mov	r3, r0
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L15+4
	bl	puts
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-44]
	mov	r1, r2
	mov	r0, r3
	bl	createMatrixForGrades
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-44]
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	readGrades
	mov	r3, r0
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L15+4
	bl	puts
	mov	r0, #1
	bl	exit
.L6:
	ldr	r0, .L15+8
	bl	puts
	ldr	r3, [fp, #-44]
	mov	r1, r3
	ldr	r0, .L15+12
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L7
.L8:
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L15+16
	bl	printf
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L7:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L8
	ldr	r0, .L15+20
	bl	puts
	ldr	r3, [fp, #-40]
	mov	r1, r3
	ldr	r0, .L15+24
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L9
.L12:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L10
.L11:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L15+16
	bl	printf
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L10:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L11
	ldr	r0, .L15+20
	bl	puts
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L9:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L12
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-44]
	sub	r0, fp, #16
	ldr	r1, [fp, #-20]
	bl	findBestStudent
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-44]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	findBestStudentForEachCategory
	ldr	r3, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L15+28
	bl	printf
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.section	.rodata
	.align	2
.LC8:
	.ascii	"%d\000"
	.text
	.align	2
	.global	readNumberOfTests
	.syntax unified
	.arm
	.fpu softvfp
	.type	readNumberOfTests, %function
readNumberOfTests:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L21
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L18
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L19
.L18:
	mvn	r3, #0
	b	.L20
.L19:
	mov	r3, #0
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC8
	.size	readNumberOfTests, .-readNumberOfTests
	.align	2
	.global	readTests
	.syntax unified
	.arm
	.fpu softvfp
	.type	readTests, %function
readTests:
	@ 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, #-8]
	b	.L24
.L28:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L29
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L25
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L26
.L25:
	mvn	r3, #0
	b	.L27
.L26:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L24:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L28
	mov	r3, #0
.L27:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC8
	.size	readTests, .-readTests
	.align	2
	.global	readNumberOfStudents
	.syntax unified
	.arm
	.fpu softvfp
	.type	readNumberOfStudents, %function
readNumberOfStudents:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L35
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L32
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L33
.L32:
	mvn	r3, #0
	b	.L34
.L33:
	mov	r3, #0
.L34:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC8
	.size	readNumberOfStudents, .-readNumberOfStudents
	.align	2
	.global	createMatrixForGrades
	.syntax unified
	.arm
	.fpu softvfp
	.type	createMatrixForGrades, %function
createMatrixForGrades:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L38
	mov	r0, #1
	bl	exit
.L38:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L39
.L41:
	ldr	r3, [fp, #-28]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L40
	mov	r0, #1
	bl	exit
.L40:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L39:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L41
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	createMatrixForGrades, .-createMatrixForGrades
	.align	2
	.global	readGrades
	.syntax unified
	.arm
	.fpu softvfp
	.type	readGrades, %function
readGrades:
	@ 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, #-12]
	b	.L44
.L50:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L45
.L49:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L51
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L46
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L46
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #100
	ble	.L47
.L46:
	mvn	r3, #0
	b	.L48
.L47:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L45:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L49
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L44:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L50
	mov	r3, #0
.L48:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L52:
	.align	2
.L51:
	.word	.LC8
	.size	readGrades, .-readGrades
	.global	__aeabi_idiv
	.align	2
	.global	findBestStudent
	.syntax unified
	.arm
	.fpu softvfp
	.type	findBestStudent, %function
findBestStudent:
	@ 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]
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L54
.L58:
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L55
.L56:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L55:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L56
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-20]
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	ble	.L57
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L57:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L54:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	blt	.L58
	ldr	r3, [fp, #-32]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r0, [fp, #-32]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	findBestStudent, .-findBestStudent
	.section	.rodata
	.align	2
.LC9:
	.ascii	"il miglior studente della categoria %d e' %d\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	findBestStudentForEachCategory
	.syntax unified
	.arm
	.fpu softvfp
	.type	findBestStudentForEachCategory, %function
findBestStudentForEachCategory:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r3, .L65
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L61
.L63:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r1, [r3]
	sub	r0, fp, #16
	ldr	r3, [fp, #-36]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-32]
	str	r3, [sp]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	bl	findBestStudentForCategory
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	beq	.L62
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L65+4
	bl	printf
.L62:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L61:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L63
	nop
	ldr	r3, .L65
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L64
	bl	__stack_chk_fail
.L64:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L66:
	.align	2
.L65:
	.word	.LC10
	.word	.LC9
	.size	findBestStudentForEachCategory, .-findBestStudentForEachCategory
	.align	2
	.global	findBestStudentForCategory
	.syntax unified
	.arm
	.fpu softvfp
	.type	findBestStudentForCategory, %function
findBestStudentForCategory:
	@ args = 8, 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]
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L68
.L75:
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L69
.L73:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	bne	.L70
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L71
	mvn	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-32]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	b	.L67
.L71:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3]
.L70:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L69:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #8]
	cmp	r2, r3
	blt	.L73
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-24]
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	ble	.L74
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L74:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L68:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	blt	.L75
	ldr	r3, [fp, #-32]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
.L67:
	ldr	r0, [fp, #-32]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	findBestStudentForCategory, .-findBestStudentForCategory
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
