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

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

%struct.Triangle = type { [3 x i32] }
%class.GridIndexVector = type { i32, i32, i32, %"class.std::vector.15" }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.AABB = type { %"class.vmath::vec3", double, double, double }
%"class.vmath::vec3" = type { float, float, float }
%struct.GridIndex = type { i32, i32, i32 }
%class.LevelSet = type { i32, i32, i32, double, i32, %class.TriangleMesh, %class.Array3d.20, %class.Array3d.22, %class.Array3d.24, %"class.std::vector.10", double, i32, %class.Array3d.24 }
%class.TriangleMesh = type { %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.0", i32, i32, i32, double, %"class.std::vector.5", %"class.std::vector.10", %class.Array3d }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<vmath::vec3, std::allocator<vmath::vec3>>::_Vector_impl" }
%"struct.std::_Vector_base<vmath::vec3, std::allocator<vmath::vec3>>::_Vector_impl" = type { %"struct.std::_Vector_base<vmath::vec3, std::allocator<vmath::vec3>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vmath::vec3, std::allocator<vmath::vec3>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl" }
%"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl" = type { %"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Array3d = type <{ i32, i32, i32, [4 x i8], ptr, i8, [7 x i8], %"class.std::vector.15", i32, [4 x i8] }>
%class.Array3d.20 = type <{ i32, i32, i32, [4 x i8], ptr, i8, [3 x i8], float, i32, [4 x i8] }>
%class.Array3d.22 = type <{ i32, i32, i32, [4 x i8], ptr, i8, [3 x i8], i32, i32, [4 x i8] }>
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Array3d.24 = type { i32, i32, i32, ptr, i8, i8, i32 }

declare i32 @__gxx_personality_v0(...)

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

43:                                               ; preds = %4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %10, i64 40, i1 false), !tbaa.struct !44
  %44 = getelementptr inbounds %class.LevelSet, ptr %30, i32 0, i32 3
  %45 = load double, ptr %44, align 8, !tbaa !47
  %46 = getelementptr inbounds %class.LevelSet, ptr %30, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !9
  %48 = getelementptr inbounds %class.LevelSet, ptr %30, i32 0, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !40
  %50 = getelementptr inbounds %class.LevelSet, ptr %30, i32 0, i32 2
  %51 = load i32, ptr %50, align 8, !tbaa !41
  invoke void @_ZN6Grid3d18getGridCellOverlapE4AABBdiiiR15GridIndexVector(ptr noundef %15, double noundef %45, i32 noundef %47, i32 noundef %49, i32 noundef %51, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %52 unwind label %72

52:                                               ; preds = %43
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #7
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %17)
          to label %53 unwind label %76

53:                                               ; preds = %52
  %54 = getelementptr inbounds %class.LevelSet, ptr %30, i32 0, i32 3
  %55 = load double, ptr %54, align 8, !tbaa !47
  %56 = getelementptr inbounds %class.LevelSet, ptr %30, i32 0, i32 3
  %57 = load double, ptr %56, align 8, !tbaa !47
  %58 = getelementptr inbounds %class.LevelSet, ptr %30, i32 0, i32 3
  %59 = load double, ptr %58, align 8, !tbaa !47
  invoke void @_ZN4AABBC1EN5vmath4vec3Eddd(ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef %17, double noundef %55, double noundef %57, double noundef %59)
          to label %60 unwind label %80

60:                                               ; preds = %53
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !48
  br label %61

61:                                               ; preds = %123, %60
  %62 = load i32, ptr %18, align 4, !tbaa !48
  %63 = zext i32 %62 to i64
  %64 = invoke noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %65 unwind label %84

65:                                               ; preds = %61
  %66 = icmp ult i64 %63, %64
  br i1 %66, label %88, label %67

67:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %127

68:                                               ; preds = %4
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %13, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %14, align 4
  br label %130

72:                                               ; preds = %43
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %13, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %14, align 4
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #7
  br label %129

76:                                               ; preds = %52
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %13, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %14, align 4
  br label %128

80:                                               ; preds = %53
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %13, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %14, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %17) #7
  br label %128

84:                                               ; preds = %112, %108, %98, %61
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %13, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %14, align 4
  br label %126

88:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #7
  %89 = load i32, ptr %18, align 4, !tbaa !48
  %90 = invoke { i64, i32 } @_ZN15GridIndexVectorixEi(ptr noundef nonnull align 8 dereferenceable(40) %9, i32 noundef %89)
          to label %91 unwind label %118

91:                                               ; preds = %88
  store { i64, i32 } %90, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %21, i64 12, i1 false)
  %92 = getelementptr inbounds %class.LevelSet, ptr %30, i32 0, i32 3
  %93 = load double, ptr %92, align 8, !tbaa !47
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %20, i64 12, i1 false)
  %94 = getelementptr inbounds { i64, i32 }, ptr %22, i32 0, i32 0
  %95 = load i64, ptr %94, align 4
  %96 = getelementptr inbounds { i64, i32 }, ptr %22, i32 0, i32 1
  %97 = load i32, ptr %96, align 4
  invoke void @_ZN6Grid3d19GridIndexToPositionE9GridIndexd(ptr dead_on_unwind writable sret(%"class.vmath::vec3") align 4 %19, i64 %95, i32 %97, double noundef %93)
          to label %98 unwind label %118

98:                                               ; preds = %91
  %99 = getelementptr inbounds %class.AABB, ptr %16, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %99, ptr align 4 %19, i64 12, i1 false), !tbaa.struct !49
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %19) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %5, i64 12, i1 false), !tbaa.struct !42
  %100 = getelementptr inbounds %class.LevelSet, ptr %30, i32 0, i32 5
  %101 = getelementptr inbounds %class.TriangleMesh, ptr %100, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %23, i64 12, i1 false)
  %102 = getelementptr inbounds { i64, i32 }, ptr %24, i32 0, i32 0
  %103 = load i64, ptr %102, align 4
  %104 = getelementptr inbounds { i64, i32 }, ptr %24, i32 0, i32 1
  %105 = load i32, ptr %104, align 4
  %106 = invoke noundef zeroext i1 @_ZN4AABB21isOverlappingTriangleE8TriangleRSt6vectorIN5vmath4vec3ESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(40) %16, i64 %103, i32 %105, ptr noundef nonnull align 8 dereferenceable(24) %101)
          to label %107 unwind label %84

107:                                              ; preds = %98
  br i1 %106, label %108, label %122

108:                                              ; preds = %107
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = load i32, ptr %18, align 4, !tbaa !48
  %111 = invoke { i64, i32 } @_ZN15GridIndexVectorixEi(ptr noundef nonnull align 8 dereferenceable(40) %9, i32 noundef %110)
          to label %112 unwind label %84

112:                                              ; preds = %108
  store { i64, i32 } %111, ptr %26, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 8 %26, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %25, i64 12, i1 false)
  %113 = getelementptr inbounds { i64, i32 }, ptr %27, i32 0, i32 0
  %114 = load i64, ptr %113, align 4
  %115 = getelementptr inbounds { i64, i32 }, ptr %27, i32 0, i32 1
  %116 = load i32, ptr %115, align 4
  invoke void @_ZN15GridIndexVector9push_backE9GridIndex(ptr noundef nonnull align 8 dereferenceable(40) %109, i64 %114, i32 %116)
          to label %117 unwind label %84

117:                                              ; preds = %112
  br label %122

118:                                              ; preds = %91, %88
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %13, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #7
  br label %126

122:                                              ; preds = %117, %107
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %18, align 4, !tbaa !48
  %125 = add i32 %124, 1
  store i32 %125, ptr %18, align 4, !tbaa !48
  br label %61, !llvm.loop !50

126:                                              ; preds = %118, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #7
  br label %128

127:                                              ; preds = %67
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #7
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #7
  call void @_ZN15GridIndexVectorD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #7
  ret void

128:                                              ; preds = %126, %80, %76
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #7
  br label %129

129:                                              ; preds = %128, %72
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #7
  br label %130

130:                                              ; preds = %129, %68
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #7
  call void @_ZN15GridIndexVectorD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #7
  br label %131

