; LLVM IR from DionysiosB/CodeForces :: 0900-0999 (984B-Minesweeper)

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

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 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 i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i8, align 1
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #6
  %19 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  call void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %19, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %20 unwind label %26

20:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %21

21:                                               ; preds = %35, %20
  %22 = load i64, ptr %8, align 8, !tbaa !5
  %23 = load i64, ptr %2, align 8, !tbaa !5
  %24 = icmp slt i64 %22, %23
  br i1 %24, label %30, label %25

25:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %42

26:                                               ; preds = %0
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %6, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %7, align 4
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  br label %207

30:                                               ; preds = %21
  %31 = load i64, ptr %8, align 8, !tbaa !5
  %32 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %31) #6
  %33 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %34 unwind label %38

34:                                               ; preds = %30
  br label %35

35:                                               ; preds = %34
  %36 = load i64, ptr %8, align 8, !tbaa !5
  %37 = add nsw i64 %36, 1
  store i64 %37, ptr %8, align 8, !tbaa !5
  br label %21, !llvm.loop !9

38:                                               ; preds = %30
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %6, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %206

42:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  store i8 1, ptr %9, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %187, %42
  %44 = load i64, ptr %10, align 8, !tbaa !5
  %45 = load i64, ptr %2, align 8, !tbaa !5
  %46 = icmp slt i64 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 5, ptr %11, align 4
  br label %190

48:                                               ; preds = %43
  %49 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %50 = trunc i8 %49 to i1
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  store i32 5, ptr %11, align 4
  br label %190

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %180, %52
  %54 = load i64, ptr %12, align 8, !tbaa !5
  %55 = load i64, ptr %10, align 8, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %55) #6
  %57 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %56) #6
  %58 = icmp ult i64 %54, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %53
  store i32 8, ptr %11, align 4
  br label %184

60:                                               ; preds = %53
  %61 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %62 = trunc i8 %61 to i1
  br i1 %62, label %64, label %63

63:                                               ; preds = %60
  store i32 8, ptr %11, align 4
  br label %184

64:                                               ; preds = %60
  %65 = load i64, ptr %10, align 8, !tbaa !5
  %66 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %65) #6
  %67 = load i64, ptr %12, align 8, !tbaa !5
  %68 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %66, i64 noundef %67)
          to label %69 unwind label %74

69:                                               ; preds = %64
  %70 = load i8, ptr %68, align 1, !tbaa !15
  %71 = sext i8 %70 to i32
  %72 = icmp eq i32 %71, 42
  br i1 %72, label %73, label %78

73:                                               ; preds = %69
  br label %180

74:                                               ; preds = %64
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %6, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %7, align 4
  br label %185

78:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %79 = load i64, ptr %10, align 8, !tbaa !5
  %80 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %79) #6
  %81 = load i64, ptr %12, align 8, !tbaa !5
  %82 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef %81)
          to label %83 unwind label %88

83:                                               ; preds = %78
  %84 = load i8, ptr %82, align 1, !tbaa !15
  %85 = sext i8 %84 to i32
  %86 = icmp eq i32 %85, 46
  br i1 %86, label %87, label %92

87:                                               ; preds = %83
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %102

88:                                               ; preds = %92, %78
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %6, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %7, align 4
  br label %183

92:                                               ; preds = %83
  %93 = load i64, ptr %10, align 8, !tbaa !5
  %94 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %93) #6
  %95 = load i64, ptr %12, align 8, !tbaa !5
  %96 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %94, i64 noundef %95)
          to label %97 unwind label %88

97:                                               ; preds = %92
  %98 = load i8, ptr %96, align 1, !tbaa !15
  %99 = sext i8 %98 to i32
  %100 = sub nsw i32 %99, 48
  %101 = sext i32 %100 to i64
  store i64 %101, ptr %13, align 8, !tbaa !5
  br label %102

102:                                              ; preds = %97, %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 0, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 -1, ptr %15, align 8, !tbaa !5
  br label %103

103:                                              ; preds = %168, %102
  %104 = load i64, ptr %15, align 8, !tbaa !5
  %105 = icmp sle i64 %104, 1
  br i1 %105, label %107, label %106

106:                                              ; preds = %103
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %171

107:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 -1, ptr %16, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %164, %107
  %109 = load i64, ptr %16, align 8, !tbaa !5
  %110 = icmp sle i64 %109, 1
  br i1 %110, label %112, label %111

111:                                              ; preds = %108
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %167

112:                                              ; preds = %108
  %113 = load i64, ptr %15, align 8, !tbaa !5
  %114 = icmp eq i64 %113, 0
  br i1 %114, label %115, label %119

115:                                              ; preds = %112
  %116 = load i64, ptr %16, align 8, !tbaa !5
  %117 = icmp eq i64 %116, 0
  br i1 %117, label %118, label %119

118:                                              ; preds = %115
  br label %164

119:                                              ; preds = %115, %112
  %120 = load i64, ptr %10, align 8, !tbaa !5
  %121 = load i64, ptr %15, align 8, !tbaa !5
  %122 = add nsw i64 %120, %121
  %123 = icmp slt i64 %122, 0
  br i1 %123, label %130, label %124

124:                                              ; preds = %119
  %125 = load i64, ptr %10, align 8, !tbaa !5
  %126 = load i64, ptr %15, align 8, !tbaa !5
  %127 = add nsw i64 %125, %126
  %128 = load i64, ptr %2, align 8, !tbaa !5
  %129 = icmp sge i64 %127, %128
  br i1 %129, label %130, label %131

130:                                              ; preds = %124, %119
  br label %164

131:                                              ; preds = %124
  %132 = load i64, ptr %12, align 8, !tbaa !5
  %133 = load i64, ptr %16, align 8, !tbaa !5
  %134 = add nsw i64 %132, %133
  %135 = icmp slt i64 %134, 0
  br i1 %135, label %142, label %136

136:                                              ; preds = %131
  %137 = load i64, ptr %12, align 8, !tbaa !5
  %138 = load i64, ptr %16, align 8, !tbaa !5
  %139 = add nsw i64 %137, %138
  %140 = load i64, ptr %3, align 8, !tbaa !5
  %141 = icmp sge i64 %139, %140
  br i1 %141, label %142, label %143

142:                                              ; preds = %136, %131
  br label %164

143:                                              ; preds = %136
  %144 = load i64, ptr %10, align 8, !tbaa !5
  %145 = load i64, ptr %15, align 8, !tbaa !5
  %146 = add nsw i64 %144, %145
  %147 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %146) #6
  %148 = load i64, ptr %12, align 8, !tbaa !5
  %149 = load i64, ptr %16, align 8, !tbaa !5
  %150 = add nsw i64 %148, %149
  %151 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %147, i64 noundef %150)
          to label %152 unwind label %159

152:                                              ; preds = %143
  %153 = load i8, ptr %151, align 1, !tbaa !15
  %154 = sext i8 %153 to i32
  %155 = icmp eq i32 %154, 42
  br i1 %155, label %156, label %163

156:                                              ; preds = %152
  %157 = load i64, ptr %14, align 8, !tbaa !5
  %158 = add nsw i64 %157, 1
  store i64 %158, ptr %14, align 8, !tbaa !5
  br label %163

159:                                              ; preds = %143
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %6, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %183

163:                                              ; preds = %156, %152
  br label %164

164:                                              ; preds = %163, %142, %130, %118
  %165 = load i64, ptr %16, align 8, !tbaa !5
  %166 = add nsw i64 %165, 1
  store i64 %166, ptr %16, align 8, !tbaa !5
  br label %108, !llvm.loop !16

167:                                              ; preds = %111
  br label %168

168:                                              ; preds = %167
  %169 = load i64, ptr %15, align 8, !tbaa !5
  %170 = add nsw i64 %169, 1
  store i64 %170, ptr %15, align 8, !tbaa !5
  br label %103, !llvm.loop !17

171:                                              ; preds = %106
  %172 = load i64, ptr %13, align 8, !tbaa !5
  %173 = load i64, ptr %14, align 8, !tbaa !5
  %174 = icmp ne i64 %172, %173
  br i1 %174, label %175, label %176

175:                                              ; preds = %171
  store i8 0, ptr %9, align 1, !tbaa !11
  store i32 8, ptr %11, align 4
  br label %177

176:                                              ; preds = %171
  store i32 0, ptr %11, align 4
  br label %177

177:                                              ; preds = %176, %175
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  %178 = load i32, ptr %11, align 4
  switch i32 %178, label %184 [
    i32 0, label %179
  ]

179:                                              ; preds = %177
  br label %180

180:                                              ; preds = %179, %73
  %181 = load i64, ptr %12, align 8, !tbaa !5
  %182 = add nsw i64 %181, 1
  store i64 %182, ptr %12, align 8, !tbaa !5
  br label %53, !llvm.loop !18

183:                                              ; preds = %159, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %185

184:                                              ; preds = %177, %63, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %186

185:                                              ; preds = %183, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %205

186:                                              ; preds = %184
  br label %187

187:                                              ; preds = %186
  %188 = load i64, ptr %10, align 8, !tbaa !5
  %189 = add nsw i64 %188, 1
  store i64 %189, ptr %10, align 8, !tbaa !5
  br label %43, !llvm.loop !19

190:                                              ; preds = %51, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %191

191:                                              ; preds = %190
  %192 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %193 = trunc i8 %192 to i1
  %194 = zext i1 %193 to i64
  %195 = select i1 %193, ptr @.str, ptr @.str.1
  %196 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %195)
          to label %197 unwind label %201

197:                                              ; preds = %191
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %196, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %199 unwind label %201

199:                                              ; preds = %197
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %200 = load i32, ptr %1, align 4
  ret i32 %200

201:                                              ; preds = %197, %191
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %6, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %7, align 4
  br label %205

205:                                              ; preds = %201, %185
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  br label %206

206:                                              ; preds = %205, %38
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %207

207:                                              ; preds = %206, %26
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %208

208:                                              ; preds = %207
  %209 = load ptr, ptr %6, align 8
  %210 = load i32, ptr %7, align 4
  %211 = insertvalue { ptr, i32 } poison, ptr %209, 0
  %212 = insertvalue { ptr, i32 } %211, i32 %210, 1
  resume { ptr, i32 } %212
}

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

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

; 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_EEC2EmRKS6_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; 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 nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

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

; 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_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 = { 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 #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 = { "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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


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

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 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 i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  %7 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %7, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %8 unwind label %12

8:                                                ; preds = %0
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  %9 = load i64, ptr %1, align 8, !tbaa !5
  %10 = icmp sgt i64 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge95

.preheader75:                                     ; preds = %16
  %11 = icmp sgt i64 %18, 0
  br i1 %11, label %.lr.ph94, label %._crit_edge95

12:                                               ; preds = %0
  %13 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  br label %160

.lr.ph:                                           ; preds = %8, %16
  %.05181 = phi i64 [ %17, %16 ], [ 0, %8 ]
  %14 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.05181) #6
  %15 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %16 unwind label %20

16:                                               ; preds = %.lr.ph
  %17 = add nuw nsw i64 %.05181, 1
  %18 = load i64, ptr %1, align 8, !tbaa !5
  %19 = icmp slt i64 %17, %18
  br i1 %19, label %.lr.ph, label %.preheader75, !llvm.loop !9

20:                                               ; preds = %.lr.ph
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %159

.lr.ph94:                                         ; preds = %.preheader75, %._crit_edge
  %.04793 = phi i64 [ %148, %._crit_edge ], [ 0, %.preheader75 ]
  %.04892 = phi i8 [ %.4, %._crit_edge ], [ 1, %.preheader75 ]
  %22 = trunc nuw i8 %.04892 to i1
  br i1 %22, label %.preheader74, label %._crit_edge95.loopexit

.preheader74:                                     ; preds = %.lr.ph94
  %23 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04793) #6
  %24 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  %.not99 = icmp eq i64 %24, 0
  br i1 %.not99, label %._crit_edge, label %.lr.ph87.split.preheader

.lr.ph87.split.preheader:                         ; preds = %.preheader74
  %25 = add i64 %.04793, -1
  %26 = icmp sgt i64 %25, -1
  %27 = icmp sgt i64 %.04793, -1
  %28 = add i64 %.04793, 1
  %29 = icmp sgt i64 %28, -1
  %30 = add nuw nsw i64 %.04793, 1
  br label %.lr.ph87.split

.lr.ph87.split:                                   ; preds = %.lr.ph87.split.preheader, %143
  %.04586 = phi i64 [ %144, %143 ], [ 0, %.lr.ph87.split.preheader ]
  %31 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04793) #6
  %32 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %31, i64 noundef %.04586)
          to label %33 unwind label %36

33:                                               ; preds = %.lr.ph87.split
  %34 = load i8, ptr %32, align 1, !tbaa !11
  %35 = icmp eq i8 %34, 42
  br i1 %35, label %143, label %38

36:                                               ; preds = %.lr.ph87.split
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %159

38:                                               ; preds = %33
  %39 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04793) #6
  %40 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %39, i64 noundef %.04586)
          to label %41 unwind label %44

41:                                               ; preds = %38
  %42 = load i8, ptr %40, align 1, !tbaa !11
  %43 = icmp eq i8 %42, 46
  br i1 %43, label %.preheader, label %46

44:                                               ; preds = %46, %38
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %159

46:                                               ; preds = %41
  %47 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04793) #6
  %48 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %47, i64 noundef %.04586)
          to label %49 unwind label %44

49:                                               ; preds = %46
  %50 = load i8, ptr %48, align 1, !tbaa !11
  %51 = sext i8 %50 to i64
  %52 = add nsw i64 %51, -48
  br label %.preheader

.preheader:                                       ; preds = %41, %49
  %.044 = phi i64 [ %52, %49 ], [ 0, %41 ]
  br i1 %26, label %.preheader.split.preheader, label %.split.us

.preheader.split.preheader:                       ; preds = %.preheader
  %53 = load i64, ptr %1, align 8
  %.not64 = icmp slt i64 %25, %53
  br i1 %.not64, label %110, label %.preheader.split.1

.split.us:                                        ; preds = %.preheader.split.2, %.preheader
  %.us-phi = phi i64 [ 0, %.preheader ], [ %.2.1, %.preheader.split.2 ]
  br i1 %27, label %.preheader.split.preheader.1, label %.split.us.1

.preheader.split.preheader.1:                     ; preds = %139, %133, %.split.us
  %.us-phi120 = phi i64 [ %.us-phi, %.split.us ], [ %spec.select.2, %139 ], [ %.2.1, %133 ]
  %54 = load i64, ptr %1, align 8
  %.not64.1102 = icmp slt i64 %.04793, %54
  br i1 %.not64.1102, label %55, label %.preheader.split.2.1

55:                                               ; preds = %.preheader.split.preheader.1
  %56 = icmp ne i64 %.04586, 0
  %57 = load i64, ptr %2, align 8
  %.not65.1104 = icmp sle i64 %.04586, %57
  %or.cond73.1105 = select i1 %56, i1 %.not65.1104, i1 false
  br i1 %or.cond73.1105, label %58, label %.preheader.split.2.1

58:                                               ; preds = %55
  %59 = add nsw i64 %.04586, -1
  %60 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04793) #6
  %61 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %60, i64 noundef %59)
          to label %62 unwind label %121

62:                                               ; preds = %58
  %63 = load i8, ptr %61, align 1, !tbaa !11
  %64 = icmp eq i8 %63, 42
  %65 = zext i1 %64 to i64
  %spec.select.1106 = add nuw nsw i64 %.us-phi120, %65
  br label %.preheader.split.2.1

.preheader.split.2.1:                             ; preds = %.preheader.split.preheader.1, %55, %62
  %.2.1107 = phi i64 [ %.us-phi120, %.preheader.split.preheader.1 ], [ %.us-phi120, %55 ], [ %spec.select.1106, %62 ]
  %66 = load i64, ptr %1, align 8
  %.not64.2.1 = icmp slt i64 %.04793, %66
  br i1 %.not64.2.1, label %67, label %.split.us.1

67:                                               ; preds = %.preheader.split.2.1
  %68 = add nuw nsw i64 %.04586, 1
  %69 = load i64, ptr %2, align 8
  %.not65.2.1 = icmp slt i64 %68, %69
  br i1 %.not65.2.1, label %70, label %.preheader.split.preheader.2

70:                                               ; preds = %67
  %71 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04793) #6
  %72 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %71, i64 noundef %68)
          to label %73 unwind label %121

73:                                               ; preds = %70
  %74 = load i8, ptr %72, align 1, !tbaa !11
  %75 = icmp eq i8 %74, 42
  %76 = zext i1 %75 to i64
  %spec.select.2.1 = add nuw nsw i64 %.2.1107, %76
  br label %.preheader.split.preheader.2

.split.us.1:                                      ; preds = %.preheader.split.2.1, %.split.us
  %.us-phi.1 = phi i64 [ %.us-phi, %.split.us ], [ %.2.1107, %.preheader.split.2.1 ]
  br i1 %29, label %.preheader.split.preheader.2, label %.split.us.2

.preheader.split.preheader.2:                     ; preds = %73, %67, %.split.us.1
  %77 = phi i64 [ %28, %.split.us.1 ], [ %30, %67 ], [ %30, %73 ]
  %.us-phi.1118 = phi i64 [ %.us-phi.1, %.split.us.1 ], [ %.2.1107, %67 ], [ %spec.select.2.1, %73 ]
  %78 = load i64, ptr %1, align 8
  %.not64.2108 = icmp slt i64 %77, %78
  br i1 %.not64.2108, label %79, label %.preheader.split.1.2

79:                                               ; preds = %.preheader.split.preheader.2
  %80 = icmp ne i64 %.04586, 0
  %81 = load i64, ptr %2, align 8
  %.not65.2110 = icmp sle i64 %.04586, %81
  %or.cond73.2111 = select i1 %80, i1 %.not65.2110, i1 false
  br i1 %or.cond73.2111, label %82, label %.preheader.split.1.2

82:                                               ; preds = %79
  %83 = add nsw i64 %.04586, -1
  %84 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %77) #6
  %85 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %84, i64 noundef %83)
          to label %86 unwind label %121

86:                                               ; preds = %82
  %87 = load i8, ptr %85, align 1, !tbaa !11
  %88 = icmp eq i8 %87, 42
  %89 = zext i1 %88 to i64
  %spec.select.2112 = add nuw nsw i64 %.us-phi.1118, %89
  %.pre115 = load i64, ptr %1, align 8
  br label %.preheader.split.1.2

.preheader.split.1.2:                             ; preds = %86, %79, %.preheader.split.preheader.2
  %90 = phi i64 [ %78, %.preheader.split.preheader.2 ], [ %78, %79 ], [ %.pre115, %86 ]
  %.2.2113 = phi i64 [ %.us-phi.1118, %.preheader.split.preheader.2 ], [ %.us-phi.1118, %79 ], [ %spec.select.2112, %86 ]
  %.not64.1.2 = icmp slt i64 %77, %90
  %91 = load i64, ptr %2, align 8
  %.not65.1.2 = icmp slt i64 %.04586, %91
  %or.cond = select i1 %.not64.1.2, i1 %.not65.1.2, i1 false
  br i1 %or.cond, label %92, label %.preheader.split.2.2

92:                                               ; preds = %.preheader.split.1.2
  %93 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %77) #6
  %94 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %93, i64 noundef %.04586)
          to label %95 unwind label %121

95:                                               ; preds = %92
  %96 = load i8, ptr %94, align 1, !tbaa !11
  %97 = icmp eq i8 %96, 42
  %98 = zext i1 %97 to i64
  %spec.select.1.2 = add nuw nsw i64 %.2.2113, %98
  %.pre116 = load i64, ptr %1, align 8
  br label %.preheader.split.2.2

.preheader.split.2.2:                             ; preds = %95, %.preheader.split.1.2
  %99 = phi i64 [ %90, %.preheader.split.1.2 ], [ %.pre116, %95 ]
  %.2.1.2 = phi i64 [ %.2.2113, %.preheader.split.1.2 ], [ %spec.select.1.2, %95 ]
  %.not64.2.2 = icmp slt i64 %77, %99
  br i1 %.not64.2.2, label %100, label %.split.us.2

100:                                              ; preds = %.preheader.split.2.2
  %101 = add nuw nsw i64 %.04586, 1
  %102 = load i64, ptr %2, align 8
  %.not65.2.2 = icmp slt i64 %101, %102
  br i1 %.not65.2.2, label %103, label %.split.us.2

103:                                              ; preds = %100
  %104 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %77) #6
  %105 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %104, i64 noundef %101)
          to label %106 unwind label %121

106:                                              ; preds = %103
  %107 = load i8, ptr %105, align 1, !tbaa !11
  %108 = icmp eq i8 %107, 42
  %109 = zext i1 %108 to i64
  %spec.select.2.2 = add nuw nsw i64 %.2.1.2, %109
  br label %.split.us.2

.split.us.2:                                      ; preds = %.preheader.split.2.2, %100, %106, %.split.us.1
  %.us-phi.2 = phi i64 [ %.us-phi.1, %.split.us.1 ], [ %.2.1.2, %.preheader.split.2.2 ], [ %.2.1.2, %100 ], [ %spec.select.2.2, %106 ]
  %.not = icmp eq i64 %.044, %.us-phi.2
  br i1 %.not, label %143, label %._crit_edge

110:                                              ; preds = %.preheader.split.preheader
  %111 = icmp ne i64 %.04586, 0
  %112 = load i64, ptr %2, align 8
  %.not65 = icmp sle i64 %.04586, %112
  %or.cond73 = select i1 %111, i1 %.not65, i1 false
  br i1 %or.cond73, label %113, label %.preheader.split.1

113:                                              ; preds = %110
  %114 = add nsw i64 %.04586, -1
  %115 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %25) #6
  %116 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %115, i64 noundef %114)
          to label %117 unwind label %121

117:                                              ; preds = %113
  %118 = load i8, ptr %116, align 1, !tbaa !11
  %119 = icmp eq i8 %118, 42
  %120 = zext i1 %119 to i64
  %.pre = load i64, ptr %1, align 8
  br label %.preheader.split.1

121:                                              ; preds = %103, %92, %82, %70, %58, %136, %125, %113
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %159

.preheader.split.1:                               ; preds = %117, %110, %.preheader.split.preheader
  %123 = phi i64 [ %53, %.preheader.split.preheader ], [ %53, %110 ], [ %.pre, %117 ]
  %.2 = phi i64 [ 0, %.preheader.split.preheader ], [ 0, %110 ], [ %120, %117 ]
  %.not64.1 = icmp slt i64 %25, %123
  %124 = load i64, ptr %2, align 8
  %.not65.1 = icmp slt i64 %.04586, %124
  %or.cond121 = select i1 %.not64.1, i1 %.not65.1, i1 false
  br i1 %or.cond121, label %125, label %.preheader.split.2

125:                                              ; preds = %.preheader.split.1
  %126 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %25) #6
  %127 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %126, i64 noundef %.04586)
          to label %128 unwind label %121

128:                                              ; preds = %125
  %129 = load i8, ptr %127, align 1, !tbaa !11
  %130 = icmp eq i8 %129, 42
  %131 = zext i1 %130 to i64
  %spec.select.1 = add nuw nsw i64 %.2, %131
  %.pre114 = load i64, ptr %1, align 8
  br label %.preheader.split.2

.preheader.split.2:                               ; preds = %128, %.preheader.split.1
  %132 = phi i64 [ %123, %.preheader.split.1 ], [ %.pre114, %128 ]
  %.2.1 = phi i64 [ %.2, %.preheader.split.1 ], [ %spec.select.1, %128 ]
  %.not64.2 = icmp slt i64 %25, %132
  br i1 %.not64.2, label %133, label %.split.us

133:                                              ; preds = %.preheader.split.2
  %134 = add nuw nsw i64 %.04586, 1
  %135 = load i64, ptr %2, align 8
  %.not65.2 = icmp slt i64 %134, %135
  br i1 %.not65.2, label %136, label %.preheader.split.preheader.1

136:                                              ; preds = %133
  %137 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %25) #6
  %138 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %137, i64 noundef %134)
          to label %139 unwind label %121

139:                                              ; preds = %136
  %140 = load i8, ptr %138, align 1, !tbaa !11
  %141 = icmp eq i8 %140, 42
  %142 = zext i1 %141 to i64
  %spec.select.2 = add nuw nsw i64 %.2.1, %142
  br label %.preheader.split.preheader.1

143:                                              ; preds = %.split.us.2, %33
  %144 = add nuw nsw i64 %.04586, 1
  %145 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04793) #6
  %146 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %145) #6
  %147 = icmp ult i64 %144, %146
  br i1 %147, label %.lr.ph87.split, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %.split.us.2, %143, %.preheader74
  %.4 = phi i8 [ %.04892, %.preheader74 ], [ %.04892, %143 ], [ 0, %.split.us.2 ]
  %148 = add i64 %.04793, 1
  %149 = load i64, ptr %1, align 8, !tbaa !5
  %150 = icmp slt i64 %148, %149
  br i1 %150, label %.lr.ph94, label %._crit_edge95.loopexit, !llvm.loop !13

._crit_edge95.loopexit:                           ; preds = %.lr.ph94, %._crit_edge
  %.048.lcssa.ph = phi i8 [ %.4, %._crit_edge ], [ %.04892, %.lr.ph94 ]
  %151 = trunc nuw i8 %.048.lcssa.ph to i1
  %152 = select i1 %151, ptr @.str, ptr @.str.1
  br label %._crit_edge95

._crit_edge95:                                    ; preds = %8, %._crit_edge95.loopexit, %.preheader75
  %.048.lcssa = phi ptr [ @.str, %.preheader75 ], [ %152, %._crit_edge95.loopexit ], [ @.str, %8 ]
  %153 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.048.lcssa)
          to label %154 unwind label %157

154:                                              ; preds = %._crit_edge95
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %156 unwind label %157

156:                                              ; preds = %154
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_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 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0

157:                                              ; preds = %154, %._crit_edge95
  %158 = landingpad { ptr, i32 }
          cleanup
  br label %159

159:                                              ; preds = %157, %44, %121, %36, %20
  %.pn69 = phi { ptr, i32 } [ %21, %20 ], [ %158, %157 ], [ %37, %36 ], [ %122, %121 ], [ %45, %44 ]
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %160

160:                                              ; preds = %159, %12
  %.pn69.pn = phi { ptr, i32 } [ %.pn69, %159 ], [ %13, %12 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn69.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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; 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_EEC2EmRKS6_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; 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 nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #2 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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

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

; 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_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 = { 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 #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 = { "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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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