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

; 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.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.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.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 }

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

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

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

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

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8LevelSet25_getNeighbourGridIndices6E9GridIndexPS0_(ptr noundef nonnull align 8 dereferenceable(448), i64, i32, ptr noundef) #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8LevelSet14_getLayerCellsEiR15GridIndexVectorS1_R7Array3dIiE(ptr noundef nonnull align 8 dereferenceable(448) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull align 8 dereferenceable(36) %4) #6 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca [6 x %struct.GridIndex], align 16
  %12 = alloca %struct.GridIndex, align 4
  %13 = alloca %struct.GridIndex, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.GridIndex, align 4
  %17 = alloca { i64, i32 }, align 8
  %18 = alloca %struct.GridIndex, align 4
  %19 = alloca { i64, i32 }, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.GridIndex, align 4
  %22 = alloca { i64, i32 }, align 4
  %23 = alloca %struct.GridIndex, align 4
  %24 = alloca { i64, i32 }, align 4
  %25 = alloca %struct.GridIndex, align 4
  %26 = alloca { i64, i32 }, align 4
  %27 = alloca %struct.GridIndex, align 4
  %28 = alloca { i64, i32 }, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %29 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr %11) #7
  %30 = getelementptr inbounds [6 x %struct.GridIndex], ptr %11, i32 0, i32 0
  %31 = getelementptr inbounds %struct.GridIndex, ptr %30, i64 6
  br label %32

32:                                               ; preds = %32, %5
  %33 = phi ptr [ %30, %5 ], [ %34, %32 ]
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %33)
  %34 = getelementptr inbounds %struct.GridIndex, ptr %33, i64 1
  %35 = icmp eq ptr %34, %31
  br i1 %35, label %36, label %32

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #7
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #7
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %97, %36
  %38 = load i32, ptr %14, align 4, !tbaa !9
  %39 = zext i32 %38 to i64
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %40)
  %42 = icmp ult i64 %39, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %37
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %100

44:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #7
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = load i32, ptr %14, align 4, !tbaa !9
  %47 = call { i64, i32 } @_ZN15GridIndexVectorixEi(ptr noundef nonnull align 8 dereferenceable(40) %45, i32 noundef %46)
  store { i64, i32 } %47, ptr %17, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %17, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %16, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %12, i64 12, i1 false), !tbaa.struct !11
  %48 = getelementptr inbounds [6 x %struct.GridIndex], ptr %11, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %18, i64 12, i1 false)
  %49 = getelementptr inbounds { i64, i32 }, ptr %19, i32 0, i32 0
  %50 = load i64, ptr %49, align 4
  %51 = getelementptr inbounds { i64, i32 }, ptr %19, i32 0, i32 1
  %52 = load i32, ptr %51, align 4
  call void @_ZN8LevelSet25_getNeighbourGridIndices6E9GridIndexPS0_(ptr noundef nonnull align 8 dereferenceable(448) %29, i64 %50, i32 %52, ptr noundef %48)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %93, %44
  %54 = load i32, ptr %20, align 4, !tbaa !9
  %55 = icmp slt i32 %54, 6
  br i1 %55, label %57, label %56

56:                                               ; preds = %53
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %96

57:                                               ; preds = %53
  %58 = load i32, ptr %20, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [6 x %struct.GridIndex], ptr %11, i64 0, i64 %59
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %60, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %13, i64 12, i1 false), !tbaa.struct !11
  %61 = getelementptr inbounds %class.LevelSet, ptr %29, i32 0, i32 0
  %62 = load i32, ptr %61, align 8, !tbaa !12
  %63 = getelementptr inbounds %class.LevelSet, ptr %29, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !42
  %65 = getelementptr inbounds %class.LevelSet, ptr %29, i32 0, i32 2
  %66 = load i32, ptr %65, align 8, !tbaa !43
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %21, i64 12, i1 false)
  %67 = getelementptr inbounds { i64, i32 }, ptr %22, i32 0, i32 0
  %68 = load i64, ptr %67, align 4
  %69 = getelementptr inbounds { i64, i32 }, ptr %22, i32 0, i32 1
  %70 = load i32, ptr %69, align 4
  %71 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %68, i32 %70, i32 noundef %62, i32 noundef %64, i32 noundef %66)
  br i1 %71, label %72, label %92

72:                                               ; preds = %57
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %13, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %23, i64 12, i1 false)
  %74 = getelementptr inbounds { i64, i32 }, ptr %24, i32 0, i32 0
  %75 = load i64, ptr %74, align 4
  %76 = getelementptr inbounds { i64, i32 }, ptr %24, i32 0, i32 1
  %77 = load i32, ptr %76, align 4
  %78 = call noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %73, i64 %75, i32 %77)
  %79 = icmp eq i32 %78, -1
  br i1 %79, label %80, label %92

80:                                               ; preds = %72
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %13, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %25, i64 12, i1 false)
  %82 = getelementptr inbounds { i64, i32 }, ptr %26, i32 0, i32 0
  %83 = load i64, ptr %82, align 4
  %84 = getelementptr inbounds { i64, i32 }, ptr %26, i32 0, i32 1
  %85 = load i32, ptr %84, align 4
  call void @_ZN15GridIndexVector9push_backE9GridIndex(ptr noundef nonnull align 8 dereferenceable(40) %81, i64 %83, i32 %85)
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %13, i64 12, i1 false), !tbaa.struct !11
  %87 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %27, i64 12, i1 false)
  %88 = getelementptr inbounds { i64, i32 }, ptr %28, i32 0, i32 0
  %89 = load i64, ptr %88, align 4
  %90 = getelementptr inbounds { i64, i32 }, ptr %28, i32 0, i32 1
  %91 = load i32, ptr %90, align 4
  call void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %86, i64 %89, i32 %91, i32 noundef %87)
  br label %92

92:                                               ; preds = %80, %72, %57
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %20, align 4, !tbaa !9
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %20, align 4, !tbaa !9
  br label %53, !llvm.loop !44

96:                                               ; preds = %56
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %14, align 4, !tbaa !9
  %99 = add i32 %98, 1
  store i32 %99, ptr %14, align 4, !tbaa !9
  br label %37, !llvm.loop !46

100:                                              ; preds = %43
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %11) #7
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64, i32, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36), i64, i32) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36), i64, i32, i32 noundef) #6 align 2

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


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

%struct.GridIndex = type { i32, i32, i32 }

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

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

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

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

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8LevelSet25_getNeighbourGridIndices6E9GridIndexPS0_(ptr noundef nonnull align 8 dereferenceable(448), i64, i32, ptr noundef) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8LevelSet14_getLayerCellsEiR15GridIndexVectorS1_R7Array3dIiE(ptr noundef nonnull align 8 dereferenceable(448) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull align 8 dereferenceable(36) %4) local_unnamed_addr #6 align 2 {
  %6 = alloca [6 x %struct.GridIndex], align 16
  %7 = alloca %struct.GridIndex, align 8
  %8 = alloca %struct.GridIndex, align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6) #7
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %6)
  %.ptr.1 = getelementptr inbounds i8, ptr %6, i64 12
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %6, i64 24
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.2)
  %.ptr.3 = getelementptr inbounds i8, ptr %6, i64 36
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.3)
  %.ptr.4 = getelementptr inbounds i8, ptr %6, i64 48
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.4)
  %.ptr.5 = getelementptr inbounds i8, ptr %6, i64 60
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.5)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #7
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #7
  call void @_ZN9GridIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %8)
  %9 = call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %2)
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %.sroa.214.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  %10 = getelementptr inbounds i8, ptr %0, i64 4
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  br label %12

._crit_edge:                                      ; preds = %67, %5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #7
  ret void

12:                                               ; preds = %.lr.ph, %67
  %.036 = phi i32 [ 0, %.lr.ph ], [ %68, %67 ]
  %13 = call { i64, i32 } @_ZN15GridIndexVectorixEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef %.036)
  %.fca.0.extract = extractvalue { i64, i32 } %13, 0
  %.fca.1.extract = extractvalue { i64, i32 } %13, 1
  store i64 %.fca.0.extract, ptr %7, align 8
  store i32 %.fca.1.extract, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN8LevelSet25_getNeighbourGridIndices6E9GridIndexPS0_(ptr noundef nonnull align 8 dereferenceable(448) %0, i64 %.fca.0.extract, i32 %.fca.1.extract, ptr noundef nonnull %6)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 16 dereferenceable(12) %6, i64 12, i1 false), !tbaa.struct !9
  %.sroa.013.0.copyload = load i64, ptr %8, align 8
  %.sroa.214.0.copyload = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  %14 = load i32, ptr %0, align 8, !tbaa !10
  %15 = load i32, ptr %10, align 4, !tbaa !41
  %16 = load i32, ptr %11, align 8, !tbaa !42
  %17 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.013.0.copyload, i32 %.sroa.214.0.copyload, i32 noundef %14, i32 noundef %15, i32 noundef %16)
  br i1 %17, label %18, label %22

18:                                               ; preds = %12
  %.sroa.09.0.copyload = load i64, ptr %8, align 8
  %.sroa.210.0.copyload = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  %19 = call noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.09.0.copyload, i32 %.sroa.210.0.copyload)
  %20 = icmp eq i32 %19, -1
  br i1 %20, label %21, label %22

21:                                               ; preds = %18
  %.sroa.05.0.copyload = load i64, ptr %8, align 8
  %.sroa.26.0.copyload = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN15GridIndexVector9push_backE9GridIndex(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 %.sroa.05.0.copyload, i32 %.sroa.26.0.copyload)
  %.sroa.01.0.copyload = load i64, ptr %8, align 8
  %.sroa.22.0.copyload = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.01.0.copyload, i32 %.sroa.22.0.copyload, i32 noundef %1)
  br label %22

22:                                               ; preds = %12, %18, %21
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1, i64 12, i1 false), !tbaa.struct !9
  %.sroa.013.0.copyload.1 = load i64, ptr %8, align 8
  %.sroa.214.0.copyload.1 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  %23 = load i32, ptr %0, align 8, !tbaa !10
  %24 = load i32, ptr %10, align 4, !tbaa !41
  %25 = load i32, ptr %11, align 8, !tbaa !42
  %26 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.013.0.copyload.1, i32 %.sroa.214.0.copyload.1, i32 noundef %23, i32 noundef %24, i32 noundef %25)
  br i1 %26, label %27, label %31

27:                                               ; preds = %22
  %.sroa.09.0.copyload.1 = load i64, ptr %8, align 8
  %.sroa.210.0.copyload.1 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  %28 = call noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.09.0.copyload.1, i32 %.sroa.210.0.copyload.1)
  %29 = icmp eq i32 %28, -1
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  %.sroa.05.0.copyload.1 = load i64, ptr %8, align 8
  %.sroa.26.0.copyload.1 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN15GridIndexVector9push_backE9GridIndex(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 %.sroa.05.0.copyload.1, i32 %.sroa.26.0.copyload.1)
  %.sroa.01.0.copyload.1 = load i64, ptr %8, align 8
  %.sroa.22.0.copyload.1 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.01.0.copyload.1, i32 %.sroa.22.0.copyload.1, i32 noundef %1)
  br label %31

31:                                               ; preds = %30, %27, %22
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(12) %.ptr.2, i64 12, i1 false), !tbaa.struct !9
  %.sroa.013.0.copyload.2 = load i64, ptr %8, align 8
  %.sroa.214.0.copyload.2 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  %32 = load i32, ptr %0, align 8, !tbaa !10
  %33 = load i32, ptr %10, align 4, !tbaa !41
  %34 = load i32, ptr %11, align 8, !tbaa !42
  %35 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.013.0.copyload.2, i32 %.sroa.214.0.copyload.2, i32 noundef %32, i32 noundef %33, i32 noundef %34)
  br i1 %35, label %36, label %40

36:                                               ; preds = %31
  %.sroa.09.0.copyload.2 = load i64, ptr %8, align 8
  %.sroa.210.0.copyload.2 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  %37 = call noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.09.0.copyload.2, i32 %.sroa.210.0.copyload.2)
  %38 = icmp eq i32 %37, -1
  br i1 %38, label %39, label %40

39:                                               ; preds = %36
  %.sroa.05.0.copyload.2 = load i64, ptr %8, align 8
  %.sroa.26.0.copyload.2 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN15GridIndexVector9push_backE9GridIndex(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 %.sroa.05.0.copyload.2, i32 %.sroa.26.0.copyload.2)
  %.sroa.01.0.copyload.2 = load i64, ptr %8, align 8
  %.sroa.22.0.copyload.2 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.01.0.copyload.2, i32 %.sroa.22.0.copyload.2, i32 noundef %1)
  br label %40

40:                                               ; preds = %39, %36, %31
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.3, i64 12, i1 false), !tbaa.struct !9
  %.sroa.013.0.copyload.3 = load i64, ptr %8, align 8
  %.sroa.214.0.copyload.3 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  %41 = load i32, ptr %0, align 8, !tbaa !10
  %42 = load i32, ptr %10, align 4, !tbaa !41
  %43 = load i32, ptr %11, align 8, !tbaa !42
  %44 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.013.0.copyload.3, i32 %.sroa.214.0.copyload.3, i32 noundef %41, i32 noundef %42, i32 noundef %43)
  br i1 %44, label %45, label %49

45:                                               ; preds = %40
  %.sroa.09.0.copyload.3 = load i64, ptr %8, align 8
  %.sroa.210.0.copyload.3 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  %46 = call noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.09.0.copyload.3, i32 %.sroa.210.0.copyload.3)
  %47 = icmp eq i32 %46, -1
  br i1 %47, label %48, label %49

48:                                               ; preds = %45
  %.sroa.05.0.copyload.3 = load i64, ptr %8, align 8
  %.sroa.26.0.copyload.3 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN15GridIndexVector9push_backE9GridIndex(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 %.sroa.05.0.copyload.3, i32 %.sroa.26.0.copyload.3)
  %.sroa.01.0.copyload.3 = load i64, ptr %8, align 8
  %.sroa.22.0.copyload.3 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.01.0.copyload.3, i32 %.sroa.22.0.copyload.3, i32 noundef %1)
  br label %49

49:                                               ; preds = %48, %45, %40
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 16 dereferenceable(12) %.ptr.4, i64 12, i1 false), !tbaa.struct !9
  %.sroa.013.0.copyload.4 = load i64, ptr %8, align 8
  %.sroa.214.0.copyload.4 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  %50 = load i32, ptr %0, align 8, !tbaa !10
  %51 = load i32, ptr %10, align 4, !tbaa !41
  %52 = load i32, ptr %11, align 8, !tbaa !42
  %53 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.013.0.copyload.4, i32 %.sroa.214.0.copyload.4, i32 noundef %50, i32 noundef %51, i32 noundef %52)
  br i1 %53, label %54, label %58

54:                                               ; preds = %49
  %.sroa.09.0.copyload.4 = load i64, ptr %8, align 8
  %.sroa.210.0.copyload.4 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  %55 = call noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.09.0.copyload.4, i32 %.sroa.210.0.copyload.4)
  %56 = icmp eq i32 %55, -1
  br i1 %56, label %57, label %58

57:                                               ; preds = %54
  %.sroa.05.0.copyload.4 = load i64, ptr %8, align 8
  %.sroa.26.0.copyload.4 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN15GridIndexVector9push_backE9GridIndex(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 %.sroa.05.0.copyload.4, i32 %.sroa.26.0.copyload.4)
  %.sroa.01.0.copyload.4 = load i64, ptr %8, align 8
  %.sroa.22.0.copyload.4 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.01.0.copyload.4, i32 %.sroa.22.0.copyload.4, i32 noundef %1)
  br label %58

58:                                               ; preds = %57, %54, %49
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.5, i64 12, i1 false), !tbaa.struct !9
  %.sroa.013.0.copyload.5 = load i64, ptr %8, align 8
  %.sroa.214.0.copyload.5 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  %59 = load i32, ptr %0, align 8, !tbaa !10
  %60 = load i32, ptr %10, align 4, !tbaa !41
  %61 = load i32, ptr %11, align 8, !tbaa !42
  %62 = call noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64 %.sroa.013.0.copyload.5, i32 %.sroa.214.0.copyload.5, i32 noundef %59, i32 noundef %60, i32 noundef %61)
  br i1 %62, label %63, label %67

63:                                               ; preds = %58
  %.sroa.09.0.copyload.5 = load i64, ptr %8, align 8
  %.sroa.210.0.copyload.5 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  %64 = call noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.09.0.copyload.5, i32 %.sroa.210.0.copyload.5)
  %65 = icmp eq i32 %64, -1
  br i1 %65, label %66, label %67

66:                                               ; preds = %63
  %.sroa.05.0.copyload.5 = load i64, ptr %8, align 8
  %.sroa.26.0.copyload.5 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN15GridIndexVector9push_backE9GridIndex(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 %.sroa.05.0.copyload.5, i32 %.sroa.26.0.copyload.5)
  %.sroa.01.0.copyload.5 = load i64, ptr %8, align 8
  %.sroa.22.0.copyload.5 = load i32, ptr %.sroa.214.0..sroa_idx, align 8, !tbaa !5
  call void @_ZN7Array3dIiE3setE9GridIndexi(ptr noundef nonnull align 8 dereferenceable(36) %4, i64 %.sroa.01.0.copyload.5, i32 %.sroa.22.0.copyload.5, i32 noundef %1)
  br label %67

67:                                               ; preds = %66, %63, %58
  %68 = add i32 %.036, 1
  %69 = zext i32 %68 to i64
  %70 = call noundef i64 @_ZN15GridIndexVector4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %2)
  %71 = icmp ugt i64 %70, %69
  br i1 %71, label %12, label %._crit_edge, !llvm.loop !43
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Grid3d18isGridIndexInRangeE9GridIndexiii(i64, i32, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7Array3dIiEclE9GridIndex(ptr noundef nonnull align 8 dereferenceable(36), i64, i32) local_unnamed_addr #6 align 2

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

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


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