; LLVM IR from DionysiosB/CodeForces :: 1974D-Ingenuity2 (main)

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

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = 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::__cxx11::basic_string", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %19 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %20 = 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)
  br label %21

21:                                               ; preds = %255, %253, %0
  %22 = load i64, ptr %2, align 8, !tbaa !5
  %23 = add nsw i64 %22, -1
  store i64 %23, ptr %2, align 8, !tbaa !5
  %24 = icmp ne i64 %22, 0
  br i1 %24, label %25, label %260

25:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  %27 = 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) %4)
          to label %28 unwind label %34

28:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %86, %28
  %30 = load i64, ptr %9, align 8, !tbaa !5
  %31 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  %32 = icmp ult i64 %30, %31
  br i1 %32, label %38, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %89

34:                                               ; preds = %25
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %5, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %6, align 4
  br label %259

38:                                               ; preds = %29
  %39 = load i64, ptr %9, align 8, !tbaa !5
  %40 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %39)
          to label %41 unwind label %48

41:                                               ; preds = %38
  %42 = load i8, ptr %40, align 1, !tbaa !9
  %43 = sext i8 %42 to i32
  %44 = icmp eq i32 %43, 78
  br i1 %44, label %45, label %52

45:                                               ; preds = %41
  %46 = load i64, ptr %8, align 8, !tbaa !5
  %47 = add nsw i64 %46, 1
  store i64 %47, ptr %8, align 8, !tbaa !5
  br label %85

48:                                               ; preds = %72, %62, %52, %38
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %5, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %258

52:                                               ; preds = %41
  %53 = load i64, ptr %9, align 8, !tbaa !5
  %54 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %53)
          to label %55 unwind label %48

55:                                               ; preds = %52
  %56 = load i8, ptr %54, align 1, !tbaa !9
  %57 = sext i8 %56 to i32
  %58 = icmp eq i32 %57, 83
  br i1 %58, label %59, label %62

59:                                               ; preds = %55
  %60 = load i64, ptr %8, align 8, !tbaa !5
  %61 = add nsw i64 %60, -1
  store i64 %61, ptr %8, align 8, !tbaa !5
  br label %84

62:                                               ; preds = %55
  %63 = load i64, ptr %9, align 8, !tbaa !5
  %64 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %63)
          to label %65 unwind label %48

65:                                               ; preds = %62
  %66 = load i8, ptr %64, align 1, !tbaa !9
  %67 = sext i8 %66 to i32
  %68 = icmp eq i32 %67, 69
  br i1 %68, label %69, label %72

69:                                               ; preds = %65
  %70 = load i64, ptr %7, align 8, !tbaa !5
  %71 = add nsw i64 %70, 1
  store i64 %71, ptr %7, align 8, !tbaa !5
  br label %83

72:                                               ; preds = %65
  %73 = load i64, ptr %9, align 8, !tbaa !5
  %74 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %73)
          to label %75 unwind label %48

75:                                               ; preds = %72
  %76 = load i8, ptr %74, align 1, !tbaa !9
  %77 = sext i8 %76 to i32
  %78 = icmp eq i32 %77, 87
  br i1 %78, label %79, label %82

79:                                               ; preds = %75
  %80 = load i64, ptr %7, align 8, !tbaa !5
  %81 = add nsw i64 %80, -1
  store i64 %81, ptr %7, align 8, !tbaa !5
  br label %82

82:                                               ; preds = %79, %75
  br label %83

83:                                               ; preds = %82, %69
  br label %84

84:                                               ; preds = %83, %59
  br label %85

85:                                               ; preds = %84, %45
  br label %86

86:                                               ; preds = %85
  %87 = load i64, ptr %9, align 8, !tbaa !5
  %88 = add nsw i64 %87, 1
  store i64 %88, ptr %9, align 8, !tbaa !5
  br label %29, !llvm.loop !10

89:                                               ; preds = %33
  %90 = load i64, ptr %7, align 8, !tbaa !5
  %91 = srem i64 %90, 2
  %92 = icmp ne i64 %91, 0
  br i1 %92, label %97, label %93

93:                                               ; preds = %89
  %94 = load i64, ptr %8, align 8, !tbaa !5
  %95 = srem i64 %94, 2
  %96 = icmp ne i64 %95, 0
  br i1 %96, label %97, label %106

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

99:                                               ; preds = %97
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %101 unwind label %102

101:                                              ; preds = %99
  store i32 2, ptr %10, align 4
  br label %253, !llvm.loop !12

102:                                              ; preds = %99, %97
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %5, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %6, align 4
  br label %258

106:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %107 = load i64, ptr %7, align 8, !tbaa !5
  %108 = sdiv i64 %107, 2
  store i64 %108, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %109 = load i64, ptr %8, align 8, !tbaa !5
  %110 = sdiv i64 %109, 2
  store i64 %110, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #6
  store i8 0, ptr %13, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  store i8 0, ptr %14, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 0, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 0, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %111 unwind label %117

111:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store i64 0, ptr %18, align 8, !tbaa !5
  br label %112

112:                                              ; preds = %229, %111
  %113 = load i64, ptr %18, align 8, !tbaa !5
  %114 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  %115 = icmp ult i64 %113, %114
  br i1 %115, label %121, label %116

116:                                              ; preds = %112
  store i32 7, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %232

117:                                              ; preds = %106
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %5, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %6, align 4
  br label %257

121:                                              ; preds = %112
  %122 = load i64, ptr %18, align 8, !tbaa !5
  %123 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %122)
          to label %124 unwind label %141

124:                                              ; preds = %121
  %125 = load i8, ptr %123, align 1, !tbaa !9
  %126 = sext i8 %125 to i32
  %127 = icmp eq i32 %126, 78
  br i1 %127, label %128, label %150

128:                                              ; preds = %124
  %129 = load i8, ptr %13, align 1, !tbaa !13, !range !15, !noundef !16
  %130 = trunc i8 %129 to i1
  br i1 %130, label %131, label %135

131:                                              ; preds = %128
  %132 = load i64, ptr %16, align 8, !tbaa !5
  %133 = load i64, ptr %12, align 8, !tbaa !5
  %134 = icmp slt i64 %132, %133
  br i1 %134, label %135, label %145

135:                                              ; preds = %131, %128
  %136 = load i64, ptr %16, align 8, !tbaa !5
  %137 = add nsw i64 %136, 1
  store i64 %137, ptr %16, align 8, !tbaa !5
  %138 = load i64, ptr %18, align 8, !tbaa !5
  %139 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %138)
          to label %140 unwind label %141

140:                                              ; preds = %135
  store i8 72, ptr %139, align 1, !tbaa !9
  store i8 1, ptr %13, align 1, !tbaa !13
  br label %149

141:                                              ; preds = %220, %214, %200, %195, %189, %175, %170, %164, %150, %145, %135, %121
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %5, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %256

145:                                              ; preds = %131
  %146 = load i64, ptr %18, align 8, !tbaa !5
  %147 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %146)
          to label %148 unwind label %141

148:                                              ; preds = %145
  store i8 82, ptr %147, align 1, !tbaa !9
  store i8 1, ptr %14, align 1, !tbaa !13
  br label %149

149:                                              ; preds = %148, %140
  br label %228

150:                                              ; preds = %124
  %151 = load i64, ptr %18, align 8, !tbaa !5
  %152 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %151)
          to label %153 unwind label %141

153:                                              ; preds = %150
  %154 = load i8, ptr %152, align 1, !tbaa !9
  %155 = sext i8 %154 to i32
  %156 = icmp eq i32 %155, 83
  br i1 %156, label %157, label %175

157:                                              ; preds = %153
  %158 = load i8, ptr %13, align 1, !tbaa !13, !range !15, !noundef !16
  %159 = trunc i8 %158 to i1
  br i1 %159, label %160, label %164

160:                                              ; preds = %157
  %161 = load i64, ptr %16, align 8, !tbaa !5
  %162 = load i64, ptr %12, align 8, !tbaa !5
  %163 = icmp sgt i64 %161, %162
  br i1 %163, label %164, label %170

164:                                              ; preds = %160, %157
  %165 = load i64, ptr %16, align 8, !tbaa !5
  %166 = add nsw i64 %165, -1
  store i64 %166, ptr %16, align 8, !tbaa !5
  %167 = load i64, ptr %18, align 8, !tbaa !5
  %168 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %167)
          to label %169 unwind label %141

169:                                              ; preds = %164
  store i8 72, ptr %168, align 1, !tbaa !9
  store i8 1, ptr %13, align 1, !tbaa !13
  br label %174

170:                                              ; preds = %160
  %171 = load i64, ptr %18, align 8, !tbaa !5
  %172 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %171)
          to label %173 unwind label %141

173:                                              ; preds = %170
  store i8 82, ptr %172, align 1, !tbaa !9
  store i8 1, ptr %14, align 1, !tbaa !13
  br label %174

174:                                              ; preds = %173, %169
  br label %227

175:                                              ; preds = %153
  %176 = load i64, ptr %18, align 8, !tbaa !5
  %177 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %176)
          to label %178 unwind label %141

178:                                              ; preds = %175
  %179 = load i8, ptr %177, align 1, !tbaa !9
  %180 = sext i8 %179 to i32
  %181 = icmp eq i32 %180, 69
  br i1 %181, label %182, label %200

182:                                              ; preds = %178
  %183 = load i8, ptr %13, align 1, !tbaa !13, !range !15, !noundef !16
  %184 = trunc i8 %183 to i1
  br i1 %184, label %185, label %189

185:                                              ; preds = %182
  %186 = load i64, ptr %15, align 8, !tbaa !5
  %187 = load i64, ptr %11, align 8, !tbaa !5
  %188 = icmp slt i64 %186, %187
  br i1 %188, label %189, label %195

189:                                              ; preds = %185, %182
  %190 = load i64, ptr %15, align 8, !tbaa !5
  %191 = add nsw i64 %190, 1
  store i64 %191, ptr %15, align 8, !tbaa !5
  %192 = load i64, ptr %18, align 8, !tbaa !5
  %193 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %192)
          to label %194 unwind label %141

194:                                              ; preds = %189
  store i8 72, ptr %193, align 1, !tbaa !9
  store i8 1, ptr %13, align 1, !tbaa !13
  br label %199

195:                                              ; preds = %185
  %196 = load i64, ptr %18, align 8, !tbaa !5
  %197 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %196)
          to label %198 unwind label %141

198:                                              ; preds = %195
  store i8 82, ptr %197, align 1, !tbaa !9
  store i8 1, ptr %14, align 1, !tbaa !13
  br label %199

199:                                              ; preds = %198, %194
  br label %226

200:                                              ; preds = %178
  %201 = load i64, ptr %18, align 8, !tbaa !5
  %202 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %201)
          to label %203 unwind label %141

203:                                              ; preds = %200
  %204 = load i8, ptr %202, align 1, !tbaa !9
  %205 = sext i8 %204 to i32
  %206 = icmp eq i32 %205, 87
  br i1 %206, label %207, label %225

207:                                              ; preds = %203
  %208 = load i8, ptr %13, align 1, !tbaa !13, !range !15, !noundef !16
  %209 = trunc i8 %208 to i1
  br i1 %209, label %210, label %214

210:                                              ; preds = %207
  %211 = load i64, ptr %15, align 8, !tbaa !5
  %212 = load i64, ptr %11, align 8, !tbaa !5
  %213 = icmp sgt i64 %211, %212
  br i1 %213, label %214, label %220

214:                                              ; preds = %210, %207
  %215 = load i64, ptr %15, align 8, !tbaa !5
  %216 = add nsw i64 %215, -1
  store i64 %216, ptr %15, align 8, !tbaa !5
  %217 = load i64, ptr %18, align 8, !tbaa !5
  %218 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %217)
          to label %219 unwind label %141

219:                                              ; preds = %214
  store i8 72, ptr %218, align 1, !tbaa !9
  store i8 1, ptr %13, align 1, !tbaa !13
  br label %224

220:                                              ; preds = %210
  %221 = load i64, ptr %18, align 8, !tbaa !5
  %222 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %221)
          to label %223 unwind label %141

223:                                              ; preds = %220
  store i8 82, ptr %222, align 1, !tbaa !9
  store i8 1, ptr %14, align 1, !tbaa !13
  br label %224

224:                                              ; preds = %223, %219
  br label %225

225:                                              ; preds = %224, %203
  br label %226

226:                                              ; preds = %225, %199
  br label %227

227:                                              ; preds = %226, %174
  br label %228

228:                                              ; preds = %227, %149
  br label %229

229:                                              ; preds = %228
  %230 = load i64, ptr %18, align 8, !tbaa !5
  %231 = add nsw i64 %230, 1
  store i64 %231, ptr %18, align 8, !tbaa !5
  br label %112, !llvm.loop !17

232:                                              ; preds = %116
  %233 = load i8, ptr %13, align 1, !tbaa !13, !range !15, !noundef !16
  %234 = trunc i8 %233 to i1
  br i1 %234, label %235, label %247

235:                                              ; preds = %232
  %236 = load i8, ptr %14, align 1, !tbaa !13, !range !15, !noundef !16
  %237 = trunc i8 %236 to i1
  br i1 %237, label %238, label %247

238:                                              ; preds = %235
  %239 = 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) %17)
          to label %240 unwind label %243

240:                                              ; preds = %238
  %241 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %239, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %242 unwind label %243

242:                                              ; preds = %240
  br label %252

243:                                              ; preds = %249, %247, %240, %238
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %5, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %6, align 4
  br label %256

247:                                              ; preds = %235, %232
  %248 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %249 unwind label %243

249:                                              ; preds = %247
  %250 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %248, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %251 unwind label %243

251:                                              ; preds = %249
  br label %252

252:                                              ; preds = %251, %242
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  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 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  store i32 0, ptr %10, align 4
  br label %253

253:                                              ; preds = %252, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  %254 = load i32, ptr %10, align 4
  switch i32 %254, label %267 [
    i32 0, label %255
    i32 2, label %21
  ]

255:                                              ; preds = %253
  br label %21, !llvm.loop !12

256:                                              ; preds = %243, %141
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  br label %257

257:                                              ; preds = %256, %117
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  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 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %258

258:                                              ; preds = %257, %102, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %259

259:                                              ; preds = %258, %34
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, 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 %262

260:                                              ; preds = %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %261 = load i32, ptr %1, align 4
  ret i32 %261

262:                                              ; preds = %259
  %263 = load ptr, ptr %5, align 8
  %264 = load i32, ptr %6, align 4
  %265 = insertvalue { ptr, i32 } poison, ptr %263, 0
  %266 = insertvalue { ptr, i32 } %265, i32 %264, 1
  resume { ptr, i32 } %266

267:                                              ; preds = %253
  unreachable
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

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

; 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)) #3 align 2

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

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)) #1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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) #3 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 uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; 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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!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_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::__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] }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = 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::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %6 = 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)
  %7 = load i64, ptr %1, align 8, !tbaa !5
  %8 = add nsw i64 %7, -1
  store i64 %8, ptr %1, align 8, !tbaa !5
  %.not98 = icmp eq i64 %7, 0
  br i1 %.not98, label %._crit_edge101, label %.lr.ph100

.lr.ph100:                                        ; preds = %0, %104
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %9 = 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)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  %10 = 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) %3)
          to label %.preheader84 unwind label %14

.preheader84:                                     ; preds = %.lr.ph100
  %11 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  %.not102 = icmp eq i64 %11, 0
  br i1 %.not102, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %38, %.preheader84
  %.063.lcssa = phi i64 [ 0, %.preheader84 ], [ %.164, %38 ]
  %.061.lcssa = phi i64 [ 0, %.preheader84 ], [ %.162, %38 ]
  %12 = and i64 %.063.lcssa, 1
  %.not65 = icmp eq i64 %12, 0
  %13 = and i64 %.061.lcssa, 1
  %.not66 = icmp eq i64 %13, 0
  %or.cond = select i1 %.not65, i1 %.not66, i1 false
  br i1 %or.cond, label %48, label %42

14:                                               ; preds = %.lr.ph100
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %108

.lr.ph:                                           ; preds = %.preheader84, %38
  %.06087 = phi i64 [ %39, %38 ], [ 0, %.preheader84 ]
  %.06186 = phi i64 [ %.162, %38 ], [ 0, %.preheader84 ]
  %.06385 = phi i64 [ %.164, %38 ], [ 0, %.preheader84 ]
  %16 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %.06087)
  %17 = load i8, ptr %16, align 1, !tbaa !9
  %18 = icmp eq i8 %17, 78
  br i1 %18, label %19, label %21

19:                                               ; preds = %.lr.ph
  %20 = add nsw i64 %.06186, 1
  br label %38

21:                                               ; preds = %.lr.ph
  %22 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %.06087)
  %23 = load i8, ptr %22, align 1, !tbaa !9
  %24 = icmp eq i8 %23, 83
  br i1 %24, label %25, label %27

25:                                               ; preds = %21
  %26 = add nsw i64 %.06186, -1
  br label %38

27:                                               ; preds = %21
  %28 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %.06087)
  %29 = load i8, ptr %28, align 1, !tbaa !9
  %30 = icmp eq i8 %29, 69
  br i1 %30, label %31, label %33

31:                                               ; preds = %27
  %32 = add nsw i64 %.06385, 1
  br label %38

33:                                               ; preds = %27
  %34 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %.06087)
  %35 = load i8, ptr %34, align 1, !tbaa !9
  %36 = icmp eq i8 %35, 87
  %37 = sext i1 %36 to i64
  %spec.select = add nsw i64 %.06385, %37
  br label %38

38:                                               ; preds = %33, %19, %31, %25
  %.164 = phi i64 [ %.06385, %19 ], [ %.06385, %25 ], [ %32, %31 ], [ %spec.select, %33 ]
  %.162 = phi i64 [ %20, %19 ], [ %26, %25 ], [ %.06186, %31 ], [ %.06186, %33 ]
  %39 = add nuw nsw i64 %.06087, 1
  %40 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  %41 = icmp ult i64 %39, %40
  br i1 %41, label %.lr.ph, label %._crit_edge, !llvm.loop !10

42:                                               ; preds = %._crit_edge
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %44 unwind label %46

44:                                               ; preds = %42
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %104 unwind label %46, !llvm.loop !12

46:                                               ; preds = %44, %42
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %108

48:                                               ; preds = %._crit_edge
  %49 = ashr exact i64 %.063.lcssa, 1
  %50 = ashr exact i64 %.061.lcssa, 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %.preheader unwind label %54

.preheader:                                       ; preds = %48
  %51 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  %.not103 = icmp eq i64 %51, 0
  br i1 %.not103, label %._crit_edge95.thread, label %.lr.ph94

._crit_edge95:                                    ; preds = %92
  %52 = trunc nuw i8 %.154 to i1
  %53 = select i1 %52, i1 %.152, i1 false
  br i1 %53, label %96, label %._crit_edge95.thread

54:                                               ; preds = %48
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %107

.lr.ph94:                                         ; preds = %.preheader, %92
  %.093 = phi i64 [ %93, %92 ], [ 0, %.preheader ]
  %.04892 = phi i64 [ %.1, %92 ], [ 0, %.preheader ]
  %.04991 = phi i64 [ %.150, %92 ], [ 0, %.preheader ]
  %.05190 = phi i1 [ %.152, %92 ], [ false, %.preheader ]
  %.05389 = phi i8 [ %.154, %92 ], [ 0, %.preheader ]
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %.093)
  %57 = load i8, ptr %56, align 1, !tbaa !9
  %58 = icmp eq i8 %57, 78
  br i1 %58, label %59, label %64

59:                                               ; preds = %.lr.ph94
  %60 = trunc nuw i8 %.05389 to i1
  %61 = icmp sge i64 %.04892, %50
  %or.cond72.not = select i1 %60, i1 %61, i1 false
  br i1 %or.cond72.not, label %.sink.split, label %62

62:                                               ; preds = %59
  %63 = add nsw i64 %.04892, 1
  br label %.sink.split

64:                                               ; preds = %.lr.ph94
  %65 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %.093)
  %66 = load i8, ptr %65, align 1, !tbaa !9
  %67 = icmp eq i8 %66, 83
  br i1 %67, label %68, label %73

68:                                               ; preds = %64
  %69 = trunc nuw i8 %.05389 to i1
  %70 = icmp sle i64 %.04892, %50
  %or.cond74.not = select i1 %69, i1 %70, i1 false
  br i1 %or.cond74.not, label %.sink.split, label %71

71:                                               ; preds = %68
  %72 = add nsw i64 %.04892, -1
  br label %.sink.split

73:                                               ; preds = %64
  %74 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %.093)
  %75 = load i8, ptr %74, align 1, !tbaa !9
  %76 = icmp eq i8 %75, 69
  br i1 %76, label %77, label %82

77:                                               ; preds = %73
  %78 = trunc nuw i8 %.05389 to i1
  %79 = icmp sge i64 %.04991, %49
  %or.cond76.not = select i1 %78, i1 %79, i1 false
  br i1 %or.cond76.not, label %.sink.split, label %80

80:                                               ; preds = %77
  %81 = add nsw i64 %.04991, 1
  br label %.sink.split

82:                                               ; preds = %73
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %.093)
  %84 = load i8, ptr %83, align 1, !tbaa !9
  %85 = icmp eq i8 %84, 87
  br i1 %85, label %86, label %92

86:                                               ; preds = %82
  %87 = trunc nuw i8 %.05389 to i1
  %88 = icmp sle i64 %.04991, %49
  %or.cond78.not = select i1 %87, i1 %88, i1 false
  br i1 %or.cond78.not, label %.sink.split, label %89

89:                                               ; preds = %86
  %90 = add nsw i64 %.04991, -1
  br label %.sink.split

.sink.split:                                      ; preds = %86, %77, %68, %59, %71, %89, %80, %62
  %.sink = phi i8 [ 72, %62 ], [ 72, %80 ], [ 72, %89 ], [ 72, %71 ], [ 82, %59 ], [ 82, %68 ], [ 82, %77 ], [ 82, %86 ]
  %.154.ph = phi i8 [ 1, %62 ], [ 1, %80 ], [ 1, %89 ], [ 1, %71 ], [ %.05389, %59 ], [ %.05389, %68 ], [ %.05389, %77 ], [ %.05389, %86 ]
  %.152.ph = phi i1 [ %.05190, %62 ], [ %.05190, %80 ], [ %.05190, %89 ], [ %.05190, %71 ], [ true, %59 ], [ true, %68 ], [ true, %77 ], [ true, %86 ]
  %.150.ph = phi i64 [ %.04991, %62 ], [ %81, %80 ], [ %90, %89 ], [ %.04991, %71 ], [ %.04991, %59 ], [ %.04991, %68 ], [ %.04991, %77 ], [ %.04991, %86 ]
  %.1.ph = phi i64 [ %63, %62 ], [ %.04892, %80 ], [ %.04892, %89 ], [ %72, %71 ], [ %.04892, %59 ], [ %.04892, %68 ], [ %.04892, %77 ], [ %.04892, %86 ]
  %91 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %.093)
  store i8 %.sink, ptr %91, align 1, !tbaa !9
  br label %92

92:                                               ; preds = %.sink.split, %82
  %.154 = phi i8 [ %.05389, %82 ], [ %.154.ph, %.sink.split ]
  %.152 = phi i1 [ %.05190, %82 ], [ %.152.ph, %.sink.split ]
  %.150 = phi i64 [ %.04991, %82 ], [ %.150.ph, %.sink.split ]
  %.1 = phi i64 [ %.04892, %82 ], [ %.1.ph, %.sink.split ]
  %93 = add nuw nsw i64 %.093, 1
  %94 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  %95 = icmp ult i64 %93, %94
  br i1 %95, label %.lr.ph94, label %._crit_edge95, !llvm.loop !13

96:                                               ; preds = %._crit_edge95
  %97 = 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) %4)
          to label %.invoke unwind label %98

98:                                               ; preds = %.invoke, %._crit_edge95.thread, %96
  %99 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  br label %107

._crit_edge95.thread:                             ; preds = %.preheader, %._crit_edge95
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %.invoke unwind label %98

.invoke:                                          ; preds = %96, %._crit_edge95.thread
  %101 = phi ptr [ %100, %._crit_edge95.thread ], [ %97, %96 ]
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %103 unwind label %98

103:                                              ; preds = %.invoke
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  br label %104

104:                                              ; preds = %44, %103
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  %105 = load i64, ptr %1, align 8, !tbaa !5
  %106 = add nsw i64 %105, -1
  store i64 %106, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %105, 0
  br i1 %.not, label %._crit_edge101, label %.lr.ph100

107:                                              ; preds = %98, %54
  %.pn = phi { ptr, i32 } [ %99, %98 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  br label %108

108:                                              ; preds = %46, %107, %14
  %.pn68.pn = phi { ptr, i32 } [ %15, %14 ], [ %47, %46 ], [ %.pn, %107 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, 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 } %.pn68.pn

._crit_edge101:                                   ; preds = %104, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind 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 #4 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 #3 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 uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; 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: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass