; LLVM IR from SourangshuGhosh/Fluid-Simulation-for-Computer-Graphics :: src/scalarfield.ll (ZN11ScalarField17addEllipsoidValueEN5vmath4vec3ENS0_4mat3Ed)

; 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.vmath::vec3" = type { float, float, float }
%struct.GridIndex = type { i32, i32, i32 }
%"class.vmath::mat3" = type { [9 x float] }
%class.ScalarField = type { i32, i32, i32, double, double, double, double, double, double, double, double, i8, [7 x i8], %class.Array3d, %class.Array3d.0, %class.Array3d, %class.Array3d.0, i8, %"class.vmath::vec3" }
%class.Array3d = type <{ i32, i32, i32, [4 x i8], ptr, i8, [3 x i8], float, i32, [4 x i8] }>
%class.Array3d.0 = type { i32, i32, i32, ptr, i8, i8, i32 }

declare i32 @__gxx_personality_v0(...)

declare void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0

; Function Attrs: nounwind
declare void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN7Array3dIfEclEiii(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef, i32 noundef, i32 noundef) #3 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare noundef nonnull align 4 dereferenceable(12) ptr @_ZN5vmathmIERNS_4vec3ERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d19GridIndexToPositionEiiid(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, i32 noundef, i32 noundef, i32 noundef, double noundef) #6

declare void @_ZN5vmathmiERKNS_4vec3ES2_(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN5vmath3dotERKNS_4vec3ES2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN11ScalarField46_evaluateTricubicFieldFunctionForRadiusSquaredEd(ptr noundef nonnull align 8 dereferenceable(248), double noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11ScalarField19addScalarFieldValueEiiid(ptr noundef nonnull align 8 dereferenceable(248), i32 noundef, i32 noundef, i32 noundef, double noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIfE3addEiiif(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef, i32 noundef, i32 noundef, float noundef) #3 align 2

; Function Attrs: nounwind
declare void @_ZN5vmath4mat3D1Ev(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d18getGridIndexBoundsEN5vmath4vec3EdNS0_4mat3EdiiiP9GridIndexS4_(ptr noundef, double noundef, ptr noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #6

declare void @_ZN5vmathmlERKNS_4mat3ERKNS_4vec3E(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(12)) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11ScalarField17addEllipsoidValueEN5vmath4vec3ENS0_4mat3Ed(ptr noundef nonnull align 8 dereferenceable(248) %0, ptr noundef %1, ptr noundef %2, double noundef %3) #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca %struct.GridIndex, align 4
  %10 = alloca %struct.GridIndex, align 4
  %11 = alloca %"class.vmath::vec3", align 4
  %12 = alloca %"class.vmath::mat3", align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.vmath::vec3", align 4
  %16 = alloca %"class.vmath::vec3", align 4
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.vmath::vec3", align 4
  %25 = alloca %"class.vmath::vec3", align 4
  %26 = alloca %"class.vmath::vec3", align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store double %3, ptr %8, align 8, !tbaa !9
  %27 = load ptr, ptr %5, align 8
  %28 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 18
  %29 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5vmathmIERNS_4vec3ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %28)
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #8
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #8
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %1, i64 12, i1 false), !tbaa.struct !11
  %30 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 4
  %31 = load double, ptr %30, align 8, !tbaa !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %2, i64 36, i1 false), !tbaa.struct !21
  %32 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 3
  %33 = load double, ptr %32, align 8, !tbaa !23
  %34 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 0
  %35 = load i32, ptr %34, align 8, !tbaa !24
  %36 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 1
  %37 = load i32, ptr %36, align 4, !tbaa !25
  %38 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 2
  %39 = load i32, ptr %38, align 8, !tbaa !26
  invoke void @_ZN6Grid3d18getGridIndexBoundsEN5vmath4vec3EdNS0_4mat3EdiiiP9GridIndexS4_(ptr noundef %11, double noundef %31, ptr noundef %12, double noundef %33, i32 noundef %35, i32 noundef %37, i32 noundef %39, ptr noundef %9, ptr noundef %10)
          to label %40 unwind label %55

40:                                               ; preds = %4
  call void @_ZN5vmath4mat3D1Ev(ptr noundef nonnull align 4 dereferenceable(36) %12) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #8
  call void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #8
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %16)
          to label %41 unwind label %59

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %42 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 4
  %43 = load double, ptr %42, align 8, !tbaa !14
  %44 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 4
  %45 = load double, ptr %44, align 8, !tbaa !14
  %46 = fmul double %43, %45
  store double %46, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %47 = getelementptr inbounds %struct.GridIndex, ptr %9, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !27
  store i32 %48, ptr %20, align 4, !tbaa !29
  br label %49

49:                                               ; preds = %161, %41
  %50 = load i32, ptr %20, align 4, !tbaa !29
  %51 = getelementptr inbounds %struct.GridIndex, ptr %10, i32 0, i32 2
  %52 = load i32, ptr %51, align 4, !tbaa !27
  %53 = icmp sle i32 %50, %52
  br i1 %53, label %63, label %54

54:                                               ; preds = %49
  store i32 2, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %164

55:                                               ; preds = %4
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %13, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %14, align 4
  call void @_ZN5vmath4mat3D1Ev(ptr noundef nonnull align 4 dereferenceable(36) %12) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #8
  br label %166

59:                                               ; preds = %40
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %13, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %14, align 4
  br label %165

63:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %64 = getelementptr inbounds %struct.GridIndex, ptr %9, i32 0, i32 1
  %65 = load i32, ptr %64, align 4, !tbaa !30
  store i32 %65, ptr %22, align 4, !tbaa !29
  br label %66

66:                                               ; preds = %157, %63
  %67 = load i32, ptr %22, align 4, !tbaa !29
  %68 = getelementptr inbounds %struct.GridIndex, ptr %10, i32 0, i32 1
  %69 = load i32, ptr %68, align 4, !tbaa !30
  %70 = icmp sle i32 %67, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %66
  store i32 5, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %160

72:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %73 = getelementptr inbounds %struct.GridIndex, ptr %9, i32 0, i32 0
  %74 = load i32, ptr %73, align 4, !tbaa !31
  store i32 %74, ptr %23, align 4, !tbaa !29
  br label %75

75:                                               ; preds = %152, %72
  %76 = load i32, ptr %23, align 4, !tbaa !29
  %77 = getelementptr inbounds %struct.GridIndex, ptr %10, i32 0, i32 0
  %78 = load i32, ptr %77, align 4, !tbaa !31
  %79 = icmp sle i32 %76, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %75
  store i32 8, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %156

81:                                               ; preds = %75
  %82 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 11
  %83 = load i8, ptr %82, align 8, !tbaa !32, !range !33, !noundef !34
  %84 = trunc i8 %83 to i1
  br i1 %84, label %85, label %101

85:                                               ; preds = %81
  %86 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 13
  %87 = load i32, ptr %23, align 4, !tbaa !29
  %88 = load i32, ptr %22, align 4, !tbaa !29
  %89 = load i32, ptr %20, align 4, !tbaa !29
  %90 = invoke noundef float @_ZN7Array3dIfEclEiii(ptr noundef nonnull align 8 dereferenceable(36) %86, i32 noundef %87, i32 noundef %88, i32 noundef %89)
          to label %91 unwind label %97

91:                                               ; preds = %85
  %92 = fpext float %90 to double
  %93 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 10
  %94 = load double, ptr %93, align 8, !tbaa !35
  %95 = fcmp ogt double %92, %94
  br i1 %95, label %96, label %101

96:                                               ; preds = %91
  br label %152

97:                                               ; preds = %130, %119, %116, %109, %85
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %13, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %14, align 4
  br label %155

101:                                              ; preds = %91, %81
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #8
  %102 = load i32, ptr %23, align 4, !tbaa !29
  %103 = load i32, ptr %22, align 4, !tbaa !29
  %104 = load i32, ptr %20, align 4, !tbaa !29
  %105 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 3
  %106 = load double, ptr %105, align 8, !tbaa !23
  invoke void @_ZN6Grid3d19GridIndexToPositionEiiid(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %24, i32 noundef %102, i32 noundef %103, i32 noundef %104, double noundef %106)
          to label %107 unwind label %138

107:                                              ; preds = %101
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %24, i64 12, i1 false), !tbaa.struct !11
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %24) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #8
  invoke void @_ZN5vmathmiERKNS_4vec3ES2_(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %1)
          to label %108 unwind label %142

108:                                              ; preds = %107
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %25, i64 12, i1 false), !tbaa.struct !11
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %25) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #8
  invoke void @_ZN5vmathmlERKNS_4mat3ERKNS_4vec3E(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %26, ptr noundef nonnull align 4 dereferenceable(36) %2, ptr noundef nonnull align 4 dereferenceable(12) %16)
          to label %109 unwind label %146

109:                                              ; preds = %108
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %26, i64 12, i1 false), !tbaa.struct !11
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %26) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #8
  %110 = invoke noundef float @_ZN5vmath3dotERKNS_4vec3ES2_(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %16)
          to label %111 unwind label %97

111:                                              ; preds = %109
  %112 = fpext float %110 to double
  store double %112, ptr %18, align 8, !tbaa !9
  %113 = load double, ptr %18, align 8, !tbaa !9
  %114 = load double, ptr %17, align 8, !tbaa !9
  %115 = fcmp olt double %113, %114
  br i1 %115, label %116, label %151

116:                                              ; preds = %111
  %117 = load double, ptr %18, align 8, !tbaa !9
  %118 = invoke noundef double @_ZN11ScalarField46_evaluateTricubicFieldFunctionForRadiusSquaredEd(ptr noundef nonnull align 8 dereferenceable(248) %27, double noundef %117)
          to label %119 unwind label %97

119:                                              ; preds = %116
  store double %118, ptr %19, align 8, !tbaa !9
  %120 = load i32, ptr %23, align 4, !tbaa !29
  %121 = load i32, ptr %22, align 4, !tbaa !29
  %122 = load i32, ptr %20, align 4, !tbaa !29
  %123 = load double, ptr %19, align 8, !tbaa !9
  %124 = load double, ptr %8, align 8, !tbaa !9
  %125 = fmul double %123, %124
  invoke void @_ZN11ScalarField19addScalarFieldValueEiiid(ptr noundef nonnull align 8 dereferenceable(248) %27, i32 noundef %120, i32 noundef %121, i32 noundef %122, double noundef %125)
          to label %126 unwind label %97

126:                                              ; preds = %119
  %127 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 17
  %128 = load i8, ptr %127, align 8, !tbaa !36, !range !33, !noundef !34
  %129 = trunc i8 %128 to i1
  br i1 %129, label %130, label %150

130:                                              ; preds = %126
  %131 = getelementptr inbounds %class.ScalarField, ptr %27, i32 0, i32 15
  %132 = load i32, ptr %23, align 4, !tbaa !29
  %133 = load i32, ptr %22, align 4, !tbaa !29
  %134 = load i32, ptr %20, align 4, !tbaa !29
  %135 = load double, ptr %19, align 8, !tbaa !9
  %136 = fptrunc double %135 to float
  invoke void @_ZN7Array3dIfE3addEiiif(ptr noundef nonnull align 8 dereferenceable(36) %131, i32 noundef %132, i32 noundef %133, i32 noundef %134, float noundef %136)
          to label %137 unwind label %97

137:                                              ; preds = %130
  br label %150

138:                                              ; preds = %101
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %13, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #8
  br label %155

142:                                              ; preds = %107
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %13, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #8
  br label %155

146:                                              ; preds = %108
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %13, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #8
  br label %155

150:                                              ; preds = %137, %126
  br label %151

151:                                              ; preds = %150, %111
  br label %152

152:                                              ; preds = %151, %96
  %153 = load i32, ptr %23, align 4, !tbaa !29
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %23, align 4, !tbaa !29
  br label %75, !llvm.loop !37

155:                                              ; preds = %146, %142, %138, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %16) #8
  br label %165

156:                                              ; preds = %80
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %22, align 4, !tbaa !29
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %22, align 4, !tbaa !29
  br label %66, !llvm.loop !39

160:                                              ; preds = %71
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %20, align 4, !tbaa !29
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %20, align 4, !tbaa !29
  br label %49, !llvm.loop !40

164:                                              ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %16) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %15) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #8
  ret void

165:                                              ; preds = %155, %59
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %15) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #8
  br label %166

166:                                              ; preds = %165, %55
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #8
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %13, align 8
  %169 = load i32, ptr %14, align 4
  %170 = insertvalue { ptr, i32 } poison, ptr %168, 0
  %171 = insertvalue { ptr, i32 } %170, i32 %169, 1
  resume { ptr, i32 } %171
}

attributes #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 #1 = { nounwind "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nounwind 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 #6 = { 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 #7 = { inlinehint mustprogress nounwind 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 #8 = { 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 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !10, i64 24}
!15 = !{!"_ZTS11ScalarField", !16, i64 0, !16, i64 4, !16, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !17, i64 80, !18, i64 88, !19, i64 128, !18, i64 160, !19, i64 200, !17, i64 232, !20, i64 236}
!16 = !{!"int", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTS7Array3dIfE", !16, i64 0, !16, i64 4, !16, i64 8, !6, i64 16, !17, i64 24, !13, i64 28, !16, i64 32}
!19 = !{!"_ZTS7Array3dIbE", !16, i64 0, !16, i64 4, !16, i64 8, !6, i64 16, !17, i64 24, !17, i64 25, !16, i64 28}
!20 = !{!"_ZTSN5vmath4vec3E", !13, i64 0, !13, i64 4, !13, i64 8}
!21 = !{i64 0, i64 36, !22}
!22 = !{!7, !7, i64 0}
!23 = !{!15, !10, i64 16}
!24 = !{!15, !16, i64 0}
!25 = !{!15, !16, i64 4}
!26 = !{!15, !16, i64 8}
!27 = !{!28, !16, i64 8}
!28 = !{!"_ZTS9GridIndex", !16, i64 0, !16, i64 4, !16, i64 8}
!29 = !{!16, !16, i64 0}
!30 = !{!28, !16, i64 4}
!31 = !{!28, !16, i64 0}
!32 = !{!15, !17, i64 80}
!33 = !{i8 0, i8 2}
!34 = !{}
!35 = !{!15, !10, i64 72}
!36 = !{!15, !17, i64 232}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = distinct !{!39, !38}
!40 = distinct !{!40, !38}


; 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"

%"class.vmath::vec3" = type { float, float, float }
%struct.GridIndex = type { i32, i32, i32 }
%"class.vmath::mat3" = type { [9 x float] }

declare i32 @__gxx_personality_v0(...)

declare void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0

; Function Attrs: nounwind
declare void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN7Array3dIfEclEiii(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare noundef nonnull align 4 dereferenceable(12) ptr @_ZN5vmathmIERNS_4vec3ERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d19GridIndexToPositionEiiid(ptr dead_on_unwind noalias writable sret(%"class.vmath::vec3") align 4, i32 noundef, i32 noundef, i32 noundef, double noundef) local_unnamed_addr #6

declare void @_ZN5vmathmiERKNS_4vec3ES2_(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN5vmath3dotERKNS_4vec3ES2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN11ScalarField46_evaluateTricubicFieldFunctionForRadiusSquaredEd(ptr noundef nonnull align 8 dereferenceable(248), double noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11ScalarField19addScalarFieldValueEiiid(ptr noundef nonnull align 8 dereferenceable(248), i32 noundef, i32 noundef, i32 noundef, double noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIfE3addEiiif(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #3 align 2

; Function Attrs: nounwind
declare void @_ZN5vmath4mat3D1Ev(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d18getGridIndexBoundsEN5vmath4vec3EdNS0_4mat3EdiiiP9GridIndexS4_(ptr noundef, double noundef, ptr noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare void @_ZN5vmathmlERKNS_4mat3ERKNS_4vec3E(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4, ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11ScalarField17addEllipsoidValueEN5vmath4vec3ENS0_4mat3Ed(ptr noundef nonnull align 8 dereferenceable(248) %0, ptr noundef nonnull %1, ptr noundef %2, double noundef %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.GridIndex, align 4
  %6 = alloca %struct.GridIndex, align 4
  %7 = alloca %"class.vmath::vec3", align 4
  %8 = alloca %"class.vmath::mat3", align 4
  %9 = alloca %"class.vmath::vec3", align 4
  %10 = alloca %"class.vmath::vec3", align 4
  %11 = alloca %"class.vmath::vec3", align 4
  %12 = alloca %"class.vmath::vec3", align 4
  %13 = alloca %"class.vmath::vec3", align 4
  %14 = getelementptr inbounds i8, ptr %0, i64 236
  %15 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5vmathmIERNS_4vec3ERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #8
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #8
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %1, i64 12, i1 false), !tbaa.struct !5
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  %17 = load double, ptr %16, align 8, !tbaa !10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %8, ptr noundef nonnull align 4 dereferenceable(36) %2, i64 36, i1 false), !tbaa.struct !19
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = load double, ptr %18, align 8, !tbaa !21
  %20 = load i32, ptr %0, align 8, !tbaa !22
  %21 = getelementptr inbounds i8, ptr %0, i64 4
  %22 = load i32, ptr %21, align 4, !tbaa !23
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  %24 = load i32, ptr %23, align 8, !tbaa !24
  invoke void @_ZN6Grid3d18getGridIndexBoundsEN5vmath4vec3EdNS0_4mat3EdiiiP9GridIndexS4_(ptr noundef nonnull %7, double noundef %17, ptr noundef nonnull %8, double noundef %19, i32 noundef %20, i32 noundef %22, i32 noundef %24, ptr noundef nonnull %5, ptr noundef nonnull %6)
          to label %25 unwind label %43

25:                                               ; preds = %4
  call void @_ZN5vmath4mat3D1Ev(ptr noundef nonnull align 4 dereferenceable(36) %8) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %7) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #8
  call void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #8
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %26 unwind label %45

26:                                               ; preds = %25
  %27 = load double, ptr %16, align 8, !tbaa !10
  %28 = fmul double %27, %27
  %29 = getelementptr inbounds i8, ptr %5, i64 8
  %30 = load i32, ptr %29, align 4, !tbaa !25
  %31 = getelementptr inbounds i8, ptr %6, i64 8
  %32 = load i32, ptr %31, align 4, !tbaa !25
  %.not45 = icmp sgt i32 %30, %32
  br i1 %.not45, label %._crit_edge50, label %.lr.ph49

.lr.ph49:                                         ; preds = %26
  %33 = getelementptr inbounds i8, ptr %5, i64 4
  %34 = getelementptr inbounds i8, ptr %6, i64 4
  %35 = getelementptr inbounds i8, ptr %0, i64 80
  %36 = getelementptr inbounds i8, ptr %0, i64 88
  %37 = getelementptr inbounds i8, ptr %0, i64 72
  %38 = getelementptr inbounds i8, ptr %0, i64 232
  %39 = getelementptr inbounds i8, ptr %0, i64 160
  %40 = load i32, ptr %33, align 4, !tbaa !27
  %41 = load i32, ptr %34, align 4, !tbaa !27
  %42 = icmp sgt i32 %40, %41
  br i1 %42, label %._crit_edge50, label %.lr.ph49.split

._crit_edge50:                                    ; preds = %._crit_edge44, %.lr.ph49, %26
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #8
  ret void

43:                                               ; preds = %4
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4mat3D1Ev(ptr noundef nonnull align 4 dereferenceable(36) %8) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %7) #8
  br label %101

45:                                               ; preds = %25
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %100

.lr.ph49.split:                                   ; preds = %.lr.ph49, %._crit_edge44
  %47 = phi i32 [ %54, %._crit_edge44 ], [ %32, %.lr.ph49 ]
  %48 = phi i32 [ %55, %._crit_edge44 ], [ %41, %.lr.ph49 ]
  %49 = phi i32 [ %56, %._crit_edge44 ], [ %41, %.lr.ph49 ]
  %.02746 = phi i32 [ %57, %._crit_edge44 ], [ %30, %.lr.ph49 ]
  %50 = load i32, ptr %33, align 4, !tbaa !27
  %.not3340 = icmp sgt i32 %50, %49
  br i1 %.not3340, label %._crit_edge44, label %.lr.ph43

.lr.ph43:                                         ; preds = %.lr.ph49.split
  %51 = load i32, ptr %5, align 4, !tbaa !28
  %52 = load i32, ptr %6, align 4, !tbaa !28
  %53 = icmp sgt i32 %51, %52
  br i1 %53, label %._crit_edge44, label %.lr.ph43.split

._crit_edge44.loopexit51:                         ; preds = %._crit_edge
  %.pre53 = load i32, ptr %31, align 4, !tbaa !25
  br label %._crit_edge44

._crit_edge44:                                    ; preds = %.lr.ph43, %._crit_edge44.loopexit51, %.lr.ph49.split
  %54 = phi i32 [ %.pre53, %._crit_edge44.loopexit51 ], [ %47, %.lr.ph49.split ], [ %47, %.lr.ph43 ]
  %55 = phi i32 [ %61, %._crit_edge44.loopexit51 ], [ %48, %.lr.ph49.split ], [ %48, %.lr.ph43 ]
  %56 = phi i32 [ %61, %._crit_edge44.loopexit51 ], [ %49, %.lr.ph49.split ], [ %49, %.lr.ph43 ]
  %57 = add nsw i32 %.02746, 1
  %.not.not = icmp slt i32 %.02746, %54
  br i1 %.not.not, label %.lr.ph49.split, label %._crit_edge50, !llvm.loop !29

.lr.ph43.split:                                   ; preds = %.lr.ph43, %._crit_edge
  %58 = phi i32 [ %61, %._crit_edge ], [ %48, %.lr.ph43 ]
  %59 = phi i32 [ %62, %._crit_edge ], [ %52, %.lr.ph43 ]
  %.02641 = phi i32 [ %63, %._crit_edge ], [ %50, %.lr.ph43 ]
  %60 = load i32, ptr %5, align 4, !tbaa !28
  %.not3438 = icmp sgt i32 %60, %59
  br i1 %.not3438, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %96
  %.pre = load i32, ptr %34, align 4, !tbaa !27
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph43.split
  %61 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %58, %.lr.ph43.split ]
  %62 = phi i32 [ %98, %._crit_edge.loopexit ], [ %59, %.lr.ph43.split ]
  %63 = add nsw i32 %.02641, 1
  %.not33.not = icmp slt i32 %.02641, %61
  br i1 %.not33.not, label %.lr.ph43.split, label %._crit_edge44.loopexit51, !llvm.loop !32

.lr.ph:                                           ; preds = %.lr.ph43.split, %96
  %.039 = phi i32 [ %97, %96 ], [ %60, %.lr.ph43.split ]
  %64 = load i8, ptr %35, align 8, !tbaa !33, !range !34, !noundef !35
  %65 = trunc nuw i8 %64 to i1
  br i1 %65, label %66, label %74

66:                                               ; preds = %.lr.ph
  %67 = invoke noundef float @_ZN7Array3dIfEclEiii(ptr noundef nonnull align 8 dereferenceable(36) %36, i32 noundef %.039, i32 noundef %.02641, i32 noundef %.02746)
          to label %68 unwind label %72

68:                                               ; preds = %66
  %69 = fpext float %67 to double
  %70 = load double, ptr %37, align 8, !tbaa !36
  %71 = fcmp olt double %70, %69
  br i1 %71, label %96, label %74

72:                                               ; preds = %88, %82, %66
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %99

74:                                               ; preds = %68, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #8
  %75 = load double, ptr %18, align 8, !tbaa !21
  invoke void @_ZN6Grid3d19GridIndexToPositionEiiid(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %11, i32 noundef %.039, i32 noundef %.02641, i32 noundef %.02746, double noundef %75)
          to label %76 unwind label %90

76:                                               ; preds = %74
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %11, i64 12, i1 false), !tbaa.struct !5
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #8
  invoke void @_ZN5vmathmiERKNS_4vec3ES2_(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %1)
          to label %77 unwind label %92

77:                                               ; preds = %76
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %12, i64 12, i1 false), !tbaa.struct !5
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %12) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #8
  invoke void @_ZN5vmathmlERKNS_4mat3ERKNS_4vec3E(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %13, ptr noundef nonnull align 4 dereferenceable(36) %2, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %78 unwind label %94

78:                                               ; preds = %77
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %13, i64 12, i1 false), !tbaa.struct !5
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %13) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #8
  %79 = call noundef float @_ZN5vmath3dotERKNS_4vec3ES2_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %10)
  %80 = fpext float %79 to double
  %81 = fcmp ogt double %28, %80
  br i1 %81, label %82, label %96

