int outputToClass(double **outputVector) {
  double maxPredict = 0;
  int indxPredict = 0;
  for (int i = 0; i < 10; i++) {
    if (outputVector[i][0] > maxPredict) {
      maxPredict = outputVector[i][0];
      indxPredict = i;
    }
  }
  return indxPredict;
}


x86 assembly (clang, -O0):
<outputToClass>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0xa,-0x18(%rbp)
jge    1171 <outputToClass+0x71>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  (%rax),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    115e <outputToClass+0x5e>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1163 <outputToClass+0x63>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111e <outputToClass+0x1e>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<outputToClass>:
mov    (%rdi),%rax
mov    0x8(%rdi),%rcx
movsd  (%rax),%xmm0
xorpd  %xmm1,%xmm1
maxsd  %xmm1,%xmm0
movsd  (%rcx),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
maxsd  %xmm0,%xmm1
mov    0x10(%rdi),%rcx
movsd  (%rcx),%xmm0
ucomisd %xmm1,%xmm0
maxsd  %xmm1,%xmm0
mov    $0x2,%ecx
cmovbe %eax,%ecx
mov    0x18(%rdi),%rax
movsd  (%rax),%xmm1
ucomisd %xmm0,%xmm1
mov    $0x3,%eax
cmovbe %ecx,%eax
maxsd  %xmm0,%xmm1
mov    0x20(%rdi),%rcx
movsd  (%rcx),%xmm0
ucomisd %xmm1,%xmm0
maxsd  %xmm1,%xmm0
mov    $0x4,%ecx
cmovbe %eax,%ecx
mov    0x28(%rdi),%rax
movsd  (%rax),%xmm1
ucomisd %xmm0,%xmm1
maxsd  %xmm0,%xmm1
mov    $0x5,%eax
cmovbe %ecx,%eax
mov    0x30(%rdi),%rcx
movsd  (%rcx),%xmm0
ucomisd %xmm1,%xmm0
mov    $0x6,%ecx
cmovbe %eax,%ecx
maxsd  %xmm1,%xmm0
mov    0x38(%rdi),%rax
movsd  (%rax),%xmm1
ucomisd %xmm0,%xmm1
maxsd  %xmm0,%xmm1
mov    $0x7,%eax
cmovbe %ecx,%eax
mov    0x40(%rdi),%rcx
movsd  (%rcx),%xmm0
ucomisd %xmm1,%xmm0
maxsd  %xmm1,%xmm0
mov    $0x8,%ecx
cmovbe %eax,%ecx
mov    0x48(%rdi),%rax
movsd  (%rax),%xmm1
ucomisd %xmm0,%xmm1
mov    $0x9,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @outputToClass(double** %0) {
%2 = alloca double**
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
store double** %0, double*** %2
store double 0.000000e+00, double* %3
store i32 0, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %29, %1
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %32
9: ; preds = %6
%10 = load double**, double*** %2
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds double*, double** %10, i64 %12
%14 = load double*, double** %13
%15 = getelementptr inbounds double, double* %14, i64 0
%16 = load double, double* %15
%17 = load double, double* %3
%18 = fcmp ogt double %16, %17
br i1 %18, label %19, label %28
19: ; preds = %9
%20 = load double**, double*** %2
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double*, double** %20, i64 %22
%24 = load double*, double** %23
%25 = getelementptr inbounds double, double* %24, i64 0
%26 = load double, double* %25
store double %26, double* %3
%27 = load i32, i32* %5
store i32 %27, i32* %4
br label %28
28: ; preds = %19, %9
br label %29
29: ; preds = %28
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %6
32: ; preds = %6
%33 = load i32, i32* %4
ret i32 %33
}

LLVM IR (-O2):
define i32 @outputToClass(double** nocapture %0) {
%2 = load double*, double** %0
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
%5 = select i1 %4, double %3, double 0.000000e+00
%6 = getelementptr inbounds double*, double** %0, i64 1
%7 = load double*, double** %6
%8 = load double, double* %7
%9 = fcmp ogt double %8, %5
%10 = select i1 %9, double %8, double %5
%11 = zext i1 %9 to i32
%12 = getelementptr inbounds double*, double** %0, i64 2
%13 = load double*, double** %12
%14 = load double, double* %13
%15 = fcmp ogt double %14, %10
%16 = select i1 %15, double %14, double %10
%17 = select i1 %15, i32 2, i32 %11
%18 = getelementptr inbounds double*, double** %0, i64 3
%19 = load double*, double** %18
%20 = load double, double* %19
%21 = fcmp ogt double %20, %16
%22 = select i1 %21, double %20, double %16
%23 = select i1 %21, i32 3, i32 %17
%24 = getelementptr inbounds double*, double** %0, i64 4
%25 = load double*, double** %24
%26 = load double, double* %25
%27 = fcmp ogt double %26, %22
%28 = select i1 %27, double %26, double %22
%29 = select i1 %27, i32 4, i32 %23
%30 = getelementptr inbounds double*, double** %0, i64 5
%31 = load double*, double** %30
%32 = load double, double* %31
%33 = fcmp ogt double %32, %28
%34 = select i1 %33, double %32, double %28
%35 = select i1 %33, i32 5, i32 %29
%36 = getelementptr inbounds double*, double** %0, i64 6
%37 = load double*, double** %36
%38 = load double, double* %37
%39 = fcmp ogt double %38, %34
%40 = select i1 %39, double %38, double %34
%41 = select i1 %39, i32 6, i32 %35
%42 = getelementptr inbounds double*, double** %0, i64 7
%43 = load double*, double** %42
%44 = load double, double* %43
%45 = fcmp ogt double %44, %40
%46 = select i1 %45, double %44, double %40
%47 = select i1 %45, i32 7, i32 %41
%48 = getelementptr inbounds double*, double** %0, i64 8
%49 = load double*, double** %48
%50 = load double, double* %49
%51 = fcmp ogt double %50, %46
%52 = select i1 %51, double %50, double %46
%53 = select i1 %51, i32 8, i32 %47
%54 = getelementptr inbounds double*, double** %0, i64 9
%55 = load double*, double** %54
%56 = load double, double* %55
%57 = fcmp ogt double %56, %52
%58 = select i1 %57, i32 9, i32 %53
ret i32 %58
}