; LLVM IR from ravireddy07/cpp-book :: src/Code-Forces/global#11_chess-cheater.ll (Z4testv)

; 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<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 }

@s = external dso_local global [1000123 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [98 x i8], align 1
@__PRETTY_FUNCTION__._Z4testv = external hidden unnamed_addr constant [12 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4testv() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  %19 = 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)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef @s)
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = call i64 @strlen(ptr noundef @s) #9
  %24 = trunc i64 %23 to i32
  %25 = icmp eq i32 %22, %24
  br i1 %25, label %26, label %27

26:                                               ; preds = %0
  br label %29

27:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 88, ptr noundef @__PRETTY_FUNCTION__._Z4testv) #10
  unreachable

28:                                               ; No predecessors!
  br label %29

29:                                               ; preds = %28, %26
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %85, %29
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = load i32, ptr %1, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %88

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #8
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = icmp sgt i32 %36, 0
  %38 = zext i1 %37 to i8
  store i8 %38, ptr %6, align 1, !tbaa !9
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %40
  %42 = load i8, ptr %41, align 1, !tbaa !11
  %43 = sext i8 %42 to i32
  %44 = icmp eq i32 %43, 87
  br i1 %44, label %45, label %46

45:                                               ; preds = %35
  store i32 4, ptr %5, align 4
  br label %82

46:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %62, %46
  %48 = load i32, ptr %4, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  %50 = load i32, ptr %1, align 4, !tbaa !5
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %52, label %60

52:                                               ; preds = %47
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %55
  %57 = load i8, ptr %56, align 1, !tbaa !11
  %58 = sext i8 %57 to i32
  %59 = icmp eq i32 %58, 76
  br label %60

60:                                               ; preds = %52, %47
  %61 = phi i1 [ false, %47 ], [ %59, %52 ]
  br i1 %61, label %62, label %67

62:                                               ; preds = %60
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %7, align 4, !tbaa !5
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %4, align 4, !tbaa !5
  br label %47, !llvm.loop !12

67:                                               ; preds = %60
  %68 = load i8, ptr %6, align 1, !tbaa !9, !range !14, !noundef !15
  %69 = trunc i8 %68 to i1
  br i1 %69, label %70, label %81

70:                                               ; preds = %67
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = load i32, ptr %1, align 4, !tbaa !5
  %73 = sub nsw i32 %72, 1
  %74 = icmp ne i32 %71, %73
  br i1 %74, label %75, label %81

75:                                               ; preds = %70
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %76 unwind label %77

76:                                               ; preds = %75
  br label %81

77:                                               ; preds = %75
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %8, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %207

81:                                               ; preds = %76, %70, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  store i32 0, ptr %5, align 4
  br label %82

82:                                               ; preds = %81, %45
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  %83 = load i32, ptr %5, align 4
  switch i32 %83, label %213 [
    i32 0, label %84
    i32 4, label %85
  ]

84:                                               ; preds = %82
  br label %85

85:                                               ; preds = %84, %82
  %86 = load i32, ptr %4, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %4, align 4, !tbaa !5
  br label %30, !llvm.loop !16

88:                                               ; preds = %34
  %89 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %90 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %89, ptr %90, align 8
  %91 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %92 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %91, ptr %92, align 8
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8
  %95 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %94, ptr %96)
          to label %97 unwind label %103

97:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %142, %97
  %99 = load i32, ptr %14, align 4, !tbaa !5
  %100 = load i32, ptr %1, align 4, !tbaa !5
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %107, label %102

102:                                              ; preds = %98
  store i32 7, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %145

103:                                              ; preds = %88
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %8, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %9, align 4
  br label %207

107:                                              ; preds = %98
  %108 = load i32, ptr %14, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %109
  %111 = load i8, ptr %110, align 1, !tbaa !11
  %112 = sext i8 %111 to i32
  %113 = icmp eq i32 %112, 87
  br i1 %113, label %114, label %117

114:                                              ; preds = %107
  %115 = load i32, ptr %12, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %12, align 4, !tbaa !5
  br label %120

117:                                              ; preds = %107
  %118 = load i32, ptr %13, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %13, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %117, %114
  %121 = load i32, ptr %14, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %122
  %124 = load i8, ptr %123, align 1, !tbaa !11
  %125 = sext i8 %124 to i32
  %126 = icmp eq i32 %125, 87
  br i1 %126, label %127, label %141

127:                                              ; preds = %120
  %128 = load i32, ptr %14, align 4, !tbaa !5
  %129 = icmp sgt i32 %128, 0
  br i1 %129, label %130, label %141

130:                                              ; preds = %127
  %131 = load i32, ptr %14, align 4, !tbaa !5
  %132 = sub nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %133
  %135 = load i8, ptr %134, align 1, !tbaa !11
  %136 = sext i8 %135 to i32
  %137 = icmp eq i32 %136, 87
  br i1 %137, label %138, label %141

138:                                              ; preds = %130
  %139 = load i32, ptr %12, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %12, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %138, %130, %127, %120
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %14, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %14, align 4, !tbaa !5
  br label %98, !llvm.loop !17

145:                                              ; preds = %102
  %146 = load i32, ptr %13, align 4, !tbaa !5
  %147 = load i32, ptr %1, align 4, !tbaa !5
  %148 = icmp eq i32 %146, %147
  br i1 %148, label %149, label %155

149:                                              ; preds = %145
  %150 = load i32, ptr %2, align 4, !tbaa !5
  %151 = icmp sgt i32 %150, 0
  br i1 %151, label %152, label %155

152:                                              ; preds = %149
  %153 = load i32, ptr %12, align 4, !tbaa !5
  %154 = add nsw i32 %153, -1
  store i32 %154, ptr %12, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %152, %149, %145
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store ptr %3, ptr %15, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %156 = load ptr, ptr %15, align 8, !tbaa !18
  %157 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %156) #8
  %158 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %157, ptr %158, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %159 = load ptr, ptr %15, align 8, !tbaa !18
  %160 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %159) #8
  %161 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %160, ptr %161, align 8
  br label %162

162:                                              ; preds = %188, %155
  %163 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br i1 %163, label %165, label %164

164:                                              ; preds = %162
  store i32 10, ptr %5, align 4
  br label %190

165:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %167 = load i32, ptr %166, align 4, !tbaa !5
  store i32 %167, ptr %18, align 4, !tbaa !5
  %168 = load i32, ptr %2, align 4, !tbaa !5
  %169 = load i32, ptr %18, align 4, !tbaa !5
  %170 = icmp sge i32 %168, %169
  br i1 %170, label %171, label %183

171:                                              ; preds = %165
  %172 = load i32, ptr %18, align 4, !tbaa !5
  %173 = load i32, ptr %2, align 4, !tbaa !5
  %174 = sub nsw i32 %173, %172
  store i32 %174, ptr %2, align 4, !tbaa !5
  %175 = load i32, ptr %18, align 4, !tbaa !5
  %176 = mul nsw i32 2, %175
  %177 = add nsw i32 %176, 1
  %178 = load i32, ptr %12, align 4, !tbaa !5
  %179 = add nsw i32 %178, %177
  store i32 %179, ptr %12, align 4, !tbaa !5
  %180 = load i32, ptr %18, align 4, !tbaa !5
  %181 = load i32, ptr %13, align 4, !tbaa !5
  %182 = sub nsw i32 %181, %180
  store i32 %182, ptr %13, align 4, !tbaa !5
  br label %184

183:                                              ; preds = %165
  store i32 10, ptr %5, align 4
  br label %185

184:                                              ; preds = %171
  store i32 0, ptr %5, align 4
  br label %185

185:                                              ; preds = %184, %183
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  %186 = load i32, ptr %5, align 4
  switch i32 %186, label %190 [
    i32 0, label %187
  ]

187:                                              ; preds = %185
  br label %188

188:                                              ; preds = %187
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  br label %162

190:                                              ; preds = %185, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %191

191:                                              ; preds = %190
  %192 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %193 unwind label %203

193:                                              ; preds = %191
  %194 = load i32, ptr %192, align 4, !tbaa !5
  %195 = mul nsw i32 2, %194
  %196 = load i32, ptr %12, align 4, !tbaa !5
  %197 = add nsw i32 %196, %195
  store i32 %197, ptr %12, align 4, !tbaa !5
  %198 = load i32, ptr %12, align 4, !tbaa !5
  %199 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %198)
          to label %200 unwind label %203

200:                                              ; preds = %193
  %201 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %199, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %202 unwind label %203

202:                                              ; preds = %200
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #8
  ret void

203:                                              ; preds = %200, %193, %191
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %8, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %207

207:                                              ; preds = %203, %103, %77
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #8
  br label %208

208:                                              ; preds = %207
  %209 = load ptr, ptr %8, align 8
  %210 = load i32, ptr %9, align 4
  %211 = insertvalue { ptr, i32 } poison, ptr %209, 0
  %212 = insertvalue { ptr, i32 } %211, i32 %210, 1
  resume { ptr, i32 } %212

213:                                              ; preds = %82
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull) #3

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(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 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #6 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind willreturn memory(read) "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 = { noreturn 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 #6 = { 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 = { 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 }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !7, i64 0}


; 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<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 }

@s = external dso_local global [1000123 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [98 x i8], align 1
@__PRETTY_FUNCTION__._Z4testv = external hidden unnamed_addr constant [12 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4testv() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %8 = 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)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef @s)
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @s) #9
  %13 = trunc i64 %12 to i32
  %14 = icmp eq i32 %11, %13
  br i1 %14, label %16, label %15

15:                                               ; preds = %0
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 88, ptr noundef nonnull @__PRETTY_FUNCTION__._Z4testv) #10
  unreachable

16:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph58, label %._crit_edge

._crit_edge:                                      ; preds = %44, %16
  %19 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %20 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %19, ptr %20)
          to label %48 unwind label %71

.lr.ph58:                                         ; preds = %16, %44
  %.pre83 = phi i32 [ %.pre84, %44 ], [ %17, %16 ]
  %21 = phi i32 [ %45, %44 ], [ %17, %16 ]
  %.057 = phi i32 [ %46, %44 ], [ 0, %16 ]
  %22 = icmp slt i32 %.057, 1
  %23 = sext i32 %.057 to i64
  %24 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %23
  %25 = load i8, ptr %24, align 1, !tbaa !9
  %26 = icmp eq i8 %25, 87
  br i1 %26, label %44, label %27

27:                                               ; preds = %.lr.ph58
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %28 = add nsw i32 %.057, 1
  %29 = icmp slt i32 %28, %21
  br i1 %29, label %.lr.ph.preheader, label %..critedge_crit_edge

..critedge_crit_edge:                             ; preds = %27
  %.pre86 = add nsw i32 %21, -1
  br label %.critedge

.lr.ph.preheader:                                 ; preds = %27
  %30 = sext i32 %28 to i64
  %31 = sext i32 %21 to i64
  %32 = add nsw i32 %21, -1
  %33 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %30
  %34 = load i8, ptr %33, align 1, !tbaa !9
  %35 = icmp eq i8 %34, 76
  br i1 %35, label %.lr.ph102, label %.critedge

.lr.ph:                                           ; preds = %.lr.ph102
  %36 = add nuw nsw i32 %storemerge51101, 1
  %37 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %indvars.iv.next
  %38 = load i8, ptr %37, align 1, !tbaa !9
  %39 = icmp eq i8 %38, 76
  br i1 %39, label %.lr.ph102, label %.lr.ph..critedge.loopexit_crit_edge, !llvm.loop !10

.lr.ph102:                                        ; preds = %.lr.ph.preheader, %.lr.ph
  %storemerge51101 = phi i32 [ %36, %.lr.ph ], [ 1, %.lr.ph.preheader ]
  %indvars.iv100 = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %30, %.lr.ph.preheader ]
  %indvars.iv.next = add nsw i64 %indvars.iv100, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %31
  br i1 %exitcond.not, label %.critedge.thread, label %.lr.ph, !llvm.loop !10

.lr.ph..critedge.loopexit_crit_edge:              ; preds = %.lr.ph
  %40 = trunc nsw i64 %indvars.iv100 to i32
  br label %.critedge

.critedge:                                        ; preds = %.lr.ph.preheader, %.lr.ph..critedge.loopexit_crit_edge, %..critedge_crit_edge
  %.pre-phi = phi i32 [ %.pre86, %..critedge_crit_edge ], [ %32, %.lr.ph..critedge.loopexit_crit_edge ], [ %32, %.lr.ph.preheader ]
  %storemerge.lcssa = phi i32 [ 1, %..critedge_crit_edge ], [ %36, %.lr.ph..critedge.loopexit_crit_edge ], [ 1, %.lr.ph.preheader ]
  %.1.lcssa = phi i32 [ %.057, %..critedge_crit_edge ], [ %40, %.lr.ph..critedge.loopexit_crit_edge ], [ %.057, %.lr.ph.preheader ]
  store i32 %storemerge.lcssa, ptr %4, align 4, !tbaa !5
  %.not = icmp eq i32 %.1.lcssa, %.pre-phi
  %or.cond50 = select i1 %22, i1 true, i1 %.not
  br i1 %or.cond50, label %.critedge.thread, label %41

41:                                               ; preds = %.critedge
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %._crit_edge82 unwind label %42

._crit_edge82:                                    ; preds = %41
  %.pre.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %.critedge.thread

42:                                               ; preds = %41
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %112

.critedge.thread:                                 ; preds = %.lr.ph102, %._crit_edge82, %.critedge
  %.1.lcssa92 = phi i32 [ %.1.lcssa, %._crit_edge82 ], [ %.1.lcssa, %.critedge ], [ %32, %.lr.ph102 ]
  %.pre = phi i32 [ %.pre.pre, %._crit_edge82 ], [ %.pre83, %.critedge ], [ %.pre83, %.lr.ph102 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %44

44:                                               ; preds = %.lr.ph58, %.critedge.thread
  %.pre84 = phi i32 [ %.pre, %.critedge.thread ], [ %.pre83, %.lr.ph58 ]
  %45 = phi i32 [ %.pre, %.critedge.thread ], [ %21, %.lr.ph58 ]
  %.2 = phi i32 [ %.1.lcssa92, %.critedge.thread ], [ %.057, %.lr.ph58 ]
  %46 = add nsw i32 %.2, 1
  %47 = icmp slt i32 %46, %45
  br i1 %47, label %.lr.ph58, label %._crit_edge, !llvm.loop !12

48:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %49 = load i32, ptr %1, align 4, !tbaa !5
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %.lr.ph63.preheader, label %._crit_edge64

.lr.ph63.preheader:                               ; preds = %48
  %51 = load i8, ptr @s, align 16, !tbaa !9
  %52 = icmp ne i8 %51, 87
  %spec.select95 = zext i1 %52 to i32
  %not. = xor i1 %52, true
  %spec.select96 = zext i1 %not. to i32
  %exitcond79.peel.not = icmp eq i32 %49, 1
  br i1 %exitcond79.peel.not, label %._crit_edge64, label %.lr.ph63.preheader104

.lr.ph63.preheader104:                            ; preds = %.lr.ph63.preheader
  %wide.trip.count = zext nneg i32 %49 to i64
  %53 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %53, 1
  %54 = icmp eq i32 %49, 2
  br i1 %54, label %._crit_edge64.loopexit.unr-lcssa, label %.lr.ph63.preheader104.new

.lr.ph63.preheader104.new:                        ; preds = %.lr.ph63.preheader104
  %unroll_iter = and i64 %53, -2
  br label %.lr.ph63

._crit_edge64.loopexit.unr-lcssa:                 ; preds = %.lr.ph63.1, %.lr.ph63.preheader104
  %.lcssa.ph = phi i32 [ poison, %.lr.ph63.preheader104 ], [ %89, %.lr.ph63.1 ]
  %.237.lcssa.ph = phi i32 [ poison, %.lr.ph63.preheader104 ], [ %.237.1, %.lr.ph63.1 ]
  %indvars.iv76.unr = phi i64 [ 1, %.lr.ph63.preheader104 ], [ %indvars.iv.next77.1, %.lr.ph63.1 ]
  %.03560.unr = phi i32 [ %spec.select96, %.lr.ph63.preheader104 ], [ %.237.1, %.lr.ph63.1 ]
  %.unr = phi i32 [ %spec.select95, %.lr.ph63.preheader104 ], [ %89, %.lr.ph63.1 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge64, label %.lr.ph63.epil

.lr.ph63.epil:                                    ; preds = %._crit_edge64.loopexit.unr-lcssa
  %55 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %indvars.iv76.unr
  %56 = load i8, ptr %55, align 1, !tbaa !9
  %57 = icmp eq i8 %56, 87
  br i1 %57, label %59, label %.thread.epil

.thread.epil:                                     ; preds = %.lr.ph63.epil
  %58 = add nsw i32 %.unr, 1
  br label %._crit_edge64

59:                                               ; preds = %.lr.ph63.epil
  %60 = add nsw i64 %indvars.iv76.unr, -1
  %61 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %60
  %62 = load i8, ptr %61, align 1, !tbaa !9
  %63 = icmp eq i8 %62, 87
  %spec.select45.v.epil = select i1 %63, i32 2, i32 1
  %spec.select45.epil = add nsw i32 %.03560.unr, %spec.select45.v.epil
  br label %._crit_edge64

._crit_edge64:                                    ; preds = %._crit_edge64.loopexit.unr-lcssa, %59, %.thread.epil, %.lr.ph63.preheader, %48
  %.lcssa59 = phi i32 [ 0, %48 ], [ %spec.select95, %.lr.ph63.preheader ], [ %.lcssa.ph, %._crit_edge64.loopexit.unr-lcssa ], [ %.unr, %59 ], [ %58, %.thread.epil ]
  %.035.lcssa = phi i32 [ 0, %48 ], [ %spec.select96, %.lr.ph63.preheader ], [ %.237.lcssa.ph, %._crit_edge64.loopexit.unr-lcssa ], [ %spec.select45.epil, %59 ], [ %.03560.unr, %.thread.epil ]
  store i32 %.lcssa59, ptr %5, align 4, !tbaa !5
  %64 = icmp eq i32 %.lcssa59, %49
  %65 = load i32, ptr %2, align 4
  %66 = icmp sgt i32 %65, 0
  %or.cond3 = select i1 %64, i1 %66, i1 false
  %67 = sext i1 %or.cond3 to i32
  %spec.select = add nsw i32 %.035.lcssa, %67
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %68 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  store ptr %68, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %69 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  store ptr %69, ptr %7, align 8
  %70 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %70, label %.lr.ph70, label %.thread48

71:                                               ; preds = %._crit_edge
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %112

.lr.ph63:                                         ; preds = %.lr.ph63.1, %.lr.ph63.preheader104.new
  %indvars.iv76 = phi i64 [ 1, %.lr.ph63.preheader104.new ], [ %indvars.iv.next77.1, %.lr.ph63.1 ]
  %.03560 = phi i32 [ %spec.select96, %.lr.ph63.preheader104.new ], [ %.237.1, %.lr.ph63.1 ]
  %73 = phi i32 [ %spec.select95, %.lr.ph63.preheader104.new ], [ %89, %.lr.ph63.1 ]
  %niter = phi i64 [ 0, %.lr.ph63.preheader104.new ], [ %niter.next.1, %.lr.ph63.1 ]
  %74 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %indvars.iv76
  %75 = load i8, ptr %74, align 1, !tbaa !9
  %76 = icmp eq i8 %75, 87
  br i1 %76, label %78, label %.thread

.thread:                                          ; preds = %.lr.ph63
  %77 = add nsw i32 %73, 1
  br label %.lr.ph63.1

78:                                               ; preds = %.lr.ph63
  %79 = add nsw i64 %indvars.iv76, -1
  %80 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !9
  %82 = icmp eq i8 %81, 87
  %spec.select45.v = select i1 %82, i32 2, i32 1
  %spec.select45 = add nsw i32 %.03560, %spec.select45.v
  br label %.lr.ph63.1

.lr.ph63.1:                                       ; preds = %.thread, %78
  %83 = phi i32 [ %73, %78 ], [ %77, %.thread ]
  %.237 = phi i32 [ %spec.select45, %78 ], [ %.03560, %.thread ]
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %84 = getelementptr inbounds [1000123 x i8], ptr @s, i64 0, i64 %indvars.iv.next77
  %85 = load i8, ptr %84, align 1, !tbaa !9
  %86 = icmp eq i8 %85, 87
  %87 = icmp eq i8 %75, 87
  %spec.select45.v.1 = select i1 %87, i32 2, i32 1
  %spec.select45.1 = add nsw i32 %.237, %spec.select45.v.1
  %88 = add nsw i32 %83, 1
  %89 = select i1 %86, i32 %83, i32 %88
  %.237.1 = select i1 %86, i32 %spec.select45.1, i32 %.237
  %indvars.iv.next77.1 = add nuw nsw i64 %indvars.iv76, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge64.loopexit.unr-lcssa, label %.lr.ph63, !llvm.loop !13

.lr.ph70:                                         ; preds = %._crit_edge64, %94
  %90 = phi i32 [ %99, %94 ], [ %.lcssa59, %._crit_edge64 ]
  %.468 = phi i32 [ %98, %94 ], [ %spec.select, %._crit_edge64 ]
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = load i32, ptr %2, align 4, !tbaa !5
  %.not.not = icmp slt i32 %93, %92
  br i1 %.not.not, label %.thread48, label %94

94:                                               ; preds = %.lr.ph70
  %95 = sub nsw i32 %93, %92
  store i32 %95, ptr %2, align 4, !tbaa !5
  %96 = shl nsw i32 %92, 1
  %97 = add i32 %.468, 1
  %98 = add i32 %97, %96
  %99 = sub nsw i32 %90, %92
  store i32 %99, ptr %5, align 4, !tbaa !5
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %101 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %101, label %.lr.ph70, label %.thread48

.thread48:                                        ; preds = %94, %.lr.ph70, %._crit_edge64
  %.4.lcssa = phi i32 [ %spec.select, %._crit_edge64 ], [ %.468, %.lr.ph70 ], [ %98, %94 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = shl nsw i32 %103, 1
  %105 = add nsw i32 %104, %.4.lcssa
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %105)
          to label %107 unwind label %110

107:                                              ; preds = %.thread48
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %109 unwind label %110

109:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret void

110:                                              ; preds = %107, %.thread48
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  br label %112

112:                                              ; preds = %110, %71, %42
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %111, %110 ], [ %72, %71 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  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) #1

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 #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

; 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 #0 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)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { noreturn 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 #6 = { 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 = { 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 }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11, !14}
!14 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass