; LLVM IR from AnneLivia/Competitive-Programming :: Online Judges/URI/Olimpiada (OBI) (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Country, std::allocator<Country>>::_Vector_impl" }
%"struct.std::_Vector_base<Country, std::allocator<Country>>::_Vector_impl" = type { %"struct.std::_Vector_base<Country, std::allocator<Country>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Country, std::allocator<Country>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Country = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 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 i32, align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %struct.Country, align 4
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %struct.Country, align 4
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %struct.Country, align 4
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %struct.Country, align 4
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %30 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #9
  call void @_ZNSt6vectorI7CountrySaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  call void @llvm.memset.p0.i64(ptr align 4 %8, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  call void @_ZN9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS1_SaIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  %31 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %32 unwind label %43

32:                                               ; preds = %0
  %33 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %34 unwind label %43

34:                                               ; preds = %32
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  invoke void @_ZNSt6vectorI7CountrySaIS0_EE6assignEmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %36, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %37 unwind label %43

37:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %55, %37
  %39 = load i32, ptr %12, align 4, !tbaa !5
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %47, label %42

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %58

43:                                               ; preds = %186, %154, %67, %65, %63, %34, %32, %0
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %10, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %11, align 4
  br label %190

47:                                               ; preds = %38
  %48 = load i32, ptr %12, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  %50 = getelementptr inbounds %struct.Country, ptr %8, i32 0, i32 0
  store i32 %49, ptr %50, align 4, !tbaa !9
  %51 = getelementptr inbounds %struct.Country, ptr %8, i32 0, i32 1
  store i32 0, ptr %51, align 4, !tbaa !11
  %52 = load i32, ptr %12, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI7CountrySaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %53) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %54, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !12
  br label %55

55:                                               ; preds = %47
  %56 = load i32, ptr %12, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %12, align 4, !tbaa !5
  br label %38, !llvm.loop !13

58:                                               ; preds = %42
  br label %59

59:                                               ; preds = %153, %58
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = add nsw i32 %60, -1
  store i32 %61, ptr %3, align 4, !tbaa !5
  %62 = icmp ne i32 %60, 0
  br i1 %62, label %63, label %154

63:                                               ; preds = %59
  %64 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %65 unwind label %43

65:                                               ; preds = %63
  %66 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %64, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %67 unwind label %43

67:                                               ; preds = %65
  %68 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %69 unwind label %43

69:                                               ; preds = %67
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = getelementptr inbounds %struct.Country, ptr %8, i32 0, i32 0
  store i32 %70, ptr %71, align 4, !tbaa !9
  %72 = getelementptr inbounds %struct.Country, ptr %8, i32 0, i32 1
  store i32 0, ptr %72, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %73 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %74 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %73, ptr %74, align 8
  %75 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %75, ptr %76, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !12
  %77 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8
  %81 = load i64, ptr %16, align 4
  %82 = invoke ptr @_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS2_SaIS2_EEEES2_ET_S8_S8_T0_(ptr %78, ptr %80, i64 %81)
          to label %83 unwind label %93

83:                                               ; preds = %69
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %82, ptr %84, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %13, i64 8, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %85 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %85, ptr %86, align 8
  %87 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP7CountrySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br i1 %87, label %88, label %97

88:                                               ; preds = %83
  %89 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  %90 = getelementptr inbounds %struct.Country, ptr %89, i32 0, i32 1
  %91 = load i32, ptr %90, align 4, !tbaa !11
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %90, align 4, !tbaa !11
  br label %97

93:                                               ; preds = %69
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %10, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %190

97:                                               ; preds = %88, %83
  %98 = load i32, ptr %5, align 4, !tbaa !5
  %99 = getelementptr inbounds %struct.Country, ptr %8, i32 0, i32 0
  store i32 %98, ptr %99, align 4, !tbaa !9
  %100 = getelementptr inbounds %struct.Country, ptr %8, i32 0, i32 1
  store i32 0, ptr %100, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %101 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %102 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %101, ptr %102, align 8
  %103 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %104 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %103, ptr %104, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !12
  %105 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8
  %107 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8
  %109 = load i64, ptr %21, align 4
  %110 = invoke ptr @_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS2_SaIS2_EEEES2_ET_S8_S8_T0_(ptr %106, ptr %108, i64 %109)
          to label %111 unwind label %121

111:                                              ; preds = %97
  %112 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %110, ptr %112, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %18, i64 8, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %113 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %114 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %113, ptr %114, align 8
  %115 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP7CountrySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br i1 %115, label %116, label %125

116:                                              ; preds = %111
  %117 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  %118 = getelementptr inbounds %struct.Country, ptr %117, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !11
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %118, align 4, !tbaa !11
  br label %125

121:                                              ; preds = %97
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %10, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %190

125:                                              ; preds = %116, %111
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = getelementptr inbounds %struct.Country, ptr %8, i32 0, i32 0
  store i32 %126, ptr %127, align 4, !tbaa !9
  %128 = getelementptr inbounds %struct.Country, ptr %8, i32 0, i32 1
  store i32 0, ptr %128, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %129 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %130 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %129, ptr %130, align 8
  %131 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %132 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %131, ptr %132, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !12
  %133 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8
  %135 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8
  %137 = load i64, ptr %26, align 4
  %138 = invoke ptr @_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS2_SaIS2_EEEES2_ET_S8_S8_T0_(ptr %134, ptr %136, i64 %137)
          to label %139 unwind label %149

139:                                              ; preds = %125
  %140 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %138, ptr %140, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %23, i64 8, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %141 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %142 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %141, ptr %142, align 8
  %143 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP7CountrySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  br i1 %143, label %144, label %153

144:                                              ; preds = %139
  %145 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  %146 = getelementptr inbounds %struct.Country, ptr %145, i32 0, i32 1
  %147 = load i32, ptr %146, align 4, !tbaa !11
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %146, align 4, !tbaa !11
  br label %153

149:                                              ; preds = %125
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %10, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  br label %190

153:                                              ; preds = %144, %139
  br label %59, !llvm.loop !18

154:                                              ; preds = %59
  %155 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %156 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %155, ptr %156, align 8
  %157 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %158 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %157, ptr %158, align 8
  %159 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8
  %161 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr %160, ptr %162, ptr noundef @_Z7compareRK7CountryS1_)
          to label %163 unwind label %43

163:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %179, %163
  %165 = load i32, ptr %30, align 4, !tbaa !5
  %166 = load i32, ptr %2, align 4, !tbaa !5
  %167 = icmp slt i32 %165, %166
  br i1 %167, label %169, label %168

168:                                              ; preds = %164
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  br label %186

169:                                              ; preds = %164
  %170 = load i32, ptr %30, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI7CountrySaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %171) #9
  %173 = getelementptr inbounds %struct.Country, ptr %172, i32 0, i32 0
  %174 = load i32, ptr %173, align 4, !tbaa !9
  %175 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %174)
          to label %176 unwind label %182

176:                                              ; preds = %169
  %177 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %175, ptr noundef @.str)
          to label %178 unwind label %182

178:                                              ; preds = %176
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %30, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %30, align 4, !tbaa !5
  br label %164, !llvm.loop !19

182:                                              ; preds = %176, %169
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %10, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  br label %190

186:                                              ; preds = %168
  %187 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %188 unwind label %43

188:                                              ; preds = %186
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @_ZNSt6vectorI7CountrySaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  %189 = load i32, ptr %1, align 4
  ret i32 %189

190:                                              ; preds = %182, %149, %121, %93, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @_ZNSt6vectorI7CountrySaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %191

191:                                              ; preds = %190
  %192 = load ptr, ptr %10, align 8
  %193 = load i32, ptr %11, align 4
  %194 = insertvalue { ptr, i32 } poison, ptr %192, 0
  %195 = insertvalue { ptr, i32 } %194, i32 %193, 1
  resume { ptr, i32 } %195
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS2_SaIS2_EEEES2_ET_S8_S8_T0_(ptr, ptr, i64) #7

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr, ptr, ptr noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #7

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #7

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Country, std::allocator<Country>>::_Vector_impl" }
%"struct.std::_Vector_base<Country, std::allocator<Country>>::_Vector_impl" = type { %"struct.std::_Vector_base<Country, std::allocator<Country>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Country, std::allocator<Country>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Country = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 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 %"class.std::vector", align 8
  %7 = alloca %struct.Country, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt6vectorI7CountrySaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  store i64 0, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @_ZN9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS1_SaIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %12 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %13 unwind label %.loopexit.split-lp

13:                                               ; preds = %0
  %14 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %15 unwind label %.loopexit.split-lp

15:                                               ; preds = %13
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  invoke void @_ZNSt6vectorI7CountrySaIS0_EE6assignEmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %17, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %.preheader27 unwind label %.loopexit.split-lp

.preheader27:                                     ; preds = %15
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph, label %.preheader26

.lr.ph:                                           ; preds = %.preheader27
  %20 = getelementptr inbounds i8, ptr %7, i64 4
  br label %24

.preheader26:                                     ; preds = %24, %.preheader27
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = add nsw i32 %21, -1
  store i32 %22, ptr %2, align 4, !tbaa !5
  %.not29 = icmp eq i32 %21, 0
  br i1 %.not29, label %._crit_edge, label %.lr.ph30

.lr.ph30:                                         ; preds = %.preheader26
  %23 = getelementptr inbounds i8, ptr %7, i64 4
  br label %31

.loopexit:                                        ; preds = %31, %33, %35
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %102

.loopexit.split-lp:                               ; preds = %0, %13, %15, %._crit_edge, %._crit_edge33
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %102

24:                                               ; preds = %.lr.ph, %24
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %24 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = trunc nuw nsw i64 %indvars.iv.next to i32
  store i32 %25, ptr %7, align 8, !tbaa !9
  store i32 0, ptr %20, align 4, !tbaa !11
  %26 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI7CountrySaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #7
  %27 = load i64, ptr %7, align 8
  store i64 %27, ptr %26, align 4
  %28 = load i32, ptr %1, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next, %29
  br i1 %30, label %24, label %.preheader26, !llvm.loop !12

31:                                               ; preds = %.lr.ph30, %82
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %33 unwind label %.loopexit

33:                                               ; preds = %31
  %34 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %35 unwind label %.loopexit

35:                                               ; preds = %33
  %36 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %37 unwind label %.loopexit

37:                                               ; preds = %35
  %38 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %38, ptr %7, align 8, !tbaa !9
  store i32 0, ptr %23, align 4, !tbaa !11
  %39 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %40 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %.sroa.012.0.copyload = load i64, ptr %7, align 8
  %41 = invoke ptr @_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS2_SaIS2_EEEES2_ET_S8_S8_T0_(ptr %39, ptr %40, i64 %.sroa.012.0.copyload)
          to label %42 unwind label %50

42:                                               ; preds = %37
  store ptr %41, ptr %8, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %43 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  store ptr %43, ptr %9, align 8
  %44 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP7CountrySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br i1 %44, label %45, label %52

45:                                               ; preds = %42
  %46 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %47 = getelementptr inbounds i8, ptr %46, i64 4
  %48 = load i32, ptr %47, align 4, !tbaa !11
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %47, align 4, !tbaa !11
  br label %52

50:                                               ; preds = %37
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %102

52:                                               ; preds = %45, %42
  %53 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %53, ptr %7, align 8, !tbaa !9
  store i32 0, ptr %23, align 4, !tbaa !11
  %54 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %55 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %.sroa.08.0.copyload = load i64, ptr %7, align 8
  %56 = invoke ptr @_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS2_SaIS2_EEEES2_ET_S8_S8_T0_(ptr %54, ptr %55, i64 %.sroa.08.0.copyload)
          to label %57 unwind label %65

57:                                               ; preds = %52
  store ptr %56, ptr %8, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %58 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  store ptr %58, ptr %10, align 8
  %59 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP7CountrySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br i1 %59, label %60, label %67

60:                                               ; preds = %57
  %61 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %62 = getelementptr inbounds i8, ptr %61, i64 4
  %63 = load i32, ptr %62, align 4, !tbaa !11
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %62, align 4, !tbaa !11
  br label %67

65:                                               ; preds = %52
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %102

67:                                               ; preds = %60, %57
  %68 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %68, ptr %7, align 8, !tbaa !9
  store i32 0, ptr %23, align 4, !tbaa !11
  %69 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %70 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %.sroa.04.0.copyload = load i64, ptr %7, align 8
  %71 = invoke ptr @_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS2_SaIS2_EEEES2_ET_S8_S8_T0_(ptr %69, ptr %70, i64 %.sroa.04.0.copyload)
          to label %72 unwind label %80

72:                                               ; preds = %67
  store ptr %71, ptr %8, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %73 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  store ptr %73, ptr %11, align 8
  %74 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP7CountrySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br i1 %74, label %75, label %82

75:                                               ; preds = %72
  %76 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %77 = getelementptr inbounds i8, ptr %76, i64 4
  %78 = load i32, ptr %77, align 4, !tbaa !11
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %77, align 4, !tbaa !11
  br label %82

80:                                               ; preds = %67
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %102

82:                                               ; preds = %75, %72
  %83 = load i32, ptr %2, align 4, !tbaa !5
  %84 = add nsw i32 %83, -1
  store i32 %84, ptr %2, align 4, !tbaa !5
  %.not = icmp eq i32 %83, 0
  br i1 %.not, label %._crit_edge, label %31, !llvm.loop !16

._crit_edge:                                      ; preds = %82, %.preheader26
  %85 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %86 = call ptr @_ZNSt6vectorI7CountrySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr %85, ptr %86, ptr noundef nonnull @_Z7compareRK7CountryS1_)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %._crit_edge
  %87 = load i32, ptr %1, align 4, !tbaa !5
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %.lr.ph32, label %._crit_edge33

._crit_edge33:                                    ; preds = %95, %.preheader
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %101 unwind label %.loopexit.split-lp

.lr.ph32:                                         ; preds = %.preheader, %95
  %indvars.iv35 = phi i64 [ %indvars.iv.next36, %95 ], [ 0, %.preheader ]
  %90 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI7CountrySaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv35) #7
  %91 = load i32, ptr %90, align 4, !tbaa !9
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %91)
          to label %93 unwind label %99

93:                                               ; preds = %.lr.ph32
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull @.str)
          to label %95 unwind label %99

95:                                               ; preds = %93
  %indvars.iv.next36 = add nuw nsw i64 %indvars.iv35, 1
  %96 = load i32, ptr %1, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = icmp slt i64 %indvars.iv.next36, %97
  br i1 %98, label %.lr.ph32, label %._crit_edge33, !llvm.loop !17

99:                                               ; preds = %93, %.lr.ph32
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %102

101:                                              ; preds = %._crit_edge33
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @_ZNSt6vectorI7CountrySaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

102:                                              ; preds = %.loopexit, %.loopexit.split-lp, %99, %80, %65, %50
  %.pn = phi { ptr, i32 } [ %81, %80 ], [ %66, %65 ], [ %51, %50 ], [ %100, %99 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @_ZNSt6vectorI7CountrySaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP7CountrySt6vectorIS1_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 ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CountrySt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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


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