131:                                              ; preds = %130
  %132 = load ptr, ptr %13, align 8
  %133 = load i32, ptr %14, align 4
  %134 = insertvalue { ptr, i32 } poison, ptr %132, 0
  %135 = insertvalue { ptr, i32 } %134, i32 %133, 1
  resume { ptr, i32 } %135
}

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

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

declare void @_ZN4AABBC1E8TriangleRSt6vectorIN5vmath4vec3ESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(40), i64, i32, ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d18getGridCellOverlapE4AABBdiiiR15GridIndexVector(ptr noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(40)) #4

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) #6 align 2

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

declare { i64, i32 } @_ZN15GridIndexVectorixEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #3

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

declare noundef zeroext i1 @_ZN4AABB21isOverlappingTriangleE8TriangleRSt6vectorIN5vmath4vec3ESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(40), i64, i32, ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN15GridIndexVector9push_backE9GridIndex(ptr noundef nonnull align 8 dereferenceable(40), i64, i32) #4 align 2

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

attributes #0 = { 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 #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 = { 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 #5 = { 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 #6 = { 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 #7 = { 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, !11, i64 0}
!10 = !{!"_ZTS8LevelSet", !11, i64 0, !11, i64 4, !11, i64 8, !12, i64 16, !11, i64 24, !13, i64 32, !36, i64 264, !38, i64 304, !39, i64 344, !26, i64 376, !12, i64 400, !11, i64 408, !39, i64 416}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"_ZTS12TriangleMesh", !14, i64 0, !14, i64 24, !14, i64 48, !18, i64 72, !11, i64 96, !11, i64 100, !11, i64 104, !12, i64 112, !22, i64 120, !26, i64 144, !30, i64 168}
!14 = !{!"_ZTSSt6vectorIN5vmath4vec3ESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIN5vmath4vec3ESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN5vmath4vec3ESaIS1_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN5vmath4vec3ESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSSt6vectorI8TriangleSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseI8TriangleSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI8TriangleSaIS0_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI8TriangleSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSSt6vectorIS_IiSaIiEESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSSt6vectorIdSaIdEE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"_ZTS7Array3dISt6vectorIiSaIiEEE", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !31, i64 24, !32, i64 32, !11, i64 56}
!31 = !{!"bool", !7, i64 0}
!32 = !{!"_ZTSSt6vectorIiSaIiEE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"_ZTS7Array3dIfE", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !31, i64 24, !37, i64 28, !11, i64 32}
!37 = !{!"float", !7, i64 0}
!38 = !{!"_ZTS7Array3dIiE", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !31, i64 24, !11, i64 28, !11, i64 32}
!39 = !{!"_ZTS7Array3dIbE", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !31, i64 24, !31, i64 25, !11, i64 28}
!40 = !{!10, !11, i64 4}
!41 = !{!10, !11, i64 8}
!42 = !{i64 0, i64 12, !43}
!43 = !{!7, !7, i64 0}
!44 = !{i64 0, i64 4, !45, i64 4, i64 4, !45, i64 8, i64 4, !45, i64 16, i64 8, !46, i64 24, i64 8, !46, i64 32, i64 8, !46}
!45 = !{!37, !37, i64 0}
!46 = !{!12, !12, i64 0}
!47 = !{!10, !12, i64 16}
!48 = !{!11, !11, i64 0}
!49 = !{i64 0, i64 4, !45, i64 4, i64 4, !45, i64 8, i64 4, !45}
!50 = distinct !{!50, !51}
!51 = !{!"llvm.loop.mustprogress"}


; 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.GridIndexVector = type { i32, i32, i32, %"class.std::vector.15" }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.AABB = type { %"class.vmath::vec3", double, double, double }
%"class.vmath::vec3" = type { float, float, float }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8LevelSet27_getTriangleGridCellOverlapE8TriangleR15GridIndexVector(ptr noundef nonnull align 8 dereferenceable(448) %0, i64 %1, i32 %2, ptr noundef nonnull align 8 dereferenceable(40) %3) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.GridIndexVector, align 8
  %6 = alloca %class.AABB, align 8
  %7 = alloca %class.AABB, align 8
  %8 = alloca %class.AABB, align 8
  %9 = alloca %"class.vmath::vec3", align 4
  %10 = alloca %"class.vmath::vec3", align 4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #7
  %11 = load i32, ptr %0, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !39
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !40
  call void @_ZN15GridIndexVectorC1Eiii(ptr noundef nonnull align 8 dereferenceable(40) %5, i32 noundef %11, i32 noundef %13, i32 noundef %15)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #7
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  invoke void @_ZN4AABBC1E8TriangleRSt6vectorIN5vmath4vec3ESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(40) %6, i64 %1, i32 %2, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %17 unwind label %28

17:                                               ; preds = %4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 8 dereferenceable(40) %6, i64 40, i1 false), !tbaa.struct !41
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = load double, ptr %18, align 8, !tbaa !44
  %20 = load i32, ptr %0, align 8, !tbaa !5
  %21 = load i32, ptr %12, align 4, !tbaa !39
  %22 = load i32, ptr %14, align 8, !tbaa !40
  invoke void @_ZN6Grid3d18getGridCellOverlapE4AABBdiiiR15GridIndexVector(ptr noundef nonnull %7, double noundef %19, i32 noundef %20, i32 noundef %21, i32 noundef %22, ptr noundef nonnull align 8 dereferenceable(40) %5)
          to label %23 unwind label %30

23:                                               ; preds = %17
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #7
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9)
          to label %24 unwind label %32

24:                                               ; preds = %23
  %25 = load double, ptr %18, align 8, !tbaa !44
  invoke void @_ZN4AABBC1EN5vmath4vec3Eddd(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull %9, double noundef %25, double noundef %25, double noundef %25)
          to label %26 unwind label %34

26:                                               ; preds = %24
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #7
  %27 = call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %5)
  %.not = icmp eq i64 %27, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %49, %26
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #7
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #7
  call void @_ZN15GridIndexVectorD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #7
  ret void

28:                                               ; preds = %4
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %57

30:                                               ; preds = %17
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #7
  br label %56

32:                                               ; preds = %23
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %55

34:                                               ; preds = %24
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %9) #7
  br label %55

36:                                               ; preds = %46, %44, %41
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %54

.lr.ph:                                           ; preds = %26, %49
  %.03641 = phi i32 [ %50, %49 ], [ 0, %26 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #7
  %38 = invoke { i64, i32 } @_ZN15GridIndexVectorixEi(ptr noundef nonnull align 8 dereferenceable(40) %5, i32 noundef %.03641)
          to label %39 unwind label %47

39:                                               ; preds = %.lr.ph
  %.fca.0.extract11 = extractvalue { i64, i32 } %38, 0
  %.fca.1.extract12 = extractvalue { i64, i32 } %38, 1
  %40 = load double, ptr %18, align 8, !tbaa !44
  invoke void @_ZN6Grid3d19GridIndexToPositionE9GridIndexd(ptr dead_on_unwind nonnull writable sret(%"class.vmath::vec3") align 4 %10, i64 %.fca.0.extract11, i32 %.fca.1.extract12, double noundef %40)
          to label %41 unwind label %47

41:                                               ; preds = %39
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %10, i64 12, i1 false), !tbaa.struct !45
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %10) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  %42 = invoke noundef zeroext i1 @_ZN4AABB21isOverlappingTriangleE8TriangleRSt6vectorIN5vmath4vec3ESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 %1, i32 %2, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %43 unwind label %36

43:                                               ; preds = %41
  br i1 %42, label %44, label %49

44:                                               ; preds = %43
  %45 = invoke { i64, i32 } @_ZN15GridIndexVectorixEi(ptr noundef nonnull align 8 dereferenceable(40) %5, i32 noundef %.03641)
          to label %46 unwind label %36

46:                                               ; preds = %44
  %.fca.0.extract = extractvalue { i64, i32 } %45, 0
  %.fca.1.extract = extractvalue { i64, i32 } %45, 1
  invoke void @_ZN15GridIndexVector9push_backE9GridIndex(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 %.fca.0.extract, i32 %.fca.1.extract)
          to label %49 unwind label %36

47:                                               ; preds = %39, %.lr.ph
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  br label %54

49:                                               ; preds = %43, %46
  %50 = add i32 %.03641, 1
  %51 = zext i32 %50 to i64
  %52 = call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %5)
  %53 = icmp ugt i64 %52, %51
  br i1 %53, label %.lr.ph, label %._crit_edge, !llvm.loop !46

54:                                               ; preds = %47, %36
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %48, %47 ]
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  br label %55

55:                                               ; preds = %54, %34, %32
  %.pn.pn = phi { ptr, i32 } [ %.pn, %54 ], [ %35, %34 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #7
  br label %56

56:                                               ; preds = %55, %30
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %55 ], [ %31, %30 ]
  call void @_ZN4AABBD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #7
  br label %57

57:                                               ; preds = %56, %28
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %56 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #7
  call void @_ZN15GridIndexVectorD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn.pn.pn.pn
}

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

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

declare void @_ZN4AABBC1E8TriangleRSt6vectorIN5vmath4vec3ESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(40), i64, i32, ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Grid3d18getGridCellOverlapE4AABBdiiiR15GridIndexVector(ptr noundef, double noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #6 align 2

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

declare { i64, i32 } @_ZN15GridIndexVectorixEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #3

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

declare noundef zeroext i1 @_ZN4AABB21isOverlappingTriangleE8TriangleRSt6vectorIN5vmath4vec3ESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(40), i64, i32, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN15GridIndexVector9push_backE9GridIndex(ptr noundef nonnull align 8 dereferenceable(40), i64, i32) local_unnamed_addr #4 align 2

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

attributes #0 = { 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 #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 = { 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 #5 = { 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 #6 = { 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 #7 = { 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, !7, i64 0}
!6 = !{!"_ZTS8LevelSet", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !7, i64 24, !11, i64 32, !35, i64 264, !37, i64 304, !38, i64 344, !25, i64 376, !10, i64 400, !7, i64 408, !38, i64 416}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"_ZTS12TriangleMesh", !12, i64 0, !12, i64 24, !12, i64 48, !17, i64 72, !7, i64 96, !7, i64 100, !7, i64 104, !10, i64 112, !21, i64 120, !25, i64 144, !29, i64 168}
!12 = !{!"_ZTSSt6vectorIN5vmath4vec3ESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIN5vmath4vec3ESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN5vmath4vec3ESaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN5vmath4vec3ESaIS1_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"_ZTSSt6vectorI8TriangleSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseI8TriangleSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI8TriangleSaIS0_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI8TriangleSaIS0_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!21 = !{!"_ZTSSt6vectorIS_IiSaIiEESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!25 = !{!"_ZTSSt6vectorIdSaIdEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!29 = !{!"_ZTS7Array3dISt6vectorIiSaIiEEE", !7, i64 0, !7, i64 4, !7, i64 8, !16, i64 16, !30, i64 24, !31, i64 32, !7, i64 56}
!30 = !{!"bool", !8, i64 0}
!31 = !{!"_ZTSSt6vectorIiSaIiEE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!35 = !{!"_ZTS7Array3dIfE", !7, i64 0, !7, i64 4, !7, i64 8, !16, i64 16, !30, i64 24, !36, i64 28, !7, i64 32}
!36 = !{!"float", !8, i64 0}
!37 = !{!"_ZTS7Array3dIiE", !7, i64 0, !7, i64 4, !7, i64 8, !16, i64 16, !30, i64 24, !7, i64 28, !7, i64 32}
!38 = !{!"_ZTS7Array3dIbE", !7, i64 0, !7, i64 4, !7, i64 8, !16, i64 16, !30, i64 24, !30, i64 25, !7, i64 28}
!39 = !{!6, !7, i64 4}
!40 = !{!6, !7, i64 8}
!41 = !{i64 0, i64 4, !42, i64 4, i64 4, !42, i64 8, i64 4, !42, i64 16, i64 8, !43, i64 24, i64 8, !43, i64 32, i64 8, !43}
!42 = !{!36, !36, i64 0}
!43 = !{!10, !10, i64 0}
!44 = !{!6, !10, i64 16}
!45 = !{i64 0, i64 4, !42, i64 4, i64 4, !42, i64 8, i64 4, !42}
!46 = distinct !{!46, !47}
!47 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass