; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes/R3Grid.ll (ZNK6R3Grid9GridValueEddd)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.R3Grid = type { %class.R3Affine, %class.R3Affine, double, double, ptr, [3 x i32], i32, i32, i32 }
%class.R3Affine = type { %class.R3Transformation, %class.R4Matrix, %class.R4Matrix, %class.RNFlags }
%class.R3Transformation = type { ptr }
%class.R4Matrix = type { [4 x [4 x double]] }
%class.RNFlags = type { i64 }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK6R3Grid9GridValueEddd(ptr noundef nonnull align 8 dereferenceable(592) %0, double noundef %1, double noundef %2, double noundef %3) #2 align 2 {
  %5 = alloca double, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store double %1, ptr %7, align 8, !tbaa !9
  store double %2, ptr %8, align 8, !tbaa !9
  store double %3, ptr %9, align 8, !tbaa !9
  %20 = load ptr, ptr %6, align 8
  %21 = load double, ptr %7, align 8, !tbaa !9
  %22 = fcmp olt double %21, 0.000000e+00
  br i1 %22, label %31, label %23

23:                                               ; preds = %4
  %24 = load double, ptr %7, align 8, !tbaa !9
  %25 = getelementptr inbounds %class.R3Grid, ptr %20, i32 0, i32 5
  %26 = getelementptr inbounds [3 x i32], ptr %25, i64 0, i64 0
  %27 = load i32, ptr %26, align 8, !tbaa !11
  %28 = sub nsw i32 %27, 1
  %29 = sitofp i32 %28 to double
  %30 = fcmp ogt double %24, %29
  br i1 %30, label %31, label %32

31:                                               ; preds = %23, %4
  store double 0.000000e+00, ptr %5, align 8
  br label %206

32:                                               ; preds = %23
  %33 = load double, ptr %8, align 8, !tbaa !9
  %34 = fcmp olt double %33, 0.000000e+00
  br i1 %34, label %43, label %35

35:                                               ; preds = %32
  %36 = load double, ptr %8, align 8, !tbaa !9
  %37 = getelementptr inbounds %class.R3Grid, ptr %20, i32 0, i32 5
  %38 = getelementptr inbounds [3 x i32], ptr %37, i64 0, i64 1
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %40 = sub nsw i32 %39, 1
  %41 = sitofp i32 %40 to double
  %42 = fcmp ogt double %36, %41
  br i1 %42, label %43, label %44

43:                                               ; preds = %35, %32
  store double 0.000000e+00, ptr %5, align 8
  br label %206

44:                                               ; preds = %35
  %45 = load double, ptr %9, align 8, !tbaa !9
  %46 = fcmp olt double %45, 0.000000e+00
  br i1 %46, label %55, label %47

47:                                               ; preds = %44
  %48 = load double, ptr %9, align 8, !tbaa !9
  %49 = getelementptr inbounds %class.R3Grid, ptr %20, i32 0, i32 5
  %50 = getelementptr inbounds [3 x i32], ptr %49, i64 0, i64 2
  %51 = load i32, ptr %50, align 8, !tbaa !11
  %52 = sub nsw i32 %51, 1
  %53 = sitofp i32 %52 to double
  %54 = fcmp ogt double %48, %53
  br i1 %54, label %55, label %56

55:                                               ; preds = %47, %44
  store double 0.000000e+00, ptr %5, align 8
  br label %206

56:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %57 = load double, ptr %7, align 8, !tbaa !9
  %58 = fptosi double %57 to i32
  store i32 %58, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %59 = load double, ptr %8, align 8, !tbaa !9
  %60 = fptosi double %59 to i32
  store i32 %60, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %61 = load double, ptr %9, align 8, !tbaa !9
  %62 = fptosi double %61 to i32
  store i32 %62, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %63 = load i32, ptr %10, align 4, !tbaa !11
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %65 = load i32, ptr %11, align 4, !tbaa !11
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %67 = load i32, ptr %12, align 4, !tbaa !11
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %15, align 4, !tbaa !11
  %69 = load i32, ptr %13, align 4, !tbaa !11
  %70 = getelementptr inbounds %class.R3Grid, ptr %20, i32 0, i32 5
  %71 = getelementptr inbounds [3 x i32], ptr %70, i64 0, i64 0
  %72 = load i32, ptr %71, align 8, !tbaa !11
  %73 = icmp sge i32 %69, %72
  br i1 %73, label %74, label %76

74:                                               ; preds = %56
  %75 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %75, ptr %13, align 4, !tbaa !11
  br label %76

76:                                               ; preds = %74, %56
  %77 = load i32, ptr %14, align 4, !tbaa !11
  %78 = getelementptr inbounds %class.R3Grid, ptr %20, i32 0, i32 5
  %79 = getelementptr inbounds [3 x i32], ptr %78, i64 0, i64 1
  %80 = load i32, ptr %79, align 4, !tbaa !11
  %81 = icmp sge i32 %77, %80
  br i1 %81, label %82, label %84

82:                                               ; preds = %76
  %83 = load i32, ptr %11, align 4, !tbaa !11
  store i32 %83, ptr %14, align 4, !tbaa !11
  br label %84

84:                                               ; preds = %82, %76
  %85 = load i32, ptr %15, align 4, !tbaa !11
  %86 = getelementptr inbounds %class.R3Grid, ptr %20, i32 0, i32 5
  %87 = getelementptr inbounds [3 x i32], ptr %86, i64 0, i64 2
  %88 = load i32, ptr %87, align 8, !tbaa !11
  %89 = icmp sge i32 %85, %88
  br i1 %89, label %90, label %92

90:                                               ; preds = %84
  %91 = load i32, ptr %12, align 4, !tbaa !11
  store i32 %91, ptr %15, align 4, !tbaa !11
  br label %92

92:                                               ; preds = %90, %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %93 = load double, ptr %7, align 8, !tbaa !9
  %94 = load i32, ptr %10, align 4, !tbaa !11
  %95 = sitofp i32 %94 to double
  %96 = fsub double %93, %95
  store double %96, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %97 = load double, ptr %8, align 8, !tbaa !9
  %98 = load i32, ptr %11, align 4, !tbaa !11
  %99 = sitofp i32 %98 to double
  %100 = fsub double %97, %99
  store double %100, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %101 = load double, ptr %9, align 8, !tbaa !9
  %102 = load i32, ptr %12, align 4, !tbaa !11
  %103 = sitofp i32 %102 to double
  %104 = fsub double %101, %103
  store double %104, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store double 0.000000e+00, ptr %19, align 8, !tbaa !9
  %105 = load i32, ptr %10, align 4, !tbaa !11
  %106 = load i32, ptr %11, align 4, !tbaa !11
  %107 = load i32, ptr %12, align 4, !tbaa !11
  %108 = call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %20, i32 noundef %105, i32 noundef %106, i32 noundef %107)
  %109 = load double, ptr %16, align 8, !tbaa !9
  %110 = fsub double 1.000000e+00, %109
  %111 = fmul double %108, %110
  %112 = load double, ptr %17, align 8, !tbaa !9
  %113 = fsub double 1.000000e+00, %112
  %114 = fmul double %111, %113
  %115 = load double, ptr %18, align 8, !tbaa !9
  %116 = fsub double 1.000000e+00, %115
  %117 = load double, ptr %19, align 8, !tbaa !9
  %118 = call double @llvm.fmuladd.f64(double %114, double %116, double %117)
  store double %118, ptr %19, align 8, !tbaa !9
  %119 = load i32, ptr %10, align 4, !tbaa !11
  %120 = load i32, ptr %11, align 4, !tbaa !11
  %121 = load i32, ptr %15, align 4, !tbaa !11
  %122 = call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %20, i32 noundef %119, i32 noundef %120, i32 noundef %121)
  %123 = load double, ptr %16, align 8, !tbaa !9
  %124 = fsub double 1.000000e+00, %123
  %125 = fmul double %122, %124
  %126 = load double, ptr %17, align 8, !tbaa !9
  %127 = fsub double 1.000000e+00, %126
  %128 = fmul double %125, %127
  %129 = load double, ptr %18, align 8, !tbaa !9
  %130 = load double, ptr %19, align 8, !tbaa !9
  %131 = call double @llvm.fmuladd.f64(double %128, double %129, double %130)
  store double %131, ptr %19, align 8, !tbaa !9
  %132 = load i32, ptr %10, align 4, !tbaa !11
  %133 = load i32, ptr %14, align 4, !tbaa !11
  %134 = load i32, ptr %12, align 4, !tbaa !11
  %135 = call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %20, i32 noundef %132, i32 noundef %133, i32 noundef %134)
  %136 = load double, ptr %16, align 8, !tbaa !9
  %137 = fsub double 1.000000e+00, %136
  %138 = fmul double %135, %137
  %139 = load double, ptr %17, align 8, !tbaa !9
  %140 = fmul double %138, %139
  %141 = load double, ptr %18, align 8, !tbaa !9
  %142 = fsub double 1.000000e+00, %141
  %143 = load double, ptr %19, align 8, !tbaa !9
  %144 = call double @llvm.fmuladd.f64(double %140, double %142, double %143)
  store double %144, ptr %19, align 8, !tbaa !9
  %145 = load i32, ptr %10, align 4, !tbaa !11
  %146 = load i32, ptr %14, align 4, !tbaa !11
  %147 = load i32, ptr %15, align 4, !tbaa !11
  %148 = call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %20, i32 noundef %145, i32 noundef %146, i32 noundef %147)
  %149 = load double, ptr %16, align 8, !tbaa !9
  %150 = fsub double 1.000000e+00, %149
  %151 = fmul double %148, %150
  %152 = load double, ptr %17, align 8, !tbaa !9
  %153 = fmul double %151, %152
  %154 = load double, ptr %18, align 8, !tbaa !9
  %155 = load double, ptr %19, align 8, !tbaa !9
  %156 = call double @llvm.fmuladd.f64(double %153, double %154, double %155)
  store double %156, ptr %19, align 8, !tbaa !9
  %157 = load i32, ptr %13, align 4, !tbaa !11
  %158 = load i32, ptr %11, align 4, !tbaa !11
  %159 = load i32, ptr %12, align 4, !tbaa !11
  %160 = call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %20, i32 noundef %157, i32 noundef %158, i32 noundef %159)
  %161 = load double, ptr %16, align 8, !tbaa !9
  %162 = fmul double %160, %161
  %163 = load double, ptr %17, align 8, !tbaa !9
  %164 = fsub double 1.000000e+00, %163
  %165 = fmul double %162, %164
  %166 = load double, ptr %18, align 8, !tbaa !9
  %167 = fsub double 1.000000e+00, %166
  %168 = load double, ptr %19, align 8, !tbaa !9
  %169 = call double @llvm.fmuladd.f64(double %165, double %167, double %168)
  store double %169, ptr %19, align 8, !tbaa !9
  %170 = load i32, ptr %13, align 4, !tbaa !11
  %171 = load i32, ptr %11, align 4, !tbaa !11
  %172 = load i32, ptr %15, align 4, !tbaa !11
  %173 = call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %20, i32 noundef %170, i32 noundef %171, i32 noundef %172)
  %174 = load double, ptr %16, align 8, !tbaa !9
  %175 = fmul double %173, %174
  %176 = load double, ptr %17, align 8, !tbaa !9
  %177 = fsub double 1.000000e+00, %176
  %178 = fmul double %175, %177
  %179 = load double, ptr %18, align 8, !tbaa !9
  %180 = load double, ptr %19, align 8, !tbaa !9
  %181 = call double @llvm.fmuladd.f64(double %178, double %179, double %180)
  store double %181, ptr %19, align 8, !tbaa !9
  %182 = load i32, ptr %13, align 4, !tbaa !11
  %183 = load i32, ptr %14, align 4, !tbaa !11
  %184 = load i32, ptr %12, align 4, !tbaa !11
  %185 = call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %20, i32 noundef %182, i32 noundef %183, i32 noundef %184)
  %186 = load double, ptr %16, align 8, !tbaa !9
  %187 = fmul double %185, %186
  %188 = load double, ptr %17, align 8, !tbaa !9
  %189 = fmul double %187, %188
  %190 = load double, ptr %18, align 8, !tbaa !9
  %191 = fsub double 1.000000e+00, %190
  %192 = load double, ptr %19, align 8, !tbaa !9
  %193 = call double @llvm.fmuladd.f64(double %189, double %191, double %192)
  store double %193, ptr %19, align 8, !tbaa !9
  %194 = load i32, ptr %13, align 4, !tbaa !11
  %195 = load i32, ptr %14, align 4, !tbaa !11
  %196 = load i32, ptr %15, align 4, !tbaa !11
  %197 = call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %20, i32 noundef %194, i32 noundef %195, i32 noundef %196)
  %198 = load double, ptr %16, align 8, !tbaa !9
  %199 = fmul double %197, %198
  %200 = load double, ptr %17, align 8, !tbaa !9
  %201 = fmul double %199, %200
  %202 = load double, ptr %18, align 8, !tbaa !9
  %203 = load double, ptr %19, align 8, !tbaa !9
  %204 = call double @llvm.fmuladd.f64(double %201, double %202, double %203)
  store double %204, ptr %19, align 8, !tbaa !9
  %205 = load double, ptr %19, align 8, !tbaa !9
  store double %205, ptr %5, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %206

206:                                              ; preds = %92, %55, %43, %31
  %207 = load double, ptr %5, align 8
  ret double %207
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592), i32 noundef, i32 noundef, i32 noundef) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK6R3Grid9GridValueEddd(ptr noundef nonnull align 8 dereferenceable(592) %0, double noundef %1, double noundef %2, double noundef %3) local_unnamed_addr #1 align 2 {
  %5 = fcmp olt double %1, 0.000000e+00
  br i1 %5, label %78, label %6

6:                                                ; preds = %4
  %7 = getelementptr inbounds i8, ptr %0, i64 568
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %9 = add nsw i32 %8, -1
  %10 = sitofp i32 %9 to double
  %11 = fcmp olt double %10, %1
  %12 = fcmp olt double %2, 0.000000e+00
  %or.cond = or i1 %12, %11
  br i1 %or.cond, label %78, label %13

13:                                               ; preds = %6
  %14 = getelementptr inbounds i8, ptr %0, i64 572
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = add nsw i32 %15, -1
  %17 = sitofp i32 %16 to double
  %18 = fcmp olt double %17, %2
  %19 = fcmp olt double %3, 0.000000e+00
  %or.cond93 = or i1 %19, %18
  br i1 %or.cond93, label %78, label %20

20:                                               ; preds = %13
  %21 = getelementptr inbounds i8, ptr %0, i64 576
  %22 = load i32, ptr %21, align 8, !tbaa !5
  %23 = add nsw i32 %22, -1
  %24 = sitofp i32 %23 to double
  %25 = fcmp olt double %24, %3
  br i1 %25, label %78, label %26

26:                                               ; preds = %20
  %27 = insertelement <2 x double> poison, double %2, i64 0
  %28 = insertelement <2 x double> %27, double %1, i64 1
  %29 = fptosi <2 x double> %28 to <2 x i32>
  %30 = fptosi double %3 to i32
  %31 = extractelement <2 x i32> %29, i64 1
  %32 = add nsw i32 %31, 1
  %33 = extractelement <2 x i32> %29, i64 0
  %34 = add nsw i32 %33, 1
  %35 = add nsw i32 %30, 1
  %.not = icmp slt i32 %32, %8
  %spec.select = select i1 %.not, i32 %32, i32 %31
  %.not91 = icmp slt i32 %34, %15
  %.083 = select i1 %.not91, i32 %34, i32 %33
  %.not92 = icmp slt i32 %35, %22
  %.084 = select i1 %.not92, i32 %35, i32 %30
  %36 = sitofp <2 x i32> %29 to <2 x double>
  %37 = fsub <2 x double> %28, %36
  %38 = sitofp i32 %30 to double
  %39 = fsub double %3, %38
  %40 = tail call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %0, i32 noundef %31, i32 noundef %33, i32 noundef %30)
  %41 = fsub <2 x double> <double 1.000000e+00, double 1.000000e+00>, %37
  %42 = extractelement <2 x double> %41, i64 1
  %43 = fmul double %42, %40
  %44 = extractelement <2 x double> %41, i64 0
  %45 = fmul double %44, %43
  %46 = fsub double 1.000000e+00, %39
  %47 = tail call double @llvm.fmuladd.f64(double %45, double %46, double 0.000000e+00)
  %48 = tail call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %0, i32 noundef %31, i32 noundef %33, i32 noundef %.084)
  %49 = fmul double %42, %48
  %50 = fmul double %44, %49
  %51 = tail call double @llvm.fmuladd.f64(double %50, double %39, double %47)
  %52 = tail call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %0, i32 noundef %31, i32 noundef %.083, i32 noundef %30)
  %53 = fmul double %42, %52
  %54 = extractelement <2 x double> %37, i64 0
  %55 = fmul double %54, %53
  %56 = tail call double @llvm.fmuladd.f64(double %55, double %46, double %51)
  %57 = tail call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %0, i32 noundef %31, i32 noundef %.083, i32 noundef %.084)
  %58 = fmul double %42, %57
  %59 = fmul double %54, %58
  %60 = tail call double @llvm.fmuladd.f64(double %59, double %39, double %56)
  %61 = tail call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %0, i32 noundef %spec.select, i32 noundef %33, i32 noundef %30)
  %62 = extractelement <2 x double> %37, i64 1
  %63 = fmul double %62, %61
  %64 = fmul double %44, %63
  %65 = tail call double @llvm.fmuladd.f64(double %64, double %46, double %60)
  %66 = tail call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %0, i32 noundef %spec.select, i32 noundef %33, i32 noundef %.084)
  %67 = fmul double %62, %66
  %68 = fmul double %44, %67
  %69 = tail call double @llvm.fmuladd.f64(double %68, double %39, double %65)
  %70 = tail call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %0, i32 noundef %spec.select, i32 noundef %.083, i32 noundef %30)
  %71 = fmul double %62, %70
  %72 = fmul double %54, %71
  %73 = tail call double @llvm.fmuladd.f64(double %72, double %46, double %69)
  %74 = tail call noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592) %0, i32 noundef %spec.select, i32 noundef %.083, i32 noundef %.084)
  %75 = fmul double %62, %74
  %76 = fmul double %54, %75
  %77 = tail call double @llvm.fmuladd.f64(double %76, double %39, double %73)
  br label %78

78:                                               ; preds = %20, %13, %4, %6, %26
  %.0 = phi double [ %77, %26 ], [ 0.000000e+00, %6 ], [ 0.000000e+00, %4 ], [ 0.000000e+00, %13 ], [ 0.000000e+00, %20 ]
  ret double %.0
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R3Grid9GridValueEiii(ptr noundef nonnull align 8 dereferenceable(592), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass