#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 */
scalar_t__ F_normale_centree_reduite(double);
double fabs(scalar_t__);
int /*<<< orphan*/ printf(char *, ...);
double sqrt(double);
int test_ajustement_distribution_gaussienne(int nb_valeurs, double *valeurs,
                                            double moyenne, double ecart_type) {
  int i;
  double Dn, difference_courante, seuil;
  double valeurs_limite_risque_01[100] = {
      0.995,   0.92929, 0.829,   0.73424, 0.66853, 0.61661, 0.57581, 0.54179,
      0.51332, 0.48893, 0.4677,  0.44905, 0.43247, 0.41762, 0.40420, 0.39201,
      0.38086, 0.37062, 0.36117, 0.35241, 0.34427, 0.33666, 0.32954, 0.32286,
      0.31657, 0.31064, 0.30502, 0.29971, 0.29466, 0.28987, 0.2853,  0.28094,
      0.27677, 0.27279, 0.26897, 0.26532, 0.26180, 0.25843, 0.25518, 0.25205,
      0.24904, 0.24613, 0.24332, 0.2406,  0.23798, 0.23544, 0.23298, 0.23059,
      0.22828, 0.22604, 0.22386, 0.22174, 0.21968, 0.21768, 0.21574, 0.21384,
      0.21199, 0.21019, 0.20844, 0.20673, 0.20506, 0.20343, 0.20184, 0.20029,
      0.19877, 0.19729, 0.19584, 0.19442, 0.19303, 0.19167, 0.19034, 0.18903,
      0.18776, 0.1865,  0.18528, 0.18408, 0.18290, 0.18174, 0.18060, 0.17949,
      0.1784,  0.17732, 0.17627, 0.17523, 0.17421, 0.17321, 0.17223, 0.17126,
      0.17031, 0.16938, 0.16846, 0.16755, 0.16666, 0.16579, 0.16493, 0.16408,
      0.16324, 0.16242, 0.16161, 0.16081};
  printf("debut\n");
  Dn = 0;
  for (i = 0; i < nb_valeurs; i++) {
    if (valeurs[i] > moyenne) {
      break;
    }
    difference_courante =
        fabs(F_normale_centree_reduite((valeurs[i] - moyenne) / ecart_type) -
             ((double)nb_valeurs - (double)i) / (double)nb_valeurs);
    if (difference_courante > Dn) {
      Dn = difference_courante;
    }
  }
  if (nb_valeurs > 100) {
    seuil = 1.629 / sqrt((double)nb_valeurs);
  } else {
    seuil = valeurs_limite_risque_01[nb_valeurs - 1];
  }
  printf("seuil: %f\n", seuil);
  printf("Dn: %f\n", Dn);
  printf("fin\n");
  if (Dn > seuil) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<test_ajustement_distribution_gaussienne>:
push   %rbp
mov    %rsp,%rbp
sub    $0x360,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
lea    -0x360(%rbp),%rdi
lea    0xe96(%rip),%rsi
mov    $0x320,%edx
call   1050 <memcpy@plt>
lea    0x11a5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1242 <test_ajustement_distribution_gaussienne+0xf2>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11ca <test_ajustement_distribution_gaussienne+0x7a>
jmp    1242 <test_ajustement_distribution_gaussienne+0xf2>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
call   1070 <F_normale_centree_reduite@plt>
cvtsi2sd %rax,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
cvtsi2sdl -0x24(%rbp),%xmm2
subsd  %xmm2,%xmm1
cvtsi2sdl -0x8(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1040 <fabs@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    122f <test_ajustement_distribution_gaussienne+0xdf>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1234 <test_ajustement_distribution_gaussienne+0xe4>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11a1 <test_ajustement_distribution_gaussienne+0x51>
cmpl   $0x64,-0x8(%rbp)
jle    126f <test_ajustement_distribution_gaussienne+0x11f>
cvtsi2sdl -0x8(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xd9f(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    1285 <test_ajustement_distribution_gaussienne+0x135>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x360(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
lea    0x10a6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x30(%rbp),%xmm0
lea    0x109e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0x1098(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x30(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    12d5 <test_ajustement_distribution_gaussienne+0x185>
movl   $0x0,-0x4(%rbp)
jmp    12dc <test_ajustement_distribution_gaussienne+0x18c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x360,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ajustement_distribution_gaussienne>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %rsi,%rbx
mov    %edi,%r14d
lea    0x11d0(%rip),%rdi
call   1030 <puts@plt>
test   %r14d,%r14d
jle    120a <test_ajustement_distribution_gaussienne+0xba>
mov    %r14d,%r15d
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
movsd  %xmm0,0x18(%rsp)
xorpd  %xmm2,%xmm2
xor    %ebp,%ebp
movsd  0x10(%rsp),%xmm1
xchg   %ax,%ax
movsd  (%rbx,%rbp,8),%xmm0
ucomisd %xmm1,%xmm0
ja     1216 <test_ajustement_distribution_gaussienne+0xc6>
subsd  %xmm1,%xmm0
divsd  0x20(%rsp),%xmm0
movsd  %xmm2,0x8(%rsp)
call   1070 <F_normale_centree_reduite@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
movsd  0x18(%rsp),%xmm3
movapd %xmm3,%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm0
cvttsd2si %xmm0,%rdi
call   1050 <fabs@plt>
movsd  0x10(%rsp),%xmm1
maxsd  0x8(%rsp),%xmm0
add    $0x1,%rbp
movapd %xmm0,%xmm2
cmp    %rbp,%r15
jne    11a0 <test_ajustement_distribution_gaussienne+0x50>
jmp    121a <test_ajustement_distribution_gaussienne+0xca>
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
jmp    123e <test_ajustement_distribution_gaussienne+0xee>
movapd %xmm2,%xmm0
cmp    $0x65,%r14d
movsd  %xmm0,0x8(%rsp)
jl     123e <test_ajustement_distribution_gaussienne+0xee>
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1250 <test_ajustement_distribution_gaussienne+0x100>
sqrtsd %xmm0,%xmm0
jmp    1255 <test_ajustement_distribution_gaussienne+0x105>
movslq %r14d,%rax
lea    0xdc8(%rip),%rcx
movsd  -0x8(%rcx,%rax,8),%xmm1
jmp    1261 <test_ajustement_distribution_gaussienne+0x111>
call   1060 <sqrt@plt>
movsd  0xda3(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
lea    0x10c2(%rip),%rdi
movapd %xmm1,%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0x10bb(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0x10b5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
movsd  0x8(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
setbe  %al
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.test_ajustement_distribution_gaussienne.valeurs_limite_risque_01 = [100 x double] [double 0x3FEFD70A3D70A3D7, double 0x3FEDBCBE61CFFEB0, double 0x3FEA872B020C49BA, double 7.342400e-01, double 6.685300e-01, double 6.166100e-01, double 5.758100e-01, double 5.417900e-01, double 5.133200e-01, double 4.889300e-01, double 4.677000e-01, double 4.490500e-01, double 4.324700e-01, double 4.176200e-01, double 4.042000e-01, double 3.920100e-01, double 3.808600e-01, double 3.706200e-01, double 3.611700e-01, double 3.524100e-01, double 3.442700e-01, double 3.366600e-01, double 3.295400e-01, double 3.228600e-01, double 3.165700e-01, double 3.106400e-01, double 3.050200e-01, double 2.997100e-01, double 2.946600e-01, double 2.898700e-01, double 2.853000e-01, double 2.809400e-01, double 2.767700e-01, double 2.727900e-01, double 2.689700e-01, double 2.653200e-01, double 2.618000e-01, double 2.584300e-01, double 2.551800e-01, double 2.520500e-01, double 2.490400e-01, double 2.461300e-01, double 2.433200e-01, double 2.406000e-01, double 2.379800e-01, double 2.354400e-01, double 2.329800e-01, double 2.305900e-01, double 2.282800e-01, double 2.260400e-01, double 2.238600e-01, double 2.217400e-01, double 2.196800e-01, double 2.176800e-01, double 2.157400e-01, double 2.138400e-01, double 2.119900e-01, double 2.101900e-01, double 2.084400e-01, double 2.067300e-01, double 2.050600e-01, double 2.034300e-01, double 2.018400e-01, double 2.002900e-01, double 1.987700e-01, double 1.972900e-01, double 1.958400e-01, double 1.944200e-01, double 1.930300e-01, double 1.916700e-01, double 1.903400e-01, double 1.890300e-01, double 1.877600e-01, double 1.865000e-01, double 1.852800e-01, double 1.840800e-01, double 1.829000e-01, double 1.817400e-01, double 1.806000e-01, double 1.794900e-01, double 1.784000e-01, double 1.773200e-01, double 1.762700e-01, double 1.752300e-01, double 1.742100e-01, double 1.732100e-01, double 1.722300e-01, double 1.712600e-01, double 1.703100e-01, double 1.693800e-01, double 1.684600e-01, double 1.675500e-01, double 1.666600e-01, double 1.657900e-01, double 1.649300e-01, double 1.640800e-01, double 1.632400e-01, double 1.624200e-01, double 1.616100e-01, double 1.608100e-01]
@.str = [7 x i8] c"debut\0A\00"
@.str.1 = [11 x i8] c"seuil: %f\0A\00"
@.str.2 = [8 x i8] c"Dn: %f\0A\00"
@.str.3 = [5 x i8] c"fin\0A\00"
define i32 @test_ajustement_distribution_gaussienne(i32 %0, double* %1, double %2, double %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca [100 x double]
store i32 %0, i32* %6
store double* %1, double** %7
store double %2, double* %8
store double %3, double* %9
%15 = bitcast [100 x double]* %14 to i8*
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store double 0.000000e+00, double* %11
store i32 0, i32* %10
br label %17
17: ; preds = %59, %4
%18 = load i32, i32* %10
%19 = load i32, i32* %6
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %62
21: ; preds = %17
%22 = load double*, double** %7
%23 = load i32, i32* %10
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %22, i64 %24
%26 = load double, double* %25
%27 = load double, double* %8
%28 = fcmp ogt double %26, %27
br i1 %28, label %29, label %30
29: ; preds = %21
br label %62
30: ; preds = %21
%31 = load double*, double** %7
%32 = load i32, i32* %10
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds double, double* %31, i64 %33
%35 = load double, double* %34
%36 = load double, double* %8
%37 = fsub double %35, %36
%38 = load double, double* %9
%39 = fdiv double %37, %38
%40 = call i64 @F_normale_centree_reduite(double %39)
%41 = sitofp i64 %40 to double
%42 = load i32, i32* %6
%43 = sitofp i32 %42 to double
%44 = load i32, i32* %10
%45 = sitofp i32 %44 to double
%46 = fsub double %43, %45
%47 = load i32, i32* %6
%48 = sitofp i32 %47 to double
%49 = fdiv double %46, %48
%50 = fsub double %41, %49
%51 = fptosi double %50 to i64
%52 = call double @fabs(i64 %51)
store double %52, double* %12
%53 = load double, double* %12
%54 = load double, double* %11
%55 = fcmp ogt double %53, %54
br i1 %55, label %56, label %58
56: ; preds = %30
%57 = load double, double* %12
store double %57, double* %11
br label %58
58: ; preds = %56, %30
br label %59
59: ; preds = %58
%60 = load i32, i32* %10
%61 = add nsw i32 %60, 1
store i32 %61, i32* %10
br label %17
62: ; preds = %29, %17
%63 = load i32, i32* %6
%64 = icmp sgt i32 %63, 100
br i1 %64, label %65, label %70
65: ; preds = %62
%66 = load i32, i32* %6
%67 = sitofp i32 %66 to double
%68 = call double @sqrt(double %67)
%69 = fdiv double 1.629000e+00, %68
store double %69, double* %13
br label %76
70: ; preds = %62
%71 = load i32, i32* %6
%72 = sub nsw i32 %71, 1
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [100 x double], [100 x double]* %14, i64 0, i64 %73
%75 = load double, double* %74
store double %75, double* %13
br label %76
76: ; preds = %70, %65
%77 = load double, double* %13
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), double %77)
%79 = load double, double* %11
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %79)
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%82 = load double, double* %11
%83 = load double, double* %13
%84 = fcmp ogt double %82, %83
br i1 %84, label %85, label %86
85: ; preds = %76
store i32 0, i32* %5
br label %87
86: ; preds = %76
store i32 1, i32* %5
br label %87
87: ; preds = %86, %85
%88 = load i32, i32* %5
ret i32 %88
}

LLVM IR (-O2):
@__const.test_ajustement_distribution_gaussienne.valeurs_limite_risque_01 = [100 x double] [double 0x3FEFD70A3D70A3D7, double 0x3FEDBCBE61CFFEB0, double 0x3FEA872B020C49BA, double 7.342400e-01, double 6.685300e-01, double 6.166100e-01, double 5.758100e-01, double 5.417900e-01, double 5.133200e-01, double 4.889300e-01, double 4.677000e-01, double 4.490500e-01, double 4.324700e-01, double 4.176200e-01, double 4.042000e-01, double 3.920100e-01, double 3.808600e-01, double 3.706200e-01, double 3.611700e-01, double 3.524100e-01, double 3.442700e-01, double 3.366600e-01, double 3.295400e-01, double 3.228600e-01, double 3.165700e-01, double 3.106400e-01, double 3.050200e-01, double 2.997100e-01, double 2.946600e-01, double 2.898700e-01, double 2.853000e-01, double 2.809400e-01, double 2.767700e-01, double 2.727900e-01, double 2.689700e-01, double 2.653200e-01, double 2.618000e-01, double 2.584300e-01, double 2.551800e-01, double 2.520500e-01, double 2.490400e-01, double 2.461300e-01, double 2.433200e-01, double 2.406000e-01, double 2.379800e-01, double 2.354400e-01, double 2.329800e-01, double 2.305900e-01, double 2.282800e-01, double 2.260400e-01, double 2.238600e-01, double 2.217400e-01, double 2.196800e-01, double 2.176800e-01, double 2.157400e-01, double 2.138400e-01, double 2.119900e-01, double 2.101900e-01, double 2.084400e-01, double 2.067300e-01, double 2.050600e-01, double 2.034300e-01, double 2.018400e-01, double 2.002900e-01, double 1.987700e-01, double 1.972900e-01, double 1.958400e-01, double 1.944200e-01, double 1.930300e-01, double 1.916700e-01, double 1.903400e-01, double 1.890300e-01, double 1.877600e-01, double 1.865000e-01, double 1.852800e-01, double 1.840800e-01, double 1.829000e-01, double 1.817400e-01, double 1.806000e-01, double 1.794900e-01, double 1.784000e-01, double 1.773200e-01, double 1.762700e-01, double 1.752300e-01, double 1.742100e-01, double 1.732100e-01, double 1.722300e-01, double 1.712600e-01, double 1.703100e-01, double 1.693800e-01, double 1.684600e-01, double 1.675500e-01, double 1.666600e-01, double 1.657900e-01, double 1.649300e-01, double 1.640800e-01, double 1.632400e-01, double 1.624200e-01, double 1.616100e-01, double 1.608100e-01]
@.str.1 = [11 x i8] c"seuil: %f\0A\00"
@.str.2 = [8 x i8] c"Dn: %f\0A\00"
@str = [6 x i8] c"debut\00"
@str.4 = [4 x i8] c"fin\00"
define i32 @test_ajustement_distribution_gaussienne(i32 %0, double* nocapture %1, double %2, double %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%6 = icmp sgt i32 %0, 0
br i1 %6, label %7, label %39
7: ; preds = %4
%8 = sitofp i32 %0 to double
%9 = zext i32 %0 to i64
br label %10
10: ; preds = %7, %16
%11 = phi i64 [ 0, %7 ], [ %30, %16 ]
%12 = phi double [ 0.000000e+00, %7 ], [ %29, %16 ]
%13 = getelementptr inbounds double, double* %1, i64 %11
%14 = load double, double* %13
%15 = fcmp ogt double %14, %2
br i1 %15, label %32, label %16
16: ; preds = %10
%17 = fsub double %14, %2
%18 = fdiv double %17, %3
%19 = tail call i64 @F_normale_centree_reduite(double %18)
%20 = sitofp i64 %19 to double
%21 = trunc i64 %11 to i32
%22 = sitofp i32 %21 to double
%23 = fsub double %8, %22
%24 = fdiv double %23, %8
%25 = fsub double %20, %24
%26 = fptosi double %25 to i64
%27 = tail call double @fabs(i64 %26)
%28 = fcmp ogt double %27, %12
%29 = select i1 %28, double %27, double %12
%30 = add nuw nsw i64 %11, 1
%31 = icmp eq i64 %30, %9
br i1 %31, label %32, label %10
32: ; preds = %16, %10
%33 = phi double [ %29, %16 ], [ %12, %10 ]
%34 = icmp sgt i32 %0, 100
br i1 %34, label %35, label %39
35: ; preds = %32
%36 = sitofp i32 %0 to double
%37 = tail call double @sqrt(double %36)
%38 = fdiv double 1.629000e+00, %37
br label %45
39: ; preds = %4, %32
%40 = phi double [ %33, %32 ], [ 0.000000e+00, %4 ]
%41 = add nsw i32 %0, -1
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [100 x double], [100 x double]* @__const.test_ajustement_distribution_gaussienne.valeurs_limite_risque_01, i64 0, i64 %42
%44 = load double, double* %43
br label %45
45: ; preds = %39, %35
%46 = phi double [ %33, %35 ], [ %40, %39 ]
%47 = phi double [ %38, %35 ], [ %44, %39 ]
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), double %47)
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %46)
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.4, i64 0, i64 0))
%51 = fcmp ule double %46, %47
%52 = zext i1 %51 to i32
ret i32 %52
}