void applyVankaFacesColor_FP64_INT64(long long *rowptr, double *valA,
                                     long long *colA, long long *n,
                                     long long *nf, long long dim, double *x,
                                     double *b, float *D, long long numit,
                                     long long includePressure,
                                     long long blockSize, long long num_cells,
                                     long long VankaType) {
#pragma omp parallel shared(x, rowptr, valA, colA, n, nf, dim, b, D, numit)
  {
    int color;
    long long k, i, cellSizeInD;
    cellSizeInD =
        (VankaType == 1) ? blockSize * blockSize : (3 * (blockSize - 1) + 1);
    long long *Idxs = (long long *)malloc(blockSize * sizeof(long long));
    long long *i_vec = (long long *)malloc(dim * sizeof(long long));
    double *local_r = (double *)malloc(blockSize * sizeof(double));
    for (k = 0; k < numit; ++k) {
      for (color = 1; color <= 2; ++color) {
#pragma omp for
        for (i = 1; i <= num_cells; ++i) {
          cs2loc(i, n, dim, i_vec);
          if (cellColor(i_vec, dim) == color) {
            getVankaVariablesOfCell(i_vec, n, nf, Idxs, includePressure, dim);
            computeResidualAtIdx_FP64_INT64(rowptr, valA, colA, b, x, Idxs,
                                            local_r, blockSize);
            if (VankaType == 1) {
              updateSolution_FP64(D + (i - 1) * cellSizeInD, x, local_r,
                                  blockSize, Idxs);
            } else {
              updateSolutionEconomic_FP64(D + (i - 1) * cellSizeInD, x, local_r,
                                          blockSize, Idxs);
            }
          }
        }
      }
    }
    free(Idxs);
    free(i_vec);
    free(local_r);
  }
  return;
}


x86 assembly (clang, -O0):
<applyVankaFacesColor_FP64_INT64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpq   $0x1,0x48(%rbp)
jne    11e0 <applyVankaFacesColor_FP64_INT64+0x60>
mov    0x38(%rbp),%rax
imul   0x38(%rbp),%rax
mov    %rax,-0x70(%rbp)
jmp    11f4 <applyVankaFacesColor_FP64_INT64+0x74>
mov    0x38(%rbp),%rax
sub    $0x1,%rax
imul   $0x3,%rax,%rax
add    $0x1,%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    0x38(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x30(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x60(%rbp)
mov    0x38(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x68(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmp    0x28(%rbp),%rax
jge    139c <applyVankaFacesColor_FP64_INT64+0x21c>
movl   $0x1,-0x34(%rbp)
cmpl   $0x2,-0x34(%rbp)
jg     1386 <applyVankaFacesColor_FP64_INT64+0x206>
movq   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    0x40(%rbp),%rax
jg     1373 <applyVankaFacesColor_FP64_INT64+0x1f3>
mov    -0x48(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x60(%rbp),%rcx
mov    $0x0,%al
call   1050 <cs2loc@plt>
mov    -0x60(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1090 <cellColor@plt>
cmp    -0x34(%rbp),%eax
jne    135d <applyVankaFacesColor_FP64_INT64+0x1dd>
mov    -0x60(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x58(%rbp),%rcx
mov    0x30(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    $0x0,%al
call   10a0 <getVankaVariablesOfCell@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x18(%rbp),%rcx
mov    0x10(%rbp),%r8
mov    -0x58(%rbp),%r9
mov    -0x68(%rbp),%r10
mov    0x38(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1080 <computeResidualAtIdx_FP64_INT64@plt>
cmpq   $0x1,0x48(%rbp)
jne    1329 <applyVankaFacesColor_FP64_INT64+0x1a9>
mov    0x20(%rbp),%rdi
mov    -0x48(%rbp),%rax
sub    $0x1,%rax
imul   -0x50(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    0x10(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    0x38(%rbp),%rcx
mov    -0x58(%rbp),%r8
mov    $0x0,%al
call   1040 <updateSolution_FP64@plt>
jmp    1358 <applyVankaFacesColor_FP64_INT64+0x1d8>
mov    0x20(%rbp),%rdi
mov    -0x48(%rbp),%rax
sub    $0x1,%rax
imul   -0x50(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    0x10(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    0x38(%rbp),%rcx
mov    -0x58(%rbp),%r8
mov    $0x0,%al
call   1060 <updateSolutionEconomic_FP64@plt>
jmp    135d <applyVankaFacesColor_FP64_INT64+0x1dd>
jmp    1362 <applyVankaFacesColor_FP64_INT64+0x1e2>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    125e <applyVankaFacesColor_FP64_INT64+0xde>
jmp    1378 <applyVankaFacesColor_FP64_INT64+0x1f8>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    124c <applyVankaFacesColor_FP64_INT64+0xcc>
jmp    138b <applyVankaFacesColor_FP64_INT64+0x20b>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1237 <applyVankaFacesColor_FP64_INT64+0xb7>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<applyVankaFacesColor_FP64_INT64>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r9,%r15
mov    %r8,0x78(%rsp)
mov    %rcx,0x10(%rsp)
mov    %rdx,0x70(%rsp)
mov    %rsi,0x68(%rsp)
mov    %rdi,0x60(%rsp)
mov    0x108(%rsp),%rcx
mov    0x100(%rsp),%rax
mov    %rax,0x18(%rsp)
mov    0xf8(%rsp),%rdx
mov    0xf0(%rsp),%rax
mov    %rax,0x48(%rsp)
mov    0xe8(%rsp),%rbp
mov    0xe0(%rsp),%rax
mov    %rax,0x30(%rsp)
mov    0xd8(%rsp),%rax
mov    %rax,0x40(%rsp)
mov    %rdx,%rax
imul   %rdx,%rax
mov    %rcx,0x58(%rsp)
cmp    $0x1,%rcx
lea    -0x2(%rdx,%rdx,2),%rcx
cmove  %rax,%rcx
mov    %rcx,0x28(%rsp)
mov    0xd0(%rsp),%r14
mov    %rdx,0x50(%rsp)
lea    0x0(,%rdx,8),%rbx
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,%r12
lea    0x0(,%r15,8),%rdi
call   1070 <malloc@plt>
mov    %rax,%r13
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %rbp,0x88(%rsp)
test   %rbp,%rbp
jle    14cd <applyVankaFacesColor_FP64_INT64+0x34d>
mov    0x18(%rsp),%rax
neg    %rax
mov    %rax,0x80(%rsp)
shlq   $0x2,0x28(%rsp)
xor    %eax,%eax
mov    %r15,0x8(%rsp)
mov    %r13,(%rsp)
mov    %r14,0x38(%rsp)
jmp    12aa <applyVankaFacesColor_FP64_INT64+0x12a>
nopl   (%rax)
mov    0x90(%rsp),%rax
add    $0x1,%rax
cmp    0x88(%rsp),%rax
je     14cd <applyVankaFacesColor_FP64_INT64+0x34d>
mov    %rax,0x90(%rsp)
cmpq   $0x0,0x18(%rsp)
jle    1290 <applyVankaFacesColor_FP64_INT64+0x110>
mov    $0x1,%ebp
mov    0x30(%rsp),%r14
jmp    1314 <applyVankaFacesColor_FP64_INT64+0x194>
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
xor    %eax,%eax
call   1060 <updateSolutionEconomic_FP64@plt>
mov    %r15,%r12
mov    0x8(%rsp),%r15
mov    (%rsp),%r13
mov    0x80(%rsp),%rax
add    %rbp,%rax
add    $0x1,%rax
add    $0x1,%rbp
add    0x28(%rsp),%r14
cmp    $0x1,%rax
je     13c0 <applyVankaFacesColor_FP64_INT64+0x240>
mov    %rbp,%rdi
mov    0x10(%rsp),%rsi
mov    %r15,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1050 <cs2loc@plt>
mov    %r13,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <cellColor@plt>
cmp    $0x1,%eax
jne    12f2 <applyVankaFacesColor_FP64_INT64+0x172>
mov    %r13,%rdi
mov    0x10(%rsp),%rsi
mov    0x78(%rsp),%rdx
mov    %r12,%rcx
mov    0x48(%rsp),%r8
mov    %r15,%r9
xor    %eax,%eax
call   10a0 <getVankaVariablesOfCell@plt>
mov    0x60(%rsp),%rdi
mov    0x68(%rsp),%rsi
mov    0x70(%rsp),%rdx
mov    0x40(%rsp),%rcx
mov    0x38(%rsp),%rbx
mov    %rbx,%r8
mov    %r12,%r9
xor    %eax,%eax
mov    %r12,%r15
mov    0x50(%rsp),%r12
push   %r12
mov    0x28(%rsp),%r13
push   %r13
call   1080 <computeResidualAtIdx_FP64_INT64@plt>
add    $0x10,%rsp
cmpq   $0x1,0x58(%rsp)
jne    12d0 <applyVankaFacesColor_FP64_INT64+0x150>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
xor    %eax,%eax
call   1040 <updateSolution_FP64@plt>
jmp    12e6 <applyVankaFacesColor_FP64_INT64+0x166>
nopl   0x0(%rax)
cmpq   $0x0,0x18(%rsp)
mov    0x38(%rsp),%r14
jle    1290 <applyVankaFacesColor_FP64_INT64+0x110>
mov    $0x1,%ebp
mov    0x30(%rsp),%rbx
jmp    1427 <applyVankaFacesColor_FP64_INT64+0x2a7>
nopl   (%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %r14,%rcx
mov    %r15,%r8
xor    %eax,%eax
call   1040 <updateSolution_FP64@plt>
mov    %r12,%r14
mov    %r15,%r12
mov    0x8(%rsp),%r15
mov    (%rsp),%r13
mov    0x80(%rsp),%rax
add    %rbp,%rax
add    $0x1,%rax
add    $0x1,%rbp
add    0x28(%rsp),%rbx
cmp    $0x1,%rax
je     1290 <applyVankaFacesColor_FP64_INT64+0x110>
mov    %rbp,%rdi
mov    0x10(%rsp),%rsi
mov    %r15,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1050 <cs2loc@plt>
mov    %r13,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <cellColor@plt>
cmp    $0x2,%eax
jne    1405 <applyVankaFacesColor_FP64_INT64+0x285>
mov    %r13,%rdi
mov    0x10(%rsp),%rsi
mov    0x78(%rsp),%rdx
mov    %r12,%rcx
mov    0x48(%rsp),%r8
mov    %r15,%r9
xor    %eax,%eax
call   10a0 <getVankaVariablesOfCell@plt>
mov    0x60(%rsp),%rdi
mov    0x68(%rsp),%rsi
mov    0x70(%rsp),%rdx
mov    0x40(%rsp),%rcx
mov    %r14,%r8
mov    %r12,%r9
xor    %eax,%eax
mov    %r12,%r15
mov    %r14,%r12
mov    0x50(%rsp),%r14
push   %r14
mov    0x28(%rsp),%r13
push   %r13
call   1080 <computeResidualAtIdx_FP64_INT64@plt>
add    $0x10,%rsp
cmpq   $0x1,0x58(%rsp)
je     13e0 <applyVankaFacesColor_FP64_INT64+0x260>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %r14,%rcx
mov    %r15,%r8
xor    %eax,%eax
call   1060 <updateSolutionEconomic_FP64@plt>
jmp    13f6 <applyVankaFacesColor_FP64_INT64+0x276>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @applyVankaFacesColor_FP64_INT64(i64* %0, double* %1, i64* %2, i64* %3, i64* %4, i64 %5, double* %6, double* %7, float* %8, i64 %9, i64 %10, i64 %11, i64 %12, i64 %13) {
%15 = alloca i64*
%16 = alloca double*
%17 = alloca i64*
%18 = alloca i64*
%19 = alloca i64*
%20 = alloca i64
%21 = alloca double*
%22 = alloca double*
%23 = alloca float*
%24 = alloca i64
%25 = alloca i64
%26 = alloca i64
%27 = alloca i64
%28 = alloca i64
%29 = alloca i32
%30 = alloca i64
%31 = alloca i64
%32 = alloca i64
%33 = alloca i64*
%34 = alloca i64*
%35 = alloca double*
store i64* %0, i64** %15
store double* %1, double** %16
store i64* %2, i64** %17
store i64* %3, i64** %18
store i64* %4, i64** %19
store i64 %5, i64* %20
store double* %6, double** %21
store double* %7, double** %22
store float* %8, float** %23
store i64 %9, i64* %24
store i64 %10, i64* %25
store i64 %11, i64* %26
store i64 %12, i64* %27
store i64 %13, i64* %28
%36 = load i64, i64* %28
%37 = icmp eq i64 %36, 1
br i1 %37, label %38, label %42
38: ; preds = %14
%39 = load i64, i64* %26
%40 = load i64, i64* %26
%41 = mul nsw i64 %39, %40
br label %47
42: ; preds = %14
%43 = load i64, i64* %26
%44 = sub nsw i64 %43, 1
%45 = mul nsw i64 3, %44
%46 = add nsw i64 %45, 1
br label %47
47: ; preds = %42, %38
%48 = phi i64 [ %41, %38 ], [ %46, %42 ]
store i64 %48, i64* %32
%49 = load i64, i64* %26
%50 = mul i64 %49, 8
%51 = call i8* @malloc(i64 %50)
%52 = bitcast i8* %51 to i64*
store i64* %52, i64** %33
%53 = load i64, i64* %20
%54 = mul i64 %53, 8
%55 = call i8* @malloc(i64 %54)
%56 = bitcast i8* %55 to i64*
store i64* %56, i64** %34
%57 = load i64, i64* %26
%58 = mul i64 %57, 8
%59 = call i8* @malloc(i64 %58)
%60 = bitcast i8* %59 to double*
store double* %60, double** %35
store i64 0, i64* %30
br label %61
61: ; preds = %138, %47
%62 = load i64, i64* %30
%63 = load i64, i64* %24
%64 = icmp slt i64 %62, %63
br i1 %64, label %65, label %141
65: ; preds = %61
store i32 1, i32* %29
br label %66
66: ; preds = %134, %65
%67 = load i32, i32* %29
%68 = icmp sle i32 %67, 2
br i1 %68, label %69, label %137
69: ; preds = %66
store i64 1, i64* %31
br label %70
70: ; preds = %130, %69
%71 = load i64, i64* %31
%72 = load i64, i64* %27
%73 = icmp sle i64 %71, %72
br i1 %73, label %74, label %133
74: ; preds = %70
%75 = load i64, i64* %31
%76 = load i64*, i64** %18
%77 = load i64, i64* %20
%78 = load i64*, i64** %34
%79 = call i32 (i64, i64*, i64, i64*, ...) bitcast (i32 (...)* @cs2loc to i32 (i64, i64*, i64, i64*, ...)*)(i64 %75, i64* %76, i64 %77, i64* %78)
%80 = load i64*, i64** %34
%81 = load i64, i64* %20
%82 = call i32 (i64*, i64, ...) bitcast (i32 (...)* @cellColor to i32 (i64*, i64, ...)*)(i64* %80, i64 %81)
%83 = load i32, i32* %29
%84 = icmp eq i32 %82, %83
br i1 %84, label %85, label %129
85: ; preds = %74
%86 = load i64*, i64** %34
%87 = load i64*, i64** %18
%88 = load i64*, i64** %19
%89 = load i64*, i64** %33
%90 = load i64, i64* %25
%91 = load i64, i64* %20
%92 = call i32 (i64*, i64*, i64*, i64*, i64, i64, ...) bitcast (i32 (...)* @getVankaVariablesOfCell to i32 (i64*, i64*, i64*, i64*, i64, i64, ...)*)(i64* %86, i64* %87, i64* %88, i64* %89, i64 %90, i64 %91)
%93 = load i64*, i64** %15
%94 = load double*, double** %16
%95 = load i64*, i64** %17
%96 = load double*, double** %22
%97 = load double*, double** %21
%98 = load i64*, i64** %33
%99 = load double*, double** %35
%100 = load i64, i64* %26
%101 = call i32 (i64*, double*, i64*, double*, double*, i64*, double*, i64, ...) bitcast (i32 (...)* @computeResidualAtIdx_FP64_INT64 to i32 (i64*, double*, i64*, double*, double*, i64*, double*, i64, ...)*)(i64* %93, double* %94, i64* %95, double* %96, double* %97, i64* %98, double* %99, i64 %100)
%102 = load i64, i64* %28
%103 = icmp eq i64 %102, 1
br i1 %103, label %104, label %116
104: ; preds = %85
%105 = load float*, float** %23
%106 = load i64, i64* %31
%107 = sub nsw i64 %106, 1
%108 = load i64, i64* %32
%109 = mul nsw i64 %107, %108
%110 = getelementptr inbounds float, float* %105, i64 %109
%111 = load double*, double** %21
%112 = load double*, double** %35
%113 = load i64, i64* %26
%114 = load i64*, i64** %33
%115 = call i32 (float*, double*, double*, i64, i64*, ...) bitcast (i32 (...)* @updateSolution_FP64 to i32 (float*, double*, double*, i64, i64*, ...)*)(float* %110, double* %111, double* %112, i64 %113, i64* %114)
br label %128
116: ; preds = %85
%117 = load float*, float** %23
%118 = load i64, i64* %31
%119 = sub nsw i64 %118, 1
%120 = load i64, i64* %32
%121 = mul nsw i64 %119, %120
%122 = getelementptr inbounds float, float* %117, i64 %121
%123 = load double*, double** %21
%124 = load double*, double** %35
%125 = load i64, i64* %26
%126 = load i64*, i64** %33
%127 = call i32 (float*, double*, double*, i64, i64*, ...) bitcast (i32 (...)* @updateSolutionEconomic_FP64 to i32 (float*, double*, double*, i64, i64*, ...)*)(float* %122, double* %123, double* %124, i64 %125, i64* %126)
br label %128
128: ; preds = %116, %104
br label %129
129: ; preds = %128, %74
br label %130
130: ; preds = %129
%131 = load i64, i64* %31
%132 = add nsw i64 %131, 1
store i64 %132, i64* %31
br label %70
133: ; preds = %70
br label %134
134: ; preds = %133
%135 = load i32, i32* %29
%136 = add nsw i32 %135, 1
store i32 %136, i32* %29
br label %66
137: ; preds = %66
br label %138
138: ; preds = %137
%139 = load i64, i64* %30
%140 = add nsw i64 %139, 1
store i64 %140, i64* %30
br label %61
141: ; preds = %61
%142 = load i64*, i64** %33
%143 = bitcast i64* %142 to i8*
%144 = load i64*, i64** %34
%145 = bitcast i64* %144 to i8*
%146 = load double*, double** %35
%147 = bitcast double* %146 to i8*
ret void
}

LLVM IR (-O2):
define void @applyVankaFacesColor_FP64_INT64(i64* %0, double* %1, i64* %2, i64* %3, i64* %4, i64 %5, double* %6, double* %7, float* %8, i64 %9, i64 %10, i64 %11, i64 %12, i64 %13) {
%15 = icmp eq i64 %13, 1
%16 = mul nsw i64 %11, %11
%17 = mul i64 %11, 3
%18 = add i64 %17, -2
%19 = select i1 %15, i64 %16, i64 %18
%20 = shl i64 %11, 3
%21 = tail call i8* @malloc(i64 %20)
%22 = bitcast i8* %21 to i64*
%23 = shl i64 %5, 3
%24 = tail call i8* @malloc(i64 %23)
%25 = bitcast i8* %24 to i64*
%26 = tail call i8* @malloc(i64 %20)
%27 = bitcast i8* %26 to double*
%28 = icmp sgt i64 %9, 0
br i1 %28, label %29, label %73
29: ; preds = %14
%30 = icmp slt i64 %12, 1
br label %31
31: ; preds = %29, %70
%32 = phi i64 [ 0, %29 ], [ %71, %70 ]
br i1 %30, label %70, label %33
33: ; preds = %31, %48
%34 = phi i64 [ %49, %48 ], [ 1, %31 ]
%35 = tail call i32 (i64, i64*, i64, i64*, ...) bitcast (i32 (...)* @cs2loc to i32 (i64, i64*, i64, i64*, ...)*)(i64 %34, i64* %3, i64 %5, i64* %25)
%36 = tail call i32 (i64*, i64, ...) bitcast (i32 (...)* @cellColor to i32 (i64*, i64, ...)*)(i64* %25, i64 %5)
%37 = icmp eq i32 %36, 1
br i1 %37, label %38, label %48
38: ; preds = %33
%39 = tail call i32 (i64*, i64*, i64*, i64*, i64, i64, ...) bitcast (i32 (...)* @getVankaVariablesOfCell to i32 (i64*, i64*, i64*, i64*, i64, i64, ...)*)(i64* %25, i64* %3, i64* %4, i64* %22, i64 %10, i64 %5)
%40 = tail call i32 (i64*, double*, i64*, double*, double*, i64*, double*, i64, ...) bitcast (i32 (...)* @computeResidualAtIdx_FP64_INT64 to i32 (i64*, double*, i64*, double*, double*, i64*, double*, i64, ...)*)(i64* %0, double* %1, i64* %2, double* %7, double* %6, i64* %22, double* %27, i64 %11)
%41 = add nsw i64 %34, -1
%42 = mul nsw i64 %41, %19
%43 = getelementptr inbounds float, float* %8, i64 %42
br i1 %15, label %44, label %46
44: ; preds = %38
%45 = tail call i32 (float*, double*, double*, i64, i64*, ...) bitcast (i32 (...)* @updateSolution_FP64 to i32 (float*, double*, double*, i64, i64*, ...)*)(float* %43, double* %6, double* %27, i64 %11, i64* %22)
br label %48
46: ; preds = %38
%47 = tail call i32 (float*, double*, double*, i64, i64*, ...) bitcast (i32 (...)* @updateSolutionEconomic_FP64 to i32 (float*, double*, double*, i64, i64*, ...)*)(float* %43, double* %6, double* %27, i64 %11, i64* %22)
br label %48
48: ; preds = %33, %46, %44
%49 = add nuw i64 %34, 1
%50 = icmp eq i64 %34, %12
br i1 %50, label %51, label %33
51: ; preds = %48
br i1 %30, label %70, label %52
52: ; preds = %51, %67
%53 = phi i64 [ %68, %67 ], [ 1, %51 ]
%54 = tail call i32 (i64, i64*, i64, i64*, ...) bitcast (i32 (...)* @cs2loc to i32 (i64, i64*, i64, i64*, ...)*)(i64 %53, i64* %3, i64 %5, i64* %25)
%55 = tail call i32 (i64*, i64, ...) bitcast (i32 (...)* @cellColor to i32 (i64*, i64, ...)*)(i64* %25, i64 %5)
%56 = icmp eq i32 %55, 2
br i1 %56, label %57, label %67
57: ; preds = %52
%58 = tail call i32 (i64*, i64*, i64*, i64*, i64, i64, ...) bitcast (i32 (...)* @getVankaVariablesOfCell to i32 (i64*, i64*, i64*, i64*, i64, i64, ...)*)(i64* %25, i64* %3, i64* %4, i64* %22, i64 %10, i64 %5)
%59 = tail call i32 (i64*, double*, i64*, double*, double*, i64*, double*, i64, ...) bitcast (i32 (...)* @computeResidualAtIdx_FP64_INT64 to i32 (i64*, double*, i64*, double*, double*, i64*, double*, i64, ...)*)(i64* %0, double* %1, i64* %2, double* %7, double* %6, i64* %22, double* %27, i64 %11)
%60 = add nsw i64 %53, -1
%61 = mul nsw i64 %60, %19
%62 = getelementptr inbounds float, float* %8, i64 %61
br i1 %15, label %65, label %63
63: ; preds = %57
%64 = tail call i32 (float*, double*, double*, i64, i64*, ...) bitcast (i32 (...)* @updateSolutionEconomic_FP64 to i32 (float*, double*, double*, i64, i64*, ...)*)(float* %62, double* %6, double* %27, i64 %11, i64* %22)
br label %67
65: ; preds = %57
%66 = tail call i32 (float*, double*, double*, i64, i64*, ...) bitcast (i32 (...)* @updateSolution_FP64 to i32 (float*, double*, double*, i64, i64*, ...)*)(float* %62, double* %6, double* %27, i64 %11, i64* %22)
br label %67
67: ; preds = %65, %63, %52
%68 = add nuw i64 %53, 1
%69 = icmp eq i64 %53, %12
br i1 %69, label %70, label %52
70: ; preds = %67, %31, %51
%71 = add nuw nsw i64 %32, 1
%72 = icmp eq i64 %71, %9
br i1 %72, label %73, label %31
73: ; preds = %70, %14
tail call void @free(i8* %21)
tail call void @free(i8* %24)
tail call void @free(i8* %26)
ret void
}