; LLVM IR from wesley-a-leung/Resources :: Tests/C++/geometry/2d (ConvexPolygonFuzzTest)

; 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.pt = type { x86_fp80, x86_fp80 }
%struct.Line = type { %struct.pt, x86_fp80 }
%"struct.std::pair.20" = type { i32, i32 }
%class.anon.22 = type { ptr, ptr }

; 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 uwtable
declare dso_local void @_Z4perp2pt(ptr dead_on_unwind noalias writable sret(%struct.pt) align 16, ptr noundef byval(%struct.pt) align 16) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4Line6onLeftE2pt(ptr noundef nonnull align 16 dereferenceable(48), ptr noundef byval(%struct.pt) align 16) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3modii(i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z13extremeVertexRKSt6vectorI2ptSaIS0_EES0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef byval(%struct.pt) align 16) #2

; Function Attrs: mustprogress uwtable
define dso_local i64 @_Z29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4Line(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef byval(%struct.Line) align 16 %1) #2 {
  %3 = alloca %"struct.std::pair.20", align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.pt, align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.pt, align 16
  %12 = alloca i32, align 4
  %13 = alloca %struct.pt, align 16
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %struct.pt, align 16
  %26 = alloca %struct.pt, align 16
  %27 = alloca %struct.pt, align 16
  %28 = alloca i32, align 4
  %29 = alloca %struct.pt, align 16
  %30 = alloca %struct.pt, align 16
  %31 = alloca %class.anon.22, align 8
  %32 = alloca %"struct.std::pair.20", align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = call noundef i64 @_ZNKSt6vectorI2ptSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #5
  %42 = trunc i64 %41 to i32
  store i32 %42, ptr %5, align 4, !tbaa !9
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %45, label %53

45:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef 0) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 %47, i64 32, i1 false), !tbaa.struct !11
  %48 = call noundef i32 @_ZNK4Line6onLeftE2pt(ptr noundef nonnull align 16 dereferenceable(48) %1, ptr noundef byval(%struct.pt) align 16 %7)
  %49 = icmp eq i32 %48, 0
  %50 = zext i1 %49 to i64
  %51 = select i1 %49, i32 0, i32 -1
  store i32 %51, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 -1, ptr %8, align 4, !tbaa !9
  %52 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %52, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  store i32 1, ptr %9, align 4
  br label %211

53:                                               ; preds = %2
  %54 = load i32, ptr %5, align 4, !tbaa !9
  %55 = icmp eq i32 %54, 2
  br i1 %55, label %56, label %90

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef 0) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %11, ptr align 16 %58, i64 32, i1 false), !tbaa.struct !11
  %59 = call noundef i32 @_ZNK4Line6onLeftE2pt(ptr noundef nonnull align 16 dereferenceable(48) %1, ptr noundef byval(%struct.pt) align 16 %11)
  store i32 %59, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef 1) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %61, i64 32, i1 false), !tbaa.struct !11
  %62 = call noundef i32 @_ZNK4Line6onLeftE2pt(ptr noundef nonnull align 16 dereferenceable(48) %1, ptr noundef byval(%struct.pt) align 16 %13)
  store i32 %62, ptr %12, align 4, !tbaa !9
  %63 = load i32, ptr %10, align 4, !tbaa !9
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %70

65:                                               ; preds = %56
  %66 = load i32, ptr %12, align 4, !tbaa !9
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %70

68:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  %69 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store i64 %69, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  store i32 1, ptr %9, align 4
  br label %89

70:                                               ; preds = %65, %56
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %75

73:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 -1, ptr %17, align 4, !tbaa !9
  %74 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  store i64 %74, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  store i32 1, ptr %9, align 4
  br label %89

75:                                               ; preds = %70
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %80

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 1, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 -1, ptr %19, align 4, !tbaa !9
  %79 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  store i64 %79, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  store i32 1, ptr %9, align 4
  br label %89

80:                                               ; preds = %75
  %81 = load i32, ptr %10, align 4, !tbaa !9
  %82 = load i32, ptr %12, align 4, !tbaa !9
  %83 = icmp eq i32 %81, %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  br i1 %83, label %84, label %86

84:                                               ; preds = %80
  store i32 -1, ptr %20, align 4, !tbaa !9
  store i32 -1, ptr %21, align 4, !tbaa !9
  %85 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
  store i64 %85, ptr %3, align 4
  br label %88

86:                                               ; preds = %80
  store i32 0, ptr %22, align 4, !tbaa !9
  store i32 1, ptr %23, align 4, !tbaa !9
  %87 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  store i64 %87, ptr %3, align 4
  br label %88

88:                                               ; preds = %86, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  store i32 1, ptr %9, align 4
  br label %89

89:                                               ; preds = %88, %78, %73, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %211

90:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #5
  %92 = getelementptr inbounds %struct.Line, ptr %1, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %92, i64 32, i1 false), !tbaa.struct !11
  call void @_Z4perp2pt(ptr dead_on_unwind writable sret(%struct.pt) align 16 %26, ptr noundef byval(%struct.pt) align 16 %27)
  call void @_ZNK2ptngEv(ptr dead_on_unwind writable sret(%struct.pt) align 16 %25, ptr noundef nonnull align 16 dereferenceable(32) %26)
  %93 = call noundef i32 @_Z13extremeVertexRKSt6vectorI2ptSaIS0_EES0_(ptr noundef nonnull align 8 dereferenceable(24) %91, ptr noundef byval(%struct.pt) align 16 %25)
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #5
  store i32 %93, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.Line, ptr %1, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %95, i64 32, i1 false), !tbaa.struct !11
  call void @_Z4perp2pt(ptr dead_on_unwind writable sret(%struct.pt) align 16 %29, ptr noundef byval(%struct.pt) align 16 %30)
  %96 = call noundef i32 @_Z13extremeVertexRKSt6vectorI2ptSaIS0_EES0_(ptr noundef nonnull align 8 dereferenceable(24) %94, ptr noundef byval(%struct.pt) align 16 %29)
  store i32 %96, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #5
  %97 = getelementptr inbounds %class.anon.22, ptr %31, i32 0, i32 0
  store ptr %1, ptr %97, align 8, !tbaa !5
  %98 = getelementptr inbounds %class.anon.22, ptr %31, i32 0, i32 1
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %99, ptr %98, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  store i32 -1, ptr %33, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  store i32 -1, ptr %34, align 4, !tbaa !9
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %32, ptr noundef nonnull align 4 dereferenceable(4) %33, ptr noundef nonnull align 4 dereferenceable(4) %34)
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  %100 = load i32, ptr %24, align 4, !tbaa !9
  %101 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %31, i32 noundef %100)
  %102 = icmp sgt i32 %101, 0
  br i1 %102, label %107, label %103

103:                                              ; preds = %90
  %104 = load i32, ptr %28, align 4, !tbaa !9
  %105 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %31, i32 noundef %104)
  %106 = icmp slt i32 %105, 0
  br i1 %106, label %107, label %108

107:                                              ; preds = %103, %90
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %3, ptr align 4 %32, i64 8, i1 false)
  store i32 1, ptr %9, align 4
  br label %210

108:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #5
  store i32 0, ptr %35, align 4, !tbaa !9
  br label %109

109:                                              ; preds = %167, %108
  %110 = load i32, ptr %35, align 4, !tbaa !9
  %111 = icmp slt i32 %110, 2
  br i1 %111, label %113, label %112

112:                                              ; preds = %109
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  br label %170

113:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #5
  %114 = load i32, ptr %28, align 4, !tbaa !9
  store i32 %114, ptr %36, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #5
  %115 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %115, ptr %37, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %147, %113
  %117 = load i32, ptr %36, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  %119 = load i32, ptr %5, align 4, !tbaa !9
  %120 = call noundef i32 @_Z3modii(i32 noundef %118, i32 noundef %119)
  %121 = load i32, ptr %37, align 4, !tbaa !9
  %122 = icmp ne i32 %120, %121
  br i1 %122, label %123, label %149

123:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  %124 = load i32, ptr %36, align 4, !tbaa !9
  %125 = load i32, ptr %37, align 4, !tbaa !9
  %126 = add nsw i32 %124, %125
  %127 = load i32, ptr %36, align 4, !tbaa !9
  %128 = load i32, ptr %37, align 4, !tbaa !9
  %129 = icmp slt i32 %127, %128
  br i1 %129, label %130, label %131

130:                                              ; preds = %123
  br label %133

131:                                              ; preds = %123
  %132 = load i32, ptr %5, align 4, !tbaa !9
  br label %133

