; LLVM IR from erayzesen/QuarkPhysics :: QuarkPhysics/polypartition (polypartition)

; 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.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.TPPLPartition::MonotoneVertex" = type { %struct.TPPLPoint, i64, i64 }
%struct.TPPLPoint = type { double, double, i32 }
%"struct.TPPLPartition::ScanLineEdge" = type { i64, %struct.TPPLPoint, %struct.TPPLPoint }

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #2 align 2 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store i64 %3, ptr %13, align 8, !tbaa !9
  store i64 %4, ptr %14, align 8, !tbaa !9
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  %23 = load ptr, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %24 = load ptr, ptr %12, align 8, !tbaa !5
  %25 = load i64, ptr %24, align 8, !tbaa !9
  store i64 %25, ptr %19, align 8, !tbaa !9
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  %27 = load i64, ptr %26, align 8, !tbaa !9
  %28 = add nsw i64 %27, 1
  store i64 %28, ptr %26, align 8, !tbaa !9
  %29 = load ptr, ptr %12, align 8, !tbaa !5
  %30 = load i64, ptr %29, align 8, !tbaa !9
  store i64 %30, ptr %20, align 8, !tbaa !9
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = add nsw i64 %32, 1
  store i64 %33, ptr %31, align 8, !tbaa !9
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = load i64, ptr %13, align 8, !tbaa !9
  %36 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %34, i64 %35
  %37 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = load i64, ptr %19, align 8, !tbaa !9
  %40 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %38, i64 %39
  %41 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %41, ptr align 8 %37, i64 24, i1 false), !tbaa.struct !11
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = load i64, ptr %14, align 8, !tbaa !9
  %44 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %42, i64 %43
  %45 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %44, i32 0, i32 0
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = load i64, ptr %20, align 8, !tbaa !9
  %48 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %46, i64 %47
  %49 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %48, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %49, ptr align 8 %45, i64 24, i1 false), !tbaa.struct !11
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = load i64, ptr %14, align 8, !tbaa !9
  %52 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %50, i64 %51
  %53 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %52, i32 0, i32 2
  %54 = load i64, ptr %53, align 8, !tbaa !16
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = load i64, ptr %20, align 8, !tbaa !9
  %57 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %55, i64 %56
  %58 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %57, i32 0, i32 2
  store i64 %54, ptr %58, align 8, !tbaa !16
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = load i64, ptr %13, align 8, !tbaa !9
  %61 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %59, i64 %60
  %62 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %61, i32 0, i32 2
  %63 = load i64, ptr %62, align 8, !tbaa !16
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = load i64, ptr %19, align 8, !tbaa !9
  %66 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %64, i64 %65
  %67 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %66, i32 0, i32 2
  store i64 %63, ptr %67, align 8, !tbaa !16
  %68 = load i64, ptr %20, align 8, !tbaa !9
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = load i64, ptr %14, align 8, !tbaa !9
  %72 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %70, i64 %71
  %73 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %72, i32 0, i32 2
  %74 = load i64, ptr %73, align 8, !tbaa !16
  %75 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %69, i64 %74
  %76 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %75, i32 0, i32 1
  store i64 %68, ptr %76, align 8, !tbaa !19
  %77 = load i64, ptr %19, align 8, !tbaa !9
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = load i64, ptr %13, align 8, !tbaa !9
  %81 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %79, i64 %80
  %82 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %81, i32 0, i32 2
  %83 = load i64, ptr %82, align 8, !tbaa !16
  %84 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %78, i64 %83
  %85 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %84, i32 0, i32 1
  store i64 %77, ptr %85, align 8, !tbaa !19
  %86 = load i64, ptr %20, align 8, !tbaa !9
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = load i64, ptr %13, align 8, !tbaa !9
  %89 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %87, i64 %88
  %90 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %89, i32 0, i32 2
  store i64 %86, ptr %90, align 8, !tbaa !16
  %91 = load i64, ptr %13, align 8, !tbaa !9
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = load i64, ptr %20, align 8, !tbaa !9
  %94 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %92, i64 %93
  %95 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %94, i32 0, i32 1
  store i64 %91, ptr %95, align 8, !tbaa !19
  %96 = load i64, ptr %19, align 8, !tbaa !9
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = load i64, ptr %14, align 8, !tbaa !9
  %99 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %97, i64 %98
  %100 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %99, i32 0, i32 2
  store i64 %96, ptr %100, align 8, !tbaa !16
  %101 = load i64, ptr %14, align 8, !tbaa !9
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = load i64, ptr %19, align 8, !tbaa !9
  %104 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %102, i64 %103
  %105 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %104, i32 0, i32 1
  store i64 %101, ptr %105, align 8, !tbaa !19
  %106 = load ptr, ptr %15, align 8, !tbaa !5
  %107 = load i64, ptr %13, align 8, !tbaa !9
  %108 = getelementptr inbounds i32, ptr %106, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !20
  %110 = load ptr, ptr %15, align 8, !tbaa !5
  %111 = load i64, ptr %19, align 8, !tbaa !9
  %112 = getelementptr inbounds i32, ptr %110, i64 %111
  store i32 %109, ptr %112, align 4, !tbaa !20
  %113 = load ptr, ptr %16, align 8, !tbaa !5
  %114 = load i64, ptr %13, align 8, !tbaa !9
  %115 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %113, i64 %114
  %116 = load ptr, ptr %16, align 8, !tbaa !5
  %117 = load i64, ptr %19, align 8, !tbaa !9
  %118 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %116, i64 %117
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %118, ptr align 8 %115, i64 8, i1 false), !tbaa.struct !22
  %119 = load ptr, ptr %18, align 8, !tbaa !5
  %120 = load i64, ptr %13, align 8, !tbaa !9
  %121 = getelementptr inbounds i64, ptr %119, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !9
  %123 = load ptr, ptr %18, align 8, !tbaa !5
  %124 = load i64, ptr %19, align 8, !tbaa !9
  %125 = getelementptr inbounds i64, ptr %123, i64 %124
  store i64 %122, ptr %125, align 8, !tbaa !9
  %126 = load ptr, ptr %16, align 8, !tbaa !5
  %127 = load i64, ptr %19, align 8, !tbaa !9
  %128 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %126, i64 %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %129 = load ptr, ptr %17, align 8, !tbaa !5
  %130 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %129) #3
  %131 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %21, i32 0, i32 0
  store ptr %130, ptr %131, align 8
  %132 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %128, ptr noundef nonnull align 8 dereferenceable(8) %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  br i1 %132, label %133, label %140

133:                                              ; preds = %9
  %134 = load i64, ptr %19, align 8, !tbaa !9
  %135 = load ptr, ptr %16, align 8, !tbaa !5
  %136 = load i64, ptr %19, align 8, !tbaa !9
  %137 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %135, i64 %136
  %138 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %137) #3
  %139 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %138, i32 0, i32 0
  store i64 %134, ptr %139, align 8, !tbaa !23
  br label %140

140:                                              ; preds = %133, %9
  %141 = load ptr, ptr %15, align 8, !tbaa !5
  %142 = load i64, ptr %14, align 8, !tbaa !9
  %143 = getelementptr inbounds i32, ptr %141, i64 %142
  %144 = load i32, ptr %143, align 4, !tbaa !20
  %145 = load ptr, ptr %15, align 8, !tbaa !5
  %146 = load i64, ptr %20, align 8, !tbaa !9
  %147 = getelementptr inbounds i32, ptr %145, i64 %146
  store i32 %144, ptr %147, align 4, !tbaa !20
  %148 = load ptr, ptr %16, align 8, !tbaa !5
  %149 = load i64, ptr %14, align 8, !tbaa !9
  %150 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %148, i64 %149
  %151 = load ptr, ptr %16, align 8, !tbaa !5
  %152 = load i64, ptr %20, align 8, !tbaa !9
  %153 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %151, i64 %152
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %153, ptr align 8 %150, i64 8, i1 false), !tbaa.struct !22
  %154 = load ptr, ptr %18, align 8, !tbaa !5
  %155 = load i64, ptr %14, align 8, !tbaa !9
  %156 = getelementptr inbounds i64, ptr %154, i64 %155
  %157 = load i64, ptr %156, align 8, !tbaa !9
  %158 = load ptr, ptr %18, align 8, !tbaa !5
  %159 = load i64, ptr %20, align 8, !tbaa !9
  %160 = getelementptr inbounds i64, ptr %158, i64 %159
  store i64 %157, ptr %160, align 8, !tbaa !9
  %161 = load ptr, ptr %16, align 8, !tbaa !5
  %162 = load i64, ptr %20, align 8, !tbaa !9
  %163 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %161, i64 %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %164 = load ptr, ptr %17, align 8, !tbaa !5
  %165 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %164) #3
  %166 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %22, i32 0, i32 0
  store ptr %165, ptr %166, align 8
  %167 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %163, ptr noundef nonnull align 8 dereferenceable(8) %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  br i1 %167, label %168, label %175

168:                                              ; preds = %140
  %169 = load i64, ptr %20, align 8, !tbaa !9
  %170 = load ptr, ptr %16, align 8, !tbaa !5
  %171 = load i64, ptr %20, align 8, !tbaa !9
  %172 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %170, i64 %171
  %173 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %172) #3
  %174 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %173, i32 0, i32 0
  store i64 %169, ptr %174, align 8, !tbaa !23
  br label %175

175:                                              ; preds = %168, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  ret void
}

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

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

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = !{!"long", !7, i64 0}
!11 = !{i64 0, i64 8, !12, i64 8, i64 8, !12, i64 16, i64 4, !14}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !10, i64 32}
!17 = !{!"_ZTSN13TPPLPartition14MonotoneVertexE", !18, i64 0, !10, i64 24, !10, i64 32}
!18 = !{!"_ZTS9TPPLPoint", !13, i64 0, !13, i64 8, !15, i64 16}
!19 = !{!17, !10, i64 24}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTS14TPPLVertexType", !7, i64 0}
!22 = !{i64 0, i64 8, !5}
!23 = !{!24, !10, i64 0}
!24 = !{!"_ZTSN13TPPLPartition12ScanLineEdgeE", !10, i64 0, !18, i64 8, !18, i64 32}


; 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.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.TPPLPartition::MonotoneVertex" = type { %struct.TPPLPoint, i64, i64 }
%struct.TPPLPoint = type { double, double, 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr nocapture noundef nonnull readnone align 1 dereferenceable(1) %0, ptr nocapture noundef %1, ptr nocapture noundef %2, i64 noundef %3, i64 noundef %4, ptr nocapture noundef %5, ptr noundef %6, ptr noundef nonnull %7, ptr nocapture noundef %8) local_unnamed_addr #2 align 2 {
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = load i64, ptr %2, align 8, !tbaa !5
  %13 = add nsw i64 %12, 1
  %14 = add nsw i64 %12, 2
  store i64 %14, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %1, i64 %3
  %16 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %1, i64 %12
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %15, i64 24, i1 false), !tbaa.struct !9
  %17 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %1, i64 %4
  %18 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %1, i64 %13
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %17, i64 24, i1 false), !tbaa.struct !9
  %19 = getelementptr inbounds i8, ptr %17, i64 32
  %20 = load i64, ptr %19, align 8, !tbaa !14
  %21 = getelementptr inbounds i8, ptr %18, i64 32
  store i64 %20, ptr %21, align 8, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %15, i64 32
  %23 = load i64, ptr %22, align 8, !tbaa !14
  %24 = getelementptr inbounds i8, ptr %16, i64 32
  store i64 %23, ptr %24, align 8, !tbaa !14
  %25 = load i64, ptr %19, align 8, !tbaa !14
  %26 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %1, i64 %25, i32 1
  store i64 %13, ptr %26, align 8, !tbaa !17
  %27 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %1, i64 %23, i32 1
  store i64 %12, ptr %27, align 8, !tbaa !17
  store i64 %13, ptr %22, align 8, !tbaa !14
  %28 = getelementptr inbounds i8, ptr %18, i64 24
  store i64 %3, ptr %28, align 8, !tbaa !17
  store i64 %12, ptr %19, align 8, !tbaa !14
  %29 = getelementptr inbounds i8, ptr %16, i64 24
  store i64 %4, ptr %29, align 8, !tbaa !17
  %30 = getelementptr inbounds i32, ptr %5, i64 %3
  %31 = load i32, ptr %30, align 4, !tbaa !18
  %32 = getelementptr inbounds i32, ptr %5, i64 %12
  store i32 %31, ptr %32, align 4, !tbaa !18
  %33 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %6, i64 %3
  %34 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %6, i64 %12
  %35 = load i64, ptr %33, align 8, !tbaa !20
  store i64 %35, ptr %34, align 8, !tbaa !20
  %36 = getelementptr inbounds i64, ptr %8, i64 %3
  %37 = load i64, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds i64, ptr %8, i64 %12
  store i64 %37, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  %39 = tail call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #3
  store ptr %39, ptr %10, align 8
  %40 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  br i1 %40, label %41, label %43

41:                                               ; preds = %9
  %42 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #3
  store i64 %12, ptr %42, align 8, !tbaa !22
  br label %43

43:                                               ; preds = %41, %9
  %44 = getelementptr inbounds i32, ptr %5, i64 %4
  %45 = load i32, ptr %44, align 4, !tbaa !18
  %46 = getelementptr inbounds i32, ptr %5, i64 %13
  store i32 %45, ptr %46, align 4, !tbaa !18
  %47 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %6, i64 %4
  %48 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %6, i64 %13
  %49 = load i64, ptr %47, align 8, !tbaa !20
  store i64 %49, ptr %48, align 8, !tbaa !20
  %50 = getelementptr inbounds i64, ptr %8, i64 %4
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds i64, ptr %8, i64 %13
  store i64 %51, ptr %52, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  %53 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #3
  store ptr %53, ptr %11, align 8
  %54 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull align 8 dereferenceable(8) %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  br i1 %54, label %55, label %57

55:                                               ; preds = %43
  %56 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %48) #3
  store i64 %13, ptr %56, align 8, !tbaa !22
  br label %57

57:                                               ; preds = %55, %43
  ret void
}

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

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

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 8, !10, i64 8, i64 8, !10, i64 16, i64 4, !12}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 32}
!15 = !{!"_ZTSN13TPPLPartition14MonotoneVertexE", !16, i64 0, !6, i64 24, !6, i64 32}
!16 = !{!"_ZTS9TPPLPoint", !11, i64 0, !11, i64 8, !13, i64 16}
!17 = !{!15, !6, i64 24}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTS14TPPLVertexType", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"any pointer", !7, i64 0}
!22 = !{!23, !6, i64 0}
!23 = !{!"_ZTSN13TPPLPartition12ScanLineEdgeE", !6, i64 0, !16, i64 8, !16, i64 32}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass