; LLVM IR from DionysiosB/CodeForces :: 0300-0399 (394C-Dominoes)

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

%"class.std::basic_ostream" = type { ptr, %"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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = 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 [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.9 = external hidden unnamed_addr constant [1 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 i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator.0", align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %26

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

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

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

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

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

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  store i8 97, ptr %12, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #6
  store i8 97, ptr %13, align 1, !tbaa !9
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %12, ptr noundef %13)
  %39 = load i8, ptr %12, align 1, !tbaa !9
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %40, 48
  br i1 %41, label %42, label %49

42:                                               ; preds = %37
  %43 = load i8, ptr %13, align 1, !tbaa !9
  %44 = sext i8 %43 to i32
  %45 = icmp eq i32 %44, 48
  br i1 %45, label %46, label %49

46:                                               ; preds = %42
  %47 = load i32, ptr %8, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %8, align 4, !tbaa !5
  br label %64

49:                                               ; preds = %42, %37
  %50 = load i8, ptr %12, align 1, !tbaa !9
  %51 = sext i8 %50 to i32
  %52 = icmp eq i32 %51, 49
  br i1 %52, label %53, label %60

53:                                               ; preds = %49
  %54 = load i8, ptr %13, align 1, !tbaa !9
  %55 = sext i8 %54 to i32
  %56 = icmp eq i32 %55, 49
  br i1 %56, label %57, label %60

57:                                               ; preds = %53
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %4, align 4, !tbaa !5
  br label %63

60:                                               ; preds = %53, %49
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %5, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %60, %57
  br label %64

64:                                               ; preds = %63, %46
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = load i32, ptr %3, align 4, !tbaa !5
  %67 = sub nsw i32 %66, 1
  %68 = icmp slt i32 %65, %67
  br i1 %68, label %69, label %71

69:                                               ; preds = %64
  %70 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2)
  br label %73

71:                                               ; preds = %64
  %72 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3)
  br label %73

73:                                               ; preds = %71, %69
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %11, align 4, !tbaa !5
  br label %32, !llvm.loop !10

77:                                               ; preds = %36
  br label %78

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

81:                                               ; preds = %30
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = sdiv i32 %82, 2
  store i32 %83, ptr %6, align 4, !tbaa !5
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = sub nsw i32 %84, %85
  store i32 %86, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = load i32, ptr %3, align 4, !tbaa !5
  %89 = mul nsw i32 %87, %88
  %90 = sext i32 %89 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %91 unwind label %98

91:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  call void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS5_RKS6_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %90, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %92 unwind label %102

92:                                               ; preds = %91
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %113, %92
  %94 = load i32, ptr %20, align 4, !tbaa !5
  %95 = load i32, ptr %4, align 4, !tbaa !5
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %107, label %97

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

98:                                               ; preds = %81
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %17, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %18, align 4
  br label %106

102:                                              ; preds = %91
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %17, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %18, align 4
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %106

106:                                              ; preds = %102, %98
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  br label %227

107:                                              ; preds = %93
  %108 = load i32, ptr %20, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %109) #6
  %111 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %110, ptr noundef @.str.5)
          to label %112 unwind label %116

112:                                              ; preds = %107
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %20, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %20, align 4, !tbaa !5
  br label %93, !llvm.loop !13

116:                                              ; preds = %107
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %17, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %226

120:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %121 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %121, ptr %21, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %135, %120
  %123 = load i32, ptr %21, align 4, !tbaa !5
  %124 = load i32, ptr %4, align 4, !tbaa !5
  %125 = load i32, ptr %6, align 4, !tbaa !5
  %126 = add nsw i32 %124, %125
  %127 = icmp slt i32 %123, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %122
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %142

129:                                              ; preds = %122
  %130 = load i32, ptr %21, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %131) #6
  %133 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %132, ptr noundef @.str.6)
          to label %134 unwind label %138

134:                                              ; preds = %129
  br label %135

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

138:                                              ; preds = %129
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %17, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %226

142:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %143 = load i32, ptr %4, align 4, !tbaa !5
  %144 = load i32, ptr %6, align 4, !tbaa !5
  %145 = add nsw i32 %143, %144
  store i32 %145, ptr %22, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %161, %142
  %147 = load i32, ptr %22, align 4, !tbaa !5
  %148 = load i32, ptr %4, align 4, !tbaa !5
  %149 = load i32, ptr %6, align 4, !tbaa !5
  %150 = add nsw i32 %148, %149
  %151 = load i32, ptr %8, align 4, !tbaa !5
  %152 = add nsw i32 %150, %151
  %153 = icmp slt i32 %147, %152
  br i1 %153, label %155, label %154

154:                                              ; preds = %146
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %168

155:                                              ; preds = %146
  %156 = load i32, ptr %22, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %157) #6
  %159 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %158, ptr noundef @.str.7)
          to label %160 unwind label %164

160:                                              ; preds = %155
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %22, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %22, align 4, !tbaa !5
  br label %146, !llvm.loop !15

164:                                              ; preds = %155
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %17, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %226

168:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %169 = load i32, ptr %4, align 4, !tbaa !5
  %170 = load i32, ptr %6, align 4, !tbaa !5
  %171 = add nsw i32 %169, %170
  %172 = load i32, ptr %8, align 4, !tbaa !5
  %173 = add nsw i32 %171, %172
  store i32 %173, ptr %23, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %186, %168
  %175 = load i32, ptr %23, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  %178 = icmp ult i64 %176, %177
  br i1 %178, label %180, label %179

179:                                              ; preds = %174
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %193

180:                                              ; preds = %174
  %181 = load i32, ptr %23, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %182) #6
  %184 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %183, ptr noundef @.str.8)
          to label %185 unwind label %189

185:                                              ; preds = %180
  br label %186

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

189:                                              ; preds = %180
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %17, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %226

193:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %194

194:                                              ; preds = %221, %193
  %195 = load i32, ptr %24, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  %198 = icmp ult i64 %196, %197
  br i1 %198, label %200, label %199

199:                                              ; preds = %194
  store i32 20, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %224

200:                                              ; preds = %194
  %201 = load i32, ptr %24, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %202) #6
  %204 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %203)
          to label %205 unwind label %216

205:                                              ; preds = %200
  %206 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %204, ptr noundef @.str.2)
          to label %207 unwind label %216

207:                                              ; preds = %205
  %208 = load i32, ptr %24, align 4, !tbaa !5
  %209 = add nsw i32 %208, 1
  %210 = load i32, ptr %3, align 4, !tbaa !5
  %211 = srem i32 %209, %210
  %212 = icmp eq i32 %211, 0
  br i1 %212, label %213, label %220

213:                                              ; preds = %207
  %214 = invoke i32 @puts(ptr noundef @.str.9)
          to label %215 unwind label %216

215:                                              ; preds = %213
  br label %220

216:                                              ; preds = %213, %205, %200
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %17, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %226

220:                                              ; preds = %215, %207
  br label %221

221:                                              ; preds = %220
  %222 = load i32, ptr %24, align 4, !tbaa !5
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %24, align 4, !tbaa !5
  br label %194, !llvm.loop !17

224:                                              ; preds = %199
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %225 = load i32, ptr %1, align 4
  ret i32 %225

226:                                              ; preds = %216, %189, %164, %138, %116
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br label %227

227:                                              ; preds = %226, %106
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %228

228:                                              ; preds = %227
  %229 = load ptr, ptr %17, align 8
  %230 = load i32, ptr %18, align 4
  %231 = insertvalue { ptr, i32 } poison, ptr %229, 0
  %232 = insertvalue { ptr, i32 } %231, i32 %230, 1
  resume { ptr, i32 } %232
}

; 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: 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, 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 @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #5

declare i32 @puts(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_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_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(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 = { 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 #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}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = 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 [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.9 = external hidden unnamed_addr constant [1 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 i8, align 1
  %4 = alloca i8, align 1
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.0", align 1
  %8 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  %.pre127 = load i32, ptr %2, align 4, !tbaa !5
  %12 = icmp sgt i32 %.pre127, 0
  %or.cond131 = select i1 %11, i1 %12, i1 false
  br i1 %or.cond131, label %.preheader76, label %._crit_edge91

.preheader76:                                     ; preds = %0, %._crit_edge
  %13 = phi i32 [ %18, %._crit_edge ], [ %10, %0 ]
  %14 = phi i32 [ %19, %._crit_edge ], [ %.pre127, %0 ]
  %.05590 = phi i32 [ %20, %._crit_edge ], [ 0, %0 ]
  %.05689 = phi i32 [ %.157.lcssa, %._crit_edge ], [ 0, %0 ]
  %.05988 = phi i32 [ %.160.lcssa, %._crit_edge ], [ 0, %0 ]
  %.06287 = phi i32 [ %.163.lcssa, %._crit_edge ], [ 0, %0 ]
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge91:                                    ; preds = %._crit_edge, %0
  %16 = phi i32 [ %.pre127, %0 ], [ %19, %._crit_edge ]
  %.062.lcssa = phi i32 [ 0, %0 ], [ %.163.lcssa, %._crit_edge ]
  %.059.lcssa = phi i32 [ 0, %0 ], [ %.160.lcssa, %._crit_edge ]
  %.056.lcssa = phi i32 [ 0, %0 ], [ %.157.lcssa, %._crit_edge ]
  %.lcssa80 = phi i32 [ %10, %0 ], [ %18, %._crit_edge ]
  %17 = sdiv i32 %.059.lcssa, 2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %44 unwind label %53

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader76
  %18 = phi i32 [ %13, %.preheader76 ], [ %.pre, %._crit_edge.loopexit ]
  %19 = phi i32 [ %14, %.preheader76 ], [ %42, %._crit_edge.loopexit ]
  %.163.lcssa = phi i32 [ %.06287, %.preheader76 ], [ %.264, %._crit_edge.loopexit ]
  %.160.lcssa = phi i32 [ %.05988, %.preheader76 ], [ %.261, %._crit_edge.loopexit ]
  %.157.lcssa = phi i32 [ %.05689, %.preheader76 ], [ %.258, %._crit_edge.loopexit ]
  %20 = add nuw nsw i32 %.05590, 1
  %21 = icmp slt i32 %20, %18
  br i1 %21, label %.preheader76, label %._crit_edge91, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader76, %36
  %.05484 = phi i32 [ %41, %36 ], [ 0, %.preheader76 ]
  %.15783 = phi i32 [ %.258, %36 ], [ %.05689, %.preheader76 ]
  %.16082 = phi i32 [ %.261, %36 ], [ %.05988, %.preheader76 ]
  %.16381 = phi i32 [ %.264, %36 ], [ %.06287, %.preheader76 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  store i8 97, ptr %3, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  store i8 97, ptr %4, align 1, !tbaa !12
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %23 = load i8, ptr %3, align 1, !tbaa !12
  %24 = icmp eq i8 %23, 48
  %25 = load i8, ptr %4, align 1
  %26 = icmp eq i8 %25, 48
  %or.cond = select i1 %24, i1 %26, i1 false
  br i1 %or.cond, label %27, label %29

27:                                               ; preds = %.lr.ph
  %28 = add nsw i32 %.15783, 1
  br label %36

29:                                               ; preds = %.lr.ph
  %30 = icmp eq i8 %23, 49
  %31 = icmp eq i8 %25, 49
  %or.cond5 = select i1 %30, i1 %31, i1 false
  br i1 %or.cond5, label %32, label %34

32:                                               ; preds = %29
  %33 = add nsw i32 %.16381, 1
  br label %36

34:                                               ; preds = %29
  %35 = add nsw i32 %.16082, 1
  br label %36

36:                                               ; preds = %32, %34, %27
  %.264 = phi i32 [ %.16381, %27 ], [ %33, %32 ], [ %.16381, %34 ]
  %.261 = phi i32 [ %.16082, %27 ], [ %.16082, %32 ], [ %35, %34 ]
  %.258 = phi i32 [ %28, %27 ], [ %.15783, %32 ], [ %.15783, %34 ]
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = add nsw i32 %37, -1
  %39 = icmp slt i32 %.05484, %38
  %.str.2..str.3 = select i1 %39, ptr @.str.2, ptr @.str.3
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull %.str.2..str.3)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  %41 = add nuw nsw i32 %.05484, 1
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !13

44:                                               ; preds = %._crit_edge91
  %45 = mul nsw i32 %16, %.lcssa80
  %46 = sext i32 %45 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS5_RKS6_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %46, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %47 unwind label %55

47:                                               ; preds = %44
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  %48 = icmp sgt i32 %.062.lcssa, 0
  br i1 %48, label %.lr.ph101.preheader, label %.preheader75

.lr.ph101.preheader:                              ; preds = %47
  %wide.trip.count = zext nneg i32 %.062.lcssa to i64
  br label %.lr.ph101

.preheader75:                                     ; preds = %60, %47
  %49 = add i32 %17, %.062.lcssa
  %50 = icmp sgt i32 %.059.lcssa, 1
  br i1 %50, label %.lr.ph103.preheader, label %.preheader74

.lr.ph103.preheader:                              ; preds = %.preheader75
  %51 = sext i32 %.062.lcssa to i64
  %52 = sext i32 %49 to i64
  br label %.lr.ph103

53:                                               ; preds = %._crit_edge91
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %57

55:                                               ; preds = %44
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %57

57:                                               ; preds = %55, %53
  %.pn = phi { ptr, i32 } [ %56, %55 ], [ %54, %53 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %106

.lr.ph101:                                        ; preds = %.lr.ph101.preheader, %60
  %indvars.iv = phi i64 [ 0, %.lr.ph101.preheader ], [ %indvars.iv.next, %60 ]
  %58 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #6
  %59 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %58, ptr noundef nonnull @.str.5)
          to label %60 unwind label %61

60:                                               ; preds = %.lr.ph101
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader75, label %.lr.ph101, !llvm.loop !14

61:                                               ; preds = %.lr.ph101
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %105

.preheader74:                                     ; preds = %69, %.preheader75
  %63 = add i32 %49, %.056.lcssa
  %64 = icmp sgt i32 %.056.lcssa, 0
  br i1 %64, label %.lr.ph106.preheader, label %.preheader74..preheader73_crit_edge

.preheader74..preheader73_crit_edge:              ; preds = %.preheader74
  %.pre128 = sext i32 %63 to i64
  br label %.preheader73

.lr.ph106.preheader:                              ; preds = %.preheader74
  %65 = sext i32 %49 to i64
  %66 = sext i32 %63 to i64
  br label %.lr.ph106

.lr.ph103:                                        ; preds = %.lr.ph103.preheader, %69
  %indvars.iv115 = phi i64 [ %51, %.lr.ph103.preheader ], [ %indvars.iv.next116, %69 ]
  %67 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv115) #6
  %68 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %67, ptr noundef nonnull @.str.6)
          to label %69 unwind label %71

69:                                               ; preds = %.lr.ph103
  %indvars.iv.next116 = add nsw i64 %indvars.iv115, 1
  %70 = icmp slt i64 %indvars.iv.next116, %52
  br i1 %70, label %.lr.ph103, label %.preheader74, !llvm.loop !15

71:                                               ; preds = %.lr.ph103
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %105

.preheader73:                                     ; preds = %77, %.preheader74..preheader73_crit_edge
  %.pre-phi = phi i64 [ %.pre128, %.preheader74..preheader73_crit_edge ], [ %66, %77 ]
  %73 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %74 = icmp ugt i64 %73, %.pre-phi
  br i1 %74, label %.lr.ph109, label %.preheader

.lr.ph106:                                        ; preds = %.lr.ph106.preheader, %77
  %indvars.iv118 = phi i64 [ %65, %.lr.ph106.preheader ], [ %indvars.iv.next119, %77 ]
  %75 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv118) #6
  %76 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %75, ptr noundef nonnull @.str.7)
          to label %77 unwind label %79

77:                                               ; preds = %.lr.ph106
  %indvars.iv.next119 = add nsw i64 %indvars.iv118, 1
  %78 = icmp slt i64 %indvars.iv.next119, %66
  br i1 %78, label %.lr.ph106, label %.preheader73, !llvm.loop !16

79:                                               ; preds = %.lr.ph106
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %105

.preheader:                                       ; preds = %84, %.preheader73
  %81 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %.not = icmp eq i64 %81, 0
  br i1 %.not, label %._crit_edge112, label %.lr.ph111

.lr.ph109:                                        ; preds = %.preheader73, %84
  %indvars.iv121 = phi i64 [ %indvars.iv.next122, %84 ], [ %.pre-phi, %.preheader73 ]
  %82 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv121) #6
  %83 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %82, ptr noundef nonnull @.str.8)
          to label %84 unwind label %87

84:                                               ; preds = %.lr.ph109
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %85 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %86 = icmp ugt i64 %85, %indvars.iv.next122
  br i1 %86, label %.lr.ph109, label %.preheader, !llvm.loop !17

87:                                               ; preds = %.lr.ph109
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %105

._crit_edge112:                                   ; preds = %102, %.preheader
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #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

.lr.ph111:                                        ; preds = %.preheader, %102
  %indvars.iv124 = phi i64 [ %indvars.iv.next125, %102 ], [ 0, %.preheader ]
  %89 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv124) #6
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %89)
          to label %91 unwind label %100

91:                                               ; preds = %.lr.ph111
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull @.str.2)
          to label %93 unwind label %100

93:                                               ; preds = %91
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %94 = load i32, ptr %2, align 4, !tbaa !5
  %95 = trunc nuw i64 %indvars.iv.next125 to i32
  %96 = srem i32 %95, %94
  %97 = icmp eq i32 %96, 0
  br i1 %97, label %98, label %102

98:                                               ; preds = %93
  %99 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.9)
  br label %102

100:                                              ; preds = %91, %.lr.ph111
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %105

102:                                              ; preds = %93, %98
  %103 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %104 = icmp ugt i64 %103, %indvars.iv.next125
  br i1 %104, label %.lr.ph111, label %._crit_edge112, !llvm.loop !18

105:                                              ; preds = %100, %87, %79, %71, %61
  %.pn70 = phi { ptr, i32 } [ %62, %61 ], [ %72, %71 ], [ %80, %79 ], [ %88, %87 ], [ %101, %100 ]
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %106

106:                                              ; preds = %105, %57
  %.pn70.pn = phi { ptr, i32 } [ %.pn70, %105 ], [ %.pn, %57 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #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 } %.pn70.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 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, 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 @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_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_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(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 = { 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 = { 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 #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 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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