	.file	"25137610.c"
	.intel_syntax noprefix
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	mezzi
	.data
	.align 16
	.type	mezzi, @object
	.size	mezzi, 16
mezzi:
	.long	2
	.long	4
	.long	5
	.long	7
	.globl	numeriInit
	.bss
	.align 16
	.type	numeriInit, @object
	.size	numeriInit, 16
numeriInit:
	.zero	16
	.globl	prezzi
	.align 16
	.type	prezzi, @object
	.size	prezzi, 16
prezzi:
	.zero	16
	.globl	costo
	.align 32
	.type	costo, @object
	.size	costo, 428
costo:
	.zero	428
	.globl	numeri
	.align 32
	.type	numeri, @object
	.size	numeri, 1712
numeri:
	.zero	1712
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"input.txt"
.LC2:
	.string	"w"
.LC3:
	.string	"output.txt"
.LC4:
	.string	"%d"
.LC5:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, N[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	DWORD PTR -32[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, prezzi[rip]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, numeriInit[rip]
	add	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	add	DWORD PTR -32[rbp], 1
.L2:
	cmp	DWORD PTR -32[rbp], 3
	jle	.L3
	mov	DWORD PTR -28[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, costo[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, numeri[rip]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR numeriInit[rip]
	mov	rdx, QWORD PTR numeriInit[rip+8]
	mov	QWORD PTR [rcx], rax
	mov	QWORD PTR 8[rcx], rdx
	add	DWORD PTR -28[rbp], 1
.L4:
	cmp	DWORD PTR -28[rbp], 7
	jle	.L5
	mov	DWORD PTR -24[rbp], 8
	jmp	.L6
.L11:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, costo[rip]
	mov	DWORD PTR [rdx+rax], 2147483647
	mov	DWORD PTR -20[rbp], 0
	jmp	.L7
.L10:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, mezzi[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, ecx
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, numeri[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jle	.L13
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, mezzi[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, costo[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, prezzi[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	ecx, eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, costo[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	ecx, eax
	jge	.L9
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, mezzi[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, costo[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, prezzi[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	ecx, eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, costo[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, mezzi[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, edx
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, numeri[rip]
	add	rax, rdx
	mov	edx, DWORD PTR -24[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 4
	lea	rdx, numeri[rip]
	add	rcx, rdx
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rcx], rax
	mov	QWORD PTR 8[rcx], rdx
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, numeri[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	ecx, -1[rax]
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, numeri[rip]
	mov	DWORD PTR [rdx+rax], ecx
	jmp	.L9
.L13:
	nop
.L9:
	add	DWORD PTR -20[rbp], 1
.L7:
	cmp	DWORD PTR -20[rbp], 3
	jle	.L10
	add	DWORD PTR -24[rbp], 1
.L6:
	mov	eax, DWORD PTR N[rip]
	add	eax, 7
	cmp	DWORD PTR -24[rbp], eax
	jle	.L11
	mov	eax, DWORD PTR N[rip]
	add	eax, 7
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, costo[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"25137610.c"
	.text
	.comm	N,4,4
	.global	mezzi
	.data
	.align	2
	.type	mezzi, %object
	.size	mezzi, 16
mezzi:
	.word	2
	.word	4
	.word	5
	.word	7
	.comm	numeriInit,16,4
	.comm	prezzi,16,4
	.comm	costo,428,4
	.comm	numeri,1712,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"input.txt\000"
	.align	2
.LC2:
	.ascii	"w\000"
	.align	2
.LC3:
	.ascii	"output.txt\000"
	.align	2
.LC4:
	.ascii	"%d\000"
	.align	2
.LC5:
	.ascii	"%d %d\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
	ldr	r1, .L14
	ldr	r0, .L14+4
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r1, .L14+8
	ldr	r0, .L14+12
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r2, .L14+16
	ldr	r1, .L14+20
	ldr	r0, [fp, #-12]
	bl	__isoc99_fscanf
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L2
.L3:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, .L14+24
	add	r2, r3, r2
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r1, .L14+28
	add	r3, r3, r1
	ldr	r1, .L14+32
	ldr	r0, [fp, #-12]
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L2:
	ldr	r3, [fp, #-28]
	cmp	r3, #3
	ble	.L3
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L4
.L5:
	ldr	r2, .L14+36
	ldr	r3, [fp, #-24]
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #4
	ldr	r2, .L14+40
	add	r3, r3, r2
	mov	r2, #16
	ldr	r1, .L14+24
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L4:
	ldr	r3, [fp, #-24]
	cmp	r3, #7
	ble	.L5
	mov	r3, #8
	str	r3, [fp, #-20]
	b	.L6
.L11:
	ldr	r2, .L14+36
	ldr	r3, [fp, #-20]
	mvn	r1, #-2147483648
	str	r1, [r2, r3, lsl #2]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L7
.L10:
	ldr	r2, .L14+44
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-20]
	sub	r3, r2, r3
	ldr	r1, .L14+40
	lsl	r2, r3, #2
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	ble	.L13
	ldr	r2, .L14+44
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-20]
	sub	r3, r2, r3
	ldr	r2, .L14+36
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L14+28
	ldr	r3, [fp, #-16]
	ldr	r3, [r1, r3, lsl #2]
	add	r2, r2, r3
	ldr	r1, .L14+36
	ldr	r3, [fp, #-20]
	ldr	r3, [r1, r3, lsl #2]
	cmp	r2, r3
	bge	.L9
	ldr	r2, .L14+44
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-20]
	sub	r3, r2, r3
	ldr	r2, .L14+36
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L14+28
	ldr	r3, [fp, #-16]
	ldr	r3, [r1, r3, lsl #2]
	add	r2, r2, r3
	ldr	r1, .L14+36
	ldr	r3, [fp, #-20]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #4
	ldr	r2, .L14+40
	add	r0, r3, r2
	ldr	r2, .L14+44
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-20]
	sub	r3, r2, r3
	lsl	r3, r3, #4
	ldr	r2, .L14+40
	add	r3, r3, r2
	mov	r2, #16
	mov	r1, r3
	bl	memcpy
	ldr	r1, .L14+40
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	sub	r2, r3, #1
	ldr	r0, .L14+40
	ldr	r3, [fp, #-20]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-16]
	add	r3, r1, r3
	str	r2, [r0, r3, lsl #2]
	b	.L9
.L13:
	nop
.L9:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L7:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ble	.L10
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L6:
	ldr	r3, .L14+16
	ldr	r3, [r3]
	add	r3, r3, #7
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	ble	.L11
	ldr	r3, .L14+16
	ldr	r3, [r3]
	add	r3, r3, #7
	ldr	r2, .L14+36
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r1, .L14+20
	ldr	r0, [fp, #-8]
	bl	fprintf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	N
	.word	.LC4
	.word	numeriInit
	.word	prezzi
	.word	.LC5
	.word	costo
	.word	numeri
	.word	mezzi
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
