; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Geometry (Polyhedron)

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<imp::Path, std::allocator<imp::Path>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Path, std::allocator<imp::Path>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Path, std::allocator<imp::Path>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Path, std::allocator<imp::Path>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.imp::Edge" = type { %"class.imp::Object", %"class.imp::Vec3", %"class.imp::Vec3" }
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.__gnu_cxx::__normal_iterator.15" = type { ptr }
%"class.imp::Path" = type { %"class.imp::Object", %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3imp4PathESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3imp4PathESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3imp4PathC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3imp4PathESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp10Polyhedron7cutFaceERKNS_4PathENS_4EdgeE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp10Polyhedron7cutFaceERKNS_4PathESt6vectorINS_4EdgeESaIS5_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef %2) #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca %"class.imp::Edge", align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.15", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.15", align 8
  %19 = alloca %"class.imp::Path", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  store i1 false, ptr %7, align 1
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN3imp4PathESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(48) %20)
          to label %21 unwind label %28

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %88, %21
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = call noundef i64 @_ZNKSt6vectorIN3imp4EdgeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %25 = trunc i64 %24 to i32
  %26 = icmp slt i32 %23, %25
  br i1 %26, label %32, label %27

27:                                               ; preds = %22
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %96

28:                                               ; preds = %3
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %8, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %9, align 4
  br label %100

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

33:                                               ; preds = %81, %32
  %34 = load i32, ptr %13, align 4, !tbaa !9
  %35 = call noundef i64 @_ZNKSt6vectorIN3imp4PathESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %36 = trunc i64 %35 to i32
  %37 = icmp slt i32 %34, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %33
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %85

39:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  %40 = load i32, ptr %13, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %41) #7
  %43 = load i32, ptr %10, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %44) #7
  invoke void @_ZN3imp4EdgeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(104) %15, ptr noundef nonnull align 8 dereferenceable(104) %45)
          to label %46 unwind label %57

46:                                               ; preds = %39
  invoke void @_ZN3imp10Polyhedron7cutFaceERKNS_4PathENS_4EdgeE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(48) %42, ptr noundef %15)
          to label %47 unwind label %61

47:                                               ; preds = %46
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store ptr %14, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %48 = load ptr, ptr %16, align 8, !tbaa !5
  %49 = call ptr @_ZNSt6vectorIN3imp4PathESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #7
  %50 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.15", ptr %17, i32 0, i32 0
  store ptr %49, ptr %50, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %51 = load ptr, ptr %16, align 8, !tbaa !5
  %52 = call ptr @_ZNSt6vectorIN3imp4PathESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #7
  %53 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.15", ptr %18, i32 0, i32 0
  store ptr %52, ptr %53, align 8
  br label %54

54:                                               ; preds = %69, %47
  %55 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4PathESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  br i1 %55, label %65, label %56

56:                                               ; preds = %54
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %80

57:                                               ; preds = %39
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %8, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %9, align 4
  br label %84

61:                                               ; preds = %46
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %8, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %9, align 4
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %15) #7
  br label %84

65:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 48, ptr %19) #7
  %66 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3imp4PathESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  invoke void @_ZN3imp4PathC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 8 dereferenceable(48) %66)
          to label %67 unwind label %71

67:                                               ; preds = %65
  invoke void @_ZNSt6vectorIN3imp4PathESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(48) %19)
          to label %68 unwind label %75

68:                                               ; preds = %67
  call void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #7
  br label %69

69:                                               ; preds = %68
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3imp4PathESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br label %54

71:                                               ; preds = %65
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %8, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %9, align 4
  br label %79

75:                                               ; preds = %67
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %8, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %9, align 4
  call void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #7
  br label %79

79:                                               ; preds = %75, %71
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  br label %84

80:                                               ; preds = %56
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr %13, align 4, !tbaa !9
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %13, align 4, !tbaa !9
  br label %33, !llvm.loop !11

84:                                               ; preds = %79, %61, %57
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %95

85:                                               ; preds = %38
  %86 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3imp4PathESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %87 unwind label %91

87:                                               ; preds = %85
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr %10, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %10, align 4, !tbaa !9
  br label %22, !llvm.loop !13

91:                                               ; preds = %85
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %8, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %9, align 4
  br label %95

95:                                               ; preds = %91, %84
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %100

96:                                               ; preds = %27
  store i1 true, ptr %7, align 1
  store i32 1, ptr %11, align 4
  %97 = load i1, ptr %7, align 1
  br i1 %97, label %99, label %98

98:                                               ; preds = %96
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  br label %99

99:                                               ; preds = %98, %96
  ret void

100:                                              ; preds = %95, %28
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  br label %101

101:                                              ; preds = %100
  %102 = load ptr, ptr %8, align 8
  %103 = load i32, ptr %9, align 4
  %104 = insertvalue { ptr, i32 } poison, ptr %102, 0
  %105 = insertvalue { ptr, i32 } %104, i32 %103, 1
  resume { ptr, i32 } %105
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3imp4EdgeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

declare void @_ZN3imp4EdgeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN3imp4PathESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN3imp4PathESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4PathESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3imp4PathESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3imp4PathESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3imp4PathESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 #6 = { "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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<imp::Path, std::allocator<imp::Path>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Path, std::allocator<imp::Path>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Path, std::allocator<imp::Path>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Path, std::allocator<imp::Path>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.imp::Edge" = type { %"class.imp::Object", %"class.imp::Vec3", %"class.imp::Vec3" }
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.__gnu_cxx::__normal_iterator.15" = type { ptr }
%"class.imp::Path" = type { %"class.imp::Object", %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3imp4PathESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3imp4PathESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3imp4PathC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3imp4PathESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp10Polyhedron7cutFaceERKNS_4PathENS_4EdgeE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp10Polyhedron7cutFaceERKNS_4PathESt6vectorINS_4EdgeESaIS5_EE(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.imp::Edge", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.15", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.15", align 8
  %9 = alloca %"class.imp::Path", align 8
  tail call void @_ZNSt6vectorIN3imp4PathESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  invoke void @_ZNSt6vectorIN3imp4PathESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %.preheader unwind label %13

.preheader:                                       ; preds = %3
  %10 = tail call noundef i64 @_ZNKSt6vectorIN3imp4EdgeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %11 = trunc i64 %10 to i32
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph26, label %._crit_edge27

13:                                               ; preds = %3
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %51

.lr.ph26:                                         ; preds = %.preheader, %44
  %indvars.iv29 = phi i64 [ %indvars.iv.next30, %44 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %15 = call noundef i64 @_ZNKSt6vectorIN3imp4PathESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %16 = trunc i64 %15 to i32
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph23, label %._crit_edge24

._crit_edge24:                                    ; preds = %._crit_edge, %.lr.ph26
  %18 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3imp4PathESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %44 unwind label %48

.lr.ph23:                                         ; preds = %.lr.ph26, %._crit_edge
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge ], [ 0, %.lr.ph26 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  %19 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #7
  %20 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv29) #7
  invoke void @_ZN3imp4EdgeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(104) %6, ptr noundef nonnull align 8 dereferenceable(104) %20)
          to label %21 unwind label %29

21:                                               ; preds = %.lr.ph23
  invoke void @_ZN3imp10Polyhedron7cutFaceERKNS_4PathENS_4EdgeE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull %6)
          to label %22 unwind label %31

22:                                               ; preds = %21
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %23 = call ptr @_ZNSt6vectorIN3imp4PathESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  store ptr %23, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %24 = call ptr @_ZNSt6vectorIN3imp4PathESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  store ptr %24, ptr %8, align 8
  %25 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4PathESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %25, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %35, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = call noundef i64 @_ZNKSt6vectorIN3imp4PathESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %sext = shl i64 %26, 32
  %27 = ashr exact i64 %sext, 32
  %28 = icmp slt i64 %indvars.iv.next, %27
  br i1 %28, label %.lr.ph23, label %._crit_edge24, !llvm.loop !5

29:                                               ; preds = %.lr.ph23
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %43

31:                                               ; preds = %21
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %6) #7
  br label %43

.lr.ph:                                           ; preds = %22, %35
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #7
  %33 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3imp4PathESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  invoke void @_ZN3imp4PathC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(48) %33)
          to label %34 unwind label %38

34:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorIN3imp4PathESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(48) %9)
          to label %35 unwind label %40

35:                                               ; preds = %34
  call void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #7
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3imp4PathESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %37 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4PathESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %37, label %.lr.ph, label %._crit_edge

38:                                               ; preds = %.lr.ph
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %34
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #7
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  br label %43

43:                                               ; preds = %42, %31, %29
  %.pn.pn = phi { ptr, i32 } [ %.pn, %42 ], [ %32, %31 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  br label %50

44:                                               ; preds = %._crit_edge24
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  %indvars.iv.next30 = add nuw nsw i64 %indvars.iv29, 1
  %45 = call noundef i64 @_ZNKSt6vectorIN3imp4EdgeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %sext32 = shl i64 %45, 32
  %46 = ashr exact i64 %sext32, 32
  %47 = icmp slt i64 %indvars.iv.next30, %46
  br i1 %47, label %.lr.ph26, label %._crit_edge27, !llvm.loop !7

48:                                               ; preds = %._crit_edge24
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %50

50:                                               ; preds = %48, %43
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %43 ], [ %49, %48 ]
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %51

._crit_edge27:                                    ; preds = %44, %.preheader
  ret void

51:                                               ; preds = %50, %13
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %50 ], [ %14, %13 ]
  call void @_ZNSt6vectorIN3imp4PathESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  resume { ptr, i32 } %.pn.pn.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3imp4EdgeESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(104) ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

declare void @_ZN3imp4EdgeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN3imp4PathESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN3imp4PathESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4PathESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3imp4PathESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3imp4PathESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3imp4PathESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 #6 = { "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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass