#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double coeficienteAglomeracao(int);
int /*<<< orphan*/ getch();
int /*<<< orphan*/ imprimirRedeSocial();
int /*<<< orphan*/ initM(int /*<<< orphan*/);
int numAmigosEmComum(int, int);
int /*<<< orphan*/ popularRedeSocialAleatoriamente(double);
int /*<<< orphan*/ printf(char *, double);
void main() {
  initM(0);
  popularRedeSocialAleatoriamente(0.6);
  imprimirRedeSocial();
  int n = numAmigosEmComum(2, 4);
  printf("\nnumero de amigos em comum entre 2 e 4: %d", n);
  printf("\ncoef. de aglomeracao da pessoa 2 eh: %f",
         coeficienteAglomeracao(2));
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1060 <initM@plt>
movsd  0xe79(%rip),%xmm0
call   1080 <popularRedeSocialAleatoriamente@plt>
mov    $0x0,%al
call   1040 <imprimirRedeSocial@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1070 <numAmigosEmComum@plt>
mov    %eax,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
lea    0xe57(%rip),%rdi
call   1050 <printf@plt>
mov    $0x2,%edi
call   1030 <coeficienteAglomeracao@plt>
lea    0xe6c(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1090 <getch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1060 <initM@plt>
movsd  0xe80(%rip),%xmm0
call   1080 <popularRedeSocialAleatoriamente@plt>
xor    %eax,%eax
call   1040 <imprimirRedeSocial@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1070 <numAmigosEmComum@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
lea    0xe5f(%rip),%rdi
call   1050 <printf@plt>
mov    $0x2,%edi
call   1030 <coeficienteAglomeracao@plt>
lea    0xe74(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1090 <getch@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"\0Anumero de amigos em comum entre 2 e 4: %d\00"
@.str.1 = [41 x i8] c"\0Acoef. de aglomeracao da pessoa 2 eh: %f\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @initM(i32 0)
%3 = call i32 @popularRedeSocialAleatoriamente(double 6.000000e-01)
%4 = call i32 (...) @imprimirRedeSocial()
%5 = call i32 @numAmigosEmComum(i32 2, i32 4)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = sitofp i32 %6 to double
%8 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), double %7)
%9 = call double @coeficienteAglomeracao(i32 2)
%10 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), double %9)
%11 = call i32 (...) @getch()
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"\0Anumero de amigos em comum entre 2 e 4: %d\00"
@.str.1 = [41 x i8] c"\0Acoef. de aglomeracao da pessoa 2 eh: %f\00"
define void @main() {
%1 = tail call i32 @initM(i32 0)
%2 = tail call i32 @popularRedeSocialAleatoriamente(double 6.000000e-01)
%3 = tail call i32 (...) @imprimirRedeSocial()
%4 = tail call i32 @numAmigosEmComum(i32 2, i32 4)
%5 = sitofp i32 %4 to double
%6 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), double %5)
%7 = tail call double @coeficienteAglomeracao(i32 2)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), double %7)
%9 = tail call i32 (...) @getch()
ret void
}