	.file	"187643602.c"
	.intel_syntax noprefix
	.text
	.globl	errExit
	.type	errExit, @function
errExit:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	errExit, .-errExit
	.globl	time_ns
	.type	time_ns, @function
time_ns:
.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -32[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	test	eax, eax
	je	.L3
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -32[rbp]
	imul	rdx, rax, 1000000000
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	time_ns, .-time_ns
	.section	.rodata
	.align 8
.LC0:
	.string	"num_cores is %d, setting affinity to %d core, for %u\n"
	.text
	.globl	stick_this_thread_to_core
	.type	stick_this_thread_to_core, @function
stick_this_thread_to_core:
.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, 192
	mov	DWORD PTR -180[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 84
	call	sysconf@PLT
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -180[rbp], 0
	js	.L7
	mov	eax, DWORD PTR -180[rbp]
	cmp	eax, DWORD PTR -164[rbp]
	jl	.L8
.L7:
	mov	eax, -1
	jmp	.L12
.L8:
	lea	rax, -144[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 16
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	mov	eax, DWORD PTR -180[rbp]
	cdqe
	mov	QWORD PTR -160[rbp], rax
	cmp	QWORD PTR -160[rbp], 1023
	ja	.L11
	mov	rax, QWORD PTR -160[rbp]
	shr	rax, 6
	lea	rdx, 0[0+rax*8]
	lea	rcx, -144[rbp]
	add	rdx, rcx
	mov	rsi, QWORD PTR [rdx]
	mov	rdx, QWORD PTR -160[rbp]
	and	edx, 63
	mov	edi, 1
	mov	ecx, edx
	sal	rdi, cl
	mov	rdx, rdi
	lea	rcx, 0[0+rax*8]
	lea	rax, -144[rbp]
	add	rax, rcx
	or	rdx, rsi
	mov	QWORD PTR [rax], rdx
.L11:
	call	pthread_self@PLT
	mov	QWORD PTR -152[rbp], rax
	mov	rax, QWORD PTR -152[rbp]
	mov	ecx, eax
	mov	edx, DWORD PTR -180[rbp]
	mov	eax, DWORD PTR -164[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -144[rbp]
	mov	rax, QWORD PTR -152[rbp]
	mov	esi, 128
	mov	rdi, rax
	call	pthread_setaffinity_np@PLT
.L12:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	stick_this_thread_to_core, .-stick_this_thread_to_core
	.section	.rodata
	.align 8
.LC1:
	.string	"last_stored_index=%d,cap=%d,%d\n"
	.align 8
.LC2:
	.string	"Amicable array capacity exceded"
	.text
	.globl	AddAmicable
	.type	AddAmicable, @function
AddAmicable:
.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	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	edx, eax
	jne	.L15
	mov	rax, QWORD PTR -32[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC2[rip]
	call	errExit
.L15:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR [rdx]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR 4[rdx]
	mov	DWORD PTR 4[rax], edx
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	AddAmicable, .-AddAmicable
	.section	.rodata
.LC3:
	.string	"malloc"
	.text
	.globl	CreateAmicableArrayContainer
	.type	CreateAmicableArrayContainer, @function
CreateAmicableArrayContainer:
.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	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L18
	lea	rdi, .LC3[rip]
	call	errExit
.L18:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 12[rax], -1
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L19
	lea	rdi, .LC3[rip]
	call	errExit
.L19:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L20
.L22:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 3
	lea	rbx, [rdx+rax]
	mov	edi, 8
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L21
	lea	rdi, .LC3[rip]
	call	errExit
.L21:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 4[rax], -1
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	add	rdx, rcx
	mov	rdx, QWORD PTR [rdx]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -28[rbp], 1
.L20:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -28[rbp], eax
	jl	.L22
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	CreateAmicableArrayContainer, .-CreateAmicableArrayContainer
	.globl	FreeAmicableArrayContainer
	.type	FreeAmicableArrayContainer, @function
FreeAmicableArrayContainer:
.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 -4[rbp], 0
	jmp	.L25
.L26:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -4[rbp], 1
.L25:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L26
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	FreeAmicableArrayContainer, .-FreeAmicableArrayContainer
	.globl	WasAmicableFound
	.type	WasAmicableFound, @function
WasAmicableFound:
.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 -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L28
.L32:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -28[rbp], eax
	je	.L29
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -28[rbp], eax
	jne	.L30
.L29:
	mov	eax, 1
	jmp	.L31
.L30:
	add	DWORD PTR -4[rbp], 1
.L28:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	cmp	DWORD PTR -4[rbp], eax
	jle	.L32
	mov	eax, 0
.L31:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	WasAmicableFound, .-WasAmicableFound
	.globl	ResetAmicableNumbers
	.type	ResetAmicableNumbers, @function
ResetAmicableNumbers:
.LFB13:
	.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	DWORD PTR -4[rbp], 0
	jmp	.L34
.L35:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 4[rax], -1
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	add	rdx, rcx
	mov	rdx, QWORD PTR [rdx]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -4[rbp], 1
.L34:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L35
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	ResetAmicableNumbers, .-ResetAmicableNumbers
	.section	.rodata
	.align 8
.LC4:
	.string	"array[%d]=(%d,%d) are amicable\n"
	.text
	.globl	PrintAmicableNumbers
	.type	PrintAmicableNumbers, @function
PrintAmicableNumbers:
.LFB14:
	.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 -4[rbp], 0
	jmp	.L37
.L38:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	ecx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L37:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L38
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	PrintAmicableNumbers, .-PrintAmicableNumbers
	.globl	GetMyAmicable
	.type	GetMyAmicable, @function
GetMyAmicable:
.LFB15:
	.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	DWORD PTR -20[rbp], edi
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, DWORD PTR -20[rbp]
	movd	eax, xmm1
	movd	xmm0, eax
	call	sqrtf@PLT
	cvttss2si	eax, xmm0
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -12[rbp], 1
	mov	DWORD PTR -8[rbp], 2
	jmp	.L40
.L42:
	mov	eax, DWORD PTR -20[rbp]
	cdq
	idiv	DWORD PTR -8[rbp]
	mov	eax, edx
	test	eax, eax
	jne	.L41
	mov	eax, DWORD PTR -8[rbp]
	add	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cdq
	idiv	DWORD PTR -8[rbp]
	add	DWORD PTR -12[rbp], eax
.L41:
	add	DWORD PTR -8[rbp], 1
.L40:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L42
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	GetMyAmicable, .-GetMyAmicable
	.section	.rodata
.LC5:
	.string	"write"
	.align 8
.LC6:
	.string	"Routine with %d<->%d as args, done. Returning\n"
	.text
	.globl	FindAmicablePairsFromTo
	.type	FindAmicablePairsFromTo, @function
FindAmicablePairsFromTo:
.LFB16:
	.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	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -24[rbp], 8
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -36[rbp], eax
	jmp	.L45
.L49:
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	WasAmicableFound
	test	eax, eax
	jne	.L52
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	GetMyAmicable
	mov	DWORD PTR -32[rbp], eax
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	WasAmicableFound
	test	eax, eax
	jne	.L53
	mov	eax, DWORD PTR -32[rbp]
	mov	edi, eax
	call	GetMyAmicable
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jne	.L47
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	je	.L47
	mov	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -12[rbp], eax
	lea	rdx, -16[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	AddAmicable
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rcx, -16[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	rdx, QWORD PTR -24[rbp]
	cmp	rax, rdx
	je	.L47
	lea	rdi, .LC5[rip]
	call	errExit
	jmp	.L47
.L52:
	nop
	jmp	.L47
.L53:
	nop
.L47:
	add	DWORD PTR -36[rbp], 1
.L45:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 12[rax]
	cmp	DWORD PTR -36[rbp], eax
	jle	.L49
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L51
	call	__stack_chk_fail@PLT
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	FindAmicablePairsFromTo, .-FindAmicablePairsFromTo
	.globl	threadfunc
	.type	threadfunc, @function
threadfunc:
.LFB17:
	.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	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	edi, 128
	call	CreateAmicableArrayContainer
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	edi, eax
	call	stick_this_thread_to_core
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	FindAmicablePairsFromTo
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	FreeAmicableArrayContainer
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	threadfunc, .-threadfunc
	.section	.rodata
.LC7:
	.string	"pipe"
.LC8:
	.string	"pthread_create"
.LC9:
	.string	"poll"
.LC10:
	.string	"%d %d are amicable numbers\n"
	.align 8
.LC11:
	.string	"read() returned 0 on thread id %d\n"
	.align 8
.LC12:
	.string	"read() returned error on thread id %d\n"
	.align 8
.LC13:
	.string	"poll() returned POLLNVAL on thread id %d\n"
	.align 8
.LC14:
	.string	"%.4f secs to find amicable numbers from %d-%d. Total pairs %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 272
	mov	DWORD PTR -260[rbp], edi
	mov	QWORD PTR -272[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -232[rbp], 8
	mov	DWORD PTR -256[rbp], 0
	mov	eax, 0
	call	time_ns
	mov	QWORD PTR -224[rbp], rax
	lea	rax, -112[rbp]
	mov	edx, 24
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	edi, 0
	call	stick_this_thread_to_core
	mov	DWORD PTR -248[rbp], 1
	mov	DWORD PTR -236[rbp], 1000000
	mov	edx, DWORD PTR -248[rbp]
	mov	eax, DWORD PTR -236[rbp]
	add	eax, edx
	mov	DWORD PTR -244[rbp], eax
	mov	DWORD PTR -252[rbp], 0
	jmp	.L57
.L60:
	lea	rdx, -176[rbp]
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdi, rax
	call	pipe@PLT
	cmp	eax, -1
	jne	.L58
	lea	rdi, .LC7[rip]
	call	errExit
.L58:
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	mov	edx, DWORD PTR -176[rbp+rax*8]
	mov	eax, DWORD PTR -252[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 80
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	mov	edx, DWORD PTR -172[rbp+rax*8]
	mov	eax, DWORD PTR -252[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 76
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -252[rbp]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -252[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 64
	mov	DWORD PTR [rax], ecx
	mov	eax, DWORD PTR -252[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	lea	rdx, -72[rax]
	mov	eax, DWORD PTR -248[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -252[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	lea	rdx, -68[rax]
	mov	eax, DWORD PTR -244[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	mov	edx, DWORD PTR -176[rbp+rax*8]
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	mov	DWORD PTR -112[rbp+rax*8], edx
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	mov	WORD PTR -108[rbp+rax*8], 1
	lea	rcx, -80[rbp]
	mov	eax, DWORD PTR -252[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	lea	rdx, [rcx+rax]
	lea	rcx, -144[rbp]
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, threadfunc[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L59
	lea	rdi, .LC8[rip]
	call	errExit
.L59:
	mov	eax, DWORD PTR -244[rbp]
	add	eax, 1
	mov	DWORD PTR -248[rbp], eax
	mov	eax, DWORD PTR -236[rbp]
	add	DWORD PTR -244[rbp], eax
	add	DWORD PTR -252[rbp], 1
.L57:
	cmp	DWORD PTR -252[rbp], 2
	jle	.L60
	mov	DWORD PTR -256[rbp], 0
	mov	DWORD PTR -240[rbp], 3
	mov	edi, 128
	call	CreateAmicableArrayContainer
	mov	QWORD PTR -216[rbp], rax
	jmp	.L61
.L72:
	lea	rax, -112[rbp]
	mov	edx, -1
	mov	esi, 3
	mov	rdi, rax
	call	poll@PLT
	test	eax, eax
	jns	.L62
	lea	rdi, .LC9[rip]
	call	errExit
.L62:
	mov	DWORD PTR -252[rbp], 0
	jmp	.L63
.L71:
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	movzx	eax, WORD PTR -106[rbp+rax*8]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L64
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	mov	eax, DWORD PTR -112[rbp+rax*8]
	mov	rdx, QWORD PTR -232[rbp]
	lea	rcx, -184[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR -192[rbp]
	cmp	rax, QWORD PTR -232[rbp]
	jne	.L65
	mov	edx, DWORD PTR -184[rbp]
	mov	rax, QWORD PTR -216[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	WasAmicableFound
	test	eax, eax
	jne	.L79
	mov	edx, DWORD PTR -180[rbp]
	mov	rax, QWORD PTR -216[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	WasAmicableFound
	test	eax, eax
	jne	.L79
	mov	edx, DWORD PTR -180[rbp]
	mov	eax, DWORD PTR -184[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -184[rbp]
	mov	rax, QWORD PTR -216[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	AddAmicable
	add	DWORD PTR -256[rbp], 1
	jmp	.L68
.L65:
	cmp	QWORD PTR -192[rbp], 0
	jne	.L69
	mov	eax, DWORD PTR -252[rbp]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	mov	DWORD PTR -112[rbp+rax*8], -1
	jmp	.L68
.L69:
	mov	eax, DWORD PTR -252[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L68
.L64:
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	movzx	eax, WORD PTR -106[rbp+rax*8]
	cwde
	and	eax, 16
	test	eax, eax
	je	.L70
	sub	DWORD PTR -240[rbp], 1
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	mov	DWORD PTR -112[rbp+rax*8], -1
	jmp	.L68
.L70:
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	movzx	eax, WORD PTR -106[rbp+rax*8]
	cwde
	and	eax, 32
	test	eax, eax
	je	.L68
	mov	eax, DWORD PTR -252[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -252[rbp]
	cdqe
	mov	DWORD PTR -112[rbp+rax*8], -1
	jmp	.L68
.L79:
	nop
.L68:
	add	DWORD PTR -252[rbp], 1
.L63:
	cmp	DWORD PTR -252[rbp], 2
	jle	.L71
.L61:
	cmp	DWORD PTR -240[rbp], 0
	jg	.L72
	mov	rax, QWORD PTR -216[rbp]
	mov	rdi, rax
	call	FreeAmicableArrayContainer
	mov	eax, 0
	call	time_ns
	sub	rax, QWORD PTR -224[rbp]
	mov	QWORD PTR -208[rbp], rax
	mov	QWORD PTR -200[rbp], 1000000000
	mov	rax, QWORD PTR -208[rbp]
	test	rax, rax
	js	.L73
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, rax
	jmp	.L74
.L73:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, rdx
	addss	xmm0, xmm0
.L74:
	mov	rax, QWORD PTR -200[rbp]
	test	rax, rax
	js	.L75
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, rax
	jmp	.L76
.L75:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, rdx
	addss	xmm1, xmm1
.L76:
	divss	xmm0, xmm1
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, xmm0
	movq	rax, xmm2
	mov	edx, DWORD PTR -256[rbp]
	mov	ecx, edx
	mov	edx, 3000000
	mov	esi, 1
	movq	xmm0, rax
	lea	rdi, .LC14[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L78
	call	__stack_chk_fail@PLT
.L78:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.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	"187643602.c"
	.text
	.align	2
	.global	errExit
	.syntax unified
	.arm
	.fpu softvfp
	.type	errExit, %function
errExit:
	@ 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	r0, [fp, #-8]
	bl	perror
	mov	r0, #1
	bl	exit
	.size	errExit, .-errExit
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	time_ns
	.syntax unified
	.arm
	.fpu softvfp
	.type	time_ns, %function
time_ns:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-24]
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L6+4
	mul	r2, r3, r1
	mov	r3, #0
	mul	r3, r0, r3
	add	ip, r2, r3
	ldr	lr, .L6+4
	umull	r2, r3, r0, lr
	add	r1, ip, r3
	mov	r3, r1
	ldr	r1, [fp, #-20]
	mov	r0, r1
	asr	r1, r0, #31
	adds	r4, r2, r0
	adc	r5, r3, r1
	mov	r2, r4
	mov	r3, r5
	ldr	r1, .L6
	ldr	r0, [r1]
	ldr	r1, [fp, #-16]
	eors	r0, r1, r0
	mov	r1, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	1000000000
	.size	time_ns, .-time_ns
	.section	.rodata
	.align	2
.LC1:
	.ascii	"num_cores is %d, setting affinity to %d core, for %"
	.ascii	"u\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	stick_this_thread_to_core
	.syntax unified
	.arm
	.fpu softvfp
	.type	stick_this_thread_to_core, %function
stick_this_thread_to_core:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #152
	str	r0, [fp, #-152]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #84
	bl	sysconf
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	blt	.L9
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-148]
	cmp	r2, r3
	blt	.L10
.L9:
	mvn	r3, #0
	b	.L14
.L10:
	sub	r3, fp, #136
	mov	r0, r3
	mov	r3, #128
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, [fp, #-152]
	str	r3, [fp, #-144]
	ldr	r3, [fp, #-144]
	cmp	r3, #1024
	bcs	.L13
	ldr	r3, [fp, #-144]
	lsr	r3, r3, #5
	lsl	r2, r3, #2
	sub	r1, fp, #136
	add	r2, r1, r2
	ldr	r1, [r2]
	ldr	r2, [fp, #-144]
	and	r2, r2, #31
	mov	r0, #1
	lsl	r2, r0, r2
	lsl	r3, r3, #2
	sub	r0, fp, #136
	add	r3, r0, r3
	orr	r2, r1, r2
	str	r2, [r3]
.L13:
	bl	pthread_self
	str	r0, [fp, #-140]
	ldr	r3, [fp, #-140]
	ldr	r2, [fp, #-152]
	ldr	r1, [fp, #-148]
	ldr	r0, .L16+4
	bl	printf
	sub	r3, fp, #136
	mov	r2, r3
	mov	r1, #128
	ldr	r0, [fp, #-140]
	bl	pthread_setaffinity_np
	mov	r3, r0
.L14:
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC2
	.word	.LC1
	.size	stick_this_thread_to_core, .-stick_this_thread_to_core
	.section	.rodata
	.align	2
.LC3:
	.ascii	"last_stored_index=%d,cap=%d,%d\012\000"
	.align	2
.LC4:
	.ascii	"Amicable array capacity exceded\000"
	.text
	.align	2
	.global	AddAmicable
	.syntax unified
	.arm
	.fpu softvfp
	.type	AddAmicable, %function
AddAmicable:
	@ 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]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L19
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	ldr	r0, .L21
	bl	printf
	ldr	r0, .L21+4
	bl	errExit
.L19:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC3
	.word	.LC4
	.size	AddAmicable, .-AddAmicable
	.section	.rodata
	.align	2
.LC5:
	.ascii	"malloc\000"
	.text
	.align	2
	.global	CreateAmicableArrayContainer
	.syntax unified
	.arm
	.fpu softvfp
	.type	CreateAmicableArrayContainer, %function
CreateAmicableArrayContainer:
	@ 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]
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L24
	ldr	r0, .L30
	bl	errExit
.L24:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	mvn	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L25
	ldr	r0, .L30
	bl	errExit
.L25:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L26
.L28:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L27
	ldr	r0, .L30
	bl	errExit
.L27:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mvn	r2, #0
	str	r2, [r3, #4]
	ldr	r2, [fp, #-16]
	ldr	r1, [r2]
	ldr	r2, [fp, #-20]
	lsl	r2, r2, #2
	add	r2, r1, r2
	ldr	r2, [r2]
	ldr	r3, [r3, #4]
	str	r3, [r2]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L26:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L28
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC5
	.size	CreateAmicableArrayContainer, .-CreateAmicableArrayContainer
	.align	2
	.global	FreeAmicableArrayContainer
	.syntax unified
	.arm
	.fpu softvfp
	.type	FreeAmicableArrayContainer, %function
FreeAmicableArrayContainer:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L33
.L34:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L33:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L34
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-16]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	FreeAmicableArrayContainer, .-FreeAmicableArrayContainer
	.align	2
	.global	WasAmicableFound
	.syntax unified
	.arm
	.fpu softvfp
	.type	WasAmicableFound, %function
WasAmicableFound:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L36
.L40:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	beq	.L37
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bne	.L38
.L37:
	mov	r3, #1
	b	.L39
.L38:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L36:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L40
	mov	r3, #0
.L39:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	WasAmicableFound, .-WasAmicableFound
	.align	2
	.global	ResetAmicableNumbers
	.syntax unified
	.arm
	.fpu softvfp
	.type	ResetAmicableNumbers, %function
ResetAmicableNumbers:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L42
.L43:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mvn	r2, #0
	str	r2, [r3, #4]
	ldr	r2, [fp, #-16]
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	lsl	r2, r2, #2
	add	r2, r1, r2
	ldr	r2, [r2]
	ldr	r3, [r3, #4]
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L42:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L43
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	ResetAmicableNumbers, .-ResetAmicableNumbers
	.section	.rodata
	.align	2
.LC6:
	.ascii	"array[%d]=(%d,%d) are amicable\012\000"
	.text
	.align	2
	.global	PrintAmicableNumbers
	.syntax unified
	.arm
	.fpu softvfp
	.type	PrintAmicableNumbers, %function
PrintAmicableNumbers:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L45
.L46:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, r1
	ldr	r1, [fp, #-8]
	ldr	r0, .L47
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L45:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L46
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC6
	.size	PrintAmicableNumbers, .-PrintAmicableNumbers
	.global	__aeabi_i2f
	.global	__aeabi_f2iz
	.global	__aeabi_idivmod
	.global	__aeabi_idiv
	.align	2
	.global	GetMyAmicable
	.syntax unified
	.arm
	.fpu softvfp
	.type	GetMyAmicable, %function
GetMyAmicable:
	@ 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]
	ldr	r0, [fp, #-24]
	bl	__aeabi_i2f
	mov	r3, r0
	mov	r0, r3
	bl	sqrtf
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2iz
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-8]
	mov	r3, #1
	str	r3, [fp, #-16]
	mov	r3, #2
	str	r3, [fp, #-12]
	b	.L50
.L52:
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L51
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-24]
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-16]
.L51:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L50:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L52
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	GetMyAmicable, .-GetMyAmicable
	.section	.rodata
	.align	2
.LC7:
	.ascii	"write\000"
	.align	2
.LC8:
	.ascii	"Routine with %d<->%d as args, done. Returning\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	FindAmicablePairsFromTo
	.syntax unified
	.arm
	.fpu softvfp
	.type	FindAmicablePairsFromTo, %function
FindAmicablePairsFromTo:
	@ 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, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L64
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #8
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-32]
	b	.L55
.L59:
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-44]
	bl	WasAmicableFound
	mov	r3, r0
	cmp	r3, #0
	bne	.L62
	ldr	r0, [fp, #-32]
	bl	GetMyAmicable
	str	r0, [fp, #-24]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-44]
	bl	WasAmicableFound
	mov	r3, r0
	cmp	r3, #0
	bne	.L63
	ldr	r0, [fp, #-24]
	bl	GetMyAmicable
	str	r0, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bne	.L57
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	beq	.L57
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-12]
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	AddAmicable
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #4]
	sub	r1, fp, #16
	ldr	r2, [fp, #-28]
	mov	r0, r3
	bl	write
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-28]
	cmp	r3, r2
	beq	.L57
	ldr	r0, .L64+4
	bl	errExit
	b	.L57
.L62:
	nop
	b	.L57
.L63:
	nop
.L57:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L55:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	ble	.L59
	ldr	r3, [fp, #-40]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #12]
	mov	r2, r3
	ldr	r0, .L64+8
	bl	printf
	nop
	ldr	r3, .L64
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L61
	bl	__stack_chk_fail
.L61:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L65:
	.align	2
.L64:
	.word	.LC9
	.word	.LC7
	.word	.LC8
	.size	FindAmicablePairsFromTo, .-FindAmicablePairsFromTo
	.align	2
	.global	threadfunc
	.syntax unified
	.arm
	.fpu softvfp
	.type	threadfunc, %function
threadfunc:
	@ 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]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	mov	r0, #128
	bl	CreateAmicableArrayContainer
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	stick_this_thread_to_core
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	FindAmicablePairsFromTo
	ldr	r0, [fp, #-8]
	bl	FreeAmicableArrayContainer
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	threadfunc, .-threadfunc
	.section	.rodata
	.align	2
.LC10:
	.ascii	"pipe\000"
	.align	2
.LC11:
	.ascii	"pthread_create\000"
	.align	2
.LC12:
	.ascii	"poll\000"
	.align	2
.LC13:
	.ascii	"%d %d are amicable numbers\012\000"
	.align	2
.LC14:
	.ascii	"read() returned 0 on thread id %d\012\000"
	.align	2
.LC15:
	.ascii	"read() returned error on thread id %d\012\000"
	.align	2
.LC16:
	.ascii	"poll() returned POLLNVAL on thread id %d\012\000"
	.global	__aeabi_ul2f
	.global	__aeabi_fdiv
	.global	__aeabi_f2d
	.align	2
.LC17:
	.ascii	"%.4f secs to find amicable numbers from %d-%d. Tota"
	.ascii	"l pairs %d\012\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 208
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #224
	str	r0, [fp, #-216]
	str	r1, [fp, #-220]
	ldr	r3, .L88+8
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #8
	str	r3, [fp, #-188]
	mov	r3, #0
	str	r3, [fp, #-208]
	bl	time_ns
	str	r0, [fp, #-172]
	str	r1, [fp, #-168]
	sub	r3, fp, #100
	mov	r2, #24
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r0, #0
	bl	stick_this_thread_to_core
	mov	r3, #1
	str	r3, [fp, #-200]
	ldr	r3, .L88+12
	str	r3, [fp, #-184]
	ldr	r2, [fp, #-200]
	ldr	r3, [fp, #-184]
	add	r3, r2, r3
	str	r3, [fp, #-196]
	mov	r3, #0
	str	r3, [fp, #-204]
	b	.L69
.L72:
	sub	r2, fp, #124
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmn	r3, #1
	bne	.L70
	ldr	r0, .L88+16
	bl	errExit
.L70:
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r1, [r3, #-112]
	ldr	r2, [fp, #-204]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #64
	str	r1, [r3]
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r1, [r3, #-108]
	ldr	r2, [fp, #-204]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #60
	str	r1, [r3]
	ldr	r3, [fp, #-204]
	add	r1, r3, #1
	ldr	r2, [fp, #-204]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #48
	str	r1, [r3]
	ldr	r2, [fp, #-204]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #56
	ldr	r2, [fp, #-200]
	str	r2, [r3]
	ldr	r2, [fp, #-204]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #52
	ldr	r2, [fp, #-196]
	str	r2, [r3]
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-112]
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-88]
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #84
	mov	r2, #1
	strh	r2, [r3]	@ movhi
	sub	r2, fp, #136
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #2
	add	r0, r2, r3
	sub	r1, fp, #76
	ldr	r2, [fp, #-204]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, .L88+20
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L71
	ldr	r0, .L88+24
	bl	errExit
.L71:
	ldr	r3, [fp, #-196]
	add	r3, r3, #1
	str	r3, [fp, #-200]
	ldr	r2, [fp, #-196]
	ldr	r3, [fp, #-184]
	add	r3, r2, r3
	str	r3, [fp, #-196]
	ldr	r3, [fp, #-204]
	add	r3, r3, #1
	str	r3, [fp, #-204]
.L69:
	ldr	r3, [fp, #-204]
	cmp	r3, #2
	ble	.L72
	mov	r3, #0
	str	r3, [fp, #-208]
	mov	r3, #3
	str	r3, [fp, #-192]
	mov	r0, #128
	bl	CreateAmicableArrayContainer
	str	r0, [fp, #-180]
	b	.L73
.L84:
	sub	r3, fp, #100
	mvn	r2, #0
	mov	r1, #3
	mov	r0, r3
	bl	poll
	mov	r3, r0
	cmp	r3, #0
	bge	.L74
	ldr	r0, .L88+28
	bl	errExit
.L74:
	mov	r3, #0
	str	r3, [fp, #-204]
	b	.L75
.L83:
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #82
	ldrsh	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L76
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-88]
	sub	r1, fp, #144
	ldr	r2, [fp, #-188]
	mov	r0, r3
	bl	read
	mov	r3, r0
	str	r3, [fp, #-176]
	ldr	r2, [fp, #-176]
	ldr	r3, [fp, #-188]
	cmp	r2, r3
	bne	.L77
	ldr	r3, [fp, #-144]
	mov	r1, r3
	ldr	r0, [fp, #-180]
	bl	WasAmicableFound
	mov	r3, r0
	cmp	r3, #0
	bne	.L87
	ldr	r3, [fp, #-140]
	mov	r1, r3
	ldr	r0, [fp, #-180]
	bl	WasAmicableFound
	mov	r3, r0
	cmp	r3, #0
	bne	.L87
	ldr	r3, [fp, #-144]
	ldr	r2, [fp, #-140]
	mov	r1, r3
	ldr	r0, .L88+32
	bl	printf
	sub	r3, fp, #144
	mov	r1, r3
	ldr	r0, [fp, #-180]
	bl	AddAmicable
	ldr	r3, [fp, #-208]
	add	r3, r3, #1
	str	r3, [fp, #-208]
	b	.L80
.L77:
	ldr	r3, [fp, #-176]
	cmp	r3, #0
	bne	.L81
	ldr	r1, [fp, #-204]
	ldr	r0, .L88+36
	bl	printf
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #-88]
	b	.L80
.L81:
	ldr	r1, [fp, #-204]
	ldr	r0, .L88+40
	bl	printf
	b	.L80
.L76:
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #82
	ldrsh	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #16
	cmp	r3, #0
	beq	.L82
	ldr	r3, [fp, #-192]
	sub	r3, r3, #1
	str	r3, [fp, #-192]
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #-88]
	b	.L80
.L82:
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #82
	ldrsh	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #32
	cmp	r3, #0
	beq	.L80
	ldr	r1, [fp, #-204]
	ldr	r0, .L88+44
	bl	printf
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #-88]
	b	.L80
.L87:
	nop
.L80:
	ldr	r3, [fp, #-204]
	add	r3, r3, #1
	str	r3, [fp, #-204]
.L75:
	ldr	r3, [fp, #-204]
	cmp	r3, #2
	ble	.L83
.L73:
	ldr	r3, [fp, #-192]
	cmp	r3, #0
	bgt	.L84
	ldr	r0, [fp, #-180]
	bl	FreeAmicableArrayContainer
	bl	time_ns
	sub	r3, fp, #172
	ldmia	r3, {r2-r3}
	subs	r4, r0, r2
	sbc	r5, r1, r3
	str	r4, [fp, #-164]
	str	r5, [fp, #-160]
	adr	r3, .L88
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-156]
	str	r3, [fp, #-152]
	sub	r1, fp, #164
	ldmia	r1, {r0-r1}
	bl	__aeabi_ul2f
	mov	r4, r0
	sub	r1, fp, #156
	ldmia	r1, {r0-r1}
	bl	__aeabi_ul2f
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	__aeabi_fdiv
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-208]
	str	r1, [sp, #8]
	ldr	r1, .L88+48
	str	r1, [sp, #4]
	mov	r1, #1
	str	r1, [sp]
	ldr	r0, .L88+52
	bl	printf
	mov	r3, #0
	ldr	r2, .L88+8
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L86
	bl	__stack_chk_fail
.L86:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L89:
	.align	3
.L88:
	.word	1000000000
	.word	0
	.word	.LC18
	.word	1000000
	.word	.LC10
	.word	threadfunc
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	3000000
	.word	.LC17
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
