; LLVM IR from brpapa/algorithms :: solutions/uva (10397)

; 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::pair" = type { i32, i32 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Tedge, std::allocator<Tedge>>::_Vector_impl" }
%"struct.std::_Vector_base<Tedge, std::allocator<Tedge>>::_Vector_impl" = type { %"struct.std::_Vector_base<Tedge, std::allocator<Tedge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Tedge, std::allocator<Tedge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Tedge = type { i32, i32, double }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.UFDS = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@coords = external dso_local global [777 x %"struct.std::pair"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z4distii(i32 noundef, i32 noundef) #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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.Tedge, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %struct.UFDS, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca double, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %struct.Tedge, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  br label %25

25:                                               ; preds = %166, %0
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr %26, i64 %29
  %31 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %30)
  br i1 %31, label %32, label %175

32:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !8
  br label %33

33:                                               ; preds = %45, %32
  %34 = load i32, ptr %3, align 4, !tbaa !8
  %35 = load i32, ptr %2, align 4, !tbaa !8
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %48

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %41 = load i32, ptr %3, align 4, !tbaa !8
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [777 x %"struct.std::pair"], ptr @coords, i64 0, i64 %42
  %44 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %43, ptr noundef nonnull align 4 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %45

45:                                               ; preds = %38
  %46 = load i32, ptr %3, align 4, !tbaa !8
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %3, align 4, !tbaa !8
  br label %33, !llvm.loop !11

48:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #8
  call void @_ZNSt6vectorI5TedgeSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !8
  br label %49

49:                                               ; preds = %79, %48
  %50 = load i32, ptr %8, align 4, !tbaa !8
  %51 = load i32, ptr %2, align 4, !tbaa !8
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  store i32 7, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %82

54:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %55 = load i32, ptr %8, align 4, !tbaa !8
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %10, align 4, !tbaa !8
  br label %57

57:                                               ; preds = %71, %54
  %58 = load i32, ptr %10, align 4, !tbaa !8
  %59 = load i32, ptr %2, align 4, !tbaa !8
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  store i32 10, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %78

62:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  %63 = load i32, ptr %8, align 4, !tbaa !8
  %64 = load i32, ptr %10, align 4, !tbaa !8
  %65 = load i32, ptr %8, align 4, !tbaa !8
  %66 = load i32, ptr %10, align 4, !tbaa !8
  %67 = invoke noundef double @_Z4distii(i32 noundef %65, i32 noundef %66)
          to label %68 unwind label %74

68:                                               ; preds = %62
  invoke void @_ZN5TedgeC2Eiid(ptr noundef nonnull align 8 dereferenceable(16) %11, i32 noundef %63, i32 noundef %64, double noundef %67)
          to label %69 unwind label %74

69:                                               ; preds = %68
  invoke void @_ZNSt6vectorI5TedgeSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %70 unwind label %74

70:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %10, align 4, !tbaa !8
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %10, align 4, !tbaa !8
  br label %57, !llvm.loop !13

74:                                               ; preds = %69, %68, %62
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %12, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %174

78:                                               ; preds = %61
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %8, align 4, !tbaa !8
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %8, align 4, !tbaa !8
  br label %49, !llvm.loop !14

82:                                               ; preds = %53
  %83 = call ptr @_ZNSt6vectorI5TedgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  %85 = call ptr @_ZNSt6vectorI5TedgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %85, ptr %86, align 8
  %87 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8
  %89 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TedgeSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %88, ptr %90)
          to label %91 unwind label %112

91:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #8
  %92 = load i32, ptr %2, align 4, !tbaa !8
  invoke void @_ZN4UFDSC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef %92)
          to label %93 unwind label %116

93:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %94 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %95 unwind label %120

95:                                               ; preds = %93
  br label %96

96:                                               ; preds = %111, %95
  %97 = load i32, ptr %17, align 4, !tbaa !8
  %98 = add nsw i32 %97, -1
  store i32 %98, ptr %17, align 4, !tbaa !8
  %99 = icmp ne i32 %97, 0
  br i1 %99, label %100, label %128

100:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %101 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %102 unwind label %124

102:                                              ; preds = %100
  %103 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %101, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %104 unwind label %124

104:                                              ; preds = %102
  %105 = load i32, ptr %18, align 4, !tbaa !8
  %106 = add nsw i32 %105, -1
  store i32 %106, ptr %18, align 4, !tbaa !8
  %107 = load i32, ptr %19, align 4, !tbaa !8
  %108 = add nsw i32 %107, -1
  store i32 %108, ptr %19, align 4, !tbaa !8
  %109 = load i32, ptr %18, align 4, !tbaa !8
  %110 = load i32, ptr %19, align 4, !tbaa !8
  invoke void @_ZN4UFDS8unionSetEii(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef %109, i32 noundef %110)
          to label %111 unwind label %124

111:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %96, !llvm.loop !15

112:                                              ; preds = %82
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %12, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %13, align 4
  br label %174

116:                                              ; preds = %91
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %12, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %13, align 4
  br label %173

120:                                              ; preds = %93
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %12, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %13, align 4
  br label %172

124:                                              ; preds = %104, %102, %100
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %12, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %172

128:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  store double 0.000000e+00, ptr %20, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  store ptr %7, ptr %21, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %129 = load ptr, ptr %21, align 8, !tbaa !18
  %130 = call ptr @_ZNSt6vectorI5TedgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %129) #8
  %131 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %130, ptr %131, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %132 = load ptr, ptr %21, align 8, !tbaa !18
  %133 = call ptr @_ZNSt6vectorI5TedgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %132) #8
  %134 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %133, ptr %134, align 8
  br label %135

135:                                              ; preds = %161, %128
  %136 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP5TedgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  br i1 %136, label %138, label %137

137:                                              ; preds = %135
  store i32 15, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %163

138:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #8
  %139 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5TedgeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %139, i64 16, i1 false), !tbaa.struct !20
  %140 = getelementptr inbounds %struct.Tedge, ptr %24, i32 0, i32 0
  %141 = load i32, ptr %140, align 8, !tbaa !21
  %142 = getelementptr inbounds %struct.Tedge, ptr %24, i32 0, i32 1
  %143 = load i32, ptr %142, align 4, !tbaa !23
  %144 = invoke noundef zeroext i1 @_ZN4UFDS9isSameSetEii(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef %141, i32 noundef %143)
          to label %145 unwind label %156

145:                                              ; preds = %138
  br i1 %144, label %160, label %146

146:                                              ; preds = %145
  %147 = getelementptr inbounds %struct.Tedge, ptr %24, i32 0, i32 0
  %148 = load i32, ptr %147, align 8, !tbaa !21
  %149 = getelementptr inbounds %struct.Tedge, ptr %24, i32 0, i32 1
  %150 = load i32, ptr %149, align 4, !tbaa !23
  invoke void @_ZN4UFDS8unionSetEii(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef %148, i32 noundef %150)
          to label %151 unwind label %156

151:                                              ; preds = %146
  %152 = getelementptr inbounds %struct.Tedge, ptr %24, i32 0, i32 2
  %153 = load double, ptr %152, align 8, !tbaa !24
  %154 = load double, ptr %20, align 8, !tbaa !16
  %155 = fadd double %154, %153
  store double %155, ptr %20, align 8, !tbaa !16
  br label %160

156:                                              ; preds = %146, %138
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %12, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %171

160:                                              ; preds = %151, %145
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  br label %161

161:                                              ; preds = %160
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP5TedgeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  br label %135

163:                                              ; preds = %137
  %164 = load double, ptr %20, align 8, !tbaa !16
  %165 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, double noundef %164)
          to label %166 unwind label %167

166:                                              ; preds = %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @_ZN4UFDSD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #8
  call void @_ZNSt6vectorI5TedgeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #8
  br label %25, !llvm.loop !25

167:                                              ; preds = %163
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %12, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %13, align 4
  br label %171

171:                                              ; preds = %167, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %172

172:                                              ; preds = %171, %124, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @_ZN4UFDSD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  br label %173

173:                                              ; preds = %172, %116
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #8
  br label %174

174:                                              ; preds = %173, %112, %74
  call void @_ZNSt6vectorI5TedgeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %177

175:                                              ; preds = %25
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %176 = load i32, ptr %1, align 4
  ret i32 %176

177:                                              ; preds = %174
  %178 = load ptr, ptr %12, align 8
  %179 = load i32, ptr %13, align 4
  %180 = insertvalue { ptr, i32 } poison, ptr %178, 0
  %181 = insertvalue { ptr, i32 } %180, i32 %179, 1
  resume { ptr, i32 } %181
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI5TedgeSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5TedgeC2Eiid(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef, double noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TedgeSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4UFDSC2Ei(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4UFDS8unionSetEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4UFDS9isSameSetEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #0 align 2

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

declare i32 @printf(ptr noundef, ...) #4

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress norecurse 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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 #8 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !10, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !10, i64 0}
!20 = !{i64 0, i64 4, !8, i64 4, i64 4, !8, i64 8, i64 8, !16}
!21 = !{!22, !9, i64 0}
!22 = !{!"_ZTS5Tedge", !9, i64 0, !9, i64 4, !17, i64 8}
!23 = !{!22, !9, i64 4}
!24 = !{!22, !17, i64 8}
!25 = distinct !{!25, !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"

%"struct.std::pair" = type { i32, i32 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Tedge, std::allocator<Tedge>>::_Vector_impl" }
%"struct.std::_Vector_base<Tedge, std::allocator<Tedge>>::_Vector_impl" = type { %"struct.std::_Vector_base<Tedge, std::allocator<Tedge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Tedge, std::allocator<Tedge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Tedge = type { i32, i32, double }
%struct.UFDS = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@coords = external dso_local global [777 x %"struct.std::pair"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z4distii(i32 noundef, i32 noundef) local_unnamed_addr #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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %struct.Tedge, align 8
  %7 = alloca %struct.UFDS, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr %13, i64 %16
  %18 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %17)
  br i1 %18, label %.preheader34, label %._crit_edge51

.preheader34:                                     ; preds = %0, %._crit_edge50
  %19 = load i32, ptr %1, align 4, !tbaa !8
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.preheader34
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @_ZNSt6vectorI5TedgeSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %21 = load i32, ptr %1, align 4, !tbaa !8
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph42, label %._crit_edge43

.lr.ph:                                           ; preds = %.preheader34, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader34 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %25 = getelementptr inbounds [777 x %"struct.std::pair"], ptr @coords, i64 0, i64 %indvars.iv
  %26 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %27 = load i32, ptr %1, align 4, !tbaa !8
  %28 = sext i32 %27 to i64
  %29 = icmp slt i64 %indvars.iv.next, %28
  br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.loopexit:                                        ; preds = %39, %.lr.ph42
  %30 = phi i32 [ %34, %.lr.ph42 ], [ %41, %39 ]
  %31 = icmp slt i32 %35, %30
  br i1 %31, label %.lr.ph42, label %._crit_edge43, !llvm.loop !13

._crit_edge43:                                    ; preds = %.loopexit, %._crit_edge
  %32 = call ptr @_ZNSt6vectorI5TedgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %33 = call ptr @_ZNSt6vectorI5TedgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TedgeSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %32, ptr %33)
          to label %45 unwind label %62

.lr.ph42:                                         ; preds = %._crit_edge, %.loopexit
  %34 = phi i32 [ %30, %.loopexit ], [ %21, %._crit_edge ]
  %.02240 = phi i32 [ %35, %.loopexit ], [ 0, %._crit_edge ]
  %35 = add nuw nsw i32 %.02240, 1
  %36 = icmp slt i32 %35, %34
  br i1 %36, label %.lr.ph39, label %.loopexit

.lr.ph39:                                         ; preds = %.lr.ph42, %39
  %.02437 = phi i32 [ %40, %39 ], [ %35, %.lr.ph42 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  %37 = invoke noundef double @_Z4distii(i32 noundef %.02240, i32 noundef %.02437)
          to label %38 unwind label %43

38:                                               ; preds = %.lr.ph39
  call void @_ZN5TedgeC2Eiid(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %.02240, i32 noundef %.02437, double noundef %37)
  invoke void @_ZNSt6vectorI5TedgeSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %39 unwind label %43

39:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  %40 = add nuw nsw i32 %.02437, 1
  %41 = load i32, ptr %1, align 4, !tbaa !8
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %.lr.ph39, label %.loopexit, !llvm.loop !14

43:                                               ; preds = %38, %.lr.ph39
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  br label %93

45:                                               ; preds = %._crit_edge43
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  %46 = load i32, ptr %1, align 4, !tbaa !8
  invoke void @_ZN4UFDSC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %46)
          to label %47 unwind label %64

47:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  %48 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %.preheader unwind label %66

.preheader:                                       ; preds = %47
  %49 = load i32, ptr %8, align 4, !tbaa !8
  %50 = add nsw i32 %49, -1
  store i32 %50, ptr %8, align 4, !tbaa !8
  %.not44 = icmp eq i32 %49, 0
  br i1 %.not44, label %._crit_edge46, label %.lr.ph45

.lr.ph45:                                         ; preds = %.preheader, %59
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %51 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %52 unwind label %68

52:                                               ; preds = %.lr.ph45
  %53 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %54 unwind label %68

54:                                               ; preds = %52
  %55 = load i32, ptr %9, align 4, !tbaa !8
  %56 = add nsw i32 %55, -1
  store i32 %56, ptr %9, align 4, !tbaa !8
  %57 = load i32, ptr %10, align 4, !tbaa !8
  %58 = add nsw i32 %57, -1
  store i32 %58, ptr %10, align 4, !tbaa !8
  invoke void @_ZN4UFDS8unionSetEii(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %56, i32 noundef %58)
          to label %59 unwind label %68

59:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  %60 = load i32, ptr %8, align 4, !tbaa !8
  %61 = add nsw i32 %60, -1
  store i32 %61, ptr %8, align 4, !tbaa !8
  %.not = icmp eq i32 %60, 0
  br i1 %.not, label %._crit_edge46, label %.lr.ph45, !llvm.loop !15

62:                                               ; preds = %._crit_edge43
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %93

64:                                               ; preds = %45
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %92

66:                                               ; preds = %47
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %91

68:                                               ; preds = %54, %52, %.lr.ph45
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %91

._crit_edge46:                                    ; preds = %59, %.preheader
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %70 = call ptr @_ZNSt6vectorI5TedgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  store ptr %70, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %71 = call ptr @_ZNSt6vectorI5TedgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  store ptr %71, ptr %12, align 8
  %72 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP5TedgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br i1 %72, label %.lr.ph49, label %._crit_edge50

._crit_edge50:                                    ; preds = %88, %._crit_edge46
  %.023.lcssa = phi double [ 0.000000e+00, %._crit_edge46 ], [ %.1, %88 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, double noundef %.023.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @_ZN4UFDSD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @_ZNSt6vectorI5TedgeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = getelementptr i8, ptr %75, i64 -24
  %77 = load i64, ptr %76, align 8
  %78 = getelementptr inbounds i8, ptr %74, i64 %77
  %79 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %78)
  br i1 %79, label %.preheader34, label %._crit_edge51, !llvm.loop !16

.lr.ph49:                                         ; preds = %._crit_edge46, %88
  %.02347 = phi double [ %.1, %88 ], [ 0.000000e+00, %._crit_edge46 ]
  %80 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5TedgeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %.sroa.0.0.copyload = load i32, ptr %80, align 8, !tbaa !8
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %80, i64 4
  %.sroa.6.0.copyload = load i32, ptr %.sroa.6.0..sroa_idx, align 4, !tbaa !8
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %80, i64 8
  %.sroa.8.0.copyload = load double, ptr %.sroa.8.0..sroa_idx, align 8, !tbaa !17
  %81 = invoke noundef zeroext i1 @_ZN4UFDS9isSameSetEii(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %.sroa.0.0.copyload, i32 noundef %.sroa.6.0.copyload)
          to label %82 unwind label %86

82:                                               ; preds = %.lr.ph49
  br i1 %81, label %88, label %83

83:                                               ; preds = %82
  invoke void @_ZN4UFDS8unionSetEii(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %.sroa.0.0.copyload, i32 noundef %.sroa.6.0.copyload)
          to label %84 unwind label %86

84:                                               ; preds = %83
  %85 = fadd double %.02347, %.sroa.8.0.copyload
  br label %88

86:                                               ; preds = %83, %.lr.ph49
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %91

88:                                               ; preds = %84, %82
  %.1 = phi double [ %.02347, %82 ], [ %85, %84 ]
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP5TedgeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %90 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP5TedgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br i1 %90, label %.lr.ph49, label %._crit_edge50

91:                                               ; preds = %86, %68, %66
  %.pn = phi { ptr, i32 } [ %69, %68 ], [ %87, %86 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @_ZN4UFDSD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  br label %92

92:                                               ; preds = %91, %64
  %.pn.pn = phi { ptr, i32 } [ %.pn, %91 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  br label %93

93:                                               ; preds = %92, %62, %43
  %.pn32 = phi { ptr, i32 } [ %44, %43 ], [ %.pn.pn, %92 ], [ %63, %62 ]
  call void @_ZNSt6vectorI5TedgeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn32

._crit_edge51:                                    ; preds = %._crit_edge50, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI5TedgeSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5TedgeSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4UFDSC2Ei(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4UFDS8unionSetEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4UFDS9isSameSetEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nofree 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 #8 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !10, i64 0}


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