133:                                              ; preds = %131, %130
  %134 = phi i32 [ 0, %130 ], [ %132, %131 ]
  %135 = add nsw i32 %126, %134
  %136 = sdiv i32 %135, 2
  %137 = load i32, ptr %5, align 4, !tbaa !9
  %138 = call noundef i32 @_Z3modii(i32 noundef %136, i32 noundef %137)
  store i32 %138, ptr %38, align 4, !tbaa !9
  %139 = load i32, ptr %38, align 4, !tbaa !9
  %140 = load i32, ptr %38, align 4, !tbaa !9
  %141 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %31, i32 noundef %140)
  %142 = load i32, ptr %28, align 4, !tbaa !9
  %143 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %31, i32 noundef %142)
  %144 = icmp eq i32 %141, %143
  br i1 %144, label %145, label %146

145:                                              ; preds = %133
  br label %147

146:                                              ; preds = %133
  br label %147

147:                                              ; preds = %146, %145
  %148 = phi ptr [ %36, %145 ], [ %37, %146 ]
  store i32 %139, ptr %148, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  br label %116, !llvm.loop !14

149:                                              ; preds = %116
  %150 = load i32, ptr %36, align 4, !tbaa !9
  %151 = load i32, ptr %37, align 4, !tbaa !9
  %152 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %31, i32 noundef %151)
  %153 = icmp ne i32 %152, 0
  %154 = xor i1 %153, true
  %155 = zext i1 %154 to i32
  %156 = add nsw i32 %150, %155
  %157 = load i32, ptr %5, align 4, !tbaa !9
  %158 = call noundef i32 @_Z3modii(i32 noundef %156, i32 noundef %157)
  %159 = load i32, ptr %35, align 4, !tbaa !9
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %163

161:                                              ; preds = %149
  %162 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 1
  br label %165

163:                                              ; preds = %149
  %164 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 0
  br label %165

165:                                              ; preds = %163, %161
  %166 = phi ptr [ %162, %161 ], [ %164, %163 ]
  store i32 %158, ptr %166, align 4, !tbaa !16
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  br label %167

167:                                              ; preds = %165
  %168 = load i32, ptr %35, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %35, align 4, !tbaa !9
  br label %109, !llvm.loop !17

170:                                              ; preds = %112
  %171 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 0
  %172 = load i32, ptr %171, align 4, !tbaa !18
  %173 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 1
  %174 = load i32, ptr %173, align 4, !tbaa !20
  %175 = icmp eq i32 %172, %174
  br i1 %175, label %176, label %179

176:                                              ; preds = %170
  %177 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #5
  store i32 -1, ptr %39, align 4, !tbaa !9
  %178 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %177, ptr noundef nonnull align 4 dereferenceable(4) %39)
  store i64 %178, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #5
  store i32 1, ptr %9, align 4
  br label %210

179:                                              ; preds = %170
  %180 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 0
  %181 = load i32, ptr %180, align 4, !tbaa !18
  %182 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %31, i32 noundef %181)
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %209, label %184

184:                                              ; preds = %179
  %185 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 1
  %186 = load i32, ptr %185, align 4, !tbaa !20
  %187 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %31, i32 noundef %186)
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %209, label %189

189:                                              ; preds = %184
  %190 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 0
  %191 = load i32, ptr %190, align 4, !tbaa !18
  %192 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 1
  %193 = load i32, ptr %192, align 4, !tbaa !20
  %194 = sub nsw i32 %191, %193
  %195 = load i32, ptr %5, align 4, !tbaa !9
  %196 = add nsw i32 %194, %195
  %197 = add nsw i32 %196, 1
  %198 = load i32, ptr %5, align 4, !tbaa !9
  %199 = srem i32 %197, %198
  switch i32 %199, label %208 [
    i32 0, label %200
    i32 2, label %204
  ]

200:                                              ; preds = %189
  %201 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 0
  %202 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 0
  %203 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %201, ptr noundef nonnull align 4 dereferenceable(4) %202)
  store i64 %203, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %210

204:                                              ; preds = %189
  %205 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 1
  %206 = getelementptr inbounds %"struct.std::pair.20", ptr %32, i32 0, i32 1
  %207 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %205, ptr noundef nonnull align 4 dereferenceable(4) %206)
  store i64 %207, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %210

208:                                              ; preds = %189
  br label %209

209:                                              ; preds = %208, %184, %179
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %3, ptr align 4 %32, i64 8, i1 false)
  store i32 1, ptr %9, align 4
  br label %210

210:                                              ; preds = %209, %204, %200, %176, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %211

211:                                              ; preds = %210, %89, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  %212 = load i64, ptr %3, align 4
  ret i64 %212
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2ptngEv(ptr dead_on_unwind noalias writable sret(%struct.pt) align 16, ptr noundef nonnull align 16 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #4 align 2

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

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

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 16, !12, i64 16, i64 16, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"long double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !15}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTSSt4pairIiiE", !10, i64 0, !10, i64 4}
!20 = !{!19, !10, i64 4}


; 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.pt = type { x86_fp80, x86_fp80 }
%struct.Line = type { %struct.pt, x86_fp80 }
%class.anon.22 = type { ptr, ptr }
%"struct.std::pair.20" = type { i32, i32 }

; 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 uwtable
declare dso_local void @_Z4perp2pt(ptr dead_on_unwind noalias writable sret(%struct.pt) align 16, ptr noundef byval(%struct.pt) align 16) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4Line6onLeftE2pt(ptr noundef nonnull align 16 dereferenceable(48), ptr noundef byval(%struct.pt) align 16) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3modii(i32 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z13extremeVertexRKSt6vectorI2ptSaIS0_EES0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef byval(%struct.pt) align 16) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local i64 @_Z29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4Line(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef byval(%struct.Line) align 16 %1) local_unnamed_addr #1 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.pt, align 16
  %17 = alloca %struct.pt, align 16
  %18 = alloca i32, align 4
  %19 = alloca %struct.pt, align 16
  %20 = alloca %class.anon.22, align 8
  %21 = alloca %"struct.std::pair.20", align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = tail call noundef i64 @_ZNKSt6vectorI2ptSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %26 = trunc i64 %25 to i32
  switch i32 %26, label %56 [
    i32 1, label %27
    i32 2, label %33
  ]

27:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %28 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %29 = call noundef i32 @_ZNK4Line6onLeftE2pt(ptr noundef nonnull align 16 dereferenceable(48) %1, ptr noundef nonnull byval(%struct.pt) align 16 %28)
  %30 = icmp ne i32 %29, 0
  %31 = sext i1 %30 to i32
  store i32 %31, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  store i32 -1, ptr %4, align 4, !tbaa !5
  %32 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  br label %126

33:                                               ; preds = %2
  %34 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %35 = call noundef i32 @_ZNK4Line6onLeftE2pt(ptr noundef nonnull align 16 dereferenceable(48) %1, ptr noundef nonnull byval(%struct.pt) align 16 %34)
  %36 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %37 = call noundef i32 @_ZNK4Line6onLeftE2pt(ptr noundef nonnull align 16 dereferenceable(48) %1, ptr noundef nonnull byval(%struct.pt) align 16 %36)
  %38 = icmp eq i32 %37, 0
  %39 = or i32 %37, %35
  %or.cond = icmp eq i32 %39, 0
  br i1 %or.cond, label %40, label %42

40:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  %41 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  br label %126

42:                                               ; preds = %33
  %43 = icmp eq i32 %35, 0
  br i1 %43, label %44, label %46

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  store i32 -1, ptr %8, align 4, !tbaa !5
  %45 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %126

46:                                               ; preds = %42
  br i1 %38, label %47, label %49

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  store i32 1, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  store i32 -1, ptr %10, align 4, !tbaa !5
  %48 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  br label %126

49:                                               ; preds = %46
  %50 = icmp eq i32 %35, %37
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  br i1 %50, label %51, label %53

51:                                               ; preds = %49
  store i32 -1, ptr %11, align 4, !tbaa !5
  store i32 -1, ptr %12, align 4, !tbaa !5
  %52 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  br label %55

53:                                               ; preds = %49
  store i32 0, ptr %13, align 4, !tbaa !5
  store i32 1, ptr %14, align 4, !tbaa !5
  %54 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  br label %55

