; LLVM IR from Izaron/ACM-ICPC :: Timus Online Judge/Volume 1/1085. Meeting (main)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<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 }

@cnt = external dso_local global [105 x [105 x i32]], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@money = external dso_local global [105 x i32], align 16
@place = external dso_local global [105 x i32], align 16
@pr = external dso_local global [105 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4getti(i32 noundef) #0

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

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

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

26:                                               ; preds = %54, %0
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %57

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

32:                                               ; preds = %44, %31
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %47

37:                                               ; preds = %32
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %39
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [105 x i32], ptr %40, i64 0, i64 %42
  store i32 100000000, ptr %43, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %37
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %4, align 4, !tbaa !5
  br label %32, !llvm.loop !9

47:                                               ; preds = %36
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %49
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [105 x i32], ptr %50, i64 0, i64 %52
  store i32 0, ptr %53, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %47
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %2, align 4, !tbaa !5
  br label %26, !llvm.loop !11

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

58:                                               ; preds = %135, %57
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = load i32, ptr @m, align 4, !tbaa !5
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %63, label %62

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

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %76, %63
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %65
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %88

70:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %71 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %72 unwind label %79

72:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %73 = load i32, ptr %9, align 4, !tbaa !5
  %74 = sub nsw i32 %73, 1
  store i32 %74, ptr %12, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %75 unwind label %83

75:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %8, align 4, !tbaa !5
  br label %65, !llvm.loop !12

79:                                               ; preds = %70
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %10, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %11, align 4
  br label %87

83:                                               ; preds = %72
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %10, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %87

87:                                               ; preds = %83, %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %266

88:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %131, %88
  %90 = load i32, ptr %13, align 4, !tbaa !5
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = icmp slt i32 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %89
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %134

94:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %95 = load i32, ptr %13, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %14, align 4, !tbaa !5
  br label %97

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

101:                                              ; preds = %97
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %130

102:                                              ; preds = %97
  %103 = load i32, ptr %13, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %104) #7
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %107
  %109 = load i32, ptr %14, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %110) #7
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [105 x i32], ptr %108, i64 0, i64 %113
  store i32 1, ptr %114, align 4, !tbaa !5
  %115 = load i32, ptr %14, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %116) #7
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %119
  %121 = load i32, ptr %13, 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) %7, i64 noundef %122) #7
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [105 x i32], ptr %120, i64 0, i64 %125
  store i32 1, ptr %126, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %102
  %128 = load i32, ptr %14, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %14, align 4, !tbaa !5
  br label %97, !llvm.loop !13

130:                                              ; preds = %101
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %13, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %13, align 4, !tbaa !5
  br label %89, !llvm.loop !14

134:                                              ; preds = %93
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %5, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %5, align 4, !tbaa !5
  br label %58, !llvm.loop !15

138:                                              ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %194, %138
  %140 = load i32, ptr %15, align 4, !tbaa !5
  %141 = load i32, ptr @n, align 4, !tbaa !5
  %142 = icmp slt i32 %140, %141
  br i1 %142, label %144, label %143

143:                                              ; preds = %139
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %197

144:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %145

145:                                              ; preds = %190, %144
  %146 = load i32, ptr %16, align 4, !tbaa !5
  %147 = load i32, ptr @n, align 4, !tbaa !5
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %193

150:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %186, %150
  %152 = load i32, ptr %17, align 4, !tbaa !5
  %153 = load i32, ptr @n, align 4, !tbaa !5
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  store i32 26, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %189

156:                                              ; preds = %151
  %157 = load i32, ptr %16, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %158
  %160 = load i32, ptr %17, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [105 x i32], ptr %159, i64 0, i64 %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %163 = load i32, ptr %16, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %164
  %166 = load i32, ptr %15, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [105 x i32], ptr %165, i64 0, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = load i32, ptr %15, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %171
  %173 = load i32, ptr %17, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [105 x i32], ptr %172, i64 0, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = add nsw i32 %169, %176
  store i32 %177, ptr %18, align 4, !tbaa !5
  %178 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %162, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = load i32, ptr %16, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %181
  %183 = load i32, ptr %17, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [105 x i32], ptr %182, i64 0, i64 %184
  store i32 %179, ptr %185, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %186

186:                                              ; preds = %156
  %187 = load i32, ptr %17, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %17, align 4, !tbaa !5
  br label %151, !llvm.loop !16

189:                                              ; preds = %155
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %16, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %16, align 4, !tbaa !5
  br label %145, !llvm.loop !17

193:                                              ; preds = %149
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %15, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %15, align 4, !tbaa !5
  br label %139, !llvm.loop !18

197:                                              ; preds = %143
  %198 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %222, %197
  %200 = load i32, ptr %19, align 4, !tbaa !5
  %201 = load i32, ptr @k, align 4, !tbaa !5
  %202 = icmp slt i32 %200, %201
  br i1 %202, label %204, label %203

203:                                              ; preds = %199
  store i32 29, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %225

204:                                              ; preds = %199
  %205 = load i32, ptr %19, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [105 x i32], ptr @money, i64 0, i64 %206
  %208 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %207)
  %209 = load i32, ptr %19, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [105 x i32], ptr @place, i64 0, i64 %210
  %212 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %208, ptr noundef nonnull align 4 dereferenceable(4) %211)
  %213 = load i32, ptr %19, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [105 x i32], ptr @pr, i64 0, i64 %214
  %216 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %212, ptr noundef nonnull align 4 dereferenceable(4) %215)
  %217 = load i32, ptr %19, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [105 x i32], ptr @place, i64 0, i64 %218
  %220 = load i32, ptr %219, align 4, !tbaa !5
  %221 = add nsw i32 %220, -1
  store i32 %221, ptr %219, align 4, !tbaa !5
  br label %222

222:                                              ; preds = %204
  %223 = load i32, ptr %19, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %19, align 4, !tbaa !5
  br label %199, !llvm.loop !19

225:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 100000000, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 -1, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %226

226:                                              ; preds = %248, %225
  %227 = load i32, ptr %22, align 4, !tbaa !5
  %228 = load i32, ptr @n, align 4, !tbaa !5
  %229 = icmp slt i32 %227, %228
  br i1 %229, label %231, label %230

230:                                              ; preds = %226
  store i32 32, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %251

231:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %232 = load i32, ptr %22, align 4, !tbaa !5
  %233 = call noundef i32 @_Z4getti(i32 noundef %232)
  store i32 %233, ptr %23, align 4, !tbaa !5
  %234 = load i32, ptr %23, align 4, !tbaa !5
  %235 = icmp eq i32 %234, -1
  br i1 %235, label %236, label %237

236:                                              ; preds = %231
  store i32 34, ptr %3, align 4
  br label %245

237:                                              ; preds = %231
  %238 = load i32, ptr %23, align 4, !tbaa !5
  %239 = load i32, ptr %20, align 4, !tbaa !5
  %240 = icmp slt i32 %238, %239
  br i1 %240, label %241, label %244

241:                                              ; preds = %237
  %242 = load i32, ptr %23, align 4, !tbaa !5
  store i32 %242, ptr %20, align 4, !tbaa !5
  %243 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %243, ptr %21, align 4, !tbaa !5
  br label %244

244:                                              ; preds = %241, %237
  store i32 0, ptr %3, align 4
  br label %245

245:                                              ; preds = %244, %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  %246 = load i32, ptr %3, align 4
  switch i32 %246, label %271 [
    i32 0, label %247
    i32 34, label %248
  ]

247:                                              ; preds = %245
  br label %248

248:                                              ; preds = %247, %245
  %249 = load i32, ptr %22, align 4, !tbaa !5
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr %22, align 4, !tbaa !5
  br label %226, !llvm.loop !20

251:                                              ; preds = %230
  %252 = load i32, ptr %21, align 4, !tbaa !5
  %253 = icmp eq i32 %252, -1
  br i1 %253, label %254, label %256

254:                                              ; preds = %251
  %255 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  br label %264

256:                                              ; preds = %251
  %257 = load i32, ptr %21, align 4, !tbaa !5
  %258 = add nsw i32 %257, 1
  %259 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %258)
  %260 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %259, ptr noundef @.str)
  %261 = load i32, ptr %20, align 4, !tbaa !5
  %262 = mul nsw i32 %261, 4
  %263 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %260, i32 noundef %262)
  br label %264

264:                                              ; preds = %256, %254
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  %265 = load i32, ptr %1, align 4
  ret i32 %265

266:                                              ; preds = %87
  %267 = load ptr, ptr %10, align 8
  %268 = load i32, ptr %11, align 4
  %269 = insertvalue { ptr, i32 } poison, ptr %267, 0
  %270 = insertvalue { ptr, i32 } %269, i32 %268, 1
  resume { ptr, i32 } %270

271:                                              ; preds = %245
  unreachable
}

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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)) #5

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

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

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

@cnt = external dso_local global [105 x [105 x i32]], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@money = external dso_local global [105 x i32], align 16
@place = external dso_local global [105 x i32], align 16
@pr = external dso_local global [105 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = 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)
  %7 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.preheader78.us.preheader, label %.preheader77

.preheader78.us.preheader:                        ; preds = %0
  %wide.trip.count110 = zext nneg i32 %8 to i64
  %min.iters.check = icmp ult i32 %8, 8
  %n.vec = and i64 %wide.trip.count110, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count110
  br label %.preheader78.us

.preheader78.us:                                  ; preds = %.preheader78.us.preheader, %._crit_edge.us
  %indvars.iv107 = phi i64 [ 0, %.preheader78.us.preheader ], [ %indvars.iv.next108, %._crit_edge.us ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader78.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader78.us ]
  %10 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %indvars.iv107, i64 %index
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  store <4 x i32> <i32 100000000, i32 100000000, i32 100000000, i32 100000000>, ptr %10, align 4, !tbaa !5
  store <4 x i32> <i32 100000000, i32 100000000, i32 100000000, i32 100000000>, ptr %11, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %12 = icmp eq i64 %index.next, %n.vec
  br i1 %12, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader78.us
  %indvars.iv.ph = phi i64 [ 0, %.preheader78.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %13 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %indvars.iv107, i64 %indvars.iv
  store i32 100000000, ptr %13, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count110
  br i1 %exitcond.not, label %._crit_edge.us, label %scalar.ph, !llvm.loop !13

._crit_edge.us:                                   ; preds = %scalar.ph, %middle.block
  %14 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %indvars.iv107, i64 %indvars.iv107
  store i32 0, ptr %14, align 4, !tbaa !5
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond111.not = icmp eq i64 %indvars.iv.next108, %wide.trip.count110
  br i1 %exitcond111.not, label %.preheader77, label %.preheader78.us, !llvm.loop !14

.preheader77:                                     ; preds = %._crit_edge.us, %0
  %15 = load i32, ptr @m, align 4, !tbaa !5
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph87, label %.preheader75

.preheader75.loopexit:                            ; preds = %._crit_edge
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader75

.preheader75:                                     ; preds = %.preheader75.loopexit, %.preheader77
  %17 = phi i32 [ %.pre, %.preheader75.loopexit ], [ %8, %.preheader77 ]
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.preheader74, label %._crit_edge94

.lr.ph87:                                         ; preds = %.preheader77, %._crit_edge
  %.06886 = phi i32 [ %38, %._crit_edge ], [ 0, %.preheader77 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #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)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %._crit_edge

.preheader76:                                     ; preds = %27
  %22 = icmp sgt i32 %29, 0
  br i1 %22, label %.lr.ph85, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph87, %27
  %.06781 = phi i32 [ %28, %27 ], [ 0, %.lr.ph87 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %23 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %24 unwind label %31

24:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = add nsw i32 %25, -1
  store i32 %26, ptr %4, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %27 unwind label %33

27:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %28 = add nuw nsw i32 %.06781, 1
  %29 = load i32, ptr %1, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %.lr.ph, label %.preheader76, !llvm.loop !15

31:                                               ; preds = %.lr.ph
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %35

33:                                               ; preds = %24
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %35

35:                                               ; preds = %33, %31
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn

.loopexit.loopexit:                               ; preds = %.lr.ph83
  %.pre132 = sext i32 %58 to i64
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.lr.ph85
  %.pre-phi = phi i64 [ %.pre132, %.loopexit.loopexit ], [ %42, %.lr.ph85 ]
  %36 = phi i32 [ %58, %.loopexit.loopexit ], [ %41, %.lr.ph85 ]
  %37 = icmp slt i64 %indvars.iv.next118, %.pre-phi
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  br i1 %37, label %.lr.ph85, label %._crit_edge, !llvm.loop !16

._crit_edge:                                      ; preds = %.loopexit, %.lr.ph87, %.preheader76
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %38 = add nuw nsw i32 %.06886, 1
  %39 = load i32, ptr @m, align 4, !tbaa !5
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %.lr.ph87, label %.preheader75.loopexit, !llvm.loop !17

.lr.ph85:                                         ; preds = %.preheader76, %.loopexit
  %41 = phi i32 [ %36, %.loopexit ], [ %29, %.preheader76 ]
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %.loopexit ], [ 0, %.preheader76 ]
  %indvars.iv112 = phi i64 [ %indvars.iv.next113, %.loopexit ], [ 1, %.preheader76 ]
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %indvars.iv.next118, %42
  br i1 %43, label %.lr.ph83, label %.loopexit

.lr.ph83:                                         ; preds = %.lr.ph85, %.lr.ph83
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %.lr.ph83 ], [ %indvars.iv112, %.lr.ph85 ]
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv117) #8
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv114) #8
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %46, i64 %49
  store i32 1, ptr %50, align 4, !tbaa !5
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv114) #8
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv117) #8
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %53, i64 %56
  store i32 1, ptr %57, align 4, !tbaa !5
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %58 = load i32, ptr %1, align 4, !tbaa !5
  %59 = trunc nuw i64 %indvars.iv.next115 to i32
  %60 = icmp sgt i32 %58, %59
  br i1 %60, label %.lr.ph83, label %.loopexit.loopexit, !llvm.loop !18

.preheader74:                                     ; preds = %.preheader75, %._crit_edge92
  %61 = phi i32 [ %70, %._crit_edge92 ], [ %17, %.preheader75 ]
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %._crit_edge92 ], [ 0, %.preheader75 ]
  %62 = icmp sgt i32 %61, 0
  br i1 %62, label %.preheader73, label %._crit_edge92

._crit_edge94:                                    ; preds = %._crit_edge92, %.preheader75
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %64 = load i32, ptr @k, align 4, !tbaa !5
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %.lr.ph97, label %.preheader

.preheader73:                                     ; preds = %.preheader74, %._crit_edge90
  %66 = phi i32 [ %73, %._crit_edge90 ], [ %61, %.preheader74 ]
  %67 = phi i32 [ %74, %._crit_edge90 ], [ %61, %.preheader74 ]
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %._crit_edge90 ], [ 0, %.preheader74 ]
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %.lr.ph89, label %.preheader73.._crit_edge90_crit_edge

.preheader73.._crit_edge90_crit_edge:             ; preds = %.preheader73
  %.pre133 = sext i32 %67 to i64
  br label %._crit_edge90

.lr.ph89:                                         ; preds = %.preheader73
  %69 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %indvars.iv123, i64 %indvars.iv126
  br label %76

._crit_edge92:                                    ; preds = %._crit_edge90, %.preheader74
  %70 = phi i32 [ %61, %.preheader74 ], [ %73, %._crit_edge90 ]
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %indvars.iv.next127, %71
  br i1 %72, label %.preheader74, label %._crit_edge94, !llvm.loop !19

._crit_edge90:                                    ; preds = %76, %.preheader73.._crit_edge90_crit_edge
  %.pre-phi134 = phi i64 [ %.pre133, %.preheader73.._crit_edge90_crit_edge ], [ %85, %76 ]
  %73 = phi i32 [ %66, %.preheader73.._crit_edge90_crit_edge ], [ %84, %76 ]
  %74 = phi i32 [ %67, %.preheader73.._crit_edge90_crit_edge ], [ %84, %76 ]
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %75 = icmp slt i64 %indvars.iv.next124, %.pre-phi134
  br i1 %75, label %.preheader73, label %._crit_edge92, !llvm.loop !21

76:                                               ; preds = %.lr.ph89, %76
  %indvars.iv120 = phi i64 [ 0, %.lr.ph89 ], [ %indvars.iv.next121, %76 ]
  %77 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %indvars.iv123, i64 %indvars.iv120
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %78 = load i32, ptr %69, align 4, !tbaa !5
  %79 = getelementptr inbounds [105 x [105 x i32]], ptr @cnt, i64 0, i64 %indvars.iv126, i64 %indvars.iv120
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = add nsw i32 %80, %78
  store i32 %81, ptr %5, align 4, !tbaa !5
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %77, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %83 = load i32, ptr %82, align 4, !tbaa !5
  store i32 %83, ptr %77, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %84 = load i32, ptr @n, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = icmp slt i64 %indvars.iv.next121, %85
  br i1 %86, label %76, label %._crit_edge90, !llvm.loop !22

.preheader:                                       ; preds = %.lr.ph97, %._crit_edge94
  %87 = load i32, ptr @n, align 4, !tbaa !5
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %.lr.ph101, label %._crit_edge102.thread

.lr.ph97:                                         ; preds = %._crit_edge94, %.lr.ph97
  %indvars.iv129 = phi i64 [ %indvars.iv.next130, %.lr.ph97 ], [ 0, %._crit_edge94 ]
  %89 = getelementptr inbounds [105 x i32], ptr @money, i64 0, i64 %indvars.iv129
  %90 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %89)
  %91 = getelementptr inbounds [105 x i32], ptr @place, i64 0, i64 %indvars.iv129
  %92 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %90, ptr noundef nonnull align 4 dereferenceable(4) %91)
  %93 = getelementptr inbounds [105 x i32], ptr @pr, i64 0, i64 %indvars.iv129
  %94 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %92, ptr noundef nonnull align 4 dereferenceable(4) %93)
  %95 = load i32, ptr %91, align 4, !tbaa !5
  %96 = add nsw i32 %95, -1
  store i32 %96, ptr %91, align 4, !tbaa !5
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %97 = load i32, ptr @k, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = icmp slt i64 %indvars.iv.next130, %98
  br i1 %99, label %.lr.ph97, label %.preheader, !llvm.loop !23

._crit_edge102:                                   ; preds = %.lr.ph101
  %100 = icmp eq i32 %.2, -1
  br i1 %100, label %._crit_edge102.thread, label %108

.lr.ph101:                                        ; preds = %.preheader, %.lr.ph101
  %.054100 = phi i32 [ %104, %.lr.ph101 ], [ 0, %.preheader ]
  %.05599 = phi i32 [ %.2, %.lr.ph101 ], [ -1, %.preheader ]
  %.05698 = phi i32 [ %.258, %.lr.ph101 ], [ 100000000, %.preheader ]
  %101 = call noundef i32 @_Z4getti(i32 noundef %.054100)
  %102 = icmp eq i32 %101, -1
  %103 = icmp slt i32 %101, %.05698
  %spec.select = call i32 @llvm.smin.i32(i32 %101, i32 %.05698)
  %spec.select72 = select i1 %103, i32 %.054100, i32 %.05599
  %.258 = select i1 %102, i32 %.05698, i32 %spec.select
  %.2 = select i1 %102, i32 %.05599, i32 %spec.select72
  %104 = add nuw nsw i32 %.054100, 1
  %105 = load i32, ptr @n, align 4, !tbaa !5
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %.lr.ph101, label %._crit_edge102, !llvm.loop !24

._crit_edge102.thread:                            ; preds = %.preheader, %._crit_edge102
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  br label %114

108:                                              ; preds = %._crit_edge102
  %109 = shl nsw i32 %.258, 2
  %110 = add nuw nsw i32 %.2, 1
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %110)
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef nonnull @.str)
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %112, i32 noundef %109)
  br label %114

114:                                              ; preds = %108, %._crit_edge102.thread
  ret i32 0
}

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

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

declare i32 @__gxx_personality_v0(...)

; 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 #0 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 #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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 #5

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #7

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !12, !11}
!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}
!20 = !{!"llvm.loop.unswitch.partial.disable"}
!21 = distinct !{!21, !10, !20}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass