int R_edgeBlendTetDrv(int *index, double *L, double drv[]) {
  double r = L[0], s = L[1], t = L[2];
  if ((index[0] == 0 && index[1] == 1) || (index[0] == 1 && index[1] == 0)) {
    drv[0] = -2.0 * s;
    drv[1] = -2.0 * r;
    drv[2] = 0.0;
  } else if ((index[0] == 0 && index[1] == 3) ||
             (index[0] == 3 && index[1] == 0)) {
    drv[0] = -2.0 + 4.0 * r + 2.0 * s + 2.0 * t;
    drv[1] = 2.0 * r;
    drv[2] = 2.0 * r;
  } else if ((index[0] == 1 && index[1] == 2) ||
             (index[0] == 2 && index[1] == 1)) {
    drv[0] = 0.0;
    drv[1] = -2.0 * t;
    drv[2] = -2.0 * s;
  } else if ((index[0] == 1 && index[1] == 3) ||
             (index[0] == 3 && index[1] == 1)) {
    drv[0] = 2.0 * s;
    drv[1] = -2.0 + 2.0 * r + 4.0 * s + 2.0 * t;
    drv[2] = 2.0 * s;
  } else if ((index[0] == 2 && index[1] == 0) ||
             (index[0] == 0 && index[1] == 2)) {
    drv[0] = -2.0 * t;
    drv[1] = 0.0;
    drv[2] = -2.0 * r;
  } else if ((index[0] == 2 && index[1] == 3) ||
             (index[0] == 3 && index[1] == 2)) {
    drv[0] = 2.0 * t;
    drv[1] = 2.0 * t;
    drv[2] = -2.0 + 2.0 * r + 2.0 * s + 4.0 * t;
  } else
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<R_edgeBlendTetDrv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1154 <R_edgeBlendTetDrv+0x54>
mov    -0x10(%rbp),%rax
cmpl   $0x1,0x4(%rax)
je     116f <R_edgeBlendTetDrv+0x6f>
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
jne    11ab <R_edgeBlendTetDrv+0xab>
mov    -0x10(%rbp),%rax
cmpl   $0x0,0x4(%rax)
jne    11ab <R_edgeBlendTetDrv+0xab>
movsd  0xe91(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xe7c(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
jmp    14a6 <R_edgeBlendTetDrv+0x3a6>
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    11c6 <R_edgeBlendTetDrv+0xc6>
mov    -0x10(%rbp),%rax
cmpl   $0x3,0x4(%rax)
je     11e1 <R_edgeBlendTetDrv+0xe1>
mov    -0x10(%rbp),%rax
cmpl   $0x3,(%rax)
jne    1251 <R_edgeBlendTetDrv+0x151>
mov    -0x10(%rbp),%rax
cmpl   $0x0,0x4(%rax)
jne    1251 <R_edgeBlendTetDrv+0x151>
movsd  -0x28(%rbp),%xmm0
movsd  0xe12(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe0e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xde8(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  0xdd2(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
jmp    14a1 <R_edgeBlendTetDrv+0x3a1>
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
jne    126c <R_edgeBlendTetDrv+0x16c>
mov    -0x10(%rbp),%rax
cmpl   $0x2,0x4(%rax)
je     1287 <R_edgeBlendTetDrv+0x187>
mov    -0x10(%rbp),%rax
cmpl   $0x2,(%rax)
jne    12c3 <R_edgeBlendTetDrv+0x1c3>
mov    -0x10(%rbp),%rax
cmpl   $0x1,0x4(%rax)
jne    12c3 <R_edgeBlendTetDrv+0x1c3>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movsd  0xd6e(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  0xd58(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
jmp    149c <R_edgeBlendTetDrv+0x39c>
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
jne    12de <R_edgeBlendTetDrv+0x1de>
mov    -0x10(%rbp),%rax
cmpl   $0x3,0x4(%rax)
je     12f9 <R_edgeBlendTetDrv+0x1f9>
mov    -0x10(%rbp),%rax
cmpl   $0x3,(%rax)
jne    1369 <R_edgeBlendTetDrv+0x269>
mov    -0x10(%rbp),%rax
cmpl   $0x1,0x4(%rax)
jne    1369 <R_edgeBlendTetDrv+0x269>
movsd  0xd0f(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xce9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  0xcd0(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  0xcba(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
jmp    1497 <R_edgeBlendTetDrv+0x397>
mov    -0x10(%rbp),%rax
cmpl   $0x2,(%rax)
jne    1384 <R_edgeBlendTetDrv+0x284>
mov    -0x10(%rbp),%rax
cmpl   $0x0,0x4(%rax)
je     139f <R_edgeBlendTetDrv+0x29f>
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    13db <R_edgeBlendTetDrv+0x2db>
mov    -0x10(%rbp),%rax
cmpl   $0x2,0x4(%rax)
jne    13db <R_edgeBlendTetDrv+0x2db>
movsd  0xc61(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
movsd  0xc40(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
jmp    1492 <R_edgeBlendTetDrv+0x392>
mov    -0x10(%rbp),%rax
cmpl   $0x2,(%rax)
jne    13f6 <R_edgeBlendTetDrv+0x2f6>
mov    -0x10(%rbp),%rax
cmpl   $0x3,0x4(%rax)
je     1411 <R_edgeBlendTetDrv+0x311>
mov    -0x10(%rbp),%rax
cmpl   $0x3,(%rax)
jne    1481 <R_edgeBlendTetDrv+0x381>
mov    -0x10(%rbp),%rax
cmpl   $0x2,0x4(%rax)
jne    1481 <R_edgeBlendTetDrv+0x381>
movsd  0xbf7(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xbe2(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x28(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xbbb(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  0xb95(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
jmp    148d <R_edgeBlendTetDrv+0x38d>
movl   $0x0,-0x4(%rbp)
jmp    14ad <R_edgeBlendTetDrv+0x3ad>
jmp    1492 <R_edgeBlendTetDrv+0x392>
jmp    1497 <R_edgeBlendTetDrv+0x397>
jmp    149c <R_edgeBlendTetDrv+0x39c>
jmp    14a1 <R_edgeBlendTetDrv+0x3a1>
jmp    14a6 <R_edgeBlendTetDrv+0x3a6>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<R_edgeBlendTetDrv>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    $0x3,%rcx
ja     113d <R_edgeBlendTetDrv+0x3d>
movupd (%rsi),%xmm0
movsd  0x10(%rsi),%xmm1
lea    0xf06(%rip),%rsi
movslq (%rsi,%rcx,4),%rcx
add    %rsi,%rcx
jmp    *%rcx
mov    0x4(%rdi),%ecx
cmp    $0x1,%ecx
je     1153 <R_edgeBlendTetDrv+0x53>
cmp    $0x2,%ecx
je     1202 <R_edgeBlendTetDrv+0x102>
cmp    $0x3,%ecx
je     11c4 <R_edgeBlendTetDrv+0xc4>
ret
mov    0x4(%rdi),%ecx
cmp    $0x3,%ecx
je     125b <R_edgeBlendTetDrv+0x15b>
cmp    $0x2,%ecx
je     1186 <R_edgeBlendTetDrv+0x86>
test   %ecx,%ecx
jne    113d <R_edgeBlendTetDrv+0x3d>
mulpd  0xeb5(%rip),%xmm0
shufpd $0x1,%xmm0,%xmm0
movupd %xmm0,(%rdx)
xorpd  %xmm0,%xmm0
jmp    1298 <R_edgeBlendTetDrv+0x198>
mov    0x4(%rdi),%ecx
test   %ecx,%ecx
je     1202 <R_edgeBlendTetDrv+0x102>
cmp    $0x3,%ecx
je     1220 <R_edgeBlendTetDrv+0x120>
cmp    $0x1,%ecx
jne    113d <R_edgeBlendTetDrv+0x3d>
movq   $0x0,(%rdx)
movsd  0xe6b(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rdx)
unpckhpd %xmm0,%xmm0
mulsd  %xmm2,%xmm0
jmp    1298 <R_edgeBlendTetDrv+0x198>
mov    0x4(%rdi),%ecx
cmp    $0x2,%ecx
je     1220 <R_edgeBlendTetDrv+0x120>
cmp    $0x1,%ecx
je     125b <R_edgeBlendTetDrv+0x15b>
test   %ecx,%ecx
jne    113d <R_edgeBlendTetDrv+0x3d>
movsd  0xe3c(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xe28(%rip),%xmm2
movapd %xmm0,%xmm3
unpckhpd %xmm0,%xmm3
addsd  %xmm3,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm1,%xmm1
addsd  %xmm3,%xmm1
movsd  %xmm1,(%rdx)
addsd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rdx)
jmp    1298 <R_edgeBlendTetDrv+0x198>
movsd  0xdf6(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  %xmm1,(%rdx)
movq   $0x0,0x8(%rdx)
mulsd  %xmm2,%xmm0
jmp    1298 <R_edgeBlendTetDrv+0x198>
movapd %xmm1,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,(%rdx)
movsd  %xmm2,0x8(%rdx)
movapd %xmm0,%xmm2
addsd  %xmm0,%xmm2
addsd  0xdbf(%rip),%xmm2
unpckhpd %xmm0,%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
mulsd  0xdb3(%rip),%xmm1
addsd  %xmm1,%xmm0
jmp    1298 <R_edgeBlendTetDrv+0x198>
movapd %xmm0,%xmm2
unpckhpd %xmm0,%xmm2
movapd %xmm2,%xmm3
addsd  %xmm2,%xmm3
movsd  %xmm3,(%rdx)
addsd  %xmm0,%xmm0
addsd  0xd85(%rip),%xmm0
mulsd  0xd85(%rip),%xmm2
addsd  %xmm0,%xmm2
addsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rdx)
movapd %xmm3,%xmm0
movsd  %xmm0,0x10(%rdx)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @R_edgeBlendTetDrv(i32* %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32* %0, i32** %5
store double* %1, double** %6
store double* %2, double** %7
%11 = load double*, double** %6
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
store double %13, double* %8
%14 = load double*, double** %6
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
store double %16, double* %9
%17 = load double*, double** %6
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
store double %19, double* %10
%20 = load i32*, i32** %5
%21 = getelementptr inbounds i32, i32* %20, i64 0
%22 = load i32, i32* %21
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %29
24: ; preds = %3
%25 = load i32*, i32** %5
%26 = getelementptr inbounds i32, i32* %25, i64 1
%27 = load i32, i32* %26
%28 = icmp eq i32 %27, 1
br i1 %28, label %39, label %29
29: ; preds = %24, %3
%30 = load i32*, i32** %5
%31 = getelementptr inbounds i32, i32* %30, i64 0
%32 = load i32, i32* %31
%33 = icmp eq i32 %32, 1
br i1 %33, label %34, label %50
34: ; preds = %29
%35 = load i32*, i32** %5
%36 = getelementptr inbounds i32, i32* %35, i64 1
%37 = load i32, i32* %36
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %50
39: ; preds = %34, %24
%40 = load double, double* %9
%41 = fmul double -2.000000e+00, %40
%42 = load double*, double** %7
%43 = getelementptr inbounds double, double* %42, i64 0
store double %41, double* %43
%44 = load double, double* %8
%45 = fmul double -2.000000e+00, %44
%46 = load double*, double** %7
%47 = getelementptr inbounds double, double* %46, i64 1
store double %45, double* %47
%48 = load double*, double** %7
%49 = getelementptr inbounds double, double* %48, i64 2
store double 0.000000e+00, double* %49
br label %229
50: ; preds = %34, %29
%51 = load i32*, i32** %5
%52 = getelementptr inbounds i32, i32* %51, i64 0
%53 = load i32, i32* %52
%54 = icmp eq i32 %53, 0
br i1 %54, label %55, label %60
55: ; preds = %50
%56 = load i32*, i32** %5
%57 = getelementptr inbounds i32, i32* %56, i64 1
%58 = load i32, i32* %57
%59 = icmp eq i32 %58, 3
br i1 %59, label %70, label %60
60: ; preds = %55, %50
%61 = load i32*, i32** %5
%62 = getelementptr inbounds i32, i32* %61, i64 0
%63 = load i32, i32* %62
%64 = icmp eq i32 %63, 3
br i1 %64, label %65, label %87
65: ; preds = %60
%66 = load i32*, i32** %5
%67 = getelementptr inbounds i32, i32* %66, i64 1
%68 = load i32, i32* %67
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %87
70: ; preds = %65, %55
%71 = load double, double* %8
%72 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %71, double -2.000000e+00)
%73 = load double, double* %9
%74 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %73, double %72)
%75 = load double, double* %10
%76 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %75, double %74)
%77 = load double*, double** %7
%78 = getelementptr inbounds double, double* %77, i64 0
store double %76, double* %78
%79 = load double, double* %8
%80 = fmul double 2.000000e+00, %79
%81 = load double*, double** %7
%82 = getelementptr inbounds double, double* %81, i64 1
store double %80, double* %82
%83 = load double, double* %8
%84 = fmul double 2.000000e+00, %83
%85 = load double*, double** %7
%86 = getelementptr inbounds double, double* %85, i64 2
store double %84, double* %86
br label %228
87: ; preds = %65, %60
%88 = load i32*, i32** %5
%89 = getelementptr inbounds i32, i32* %88, i64 0
%90 = load i32, i32* %89
%91 = icmp eq i32 %90, 1
br i1 %91, label %92, label %97
92: ; preds = %87
%93 = load i32*, i32** %5
%94 = getelementptr inbounds i32, i32* %93, i64 1
%95 = load i32, i32* %94
%96 = icmp eq i32 %95, 2
br i1 %96, label %107, label %97
97: ; preds = %92, %87
%98 = load i32*, i32** %5
%99 = getelementptr inbounds i32, i32* %98, i64 0
%100 = load i32, i32* %99
%101 = icmp eq i32 %100, 2
br i1 %101, label %102, label %118
102: ; preds = %97
%103 = load i32*, i32** %5
%104 = getelementptr inbounds i32, i32* %103, i64 1
%105 = load i32, i32* %104
%106 = icmp eq i32 %105, 1
br i1 %106, label %107, label %118
107: ; preds = %102, %92
%108 = load double*, double** %7
%109 = getelementptr inbounds double, double* %108, i64 0
store double 0.000000e+00, double* %109
%110 = load double, double* %10
%111 = fmul double -2.000000e+00, %110
%112 = load double*, double** %7
%113 = getelementptr inbounds double, double* %112, i64 1
store double %111, double* %113
%114 = load double, double* %9
%115 = fmul double -2.000000e+00, %114
%116 = load double*, double** %7
%117 = getelementptr inbounds double, double* %116, i64 2
store double %115, double* %117
br label %227
118: ; preds = %102, %97
%119 = load i32*, i32** %5
%120 = getelementptr inbounds i32, i32* %119, i64 0
%121 = load i32, i32* %120
%122 = icmp eq i32 %121, 1
br i1 %122, label %123, label %128
123: ; preds = %118
%124 = load i32*, i32** %5
%125 = getelementptr inbounds i32, i32* %124, i64 1
%126 = load i32, i32* %125
%127 = icmp eq i32 %126, 3
br i1 %127, label %138, label %128
128: ; preds = %123, %118
%129 = load i32*, i32** %5
%130 = getelementptr inbounds i32, i32* %129, i64 0
%131 = load i32, i32* %130
%132 = icmp eq i32 %131, 3
br i1 %132, label %133, label %155
133: ; preds = %128
%134 = load i32*, i32** %5
%135 = getelementptr inbounds i32, i32* %134, i64 1
%136 = load i32, i32* %135
%137 = icmp eq i32 %136, 1
br i1 %137, label %138, label %155
138: ; preds = %133, %123
%139 = load double, double* %9
%140 = fmul double 2.000000e+00, %139
%141 = load double*, double** %7
%142 = getelementptr inbounds double, double* %141, i64 0
store double %140, double* %142
%143 = load double, double* %8
%144 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %143, double -2.000000e+00)
%145 = load double, double* %9
%146 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %145, double %144)
%147 = load double, double* %10
%148 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %147, double %146)
%149 = load double*, double** %7
%150 = getelementptr inbounds double, double* %149, i64 1
store double %148, double* %150
%151 = load double, double* %9
%152 = fmul double 2.000000e+00, %151
%153 = load double*, double** %7
%154 = getelementptr inbounds double, double* %153, i64 2
store double %152, double* %154
br label %226
155: ; preds = %133, %128
%156 = load i32*, i32** %5
%157 = getelementptr inbounds i32, i32* %156, i64 0
%158 = load i32, i32* %157
%159 = icmp eq i32 %158, 2
br i1 %159, label %160, label %165
160: ; preds = %155
%161 = load i32*, i32** %5
%162 = getelementptr inbounds i32, i32* %161, i64 1
%163 = load i32, i32* %162
%164 = icmp eq i32 %163, 0
br i1 %164, label %175, label %165
165: ; preds = %160, %155
%166 = load i32*, i32** %5
%167 = getelementptr inbounds i32, i32* %166, i64 0
%168 = load i32, i32* %167
%169 = icmp eq i32 %168, 0
br i1 %169, label %170, label %186
170: ; preds = %165
%171 = load i32*, i32** %5
%172 = getelementptr inbounds i32, i32* %171, i64 1
%173 = load i32, i32* %172
%174 = icmp eq i32 %173, 2
br i1 %174, label %175, label %186
175: ; preds = %170, %160
%176 = load double, double* %10
%177 = fmul double -2.000000e+00, %176
%178 = load double*, double** %7
%179 = getelementptr inbounds double, double* %178, i64 0
store double %177, double* %179
%180 = load double*, double** %7
%181 = getelementptr inbounds double, double* %180, i64 1
store double 0.000000e+00, double* %181
%182 = load double, double* %8
%183 = fmul double -2.000000e+00, %182
%184 = load double*, double** %7
%185 = getelementptr inbounds double, double* %184, i64 2
store double %183, double* %185
br label %225
186: ; preds = %170, %165
%187 = load i32*, i32** %5
%188 = getelementptr inbounds i32, i32* %187, i64 0
%189 = load i32, i32* %188
%190 = icmp eq i32 %189, 2
br i1 %190, label %191, label %196
191: ; preds = %186
%192 = load i32*, i32** %5
%193 = getelementptr inbounds i32, i32* %192, i64 1
%194 = load i32, i32* %193
%195 = icmp eq i32 %194, 3
br i1 %195, label %206, label %196
196: ; preds = %191, %186
%197 = load i32*, i32** %5
%198 = getelementptr inbounds i32, i32* %197, i64 0
%199 = load i32, i32* %198
%200 = icmp eq i32 %199, 3
br i1 %200, label %201, label %223
201: ; preds = %196
%202 = load i32*, i32** %5
%203 = getelementptr inbounds i32, i32* %202, i64 1
%204 = load i32, i32* %203
%205 = icmp eq i32 %204, 2
br i1 %205, label %206, label %223
206: ; preds = %201, %191
%207 = load double, double* %10
%208 = fmul double 2.000000e+00, %207
%209 = load double*, double** %7
%210 = getelementptr inbounds double, double* %209, i64 0
store double %208, double* %210
%211 = load double, double* %10
%212 = fmul double 2.000000e+00, %211
%213 = load double*, double** %7
%214 = getelementptr inbounds double, double* %213, i64 1
store double %212, double* %214
%215 = load double, double* %8
%216 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %215, double -2.000000e+00)
%217 = load double, double* %9
%218 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %217, double %216)
%219 = load double, double* %10
%220 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %219, double %218)
%221 = load double*, double** %7
%222 = getelementptr inbounds double, double* %221, i64 2
store double %220, double* %222
br label %224
223: ; preds = %201, %196
store i32 0, i32* %4
br label %230
224: ; preds = %206
br label %225
225: ; preds = %224, %175
br label %226
226: ; preds = %225, %138
br label %227
227: ; preds = %226, %107
br label %228
228: ; preds = %227, %70
br label %229
229: ; preds = %228, %39
store i32 1, i32* %4
br label %230
230: ; preds = %229, %223
%231 = load i32, i32* %4
ret i32 %231
}

LLVM IR (-O2):
define i32 @R_edgeBlendTetDrv(i32* %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = bitcast double* %1 to <2 x double>*
%5 = load <2 x double>, <2 x double>* %4
%6 = getelementptr inbounds double, double* %1, i64 2
%7 = load double, double* %6
%8 = load i32, i32* %0
switch i32 %8, label %62 [
i32 0, label %9
i32 1, label %12
i32 3, label %19
i32 2, label %30
]
9: ; preds = %3
%10 = getelementptr inbounds i32, i32* %0, i64 1
%11 = load i32, i32* %10
switch i32 %11, label %62 [
i32 1, label %15
i32 3, label %22
i32 2, label %46
]
12: ; preds = %3
%13 = getelementptr inbounds i32, i32* %0, i64 1
%14 = load i32, i32* %13
switch i32 %14, label %62 [
i32 0, label %15
i32 2, label %33
i32 3, label %38
]
15: ; preds = %9, %12
%16 = fmul <2 x double> %5, <double -2.000000e+00, double -2.000000e+00>
%17 = shufflevector <2 x double> %16, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%18 = bitcast double* %2 to <2 x double>*
store <2 x double> %17, <2 x double>* %18
br label %59
19: ; preds = %3
%20 = getelementptr inbounds i32, i32* %0, i64 1
%21 = load i32, i32* %20
switch i32 %21, label %62 [
i32 0, label %22
i32 1, label %38
i32 2, label %51
]
22: ; preds = %19, %9
%23 = extractelement <2 x double> %5, i64 0
%24 = tail call double @llvm.fmuladd.f64(double %23, double 4.000000e+00, double -2.000000e+00)
%25 = extractelement <2 x double> %5, i64 1
%26 = tail call double @llvm.fmuladd.f64(double %25, double 2.000000e+00, double %24)
%27 = tail call double @llvm.fmuladd.f64(double %7, double 2.000000e+00, double %26)
store double %27, double* %2
%28 = fmul double %23, 2.000000e+00
%29 = getelementptr inbounds double, double* %2, i64 1
store double %28, double* %29
br label %59
30: ; preds = %3
%31 = getelementptr inbounds i32, i32* %0, i64 1
%32 = load i32, i32* %31
switch i32 %32, label %62 [
i32 1, label %33
i32 0, label %46
i32 3, label %51
]
33: ; preds = %30, %12
store double 0.000000e+00, double* %2
%34 = fmul double %7, -2.000000e+00
%35 = getelementptr inbounds double, double* %2, i64 1
store double %34, double* %35
%36 = extractelement <2 x double> %5, i64 1
%37 = fmul double %36, -2.000000e+00
br label %59
38: ; preds = %19, %12
%39 = extractelement <2 x double> %5, i64 1
%40 = fmul double %39, 2.000000e+00
store double %40, double* %2
%41 = extractelement <2 x double> %5, i64 0
%42 = tail call double @llvm.fmuladd.f64(double %41, double 2.000000e+00, double -2.000000e+00)
%43 = tail call double @llvm.fmuladd.f64(double %39, double 4.000000e+00, double %42)
%44 = tail call double @llvm.fmuladd.f64(double %7, double 2.000000e+00, double %43)
%45 = getelementptr inbounds double, double* %2, i64 1
store double %44, double* %45
br label %59
46: ; preds = %30, %9
%47 = fmul double %7, -2.000000e+00
store double %47, double* %2
%48 = getelementptr inbounds double, double* %2, i64 1
store double 0.000000e+00, double* %48
%49 = extractelement <2 x double> %5, i64 0
%50 = fmul double %49, -2.000000e+00
br label %59
51: ; preds = %19, %30
%52 = fmul double %7, 2.000000e+00
store double %52, double* %2
%53 = getelementptr inbounds double, double* %2, i64 1
store double %52, double* %53
%54 = extractelement <2 x double> %5, i64 0
%55 = tail call double @llvm.fmuladd.f64(double %54, double 2.000000e+00, double -2.000000e+00)
%56 = extractelement <2 x double> %5, i64 1
%57 = tail call double @llvm.fmuladd.f64(double %56, double 2.000000e+00, double %55)
%58 = tail call double @llvm.fmuladd.f64(double %7, double 4.000000e+00, double %57)
br label %59
59: ; preds = %22, %38, %51, %46, %33, %15
%60 = phi double [ 0.000000e+00, %15 ], [ %37, %33 ], [ %50, %46 ], [ %58, %51 ], [ %40, %38 ], [ %28, %22 ]
%61 = getelementptr inbounds double, double* %2, i64 2
store double %60, double* %61
br label %62
62: ; preds = %59, %19, %30, %9, %12, %3
%63 = phi i32 [ 0, %3 ], [ 0, %12 ], [ 0, %9 ], [ 0, %30 ], [ 0, %19 ], [ 1, %59 ]
ret i32 %63
}