55:                                               ; preds = %53, %51
  %.sroa.0.0 = phi i64 [ %52, %51 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  br label %126

56:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #4
  call void @_Z4perp2pt(ptr dead_on_unwind nonnull writable sret(%struct.pt) align 16 %17, ptr noundef nonnull byval(%struct.pt) align 16 %1)
  call void @_ZNK2ptngEv(ptr dead_on_unwind nonnull writable sret(%struct.pt) align 16 %16, ptr noundef nonnull align 16 dereferenceable(32) %17)
  %57 = call noundef i32 @_Z13extremeVertexRKSt6vectorI2ptSaIS0_EES0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull byval(%struct.pt) align 16 %16)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #4
  store i32 %57, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #4
  call void @_Z4perp2pt(ptr dead_on_unwind nonnull writable sret(%struct.pt) align 16 %19, ptr noundef nonnull byval(%struct.pt) align 16 %1)
  %58 = call noundef i32 @_Z13extremeVertexRKSt6vectorI2ptSaIS0_EES0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull byval(%struct.pt) align 16 %19)
  store i32 %58, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #4
  store ptr %1, ptr %20, align 8, !tbaa !9
  %59 = getelementptr inbounds i8, ptr %20, i64 8
  store ptr %0, ptr %59, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #4
  store i32 -1, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #4
  store i32 -1, ptr %23, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #4
  %60 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %57)
  %61 = icmp sgt i32 %60, 0
  br i1 %61, label %67, label %62

62:                                               ; preds = %56
  %63 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %58)
  %64 = icmp slt i32 %63, 0
  br i1 %64, label %67, label %.preheader.preheader

.preheader.preheader:                             ; preds = %62
  %65 = add nsw i32 %58, 1
  %66 = call noundef i32 @_Z3modii(i32 noundef %65, i32 noundef %26)
  %.not4650 = icmp eq i32 %66, %57
  br i1 %.not4650, label %._crit_edge, label %.cont

67:                                               ; preds = %62, %56
  %.sroa.0.0.copyload = load i64, ptr %21, align 8
  br label %125

.cont:                                            ; preds = %.preheader.preheader, %.cont
  %.052 = phi i32 [ %.0., %.cont ], [ %57, %.preheader.preheader ]
  %.03851 = phi i32 [ %..038, %.cont ], [ %58, %.preheader.preheader ]
  %68 = add nsw i32 %.052, %.03851
  %69 = icmp slt i32 %.03851, %.052
  %70 = select i1 %69, i32 0, i32 %26
  %71 = add nsw i32 %68, %70
  %72 = sdiv i32 %71, 2
  %73 = call noundef i32 @_Z3modii(i32 noundef %72, i32 noundef %26)
  %74 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %73)
  %75 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %58)
  %76 = icmp eq i32 %74, %75
  %..038 = select i1 %76, i32 %73, i32 %.03851
  %.0. = select i1 %76, i32 %.052, i32 %73
  %77 = add nsw i32 %..038, 1
  %78 = call noundef i32 @_Z3modii(i32 noundef %77, i32 noundef %26)
  %.not46 = icmp eq i32 %78, %.0.
  br i1 %.not46, label %._crit_edge, label %.cont, !llvm.loop !11

._crit_edge:                                      ; preds = %.cont, %.preheader.preheader
  %.038.lcssa = phi i32 [ %58, %.preheader.preheader ], [ %..038, %.cont ]
  %.0.lcssa = phi i32 [ %57, %.preheader.preheader ], [ %.0., %.cont ]
  %79 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %.0.lcssa)
  %.not47 = icmp eq i32 %79, 0
  %80 = zext i1 %.not47 to i32
  %81 = add nsw i32 %.038.lcssa, %80
  %82 = call noundef i32 @_Z3modii(i32 noundef %81, i32 noundef %26)
  store i32 %82, ptr %21, align 8, !tbaa !13
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %18) #4
  %83 = load i32, ptr %18, align 4, !tbaa !5
  %84 = load i32, ptr %15, align 4, !tbaa !5
  %85 = add nsw i32 %83, 1
  %86 = call noundef i32 @_Z3modii(i32 noundef %85, i32 noundef %26)
  %.not4650.1 = icmp eq i32 %86, %84
  br i1 %.not4650.1, label %._crit_edge.1, label %.cont.1

