#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 */
struct timeval {
  int tv_sec;
  unsigned long tv_usec;
};

/* Variables and functions */
scalar_t__ calloc(int, int);
double ceil(double);
int fabs(double);
double floor(double);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ parallel_count(double, double, int *, int, double, double *,
                                  int, int);
int /*<<< orphan*/ printf(char *, unsigned long);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int nthreads, n, bins, i;
  struct timeval start, end;
  scanf(" %d %d %d", &nthreads, &n, &bins);
  int *bin = (int *)calloc(bins + 1, sizeof(int));
  double *vet = (double *)calloc(n, sizeof(double));
  double max, min;
  double gap;
  long unsigned duration;
  double j;
  scanf(" %lf", &vet[0]);
  max = min = vet[0];
  for (i = 1; i < n; i++) {
    scanf(" %lf", &vet[i]);
    if (max < vet[i]) {
      max = vet[i];
    }
    if (min > vet[i]) {
      min = vet[i];
    }
  }
  min = floor(min);
  max = ceil(max);
  gap = (max - min) / bins;
  gettimeofday(&start, NULL);
  parallel_count(min, max, bin, bins, gap, vet, n, nthreads);
  gettimeofday(&end, NULL);
  for (j = min; fabs(max - j) > 10e-7; j += gap) {
    printf("%.2lf ", j);
  }
  printf("%.2lf\n", max);
  for (i = 0; i < bins - 1; i++) {
    printf("%d ", bin[i]);
  }
  printf("%d\n", bin[bins - 1]);
  duration = ((end.tv_sec * 1000000 + end.tv_usec) -
              (start.tv_sec * 1000000 + start.tv_usec));
  printf("%lu\n", duration);
  free(vet);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe6a(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
mov    $0x0,%al
call   10a0 <scanf@plt>
mov    -0x10(%rbp),%edi
add    $0x1,%edi
mov    $0x4,%esi
call   1070 <calloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x8,%esi
call   1070 <calloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rsi
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   10a0 <scanf@plt>
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  %xmm0,-0x50(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    129d <main+0x10d>
mov    -0x48(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
lea    0xdef(%rip),%rdi
mov    $0x0,%al
call   10a0 <scanf@plt>
movsd  -0x50(%rbp),%xmm1
mov    -0x48(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    1260 <main+0xd0>
mov    -0x48(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x14(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    128a <main+0xfa>
mov    -0x48(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    128f <main+0xff>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1209 <main+0x79>
movsd  -0x58(%rbp),%xmm0
call   10b0 <floor@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1040 <ceil@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
lea    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <gettimeofday@plt>
movsd  -0x58(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
mov    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%esi
movsd  -0x60(%rbp),%xmm2
mov    -0x48(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%r8d
call   1090 <parallel_count@plt>
lea    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <gettimeofday@plt>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
subsd  -0x70(%rbp),%xmm0
call   1080 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xcc8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    138d <main+0x1fd>
movsd  -0x70(%rbp),%xmm0
movsd  0xcb9(%rip),%xmm2
movaps %xmm0,%xmm1
subsd  %xmm2,%xmm1
cvttsd2si %xmm1,%rax
cvttsd2si %xmm0,%rsi
mov    %rsi,%rcx
sar    $0x3f,%rcx
and    %rcx,%rax
or     %rax,%rsi
lea    0xcab(%rip),%rdi
call   1050 <printf@plt>
movsd  -0x60(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    131d <main+0x18d>
movsd  -0x50(%rbp),%xmm0
movsd  0xc6e(%rip),%xmm2
movaps %xmm0,%xmm1
subsd  %xmm2,%xmm1
cvttsd2si %xmm1,%rax
cvttsd2si %xmm0,%rsi
mov    %rsi,%rcx
sar    $0x3f,%rcx
and    %rcx,%rax
or     %rax,%rsi
lea    0xc67(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1402 <main+0x272>
mov    -0x40(%rbp),%rax
movslq -0x14(%rbp),%rcx
movslq (%rax,%rcx,4),%rsi
lea    0xc3e(%rip),%rdi
call   1050 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13cb <main+0x23b>
mov    -0x40(%rbp),%rax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movslq (%rax,%rcx,4),%rsi
lea    0xc17(%rip),%rdi
call   1050 <printf@plt>
imul   $0xf4240,-0x38(%rbp),%eax
cltq
add    -0x30(%rbp),%rax
imul   $0xf4240,-0x28(%rbp),%ecx
movslq %ecx,%rcx
add    -0x20(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rsi
lea    0xbe9(%rip),%rdi
call   1050 <printf@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x80,%rsp
lea    0xe61(%rip),%rdi
lea    0x3c(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
xor    %eax,%eax
call   10a0 <scanf@plt>
mov    0x8(%rsp),%edi
add    $0x1,%edi
mov    $0x4,%esi
call   1070 <calloc@plt>
mov    %rax,%r15
mov    0xc(%rsp),%edi
mov    $0x8,%esi
call   1070 <calloc@plt>
mov    %rax,%r14
lea    0xe29(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   10a0 <scanf@plt>
movsd  (%r14),%xmm1
cmpl   $0x2,0xc(%rsp)
jl     1269 <main+0xd9>
mov    %r14,%rbx
add    $0x8,%rbx
mov    $0x1,%r13d
lea    0xdff(%rip),%r12
movapd %xmm1,%xmm3
nopw   0x0(%rax,%rax,1)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm3,0x20(%rsp)
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10a0 <scanf@plt>
movsd  (%rbx),%xmm0
movapd %xmm0,%xmm2
maxsd  0x10(%rsp),%xmm2
minsd  0x20(%rsp),%xmm0
add    $0x1,%r13
movslq 0xc(%rsp),%rax
add    $0x8,%rbx
movapd %xmm2,%xmm1
movapd %xmm0,%xmm3
cmp    %rax,%r13
jl     1220 <main+0x90>
jmp    1271 <main+0xe1>
movapd %xmm1,%xmm0
movapd %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
call   10b0 <floor@plt>
movapd %xmm0,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <ceil@plt>
movapd %xmm0,0x10(%rsp)
movapd %xmm0,%xmm1
subsd  0x20(%rsp),%xmm1
movapd %xmm1,0x70(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x8(%rsp),%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,0x40(%rsp)
lea    0x60(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%ecx
mov    0x3c(%rsp),%r8d
movaps 0x20(%rsp),%xmm0
movapd 0x10(%rsp),%xmm1
mov    %r15,%rdi
movaps 0x40(%rsp),%xmm2
mov    %r14,%rdx
call   1090 <parallel_count@plt>
lea    0x50(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
movapd 0x70(%rsp),%xmm0
call   1080 <fabs@plt>
test   %eax,%eax
jle    1362 <main+0x1d2>
lea    0xd0b(%rip),%rbx
nopl   0x0(%rax)
movapd 0x20(%rsp),%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
subsd  0xcd6(%rip),%xmm0
cvttsd2si %xmm0,%rsi
and    %rcx,%rsi
or     %rax,%rsi
mov    %rbx,%rdi
call   1050 <printf@plt>
movapd 0x20(%rsp),%xmm1
addsd  0x40(%rsp),%xmm1
movapd 0x10(%rsp),%xmm0
movapd %xmm1,0x20(%rsp)
subsd  %xmm1,%xmm0
call   1080 <fabs@plt>
test   %eax,%eax
jg     1310 <main+0x180>
movapd 0x10(%rsp),%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
subsd  0xc84(%rip),%xmm0
cvttsd2si %xmm0,%rsi
and    %rcx,%rsi
or     %rax,%rsi
lea    0xc90(%rip),%rdi
call   1050 <printf@plt>
movslq 0x8(%rsp),%rax
cmp    $0x2,%rax
jl     13d0 <main+0x240>
xor    %ebx,%ebx
lea    0xc7e(%rip),%r12
nopw   0x0(%rax,%rax,1)
movslq (%r15,%rbx,4),%rsi
mov    %r12,%rdi
call   1050 <printf@plt>
add    $0x1,%rbx
movslq 0x8(%rsp),%rax
add    $0xffffffffffffffff,%rax
cmp    %rax,%rbx
jl     13b0 <main+0x220>
jmp    13d4 <main+0x244>
add    $0xffffffffffffffff,%rax
movslq (%r15,%rax,4),%rsi
lea    0xc4a(%rip),%rdi
call   1050 <printf@plt>
movslq 0x50(%rsp),%rax
imul   $0xf4240,%rax,%rsi
movslq 0x60(%rsp),%rax
add    0x58(%rsp),%rsi
imul   $0xf4240,%rax,%rax
add    0x68(%rsp),%rax
sub    %rax,%rsi
lea    0xc1d(%rip),%rdi
call   1050 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
@.str = [10 x i8] c" %d %d %d\00"
@.str.1 = [5 x i8] c" %lf\00"
@.str.2 = [7 x i8] c"%.2lf \00"
@.str.3 = [7 x i8] c"%.2lf\0A\00"
@.str.4 = [4 x i8] c"%d \00"
@.str.5 = [4 x i8] c"%d\0A\00"
@.str.6 = [5 x i8] c"%lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.timeval
%7 = alloca %struct.timeval
%8 = alloca i32*
%9 = alloca double*
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca i64
%14 = alloca double
store i32 0, i32* %1
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
%18 = call i64 @calloc(i32 %17, i32 4)
%19 = inttoptr i64 %18 to i32*
store i32* %19, i32** %8
%20 = load i32, i32* %3
%21 = call i64 @calloc(i32 %20, i32 8)
%22 = inttoptr i64 %21 to double*
store double* %22, double** %9
%23 = load double*, double** %9
%24 = getelementptr inbounds double, double* %23, i64 0
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %24)
%26 = load double*, double** %9
%27 = getelementptr inbounds double, double* %26, i64 0
%28 = load double, double* %27
store double %28, double* %11
store double %28, double* %10
store i32 1, i32* %5
br label %29
29: ; preds = %67, %0
%30 = load i32, i32* %5
%31 = load i32, i32* %3
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %70
33: ; preds = %29
%34 = load double*, double** %9
%35 = load i32, i32* %5
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double, double* %34, i64 %36
%38 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %37)
%39 = load double, double* %10
%40 = load double*, double** %9
%41 = load i32, i32* %5
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %40, i64 %42
%44 = load double, double* %43
%45 = fcmp olt double %39, %44
br i1 %45, label %46, label %52
46: ; preds = %33
%47 = load double*, double** %9
%48 = load i32, i32* %5
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %47, i64 %49
%51 = load double, double* %50
store double %51, double* %10
br label %52
52: ; preds = %46, %33
%53 = load double, double* %11
%54 = load double*, double** %9
%55 = load i32, i32* %5
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %54, i64 %56
%58 = load double, double* %57
%59 = fcmp ogt double %53, %58
br i1 %59, label %60, label %66
60: ; preds = %52
%61 = load double*, double** %9
%62 = load i32, i32* %5
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %61, i64 %63
%65 = load double, double* %64
store double %65, double* %11
br label %66
66: ; preds = %60, %52
br label %67
67: ; preds = %66
%68 = load i32, i32* %5
%69 = add nsw i32 %68, 1
store i32 %69, i32* %5
br label %29
70: ; preds = %29
%71 = load double, double* %11
%72 = call double @llvm.floor.f64(double %71)
store double %72, double* %11
%73 = load double, double* %10
%74 = call double @llvm.ceil.f64(double %73)
store double %74, double* %10
%75 = load double, double* %10
%76 = load double, double* %11
%77 = fsub double %75, %76
%78 = load i32, i32* %4
%79 = sitofp i32 %78 to double
%80 = fdiv double %77, %79
store double %80, double* %12
%81 = call i32 @gettimeofday(%struct.timeval* %6, i32* null)
%82 = load double, double* %11
%83 = load double, double* %10
%84 = load i32*, i32** %8
%85 = load i32, i32* %4
%86 = load double, double* %12
%87 = load double*, double** %9
%88 = load i32, i32* %3
%89 = load i32, i32* %2
%90 = call i32 @parallel_count(double %82, double %83, i32* %84, i32 %85, double %86, double* %87, i32 %88, i32 %89)
%91 = call i32 @gettimeofday(%struct.timeval* %7, i32* null)
%92 = load double, double* %11
store double %92, double* %14
br label %93
93: ; preds = %104, %70
%94 = load double, double* %10
%95 = load double, double* %14
%96 = fsub double %94, %95
%97 = call i32 @fabs(double %96)
%98 = sitofp i32 %97 to double
%99 = fcmp ogt double %98, 0x3EB0C6F7A0B5ED8D
br i1 %99, label %100, label %108
100: ; preds = %93
%101 = load double, double* %14
%102 = fptoui double %101 to i64
%103 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i64 %102)
br label %104
104: ; preds = %100
%105 = load double, double* %12
%106 = load double, double* %14
%107 = fadd double %106, %105
store double %107, double* %14
br label %93
108: ; preds = %93
%109 = load double, double* %10
%110 = fptoui double %109 to i64
%111 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i64 %110)
store i32 0, i32* %5
br label %112
112: ; preds = %125, %108
%113 = load i32, i32* %5
%114 = load i32, i32* %4
%115 = sub nsw i32 %114, 1
%116 = icmp slt i32 %113, %115
br i1 %116, label %117, label %128
117: ; preds = %112
%118 = load i32*, i32** %8
%119 = load i32, i32* %5
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i32, i32* %118, i64 %120
%122 = load i32, i32* %121
%123 = sext i32 %122 to i64
%124 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i64 %123)
br label %125
125: ; preds = %117
%126 = load i32, i32* %5
%127 = add nsw i32 %126, 1
store i32 %127, i32* %5
br label %112
128: ; preds = %112
%129 = load i32*, i32** %8
%130 = load i32, i32* %4
%131 = sub nsw i32 %130, 1
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds i32, i32* %129, i64 %132
%134 = load i32, i32* %133
%135 = sext i32 %134 to i64
%136 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i64 %135)
%137 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
%138 = load i32, i32* %137
%139 = mul nsw i32 %138, 1000000
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 1
%142 = load i64, i64* %141
%143 = add i64 %140, %142
%144 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%145 = load i32, i32* %144
%146 = mul nsw i32 %145, 1000000
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 1
%149 = load i64, i64* %148
%150 = add i64 %147, %149
%151 = sub i64 %143, %150
store i64 %151, i64* %13
%152 = load i64, i64* %13
%153 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i64 %152)
%154 = load double*, double** %9
%155 = call i32 @free(double* %154)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
@.str = [10 x i8] c" %d %d %d\00"
@.str.1 = [5 x i8] c" %lf\00"
@.str.2 = [7 x i8] c"%.2lf \00"
@.str.3 = [7 x i8] c"%.2lf\0A\00"
@.str.4 = [4 x i8] c"%d \00"
@.str.5 = [4 x i8] c"%d\0A\00"
@.str.6 = [5 x i8] c"%lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.timeval
%5 = alloca %struct.timeval
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast %struct.timeval* %4 to i8*
%10 = bitcast %struct.timeval* %5 to i8*
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
%14 = call i64 @calloc(i32 %13, i32 4)
%15 = inttoptr i64 %14 to i32*
%16 = load i32, i32* %2
%17 = call i64 @calloc(i32 %16, i32 8)
%18 = inttoptr i64 %17 to double*
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %18)
%20 = load double, double* %18
%21 = load i32, i32* %2
%22 = icmp sgt i32 %21, 1
br i1 %22, label %23, label %38
23: ; preds = %0, %23
%24 = phi i64 [ %34, %23 ], [ 1, %0 ]
%25 = phi double [ %31, %23 ], [ %20, %0 ]
%26 = phi double [ %33, %23 ], [ %20, %0 ]
%27 = getelementptr inbounds double, double* %18, i64 %24
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %27)
%29 = load double, double* %27
%30 = fcmp olt double %25, %29
%31 = select i1 %30, double %29, double %25
%32 = fcmp ogt double %26, %29
%33 = select i1 %32, double %29, double %26
%34 = add nuw nsw i64 %24, 1
%35 = load i32, i32* %2
%36 = sext i32 %35 to i64
%37 = icmp slt i64 %34, %36
br i1 %37, label %23, label %38
38: ; preds = %23, %0
%39 = phi double [ %20, %0 ], [ %33, %23 ]
%40 = phi double [ %20, %0 ], [ %31, %23 ]
%41 = call double @llvm.floor.f64(double %39)
%42 = call double @llvm.ceil.f64(double %40)
%43 = fsub double %42, %41
%44 = load i32, i32* %3
%45 = sitofp i32 %44 to double
%46 = fdiv double %43, %45
%47 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%48 = load i32, i32* %3
%49 = load i32, i32* %2
%50 = load i32, i32* %1
%51 = call i32 @parallel_count(double %41, double %42, i32* %15, i32 %48, double %46, double* %18, i32 %49, i32 %50)
%52 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%53 = call i32 @fabs(double %43)
%54 = icmp sgt i32 %53, 0
br i1 %54, label %55, label %63
55: ; preds = %38, %55
%56 = phi double [ %59, %55 ], [ %41, %38 ]
%57 = fptoui double %56 to i64
%58 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i64 %57)
%59 = fadd double %46, %56
%60 = fsub double %42, %59
%61 = call i32 @fabs(double %60)
%62 = icmp sgt i32 %61, 0
br i1 %62, label %55, label %63
63: ; preds = %55, %38
%64 = fptoui double %42 to i64
%65 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i64 %64)
%66 = load i32, i32* %3
%67 = icmp sgt i32 %66, 1
br i1 %67, label %71, label %68
68: ; preds = %63
%69 = add nsw i32 %66, -1
%70 = sext i32 %69 to i64
br label %82
71: ; preds = %63, %71
%72 = phi i64 [ %77, %71 ], [ 0, %63 ]
%73 = getelementptr inbounds i32, i32* %15, i64 %72
%74 = load i32, i32* %73
%75 = sext i32 %74 to i64
%76 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i64 %75)
%77 = add nuw nsw i64 %72, 1
%78 = load i32, i32* %3
%79 = add nsw i32 %78, -1
%80 = sext i32 %79 to i64
%81 = icmp slt i64 %77, %80
br i1 %81, label %71, label %82
82: ; preds = %71, %68
%83 = phi i64 [ %70, %68 ], [ %80, %71 ]
%84 = getelementptr inbounds i32, i32* %15, i64 %83
%85 = load i32, i32* %84
%86 = sext i32 %85 to i64
%87 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i64 %86)
%88 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 0
%89 = load i32, i32* %88
%90 = mul nsw i32 %89, 1000000
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%93 = load i64, i64* %92
%94 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 0
%95 = load i32, i32* %94
%96 = mul nsw i32 %95, 1000000
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 1
%99 = load i64, i64* %98
%100 = add i64 %93, %91
%101 = add i64 %99, %97
%102 = sub i64 %100, %101
%103 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i64 %102)
%104 = call i32 @free(double* %18)
ret i32 0
}