	.file	"645534.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Not enough arguments, Exiting..."
.LC1:
	.string	"r"
.LC2:
	.string	" "
.LC3:
	.string	"%d"
	.align 8
.LC4:
	.string	"Number of friends input parsing failed"
.LC5:
	.string	" \n"
.LC6:
	.string	"Number of friends: %d\n"
.LC7:
	.string	"    Optimal: %f\n"
.LC8:
	.string	"    Real: %d\n"
.LC9:
	.string	"    Sum_Diff: %d\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
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 104
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -132[rbp], edi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	cmp	DWORD PTR -132[rbp], 1
	jg	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -88[rbp], rax
	mov	DWORD PTR -104[rbp], 1000000
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	sub	rax, 1
	mov	QWORD PTR -80[rbp], rax
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	mov	r14, rax
	mov	r15d, 0
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	mov	r12, rax
	mov	r13d, 0
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L4:
	cmp	rsp, rdx
	je	.L5
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L4
.L5:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L6
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L6:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -72[rbp], rax
	jmp	.L7
.L16:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -96[rbp], rax
	mov	DWORD PTR -128[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	rax, QWORD PTR -96[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -96[rbp], rax
	cmp	QWORD PTR -96[rbp], 0
	je	.L8
	lea	rdx, -128[rbp]
	mov	rax, QWORD PTR -96[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	esi, 4
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	QWORD PTR -96[rbp], 0
	mov	DWORD PTR -112[rbp], 0
	jmp	.L10
.L8:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L3
.L11:
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -64[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -96[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	QWORD PTR -96[rbp], 0
	add	DWORD PTR -112[rbp], 1
.L10:
	mov	rax, QWORD PTR -96[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -96[rbp], rax
	cmp	QWORD PTR -96[rbp], 0
	jne	.L11
	mov	DWORD PTR -116[rbp], 0
	mov	DWORD PTR -120[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	add	DWORD PTR -116[rbp], eax
	add	DWORD PTR -120[rbp], 1
.L12:
	mov	eax, DWORD PTR -128[rbp]
	cmp	DWORD PTR -120[rbp], eax
	jl	.L13
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -116[rbp]
	mov	eax, DWORD PTR -128[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	divsd	xmm0, xmm1
	movq	rax, xmm0
	movq	xmm0, rax
	call	round@PLT
	cvttsd2si	eax, xmm0
	mov	DWORD PTR -100[rbp], eax
	mov	DWORD PTR -124[rbp], 0
	mov	DWORD PTR -108[rbp], 0
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	sub	eax, DWORD PTR -100[rbp]
	cdq
	xor	eax, edx
	sub	eax, edx
	add	DWORD PTR -124[rbp], eax
	add	DWORD PTR -108[rbp], 1
.L14:
	mov	eax, DWORD PTR -128[rbp]
	cmp	DWORD PTR -108[rbp], eax
	jl	.L15
	mov	eax, DWORD PTR -128[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -116[rbp]
	mov	eax, DWORD PTR -128[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	divsd	xmm0, xmm1
	movq	rax, xmm0
	movq	xmm0, rax
	lea	rdi, .LC7[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -124[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	mov	rdx, QWORD PTR -88[rbp]
	mov	ecx, DWORD PTR -104[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L16
	mov	eax, 0
.L3:
	mov	rsp, rbx
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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	"645534.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Not enough arguments, Exiting...\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	" \000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"Number of friends input parsing failed\000"
	.align	2
.LC5:
	.ascii	" \012\000"
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_d2iz
	.align	2
.LC6:
	.ascii	"Number of friends: %d\012\000"
	.align	2
.LC7:
	.ascii	"    Optimal: %f\012\000"
	.align	2
.LC8:
	.ascii	"    Real: %d\012\000"
	.align	2
.LC9:
	.ascii	"    Sum_Diff: %d\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #68
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r3, sp
	mov	r6, r3
	ldr	r3, [fp, #-80]
	cmp	r3, #1
	bgt	.L2
	ldr	r0, .L16+4
	bl	puts
	mov	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-84]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L16+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-48]
	ldr	r3, .L16+12
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	sub	r3, r3, #1
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-44]
	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
	ldr	r3, [fp, #-44]
	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
	ldr	r3, [fp, #-44]
	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, #-36]
	b	.L4
.L13:
	ldr	r0, [fp, #-36]
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-76]
	mov	r3, #0
	str	r3, [fp, #-32]
	ldr	r1, .L16+16
	ldr	r0, [fp, #-56]
	bl	strtok
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	beq	.L5
	sub	r3, fp, #76
	mov	r2, r3
	ldr	r1, .L16+20
	ldr	r0, [fp, #-56]
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-76]
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L7
.L5:
	ldr	r0, .L16+24
	bl	puts
	mov	r3, #0
	b	.L3
.L8:
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r1, .L16+20
	ldr	r0, [fp, #-56]
	bl	__isoc99_sscanf
	mov	r3, #0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L7:
	ldr	r1, .L16+28
	ldr	r0, [fp, #-56]
	bl	strtok
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L8
	mov	r3, #0
	str	r3, [fp, #-64]
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L9
.L10:
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L9:
	ldr	r3, [fp, #-76]
	ldr	r2, [fp, #-68]
	cmp	r2, r3
	blt	.L10
	ldr	r0, [fp, #-64]
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [fp, #-76]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	round
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L11
.L12:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	ldr	r2, [fp, #-72]
	add	r3, r2, r3
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L11:
	ldr	r3, [fp, #-76]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	blt	.L12
	ldr	r3, [fp, #-76]
	mov	r1, r3
	ldr	r0, .L16+32
	bl	printf
	ldr	r0, [fp, #-64]
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [fp, #-76]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L16+36
	bl	printf
	ldr	r1, [fp, #-28]
	ldr	r0, .L16+40
	bl	printf
	ldr	r1, [fp, #-72]
	ldr	r0, .L16+44
	bl	printf
.L4:
	ldr	r2, [fp, #-48]
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-36]
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	mov	r3, #0
.L3:
	mov	sp, r6
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC10
	.word	.LC0
	.word	.LC1
	.word	1000000
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
