; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/293 Division 2/Problem E (E)

; 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::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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"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 }

@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@a = external dso_local global [100000 x i32], align 16
@mark = external dso_local global i32, align 4
@l = external dso_local global i32, align 4
@u = external dso_local global i32, align 4
@s = external dso_local global i32, align 4
@segment = external dso_local global %"class.std::vector", align 8
@_Z3numB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %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 i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %35, %0
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %38

20:                                               ; preds = %15
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z3numB5cxx11)
  %22 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3numB5cxx11, ptr noundef @.str)
  br i1 %22, label %23, label %28

23:                                               ; preds = %20
  %24 = load i32, ptr @mark, align 4, !tbaa !5
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %26
  store i32 %24, ptr %27, align 4, !tbaa !5
  br label %34

28:                                               ; preds = %20
  %29 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z3numB5cxx11) #7
  %30 = call i32 @atoi(ptr noundef %29) #8
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %32
  store i32 %30, ptr %33, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %28, %23
  br label %35

35:                                               ; preds = %34
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %2, align 4, !tbaa !5
  br label %15, !llvm.loop !9

38:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %234, %38
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = load i32, ptr @k, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  store i32 5, ptr %4, align 4
  br label %237

44:                                               ; preds = %39
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @segment) #7
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @segment, ptr noundef nonnull align 4 dereferenceable(4) @mark)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %45 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %45, ptr %5, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %55, %44
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = load i32, ptr @n, align 4, !tbaa !5
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %51, label %50

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

51:                                               ; preds = %46
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %53
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @segment, ptr noundef nonnull align 4 dereferenceable(4) %54)
  br label %55

55:                                               ; preds = %51
  %56 = load i32, ptr @k, align 4, !tbaa !5
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = add nsw i32 %57, %56
  store i32 %58, ptr %5, align 4, !tbaa !5
  br label %46, !llvm.loop !11

59:                                               ; preds = %50
  store i32 1, ptr @l, align 4, !tbaa !5
  %60 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @segment) #7
  %61 = trunc i64 %60 to i32
  store i32 %61, ptr @s, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %62 = load i32, ptr @mark, align 4, !tbaa !5
  %63 = sub nsw i32 0, %62
  store i32 %63, ptr %6, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) @segment, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %64

64:                                               ; preds = %210, %75, %59
  %65 = load i32, ptr @l, align 4, !tbaa !5
  %66 = load i32, ptr @s, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %68, label %213

68:                                               ; preds = %64
  %69 = load i32, ptr @l, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %70) #7
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = load i32, ptr @mark, align 4, !tbaa !5
  %74 = icmp ne i32 %72, %73
  br i1 %74, label %75, label %78

75:                                               ; preds = %68
  %76 = load i32, ptr @l, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr @l, align 4, !tbaa !5
  br label %64, !llvm.loop !12

78:                                               ; preds = %68
  %79 = load i32, ptr @l, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr @u, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %94, %78
  %82 = load i32, ptr @u, align 4, !tbaa !5
  %83 = load i32, ptr @s, align 4, !tbaa !5
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %85, label %97

85:                                               ; preds = %81
  %86 = load i32, ptr @u, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %87) #7
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = load i32, ptr @mark, align 4, !tbaa !5
  %91 = icmp ne i32 %89, %90
  br i1 %91, label %92, label %93

92:                                               ; preds = %85
  br label %97

93:                                               ; preds = %85
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr @u, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr @u, align 4, !tbaa !5
  br label %81, !llvm.loop !13

97:                                               ; preds = %92, %81
  %98 = load i32, ptr @u, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %99) #7
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = load i32, ptr @l, align 4, !tbaa !5
  %103 = sub nsw i32 %102, 1
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %104) #7
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = sub nsw i32 %101, %106
  %108 = sub nsw i32 %107, 1
  %109 = load i32, ptr @u, align 4, !tbaa !5
  %110 = load i32, ptr @l, align 4, !tbaa !5
  %111 = sub nsw i32 %109, %110
  %112 = icmp slt i32 %108, %111
  br i1 %112, label %113, label %115

113:                                              ; preds = %97
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %237

115:                                              ; preds = %97
  %116 = load i32, ptr @l, align 4, !tbaa !5
  %117 = sub nsw i32 %116, 1
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %118) #7
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = icmp sge i32 %120, 0
  br i1 %121, label %122, label %143

122:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %123 = load i32, ptr @l, align 4, !tbaa !5
  store i32 %123, ptr %7, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %139, %122
  %125 = load i32, ptr %7, align 4, !tbaa !5
  %126 = load i32, ptr @u, align 4, !tbaa !5
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  store i32 16, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %142

129:                                              ; preds = %124
  %130 = load i32, ptr %7, align 4, !tbaa !5
  %131 = sub nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %132) #7
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  %136 = load i32, ptr %7, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %137) #7
  store i32 %135, ptr %138, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %129
  %140 = load i32, ptr %7, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %7, align 4, !tbaa !5
  br label %124, !llvm.loop !14

142:                                              ; preds = %128
  br label %210

143:                                              ; preds = %115
  %144 = load i32, ptr @u, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %145) #7
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = icmp sle i32 %147, 0
  br i1 %148, label %149, label %171

149:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %150 = load i32, ptr @u, align 4, !tbaa !5
  %151 = sub nsw i32 %150, 1
  store i32 %151, ptr %8, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %167, %149
  %153 = load i32, ptr %8, align 4, !tbaa !5
  %154 = load i32, ptr @l, align 4, !tbaa !5
  %155 = icmp sge i32 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %152
  store i32 19, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %170

157:                                              ; preds = %152
  %158 = load i32, ptr %8, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %160) #7
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = sub nsw i32 %162, 1
  %164 = load i32, ptr %8, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %165) #7
  store i32 %163, ptr %166, align 4, !tbaa !5
  br label %167

167:                                              ; preds = %157
  %168 = load i32, ptr %8, align 4, !tbaa !5
  %169 = add nsw i32 %168, -1
  store i32 %169, ptr %8, align 4, !tbaa !5
  br label %152, !llvm.loop !15

170:                                              ; preds = %156
  br label %209

171:                                              ; preds = %143
  %172 = load i32, ptr @l, align 4, !tbaa !5
  %173 = sub nsw i32 %172, 1
  %174 = sext i32 %173 to i64
  %175 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %174) #7
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = load i32, ptr @u, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %178) #7
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = load i32, ptr @u, align 4, !tbaa !5
  %182 = load i32, ptr @l, align 4, !tbaa !5
  %183 = sub nsw i32 %181, %182
  %184 = call noundef i32 @_Z3getiii(i32 noundef %176, i32 noundef %180, i32 noundef %183)
  %185 = load i32, ptr @l, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %186) #7
  store i32 %184, ptr %187, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %188 = load i32, ptr @l, align 4, !tbaa !5
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %9, align 4, !tbaa !5
  br label %190

190:                                              ; preds = %205, %171
  %191 = load i32, ptr %9, align 4, !tbaa !5
  %192 = load i32, ptr @u, align 4, !tbaa !5
  %193 = icmp slt i32 %191, %192
  br i1 %193, label %195, label %194

194:                                              ; preds = %190
  store i32 22, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %208

195:                                              ; preds = %190
  %196 = load i32, ptr %9, align 4, !tbaa !5
  %197 = sub nsw i32 %196, 1
  %198 = sext i32 %197 to i64
  %199 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %198) #7
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  %202 = load i32, ptr %9, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %203) #7
  store i32 %201, ptr %204, align 4, !tbaa !5
  br label %205

205:                                              ; preds = %195
  %206 = load i32, ptr %9, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %9, align 4, !tbaa !5
  br label %190, !llvm.loop !16

208:                                              ; preds = %194
  br label %209

209:                                              ; preds = %208, %170
  br label %210

210:                                              ; preds = %209, %142
  %211 = load i32, ptr @u, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr @l, align 4, !tbaa !5
  br label %64, !llvm.loop !12

213:                                              ; preds = %64
  store i32 1, ptr @l, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %214 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %214, ptr %10, align 4, !tbaa !5
  br label %215

215:                                              ; preds = %229, %213
  %216 = load i32, ptr %10, align 4, !tbaa !5
  %217 = load i32, ptr @n, align 4, !tbaa !5
  %218 = icmp slt i32 %216, %217
  br i1 %218, label %220, label %219

219:                                              ; preds = %215
  store i32 25, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %233

220:                                              ; preds = %215
  %221 = load i32, ptr @l, align 4, !tbaa !5
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr @l, align 4, !tbaa !5
  %223 = sext i32 %221 to i64
  %224 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %223) #7
  %225 = load i32, ptr %224, align 4, !tbaa !5
  %226 = load i32, ptr %10, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %227
  store i32 %225, ptr %228, align 4, !tbaa !5
  br label %229

229:                                              ; preds = %220
  %230 = load i32, ptr @k, align 4, !tbaa !5
  %231 = load i32, ptr %10, align 4, !tbaa !5
  %232 = add nsw i32 %231, %230
  store i32 %232, ptr %10, align 4, !tbaa !5
  br label %215, !llvm.loop !17

233:                                              ; preds = %219
  br label %234

234:                                              ; preds = %233
  %235 = load i32, ptr %3, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %3, align 4, !tbaa !5
  br label %39, !llvm.loop !18

237:                                              ; preds = %113, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  %238 = load i32, ptr %4, align 4
  switch i32 %238, label %285 [
    i32 5, label %239
    i32 1, label %283
  ]

239:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %240 = load i32, ptr @k, align 4, !tbaa !5
  store i32 %240, ptr %11, align 4, !tbaa !5
  br label %241

241:                                              ; preds = %261, %239
  %242 = load i32, ptr %11, align 4, !tbaa !5
  %243 = load i32, ptr @n, align 4, !tbaa !5
  %244 = icmp slt i32 %242, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %241
  store i32 28, ptr %4, align 4
  br label %264

246:                                              ; preds = %241
  %247 = load i32, ptr %11, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %248
  %250 = load i32, ptr %249, align 4, !tbaa !5
  %251 = load i32, ptr %11, align 4, !tbaa !5
  %252 = load i32, ptr @k, align 4, !tbaa !5
  %253 = sub nsw i32 %251, %252
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %254
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = icmp sle i32 %250, %256
  br i1 %257, label %258, label %260

258:                                              ; preds = %246
  %259 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %264

260:                                              ; preds = %246
  br label %261

261:                                              ; preds = %260
  %262 = load i32, ptr %11, align 4, !tbaa !5
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %11, align 4, !tbaa !5
  br label %241, !llvm.loop !19

264:                                              ; preds = %258, %245
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  %265 = load i32, ptr %4, align 4
  switch i32 %265, label %285 [
    i32 28, label %266
    i32 1, label %283
  ]

266:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %267

267:                                              ; preds = %278, %266
  %268 = load i32, ptr %12, align 4, !tbaa !5
  %269 = load i32, ptr @n, align 4, !tbaa !5
  %270 = icmp slt i32 %268, %269
  br i1 %270, label %272, label %271

271:                                              ; preds = %267
  store i32 31, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %281

272:                                              ; preds = %267
  %273 = load i32, ptr %12, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %274
  %276 = load i32, ptr %275, align 4, !tbaa !5
  %277 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %276)
  br label %278

278:                                              ; preds = %272
  %279 = load i32, ptr %12, align 4, !tbaa !5
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr %12, align 4, !tbaa !5
  br label %267, !llvm.loop !20

281:                                              ; preds = %271
  %282 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  store i32 0, ptr %1, align 4
  br label %283

283:                                              ; preds = %281, %264, %237
  %284 = load i32, ptr %1, align 4
  ret i32 %284

285:                                              ; preds = %264, %237
  unreachable
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #2

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

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 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)) #6 align 2

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

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

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

declare i32 @printf(ptr noundef, ...) #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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind willreturn memory(read) 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


; 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::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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"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 }

@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@a = external dso_local global [100000 x i32], align 16
@mark = external dso_local global i32, align 4
@l = external dso_local local_unnamed_addr global i32, align 4
@u = external dso_local local_unnamed_addr global i32, align 4
@s = external dso_local local_unnamed_addr global i32, align 4
@segment = external dso_local global %"class.std::vector", align 8
@_Z3numB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %.preheader64

.preheader64:                                     ; preds = %16, %0
  %6 = phi i32 [ %4, %0 ], [ %18, %16 ]
  %7 = load i32, ptr @k, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph88, label %._crit_edge89

.lr.ph:                                           ; preds = %0, %16
  %indvars.iv = phi i64 [ %indvars.iv.next, %16 ], [ 0, %0 ]
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z3numB5cxx11)
  %10 = tail call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3numB5cxx11, ptr noundef nonnull @.str)
  br i1 %10, label %11, label %13

11:                                               ; preds = %.lr.ph
  %12 = load i32, ptr @mark, align 4, !tbaa !5
  br label %16

13:                                               ; preds = %.lr.ph
  %14 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z3numB5cxx11) #8
  %15 = tail call i32 @atoi(ptr nocapture noundef %14) #9
  br label %16

16:                                               ; preds = %11, %13
  %.sink = phi i32 [ %12, %11 ], [ %15, %13 ]
  %17 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %indvars.iv
  store i32 %.sink, ptr %17, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = icmp slt i64 %indvars.iv.next, %19
  br i1 %20, label %.lr.ph, label %.preheader64, !llvm.loop !9

.lr.ph88:                                         ; preds = %.preheader64, %._crit_edge86
  %.04387 = phi i32 [ %140, %._crit_edge86 ], [ 0, %.preheader64 ]
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @segment) #8
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @segment, ptr noundef nonnull align 4 dereferenceable(4) @mark)
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = icmp slt i32 %.04387, %21
  br i1 %22, label %.lr.ph67, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph67, %.lr.ph88
  store i32 1, ptr @l, align 4, !tbaa !5
  %23 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @segment) #8
  %24 = trunc i64 %23 to i32
  store i32 %24, ptr @s, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %25 = load i32, ptr @mark, align 4, !tbaa !5
  %26 = sub nsw i32 0, %25
  store i32 %26, ptr %1, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) @segment, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %27 = load i32, ptr @l, align 4, !tbaa !5
  %28 = load i32, ptr @s, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %.lr.ph81, label %._crit_edge82

.lr.ph67:                                         ; preds = %.lr.ph88, %.lr.ph67
  %.04166 = phi i32 [ %33, %.lr.ph67 ], [ %.04387, %.lr.ph88 ]
  %30 = sext i32 %.04166 to i64
  %31 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %30
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @segment, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %32 = load i32, ptr @k, align 4, !tbaa !5
  %33 = add nsw i32 %32, %.04166
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %.lr.ph67, label %._crit_edge, !llvm.loop !11

.lr.ph81:                                         ; preds = %._crit_edge, %.backedge
  %36 = phi i32 [ %storemerge96, %.backedge ], [ %27, %._crit_edge ]
  %37 = sext i32 %36 to i64
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %37) #8
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = load i32, ptr @mark, align 4, !tbaa !5
  %.not = icmp eq i32 %39, %40
  br i1 %.not, label %.preheader63.preheader, label %.backedge

.preheader63.preheader:                           ; preds = %.lr.ph81
  %storemerge.in.peel = load i32, ptr @l, align 4, !tbaa !5
  %storemerge.peel = add nsw i32 %storemerge.in.peel, 1
  store i32 %storemerge.peel, ptr @u, align 4, !tbaa !5
  %41 = load i32, ptr @s, align 4, !tbaa !5
  %42 = icmp slt i32 %storemerge.peel, %41
  br i1 %42, label %43, label %.loopexit101

43:                                               ; preds = %.preheader63.preheader
  %44 = sext i32 %storemerge.peel to i64
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %44) #8
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = load i32, ptr @mark, align 4, !tbaa !5
  %.not49.peel = icmp eq i32 %46, %47
  br i1 %.not49.peel, label %.preheader63, label %.loopexit101

.backedge:                                        ; preds = %.lr.ph72, %.lr.ph76, %.lr.ph79, %78, %97, %107, %.lr.ph81
  %storemerge96.in.in = phi ptr [ @l, %.lr.ph81 ], [ @u, %107 ], [ @u, %97 ], [ @u, %78 ], [ @u, %.lr.ph79 ], [ @u, %.lr.ph76 ], [ @u, %.lr.ph72 ]
  %storemerge96.in = load i32, ptr %storemerge96.in.in, align 4, !tbaa !5
  %storemerge96 = add nsw i32 %storemerge96.in, 1
  store i32 %storemerge96, ptr @l, align 4, !tbaa !5
  %48 = load i32, ptr @s, align 4, !tbaa !5
  %49 = icmp slt i32 %storemerge96, %48
  br i1 %49, label %.lr.ph81, label %._crit_edge82, !llvm.loop !12

.preheader63:                                     ; preds = %43, %52
  %storemerge.in = load i32, ptr @u, align 4, !tbaa !5
  %storemerge = add nsw i32 %storemerge.in, 1
  store i32 %storemerge, ptr @u, align 4, !tbaa !5
  %50 = load i32, ptr @s, align 4, !tbaa !5
  %51 = icmp slt i32 %storemerge, %50
  br i1 %51, label %52, label %.loopexit101

52:                                               ; preds = %.preheader63
  %53 = sext i32 %storemerge to i64
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %53) #8
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = load i32, ptr @mark, align 4, !tbaa !5
  %.not49 = icmp eq i32 %55, %56
  br i1 %.not49, label %.preheader63, label %.loopexit101, !llvm.loop !13

.loopexit101:                                     ; preds = %52, %.preheader63, %43, %.preheader63.preheader
  %57 = load i32, ptr @u, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %58) #8
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = load i32, ptr @l, align 4, !tbaa !5
  %62 = add nsw i32 %61, -1
  %63 = sext i32 %62 to i64
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %63) #8
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = xor i32 %65, -1
  %67 = add i32 %60, %66
  %68 = load i32, ptr @u, align 4, !tbaa !5
  %69 = load i32, ptr @l, align 4, !tbaa !5
  %70 = sub nsw i32 %68, %69
  %71 = icmp slt i32 %67, %70
  br i1 %71, label %.thread57, label %72

72:                                               ; preds = %.loopexit101
  %73 = add nsw i32 %69, -1
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %74) #8
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = icmp sgt i32 %76, -1
  br i1 %77, label %78, label %91

78:                                               ; preds = %72
  %79 = load i32, ptr @l, align 4, !tbaa !5
  %80 = load i32, ptr @u, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %.lr.ph79.preheader, label %.backedge

.lr.ph79.preheader:                               ; preds = %78
  %82 = sext i32 %79 to i64
  br label %.lr.ph79

.lr.ph79:                                         ; preds = %.lr.ph79.preheader, %.lr.ph79
  %indvars.iv112 = phi i64 [ %82, %.lr.ph79.preheader ], [ %indvars.iv.next113, %.lr.ph79 ]
  %83 = add nsw i64 %indvars.iv112, -1
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %83) #8
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %indvars.iv112) #8
  store i32 %86, ptr %87, align 4, !tbaa !5
  %indvars.iv.next113 = add nsw i64 %indvars.iv112, 1
  %88 = load i32, ptr @u, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = icmp slt i64 %indvars.iv.next113, %89
  br i1 %90, label %.lr.ph79, label %.backedge, !llvm.loop !15

91:                                               ; preds = %72
  %92 = load i32, ptr @u, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %93) #8
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = icmp slt i32 %95, 1
  br i1 %96, label %97, label %107

97:                                               ; preds = %91
  %98 = load i32, ptr @u, align 4, !tbaa !5
  %99 = load i32, ptr @l, align 4, !tbaa !5
  %.not50.not73 = icmp sgt i32 %98, %99
  br i1 %.not50.not73, label %.lr.ph76.preheader, label %.backedge

.lr.ph76.preheader:                               ; preds = %97
  %100 = sext i32 %98 to i64
  br label %.lr.ph76

.lr.ph76:                                         ; preds = %.lr.ph76.preheader, %.lr.ph76
  %indvars.iv109 = phi i64 [ %100, %.lr.ph76.preheader ], [ %indvars.iv.next110, %.lr.ph76 ]
  %indvars.iv.next110 = add nsw i64 %indvars.iv109, -1
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %indvars.iv109) #8
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = add nsw i32 %102, -1
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %indvars.iv.next110) #8
  store i32 %103, ptr %104, align 4, !tbaa !5
  %105 = load i32, ptr @l, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %.not50.not = icmp sgt i64 %indvars.iv.next110, %106
  br i1 %.not50.not, label %.lr.ph76, label %.backedge, !llvm.loop !16

107:                                              ; preds = %91
  %108 = load i32, ptr @l, align 4, !tbaa !5
  %109 = add nsw i32 %108, -1
  %110 = sext i32 %109 to i64
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %110) #8
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = load i32, ptr @u, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %114) #8
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = load i32, ptr @u, align 4, !tbaa !5
  %118 = load i32, ptr @l, align 4, !tbaa !5
  %119 = sub nsw i32 %117, %118
  %120 = call noundef i32 @_Z3getiii(i32 noundef %112, i32 noundef %116, i32 noundef %119)
  %121 = load i32, ptr @l, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %122) #8
  store i32 %120, ptr %123, align 4, !tbaa !5
  %124 = load i32, ptr @l, align 4, !tbaa !5
  %.03868 = add nsw i32 %124, 1
  %125 = load i32, ptr @u, align 4, !tbaa !5
  %126 = icmp slt i32 %.03868, %125
  br i1 %126, label %.lr.ph72.preheader, label %.backedge

.lr.ph72.preheader:                               ; preds = %107
  %127 = sext i32 %124 to i64
  %128 = add nsw i64 %127, 1
  br label %.lr.ph72

.lr.ph72:                                         ; preds = %.lr.ph72.preheader, %.lr.ph72
  %indvars.iv104 = phi i64 [ %127, %.lr.ph72.preheader ], [ %indvars.iv.next105, %.lr.ph72 ]
  %indvars.iv102 = phi i64 [ %128, %.lr.ph72.preheader ], [ %indvars.iv.next103, %.lr.ph72 ]
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %indvars.iv104) #8
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %indvars.iv102) #8
  store i32 %131, ptr %132, align 4, !tbaa !5
  %indvars.iv.next103 = add nsw i64 %indvars.iv102, 1
  %133 = load i32, ptr @u, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = icmp slt i64 %indvars.iv.next103, %134
  %indvars.iv.next105 = add nsw i64 %indvars.iv104, 1
  br i1 %135, label %.lr.ph72, label %.backedge, !llvm.loop !17

._crit_edge82:                                    ; preds = %.backedge, %._crit_edge
  store i32 1, ptr @l, align 4, !tbaa !5
  %136 = load i32, ptr @n, align 4, !tbaa !5
  %137 = icmp slt i32 %.04387, %136
  br i1 %137, label %.lr.ph85, label %._crit_edge82.._crit_edge86_crit_edge

._crit_edge82.._crit_edge86_crit_edge:            ; preds = %._crit_edge82
  %.pre = load i32, ptr @k, align 4, !tbaa !5
  br label %._crit_edge86

._crit_edge86:                                    ; preds = %.lr.ph85, %._crit_edge82.._crit_edge86_crit_edge
  %138 = phi i32 [ %136, %._crit_edge82.._crit_edge86_crit_edge ], [ %151, %.lr.ph85 ]
  %139 = phi i32 [ %.pre, %._crit_edge82.._crit_edge86_crit_edge ], [ %149, %.lr.ph85 ]
  %140 = add nuw nsw i32 %.04387, 1
  %141 = icmp slt i32 %140, %139
  br i1 %141, label %.lr.ph88, label %._crit_edge89, !llvm.loop !18

.lr.ph85:                                         ; preds = %._crit_edge82, %.lr.ph85
  %.03783 = phi i32 [ %150, %.lr.ph85 ], [ %.04387, %._crit_edge82 ]
  %142 = load i32, ptr @l, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr @l, align 4, !tbaa !5
  %144 = sext i32 %142 to i64
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @segment, i64 noundef %144) #8
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = sext i32 %.03783 to i64
  %148 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %147
  store i32 %146, ptr %148, align 4, !tbaa !5
  %149 = load i32, ptr @k, align 4, !tbaa !5
  %150 = add nsw i32 %149, %.03783
  %151 = load i32, ptr @n, align 4, !tbaa !5
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %.lr.ph85, label %._crit_edge86, !llvm.loop !19

._crit_edge89:                                    ; preds = %._crit_edge86, %.preheader64
  %153 = phi i32 [ %6, %.preheader64 ], [ %138, %._crit_edge86 ]
  %154 = phi i32 [ %7, %.preheader64 ], [ %139, %._crit_edge86 ]
  %155 = icmp slt i32 %154, %153
  br i1 %155, label %.lr.ph92.preheader, label %.preheader

.lr.ph92.preheader:                               ; preds = %._crit_edge89
  %156 = sext i32 %154 to i64
  br label %.lr.ph92

157:                                              ; preds = %.lr.ph92
  %indvars.iv.next116 = add nsw i64 %indvars.iv115, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next116 to i32
  %exitcond.not = icmp eq i32 %153, %lftr.wideiv
  br i1 %exitcond.not, label %.preheader, label %.lr.ph92, !llvm.loop !20

.preheader:                                       ; preds = %157, %._crit_edge89
  %158 = icmp sgt i32 %153, 0
  br i1 %158, label %.lr.ph94, label %.thread57

.lr.ph92:                                         ; preds = %.lr.ph92.preheader, %157
  %indvars.iv115 = phi i64 [ %156, %.lr.ph92.preheader ], [ %indvars.iv.next116, %157 ]
  %159 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %indvars.iv115
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = sub nsw i64 %indvars.iv115, %156
  %162 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %.not51 = icmp sgt i32 %160, %163
  br i1 %.not51, label %157, label %.thread57

.lr.ph94:                                         ; preds = %.preheader, %.lr.ph94
  %indvars.iv118 = phi i64 [ %indvars.iv.next119, %.lr.ph94 ], [ 0, %.preheader ]
  %164 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %indvars.iv118
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %165)
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %167 = load i32, ptr @n, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = icmp slt i64 %indvars.iv.next119, %168
  br i1 %169, label %.lr.ph94, label %.thread57, !llvm.loop !21

.thread57:                                        ; preds = %.loopexit101, %.lr.ph92, %.lr.ph94, %.preheader
  %.str.3.sink = phi ptr [ @.str.5, %.preheader ], [ @.str.5, %.lr.ph94 ], [ @.str.3, %.lr.ph92 ], [ @.str.3, %.loopexit101 ]
  %170 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink)
  ret i32 0
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 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 #6 align 2

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

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

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

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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10, !14}
!14 = !{!"llvm.loop.peeled.count", i32 1}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass