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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0

; 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) #1

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

; 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

declare void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3

declare void @_ZN5vmathplERKNS_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)) #3

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN7Array3dIN14FluidBrickGrid11DensityNodeEEclEiii(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef, i32 noundef, i32 noundef) #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef float @_ZN14FluidBrickGrid18_getBrickIntensityEiii(ptr noundef nonnull align 8 dereferenceable(353) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #6 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca float, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, 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 ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %class.AABB, align 8
  %16 = alloca %"class.vmath::vec3", align 4
  %17 = alloca %"class.vmath::vec3", align 4
  %18 = alloca %struct.GridIndex, align 4
  %19 = alloca %struct.GridIndex, align 4
  %20 = alloca %class.AABB, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca double, align 8
  %29 = alloca %"struct.FluidBrickGrid::DensityNode", align 4
  %30 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  %31 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #8
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = sitofp i32 %32 to double
  %34 = getelementptr inbounds %class.FluidBrickGrid, ptr %31, i32 0, i32 5
  %35 = getelementptr inbounds %class.AABB, ptr %34, i32 0, i32 1
  %36 = load double, ptr %35, align 8, !tbaa !11
  %37 = fmul double %33, %36
  %38 = fptrunc double %37 to float
  %39 = load i32, ptr %8, align 4, !tbaa !9
  %40 = sitofp i32 %39 to double
  %41 = getelementptr inbounds %class.FluidBrickGrid, ptr %31, i32 0, i32 5
  %42 = getelementptr inbounds %class.AABB, ptr %41, i32 0, i32 2
  %43 = load double, ptr %42, align 8, !tbaa !22
  %44 = fmul double %40, %43
  %45 = fptrunc double %44 to float
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = sitofp i32 %46 to double
  %48 = getelementptr inbounds %class.FluidBrickGrid, ptr %31, i32 0, i32 5
  %49 = getelementptr inbounds %class.AABB, ptr %48, i32 0, i32 3
  %50 = load double, ptr %49, align 8, !tbaa !23
  %51 = fmul double %47, %50
  %52 = fptrunc double %51 to float
  call void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12) %10, float noundef %38, float noundef %45, float noundef %52)
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #8
  %53 = getelementptr inbounds %class.FluidBrickGrid, ptr %31, i32 0, i32 5
  %54 = getelementptr inbounds %class.AABB, ptr %53, i32 0, i32 1
  %55 = load double, ptr %54, align 8, !tbaa !11
  %56 = fptrunc double %55 to float
  %57 = getelementptr inbounds %class.FluidBrickGrid, ptr %31, i32 0, i32 5
  %58 = getelementptr inbounds %class.AABB, ptr %57, i32 0, i32 2
  %59 = load double, ptr %58, align 8, !tbaa !22
  %60 = fptrunc double %59 to float
  %61 = getelementptr inbounds %class.FluidBrickGrid, ptr %31, i32 0, i32 5
  %62 = getelementptr inbounds %class.AABB, ptr %61, i32 0, i32 3
  %63 = load double, ptr %62, align 8, !tbaa !23
  %64 = fptrunc double %63 to float
  invoke void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef %56, float noundef %60, float noundef %64)
          to label %65 unwind label %87

65:                                               ; preds = %4
  invoke void @_ZN5vmathplERKNS_4vec3ES2_(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %66 unwind label %91

66:                                               ; preds = %65
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %12) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %10, i64 12, i1 false), !tbaa.struct !24
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %11, i64 12, i1 false), !tbaa.struct !24
  invoke void @_ZN4AABBC1EN5vmath4vec3ES1_(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef %16, ptr noundef %17)
          to label %67 unwind label %96

67:                                               ; preds = %66
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %17) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %16) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #8
  invoke void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %18)
          to label %68 unwind label %100

68:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #8
  invoke void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %19)
          to label %69 unwind label %104

69:                                               ; preds = %68
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %15, i64 40, i1 false), !tbaa.struct !26
  %70 = getelementptr inbounds %class.FluidBrickGrid, ptr %31, i32 0, i32 4
  %71 = load double, ptr %70, align 8, !tbaa !28
  %72 = getelementptr inbounds %class.FluidBrickGrid, ptr %31, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !29
  %74 = getelementptr inbounds %class.FluidBrickGrid, ptr %31, i32 0, i32 1
  %75 = load i32, ptr %74, align 4, !tbaa !30
  %76 = getelementptr inbounds %class.FluidBrickGrid, ptr %31, i32 0, i32 2
  %77 = load i32, ptr %76, align 8, !tbaa !31
  invoke void @_ZN6Grid3d18getGridIndexBoundsE4AABBdiiiP9GridIndexS2_(ptr noundef %20, double noundef %71, i32 noundef %73, i32 noundef %75, i32 noundef %77, ptr noundef %18, ptr noundef %19)
          to label %78 unwind label %108

78:                                               ; preds = %69
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  store double 0.000000e+00, ptr %21, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  store double 0.000000e+00, ptr %22, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  store double 1.000000e-03, ptr %23, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %79 = getelementptr inbounds %struct.GridIndex, ptr %18, i32 0, i32 2
  %80 = load i32, ptr %79, align 4, !tbaa !32
  store i32 %80, ptr %24, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %162, %78
  %82 = load i32, ptr %24, align 4, !tbaa !9
  %83 = getelementptr inbounds %struct.GridIndex, ptr %19, i32 0, i32 2
  %84 = load i32, ptr %83, align 4, !tbaa !32
  %85 = icmp sle i32 %82, %84
  br i1 %85, label %112, label %86

86:                                               ; preds = %81
  store i32 2, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %165

87:                                               ; preds = %4
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %13, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %14, align 4
  br label %95

91:                                               ; preds = %65
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %13, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %14, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %12) #8
  br label %95

95:                                               ; preds = %91, %87
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #8
  br label %179

96:                                               ; preds = %66
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %13, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %14, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %17) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %16) #8
  br label %178

100:                                              ; preds = %67
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %13, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %14, align 4
  br label %177

104:                                              ; preds = %68
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %13, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %14, align 4
  br label %176

108:                                              ; preds = %69
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %13, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %14, align 4
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #8
  br label %176

112:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %113 = getelementptr inbounds %struct.GridIndex, ptr %18, i32 0, i32 1
  %114 = load i32, ptr %113, align 4, !tbaa !34
  store i32 %114, ptr %26, align 4, !tbaa !9
  br label %115

115:                                              ; preds = %158, %112
  %116 = load i32, ptr %26, align 4, !tbaa !9
  %117 = getelementptr inbounds %struct.GridIndex, ptr %19, i32 0, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !34
  %119 = icmp sle i32 %116, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %115
  store i32 5, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %161

121:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  %122 = getelementptr inbounds %struct.GridIndex, ptr %18, i32 0, i32 0
  %123 = load i32, ptr %122, align 4, !tbaa !35
  store i32 %123, ptr %27, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %154, %121
  %125 = load i32, ptr %27, align 4, !tbaa !9
  %126 = getelementptr inbounds %struct.GridIndex, ptr %19, i32 0, i32 0
  %127 = load i32, ptr %126, align 4, !tbaa !35
  %128 = icmp sle i32 %125, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %124
  store i32 8, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %157

130:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #8
  %131 = getelementptr inbounds %class.FluidBrickGrid, ptr %31, i32 0, i32 6
  %132 = load i32, ptr %27, align 4, !tbaa !9
  %133 = load i32, ptr %26, align 4, !tbaa !9
  %134 = load i32, ptr %24, align 4, !tbaa !9
  %135 = invoke { <2 x float>, float } @_ZN7Array3dIN14FluidBrickGrid11DensityNodeEEclEiii(ptr noundef nonnull align 8 dereferenceable(44) %131, i32 noundef %132, i32 noundef %133, i32 noundef %134)
          to label %136 unwind label %149

136:                                              ; preds = %130
  store { <2 x float>, float } %135, ptr %30, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 8 %30, i64 12, i1 false)
  %137 = getelementptr inbounds %"struct.FluidBrickGrid::DensityNode", ptr %29, i32 0, i32 0
  %138 = load float, ptr %137, align 4, !tbaa !36
  %139 = fpext float %138 to double
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #8
  store double %139, ptr %28, align 8, !tbaa !27
  %140 = load double, ptr %28, align 8, !tbaa !27
  %141 = load double, ptr %23, align 8, !tbaa !27
  %142 = fcmp ogt double %140, %141
  br i1 %142, label %143, label %153

143:                                              ; preds = %136
  %144 = load double, ptr %28, align 8, !tbaa !27
  %145 = load double, ptr %21, align 8, !tbaa !27
  %146 = fadd double %145, %144
  store double %146, ptr %21, align 8, !tbaa !27
  %147 = load double, ptr %22, align 8, !tbaa !27
  %148 = fadd double %147, 1.000000e+00
  store double %148, ptr %22, align 8, !tbaa !27
  br label %153

149:                                              ; preds = %130
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %13, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %176

153:                                              ; preds = %143, %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %27, align 4, !tbaa !9
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %27, align 4, !tbaa !9
  br label %124, !llvm.loop !37

157:                                              ; preds = %129
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %26, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %26, align 4, !tbaa !9
  br label %115, !llvm.loop !39

161:                                              ; preds = %120
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %24, align 4, !tbaa !9
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %24, align 4, !tbaa !9
  br label %81, !llvm.loop !40

165:                                              ; preds = %86
  %166 = load double, ptr %22, align 8, !tbaa !27
  %167 = fcmp oeq double %166, 0.000000e+00
  br i1 %167, label %168, label %169

168:                                              ; preds = %165
  store float 0.000000e+00, ptr %5, align 4
  store i32 1, ptr %25, align 4
  br label %174

169:                                              ; preds = %165
  %170 = load double, ptr %22, align 8, !tbaa !27
  %171 = load double, ptr %21, align 8, !tbaa !27
  %172 = fdiv double %171, %170
  store double %172, ptr %21, align 8, !tbaa !27
  %173 = fptrunc double %172 to float
  store float %173, ptr %5, align 4
  store i32 1, ptr %25, align 4
  br label %174

174:                                              ; preds = %169, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #8
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #8
  %175 = load float, ptr %5, align 4
  ret float %175

176:                                              ; preds = %149, %108, %104
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #8
  br label %177

177:                                              ; preds = %176, %100
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #8
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #8
  br label %178

178:                                              ; preds = %177, %96
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %11) #8
  br label %179

179:                                              ; preds = %178, %95
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #8
  br label %180

180:                                              ; preds = %179
  %181 = load ptr, ptr %13, align 8
  %182 = load i32, ptr %14, align 4
  %183 = insertvalue { ptr, i32 } poison, ptr %181, 0
  %184 = insertvalue { ptr, i32 } %183, i32 %182, 1
  resume { ptr, i32 } %184
}

declare void @_ZN4AABBC1EN5vmath4vec3ES1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef) unnamed_addr #3

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

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 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 #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 = { mustprogress uwtable "min-legal-vector-width"="64" "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 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 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 40}
!12 = !{!"_ZTS14FluidBrickGrid", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 16, !14, i64 24, !17, i64 64, !20, i64 112, !7, i64 152, !10, i64 272, !20, i64 280, !18, i64 320, !10, i64 324, !10, i64 328, !16, i64 332, !16, i64 336, !16, i64 340, !10, i64 344, !10, i64 348, !18, i64 352}
!13 = !{!"double", !7, i64 0}
!14 = !{!"_ZTS4AABB", !15, i64 0, !13, i64 16, !13, i64 24, !13, i64 32}
!15 = !{!"_ZTSN5vmath4vec3E", !16, i64 0, !16, i64 4, !16, i64 8}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTS7Array3dIN14FluidBrickGrid11DensityNodeEE", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !18, i64 24, !19, i64 28, !10, i64 40}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN14FluidBrickGrid11DensityNodeE", !16, i64 0, !16, i64 4, !16, i64 8}
!20 = !{!"_ZTS7Array3dI5BrickE", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !18, i64 24, !21, i64 28, !10, i64 36}
!21 = !{!"_ZTS5Brick", !16, i64 0, !18, i64 4}
!22 = !{!12, !13, i64 48}
!23 = !{!12, !13, i64 56}
!24 = !{i64 0, i64 4, !25, i64 4, i64 4, !25, i64 8, i64 4, !25}
!25 = !{!16, !16, i64 0}
!26 = !{i64 0, i64 4, !25, i64 4, i64 4, !25, i64 8, i64 4, !25, i64 16, i64 8, !27, i64 24, i64 8, !27, i64 32, i64 8, !27}
!27 = !{!13, !13, i64 0}
!28 = !{!12, !13, i64 16}
!29 = !{!12, !10, i64 0}
!30 = !{!12, !10, i64 4}
!31 = !{!12, !10, i64 8}
!32 = !{!33, !10, i64 8}
!33 = !{!"_ZTS9GridIndex", !10, i64 0, !10, i64 4, !10, i64 8}
!34 = !{!33, !10, i64 4}
!35 = !{!33, !10, i64 0}
!36 = !{!19, !16, i64 0}
!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 }
%class.AABB = type { %"class.vmath::vec3", double, double, double }
%struct.GridIndex = type { i32, i32, i32 }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0

; 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) #1

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

; 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

declare void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3

declare void @_ZN5vmathplERKNS_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 #3

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN7Array3dIN14FluidBrickGrid11DensityNodeEEclEiii(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef float @_ZN14FluidBrickGrid18_getBrickIntensityEiii(ptr noundef nonnull align 8 dereferenceable(353) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.vmath::vec3", align 4
  %6 = alloca %"class.vmath::vec3", align 4
  %7 = alloca %"class.vmath::vec3", align 4
  %8 = alloca %class.AABB, align 8
  %9 = alloca %"class.vmath::vec3", align 4
  %10 = alloca %"class.vmath::vec3", align 4
  %11 = alloca %struct.GridIndex, align 4
  %12 = alloca %struct.GridIndex, align 4
  %13 = alloca %class.AABB, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #8
  %14 = sitofp i32 %1 to double
  %15 = getelementptr inbounds i8, ptr %0, i64 40
  %16 = load double, ptr %15, align 8, !tbaa !5
  %17 = fmul double %16, %14
  %18 = fptrunc double %17 to float
  %19 = sitofp i32 %2 to double
  %20 = getelementptr inbounds i8, ptr %0, i64 48
  %21 = load double, ptr %20, align 8, !tbaa !20
  %22 = fmul double %21, %19
  %23 = fptrunc double %22 to float
  %24 = sitofp i32 %3 to double
  %25 = getelementptr inbounds i8, ptr %0, i64 56
  %26 = load double, ptr %25, align 8, !tbaa !21
  %27 = fmul double %26, %24
  %28 = fptrunc double %27 to float
  call void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef %18, float noundef %23, float noundef %28)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #8
  %29 = load double, ptr %15, align 8, !tbaa !5
  %30 = fptrunc double %29 to float
  %31 = load double, ptr %20, align 8, !tbaa !20
  %32 = fptrunc double %31 to float
  %33 = load double, ptr %25, align 8, !tbaa !21
  %34 = fptrunc double %33 to float
  invoke void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef %30, float noundef %32, float noundef %34)
          to label %35 unwind label %59

35:                                               ; preds = %4
  invoke void @_ZN5vmathplERKNS_4vec3ES2_(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %7)
          to label %36 unwind label %61

36:                                               ; preds = %35
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %7) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %5, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %6, i64 12, i1 false), !tbaa.struct !22
  invoke void @_ZN4AABBC1EN5vmath4vec3ES1_(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull %9, ptr noundef nonnull %10)
          to label %37 unwind label %64

37:                                               ; preds = %36
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #8
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #8
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef nonnull align 8 dereferenceable(40) %8, i64 40, i1 false), !tbaa.struct !24
  %38 = getelementptr inbounds i8, ptr %0, i64 16
  %39 = load double, ptr %38, align 8, !tbaa !26
  %40 = load i32, ptr %0, align 8, !tbaa !27
  %41 = getelementptr inbounds i8, ptr %0, i64 4
  %42 = load i32, ptr %41, align 4, !tbaa !28
  %43 = getelementptr inbounds i8, ptr %0, i64 8
  %44 = load i32, ptr %43, align 8, !tbaa !29
  invoke void @_ZN6Grid3d18getGridIndexBoundsE4AABBdiiiP9GridIndexS2_(ptr noundef nonnull %13, double noundef %39, i32 noundef %40, i32 noundef %42, i32 noundef %44, ptr noundef nonnull %11, ptr noundef nonnull %12)
          to label %45 unwind label %66

45:                                               ; preds = %37
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #8
  %46 = getelementptr inbounds i8, ptr %11, i64 8
  %47 = load i32, ptr %46, align 4, !tbaa !30
  %48 = getelementptr inbounds i8, ptr %12, i64 8
  %49 = load i32, ptr %48, align 4, !tbaa !30
  %.not69 = icmp sgt i32 %47, %49
  br i1 %.not69, label %._crit_edge76, label %.lr.ph75

.lr.ph75:                                         ; preds = %45
  %50 = getelementptr inbounds i8, ptr %11, i64 4
  %51 = getelementptr inbounds i8, ptr %12, i64 4
  %52 = getelementptr inbounds i8, ptr %0, i64 64
  %53 = load i32, ptr %50, align 4, !tbaa !32
  %54 = load i32, ptr %51, align 4, !tbaa !32
  %55 = icmp sgt i32 %53, %54
  br i1 %55, label %._crit_edge76, label %.lr.ph75.split

._crit_edge76:                                    ; preds = %._crit_edge65, %.lr.ph75, %45
  %.033.lcssa = phi double [ 0.000000e+00, %45 ], [ 0.000000e+00, %.lr.ph75 ], [ %.134.lcssa, %._crit_edge65 ]
  %.029.lcssa = phi double [ 0.000000e+00, %45 ], [ 0.000000e+00, %.lr.ph75 ], [ %.130.lcssa, %._crit_edge65 ]
  %56 = fcmp oeq double %.033.lcssa, 0.000000e+00
  %57 = fdiv double %.029.lcssa, %.033.lcssa
  %58 = fptrunc double %57 to float
  %.0 = select i1 %56, float 0.000000e+00, float %58
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #8
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #8
  ret float %.0

59:                                               ; preds = %4
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %63

61:                                               ; preds = %35
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %7) #8
  br label %63

63:                                               ; preds = %61, %59
  %.pn = phi { ptr, i32 } [ %62, %61 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #8
  br label %97

64:                                               ; preds = %36
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #8
  br label %96

66:                                               ; preds = %37
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #8
  br label %95

.lr.ph75.split:                                   ; preds = %.lr.ph75, %._crit_edge65
  %68 = phi i32 [ %75, %._crit_edge65 ], [ %49, %.lr.ph75 ]
  %69 = phi i32 [ %76, %._crit_edge65 ], [ %54, %.lr.ph75 ]
  %70 = phi i32 [ %77, %._crit_edge65 ], [ %54, %.lr.ph75 ]
  %.02973 = phi double [ %.130.lcssa, %._crit_edge65 ], [ 0.000000e+00, %.lr.ph75 ]
  %.03372 = phi double [ %.134.lcssa, %._crit_edge65 ], [ 0.000000e+00, %.lr.ph75 ]
  %.03970 = phi i32 [ %78, %._crit_edge65 ], [ %47, %.lr.ph75 ]
  %71 = load i32, ptr %50, align 4, !tbaa !32
  %.not4259 = icmp sgt i32 %71, %70
  br i1 %.not4259, label %._crit_edge65, label %.lr.ph64

.lr.ph64:                                         ; preds = %.lr.ph75.split
  %72 = load i32, ptr %11, align 4, !tbaa !33
  %73 = load i32, ptr %12, align 4, !tbaa !33
  %74 = icmp sgt i32 %72, %73
  br i1 %74, label %._crit_edge65, label %.lr.ph64.split

._crit_edge65.loopexit81:                         ; preds = %._crit_edge
  %.pre83 = load i32, ptr %48, align 4, !tbaa !30
  br label %._crit_edge65

._crit_edge65:                                    ; preds = %.lr.ph64, %._crit_edge65.loopexit81, %.lr.ph75.split
  %75 = phi i32 [ %68, %.lr.ph75.split ], [ %.pre83, %._crit_edge65.loopexit81 ], [ %68, %.lr.ph64 ]
  %76 = phi i32 [ %69, %.lr.ph75.split ], [ %82, %._crit_edge65.loopexit81 ], [ %69, %.lr.ph64 ]
  %77 = phi i32 [ %70, %.lr.ph75.split ], [ %82, %._crit_edge65.loopexit81 ], [ %70, %.lr.ph64 ]
  %.134.lcssa = phi double [ %.03372, %.lr.ph75.split ], [ %.235.lcssa, %._crit_edge65.loopexit81 ], [ %.03372, %.lr.ph64 ]
  %.130.lcssa = phi double [ %.02973, %.lr.ph75.split ], [ %.231.lcssa, %._crit_edge65.loopexit81 ], [ %.02973, %.lr.ph64 ]
  %78 = add nsw i32 %.03970, 1
  %.not.not = icmp slt i32 %.03970, %75
  br i1 %.not.not, label %.lr.ph75.split, label %._crit_edge76, !llvm.loop !34

.lr.ph64.split:                                   ; preds = %.lr.ph64, %._crit_edge
  %79 = phi i32 [ %82, %._crit_edge ], [ %69, %.lr.ph64 ]
  %80 = phi i32 [ %83, %._crit_edge ], [ %73, %.lr.ph64 ]
  %.13062 = phi double [ %.231.lcssa, %._crit_edge ], [ %.02973, %.lr.ph64 ]
  %.13461 = phi double [ %.235.lcssa, %._crit_edge ], [ %.03372, %.lr.ph64 ]
  %.03860 = phi i32 [ %84, %._crit_edge ], [ %71, %.lr.ph64 ]
  %81 = load i32, ptr %11, align 4, !tbaa !33
  %.not4354 = icmp sgt i32 %81, %80
  br i1 %.not4354, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %86
  %.pre = load i32, ptr %51, align 4, !tbaa !32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph64.split
  %82 = phi i32 [ %79, %.lr.ph64.split ], [ %.pre, %._crit_edge.loopexit ]
  %83 = phi i32 [ %80, %.lr.ph64.split ], [ %92, %._crit_edge.loopexit ]
  %.235.lcssa = phi double [ %.13461, %.lr.ph64.split ], [ %.336, %._crit_edge.loopexit ]
  %.231.lcssa = phi double [ %.13062, %.lr.ph64.split ], [ %.332, %._crit_edge.loopexit ]
  %84 = add nsw i32 %.03860, 1
  %.not42.not = icmp slt i32 %.03860, %82
  br i1 %.not42.not, label %.lr.ph64.split, label %._crit_edge65.loopexit81, !llvm.loop !37

.lr.ph:                                           ; preds = %.lr.ph64.split, %86
  %.23157 = phi double [ %.332, %86 ], [ %.13062, %.lr.ph64.split ]
  %.23556 = phi double [ %.336, %86 ], [ %.13461, %.lr.ph64.split ]
  %.03755 = phi i32 [ %91, %86 ], [ %81, %.lr.ph64.split ]
  %85 = invoke { <2 x float>, float } @_ZN7Array3dIN14FluidBrickGrid11DensityNodeEEclEiii(ptr noundef nonnull align 8 dereferenceable(44) %52, i32 noundef %.03755, i32 noundef %.03860, i32 noundef %.03970)
          to label %86 unwind label %93

86:                                               ; preds = %.lr.ph
  %.fca.0.extract = extractvalue { <2 x float>, float } %85, 0
  %.sroa.01.0.vec.extract = extractelement <2 x float> %.fca.0.extract, i64 0
  %87 = fpext float %.sroa.01.0.vec.extract to double
  %88 = fcmp ogt double %87, 1.000000e-03
  %89 = fadd double %.23157, %87
  %90 = fadd double %.23556, 1.000000e+00
  %.336 = select i1 %88, double %90, double %.23556
  %.332 = select i1 %88, double %89, double %.23157
  %91 = add nsw i32 %.03755, 1
  %92 = load i32, ptr %12, align 4, !tbaa !33
  %.not43.not = icmp slt i32 %.03755, %92
  br i1 %.not43.not, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !38

93:                                               ; preds = %.lr.ph
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %95

95:                                               ; preds = %93, %66
  %.pn44 = phi { ptr, i32 } [ %94, %93 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #8
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #8
  br label %96

96:                                               ; preds = %95, %64
  %.pn44.pn = phi { ptr, i32 } [ %.pn44, %95 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #8
  br label %97

97:                                               ; preds = %96, %63
  %.pn44.pn.pn = phi { ptr, i32 } [ %.pn44.pn, %96 ], [ %.pn, %63 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #8
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #8
  resume { ptr, i32 } %.pn44.pn.pn
}

declare void @_ZN4AABBC1EN5vmath4vec3ES1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef) unnamed_addr #3

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 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 #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 = { mustprogress uwtable "min-legal-vector-width"="64" "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 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, !10, i64 40}
!6 = !{!"_ZTS14FluidBrickGrid", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !11, i64 24, !14, i64 64, !18, i64 112, !8, i64 152, !7, i64 272, !18, i64 280, !16, i64 320, !7, i64 324, !7, i64 328, !13, i64 332, !13, i64 336, !13, i64 340, !7, i64 344, !7, i64 348, !16, i64 352}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"_ZTS4AABB", !12, i64 0, !10, i64 16, !10, i64 24, !10, i64 32}
!12 = !{!"_ZTSN5vmath4vec3E", !13, i64 0, !13, i64 4, !13, i64 8}
!13 = !{!"float", !8, i64 0}
!14 = !{!"_ZTS7Array3dIN14FluidBrickGrid11DensityNodeEE", !7, i64 0, !7, i64 4, !7, i64 8, !15, i64 16, !16, i64 24, !17, i64 28, !7, i64 40}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!"bool", !8, i64 0}
!17 = !{!"_ZTSN14FluidBrickGrid11DensityNodeE", !13, i64 0, !13, i64 4, !13, i64 8}
!18 = !{!"_ZTS7Array3dI5BrickE", !7, i64 0, !7, i64 4, !7, i64 8, !15, i64 16, !16, i64 24, !19, i64 28, !7, i64 36}
!19 = !{!"_ZTS5Brick", !13, i64 0, !16, i64 4}
!20 = !{!6, !10, i64 48}
!21 = !{!6, !10, i64 56}
!22 = !{i64 0, i64 4, !23, i64 4, i64 4, !23, i64 8, i64 4, !23}
!23 = !{!13, !13, i64 0}
!24 = !{i64 0, i64 4, !23, i64 4, i64 4, !23, i64 8, i64 4, !23, i64 16, i64 8, !25, i64 24, i64 8, !25, i64 32, i64 8, !25}
!25 = !{!10, !10, i64 0}
!26 = !{!6, !10, i64 16}
!27 = !{!6, !7, i64 0}
!28 = !{!6, !7, i64 4}
!29 = !{!6, !7, i64 8}
!30 = !{!31, !7, i64 8}
!31 = !{!"_ZTS9GridIndex", !7, i64 0, !7, i64 4, !7, i64 8}
!32 = !{!31, !7, i64 4}
!33 = !{!31, !7, i64 0}
!34 = distinct !{!34, !35, !36}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!"llvm.loop.unswitch.partial.disable"}
!37 = distinct !{!37, !35, !36}
!38 = distinct !{!38, !35}


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