82:                                               ; preds = %78
  %83 = call noundef double @_ZN11ScalarField46_evaluateTricubicFieldFunctionForRadiusSquaredEd(ptr noundef nonnull align 8 dereferenceable(248) %0, double noundef %80)
  %84 = fmul double %83, %3
  invoke void @_ZN11ScalarField19addScalarFieldValueEiiid(ptr noundef nonnull align 8 dereferenceable(248) %0, i32 noundef %.039, i32 noundef %.02641, i32 noundef %.02746, double noundef %84)
          to label %85 unwind label %72

85:                                               ; preds = %82
  %86 = load i8, ptr %38, align 8, !tbaa !37, !range !34, !noundef !35
  %87 = trunc nuw i8 %86 to i1
  br i1 %87, label %88, label %96

88:                                               ; preds = %85
  %89 = fptrunc double %83 to float
  invoke void @_ZN7Array3dIfE3addEiiif(ptr noundef nonnull align 8 dereferenceable(36) %39, i32 noundef %.039, i32 noundef %.02641, i32 noundef %.02746, float noundef %89)
          to label %96 unwind label %72

90:                                               ; preds = %74
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #8
  br label %99

92:                                               ; preds = %76
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #8
  br label %99

94:                                               ; preds = %77
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #8
  br label %99

96:                                               ; preds = %78, %88, %85, %68
  %97 = add nsw i32 %.039, 1
  %98 = load i32, ptr %6, align 4, !tbaa !28
  %.not34.not = icmp slt i32 %.039, %98
  br i1 %.not34.not, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !38

99:                                               ; preds = %94, %92, %90, %72
  %.pn = phi { ptr, i32 } [ %73, %72 ], [ %95, %94 ], [ %93, %92 ], [ %91, %90 ]
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #8
  br label %100

100:                                              ; preds = %99, %45
  %.pn.pn = phi { ptr, i32 } [ %.pn, %99 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #8
  br label %101

101:                                              ; preds = %100, %43
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %100 ], [ %44, %43 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #8
  resume { ptr, i32 } %.pn.pn.pn
}

attributes #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 #1 = { nounwind "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nounwind 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 #6 = { 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 #7 = { inlinehint mustprogress nounwind 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 #8 = { 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 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !13, i64 24}
!11 = !{!"_ZTS11ScalarField", !12, i64 0, !12, i64 4, !12, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !14, i64 80, !15, i64 88, !17, i64 128, !15, i64 160, !17, i64 200, !14, i64 232, !18, i64 236}
!12 = !{!"int", !8, i64 0}
!13 = !{!"double", !8, i64 0}
!14 = !{!"bool", !8, i64 0}
!15 = !{!"_ZTS7Array3dIfE", !12, i64 0, !12, i64 4, !12, i64 8, !16, i64 16, !14, i64 24, !7, i64 28, !12, i64 32}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"_ZTS7Array3dIbE", !12, i64 0, !12, i64 4, !12, i64 8, !16, i64 16, !14, i64 24, !14, i64 25, !12, i64 28}
!18 = !{!"_ZTSN5vmath4vec3E", !7, i64 0, !7, i64 4, !7, i64 8}
!19 = !{i64 0, i64 36, !20}
!20 = !{!8, !8, i64 0}
!21 = !{!11, !13, i64 16}
!22 = !{!11, !12, i64 0}
!23 = !{!11, !12, i64 4}
!24 = !{!11, !12, i64 8}
!25 = !{!26, !12, i64 8}
!26 = !{!"_ZTS9GridIndex", !12, i64 0, !12, i64 4, !12, i64 8}
!27 = !{!26, !12, i64 4}
!28 = !{!26, !12, i64 0}
!29 = distinct !{!29, !30, !31}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!"llvm.loop.unswitch.partial.disable"}
!32 = distinct !{!32, !30, !31}
!33 = !{!11, !14, i64 80}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!11, !13, i64 72}
!37 = !{!11, !14, i64 232}
!38 = distinct !{!38, !30}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass