; LLVM IR from eyangch/competitive-programming :: FacebookHackercup/2022/round2/a1 (a1)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::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" }

@T = external dso_local global i64, align 8
@Q = external dso_local global i64, align 8
@pf = external dso_local global [26 x [1000001 x i64]], align 16
@ls = external dso_local global [26 x i64], align 16
@rs = external dso_local global [26 x i64], align 16
@_Z1SB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [105 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %19 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %21
  %23 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef null)
  %24 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 1, ptr %2, align 8, !tbaa !8
  br label %26

26:                                               ; preds = %294, %0
  %27 = load i64, ptr %2, align 8, !tbaa !8
  %28 = load i64, ptr @T, align 8, !tbaa !8
  %29 = icmp sle i64 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %297

31:                                               ; preds = %26
  %32 = call 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) @_Z1SB5cxx11)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(8) @Q)
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %35 = load i64, ptr %2, align 8, !tbaa !8
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %34, i64 noundef %35)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef @.str.2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 0, ptr %4, align 8, !tbaa !8
  br label %38

38:                                               ; preds = %57, %31
  %39 = load i64, ptr %4, align 8, !tbaa !8
  %40 = icmp slt i64 %39, 26
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %60

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 0, ptr %5, align 8, !tbaa !8
  br label %43

43:                                               ; preds = %53, %42
  %44 = load i64, ptr %5, align 8, !tbaa !8
  %45 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #7
  %46 = icmp ult i64 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %56

48:                                               ; preds = %43
  %49 = load i64, ptr %4, align 8, !tbaa !8
  %50 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %49
  %51 = load i64, ptr %5, align 8, !tbaa !8
  %52 = getelementptr inbounds [1000001 x i64], ptr %50, i64 0, i64 %51
  store i64 0, ptr %52, align 8, !tbaa !8
  br label %53

53:                                               ; preds = %48
  %54 = load i64, ptr %5, align 8, !tbaa !8
  %55 = add nsw i64 %54, 1
  store i64 %55, ptr %5, align 8, !tbaa !8
  br label %43, !llvm.loop !11

56:                                               ; preds = %47
  br label %57

57:                                               ; preds = %56
  %58 = load i64, ptr %4, align 8, !tbaa !8
  %59 = add nsw i64 %58, 1
  store i64 %59, ptr %4, align 8, !tbaa !8
  br label %38, !llvm.loop !13

60:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !8
  br label %61

61:                                               ; preds = %101, %60
  %62 = load i64, ptr %6, align 8, !tbaa !8
  %63 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #7
  %64 = icmp ult i64 %62, %63
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %61
  %67 = load i64, ptr %6, align 8, !tbaa !8
  %68 = icmp sgt i64 %67, 0
  br i1 %68, label %69, label %89

69:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !8
  br label %70

70:                                               ; preds = %85, %69
  %71 = load i64, ptr %7, align 8, !tbaa !8
  %72 = icmp slt i64 %71, 26
  br i1 %72, label %74, label %73

73:                                               ; preds = %70
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %88

74:                                               ; preds = %70
  %75 = load i64, ptr %7, align 8, !tbaa !8
  %76 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %75
  %77 = load i64, ptr %6, align 8, !tbaa !8
  %78 = sub nsw i64 %77, 1
  %79 = getelementptr inbounds [1000001 x i64], ptr %76, i64 0, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !8
  %81 = load i64, ptr %7, align 8, !tbaa !8
  %82 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %81
  %83 = load i64, ptr %6, align 8, !tbaa !8
  %84 = getelementptr inbounds [1000001 x i64], ptr %82, i64 0, i64 %83
  store i64 %80, ptr %84, align 8, !tbaa !8
  br label %85

85:                                               ; preds = %74
  %86 = load i64, ptr %7, align 8, !tbaa !8
  %87 = add nsw i64 %86, 1
  store i64 %87, ptr %7, align 8, !tbaa !8
  br label %70, !llvm.loop !14

88:                                               ; preds = %73
  br label %89

89:                                               ; preds = %88, %66
  %90 = load i64, ptr %6, align 8, !tbaa !8
  %91 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef %90)
  %92 = load i8, ptr %91, align 1, !tbaa !15
  %93 = sext i8 %92 to i32
  %94 = sub nsw i32 %93, 97
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %95
  %97 = load i64, ptr %6, align 8, !tbaa !8
  %98 = getelementptr inbounds [1000001 x i64], ptr %96, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !8
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %98, align 8, !tbaa !8
  br label %101

101:                                              ; preds = %89
  %102 = load i64, ptr %6, align 8, !tbaa !8
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %6, align 8, !tbaa !8
  br label %61, !llvm.loop !16

104:                                              ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !8
  br label %105

105:                                              ; preds = %289, %287, %104
  %106 = load i64, ptr @Q, align 8, !tbaa !8
  %107 = add nsw i64 %106, -1
  store i64 %107, ptr @Q, align 8, !tbaa !8
  %108 = icmp ne i64 %106, 0
  br i1 %108, label %109, label %290

109:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %110 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %111 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %110, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %112 = load i64, ptr %9, align 8, !tbaa !8
  %113 = add nsw i64 %112, -1
  store i64 %113, ptr %9, align 8, !tbaa !8
  %114 = load i64, ptr %10, align 8, !tbaa !8
  %115 = add nsw i64 %114, -1
  store i64 %115, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %116 = load i64, ptr %10, align 8, !tbaa !8
  %117 = load i64, ptr %9, align 8, !tbaa !8
  %118 = sub nsw i64 %116, %117
  %119 = add nsw i64 %118, 1
  store i64 %119, ptr %11, align 8, !tbaa !8
  %120 = load i64, ptr %11, align 8, !tbaa !8
  %121 = srem i64 %120, 2
  %122 = icmp eq i64 %121, 0
  br i1 %122, label %123, label %124

123:                                              ; preds = %109
  store i32 17, ptr %3, align 4
  br label %287, !llvm.loop !17

124:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !18
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @ls, ptr noundef getelementptr inbounds (i64, ptr @ls, i64 26), ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !18
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @rs, ptr noundef getelementptr inbounds (i64, ptr @rs, i64 26), ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 0, ptr %16, align 8, !tbaa !8
  br label %125

125:                                              ; preds = %262, %124
  %126 = load i64, ptr %16, align 8, !tbaa !8
  %127 = icmp slt i64 %126, 26
  br i1 %127, label %129, label %128

128:                                              ; preds = %125
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %265

129:                                              ; preds = %125
  %130 = load i64, ptr %16, align 8, !tbaa !8
  %131 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %130
  %132 = load i64, ptr %9, align 8, !tbaa !8
  %133 = load i64, ptr %11, align 8, !tbaa !8
  %134 = sdiv i64 %133, 2
  %135 = add nsw i64 %132, %134
  %136 = getelementptr inbounds [1000001 x i64], ptr %131, i64 0, i64 %135
  %137 = load i64, ptr %136, align 8, !tbaa !8
  %138 = load i64, ptr %16, align 8, !tbaa !8
  %139 = getelementptr inbounds [26 x i64], ptr @ls, i64 0, i64 %138
  store i64 %137, ptr %139, align 8, !tbaa !8
  %140 = load i64, ptr %9, align 8, !tbaa !8
  %141 = icmp sgt i64 %140, 0
  br i1 %141, label %142, label %153

142:                                              ; preds = %129
  %143 = load i64, ptr %16, align 8, !tbaa !8
  %144 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %143
  %145 = load i64, ptr %9, align 8, !tbaa !8
  %146 = sub nsw i64 %145, 1
  %147 = getelementptr inbounds [1000001 x i64], ptr %144, i64 0, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !8
  %149 = load i64, ptr %16, align 8, !tbaa !8
  %150 = getelementptr inbounds [26 x i64], ptr @ls, i64 0, i64 %149
  %151 = load i64, ptr %150, align 8, !tbaa !8
  %152 = sub nsw i64 %151, %148
  store i64 %152, ptr %150, align 8, !tbaa !8
  br label %153

153:                                              ; preds = %142, %129
  %154 = load i64, ptr %16, align 8, !tbaa !8
  %155 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %154
  %156 = load i64, ptr %10, align 8, !tbaa !8
  %157 = getelementptr inbounds [1000001 x i64], ptr %155, i64 0, i64 %156
  %158 = load i64, ptr %157, align 8, !tbaa !8
  %159 = load i64, ptr %16, align 8, !tbaa !8
  %160 = getelementptr inbounds [26 x i64], ptr @rs, i64 0, i64 %159
  store i64 %158, ptr %160, align 8, !tbaa !8
  %161 = load i64, ptr %16, align 8, !tbaa !8
  %162 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %161
  %163 = load i64, ptr %9, align 8, !tbaa !8
  %164 = load i64, ptr %11, align 8, !tbaa !8
  %165 = sdiv i64 %164, 2
  %166 = add nsw i64 %163, %165
  %167 = getelementptr inbounds [1000001 x i64], ptr %162, i64 0, i64 %166
  %168 = load i64, ptr %167, align 8, !tbaa !8
  %169 = load i64, ptr %16, align 8, !tbaa !8
  %170 = getelementptr inbounds [26 x i64], ptr @rs, i64 0, i64 %169
  %171 = load i64, ptr %170, align 8, !tbaa !8
  %172 = sub nsw i64 %171, %168
  store i64 %172, ptr %170, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store i64 0, ptr %17, align 8, !tbaa !8
  %173 = load i64, ptr %9, align 8, !tbaa !8
  %174 = load i64, ptr %11, align 8, !tbaa !8
  %175 = sdiv i64 %174, 2
  %176 = add nsw i64 %173, %175
  %177 = icmp sgt i64 %176, 0
  br i1 %177, label %178, label %188

178:                                              ; preds = %153
  %179 = load i64, ptr %16, align 8, !tbaa !8
  %180 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %179
  %181 = load i64, ptr %9, align 8, !tbaa !8
  %182 = load i64, ptr %11, align 8, !tbaa !8
  %183 = sdiv i64 %182, 2
  %184 = add nsw i64 %181, %183
  %185 = sub nsw i64 %184, 1
  %186 = getelementptr inbounds [1000001 x i64], ptr %180, i64 0, i64 %185
  %187 = load i64, ptr %186, align 8, !tbaa !8
  store i64 %187, ptr %17, align 8, !tbaa !8
  br label %188

188:                                              ; preds = %178, %153
  %189 = load i64, ptr %9, align 8, !tbaa !8
  %190 = icmp sgt i64 %189, 0
  br i1 %190, label %191, label %200

191:                                              ; preds = %188
  %192 = load i64, ptr %16, align 8, !tbaa !8
  %193 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %192
  %194 = load i64, ptr %9, align 8, !tbaa !8
  %195 = sub nsw i64 %194, 1
  %196 = getelementptr inbounds [1000001 x i64], ptr %193, i64 0, i64 %195
  %197 = load i64, ptr %196, align 8, !tbaa !8
  %198 = load i64, ptr %17, align 8, !tbaa !8
  %199 = sub nsw i64 %198, %197
  store i64 %199, ptr %17, align 8, !tbaa !8
  br label %200

200:                                              ; preds = %191, %188
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %201 = load i64, ptr %16, align 8, !tbaa !8
  %202 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %201
  %203 = load i64, ptr %10, align 8, !tbaa !8
  %204 = getelementptr inbounds [1000001 x i64], ptr %202, i64 0, i64 %203
  %205 = load i64, ptr %204, align 8, !tbaa !8
  store i64 %205, ptr %18, align 8, !tbaa !8
  %206 = load i64, ptr %9, align 8, !tbaa !8
  %207 = load i64, ptr %11, align 8, !tbaa !8
  %208 = sdiv i64 %207, 2
  %209 = add nsw i64 %206, %208
  %210 = icmp sgt i64 %209, 0
  br i1 %210, label %211, label %223

211:                                              ; preds = %200
  %212 = load i64, ptr %16, align 8, !tbaa !8
  %213 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %212
  %214 = load i64, ptr %9, align 8, !tbaa !8
  %215 = load i64, ptr %11, align 8, !tbaa !8
  %216 = sdiv i64 %215, 2
  %217 = add nsw i64 %214, %216
  %218 = sub nsw i64 %217, 1
  %219 = getelementptr inbounds [1000001 x i64], ptr %213, i64 0, i64 %218
  %220 = load i64, ptr %219, align 8, !tbaa !8
  %221 = load i64, ptr %18, align 8, !tbaa !8
  %222 = sub nsw i64 %221, %220
  store i64 %222, ptr %18, align 8, !tbaa !8
  br label %223

223:                                              ; preds = %211, %200
  %224 = load i64, ptr %16, align 8, !tbaa !8
  %225 = getelementptr inbounds [26 x i64], ptr @ls, i64 0, i64 %224
  %226 = load i64, ptr %225, align 8, !tbaa !8
  %227 = load i64, ptr %16, align 8, !tbaa !8
  %228 = getelementptr inbounds [26 x i64], ptr @rs, i64 0, i64 %227
  %229 = load i64, ptr %228, align 8, !tbaa !8
  %230 = sub nsw i64 %226, %229
  %231 = icmp eq i64 %230, 1
  br i1 %231, label %232, label %235

232:                                              ; preds = %223
  %233 = load i64, ptr %14, align 8, !tbaa !8
  %234 = add nsw i64 %233, 1
  store i64 %234, ptr %14, align 8, !tbaa !8
  br label %246

235:                                              ; preds = %223
  %236 = load i64, ptr %16, align 8, !tbaa !8
  %237 = getelementptr inbounds [26 x i64], ptr @rs, i64 0, i64 %236
  %238 = load i64, ptr %237, align 8, !tbaa !8
  %239 = load i64, ptr %16, align 8, !tbaa !8
  %240 = getelementptr inbounds [26 x i64], ptr @ls, i64 0, i64 %239
  %241 = load i64, ptr %240, align 8, !tbaa !8
  %242 = icmp eq i64 %238, %241
  br i1 %242, label %243, label %244

243:                                              ; preds = %235
  br label %245

244:                                              ; preds = %235
  store i64 10, ptr %14, align 8, !tbaa !8
  br label %245

245:                                              ; preds = %244, %243
  br label %246

246:                                              ; preds = %245, %232
  %247 = load i64, ptr %18, align 8, !tbaa !8
  %248 = load i64, ptr %17, align 8, !tbaa !8
  %249 = sub nsw i64 %247, %248
  %250 = icmp eq i64 %249, 1
  br i1 %250, label %251, label %254

251:                                              ; preds = %246
  %252 = load i64, ptr %15, align 8, !tbaa !8
  %253 = add nsw i64 %252, 1
  store i64 %253, ptr %15, align 8, !tbaa !8
  br label %261

254:                                              ; preds = %246
  %255 = load i64, ptr %18, align 8, !tbaa !8
  %256 = load i64, ptr %17, align 8, !tbaa !8
  %257 = icmp eq i64 %255, %256
  br i1 %257, label %258, label %259

258:                                              ; preds = %254
  br label %260

259:                                              ; preds = %254
  store i64 10, ptr %15, align 8, !tbaa !8
  br label %260

260:                                              ; preds = %259, %258
  br label %261

261:                                              ; preds = %260, %251
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %262

262:                                              ; preds = %261
  %263 = load i64, ptr %16, align 8, !tbaa !8
  %264 = add nsw i64 %263, 1
  store i64 %264, ptr %16, align 8, !tbaa !8
  br label %125, !llvm.loop !20

265:                                              ; preds = %128
  %266 = load i64, ptr %14, align 8, !tbaa !8
  %267 = icmp ne i64 %266, 0
  br i1 %267, label %268, label %269

268:                                              ; preds = %265
  br label %271

269:                                              ; preds = %265
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 68, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

270:                                              ; No predecessors!
  br label %271

271:                                              ; preds = %270, %268
  %272 = load i64, ptr %15, align 8, !tbaa !8
  %273 = icmp ne i64 %272, 0
  br i1 %273, label %274, label %275

274:                                              ; preds = %271
  br label %277

275:                                              ; preds = %271
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.4, i32 noundef 69, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

276:                                              ; No predecessors!
  br label %277

277:                                              ; preds = %276, %274
  %278 = load i64, ptr %14, align 8, !tbaa !8
  %279 = icmp eq i64 %278, 1
  br i1 %279, label %283, label %280

280:                                              ; preds = %277
  %281 = load i64, ptr %15, align 8, !tbaa !8
  %282 = icmp eq i64 %281, 1
  br i1 %282, label %283, label %286

283:                                              ; preds = %280, %277
  %284 = load i64, ptr %8, align 8, !tbaa !8
  %285 = add nsw i64 %284, 1
  store i64 %285, ptr %8, align 8, !tbaa !8
  br label %286

286:                                              ; preds = %283, %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  store i32 0, ptr %3, align 4
  br label %287

287:                                              ; preds = %286, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %288 = load i32, ptr %3, align 4
  switch i32 %288, label %299 [
    i32 0, label %289
    i32 17, label %105
  ]

289:                                              ; preds = %287
  br label %105, !llvm.loop !17

290:                                              ; preds = %105
  %291 = load i64, ptr %8, align 8, !tbaa !8
  %292 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %291)
  %293 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %292, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %294

294:                                              ; preds = %290
  %295 = load i64, ptr %2, align 8, !tbaa !8
  %296 = add nsw i64 %295, 1
  store i64 %296, ptr %2, align 8, !tbaa !8
  br label %26, !llvm.loop !21

297:                                              ; preds = %30
  %298 = load i32, ptr %1, align 4
  ret i32 %298

299:                                              ; preds = %287
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #1 align 2

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

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

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

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)) #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 @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

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

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


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::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" }

@T = external dso_local global i64, align 8
@Q = external dso_local global i64, align 8
@pf = external dso_local local_unnamed_addr global [26 x [1000001 x i64]], align 16
@ls = external dso_local global [26 x i64], align 16
@rs = external dso_local global [26 x i64], align 16
@_Z1SB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [105 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  %10 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %12 = load i64, ptr @T, align 8, !tbaa !8
  %.not105 = icmp slt i64 %12, 1
  br i1 %.not105, label %._crit_edge109, label %.lr.ph108

._crit_edge109:                                   ; preds = %._crit_edge104, %0
  ret i32 0

.lr.ph108:                                        ; preds = %0, %._crit_edge104
  %.067106 = phi i64 [ %201, %._crit_edge104 ], [ 1, %0 ]
  %13 = call 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) @_Z1SB5cxx11)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) @Q)
  %15 = 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)
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %15, i64 noundef %.067106)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @.str.2)
  br label %.preheader85

.preheader87:                                     ; preds = %._crit_edge
  %18 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #7
  %.not111 = icmp eq i64 %18, 0
  br i1 %.not111, label %.preheader86, label %.loopexit.peel

.loopexit.peel:                                   ; preds = %.preheader87
  %19 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef 0)
  %20 = load i8, ptr %19, align 1, !tbaa !11
  %21 = sext i8 %20 to i64
  %22 = add nsw i64 %21, -97
  %23 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %22, i64 0
  %24 = load i64, ptr %23, align 8, !tbaa !8
  %25 = add nsw i64 %24, 1
  store i64 %25, ptr %23, align 8, !tbaa !8
  %26 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #7
  %27 = icmp ugt i64 %26, 1
  br i1 %27, label %.loopexit, label %.preheader86

.preheader85:                                     ; preds = %.lr.ph108, %._crit_edge
  %.07391 = phi i64 [ 0, %.lr.ph108 ], [ %29, %._crit_edge ]
  %28 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #7
  %.not110 = icmp eq i64 %28, 0
  br i1 %.not110, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.preheader85
  %29 = add nuw nsw i64 %.07391, 1
  %exitcond.not = icmp eq i64 %29, 26
  br i1 %exitcond.not, label %.preheader87, label %.preheader85, !llvm.loop !12

.lr.ph:                                           ; preds = %.preheader85, %.lr.ph
  %.07290 = phi i64 [ %31, %.lr.ph ], [ 0, %.preheader85 ]
  %30 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %.07391, i64 %.07290
  store i64 0, ptr %30, align 8, !tbaa !8
  %31 = add nuw nsw i64 %.07290, 1
  %32 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #7
  %33 = icmp ult i64 %31, %32
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !14

.preheader86:                                     ; preds = %.loopexit, %.loopexit.peel, %.preheader87
  %34 = load i64, ptr @Q, align 8, !tbaa !8
  %35 = add nsw i64 %34, -1
  store i64 %35, ptr @Q, align 8, !tbaa !8
  %.not78101 = icmp eq i64 %34, 0
  br i1 %.not78101, label %._crit_edge104, label %.lr.ph103

.loopexit:                                        ; preds = %.loopexit.peel, %.loopexit
  %.07193 = phi i64 [ %122, %.loopexit ], [ 1, %.loopexit.peel ]
  %36 = add nsw i64 %.07193, -1
  %37 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 0, i64 %36
  %38 = load i64, ptr %37, align 8, !tbaa !8
  %39 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 0, i64 %.07193
  store i64 %38, ptr %39, align 8, !tbaa !8
  %40 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 1, i64 %36
  %41 = load i64, ptr %40, align 8, !tbaa !8
  %42 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 1, i64 %.07193
  store i64 %41, ptr %42, align 8, !tbaa !8
  %43 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 2, i64 %36
  %44 = load i64, ptr %43, align 8, !tbaa !8
  %45 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 2, i64 %.07193
  store i64 %44, ptr %45, align 8, !tbaa !8
  %46 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 3, i64 %36
  %47 = load i64, ptr %46, align 8, !tbaa !8
  %48 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 3, i64 %.07193
  store i64 %47, ptr %48, align 8, !tbaa !8
  %49 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 4, i64 %36
  %50 = load i64, ptr %49, align 8, !tbaa !8
  %51 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 4, i64 %.07193
  store i64 %50, ptr %51, align 8, !tbaa !8
  %52 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 5, i64 %36
  %53 = load i64, ptr %52, align 8, !tbaa !8
  %54 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 5, i64 %.07193
  store i64 %53, ptr %54, align 8, !tbaa !8
  %55 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 6, i64 %36
  %56 = load i64, ptr %55, align 8, !tbaa !8
  %57 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 6, i64 %.07193
  store i64 %56, ptr %57, align 8, !tbaa !8
  %58 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 7, i64 %36
  %59 = load i64, ptr %58, align 8, !tbaa !8
  %60 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 7, i64 %.07193
  store i64 %59, ptr %60, align 8, !tbaa !8
  %61 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 8, i64 %36
  %62 = load i64, ptr %61, align 8, !tbaa !8
  %63 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 8, i64 %.07193
  store i64 %62, ptr %63, align 8, !tbaa !8
  %64 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 9, i64 %36
  %65 = load i64, ptr %64, align 8, !tbaa !8
  %66 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 9, i64 %.07193
  store i64 %65, ptr %66, align 8, !tbaa !8
  %67 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 10, i64 %36
  %68 = load i64, ptr %67, align 8, !tbaa !8
  %69 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 10, i64 %.07193
  store i64 %68, ptr %69, align 8, !tbaa !8
  %70 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 11, i64 %36
  %71 = load i64, ptr %70, align 8, !tbaa !8
  %72 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 11, i64 %.07193
  store i64 %71, ptr %72, align 8, !tbaa !8
  %73 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 12, i64 %36
  %74 = load i64, ptr %73, align 8, !tbaa !8
  %75 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 12, i64 %.07193
  store i64 %74, ptr %75, align 8, !tbaa !8
  %76 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 13, i64 %36
  %77 = load i64, ptr %76, align 8, !tbaa !8
  %78 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 13, i64 %.07193
  store i64 %77, ptr %78, align 8, !tbaa !8
  %79 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 14, i64 %36
  %80 = load i64, ptr %79, align 8, !tbaa !8
  %81 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 14, i64 %.07193
  store i64 %80, ptr %81, align 8, !tbaa !8
  %82 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 15, i64 %36
  %83 = load i64, ptr %82, align 8, !tbaa !8
  %84 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 15, i64 %.07193
  store i64 %83, ptr %84, align 8, !tbaa !8
  %85 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 16, i64 %36
  %86 = load i64, ptr %85, align 8, !tbaa !8
  %87 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 16, i64 %.07193
  store i64 %86, ptr %87, align 8, !tbaa !8
  %88 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 17, i64 %36
  %89 = load i64, ptr %88, align 8, !tbaa !8
  %90 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 17, i64 %.07193
  store i64 %89, ptr %90, align 8, !tbaa !8
  %91 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 18, i64 %36
  %92 = load i64, ptr %91, align 8, !tbaa !8
  %93 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 18, i64 %.07193
  store i64 %92, ptr %93, align 8, !tbaa !8
  %94 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 19, i64 %36
  %95 = load i64, ptr %94, align 8, !tbaa !8
  %96 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 19, i64 %.07193
  store i64 %95, ptr %96, align 8, !tbaa !8
  %97 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 20, i64 %36
  %98 = load i64, ptr %97, align 8, !tbaa !8
  %99 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 20, i64 %.07193
  store i64 %98, ptr %99, align 8, !tbaa !8
  %100 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 21, i64 %36
  %101 = load i64, ptr %100, align 8, !tbaa !8
  %102 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 21, i64 %.07193
  store i64 %101, ptr %102, align 8, !tbaa !8
  %103 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 22, i64 %36
  %104 = load i64, ptr %103, align 8, !tbaa !8
  %105 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 22, i64 %.07193
  store i64 %104, ptr %105, align 8, !tbaa !8
  %106 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 23, i64 %36
  %107 = load i64, ptr %106, align 8, !tbaa !8
  %108 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 23, i64 %.07193
  store i64 %107, ptr %108, align 8, !tbaa !8
  %109 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 24, i64 %36
  %110 = load i64, ptr %109, align 8, !tbaa !8
  %111 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 24, i64 %.07193
  store i64 %110, ptr %111, align 8, !tbaa !8
  %112 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 25, i64 %36
  %113 = load i64, ptr %112, align 8, !tbaa !8
  %114 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 25, i64 %.07193
  store i64 %113, ptr %114, align 8, !tbaa !8
  %115 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11, i64 noundef %.07193)
  %116 = load i8, ptr %115, align 1, !tbaa !11
  %117 = sext i8 %116 to i64
  %118 = add nsw i64 %117, -97
  %119 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %118, i64 %.07193
  %120 = load i64, ptr %119, align 8, !tbaa !8
  %121 = add nsw i64 %120, 1
  store i64 %121, ptr %119, align 8, !tbaa !8
  %122 = add nuw nsw i64 %.07193, 1
  %123 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1SB5cxx11) #7
  %124 = icmp ult i64 %122, %123
  br i1 %124, label %.loopexit, label %.preheader86, !llvm.loop !15

.lr.ph103:                                        ; preds = %.preheader86, %196
  %.068102 = phi i64 [ %.2, %196 ], [ 0, %.preheader86 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %125 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %126 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %125, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %127 = load i64, ptr %1, align 8, !tbaa !8
  %128 = add nsw i64 %127, -1
  store i64 %128, ptr %1, align 8, !tbaa !8
  %129 = load i64, ptr %2, align 8, !tbaa !8
  %130 = add nsw i64 %129, -1
  store i64 %130, ptr %2, align 8, !tbaa !8
  %131 = sub i64 %129, %127
  %132 = and i64 %131, 1
  %.not79 = icmp eq i64 %132, 0
  br i1 %.not79, label %133, label %196, !llvm.loop !17

133:                                              ; preds = %.lr.ph103
  %134 = or disjoint i64 %131, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 0, ptr %3, align 4, !tbaa !18
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @ls, ptr noundef nonnull getelementptr inbounds (i8, ptr @ls, i64 208), ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 0, ptr %4, align 4, !tbaa !18
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @rs, ptr noundef nonnull getelementptr inbounds (i8, ptr @rs, i64 208), ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %135 = load i64, ptr %1, align 8, !tbaa !8
  %136 = sdiv i64 %134, 2
  %137 = add nsw i64 %135, %136
  %138 = icmp sgt i64 %135, 0
  %139 = load i64, ptr %2, align 8, !tbaa !8
  %140 = icmp sgt i64 %137, 0
  %141 = add nsw i64 %135, -1
  %142 = add nsw i64 %137, -1
  br i1 %138, label %.split.us, label %.split

.split.us:                                        ; preds = %133, %157
  %.06297.us = phi i64 [ %167, %157 ], [ 0, %133 ]
  %.06396.us = phi i64 [ %.164.us, %157 ], [ 0, %133 ]
  %.06595.us = phi i64 [ %.166.us, %157 ], [ 0, %133 ]
  %143 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %.06297.us, i64 %137
  %144 = load i64, ptr %143, align 8, !tbaa !8
  %145 = getelementptr inbounds [26 x i64], ptr @ls, i64 0, i64 %.06297.us
  %146 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %.06297.us, i64 %141
  %147 = load i64, ptr %146, align 8, !tbaa !8
  %148 = sub nsw i64 %144, %147
  store i64 %148, ptr %145, align 8, !tbaa !8
  %149 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %.06297.us, i64 %139
  %150 = load i64, ptr %149, align 8, !tbaa !8
  %151 = getelementptr inbounds [26 x i64], ptr @rs, i64 0, i64 %.06297.us
  %152 = sub nsw i64 %150, %144
  store i64 %152, ptr %151, align 8, !tbaa !8
  br i1 %140, label %153, label %157

153:                                              ; preds = %.split.us
  %154 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %.06297.us, i64 %142
  %155 = load i64, ptr %154, align 8, !tbaa !8
  %156 = sub nsw i64 %150, %155
  br label %157

157:                                              ; preds = %.split.us, %153
  %.pn = phi i64 [ %155, %153 ], [ 0, %.split.us ]
  %.0.us = phi i64 [ %156, %153 ], [ %150, %.split.us ]
  %158 = sub nsw i64 %.pn, %147
  %159 = sub nsw i64 %148, %152
  %160 = icmp eq i64 %159, 1
  %161 = add nsw i64 %.06595.us, 1
  %162 = icmp eq i64 %152, %148
  %spec.select.us = select i1 %162, i64 %.06595.us, i64 10
  %.166.us = select i1 %160, i64 %161, i64 %spec.select.us
  %163 = sub nsw i64 %.0.us, %158
  %164 = icmp eq i64 %163, 1
  %165 = add nsw i64 %.06396.us, 1
  %166 = icmp eq i64 %.0.us, %158
  %spec.select83.us = select i1 %166, i64 %.06396.us, i64 10
  %.164.us = select i1 %164, i64 %165, i64 %spec.select83.us
  %167 = add nuw nsw i64 %.06297.us, 1
  %exitcond116.not = icmp eq i64 %167, 26
  br i1 %exitcond116.not, label %.split99.us, label %.split.us, !llvm.loop !20

.split99.us:                                      ; preds = %179, %157
  %.us-phi = phi i64 [ %.166.us, %157 ], [ %.166, %179 ]
  %.us-phi100 = phi i64 [ %.164.us, %157 ], [ %.164, %179 ]
  %.not80 = icmp eq i64 %.us-phi, 0
  br i1 %.not80, label %189, label %190

.split:                                           ; preds = %133, %179
  %.06297 = phi i64 [ %188, %179 ], [ 0, %133 ]
  %.06396 = phi i64 [ %.164, %179 ], [ 0, %133 ]
  %.06595 = phi i64 [ %.166, %179 ], [ 0, %133 ]
  %168 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %.06297, i64 %137
  %169 = load i64, ptr %168, align 8, !tbaa !8
  %170 = getelementptr inbounds [26 x i64], ptr @ls, i64 0, i64 %.06297
  store i64 %169, ptr %170, align 8, !tbaa !8
  %171 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %.06297, i64 %139
  %172 = load i64, ptr %171, align 8, !tbaa !8
  %173 = getelementptr inbounds [26 x i64], ptr @rs, i64 0, i64 %.06297
  %174 = sub nsw i64 %172, %169
  store i64 %174, ptr %173, align 8, !tbaa !8
  br i1 %140, label %175, label %179

175:                                              ; preds = %.split
  %176 = getelementptr inbounds [26 x [1000001 x i64]], ptr @pf, i64 0, i64 %.06297, i64 %142
  %177 = load i64, ptr %176, align 8, !tbaa !8
  %178 = sub nsw i64 %172, %177
  br label %179

179:                                              ; preds = %.split, %175
  %.061120 = phi i64 [ %177, %175 ], [ 0, %.split ]
  %.0 = phi i64 [ %178, %175 ], [ %172, %.split ]
  %180 = sub nsw i64 %169, %174
  %181 = icmp eq i64 %180, 1
  %182 = add nsw i64 %.06595, 1
  %183 = icmp eq i64 %174, %169
  %spec.select = select i1 %183, i64 %.06595, i64 10
  %.166 = select i1 %181, i64 %182, i64 %spec.select
  %184 = sub nsw i64 %.0, %.061120
  %185 = icmp eq i64 %184, 1
  %186 = add nsw i64 %.06396, 1
  %187 = icmp eq i64 %.0, %.061120
  %spec.select83 = select i1 %187, i64 %.06396, i64 10
  %.164 = select i1 %185, i64 %186, i64 %spec.select83
  %188 = add nuw nsw i64 %.06297, 1
  %exitcond115.not = icmp eq i64 %188, 26
  br i1 %exitcond115.not, label %.split99.us, label %.split, !llvm.loop !20

189:                                              ; preds = %.split99.us
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 68, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

190:                                              ; preds = %.split99.us
  %.not81 = icmp eq i64 %.us-phi100, 0
  br i1 %.not81, label %191, label %192

191:                                              ; preds = %190
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.4, i32 noundef 69, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

192:                                              ; preds = %190
  %193 = icmp eq i64 %.us-phi, 1
  %194 = icmp eq i64 %.us-phi100, 1
  %or.cond = select i1 %193, i1 true, i1 %194
  %195 = zext i1 %or.cond to i64
  %spec.select84 = add nsw i64 %.068102, %195
  br label %196

196:                                              ; preds = %.lr.ph103, %192
  %.2 = phi i64 [ %spec.select84, %192 ], [ %.068102, %.lr.ph103 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %197 = load i64, ptr @Q, align 8, !tbaa !8
  %198 = add nsw i64 %197, -1
  store i64 %198, ptr @Q, align 8, !tbaa !8
  %.not78 = icmp eq i64 %197, 0
  br i1 %.not78, label %._crit_edge104, label %.lr.ph103

._crit_edge104:                                   ; preds = %196, %.preheader86
  %.068.lcssa = phi i64 [ 0, %.preheader86 ], [ %.2, %196 ]
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.068.lcssa)
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %199, i8 noundef signext 10)
  %201 = add nuw nsw i64 %.067106, 1
  %202 = load i64, ptr @T, align 8, !tbaa !8
  %.not.not = icmp slt i64 %.067106, %202
  br i1 %.not.not, label %.lr.ph108, label %._crit_edge109, !llvm.loop !21
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #1 align 2

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

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

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

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 #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 @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

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

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


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