; LLVM IR from DionysiosB/CodeForces :: 0200-0299 (228B-TwoTables)

; 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<std::vector<char>, std::allocator<std::vector<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<char>, std::allocator<std::vector<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<char>, std::allocator<std::vector<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<char>, std::allocator<std::vector<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::allocator.2", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::allocator", align 1
  %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 %"class.std::vector", align 8
  %17 = alloca %"class.std::vector.0", align 8
  %18 = alloca i8, align 1
  %19 = alloca %"class.std::allocator.2", align 1
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i64, align 8
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 48, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorIcSaIcEEC2EmRKcRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %37, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %38 unwind label %45

38:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @_ZNSaISt6vectorIcSaIcEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt6vectorIS_IcSaIcEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %35, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %39 unwind label %49

39:                                               ; preds = %38
  call void @_ZNSt15__new_allocatorISt6vectorIcSaIcEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %79, %39
  %41 = load i32, ptr %11, align 4, !tbaa !5
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %54, label %44

44:                                               ; preds = %40
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %87

45:                                               ; preds = %0
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %8, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %9, align 4
  br label %53

49:                                               ; preds = %38
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %8, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %9, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIcSaIcEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %53

53:                                               ; preds = %49, %45
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  br label %287

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

55:                                               ; preds = %69, %54
  %56 = load i32, ptr %13, align 4, !tbaa !5
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %76

60:                                               ; preds = %55
  %61 = load i32, ptr %11, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IcSaIcEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %62) #5
  %64 = load i32, ptr %13, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %65) #5
  %67 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %66)
          to label %68 unwind label %72

68:                                               ; preds = %60
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %13, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %13, align 4, !tbaa !5
  br label %55, !llvm.loop !10

72:                                               ; preds = %60
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %8, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %86

76:                                               ; preds = %59
  %77 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2)
          to label %78 unwind label %82

78:                                               ; preds = %76
  br label %79

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

82:                                               ; preds = %76
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %8, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %9, align 4
  br label %86

86:                                               ; preds = %82, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %286

87:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %88 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %14, ptr noundef %15)
          to label %89 unwind label %101

89:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #5
  %90 = load i32, ptr %14, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  %92 = load i32, ptr %15, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  store i8 48, ptr %18, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  invoke void @_ZNSt6vectorIcSaIcEEC2EmRKcRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %93, ptr noundef nonnull align 1 dereferenceable(1) %18, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %94 unwind label %105

94:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  call void @_ZNSaISt6vectorIcSaIcEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt6vectorIS_IcSaIcEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %91, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %95 unwind label %109

95:                                               ; preds = %94
  call void @_ZNSt15__new_allocatorISt6vectorIcSaIcEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %139, %95
  %97 = load i32, ptr %21, align 4, !tbaa !5
  %98 = load i32, ptr %14, align 4, !tbaa !5
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %114, label %100

100:                                              ; preds = %96
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %147

101:                                              ; preds = %87
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %8, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %9, align 4
  br label %285

105:                                              ; preds = %89
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %8, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %9, align 4
  br label %113

109:                                              ; preds = %94
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %8, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %9, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIcSaIcEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  br label %113

113:                                              ; preds = %109, %105
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  br label %284

114:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %129, %114
  %116 = load i32, ptr %22, align 4, !tbaa !5
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = icmp slt i32 %116, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %115
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %136

120:                                              ; preds = %115
  %121 = load i32, ptr %21, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IcSaIcEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %122) #5
  %124 = load i32, ptr %22, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef %125) #5
  %127 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %126)
          to label %128 unwind label %132

128:                                              ; preds = %120
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %22, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %22, align 4, !tbaa !5
  br label %115, !llvm.loop !13

132:                                              ; preds = %120
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %8, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %146

136:                                              ; preds = %119
  %137 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2)
          to label %138 unwind label %142

138:                                              ; preds = %136
  br label %139

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

142:                                              ; preds = %136
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %8, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %9, align 4
  br label %146

146:                                              ; preds = %142, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %283

147:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  store i64 0, ptr %23, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %148 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %148, ptr %26, align 4, !tbaa !5
  %149 = load i32, ptr %2, align 4, !tbaa !5
  %150 = load i32, ptr %14, align 4, !tbaa !5
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %152, label %154

152:                                              ; preds = %147
  %153 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %153, ptr %26, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %152, %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %155 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %155, ptr %27, align 4, !tbaa !5
  %156 = load i32, ptr %3, align 4, !tbaa !5
  %157 = load i32, ptr %15, align 4, !tbaa !5
  %158 = icmp slt i32 %156, %157
  br i1 %158, label %159, label %161

159:                                              ; preds = %154
  %160 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %160, ptr %27, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %159, %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %162 = load i32, ptr %26, align 4, !tbaa !5
  %163 = sub nsw i32 0, %162
  store i32 %163, ptr %28, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %269, %161
  %165 = load i32, ptr %28, align 4, !tbaa !5
  %166 = load i32, ptr %26, align 4, !tbaa !5
  %167 = icmp sle i32 %165, %166
  br i1 %167, label %169, label %168

168:                                              ; preds = %164
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %272

169:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %170 = load i32, ptr %27, align 4, !tbaa !5
  %171 = sub nsw i32 0, %170
  store i32 %171, ptr %29, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %261, %169
  %173 = load i32, ptr %29, align 4, !tbaa !5
  %174 = load i32, ptr %27, align 4, !tbaa !5
  %175 = icmp sle i32 %173, %174
  br i1 %175, label %177, label %176

176:                                              ; preds = %172
  store i32 17, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %268

177:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  store i64 0, ptr %30, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %243, %177
  %179 = load i32, ptr %31, align 4, !tbaa !5
  %180 = load i32, ptr %2, align 4, !tbaa !5
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %178
  store i32 20, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  br label %246

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

184:                                              ; preds = %239, %183
  %185 = load i32, ptr %32, align 4, !tbaa !5
  %186 = load i32, ptr %3, align 4, !tbaa !5
  %187 = icmp slt i32 %185, %186
  br i1 %187, label %189, label %188

188:                                              ; preds = %184
  store i32 23, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  br label %242

189:                                              ; preds = %184
  %190 = load i32, ptr %31, align 4, !tbaa !5
  %191 = load i32, ptr %28, align 4, !tbaa !5
  %192 = add nsw i32 %190, %191
  %193 = icmp sge i32 %192, 0
  br i1 %193, label %194, label %238

194:                                              ; preds = %189
  %195 = load i32, ptr %31, align 4, !tbaa !5
  %196 = load i32, ptr %28, align 4, !tbaa !5
  %197 = add nsw i32 %195, %196
  %198 = load i32, ptr %14, align 4, !tbaa !5
  %199 = icmp slt i32 %197, %198
  br i1 %199, label %200, label %238

200:                                              ; preds = %194
  %201 = load i32, ptr %32, align 4, !tbaa !5
  %202 = load i32, ptr %29, align 4, !tbaa !5
  %203 = add nsw i32 %201, %202
  %204 = icmp sge i32 %203, 0
  br i1 %204, label %205, label %238

205:                                              ; preds = %200
  %206 = load i32, ptr %32, align 4, !tbaa !5
  %207 = load i32, ptr %29, align 4, !tbaa !5
  %208 = add nsw i32 %206, %207
  %209 = load i32, ptr %15, align 4, !tbaa !5
  %210 = icmp slt i32 %208, %209
  br i1 %210, label %211, label %238

211:                                              ; preds = %205
  %212 = load i32, ptr %31, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IcSaIcEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %213) #5
  %215 = load i32, ptr %32, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %214, i64 noundef %216) #5
  %218 = load i8, ptr %217, align 1, !tbaa !9
  %219 = sext i8 %218 to i32
  %220 = icmp eq i32 %219, 49
  br i1 %220, label %221, label %238

221:                                              ; preds = %211
  %222 = load i32, ptr %31, align 4, !tbaa !5
  %223 = load i32, ptr %28, align 4, !tbaa !5
  %224 = add nsw i32 %222, %223
  %225 = sext i32 %224 to i64
  %226 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IcSaIcEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %225) #5
  %227 = load i32, ptr %32, align 4, !tbaa !5
  %228 = load i32, ptr %29, align 4, !tbaa !5
  %229 = add nsw i32 %227, %228
  %230 = sext i32 %229 to i64
  %231 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %226, i64 noundef %230) #5
  %232 = load i8, ptr %231, align 1, !tbaa !9
  %233 = sext i8 %232 to i32
  %234 = icmp eq i32 %233, 49
  br i1 %234, label %235, label %238

235:                                              ; preds = %221
  %236 = load i64, ptr %30, align 8, !tbaa !15
  %237 = add nsw i64 %236, 1
  store i64 %237, ptr %30, align 8, !tbaa !15
  br label %238

238:                                              ; preds = %235, %221, %211, %205, %200, %194, %189
  br label %239

239:                                              ; preds = %238
  %240 = load i32, ptr %32, align 4, !tbaa !5
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %32, align 4, !tbaa !5
  br label %184, !llvm.loop !17

242:                                              ; preds = %188
  br label %243

243:                                              ; preds = %242
  %244 = load i32, ptr %31, align 4, !tbaa !5
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %31, align 4, !tbaa !5
  br label %178, !llvm.loop !18

246:                                              ; preds = %182
  %247 = load i64, ptr %30, align 8, !tbaa !15
  %248 = load i64, ptr %23, align 8, !tbaa !15
  %249 = icmp sgt i64 %247, %248
  br i1 %249, label %250, label %254

250:                                              ; preds = %246
  %251 = load i64, ptr %30, align 8, !tbaa !15
  store i64 %251, ptr %23, align 8, !tbaa !15
  %252 = load i32, ptr %29, align 4, !tbaa !5
  store i32 %252, ptr %25, align 4, !tbaa !5
  %253 = load i32, ptr %28, align 4, !tbaa !5
  store i32 %253, ptr %24, align 4, !tbaa !5
  br label %254

254:                                              ; preds = %250, %246
  %255 = load i32, ptr %28, align 4, !tbaa !5
  %256 = load i32, ptr %29, align 4, !tbaa !5
  %257 = load i64, ptr %30, align 8, !tbaa !15
  %258 = load i64, ptr %23, align 8, !tbaa !15
  %259 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %255, i32 noundef %256, i64 noundef %257, i64 noundef %258)
          to label %260 unwind label %264

260:                                              ; preds = %254
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  br label %261

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

264:                                              ; preds = %254
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %8, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %282

268:                                              ; preds = %176
  br label %269

269:                                              ; preds = %268
  %270 = load i32, ptr %28, align 4, !tbaa !5
  %271 = add nsw i32 %270, 1
  store i32 %271, ptr %28, align 4, !tbaa !5
  br label %164, !llvm.loop !20

272:                                              ; preds = %168
  %273 = load i32, ptr %24, align 4, !tbaa !5
  %274 = load i32, ptr %25, align 4, !tbaa !5
  %275 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %273, i32 noundef %274)
          to label %276 unwind label %278

276:                                              ; preds = %272
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @_ZNSt6vectorIS_IcSaIcEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @_ZNSt6vectorIS_IcSaIcEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %277 = load i32, ptr %1, align 4
  ret i32 %277

278:                                              ; preds = %272
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %8, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %9, align 4
  br label %282

282:                                              ; preds = %278, %264
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %283

283:                                              ; preds = %282, %146
  call void @_ZNSt6vectorIS_IcSaIcEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  br label %284

284:                                              ; preds = %283, %113
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  br label %285

285:                                              ; preds = %284, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %286

286:                                              ; preds = %285, %86
  call void @_ZNSt6vectorIS_IcSaIcEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %287

287:                                              ; preds = %286, %53
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %288

288:                                              ; preds = %287
  %289 = load ptr, ptr %8, align 8
  %290 = load i32, ptr %9, align 4
  %291 = insertvalue { ptr, i32 } poison, ptr %289, 0
  %292 = insertvalue { ptr, i32 } %291, i32 %290, 1
  resume { ptr, i32 } %292
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaISt6vectorIcSaIcEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

declare i32 @printf(ptr noundef, ...) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorIcSaIcEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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


; 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<std::vector<char>, std::allocator<std::vector<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<char>, std::allocator<std::vector<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<char>, std::allocator<std::vector<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<char>, std::allocator<std::vector<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca i8, align 1
  %6 = alloca %"class.std::allocator.2", align 1
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::vector.0", align 8
  %12 = alloca i8, align 1
  %13 = alloca %"class.std::allocator.2", align 1
  %14 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  %16 = load i32, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  store i8 48, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIcSaIcEEC2EmRKcRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %18, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %19 unwind label %30

19:                                               ; preds = %0
  %20 = sext i32 %16 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSaISt6vectorIcSaIcEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt6vectorIS_IcSaIcEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %20, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %21 unwind label %32

21:                                               ; preds = %19
  call void @_ZNSt15__new_allocatorISt6vectorIcSaIcEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.preheader94, label %._crit_edge97

.preheader94:                                     ; preds = %21, %._crit_edge
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %._crit_edge ], [ 0, %21 ]
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.lr.ph, label %._crit_edge

._crit_edge97:                                    ; preds = %._crit_edge, %21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %8, ptr noundef nonnull %9)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  %27 = load i32, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  %28 = load i32, ptr %9, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  store i8 48, ptr %12, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt6vectorIcSaIcEEC2EmRKcRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %29, ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %45 unwind label %61

30:                                               ; preds = %0
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %34

32:                                               ; preds = %19
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIcSaIcEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %34

34:                                               ; preds = %32, %30
  %.pn = phi { ptr, i32 } [ %33, %32 ], [ %31, %30 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  br label %121

._crit_edge:                                      ; preds = %.lr.ph, %.preheader94
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2)
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = icmp slt i64 %indvars.iv.next147, %37
  br i1 %38, label %.preheader94, label %._crit_edge97, !llvm.loop !10

.lr.ph:                                           ; preds = %.preheader94, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader94 ]
  %39 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IcSaIcEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv146) #6
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %indvars.iv) #6
  %41 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %40)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = icmp slt i64 %indvars.iv.next, %43
  br i1 %44, label %.lr.ph, label %._crit_edge, !llvm.loop !12

45:                                               ; preds = %._crit_edge97
  %46 = sext i32 %27 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #6
  call void @_ZNSaISt6vectorIcSaIcEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt6vectorIS_IcSaIcEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %46, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %47 unwind label %63

47:                                               ; preds = %45
  call void @_ZNSt15__new_allocatorISt6vectorIcSaIcEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.preheader93, label %._crit_edge102

.preheader93:                                     ; preds = %47, %._crit_edge100
  %indvars.iv152 = phi i64 [ %indvars.iv.next153, %._crit_edge100 ], [ 0, %47 ]
  %50 = load i32, ptr %9, align 4, !tbaa !5
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %.lr.ph99, label %._crit_edge100

._crit_edge102:                                   ; preds = %._crit_edge100, %47
  %.lcssa = phi i32 [ %48, %47 ], [ %67, %._crit_edge100 ]
  %52 = load i32, ptr %1, align 4, !tbaa !5
  %spec.select = call i32 @llvm.smax.i32(i32 %52, i32 %.lcssa)
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %.056 = call i32 @llvm.smax.i32(i32 %53, i32 %54)
  %.not127 = icmp slt i32 %spec.select, 0
  %.not87118 = icmp slt i32 %.056, 0
  %or.cond = select i1 %.not127, i1 true, i1 %.not87118
  br i1 %or.cond, label %._crit_edge134, label %.preheader92.lr.ph.preheader

.preheader92.lr.ph.preheader:                     ; preds = %._crit_edge102
  %55 = sub nsw i32 0, %.056
  %56 = sub nsw i32 0, %spec.select
  %57 = sext i32 %55 to i64
  %58 = zext nneg i32 %.056 to i64
  %59 = sext i32 %56 to i64
  %60 = zext nneg i32 %spec.select to i64
  br label %.preheader92.lr.ph

61:                                               ; preds = %._crit_edge97
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %45
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIcSaIcEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %65

65:                                               ; preds = %63, %61
  %.pn84 = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @_ZNSt6vectorIS_IcSaIcEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %121

._crit_edge100:                                   ; preds = %.lr.ph99, %.preheader93
  %66 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2)
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %67 = load i32, ptr %8, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %indvars.iv.next153, %68
  br i1 %69, label %.preheader93, label %._crit_edge102, !llvm.loop !13

.lr.ph99:                                         ; preds = %.preheader93, %.lr.ph99
  %indvars.iv149 = phi i64 [ %indvars.iv.next150, %.lr.ph99 ], [ 0, %.preheader93 ]
  %70 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IcSaIcEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv152) #6
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %indvars.iv149) #6
  %72 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %71)
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %73 = load i32, ptr %9, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = icmp slt i64 %indvars.iv.next150, %74
  br i1 %75, label %.lr.ph99, label %._crit_edge100, !llvm.loop !14

._crit_edge134:                                   ; preds = %._crit_edge123, %._crit_edge102
  %.061.lcssa = phi i32 [ 0, %._crit_edge102 ], [ %.263, %._crit_edge123 ]
  %.058.lcssa = phi i32 [ 0, %._crit_edge102 ], [ %.260, %._crit_edge123 ]
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.061.lcssa, i32 noundef %.058.lcssa)
  call void @_ZNSt6vectorIS_IcSaIcEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @_ZNSt6vectorIS_IcSaIcEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.preheader92.lr.ph:                               ; preds = %.preheader92.lr.ph.preheader, %._crit_edge123
  %indvars.iv164 = phi i64 [ %59, %.preheader92.lr.ph.preheader ], [ %indvars.iv.next165, %._crit_edge123 ]
  %.058130 = phi i32 [ 0, %.preheader92.lr.ph.preheader ], [ %.260, %._crit_edge123 ]
  %.061129 = phi i32 [ 0, %.preheader92.lr.ph.preheader ], [ %.263, %._crit_edge123 ]
  %.064128 = phi i64 [ 0, %.preheader92.lr.ph.preheader ], [ %.266, %._crit_edge123 ]
  %77 = trunc nsw i64 %indvars.iv164 to i32
  br label %.preheader92

.preheader92:                                     ; preds = %.preheader92.lr.ph, %._crit_edge115
  %indvars.iv161 = phi i64 [ %57, %.preheader92.lr.ph ], [ %indvars.iv.next162, %._crit_edge115 ]
  %.159121 = phi i32 [ %.058130, %.preheader92.lr.ph ], [ %.260, %._crit_edge115 ]
  %.162120 = phi i32 [ %.061129, %.preheader92.lr.ph ], [ %.263, %._crit_edge115 ]
  %.165119 = phi i64 [ %.064128, %.preheader92.lr.ph ], [ %.266, %._crit_edge115 ]
  %78 = load i32, ptr %1, align 4, !tbaa !5
  %79 = icmp sgt i32 %78, 0
  %80 = load i32, ptr %2, align 4
  %81 = icmp sgt i32 %80, 0
  %or.cond172 = select i1 %79, i1 %81, i1 false
  br i1 %or.cond172, label %.preheader, label %._crit_edge115

._crit_edge123:                                   ; preds = %._crit_edge115
  %indvars.iv.next165 = add nsw i64 %indvars.iv164, 1
  %.not.not = icmp slt i64 %indvars.iv164, %60
  br i1 %.not.not, label %.preheader92.lr.ph, label %._crit_edge134, !llvm.loop !15

.preheader:                                       ; preds = %.preheader92, %._crit_edge106
  %82 = phi i32 [ %94, %._crit_edge106 ], [ %78, %.preheader92 ]
  %83 = phi i32 [ %95, %._crit_edge106 ], [ %80, %.preheader92 ]
  %indvars.iv158 = phi i64 [ %indvars.iv.next159, %._crit_edge106 ], [ 0, %.preheader92 ]
  %.053113 = phi i64 [ %.1.lcssa, %._crit_edge106 ], [ 0, %.preheader92 ]
  %84 = icmp sgt i32 %83, 0
  br i1 %84, label %.lr.ph105, label %._crit_edge106

.lr.ph105:                                        ; preds = %.preheader
  %85 = add nsw i64 %indvars.iv158, %indvars.iv164
  %.fr = freeze i64 %85
  %86 = trunc i64 %.fr to i32
  %87 = icmp sgt i32 %86, -1
  %88 = and i64 %.fr, 4294967295
  %89 = load i32, ptr %8, align 4
  %90 = icmp sgt i32 %89, %86
  %or.cond170 = select i1 %87, i1 %90, i1 false
  br i1 %or.cond170, label %.lr.ph105.split.split, label %._crit_edge106

._crit_edge115:                                   ; preds = %._crit_edge106, %.preheader92
  %.053.lcssa = phi i64 [ 0, %.preheader92 ], [ %.1.lcssa, %._crit_edge106 ]
  %91 = icmp sgt i64 %.053.lcssa, %.165119
  %.266 = call i64 @llvm.smax.i64(i64 %.053.lcssa, i64 %.165119)
  %.263 = select i1 %91, i32 %77, i32 %.162120
  %92 = trunc nsw i64 %indvars.iv161 to i32
  %.260 = select i1 %91, i32 %92, i32 %.159121
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %77, i32 noundef %92, i64 noundef %.053.lcssa, i64 noundef %.266)
  %indvars.iv.next162 = add nsw i64 %indvars.iv161, 1
  %.not87.not = icmp slt i64 %indvars.iv161, %58
  br i1 %.not87.not, label %.preheader92, label %._crit_edge123, !llvm.loop !16

._crit_edge106.loopexit:                          ; preds = %117
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge106

._crit_edge106:                                   ; preds = %.lr.ph105, %._crit_edge106.loopexit, %.preheader
  %94 = phi i32 [ %82, %.preheader ], [ %.pre, %._crit_edge106.loopexit ], [ %82, %.lr.ph105 ]
  %95 = phi i32 [ %83, %.preheader ], [ %118, %._crit_edge106.loopexit ], [ %83, %.lr.ph105 ]
  %.1.lcssa = phi i64 [ %.053113, %.preheader ], [ %.2, %._crit_edge106.loopexit ], [ %.053113, %.lr.ph105 ]
  %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
  %96 = sext i32 %94 to i64
  %97 = icmp slt i64 %indvars.iv.next159, %96
  br i1 %97, label %.preheader, label %._crit_edge115, !llvm.loop !17

.lr.ph105.split.split:                            ; preds = %.lr.ph105, %117
  %indvars.iv155 = phi i64 [ %indvars.iv.next156, %117 ], [ 0, %.lr.ph105 ]
  %.1103 = phi i64 [ %.2, %117 ], [ %.053113, %.lr.ph105 ]
  %98 = load i32, ptr %8, align 4
  %99 = icmp sgt i32 %98, %86
  br i1 %99, label %100, label %117

100:                                              ; preds = %.lr.ph105.split.split
  %101 = add nsw i64 %indvars.iv155, %indvars.iv161
  %102 = icmp sgt i64 %101, -1
  %103 = load i32, ptr %9, align 4
  %104 = sext i32 %103 to i64
  %105 = icmp slt i64 %101, %104
  %or.cond90 = select i1 %102, i1 %105, i1 false
  br i1 %or.cond90, label %106, label %117

106:                                              ; preds = %100
  %107 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IcSaIcEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv158) #6
  %108 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef %indvars.iv155) #6
  %109 = load i8, ptr %108, align 1, !tbaa !9
  %110 = icmp eq i8 %109, 49
  br i1 %110, label %111, label %117

111:                                              ; preds = %106
  %112 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IcSaIcEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %88) #6
  %113 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %112, i64 noundef %101) #6
  %114 = load i8, ptr %113, align 1, !tbaa !9
  %115 = icmp eq i8 %114, 49
  %116 = zext i1 %115 to i64
  %spec.select91 = add nsw i64 %.1103, %116
  br label %117

117:                                              ; preds = %111, %.lr.ph105.split.split, %100, %106
  %.2 = phi i64 [ %.1103, %106 ], [ %.1103, %100 ], [ %.1103, %.lr.ph105.split.split ], [ %spec.select91, %111 ]
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %118 = load i32, ptr %2, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = icmp slt i64 %indvars.iv.next156, %119
  br i1 %120, label %.lr.ph105.split.split, label %._crit_edge106.loopexit, !llvm.loop !19

121:                                              ; preds = %65, %34
  %.pn84.pn = phi { ptr, i32 } [ %.pn84, %65 ], [ %.pn, %34 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn84.pn
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaISt6vectorIcSaIcEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

; 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorIcSaIcEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #5

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

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

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


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