; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/248 Division 2/Problem C (stresstest)

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

@a = external dso_local global [100 x i32], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@cur = external dso_local global i32, align 4
@mn = external dso_local global i32, align 4
@mx = external dso_local global i32, align 4
@ans = external dso_local global i32, align 4
@o = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

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

20:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %39

21:                                               ; preds = %16
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %23
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %24)
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %27
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mn, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %30 = load i32, ptr %29, align 4, !tbaa !5
  store i32 %30, ptr @mn, align 4, !tbaa !5
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %32
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %33)
  %35 = load i32, ptr %34, align 4, !tbaa !5
  store i32 %35, ptr @mx, align 4, !tbaa !5
  br label %36

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

39:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %40

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

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

45:                                               ; preds = %40
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = sub nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = sub nsw i32 %49, %54
  %56 = call i32 @llvm.abs.i32(i32 %55, i1 true)
  %57 = load i32, ptr @cur, align 4, !tbaa !5
  %58 = add nsw i32 %57, %56
  store i32 %58, ptr @cur, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %45
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %3, align 4, !tbaa !5
  br label %40, !llvm.loop !11

62:                                               ; preds = %44
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef @.str.3)
  %65 = load i32, ptr @cur, align 4, !tbaa !5
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %64, i32 noundef %65)
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %68 = load i32, ptr @cur, align 4, !tbaa !5
  store i32 %68, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %78, %62
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = load i32, ptr @m, align 4, !tbaa !5
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %81

74:                                               ; preds = %69
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %76
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @o, ptr noundef nonnull align 4 dereferenceable(4) %77)
  br label %78

78:                                               ; preds = %74
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %4, align 4, !tbaa !5
  br label %69, !llvm.loop !12

81:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %176, %81
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = load i32, ptr @m, align 4, !tbaa !5
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %179

87:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %88 = load i32, ptr @mn, align 4, !tbaa !5
  store i32 %88, ptr %7, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %168, %87
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = load i32, ptr @mx, align 4, !tbaa !5
  %92 = icmp sle i32 %90, %91
  br i1 %92, label %94, label %93

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

94:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #8
  call void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) @o)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %116, %94
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = load i32, ptr @m, align 4, !tbaa !5
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %95
  store i32 17, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %119

100:                                              ; preds = %95
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %102) #8
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = load i32, ptr %5, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @o, i64 noundef %106) #8
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = icmp eq i32 %104, %108
  br i1 %109, label %110, label %115

110:                                              ; preds = %100
  %111 = load i32, ptr %7, align 4, !tbaa !5
  %112 = load i32, ptr %9, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %113) #8
  store i32 %111, ptr %114, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %110, %100
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %9, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %9, align 4, !tbaa !5
  br label %95, !llvm.loop !13

119:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %139, %119
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = load i32, ptr @m, align 4, !tbaa !5
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %120
  store i32 20, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %142

125:                                              ; preds = %120
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %127) #8
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = load i32, ptr %11, 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) %8, i64 noundef %132) #8
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = sub nsw i32 %129, %134
  %136 = call i32 @llvm.abs.i32(i32 %135, i1 true)
  %137 = load i32, ptr %10, align 4, !tbaa !5
  %138 = add nsw i32 %137, %136
  store i32 %138, ptr %10, align 4, !tbaa !5
  br label %139

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

142:                                              ; preds = %124
  %143 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
          to label %144 unwind label %171

144:                                              ; preds = %142
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %143, ptr noundef @.str.3)
          to label %146 unwind label %171

146:                                              ; preds = %144
  %147 = load i32, ptr %5, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @o, i64 noundef %148) #8
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %145, i32 noundef %150)
          to label %152 unwind label %171

152:                                              ; preds = %146
  %153 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %151, ptr noundef @.str.3)
          to label %154 unwind label %171

154:                                              ; preds = %152
  %155 = load i32, ptr %7, align 4, !tbaa !5
  %156 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %153, i32 noundef %155)
          to label %157 unwind label %171

157:                                              ; preds = %154
  %158 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %156, ptr noundef @.str.3)
          to label %159 unwind label %171

159:                                              ; preds = %157
  %160 = load i32, ptr %10, align 4, !tbaa !5
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %158, i32 noundef %160)
          to label %162 unwind label %171

162:                                              ; preds = %159
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %161, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %164 unwind label %171

164:                                              ; preds = %162
  %165 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %166 unwind label %171

166:                                              ; preds = %164
  %167 = load i32, ptr %165, align 4, !tbaa !5
  store i32 %167, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  br label %168

168:                                              ; preds = %166
  %169 = load i32, ptr %7, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %7, align 4, !tbaa !5
  br label %89, !llvm.loop !15

171:                                              ; preds = %164, %162, %159, %157, %154, %152, %146, %144, %142
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %12, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %183

175:                                              ; preds = %93
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %5, align 4, !tbaa !5
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %5, align 4, !tbaa !5
  br label %82, !llvm.loop !16

179:                                              ; preds = %86
  %180 = load i32, ptr @ans, align 4, !tbaa !5
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %180)
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %181, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

183:                                              ; preds = %171
  %184 = load ptr, ptr %12, align 8
  %185 = load i32, ptr %13, align 4
  %186 = insertvalue { ptr, i32 } poison, ptr %184, 0
  %187 = insertvalue { ptr, i32 } %186, i32 %185, 1
  resume { ptr, i32 } %187
}

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 i32 @__isoc99_scanf(ptr noundef, ...) #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)) #4

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #5

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #7 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 @__gxx_personality_v0(...)

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


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

@a = external dso_local global [100 x i32], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@cur = external dso_local local_unnamed_addr global i32, align 4
@mn = external dso_local global i32, align 4
@mx = external dso_local global i32, align 4
@ans = external dso_local global i32, align 4
@o = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

.preheader35:                                     ; preds = %.lr.ph
  %7 = icmp sgt i32 %28, 1
  br i1 %7, label %.lr.ph38.preheader, label %.preheader35.thread

.lr.ph38.preheader:                               ; preds = %.preheader35
  %cur.promoted = load i32, ptr @cur, align 4, !tbaa !5
  %wide.trip.count = zext nneg i32 %28 to i64
  %.pre = load i32, ptr @a, align 16, !tbaa !5
  %8 = add nsw i64 %wide.trip.count, -1
  %min.iters.check = icmp ult i32 %28, 9
  br i1 %min.iters.check, label %.lr.ph38.preheader92, label %vector.ph

.lr.ph38.preheader92:                             ; preds = %middle.block, %.lr.ph38.preheader
  %.ph = phi i32 [ %.pre, %.lr.ph38.preheader ], [ %vector.recur.extract, %middle.block ]
  %indvars.iv63.ph = phi i64 [ 1, %.lr.ph38.preheader ], [ %ind.end, %middle.block ]
  %.ph93 = phi i32 [ %cur.promoted, %.lr.ph38.preheader ], [ %21, %middle.block ]
  br label %.lr.ph38

vector.ph:                                        ; preds = %.lr.ph38.preheader
  %n.vec = and i64 %8, -8
  %ind.end = or disjoint i64 %n.vec, 1
  %vector.recur.init = insertelement <4 x i32> poison, i32 %.pre, i64 3
  %9 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %cur.promoted, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vector.recur = phi <4 x i32> [ %vector.recur.init, %vector.ph ], [ %wide.load89, %vector.body ]
  %vec.phi = phi <4 x i32> [ %9, %vector.ph ], [ %18, %vector.body ]
  %vec.phi88 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %19, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %10 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %offset.idx
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  %wide.load = load <4 x i32>, ptr %10, align 4, !tbaa !5
  %wide.load89 = load <4 x i32>, ptr %11, align 4, !tbaa !5
  %12 = shufflevector <4 x i32> %vector.recur, <4 x i32> %wide.load, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
  %13 = shufflevector <4 x i32> %wide.load, <4 x i32> %wide.load89, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
  %14 = sub nsw <4 x i32> %wide.load, %12
  %15 = sub nsw <4 x i32> %wide.load89, %13
  %16 = tail call <4 x i32> @llvm.abs.v4i32(<4 x i32> %14, i1 true)
  %17 = tail call <4 x i32> @llvm.abs.v4i32(<4 x i32> %15, i1 true)
  %18 = add <4 x i32> %16, %vec.phi
  %19 = add <4 x i32> %17, %vec.phi88
  %index.next = add nuw i64 %index, 8
  %20 = icmp eq i64 %index.next, %n.vec
  br i1 %20, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %19, %18
  %21 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %vector.recur.extract = extractelement <4 x i32> %wide.load89, i64 3
  %cmp.n = icmp eq i64 %8, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph38.preheader92

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %22 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %indvars.iv
  %23 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %22)
  %24 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mn, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %25 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %25, ptr @mn, align 4, !tbaa !5
  %26 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %27 = load i32, ptr %26, align 4, !tbaa !5
  store i32 %27, ptr @mx, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %28 = load i32, ptr @m, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next, %29
  br i1 %30, label %.lr.ph, label %.preheader35, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph38, %middle.block
  %.lcssa86 = phi i32 [ %21, %middle.block ], [ %45, %.lr.ph38 ]
  store i32 %.lcssa86, ptr @cur, align 4, !tbaa !5
  br label %.preheader35.thread

.preheader35.thread:                              ; preds = %0, %._crit_edge, %.preheader35
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @.str.3)
  %33 = load i32, ptr @cur, align 4, !tbaa !5
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %32, i32 noundef %33)
  %35 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %36 = load i32, ptr @cur, align 4, !tbaa !5
  store i32 %36, ptr @ans, align 4, !tbaa !5
  %37 = load i32, ptr @m, align 4, !tbaa !5
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph42, label %._crit_edge58

.lr.ph38:                                         ; preds = %.lr.ph38.preheader92, %.lr.ph38
  %39 = phi i32 [ %42, %.lr.ph38 ], [ %.ph, %.lr.ph38.preheader92 ]
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %.lr.ph38 ], [ %indvars.iv63.ph, %.lr.ph38.preheader92 ]
  %40 = phi i32 [ %45, %.lr.ph38 ], [ %.ph93, %.lr.ph38.preheader92 ]
  %41 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %indvars.iv63
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = sub nsw i32 %42, %39
  %44 = tail call i32 @llvm.abs.i32(i32 %43, i1 true)
  %45 = add nsw i32 %44, %40
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next64, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph38, !llvm.loop !14

.preheader:                                       ; preds = %.lr.ph42
  %46 = icmp sgt i32 %51, 0
  br i1 %46, label %.lr.ph57, label %._crit_edge58

.lr.ph57:                                         ; preds = %.preheader
  %47 = load i32, ptr @mn, align 4, !tbaa !5
  %48 = load i32, ptr @mx, align 4, !tbaa !5
  %49 = icmp sgt i32 %47, %48
  br i1 %49, label %._crit_edge58, label %.lr.ph57.split

.lr.ph42:                                         ; preds = %.preheader35.thread, %.lr.ph42
  %indvars.iv66 = phi i64 [ %indvars.iv.next67, %.lr.ph42 ], [ 0, %.preheader35.thread ]
  %50 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %indvars.iv66
  tail call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @o, ptr noundef nonnull align 4 dereferenceable(4) %50)
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %51 = load i32, ptr @m, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = icmp slt i64 %indvars.iv.next67, %52
  br i1 %53, label %.lr.ph42, label %.preheader, !llvm.loop !15

._crit_edge58:                                    ; preds = %._crit_edge55, %.preheader35.thread, %.lr.ph57, %.preheader
  %54 = load i32, ptr @ans, align 4, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %54)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph57.split:                                   ; preds = %.lr.ph57, %._crit_edge55
  %57 = phi i32 [ %60, %._crit_edge55 ], [ %51, %.lr.ph57 ]
  %58 = phi i32 [ %61, %._crit_edge55 ], [ %48, %.lr.ph57 ]
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %._crit_edge55 ], [ 0, %.lr.ph57 ]
  %59 = load i32, ptr @mn, align 4, !tbaa !5
  %.not51 = icmp sgt i32 %59, %58
  br i1 %.not51, label %._crit_edge55, label %.lr.ph54

._crit_edge55.loopexit:                           ; preds = %108
  %.pre78 = load i32, ptr @m, align 4, !tbaa !5
  br label %._crit_edge55

._crit_edge55:                                    ; preds = %._crit_edge55.loopexit, %.lr.ph57.split
  %60 = phi i32 [ %.pre78, %._crit_edge55.loopexit ], [ %57, %.lr.ph57.split ]
  %61 = phi i32 [ %112, %._crit_edge55.loopexit ], [ %58, %.lr.ph57.split ]
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %62 = sext i32 %60 to i64
  %63 = icmp slt i64 %indvars.iv.next76, %62
  br i1 %63, label %.lr.ph57.split, label %._crit_edge58, !llvm.loop !16

.lr.ph54:                                         ; preds = %.lr.ph57.split, %108
  %.03252 = phi i32 [ %111, %108 ], [ %59, %.lr.ph57.split ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #10
  call void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) @o)
  %64 = load i32, ptr @m, align 4, !tbaa !5
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %.lr.ph45, label %._crit_edge46.thread

._crit_edge46.thread:                             ; preds = %.lr.ph54
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #10
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %._crit_edge50

._crit_edge46:                                    ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #10
  store i32 0, ptr %2, align 4, !tbaa !5
  %66 = icmp sgt i32 %75, 1
  br i1 %66, label %.lr.ph49, label %._crit_edge50

.lr.ph45:                                         ; preds = %.lr.ph54, %74
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %74 ], [ 0, %.lr.ph54 ]
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv69) #10
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @o, i64 noundef %indvars.iv75) #10
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = icmp eq i32 %68, %70
  br i1 %71, label %72, label %74

72:                                               ; preds = %.lr.ph45
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv69) #10
  store i32 %.03252, ptr %73, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %.lr.ph45, %72
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %75 = load i32, ptr @m, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = icmp slt i64 %indvars.iv.next70, %76
  br i1 %77, label %.lr.ph45, label %._crit_edge46, !llvm.loop !18

._crit_edge50:                                    ; preds = %.lr.ph49, %._crit_edge46.thread, %._crit_edge46
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
          to label %91 unwind label %113

.lr.ph49:                                         ; preds = %._crit_edge46, %.lr.ph49
  %indvars.iv72 = phi i64 [ %indvars.iv.next73, %.lr.ph49 ], [ 1, %._crit_edge46 ]
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv72) #10
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = add nsw i64 %indvars.iv72, -1
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %81) #10
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = sub nsw i32 %80, %83
  %85 = call i32 @llvm.abs.i32(i32 %84, i1 true)
  %86 = load i32, ptr %2, align 4, !tbaa !5
  %87 = add nsw i32 %85, %86
  store i32 %87, ptr %2, align 4, !tbaa !5
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %88 = load i32, ptr @m, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = icmp slt i64 %indvars.iv.next73, %89
  br i1 %90, label %.lr.ph49, label %._crit_edge50, !llvm.loop !19

91:                                               ; preds = %._crit_edge50
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef nonnull @.str.3)
          to label %93 unwind label %113

93:                                               ; preds = %91
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @o, i64 noundef %indvars.iv75) #10
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %92, i32 noundef %95)
          to label %97 unwind label %113

97:                                               ; preds = %93
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef nonnull @.str.3)
          to label %99 unwind label %113

99:                                               ; preds = %97
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %98, i32 noundef %.03252)
          to label %101 unwind label %113

101:                                              ; preds = %99
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull @.str.3)
          to label %103 unwind label %113

103:                                              ; preds = %101
  %104 = load i32, ptr %2, align 4, !tbaa !5
  %105 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %102, i32 noundef %104)
          to label %106 unwind label %113

106:                                              ; preds = %103
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %108 unwind label %113

108:                                              ; preds = %106
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %110 = load i32, ptr %109, align 4, !tbaa !5
  store i32 %110, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #10
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #10
  %111 = add nsw i32 %.03252, 1
  %112 = load i32, ptr @mx, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.03252, %112
  br i1 %.not.not, label %.lr.ph54, label %._crit_edge55.loopexit, !llvm.loop !20

113:                                              ; preds = %106, %103, %101, %99, %97, %93, %91, %._crit_edge50
  %114 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #10
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #10
  resume { ptr, i32 } %114
}

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

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

; 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

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

; 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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #6

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.abs.v4i32(<4 x i32>, i1 immarg) #9

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #9

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 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { 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}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10, !17}
!17 = !{!"llvm.loop.unswitch.partial.disable"}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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