; LLVM IR from eyangch/competitive-programming :: Codeforces/1620 (g)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@MOD = external dso_local global i64, align 8
@N = external dso_local global i16, align 2
@oc = external dso_local global [23 x [26 x i16]], align 16
@g = external dso_local global [8388608 x [26 x i16]], align 16
@f = external dso_local global [8388608 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

28:                                               ; preds = %65, %0
  %29 = load i64, ptr %2, align 8, !tbaa !8
  %30 = load i16, ptr @N, align 2, !tbaa !11
  %31 = sext i16 %30 to i64
  %32 = icmp slt i64 %29, %31
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  %35 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %36 unwind label %46

36:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  store ptr %4, ptr %7, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %37 = load ptr, ptr %7, align 8, !tbaa !13
  %38 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %37) #8
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %38, ptr %39, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %40 = load ptr, ptr %7, align 8, !tbaa !13
  %41 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %40) #8
  %42 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %41, ptr %42, align 8
  br label %43

43:                                               ; preds = %62, %36
  %44 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br i1 %44, label %50, label %45

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

46:                                               ; preds = %34
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %5, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  br label %254

50:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #8
  %51 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %52 = load i8, ptr %51, align 1, !tbaa !15
  store i8 %52, ptr %10, align 1, !tbaa !15
  %53 = load i64, ptr %2, align 8, !tbaa !8
  %54 = getelementptr inbounds [23 x [26 x i16]], ptr @oc, i64 0, i64 %53
  %55 = load i8, ptr %10, align 1, !tbaa !15
  %56 = sext i8 %55 to i32
  %57 = sub nsw i32 %56, 97
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [26 x i16], ptr %54, i64 0, i64 %58
  %60 = load i16, ptr %59, align 2, !tbaa !11
  %61 = add i16 %60, 1
  store i16 %61, ptr %59, align 2, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  br label %62

62:                                               ; preds = %50
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br label %43

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

65:                                               ; preds = %64
  %66 = load i64, ptr %2, align 8, !tbaa !8
  %67 = add nsw i64 %66, 1
  store i64 %67, ptr %2, align 8, !tbaa !8
  br label %28, !llvm.loop !16

68:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store double 1.000000e+15, ptr %11, align 8, !tbaa !18
  call void @_ZSt4fillIPsdEvT_S1_RKT0_(ptr noundef @g, ptr noundef getelementptr inbounds (i16, ptr @g, i64 26), ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  store i64 1, ptr %12, align 8, !tbaa !8
  br label %69

69:                                               ; preds = %148, %68
  %70 = load i64, ptr %12, align 8, !tbaa !8
  %71 = load i16, ptr @N, align 2, !tbaa !11
  %72 = sext i16 %71 to i32
  %73 = shl i32 1, %72
  %74 = sext i32 %73 to i64
  %75 = icmp slt i64 %70, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %69
  store i32 7, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %151

77:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %78 = load i64, ptr %12, align 8, !tbaa !8
  %79 = trunc i64 %78 to i32
  %80 = call i32 @llvm.ctlz.i32(i32 %79, i1 true)
  %81 = sub nsw i32 31, %80
  %82 = sext i32 %81 to i64
  store i64 %82, ptr %13, align 8, !tbaa !8
  %83 = load i64, ptr %12, align 8, !tbaa !8
  %84 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %83
  store i64 1, ptr %84, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store i64 0, ptr %14, align 8, !tbaa !8
  br label %85

85:                                               ; preds = %125, %77
  %86 = load i64, ptr %14, align 8, !tbaa !8
  %87 = icmp slt i64 %86, 26
  br i1 %87, label %89, label %88

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

89:                                               ; preds = %85
  %90 = load i64, ptr %12, align 8, !tbaa !8
  %91 = load i64, ptr %13, align 8, !tbaa !8
  %92 = trunc i64 %91 to i32
  %93 = shl i32 1, %92
  %94 = sext i32 %93 to i64
  %95 = xor i64 %90, %94
  %96 = getelementptr inbounds [8388608 x [26 x i16]], ptr @g, i64 0, i64 %95
  %97 = load i64, ptr %14, align 8, !tbaa !8
  %98 = getelementptr inbounds [26 x i16], ptr %96, i64 0, i64 %97
  %99 = load i64, ptr %13, align 8, !tbaa !8
  %100 = getelementptr inbounds [23 x [26 x i16]], ptr @oc, i64 0, i64 %99
  %101 = load i64, ptr %14, align 8, !tbaa !8
  %102 = getelementptr inbounds [26 x i16], ptr %100, i64 0, i64 %101
  %103 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minIsERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %98, ptr noundef nonnull align 2 dereferenceable(2) %102)
  %104 = load i16, ptr %103, align 2, !tbaa !11
  %105 = load i64, ptr %12, align 8, !tbaa !8
  %106 = getelementptr inbounds [8388608 x [26 x i16]], ptr @g, i64 0, i64 %105
  %107 = load i64, ptr %14, align 8, !tbaa !8
  %108 = getelementptr inbounds [26 x i16], ptr %106, i64 0, i64 %107
  store i16 %104, ptr %108, align 2, !tbaa !11
  %109 = load i64, ptr %12, align 8, !tbaa !8
  %110 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %109
  %111 = load i64, ptr %110, align 8, !tbaa !8
  %112 = load i64, ptr %12, align 8, !tbaa !8
  %113 = getelementptr inbounds [8388608 x [26 x i16]], ptr @g, i64 0, i64 %112
  %114 = load i64, ptr %14, align 8, !tbaa !8
  %115 = getelementptr inbounds [26 x i16], ptr %113, i64 0, i64 %114
  %116 = load i16, ptr %115, align 2, !tbaa !11
  %117 = sext i16 %116 to i32
  %118 = add nsw i32 %117, 1
  %119 = sext i32 %118 to i64
  %120 = mul nsw i64 %111, %119
  %121 = load i64, ptr @MOD, align 8, !tbaa !8
  %122 = srem i64 %120, %121
  %123 = load i64, ptr %12, align 8, !tbaa !8
  %124 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %123
  store i64 %122, ptr %124, align 8, !tbaa !8
  br label %125

125:                                              ; preds = %89
  %126 = load i64, ptr %14, align 8, !tbaa !8
  %127 = add nsw i64 %126, 1
  store i64 %127, ptr %14, align 8, !tbaa !8
  br label %85, !llvm.loop !20

128:                                              ; preds = %88
  %129 = load i64, ptr %12, align 8, !tbaa !8
  %130 = trunc i64 %129 to i32
  %131 = call i32 @llvm.ctpop.i32(i32 %130)
  %132 = srem i32 %131, 2
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %135

134:                                              ; preds = %128
  br label %138

135:                                              ; preds = %128
  %136 = load i64, ptr @MOD, align 8, !tbaa !8
  %137 = sub nsw i64 %136, 1
  br label %138

138:                                              ; preds = %135, %134
  %139 = phi i64 [ 1, %134 ], [ %137, %135 ]
  %140 = load i64, ptr %12, align 8, !tbaa !8
  %141 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !8
  %143 = mul nsw i64 %139, %142
  %144 = load i64, ptr @MOD, align 8, !tbaa !8
  %145 = srem i64 %143, %144
  %146 = load i64, ptr %12, align 8, !tbaa !8
  %147 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %146
  store i64 %145, ptr %147, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %148

148:                                              ; preds = %138
  %149 = load i64, ptr %12, align 8, !tbaa !8
  %150 = add nsw i64 %149, 1
  store i64 %150, ptr %12, align 8, !tbaa !8
  br label %69, !llvm.loop !21

151:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store i64 0, ptr %15, align 8, !tbaa !8
  br label %152

152:                                              ; preds = %197, %151
  %153 = load i64, ptr %15, align 8, !tbaa !8
  %154 = load i16, ptr @N, align 2, !tbaa !11
  %155 = sext i16 %154 to i64
  %156 = icmp slt i64 %153, %155
  br i1 %156, label %158, label %157

157:                                              ; preds = %152
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %200

158:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  store i64 1, ptr %16, align 8, !tbaa !8
  br label %159

159:                                              ; preds = %193, %158
  %160 = load i64, ptr %16, align 8, !tbaa !8
  %161 = load i16, ptr @N, align 2, !tbaa !11
  %162 = sext i16 %161 to i32
  %163 = shl i32 1, %162
  %164 = sext i32 %163 to i64
  %165 = icmp slt i64 %160, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %159
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %196

167:                                              ; preds = %159
  %168 = load i64, ptr %16, align 8, !tbaa !8
  %169 = load i64, ptr %15, align 8, !tbaa !8
  %170 = trunc i64 %169 to i32
  %171 = shl i32 1, %170
  %172 = sext i32 %171 to i64
  %173 = and i64 %168, %172
  %174 = icmp ne i64 %173, 0
  br i1 %174, label %176, label %175

175:                                              ; preds = %167
  br label %193

176:                                              ; preds = %167
  %177 = load i64, ptr %16, align 8, !tbaa !8
  %178 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %177
  %179 = load i64, ptr %178, align 8, !tbaa !8
  %180 = load i64, ptr %16, align 8, !tbaa !8
  %181 = load i64, ptr %15, align 8, !tbaa !8
  %182 = trunc i64 %181 to i32
  %183 = shl i32 1, %182
  %184 = sext i32 %183 to i64
  %185 = xor i64 %180, %184
  %186 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %185
  %187 = load i64, ptr %186, align 8, !tbaa !8
  %188 = add nsw i64 %179, %187
  %189 = load i64, ptr @MOD, align 8, !tbaa !8
  %190 = srem i64 %188, %189
  %191 = load i64, ptr %16, align 8, !tbaa !8
  %192 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %191
  store i64 %190, ptr %192, align 8, !tbaa !8
  br label %193

193:                                              ; preds = %176, %175
  %194 = load i64, ptr %16, align 8, !tbaa !8
  %195 = add nsw i64 %194, 1
  store i64 %195, ptr %16, align 8, !tbaa !8
  br label %159, !llvm.loop !22

196:                                              ; preds = %166
  br label %197

197:                                              ; preds = %196
  %198 = load i64, ptr %15, align 8, !tbaa !8
  %199 = add nsw i64 %198, 1
  store i64 %199, ptr %15, align 8, !tbaa !8
  br label %152, !llvm.loop !23

200:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  store i64 0, ptr %17, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  store i64 1, ptr %18, align 8, !tbaa !8
  br label %201

201:                                              ; preds = %246, %200
  %202 = load i64, ptr %18, align 8, !tbaa !8
  %203 = load i16, ptr @N, align 2, !tbaa !11
  %204 = sext i16 %203 to i32
  %205 = shl i32 1, %204
  %206 = sext i32 %205 to i64
  %207 = icmp slt i64 %202, %206
  br i1 %207, label %209, label %208

208:                                              ; preds = %201
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %249

209:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  store i64 0, ptr %19, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  store i64 0, ptr %20, align 8, !tbaa !8
  br label %210

210:                                              ; preds = %230, %209
  %211 = load i64, ptr %20, align 8, !tbaa !8
  %212 = load i16, ptr @N, align 2, !tbaa !11
  %213 = sext i16 %212 to i64
  %214 = icmp slt i64 %211, %213
  br i1 %214, label %216, label %215

215:                                              ; preds = %210
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %233

216:                                              ; preds = %210
  %217 = load i64, ptr %18, align 8, !tbaa !8
  %218 = load i64, ptr %20, align 8, !tbaa !8
  %219 = trunc i64 %218 to i32
  %220 = shl i32 1, %219
  %221 = sext i32 %220 to i64
  %222 = and i64 %217, %221
  %223 = icmp ne i64 %222, 0
  br i1 %223, label %224, label %229

224:                                              ; preds = %216
  %225 = load i64, ptr %20, align 8, !tbaa !8
  %226 = add nsw i64 %225, 1
  %227 = load i64, ptr %19, align 8, !tbaa !8
  %228 = add nsw i64 %227, %226
  store i64 %228, ptr %19, align 8, !tbaa !8
  br label %229

229:                                              ; preds = %224, %216
  br label %230

230:                                              ; preds = %229
  %231 = load i64, ptr %20, align 8, !tbaa !8
  %232 = add nsw i64 %231, 1
  store i64 %232, ptr %20, align 8, !tbaa !8
  br label %210, !llvm.loop !24

233:                                              ; preds = %215
  %234 = load i64, ptr %18, align 8, !tbaa !8
  %235 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %234
  %236 = load i64, ptr %235, align 8, !tbaa !8
  %237 = load i64, ptr %18, align 8, !tbaa !8
  %238 = trunc i64 %237 to i32
  %239 = call i32 @llvm.ctpop.i32(i32 %238)
  %240 = sext i32 %239 to i64
  %241 = mul nsw i64 %236, %240
  %242 = load i64, ptr %19, align 8, !tbaa !8
  %243 = mul nsw i64 %241, %242
  %244 = load i64, ptr %17, align 8, !tbaa !8
  %245 = xor i64 %244, %243
  store i64 %245, ptr %17, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %246

246:                                              ; preds = %233
  %247 = load i64, ptr %18, align 8, !tbaa !8
  %248 = add nsw i64 %247, 1
  store i64 %248, ptr %18, align 8, !tbaa !8
  br label %201, !llvm.loop !25

249:                                              ; preds = %208
  %250 = load i64, ptr %17, align 8, !tbaa !8
  %251 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %250)
  %252 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %251, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  %253 = load i32, ptr %1, align 4
  ret i32 %253

254:                                              ; preds = %46
  %255 = load ptr, ptr %5, align 8
  %256 = load i32, ptr %6, align 4
  %257 = insertvalue { ptr, i32 } poison, ptr %255, 0
  %258 = insertvalue { ptr, i32 } %257, i32 %256, 1
  resume { ptr, i32 } %258
}

; 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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.ctlz.i32(i32, i1 immarg) #6

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.ctpop.i32(i32) #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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #7 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { 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 = !{!12, !12, i64 0}
!12 = !{!"short", !10, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !10, i64 0}
!15 = !{!10, !10, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !10, i64 0}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17}
!25 = distinct !{!25, !17}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@MOD = external dso_local local_unnamed_addr global i64, align 8
@N = external dso_local global i16, align 2
@oc = external dso_local global [23 x [26 x i16]], align 16
@g = external dso_local global [8388608 x [26 x i16]], align 16
@f = external dso_local local_unnamed_addr global [8388608 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca double, align 8
  %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 @_ZNSirsERs(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 2 dereferenceable(2) @N)
  %12 = load i16, ptr @N, align 2, !tbaa !8
  %13 = icmp sgt i16 %12, 0
  br i1 %13, label %.lr.ph68, label %._crit_edge69

._crit_edge69:                                    ; preds = %._crit_edge, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  store double 1.000000e+15, ptr %4, align 8, !tbaa !11
  call void @_ZSt4fillIPsdEvT_S1_RKT0_(ptr noundef nonnull @g, ptr noundef nonnull getelementptr inbounds (i8, ptr @g, i64 52), ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %14 = load i16, ptr @N, align 2, !tbaa !8
  %15 = zext nneg i16 %14 to i32
  %16 = shl nuw i32 1, %15
  %17 = sext i32 %16 to i64
  %18 = icmp sgt i32 %16, 1
  br i1 %18, label %.lr.ph73, label %.preheader63

.lr.ph68:                                         ; preds = %0, %._crit_edge
  %.05766 = phi i64 [ %24, %._crit_edge ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %20 unwind label %28

20:                                               ; preds = %.lr.ph68
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %21 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  store ptr %21, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %22 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  store ptr %22, ptr %3, align 8
  %23 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  br i1 %23, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  %24 = add nuw nsw i64 %.05766, 1
  %25 = load i16, ptr @N, align 2, !tbaa !8
  %26 = sext i16 %25 to i64
  %27 = icmp slt i64 %24, %26
  br i1 %27, label %.lr.ph68, label %._crit_edge69, !llvm.loop !13

28:                                               ; preds = %.lr.ph68
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  resume { ptr, i32 } %29

.lr.ph:                                           ; preds = %20, %.lr.ph
  %30 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #8
  %31 = load i8, ptr %30, align 1, !tbaa !15
  %32 = sext i8 %31 to i64
  %33 = add nsw i64 %32, -97
  %34 = getelementptr inbounds [23 x [26 x i16]], ptr @oc, i64 0, i64 %.05766, i64 %33
  %35 = load i16, ptr %34, align 2, !tbaa !8
  %36 = add i16 %35, 1
  store i16 %36, ptr %34, align 2, !tbaa !8
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #8
  %38 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  br i1 %38, label %.lr.ph, label %._crit_edge

.preheader63:                                     ; preds = %67, %._crit_edge69
  %.lcssa65 = phi i16 [ %14, %._crit_edge69 ], [ %75, %67 ]
  %.lcssa64 = phi i64 [ %17, %._crit_edge69 ], [ %78, %67 ]
  %39 = sext i16 %.lcssa65 to i64
  %40 = icmp sgt i16 %.lcssa65, 0
  br i1 %40, label %.preheader62.lr.ph, label %.preheader61

.preheader62.lr.ph:                               ; preds = %.preheader63
  %41 = icmp sgt i64 %.lcssa64, 1
  %42 = load i64, ptr @MOD, align 8
  br i1 %41, label %.preheader62.us, label %._crit_edge87

.preheader62.us:                                  ; preds = %.preheader62.lr.ph, %._crit_edge77.us
  %.05578.us = phi i64 [ %58, %._crit_edge77.us ], [ 0, %.preheader62.lr.ph ]
  %43 = trunc i64 %.05578.us to i32
  %44 = shl nuw i32 1, %43
  %45 = sext i32 %44 to i64
  br label %46

46:                                               ; preds = %.preheader62.us, %56
  %.05475.us = phi i64 [ 1, %.preheader62.us ], [ %57, %56 ]
  %47 = and i64 %.05475.us, %45
  %.not59.us = icmp eq i64 %47, 0
  br i1 %.not59.us, label %56, label %48

48:                                               ; preds = %46
  %49 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %.05475.us
  %50 = load i64, ptr %49, align 8, !tbaa !16
  %51 = xor i64 %.05475.us, %45
  %52 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !16
  %54 = add nsw i64 %53, %50
  %55 = srem i64 %54, %42
  store i64 %55, ptr %49, align 8, !tbaa !16
  br label %56

56:                                               ; preds = %48, %46
  %57 = add nuw nsw i64 %.05475.us, 1
  %exitcond92.not = icmp eq i64 %57, %.lcssa64
  br i1 %exitcond92.not, label %._crit_edge77.us, label %46, !llvm.loop !18

._crit_edge77.us:                                 ; preds = %56
  %58 = add nuw nsw i64 %.05578.us, 1
  %exitcond93.not = icmp eq i64 %58, %39
  br i1 %exitcond93.not, label %.preheader61, label %.preheader62.us, !llvm.loop !19

.lr.ph73:                                         ; preds = %._crit_edge69, %67
  %.05871 = phi i64 [ %74, %67 ], [ 1, %._crit_edge69 ]
  %59 = trunc i64 %.05871 to i32
  %60 = call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %59, i1 true)
  %61 = xor i32 %60, 31
  %62 = zext nneg i32 %61 to i64
  %63 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %.05871
  store i64 1, ptr %63, align 8, !tbaa !16
  %64 = shl nuw i32 1, %61
  %65 = sext i32 %64 to i64
  %66 = xor i64 %.05871, %65
  br label %80

67:                                               ; preds = %80
  %68 = call range(i32 0, 33) i32 @llvm.ctpop.i32(i32 %59)
  %69 = and i32 %68, 1
  %.not60 = icmp eq i32 %69, 0
  %70 = add nsw i64 %90, -1
  %71 = select i1 %.not60, i64 %70, i64 1
  %72 = mul nsw i64 %71, %91
  %73 = srem i64 %72, %90
  store i64 %73, ptr %63, align 8, !tbaa !16
  %74 = add nuw nsw i64 %.05871, 1
  %75 = load i16, ptr @N, align 2, !tbaa !8
  %76 = zext nneg i16 %75 to i32
  %77 = shl nuw i32 1, %76
  %78 = sext i32 %77 to i64
  %79 = icmp slt i64 %74, %78
  br i1 %79, label %.lr.ph73, label %.preheader63, !llvm.loop !20

80:                                               ; preds = %.lr.ph73, %80
  %.05670 = phi i64 [ 0, %.lr.ph73 ], [ %92, %80 ]
  %81 = getelementptr inbounds [8388608 x [26 x i16]], ptr @g, i64 0, i64 %66, i64 %.05670
  %82 = getelementptr inbounds [23 x [26 x i16]], ptr @oc, i64 0, i64 %62, i64 %.05670
  %83 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minIsERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %81, ptr noundef nonnull align 2 dereferenceable(2) %82)
  %84 = load i16, ptr %83, align 2, !tbaa !8
  %85 = getelementptr inbounds [8388608 x [26 x i16]], ptr @g, i64 0, i64 %.05871, i64 %.05670
  store i16 %84, ptr %85, align 2, !tbaa !8
  %86 = load i64, ptr %63, align 8, !tbaa !16
  %87 = sext i16 %84 to i64
  %88 = add nsw i64 %87, 1
  %89 = mul nsw i64 %86, %88
  %90 = load i64, ptr @MOD, align 8
  %91 = srem i64 %89, %90
  store i64 %91, ptr %63, align 8, !tbaa !16
  %92 = add nuw nsw i64 %.05670, 1
  %exitcond.not = icmp eq i64 %92, 26
  br i1 %exitcond.not, label %67, label %80, !llvm.loop !21

.preheader61:                                     ; preds = %._crit_edge77.us, %.preheader63
  %93 = icmp sgt i64 %.lcssa64, 1
  br i1 %93, label %.preheader.preheader, label %._crit_edge87

.preheader.preheader:                             ; preds = %.preheader61
  %xtraiter = and i64 %39, 1
  %94 = icmp eq i16 %.lcssa65, 1
  %unroll_iter = and i64 %39, 32766
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge83
  %.05286 = phi i64 [ %111, %._crit_edge83 ], [ 1, %.preheader.preheader ]
  %.05385 = phi i64 [ %110, %._crit_edge83 ], [ 0, %.preheader.preheader ]
  br i1 %40, label %.lr.ph82.preheader, label %._crit_edge83

.lr.ph82.preheader:                               ; preds = %.preheader
  br i1 %94, label %._crit_edge83.loopexit.unr-lcssa, label %.lr.ph82

._crit_edge87:                                    ; preds = %._crit_edge83, %.preheader62.lr.ph, %.preheader61
  %.053.lcssa = phi i64 [ 0, %.preheader61 ], [ 0, %.preheader62.lr.ph ], [ %110, %._crit_edge83 ]
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.053.lcssa)
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %95, i8 noundef signext 10)
  ret i32 0

._crit_edge83.loopexit.unr-lcssa:                 ; preds = %.lr.ph82, %.lr.ph82.preheader
  %.1.lcssa.ph = phi i64 [ poison, %.lr.ph82.preheader ], [ %.1.1, %.lr.ph82 ]
  %.081.unr = phi i64 [ 0, %.lr.ph82.preheader ], [ %122, %.lr.ph82 ]
  %.05180.unr = phi i64 [ 0, %.lr.ph82.preheader ], [ %.1.1, %.lr.ph82 ]
  br i1 %lcmp.mod.not, label %._crit_edge83, label %.lr.ph82.epil

.lr.ph82.epil:                                    ; preds = %._crit_edge83.loopexit.unr-lcssa
  %97 = trunc i64 %.081.unr to i32
  %98 = shl nuw i32 1, %97
  %99 = sext i32 %98 to i64
  %100 = and i64 %.05286, %99
  %.not.epil = icmp eq i64 %100, 0
  %101 = add nuw nsw i64 %.081.unr, 1
  %102 = select i1 %.not.epil, i64 0, i64 %101
  %.1.epil = add nuw nsw i64 %102, %.05180.unr
  br label %._crit_edge83

._crit_edge83:                                    ; preds = %.lr.ph82.epil, %._crit_edge83.loopexit.unr-lcssa, %.preheader
  %.051.lcssa = phi i64 [ 0, %.preheader ], [ %.1.lcssa.ph, %._crit_edge83.loopexit.unr-lcssa ], [ %.1.epil, %.lr.ph82.epil ]
  %103 = getelementptr inbounds [8388608 x i64], ptr @f, i64 0, i64 %.05286
  %104 = load i64, ptr %103, align 8, !tbaa !16
  %105 = trunc i64 %.05286 to i32
  %106 = call range(i32 0, 33) i32 @llvm.ctpop.i32(i32 %105)
  %107 = zext nneg i32 %106 to i64
  %108 = mul i64 %.051.lcssa, %107
  %109 = mul i64 %108, %104
  %110 = xor i64 %109, %.05385
  %111 = add nuw nsw i64 %.05286, 1
  %exitcond95.not = icmp eq i64 %111, %.lcssa64
  br i1 %exitcond95.not, label %._crit_edge87, label %.preheader, !llvm.loop !22

.lr.ph82:                                         ; preds = %.lr.ph82.preheader, %.lr.ph82
  %.081 = phi i64 [ %122, %.lr.ph82 ], [ 0, %.lr.ph82.preheader ]
  %.05180 = phi i64 [ %.1.1, %.lr.ph82 ], [ 0, %.lr.ph82.preheader ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph82 ], [ 0, %.lr.ph82.preheader ]
  %112 = trunc i64 %.081 to i32
  %113 = shl nuw i32 1, %112
  %114 = zext nneg i32 %113 to i64
  %115 = and i64 %.05286, %114
  %.not = icmp eq i64 %115, 0
  %116 = or disjoint i64 %.081, 1
  %117 = select i1 %.not, i64 0, i64 %116
  %.1 = add nuw nsw i64 %117, %.05180
  %118 = trunc i64 %116 to i32
  %119 = shl nuw i32 1, %118
  %120 = sext i32 %119 to i64
  %121 = and i64 %.05286, %120
  %.not.1 = icmp eq i64 %121, 0
  %122 = add nuw nsw i64 %.081, 2
  %123 = select i1 %.not.1, i64 0, i64 %122
  %.1.1 = add nuw nsw i64 %123, %.1
  %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_edge83.loopexit.unr-lcssa, label %.lr.ph82, !llvm.loop !23
}

; 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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) 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) #3

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.ctlz.i32(i32, i1 immarg) #6

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.ctpop.i32(i32) #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

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

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


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