	.file	"11075743.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"strings.txt"
.LC2:
	.string	"Errore scrittura."
.LC3:
	.string	"results/%d.gfd"
.LC4:
	.string	"w"
.LC5:
	.string	"directed\n%d"
.LC6:
	.string	"\n0"
.LC7:
	.string	"\n%d"
.LC8:
	.string	"\n%d %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
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 264
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -196[rbp], edi
	mov	QWORD PTR -208[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -144[rbp], rax
	cmp	QWORD PTR -144[rbp], 0
	jne	.L2
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	DWORD PTR -156[rbp], 1
	jmp	.L3
.L22:
	mov	rax, rsp
	mov	QWORD PTR -296[rbp], rax
	lea	rax, -83[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -152[rbp], eax
	mov	DWORD PTR -160[rbp], 0
	mov	esi, DWORD PTR -152[rbp]
	mov	edi, DWORD PTR -152[rbp]
	movsx	rax, esi
	sub	rax, 1
	mov	QWORD PTR -136[rbp], rax
	movsx	rax, esi
	mov	QWORD PTR -256[rbp], rax
	mov	QWORD PTR -248[rbp], 0
	movsx	rax, esi
	lea	rbx, 0[0+rax*4]
	movsx	rax, edi
	sub	rax, 1
	mov	QWORD PTR -128[rbp], rax
	movsx	rax, esi
	mov	QWORD PTR -224[rbp], rax
	mov	QWORD PTR -216[rbp], 0
	movsx	rax, edi
	mov	QWORD PTR -240[rbp], rax
	mov	QWORD PTR -232[rbp], 0
	mov	r8, QWORD PTR -224[rbp]
	mov	r9, QWORD PTR -216[rbp]
	mov	rdx, r9
	mov	r10, QWORD PTR -240[rbp]
	mov	r11, QWORD PTR -232[rbp]
	imul	rdx, r10
	mov	rax, r11
	imul	rax, r8
	lea	rcx, [rdx+rax]
	mov	rax, r8
	mul	r10
	add	rcx, rdx
	mov	rdx, rcx
	movsx	rax, esi
	mov	r14, rax
	mov	r15d, 0
	movsx	rax, edi
	mov	r12, rax
	mov	r13d, 0
	mov	rdx, r15
	imul	rdx, r12
	mov	rax, r13
	imul	rax, r14
	lea	rcx, [rdx+rax]
	mov	rax, r14
	mul	r12
	add	rcx, rdx
	mov	rdx, rcx
	movsx	rdx, esi
	movsx	rax, edi
	imul	rax, rdx
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	edi, 16
	mov	edx, 0
	div	rdi
	imul	rdx, rax, 16
	mov	rax, rdx
	and	rax, -4096
	mov	rcx, rsp
	sub	rcx, rax
.L4:
	cmp	rsp, rcx
	je	.L5
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L4
.L5:
	mov	rax, rdx
	and	eax, 4095
	sub	rsp, rax
	mov	rax, rdx
	and	eax, 4095
	test	rax, rax
	je	.L6
	mov	rax, rdx
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L6:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -120[rbp], rax
	mov	eax, DWORD PTR -152[rbp]
	lea	edx, 2[rax]
	movsx	rax, edx
	sub	rax, 1
	mov	QWORD PTR -112[rbp], rax
	movsx	rax, edx
	mov	QWORD PTR -272[rbp], rax
	mov	QWORD PTR -264[rbp], 0
	movsx	rax, edx
	mov	QWORD PTR -288[rbp], rax
	mov	QWORD PTR -280[rbp], 0
	movsx	rdx, edx
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	edi, 16
	mov	edx, 0
	div	rdi
	imul	rdx, rax, 16
	mov	rax, rdx
	and	rax, -4096
	mov	rcx, rsp
	sub	rcx, rax
.L7:
	cmp	rsp, rcx
	je	.L8
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L7
.L8:
	mov	rax, rdx
	and	eax, 4095
	sub	rsp, rax
	mov	rax, rdx
	and	eax, 4095
	test	rax, rax
	je	.L9
	mov	rax, rdx
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L9:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -104[rbp], rax
	mov	DWORD PTR -164[rbp], 0
	jmp	.L10
.L14:
	mov	eax, DWORD PTR -152[rbp]
	lea	esi, 2[rax]
	mov	rax, QWORD PTR -144[rbp]
	mov	rcx, QWORD PTR -104[rbp]
	mov	rdx, rax
	mov	rdi, rcx
	call	fgets@PLT
	mov	DWORD PTR -168[rbp], 0
	jmp	.L11
.L13:
	mov	rdx, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	eax, al
	sub	eax, 48
	mov	DWORD PTR -148[rbp], eax
	mov	rcx, rbx
	shr	rcx, 2
	mov	rsi, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	imul	rax, rcx
	add	rdx, rax
	mov	eax, DWORD PTR -148[rbp]
	mov	DWORD PTR [rsi+rdx*4], eax
	cmp	DWORD PTR -148[rbp], 1
	jne	.L12
	add	DWORD PTR -160[rbp], 1
.L12:
	add	DWORD PTR -168[rbp], 1
.L11:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -152[rbp]
	jl	.L13
	add	DWORD PTR -164[rbp], 1
.L10:
	mov	eax, DWORD PTR -164[rbp]
	cmp	eax, DWORD PTR -152[rbp]
	jl	.L14
	mov	eax, DWORD PTR -156[rbp]
	lea	rcx, -80[rbp]
	mov	edx, eax
	lea	rsi, .LC3[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -80[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -96[rbp], rax
	mov	eax, DWORD PTR -152[rbp]
	mov	rcx, QWORD PTR -96[rbp]
	mov	edx, eax
	lea	rsi, .LC5[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -172[rbp], 0
	jmp	.L15
.L16:
	mov	rax, QWORD PTR -96[rbp]
	mov	rcx, rax
	mov	edx, 2
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	add	DWORD PTR -172[rbp], 1
.L15:
	mov	eax, DWORD PTR -172[rbp]
	cmp	eax, DWORD PTR -152[rbp]
	jl	.L16
	mov	eax, DWORD PTR -160[rbp]
	mov	rcx, QWORD PTR -96[rbp]
	mov	edx, eax
	lea	rsi, .LC7[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -176[rbp], 0
	jmp	.L17
.L21:
	mov	DWORD PTR -180[rbp], 0
	jmp	.L18
.L20:
	mov	rsi, rbx
	shr	rsi, 2
	mov	rcx, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR -180[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -176[rbp]
	cdqe
	imul	rax, rsi
	add	rax, rdx
	mov	eax, DWORD PTR [rcx+rax*4]
	cmp	eax, 1
	jne	.L19
	mov	edx, DWORD PTR -180[rbp]
	mov	eax, DWORD PTR -176[rbp]
	mov	rdi, QWORD PTR -96[rbp]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC8[rip]
	mov	eax, 0
	call	fprintf@PLT
.L19:
	add	DWORD PTR -180[rbp], 1
.L18:
	mov	eax, DWORD PTR -180[rbp]
	cmp	eax, DWORD PTR -152[rbp]
	jl	.L20
	add	DWORD PTR -176[rbp], 1
.L17:
	mov	eax, DWORD PTR -176[rbp]
	cmp	eax, DWORD PTR -152[rbp]
	jl	.L21
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	DWORD PTR -156[rbp], 1
	mov	rsp, QWORD PTR -296[rbp]
.L3:
	mov	rax, QWORD PTR -144[rbp]
	lea	rcx, -83[rbp]
	mov	rdx, rax
	mov	esi, 3
	mov	rdi, rcx
	call	fgets@PLT
	test	rax, rax
	jne	.L22
	mov	eax, 0
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"11075743.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"strings.txt\000"
	.align	2
.LC2:
	.ascii	"Errore scrittura.\000"
	.align	2
.LC3:
	.ascii	"results/%d.gfd\000"
	.align	2
.LC4:
	.ascii	"w\000"
	.align	2
.LC5:
	.ascii	"directed\012%d\000"
	.align	2
.LC6:
	.ascii	"\0120\000"
	.align	2
.LC7:
	.ascii	"\012%d\000"
	.align	2
.LC8:
	.ascii	"\012%d %d\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #108
	str	r0, [fp, #-128]
	str	r1, [fp, #-132]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	ldr	r1, .L19+4
	ldr	r0, .L19+8
	bl	fopen
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L19+12
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	mov	r3, #1
	str	r3, [fp, #-96]
	b	.L3
.L16:
	mov	r3, sp
	mov	r8, r3
	sub	r3, fp, #56
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-88]
	mov	r3, #0
	str	r3, [fp, #-100]
	ldr	ip, [fp, #-88]
	ldr	lr, [fp, #-88]
	sub	r3, ip, #1
	str	r3, [fp, #-84]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r6, r3, #2
	sub	r3, lr, #1
	str	r3, [fp, #-80]
	mov	r3, ip
	mov	r4, r3
	mov	r5, #0
	mov	r3, lr
	mov	r0, r3
	mov	r1, #0
	mul	r2, r0, r5
	mul	r3, r4, r1
	add	r7, r2, r3
	umull	r2, r3, r4, r0
	add	r1, r7, r3
	mov	r3, r1
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #5
	orr	r1, r1, r2, lsr #27
	lsl	r0, r2, #5
	mov	r3, ip
	mov	r4, r3
	mov	r5, #0
	mov	r3, lr
	mov	r0, r3
	mov	r1, #0
	mul	r2, r0, r5
	mul	r3, r4, r1
	add	r7, r2, r3
	umull	r2, r3, r4, r0
	add	r1, r7, r3
	mov	r3, r1
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #5
	orr	r1, r1, r2, lsr #27
	lsl	r0, r2, #5
	mov	r3, ip
	mov	r2, lr
	mul	r3, r2, r3
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-88]
	add	ip, r3, #2
	sub	r3, ip, #1
	str	r3, [fp, #-72]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-68]
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L4
.L8:
	ldr	r3, [fp, #-88]
	add	r3, r3, #2
	ldr	r2, [fp, #-92]
	mov	r1, r3
	ldr	r0, [fp, #-68]
	bl	fgets
	mov	r3, #0
	str	r3, [fp, #-108]
	b	.L5
.L7:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-108]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	str	r3, [fp, #-60]
	lsr	r2, r6, #2
	ldr	r3, [fp, #-76]
	ldr	r1, [fp, #-104]
	mul	r1, r2, r1
	ldr	r2, [fp, #-108]
	add	r2, r1, r2
	ldr	r1, [fp, #-60]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-60]
	cmp	r3, #1
	bne	.L6
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L6:
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L5:
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	blt	.L7
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L4:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	blt	.L8
	sub	r3, fp, #52
	ldr	r2, [fp, #-96]
	ldr	r1, .L19+16
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #52
	ldr	r1, .L19+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-64]
	ldr	r2, [fp, #-88]
	ldr	r1, .L19+24
	ldr	r0, [fp, #-64]
	bl	fprintf
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L9
.L10:
	ldr	r3, [fp, #-64]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, .L19+28
	bl	fwrite
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L9:
	ldr	r2, [fp, #-112]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	blt	.L10
	ldr	r2, [fp, #-100]
	ldr	r1, .L19+32
	ldr	r0, [fp, #-64]
	bl	fprintf
	mov	r3, #0
	str	r3, [fp, #-116]
	b	.L11
.L15:
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L12
.L14:
	lsr	r2, r6, #2
	ldr	r3, [fp, #-76]
	ldr	r1, [fp, #-116]
	mul	r1, r2, r1
	ldr	r2, [fp, #-120]
	add	r2, r1, r2
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #1
	bne	.L13
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-116]
	ldr	r1, .L19+36
	ldr	r0, [fp, #-64]
	bl	fprintf
.L13:
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L12:
	ldr	r2, [fp, #-120]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	blt	.L14
	ldr	r3, [fp, #-116]
	add	r3, r3, #1
	str	r3, [fp, #-116]
.L11:
	ldr	r2, [fp, #-116]
	ldr	r3, [fp, #-88]
	cmp	r2, r3
	blt	.L15
	ldr	r0, [fp, #-64]
	bl	fclose
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
	mov	sp, r8
.L3:
	sub	r3, fp, #56
	ldr	r2, [fp, #-92]
	mov	r1, #3
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L16
	mov	r3, #0
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