.cont.1:                                          ; preds = %._crit_edge, %.cont.1
  %.052.1 = phi i32 [ %.0..1, %.cont.1 ], [ %84, %._crit_edge ]
  %.03851.1 = phi i32 [ %..038.1, %.cont.1 ], [ %83, %._crit_edge ]
  %87 = add nsw i32 %.052.1, %.03851.1
  %88 = icmp slt i32 %.03851.1, %.052.1
  %89 = select i1 %88, i32 0, i32 %26
  %90 = add nsw i32 %87, %89
  %91 = sdiv i32 %90, 2
  %92 = call noundef i32 @_Z3modii(i32 noundef %91, i32 noundef %26)
  %93 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %92)
  %94 = load i32, ptr %18, align 4, !tbaa !5
  %95 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %94)
  %96 = icmp eq i32 %93, %95
  %..038.1 = select i1 %96, i32 %92, i32 %.03851.1
  %.0..1 = select i1 %96, i32 %.052.1, i32 %92
  %97 = add nsw i32 %..038.1, 1
  %98 = call noundef i32 @_Z3modii(i32 noundef %97, i32 noundef %26)
  %.not46.1 = icmp eq i32 %98, %.0..1
  br i1 %.not46.1, label %._crit_edge.1, label %.cont.1, !llvm.loop !11

._crit_edge.1:                                    ; preds = %.cont.1, %._crit_edge
  %.038.lcssa.1 = phi i32 [ %83, %._crit_edge ], [ %..038.1, %.cont.1 ]
  %.0.lcssa.1 = phi i32 [ %84, %._crit_edge ], [ %.0..1, %.cont.1 ]
  %99 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %.0.lcssa.1)
  %.not47.1 = icmp eq i32 %99, 0
  %100 = zext i1 %.not47.1 to i32
  %101 = add nsw i32 %.038.lcssa.1, %100
  %102 = call noundef i32 @_Z3modii(i32 noundef %101, i32 noundef %26)
  %.idx.sroa.sel.1 = getelementptr inbounds i8, ptr %21, i64 4
  store i32 %102, ptr %.idx.sroa.sel.1, align 4, !tbaa !13
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %18) #4
  %103 = load i32, ptr %21, align 8, !tbaa !14
  %104 = load i32, ptr %.idx.sroa.sel.1, align 4, !tbaa !16
  %105 = icmp eq i32 %103, %104
  br i1 %105, label %106, label %108

106:                                              ; preds = %._crit_edge.1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #4
  store i32 -1, ptr %24, align 4, !tbaa !5
  %107 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %24)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #4
  br label %125

108:                                              ; preds = %._crit_edge.1
  %109 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %103)
  %.not = icmp eq i32 %109, 0
  br i1 %.not, label %110, label %124

110:                                              ; preds = %108
  %111 = load i32, ptr %.idx.sroa.sel.1, align 4, !tbaa !16
  %112 = call noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %111)
  %.not45 = icmp eq i32 %112, 0
  br i1 %.not45, label %113, label %124

113:                                              ; preds = %110
  %114 = load i32, ptr %21, align 8, !tbaa !14
  %115 = load i32, ptr %.idx.sroa.sel.1, align 4, !tbaa !16
  %116 = add i32 %26, 1
  %117 = add i32 %116, %114
  %118 = sub i32 %117, %115
  %119 = srem i32 %118, %26
  switch i32 %119, label %124 [
    i32 0, label %120
    i32 2, label %122
  ]

120:                                              ; preds = %113
  %121 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %21)
  br label %125

122:                                              ; preds = %113
  %123 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %.idx.sroa.sel.1, ptr noundef nonnull align 4 dereferenceable(4) %.idx.sroa.sel.1)
  br label %125

124:                                              ; preds = %113, %110, %108
  %.sroa.0.0.copyload37 = load i64, ptr %21, align 8
  br label %125

125:                                              ; preds = %124, %122, %120, %106, %67
  %.sroa.0.2 = phi i64 [ %.sroa.0.0.copyload, %67 ], [ %107, %106 ], [ %.sroa.0.0.copyload37, %124 ], [ %123, %122 ], [ %121, %120 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  br label %126

126:                                              ; preds = %40, %44, %47, %55, %125, %27
  %.sroa.0.3 = phi i64 [ %32, %27 ], [ %.sroa.0.2, %125 ], [ %41, %40 ], [ %45, %44 ], [ %48, %47 ], [ %.sroa.0.0, %55 ]
  ret i64 %.sroa.0.3
}

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2ptngEv(ptr dead_on_unwind noalias writable sret(%struct.pt) align 16, ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @"_ZZ29convexPolygonLineIntersectionRKSt6vectorI2ptSaIS0_EE4LineENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!16 = !{!15, !6, i64 4}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass