; LLVM IR from Izaron/ACM-ICPC :: Timus Online Judge/Volume 10/1921. Chaos and Order (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" }

@_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
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca [105 x [105 x i8]], align 16
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 11025, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #6
  store i8 0, ptr %7, align 1, !tbaa !5
  %30 = load i32, ptr %5, align 4, !tbaa !9
  %31 = sub nsw i32 %30, 1
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = icmp sgt i32 %31, %33
  br i1 %34, label %35, label %37

35:                                               ; preds = %0
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %306

37:                                               ; preds = %0
  %38 = load i32, ptr %2, align 4, !tbaa !9
  %39 = icmp eq i32 %38, 1
  br i1 %39, label %43, label %40

40:                                               ; preds = %37
  %41 = load i32, ptr %3, align 4, !tbaa !9
  %42 = icmp eq i32 %41, 1
  br i1 %42, label %43, label %94

43:                                               ; preds = %40, %37
  %44 = load i32, ptr %4, align 4, !tbaa !9
  %45 = icmp eq i32 %44, 1
  br i1 %45, label %46, label %54

46:                                               ; preds = %43
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = load i32, ptr %5, align 4, !tbaa !9
  %50 = sub nsw i32 %49, 1
  %51 = icmp sgt i32 %48, %50
  br i1 %51, label %52, label %54

52:                                               ; preds = %46
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %306

54:                                               ; preds = %46, %43
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  store i8 65, ptr %9, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %57

57:                                               ; preds = %90, %54
  %58 = load i32, ptr %11, align 4, !tbaa !9
  %59 = load i32, ptr %2, align 4, !tbaa !9
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %93

62:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %85, %62
  %64 = load i32, ptr %12, align 4, !tbaa !9
  %65 = load i32, ptr %3, align 4, !tbaa !9
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %88

68:                                               ; preds = %63
  %69 = load i8, ptr %9, align 1, !tbaa !11
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %69)
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %10, align 4, !tbaa !9
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = sub nsw i32 %74, 1
  %76 = icmp sge i32 %73, %75
  br i1 %76, label %77, label %84

77:                                               ; preds = %68
  store i32 0, ptr %10, align 4, !tbaa !9
  %78 = load i8, ptr %9, align 1, !tbaa !11
  %79 = sext i8 %78 to i32
  %80 = icmp eq i32 %79, 65
  br i1 %80, label %81, label %82

81:                                               ; preds = %77
  store i8 66, ptr %9, align 1, !tbaa !11
  br label %83

82:                                               ; preds = %77
  store i8 65, ptr %9, align 1, !tbaa !11
  br label %83

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

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

85:                                               ; preds = %84
  %86 = load i32, ptr %12, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %12, align 4, !tbaa !9
  br label %63, !llvm.loop !12

88:                                               ; preds = %67
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %90

90:                                               ; preds = %88
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %11, align 4, !tbaa !9
  br label %57, !llvm.loop !14

93:                                               ; preds = %61
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  br label %306

94:                                               ; preds = %40
  %95 = load i32, ptr %4, align 4, !tbaa !9
  %96 = icmp eq i32 %95, 1
  br i1 %96, label %97, label %134

97:                                               ; preds = %94
  %98 = load i32, ptr %5, align 4, !tbaa !9
  %99 = sub nsw i32 %98, 1
  %100 = load i32, ptr %2, align 4, !tbaa !9
  %101 = icmp eq i32 %99, %100
  br i1 %101, label %102, label %132

102:                                              ; preds = %97
  %103 = load i32, ptr %5, align 4, !tbaa !9
  %104 = sub nsw i32 %103, 1
  %105 = load i32, ptr %3, align 4, !tbaa !9
  %106 = icmp eq i32 %104, %105
  br i1 %106, label %107, label %132

107:                                              ; preds = %102
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %128, %107
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = load i32, ptr %2, align 4, !tbaa !9
  %113 = icmp slt i32 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %131

115:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %123, %115
  %117 = load i32, ptr %14, align 4, !tbaa !9
  %118 = load i32, ptr %3, align 4, !tbaa !9
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %121, label %120

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

121:                                              ; preds = %116
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 65)
  br label %123

123:                                              ; preds = %121
  %124 = load i32, ptr %14, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %14, align 4, !tbaa !9
  br label %116, !llvm.loop !15

126:                                              ; preds = %120
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %128

128:                                              ; preds = %126
  %129 = load i32, ptr %13, align 4, !tbaa !9
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %13, align 4, !tbaa !9
  br label %110, !llvm.loop !16

131:                                              ; preds = %114
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %306

132:                                              ; preds = %102, %97
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %306

134:                                              ; preds = %94
  %135 = load i32, ptr %5, align 4, !tbaa !9
  %136 = icmp eq i32 %135, 2
  br i1 %136, label %137, label %180

137:                                              ; preds = %134
  %138 = load i32, ptr %4, align 4, !tbaa !9
  %139 = icmp slt i32 %138, 4
  br i1 %139, label %140, label %142

140:                                              ; preds = %137
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %306

142:                                              ; preds = %137
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %143, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %145

145:                                              ; preds = %176, %142
  %146 = load i32, ptr %15, align 4, !tbaa !9
  %147 = load i32, ptr %2, align 4, !tbaa !9
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %179

150:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  store i8 65, ptr %16, align 1, !tbaa !11
  %151 = load i32, ptr %15, align 4, !tbaa !9
  %152 = srem i32 %151, 2
  %153 = icmp eq i32 %152, 1
  br i1 %153, label %154, label %155

154:                                              ; preds = %150
  store i8 67, ptr %16, align 1, !tbaa !11
  br label %155

155:                                              ; preds = %154, %150
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %171, %155
  %157 = load i32, ptr %17, align 4, !tbaa !9
  %158 = load i32, ptr %3, align 4, !tbaa !9
  %159 = icmp slt i32 %157, %158
  br i1 %159, label %161, label %160

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

161:                                              ; preds = %156
  %162 = load i8, ptr %16, align 1, !tbaa !11
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %162)
  %164 = load i8, ptr %16, align 1, !tbaa !11
  %165 = add i8 %164, 1
  store i8 %165, ptr %16, align 1, !tbaa !11
  %166 = load i8, ptr %16, align 1, !tbaa !11
  %167 = sext i8 %166 to i32
  %168 = icmp sgt i32 %167, 68
  br i1 %168, label %169, label %170

169:                                              ; preds = %161
  store i8 65, ptr %16, align 1, !tbaa !11
  br label %170

170:                                              ; preds = %169, %161
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %17, align 4, !tbaa !9
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %17, align 4, !tbaa !9
  br label %156, !llvm.loop !17

174:                                              ; preds = %160
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  br label %176

176:                                              ; preds = %174
  %177 = load i32, ptr %15, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %15, align 4, !tbaa !9
  br label %145, !llvm.loop !18

179:                                              ; preds = %149
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %306

180:                                              ; preds = %134
  %181 = load i32, ptr %2, align 4, !tbaa !9
  %182 = load i32, ptr %3, align 4, !tbaa !9
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %184, label %185

184:                                              ; preds = %180
  store i8 1, ptr %7, align 1, !tbaa !5
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #6
  br label %185

185:                                              ; preds = %184, %180
  %186 = load i32, ptr %5, align 4, !tbaa !9
  %187 = icmp sgt i32 %186, 2
  br i1 %187, label %188, label %303

188:                                              ; preds = %185
  %189 = load i32, ptr %4, align 4, !tbaa !9
  %190 = icmp sgt i32 %189, 1
  br i1 %190, label %191, label %303

191:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %192

192:                                              ; preds = %234, %191
  %193 = load i32, ptr %18, align 4, !tbaa !9
  %194 = load i32, ptr %3, align 4, !tbaa !9
  %195 = icmp slt i32 %193, %194
  br i1 %195, label %197, label %196

196:                                              ; preds = %192
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %237

197:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  store i8 65, ptr %19, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !9
  %198 = load i32, ptr %18, align 4, !tbaa !9
  %199 = srem i32 %198, 2
  %200 = icmp eq i32 %199, 1
  br i1 %200, label %201, label %202

201:                                              ; preds = %197
  store i8 66, ptr %19, align 1, !tbaa !11
  br label %202

202:                                              ; preds = %201, %197
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %203

203:                                              ; preds = %230, %202
  %204 = load i32, ptr %21, align 4, !tbaa !9
  %205 = load i32, ptr %2, align 4, !tbaa !9
  %206 = icmp slt i32 %204, %205
  br i1 %206, label %208, label %207

207:                                              ; preds = %203
  store i32 23, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %233

208:                                              ; preds = %203
  %209 = load i32, ptr %20, align 4, !tbaa !9
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %20, align 4, !tbaa !9
  %211 = load i8, ptr %19, align 1, !tbaa !11
  %212 = load i32, ptr %21, align 4, !tbaa !9
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [105 x [105 x i8]], ptr %6, i64 0, i64 %213
  %215 = load i32, ptr %18, align 4, !tbaa !9
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [105 x i8], ptr %214, i64 0, i64 %216
  store i8 %211, ptr %217, align 1, !tbaa !11
  %218 = load i32, ptr %20, align 4, !tbaa !9
  %219 = load i32, ptr %5, align 4, !tbaa !9
  %220 = sub nsw i32 %219, 1
  %221 = icmp sge i32 %218, %220
  br i1 %221, label %222, label %229

222:                                              ; preds = %208
  store i32 0, ptr %20, align 4, !tbaa !9
  %223 = load i8, ptr %19, align 1, !tbaa !11
  %224 = sext i8 %223 to i32
  %225 = icmp eq i32 %224, 65
  br i1 %225, label %226, label %227

226:                                              ; preds = %222
  store i8 66, ptr %19, align 1, !tbaa !11
  br label %228

227:                                              ; preds = %222
  store i8 65, ptr %19, align 1, !tbaa !11
  br label %228

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

229:                                              ; preds = %228, %208
  br label %230

230:                                              ; preds = %229
  %231 = load i32, ptr %21, align 4, !tbaa !9
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %21, align 4, !tbaa !9
  br label %203, !llvm.loop !19

233:                                              ; preds = %207
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  br label %234

234:                                              ; preds = %233
  %235 = load i32, ptr %18, align 4, !tbaa !9
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %18, align 4, !tbaa !9
  br label %192, !llvm.loop !20

237:                                              ; preds = %196
  %238 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %239 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %238, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %240 = load i8, ptr %7, align 1, !tbaa !5, !range !21, !noundef !22
  %241 = trunc i8 %240 to i1
  br i1 %241, label %272, label %242

242:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %243

243:                                              ; preds = %268, %242
  %244 = load i32, ptr %22, align 4, !tbaa !9
  %245 = load i32, ptr %2, align 4, !tbaa !9
  %246 = icmp slt i32 %244, %245
  br i1 %246, label %248, label %247

247:                                              ; preds = %243
  store i32 26, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %271

248:                                              ; preds = %243
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %249

249:                                              ; preds = %263, %248
  %250 = load i32, ptr %23, align 4, !tbaa !9
  %251 = load i32, ptr %3, align 4, !tbaa !9
  %252 = icmp slt i32 %250, %251
  br i1 %252, label %254, label %253

253:                                              ; preds = %249
  store i32 29, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %266

254:                                              ; preds = %249
  %255 = load i32, ptr %22, align 4, !tbaa !9
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [105 x [105 x i8]], ptr %6, i64 0, i64 %256
  %258 = load i32, ptr %23, align 4, !tbaa !9
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [105 x i8], ptr %257, i64 0, i64 %259
  %261 = load i8, ptr %260, align 1, !tbaa !11
  %262 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %261)
  br label %263

263:                                              ; preds = %254
  %264 = load i32, ptr %23, align 4, !tbaa !9
  %265 = add nsw i32 %264, 1
  store i32 %265, ptr %23, align 4, !tbaa !9
  br label %249, !llvm.loop !23

266:                                              ; preds = %253
  %267 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %268

268:                                              ; preds = %266
  %269 = load i32, ptr %22, align 4, !tbaa !9
  %270 = add nsw i32 %269, 1
  store i32 %270, ptr %22, align 4, !tbaa !9
  br label %243, !llvm.loop !24

271:                                              ; preds = %247
  br label %302

272:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %273

273:                                              ; preds = %298, %272
  %274 = load i32, ptr %24, align 4, !tbaa !9
  %275 = load i32, ptr %3, align 4, !tbaa !9
  %276 = icmp slt i32 %274, %275
  br i1 %276, label %278, label %277

277:                                              ; preds = %273
  store i32 32, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %301

278:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %279

279:                                              ; preds = %293, %278
  %280 = load i32, ptr %25, align 4, !tbaa !9
  %281 = load i32, ptr %2, align 4, !tbaa !9
  %282 = icmp slt i32 %280, %281
  br i1 %282, label %284, label %283

283:                                              ; preds = %279
  store i32 35, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %296

284:                                              ; preds = %279
  %285 = load i32, ptr %25, align 4, !tbaa !9
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [105 x [105 x i8]], ptr %6, i64 0, i64 %286
  %288 = load i32, ptr %24, align 4, !tbaa !9
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [105 x i8], ptr %287, i64 0, i64 %289
  %291 = load i8, ptr %290, align 1, !tbaa !11
  %292 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %291)
  br label %293

293:                                              ; preds = %284
  %294 = load i32, ptr %25, align 4, !tbaa !9
  %295 = add nsw i32 %294, 1
  store i32 %295, ptr %25, align 4, !tbaa !9
  br label %279, !llvm.loop !25

296:                                              ; preds = %283
  %297 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %298

298:                                              ; preds = %296
  %299 = load i32, ptr %24, align 4, !tbaa !9
  %300 = add nsw i32 %299, 1
  store i32 %300, ptr %24, align 4, !tbaa !9
  br label %273, !llvm.loop !26

301:                                              ; preds = %277
  br label %302

302:                                              ; preds = %301, %271
  br label %305

303:                                              ; preds = %188, %185
  %304 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %305

305:                                              ; preds = %303, %302
  store i32 0, ptr %8, align 4
  br label %306

306:                                              ; preds = %305, %179, %140, %132, %131, %93, %52, %35
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 11025, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %307 = load i32, ptr %8, align 4
  switch i32 %307, label %310 [
    i32 0, label %308
    i32 1, label %308
  ]

308:                                              ; preds = %306, %306
  %309 = load i32, ptr %1, align 4
  ret i32 %309

310:                                              ; preds = %306
  unreachable
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5 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)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #4

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = distinct !{!23, !13}
!24 = distinct !{!24, !13}
!25 = distinct !{!25, !13}
!26 = distinct !{!26, !13}


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

@_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
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [105 x [105 x i8]], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 11025, ptr nonnull %5) #6
  %10 = load i32, ptr %4, align 4, !tbaa !5
  %11 = add nsw i32 %10, -1
  %12 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = icmp sgt i32 %11, %13
  br i1 %14, label %.loopexit.sink.split, label %15

15:                                               ; preds = %0
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = icmp eq i32 %16, 1
  %18 = load i32, ptr %2, align 4
  %19 = icmp eq i32 %18, 1
  %or.cond = select i1 %17, i1 true, i1 %19
  %20 = load i32, ptr %3, align 4
  %21 = icmp eq i32 %20, 1
  br i1 %or.cond, label %22, label %46

22:                                               ; preds = %15
  br i1 %21, label %23, label %27

23:                                               ; preds = %22
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %.not80 = icmp slt i32 %25, %26
  br i1 %.not80, label %27, label %.loopexit.sink.split

27:                                               ; preds = %23, %22
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %30 = load i32, ptr %1, align 4, !tbaa !5
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %27, %._crit_edge122
  %.063126 = phi i32 [ %35, %._crit_edge122 ], [ 0, %27 ]
  %.064125 = phi i32 [ %.165.lcssa, %._crit_edge122 ], [ 0, %27 ]
  %.067124 = phi i8 [ %.168.lcssa, %._crit_edge122 ], [ 65, %27 ]
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph121, label %._crit_edge122

._crit_edge122:                                   ; preds = %.lr.ph121, %.preheader
  %.168.lcssa = phi i8 [ %.067124, %.preheader ], [ %.269, %.lr.ph121 ]
  %.165.lcssa = phi i32 [ %.064125, %.preheader ], [ %.266, %.lr.ph121 ]
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %35 = add nuw nsw i32 %.063126, 1
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %.preheader, label %.loopexit, !llvm.loop !9

.lr.ph121:                                        ; preds = %.preheader, %.lr.ph121
  %.062120 = phi i32 [ %43, %.lr.ph121 ], [ 0, %.preheader ]
  %.165119 = phi i32 [ %.266, %.lr.ph121 ], [ %.064125, %.preheader ]
  %.168118 = phi i8 [ %.269, %.lr.ph121 ], [ %.067124, %.preheader ]
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %.168118)
  %39 = add nsw i32 %.165119, 1
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = add nsw i32 %40, -1
  %.not81 = icmp slt i32 %39, %41
  %42 = icmp eq i8 %.168118, 65
  %. = select i1 %42, i8 66, i8 65
  %.269 = select i1 %.not81, i8 %.168118, i8 %.
  %.266 = select i1 %.not81, i32 %39, i32 0
  %43 = add nuw nsw i32 %.062120, 1
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %.lr.ph121, label %._crit_edge122, !llvm.loop !11

46:                                               ; preds = %15
  %47 = load i32, ptr %4, align 4, !tbaa !5
  br i1 %21, label %48, label %67

48:                                               ; preds = %46
  %49 = add nsw i32 %47, -1
  %50 = icmp eq i32 %49, %16
  %51 = icmp eq i32 %49, %18
  %or.cond82 = select i1 %50, i1 %51, i1 false
  br i1 %or.cond82, label %52, label %.loopexit.sink.split

52:                                               ; preds = %48
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.preheader84, label %.loopexit

.preheader84:                                     ; preds = %52, %._crit_edge116
  %.061117 = phi i32 [ %60, %._crit_edge116 ], [ 0, %52 ]
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %.lr.ph115, label %._crit_edge116

._crit_edge116:                                   ; preds = %.lr.ph115, %.preheader84
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %60 = add nuw nsw i32 %.061117, 1
  %61 = load i32, ptr %1, align 4, !tbaa !5
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %.preheader84, label %.loopexit, !llvm.loop !12

.lr.ph115:                                        ; preds = %.preheader84, %.lr.ph115
  %.060114 = phi i32 [ %64, %.lr.ph115 ], [ 0, %.preheader84 ]
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 65)
  %64 = add nuw nsw i32 %.060114, 1
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %.lr.ph115, label %._crit_edge116, !llvm.loop !13

67:                                               ; preds = %46
  %68 = icmp eq i32 %47, 2
  br i1 %68, label %69, label %89

69:                                               ; preds = %67
  %70 = icmp slt i32 %20, 4
  br i1 %70, label %.loopexit.sink.split, label %71

71:                                               ; preds = %69
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %74 = load i32, ptr %1, align 4, !tbaa !5
  %75 = icmp sgt i32 %74, 0
  br i1 %75, label %.lr.ph113, label %.loopexit

.lr.ph113:                                        ; preds = %71, %._crit_edge110
  %.059111 = phi i32 [ %80, %._crit_edge110 ], [ 0, %71 ]
  %76 = load i32, ptr %2, align 4, !tbaa !5
  %77 = icmp sgt i32 %76, 0
  br i1 %77, label %.lr.ph109.preheader, label %._crit_edge110

.lr.ph109.preheader:                              ; preds = %.lr.ph113
  %78 = and i32 %.059111, 1
  %.not79 = icmp eq i32 %78, 0
  %spec.store.select = select i1 %.not79, i8 65, i8 67
  br label %.lr.ph109

._crit_edge110:                                   ; preds = %.lr.ph109, %.lr.ph113
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %80 = add nuw nsw i32 %.059111, 1
  %81 = load i32, ptr %1, align 4, !tbaa !5
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %.lr.ph113, label %.loopexit, !llvm.loop !14

.lr.ph109:                                        ; preds = %.lr.ph109.preheader, %.lr.ph109
  %.057107 = phi i32 [ %86, %.lr.ph109 ], [ 0, %.lr.ph109.preheader ]
  %.058106 = phi i8 [ %spec.store.select2, %.lr.ph109 ], [ %spec.store.select, %.lr.ph109.preheader ]
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %.058106)
  %84 = add i8 %.058106, 1
  %85 = icmp sgt i8 %84, 68
  %spec.store.select2 = select i1 %85, i8 65, i8 %84
  %86 = add nuw nsw i32 %.057107, 1
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = icmp slt i32 %86, %87
  br i1 %88, label %.lr.ph109, label %._crit_edge110, !llvm.loop !15

89:                                               ; preds = %67
  %90 = icmp slt i32 %16, %18
  br i1 %90, label %91, label %92

91:                                               ; preds = %89
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2) #6
  %.pre = load i32, ptr %4, align 4, !tbaa !5
  %.pre149 = load i32, ptr %3, align 4
  br label %92

92:                                               ; preds = %91, %89
  %93 = phi i32 [ %.pre149, %91 ], [ %20, %89 ]
  %94 = phi i32 [ %.pre, %91 ], [ %47, %89 ]
  %95 = icmp sgt i32 %94, 2
  %96 = icmp sgt i32 %93, 1
  %or.cond4 = select i1 %95, i1 %96, i1 false
  br i1 %or.cond4, label %.preheader93, label %.loopexit.sink.split

.preheader93:                                     ; preds = %92
  %97 = load i32, ptr %2, align 4, !tbaa !5
  %98 = icmp sgt i32 %97, 0
  br i1 %98, label %.lr.ph98, label %._crit_edge99

.lr.ph98:                                         ; preds = %.preheader93
  %99 = load i32, ptr %1, align 4, !tbaa !5
  %100 = icmp sgt i32 %99, 0
  %101 = add nsw i32 %94, -1
  br i1 %100, label %.lr.ph.us.preheader, label %._crit_edge99

.lr.ph.us.preheader:                              ; preds = %.lr.ph98
  %wide.trip.count135 = zext nneg i32 %97 to i64
  %wide.trip.count = zext nneg i32 %99 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %102 = icmp eq i32 %99, 1
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %indvars.iv132 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next133, %._crit_edge.us ]
  %103 = and i64 %indvars.iv132, 1
  %.not.us = icmp eq i64 %103, 0
  %spec.select.us = select i1 %.not.us, i8 65, i8 66
  br i1 %102, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us.new

.lr.ph.us.new:                                    ; preds = %.lr.ph.us, %.lr.ph.us.new
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph.us.new ], [ 0, %.lr.ph.us ]
  %.05395.us = phi i32 [ %.1.us.1, %.lr.ph.us.new ], [ 0, %.lr.ph.us ]
  %.15594.us = phi i8 [ %.2.us.1, %.lr.ph.us.new ], [ %spec.select.us, %.lr.ph.us ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph.us.new ], [ 0, %.lr.ph.us ]
  %104 = add nsw i32 %.05395.us, 1
  %105 = getelementptr inbounds [105 x [105 x i8]], ptr %5, i64 0, i64 %indvars.iv, i64 %indvars.iv132
  store i8 %.15594.us, ptr %105, align 1, !tbaa !16
  %.not78.us = icmp slt i32 %104, %101
  %106 = icmp eq i8 %.15594.us, 65
  %.83.us = select i1 %106, i8 66, i8 65
  %.2.us = select i1 %.not78.us, i8 %.15594.us, i8 %.83.us
  %107 = add nsw i32 %.05395.us, 2
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %108 = select i1 %.not78.us, i32 %107, i32 1
  %109 = getelementptr inbounds [105 x [105 x i8]], ptr %5, i64 0, i64 %indvars.iv.next, i64 %indvars.iv132
  store i8 %.2.us, ptr %109, align 1, !tbaa !16
  %.not78.us.1 = icmp slt i32 %108, %101
  %110 = icmp eq i8 %.2.us, 65
  %.83.us.1 = select i1 %110, i8 66, i8 65
  %.2.us.1 = select i1 %.not78.us.1, i8 %.2.us, i8 %.83.us.1
  %.1.us.1 = select i1 %.not78.us.1, i32 %108, i32 0
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us.new, !llvm.loop !17

._crit_edge.us.unr-lcssa:                         ; preds = %.lr.ph.us.new, %.lr.ph.us
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next.1, %.lr.ph.us.new ]
  %.15594.us.unr = phi i8 [ %spec.select.us, %.lr.ph.us ], [ %.2.us.1, %.lr.ph.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %111 = getelementptr inbounds [105 x [105 x i8]], ptr %5, i64 0, i64 %indvars.iv.unr, i64 %indvars.iv132
  store i8 %.15594.us.unr, ptr %111, align 1, !tbaa !16
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %exitcond136.not = icmp eq i64 %indvars.iv.next133, %wide.trip.count135
  br i1 %exitcond136.not, label %._crit_edge99, label %.lr.ph.us, !llvm.loop !18

._crit_edge99:                                    ; preds = %._crit_edge.us, %.lr.ph98, %.preheader93
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br i1 %90, label %.preheader88, label %.preheader91

.preheader91:                                     ; preds = %._crit_edge99
  %114 = load i32, ptr %1, align 4, !tbaa !5
  %115 = icmp sgt i32 %114, 0
  br i1 %115, label %.preheader90, label %.loopexit

.preheader88:                                     ; preds = %._crit_edge99
  %116 = load i32, ptr %2, align 4, !tbaa !5
  %117 = icmp sgt i32 %116, 0
  br i1 %117, label %.preheader87, label %.loopexit

.preheader90:                                     ; preds = %.preheader91, %._crit_edge
  %indvars.iv140 = phi i64 [ %indvars.iv.next141, %._crit_edge ], [ 0, %.preheader91 ]
  %118 = load i32, ptr %2, align 4, !tbaa !5
  %119 = icmp sgt i32 %118, 0
  br i1 %119, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.preheader90
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %121 = load i32, ptr %1, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = icmp slt i64 %indvars.iv.next141, %122
  br i1 %123, label %.preheader90, label %.loopexit, !llvm.loop !19

.lr.ph:                                           ; preds = %.preheader90, %.lr.ph
  %indvars.iv137 = phi i64 [ %indvars.iv.next138, %.lr.ph ], [ 0, %.preheader90 ]
  %124 = getelementptr inbounds [105 x [105 x i8]], ptr %5, i64 0, i64 %indvars.iv140, i64 %indvars.iv137
  %125 = load i8, ptr %124, align 1, !tbaa !16
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %125)
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %127 = load i32, ptr %2, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = icmp slt i64 %indvars.iv.next138, %128
  br i1 %129, label %.lr.ph, label %._crit_edge, !llvm.loop !20

.preheader87:                                     ; preds = %.preheader88, %._crit_edge104
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %._crit_edge104 ], [ 0, %.preheader88 ]
  %130 = load i32, ptr %1, align 4, !tbaa !5
  %131 = icmp sgt i32 %130, 0
  br i1 %131, label %.lr.ph103, label %._crit_edge104

._crit_edge104:                                   ; preds = %.lr.ph103, %.preheader87
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %133 = load i32, ptr %2, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = icmp slt i64 %indvars.iv.next147, %134
  br i1 %135, label %.preheader87, label %.loopexit, !llvm.loop !21

.lr.ph103:                                        ; preds = %.preheader87, %.lr.ph103
  %indvars.iv143 = phi i64 [ %indvars.iv.next144, %.lr.ph103 ], [ 0, %.preheader87 ]
  %136 = getelementptr inbounds [105 x [105 x i8]], ptr %5, i64 0, i64 %indvars.iv143, i64 %indvars.iv146
  %137 = load i8, ptr %136, align 1, !tbaa !16
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %137)
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %139 = load i32, ptr %1, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = icmp slt i64 %indvars.iv.next144, %140
  br i1 %141, label %.lr.ph103, label %._crit_edge104, !llvm.loop !22

.loopexit.sink.split:                             ; preds = %92, %69, %48, %23, %0
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge, %._crit_edge104, %._crit_edge110, %._crit_edge116, %._crit_edge122, %.loopexit.sink.split, %.preheader91, %.preheader88, %71, %52, %27
  call void @llvm.lifetime.end.p0(i64 11025, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #4

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

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

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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


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