#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 */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
double fatorial(int);
int /*<<< orphan*/ flock();
int /*<<< orphan*/ glock();
double *malloc(int);
int /*<<< orphan*/ printf(char *, double, ...);
int main(int argc, char *argv[]) {
  int i, j, impar, inicio, fim;
  double valor_calc, aux;
  double extra = 0;
  static int global_cpuid = 0;
  static int barreira = 0, barreira2 = 0;
  static int global_potencia = 8;
  static double valor = 0.2;
  int local_cpuid;
  int tam_trabalho;
  static double *x = NULL;
  static double resultado_final = 0;
  glock();
  local_cpuid = global_cpuid;
  global_cpuid++;
  printf("Core %d está funcionando!\n", local_cpuid);
  flock();
  while (global_cpuid != 8)
    ;
  for (j = 0; j < 50; j++) {
    tam_trabalho = global_potencia / global_cpuid;
    if (local_cpuid == 0) {
      if (x == NULL)
        x = malloc(sizeof(double) * global_potencia);
      x[0] = valor;
      for (i = 1; i < global_potencia; i++) {
        x[i] = x[i - 1] * valor * valor;
        barreira2++;
      }
      barreira2++;
    }
    while (barreira2 != 8)
      ;
    impar = 2 * local_cpuid + 1;
    valor_calc = fatorial(impar);
    aux = valor_calc;
    if (local_cpuid % 2 == 0) {
      extra = x[local_cpuid];
      extra = extra / valor_calc;
    } else {
      extra = x[local_cpuid];
      extra = extra / valor_calc * -1;
    }
    glock();
    resultado_final += extra;
    barreira++;
    flock();
    while (barreira != 8)
      ;
    if (local_cpuid == 0) {
      printf("Resultado Final:\nSeno(%f) = %.4f\n", valor, resultado_final);
    }
    glock();
    if (local_cpuid == 0) {
      barreira2 = 0;
      resultado_final = 0;
      valor += 0.05;
      barreira = 0;
    }
    flock();
    while (barreira != 0)
      ;
  }
  for (i = 0; i < 50000; i++)
    ;
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    $0x0,%al
call   1030 <glock@plt>
mov    0x2edd(%rip),%eax
mov    %eax,-0x44(%rbp)
mov    0x2ed4(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ecb(%rip)
cvtsi2sdl -0x44(%rbp),%xmm0
lea    0xe67(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <flock@plt>
cmpl   $0x8,0x2eaa(%rip)
je     11c9 <main+0x69>
jmp    11b7 <main+0x57>
movl   $0x0,-0x18(%rbp)
cmpl   $0x32,-0x18(%rbp)
jge    142c <main+0x2cc>
mov    0x2e70(%rip),%eax
cltd
idivl  0x2e81(%rip)
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    12a5 <main+0x145>
cmpq   $0x0,0x2e7c(%rip)
jne    121b <main+0xbb>
movslq 0x2e47(%rip),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,0x2e5d(%rip)
movsd  0x2e35(%rip),%xmm0
mov    0x2e4e(%rip),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    0x2e12(%rip),%eax
jge    1296 <main+0x136>
mov    0x2e2d(%rip),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  0x2df7(%rip),%xmm0
mulsd  0x2def(%rip),%xmm0
mov    0x2e08(%rip),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x2df1(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2de8(%rip)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1235 <main+0xd5>
mov    0x2dd4(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2dcb(%rip)
jmp    12aa <main+0x14a>
cmpl   $0x8,0x2dbf(%rip)
je     12bc <main+0x15c>
jmp    12aa <main+0x14a>
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1060 <fatorial@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    131c <main+0x1bc>
mov    0x2d7e(%rip),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    134c <main+0x1ec>
mov    0x2d55(%rip),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  0xcbd(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    $0x0,%al
call   1030 <glock@plt>
movsd  -0x40(%rbp),%xmm0
addsd  0x2d20(%rip),%xmm0
movsd  %xmm0,0x2d18(%rip)
mov    0x2cfe(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2cf5(%rip)
mov    $0x0,%al
call   1070 <flock@plt>
cmpl   $0x8,0x2ce7(%rip)
je     1390 <main+0x230>
jmp    137e <main+0x21e>
cmpl   $0x0,-0x44(%rbp)
jne    13b8 <main+0x258>
movsd  0x2cb6(%rip),%xmm0
movsd  0x2cd6(%rip),%xmm1
lea    0xc7b(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <glock@plt>
cmpl   $0x0,-0x44(%rbp)
jne    1400 <main+0x2a0>
movl   $0x0,0x2c9d(%rip)
xorps  %xmm0,%xmm0
movsd  %xmm0,0x2ca2(%rip)
movsd  0xc22(%rip),%xmm0
addsd  0x2c6a(%rip),%xmm0
movsd  %xmm0,0x2c62(%rip)
movl   $0x0,0x2c6c(%rip)
mov    $0x0,%al
call   1070 <flock@plt>
cmpl   $0x0,0x2c5e(%rip)
je     1419 <main+0x2b9>
jmp    1407 <main+0x2a7>
jmp    141e <main+0x2be>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11d0 <main+0x70>
movl   $0x0,-0x14(%rbp)
cmpl   $0xc350,-0x14(%rbp)
jge    1453 <main+0x2f3>
jmp    1445 <main+0x2e5>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1433 <main+0x2d3>
xor    %edi,%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
xor    %eax,%eax
call   1030 <glock@plt>
movslq 0x2ee8(%rip),%rbx
lea    0x1(%rbx),%eax
mov    %eax,0x2edf(%rip)
cvtsi2sd %ebx,%xmm0
lea    0xe8c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <flock@plt>
cmpl   $0x8,0x2ebf(%rip)
jne    1370 <main+0x210>
lea    (%rbx,%rbx,1),%r15d
add    $0x1,%r15d
mov    $0x32,%ebp
lea    0xe79(%rip),%r14
nopl   0x0(%rax,%rax,1)
test   %ebx,%ebx
je     11e0 <main+0x80>
mov    0x2e9e(%rip),%ecx
cmp    $0x8,%ecx
je     1280 <main+0x120>
jmp    1380 <main+0x220>
nopl   0x0(%rax,%rax,1)
mov    0x2e89(%rip),%rax
test   %rax,%rax
jne    11fd <main+0x9d>
mov    $0x40,%edi
call   1050 <malloc@plt>
mov    %rax,0x2e73(%rip)
movsd  0x2e4b(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    0x2e59(%rip),%ecx
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rax)
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rax)
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rax)
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rax)
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%rax)
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rax)
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x38(%rax)
add    $0x8,%ecx
mov    %ecx,0x2df1(%rip)
cmp    $0x8,%ecx
jne    1380 <main+0x220>
mov    %r15d,%edi
call   1060 <fatorial@plt>
mov    0x2de1(%rip),%rax
movsd  (%rax,%rbx,8),%xmm1
test   $0x1,%bl
je     12a1 <main+0x141>
xorpd  0xd5f(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,(%rsp)
xor    %eax,%eax
call   1030 <glock@plt>
movapd (%rsp),%xmm0
addsd  0x2dba(%rip),%xmm0
movsd  %xmm0,0x2db2(%rip)
addl   $0x1,0x2d97(%rip)
xor    %eax,%eax
call   1070 <flock@plt>
cmpl   $0x8,0x2d89(%rip)
jne    1390 <main+0x230>
test   %ebx,%ebx
je     12f0 <main+0x190>
xor    %eax,%eax
call   1030 <glock@plt>
jmp    1348 <main+0x1e8>
xchg   %ax,%ax
movsd  0x2d58(%rip),%xmm0
movsd  0x2d78(%rip),%xmm1
mov    %r14,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <glock@plt>
movl   $0x0,0x2d4d(%rip)
movq   $0x0,0x2d52(%rip)
movsd  0x2d22(%rip),%xmm0
addsd  0xcda(%rip),%xmm0
movsd  %xmm0,0x2d12(%rip)
movl   $0x0,0x2d1c(%rip)
xor    %eax,%eax
call   1070 <flock@plt>
cmpl   $0x0,0x2d0e(%rip)
jne    13a0 <main+0x240>
add    $0xffffffff,%ebp
jne    11c0 <main+0x60>
xor    %edi,%edi
call   1080 <exit@plt>
nopl   0x0(%rax,%rax,1)
jmp    1370 <main+0x210>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1380 <main+0x220>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1390 <main+0x230>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    13a0 <main+0x240>

LLVM IR (-O0):
@main.global_cpuid = internal global i32 0
@main.barreira = internal global i32 0
@main.barreira2 = internal global i32 0
@main.global_potencia = internal global i32 8
@main.valor = internal global double 2.000000e-01
@main.x = internal global double* null
@main.resultado_final = internal global double 0.000000e+00
@.str = [28 x i8] c"Core %d est\C3\A1 funcionando!\0A\00"
@.str.1 = [34 x i8] c"Resultado Final:\0ASeno(%f) = %.4f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 0.000000e+00, double* %13
%16 = call i32 (...) @glock()
%17 = load i32, i32* @main.global_cpuid
store i32 %17, i32* %14
%18 = load i32, i32* @main.global_cpuid
%19 = add nsw i32 %18, 1
store i32 %19, i32* @main.global_cpuid
%20 = load i32, i32* %14
%21 = sitofp i32 %20 to double
%22 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), double %21)
%23 = call i32 (...) @flock()
br label %24
24: ; preds = %27, %2
%25 = load i32, i32* @main.global_cpuid
%26 = icmp ne i32 %25, 8
br i1 %26, label %27, label %28
27: ; preds = %24
br label %24
28: ; preds = %24
store i32 0, i32* %7
br label %29
29: ; preds = %145, %28
%30 = load i32, i32* %7
%31 = icmp slt i32 %30, 50
br i1 %31, label %32, label %148
32: ; preds = %29
%33 = load i32, i32* @main.global_potencia
%34 = load i32, i32* @main.global_cpuid
%35 = sdiv i32 %33, %34
store i32 %35, i32* %15
%36 = load i32, i32* %14
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %78
38: ; preds = %32
%39 = load double*, double** @main.x
%40 = icmp eq double* %39, null
br i1 %40, label %41, label %47
41: ; preds = %38
%42 = load i32, i32* @main.global_potencia
%43 = sext i32 %42 to i64
%44 = mul i64 8, %43
%45 = trunc i64 %44 to i32
%46 = call double* @malloc(i32 %45)
store double* %46, double** @main.x
br label %47
47: ; preds = %41, %38
%48 = load double, double* @main.valor
%49 = load double*, double** @main.x
%50 = getelementptr inbounds double, double* %49, i64 0
store double %48, double* %50
store i32 1, i32* %6
br label %51
51: ; preds = %72, %47
%52 = load i32, i32* %6
%53 = load i32, i32* @main.global_potencia
%54 = icmp slt i32 %52, %53
br i1 %54, label %55, label %75
55: ; preds = %51
%56 = load double*, double** @main.x
%57 = load i32, i32* %6
%58 = sub nsw i32 %57, 1
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds double, double* %56, i64 %59
%61 = load double, double* %60
%62 = load double, double* @main.valor
%63 = fmul double %61, %62
%64 = load double, double* @main.valor
%65 = fmul double %63, %64
%66 = load double*, double** @main.x
%67 = load i32, i32* %6
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %66, i64 %68
store double %65, double* %69
%70 = load i32, i32* @main.barreira2
%71 = add nsw i32 %70, 1
store i32 %71, i32* @main.barreira2
br label %72
72: ; preds = %55
%73 = load i32, i32* %6
%74 = add nsw i32 %73, 1
store i32 %74, i32* %6
br label %51
75: ; preds = %51
%76 = load i32, i32* @main.barreira2
%77 = add nsw i32 %76, 1
store i32 %77, i32* @main.barreira2
br label %78
78: ; preds = %75, %32
br label %79
79: ; preds = %82, %78
%80 = load i32, i32* @main.barreira2
%81 = icmp ne i32 %80, 8
br i1 %81, label %82, label %83
82: ; preds = %79
br label %79
83: ; preds = %79
%84 = load i32, i32* %14
%85 = mul nsw i32 2, %84
%86 = add nsw i32 %85, 1
store i32 %86, i32* %8
%87 = load i32, i32* %8
%88 = call double @fatorial(i32 %87)
store double %88, double* %11
%89 = load double, double* %11
store double %89, double* %12
%90 = load i32, i32* %14
%91 = srem i32 %90, 2
%92 = icmp eq i32 %91, 0
br i1 %92, label %93, label %102
93: ; preds = %83
%94 = load double*, double** @main.x
%95 = load i32, i32* %14
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %94, i64 %96
%98 = load double, double* %97
store double %98, double* %13
%99 = load double, double* %13
%100 = load double, double* %11
%101 = fdiv double %99, %100
store double %101, double* %13
br label %112
102: ; preds = %83
%103 = load double*, double** @main.x
%104 = load i32, i32* %14
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds double, double* %103, i64 %105
%107 = load double, double* %106
store double %107, double* %13
%108 = load double, double* %13
%109 = load double, double* %11
%110 = fdiv double %108, %109
%111 = fmul double %110, -1.000000e+00
store double %111, double* %13
br label %112
112: ; preds = %102, %93
%113 = call i32 (...) @glock()
%114 = load double, double* %13
%115 = load double, double* @main.resultado_final
%116 = fadd double %115, %114
store double %116, double* @main.resultado_final
%117 = load i32, i32* @main.barreira
%118 = add nsw i32 %117, 1
store i32 %118, i32* @main.barreira
%119 = call i32 (...) @flock()
br label %120
120: ; preds = %123, %112
%121 = load i32, i32* @main.barreira
%122 = icmp ne i32 %121, 8
br i1 %122, label %123, label %124
123: ; preds = %120
br label %120
124: ; preds = %120
%125 = load i32, i32* %14
%126 = icmp eq i32 %125, 0
br i1 %126, label %127, label %131
127: ; preds = %124
%128 = load double, double* @main.valor
%129 = load double, double* @main.resultado_final
%130 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), double %128, double %129)
br label %131
131: ; preds = %127, %124
%132 = call i32 (...) @glock()
%133 = load i32, i32* %14
%134 = icmp eq i32 %133, 0
br i1 %134, label %135, label %138
135: ; preds = %131
store i32 0, i32* @main.barreira2
store double 0.000000e+00, double* @main.resultado_final
%136 = load double, double* @main.valor
%137 = fadd double %136, 5.000000e-02
store double %137, double* @main.valor
store i32 0, i32* @main.barreira
br label %138
138: ; preds = %135, %131
%139 = call i32 (...) @flock()
br label %140
140: ; preds = %143, %138
%141 = load i32, i32* @main.barreira
%142 = icmp ne i32 %141, 0
br i1 %142, label %143, label %144
143: ; preds = %140
br label %140
144: ; preds = %140
br label %145
145: ; preds = %144
%146 = load i32, i32* %7
%147 = add nsw i32 %146, 1
store i32 %147, i32* %7
br label %29
148: ; preds = %29
store i32 0, i32* %6
br label %149
149: ; preds = %153, %148
%150 = load i32, i32* %6
%151 = icmp slt i32 %150, 50000
br i1 %151, label %152, label %156
152: ; preds = %149
br label %153
153: ; preds = %152
%154 = load i32, i32* %6
%155 = add nsw i32 %154, 1
store i32 %155, i32* %6
br label %149
156: ; preds = %149
%157 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@main.global_cpuid = internal unnamed_addr global i32 0
@main.barreira = internal unnamed_addr global i32 0
@main.barreira2 = internal unnamed_addr global i32 0
@main.valor = internal unnamed_addr global double 2.000000e-01
@main.x = internal unnamed_addr global double* null
@main.resultado_final = internal unnamed_addr global double 0.000000e+00
@.str = [28 x i8] c"Core %d est\C3\A1 funcionando!\0A\00"
@.str.1 = [34 x i8] c"Resultado Final:\0ASeno(%f) = %.4f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @glock()
%4 = load i32, i32* @main.global_cpuid
%5 = add nsw i32 %4, 1
store i32 %5, i32* @main.global_cpuid
%6 = sitofp i32 %4 to double
%7 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), double %6)
%8 = tail call i32 (...) @flock()
%9 = load i32, i32* @main.global_cpuid
%10 = icmp eq i32 %9, 8
br i1 %10, label %12, label %11
11: ; preds = %2, %11
br label %11
12: ; preds = %2
%13 = icmp eq i32 %4, 0
%14 = shl nsw i32 %4, 1
%15 = or i32 %14, 1
%16 = and i32 %4, 1
%17 = icmp eq i32 %16, 0
%18 = sext i32 %4 to i64
br label %24
19: ; preds = %90
%20 = add nuw nsw i32 %25, 1
%21 = icmp eq i32 %20, 50
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = tail call i32 @exit(i32 0)
unreachable
24: ; preds = %12, %19
%25 = phi i32 [ 0, %12 ], [ %20, %19 ]
br i1 %13, label %28, label %26
26: ; preds = %24
%27 = load i32, i32* @main.barreira2
br label %59
28: ; preds = %24
%29 = load double*, double** @main.x
%30 = icmp eq double* %29, null
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = tail call double* @malloc(i32 64)
store double* %32, double** @main.x
br label %33
33: ; preds = %31, %28
%34 = phi double* [ %32, %31 ], [ %29, %28 ]
%35 = load double, double* @main.valor
store double %35, double* %34
%36 = load i32, i32* @main.barreira2
%37 = fmul double %35, %35
%38 = fmul double %35, %37
%39 = getelementptr inbounds double, double* %34, i64 1
store double %38, double* %39
%40 = fmul double %35, %38
%41 = fmul double %35, %40
%42 = getelementptr inbounds double, double* %34, i64 2
store double %41, double* %42
%43 = fmul double %35, %41
%44 = fmul double %35, %43
%45 = getelementptr inbounds double, double* %34, i64 3
store double %44, double* %45
%46 = fmul double %35, %44
%47 = fmul double %35, %46
%48 = getelementptr inbounds double, double* %34, i64 4
store double %47, double* %48
%49 = fmul double %35, %47
%50 = fmul double %35, %49
%51 = getelementptr inbounds double, double* %34, i64 5
store double %50, double* %51
%52 = fmul double %35, %50
%53 = fmul double %35, %52
%54 = getelementptr inbounds double, double* %34, i64 6
store double %53, double* %54
%55 = fmul double %35, %53
%56 = fmul double %35, %55
%57 = getelementptr inbounds double, double* %34, i64 7
store double %56, double* %57
%58 = add i32 %36, 8
store i32 %58, i32* @main.barreira2
br label %59
59: ; preds = %26, %33
%60 = phi i32 [ %27, %26 ], [ %58, %33 ]
%61 = icmp eq i32 %60, 8
br i1 %61, label %63, label %62
62: ; preds = %59, %62
br label %62
63: ; preds = %59
%64 = tail call double @fatorial(i32 %15)
%65 = load double*, double** @main.x
%66 = getelementptr inbounds double, double* %65, i64 %18
%67 = load double, double* %66
%68 = fneg double %67
%69 = select i1 %17, double %67, double %68
%70 = fdiv double %69, %64
%71 = tail call i32 (...) @glock()
%72 = load double, double* @main.resultado_final
%73 = fadd double %70, %72
store double %73, double* @main.resultado_final
%74 = load i32, i32* @main.barreira
%75 = add nsw i32 %74, 1
store i32 %75, i32* @main.barreira
%76 = tail call i32 (...) @flock()
%77 = load i32, i32* @main.barreira
%78 = icmp eq i32 %77, 8
br i1 %78, label %80, label %79
79: ; preds = %63, %79
br label %79
80: ; preds = %63
br i1 %13, label %81, label %88
81: ; preds = %80
%82 = load double, double* @main.valor
%83 = load double, double* @main.resultado_final
%84 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), double %82, double %83)
%85 = tail call i32 (...) @glock()
store i32 0, i32* @main.barreira2
store double 0.000000e+00, double* @main.resultado_final
%86 = load double, double* @main.valor
%87 = fadd double %86, 5.000000e-02
store double %87, double* @main.valor
store i32 0, i32* @main.barreira
br label %90
88: ; preds = %80
%89 = tail call i32 (...) @glock()
br label %90
90: ; preds = %88, %81
%91 = tail call i32 (...) @flock()
%92 = load i32, i32* @main.barreira
%93 = icmp eq i32 %92, 0
br i1 %93, label %19, label %94
94: ; preds = %90, %94
br label %94
}