; LLVM IR from tangjz/acm-icpc :: lydsy (2628)

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

@str = external dso_local global [1000001 x i8], align 16
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@sz = external dso_local global i32, align 4
@bits = external dso_local global [65537 x i32], align 16
@bit = external dso_local global [11 x [15627 x i64]], align 16
@ans = external dso_local global ptr, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %41, %0
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = icmp slt i32 %26, 65536
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %44

29:                                               ; preds = %25
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = ashr i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [65537 x i32], ptr @bits, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = and i32 %35, 1
  %37 = add nsw i32 %34, %36
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [65537 x i32], ptr @bits, i64 0, i64 %39
  store i32 %37, ptr %40, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %29
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %2, align 4, !tbaa !5
  br label %25, !llvm.loop !9

44:                                               ; preds = %28
  %45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %46

46:                                               ; preds = %324, %322, %44
  %47 = load i32, ptr @t, align 4, !tbaa !5
  %48 = add nsw i32 %47, -1
  store i32 %48, ptr @t, align 4, !tbaa !5
  %49 = icmp ne i32 %47, 0
  br i1 %49, label %50, label %325

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %51 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %107

54:                                               ; preds = %50
  %55 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %4, ptr noundef @str)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %56 = call i64 @strlen(ptr noundef @str) #7
  %57 = trunc i64 %56 to i32
  store i32 %57, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 48, ptr %8, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %94, %54
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = icmp slt i32 %59, 10
  br i1 %60, label %62, label %61

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

62:                                               ; preds = %58
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [11 x [15627 x i64]], ptr @bit, i64 0, i64 %64
  %66 = getelementptr inbounds [15627 x i64], ptr %65, i64 0, i64 0
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %68 = load i32, ptr %6, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef %66, i32 noundef %67, i32 noundef %68)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %69 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %69, ptr %11, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %88, %62
  %71 = load i32, ptr %10, align 4, !tbaa !5
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  store i32 10, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %93

75:                                               ; preds = %70
  %76 = load i32, ptr %7, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [11 x [15627 x i64]], ptr @bit, i64 0, i64 %77
  %79 = getelementptr inbounds [15627 x i64], ptr %78, i64 0, i64 0
  %80 = load i32, ptr %11, align 4, !tbaa !5
  %81 = load i32, ptr %10, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !11
  %85 = sext i8 %84 to i32
  %86 = load i32, ptr %8, align 4, !tbaa !5
  %87 = icmp eq i32 %85, %86
  call void @_Z6setBitPyib(ptr noundef %79, i32 noundef %80, i1 noundef zeroext %87)
  br label %88

88:                                               ; preds = %75
  %89 = load i32, ptr %10, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %10, align 4, !tbaa !5
  %91 = load i32, ptr %11, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %11, align 4, !tbaa !5
  br label %70, !llvm.loop !12

93:                                               ; preds = %74
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %7, align 4, !tbaa !5
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %8, align 4, !tbaa !5
  br label %58, !llvm.loop !13

99:                                               ; preds = %61
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = load i32, ptr @n, align 4, !tbaa !5
  %102 = add nsw i32 %101, %100
  store i32 %102, ptr @n, align 4, !tbaa !5
  %103 = load i32, ptr @n, align 4, !tbaa !5
  %104 = sub nsw i32 %103, 1
  %105 = ashr i32 %104, 6
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr @sz, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %321

107:                                              ; preds = %50
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = icmp eq i32 %108, 1
  br i1 %109, label %110, label %137

110:                                              ; preds = %107
  %111 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %4, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %112 = load i32, ptr %5, align 4, !tbaa !5
  %113 = load i32, ptr %4, align 4, !tbaa !5
  %114 = sub nsw i32 %112, %113
  store i32 %114, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %126, %110
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = icmp slt i32 %116, 10
  br i1 %117, label %119, label %118

118:                                              ; preds = %115
  store i32 13, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %129

119:                                              ; preds = %115
  %120 = load i32, ptr %13, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [11 x [15627 x i64]], ptr @bit, i64 0, i64 %121
  %123 = getelementptr inbounds [15627 x i64], ptr %122, i64 0, i64 0
  %124 = load i32, ptr %4, align 4, !tbaa !5
  %125 = load i32, ptr %12, align 4, !tbaa !5
  call void @_Z10shiftRightPyii(ptr noundef %123, i32 noundef %124, i32 noundef %125)
  br label %126

126:                                              ; preds = %119
  %127 = load i32, ptr %13, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %13, align 4, !tbaa !5
  br label %115, !llvm.loop !14

129:                                              ; preds = %118
  %130 = load i32, ptr %12, align 4, !tbaa !5
  %131 = load i32, ptr @n, align 4, !tbaa !5
  %132 = sub nsw i32 %131, %130
  store i32 %132, ptr @n, align 4, !tbaa !5
  %133 = load i32, ptr @n, align 4, !tbaa !5
  %134 = sub nsw i32 %133, 1
  %135 = ashr i32 %134, 6
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr @sz, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %320

137:                                              ; preds = %107
  %138 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %4, ptr noundef %5, ptr noundef @str)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %139 = call i64 @strlen(ptr noundef @str) #7
  %140 = trunc i64 %139 to i32
  store i32 %140, ptr %14, align 4, !tbaa !5
  %141 = load i32, ptr %5, align 4, !tbaa !5
  %142 = load i32, ptr %4, align 4, !tbaa !5
  %143 = sub nsw i32 %141, %142
  %144 = load i32, ptr %14, align 4, !tbaa !5
  %145 = icmp slt i32 %143, %144
  br i1 %145, label %146, label %148

146:                                              ; preds = %137
  %147 = call i32 @puts(ptr noundef @.str.4)
  store i32 5, ptr %9, align 4
  br label %317, !llvm.loop !15

148:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %149 = load i32, ptr %4, align 4, !tbaa !5
  %150 = ashr i32 %149, 6
  store i32 %150, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %151 = load i32, ptr %5, align 4, !tbaa !5
  %152 = sub nsw i32 %151, 1
  %153 = ashr i32 %152, 6
  store i32 %153, ptr %16, align 4, !tbaa !5
  %154 = load ptr, ptr @ans, align 8, !tbaa !16
  %155 = load i32, ptr %15, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds i64, ptr %154, i64 %156
  %158 = load i8, ptr @str, align 16, !tbaa !11
  %159 = sext i8 %158 to i32
  %160 = sub nsw i32 %159, 48
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [11 x [15627 x i64]], ptr @bit, i64 0, i64 %161
  %163 = getelementptr inbounds [15627 x i64], ptr %162, i64 0, i64 0
  %164 = load i32, ptr %15, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds i64, ptr %163, i64 %165
  %167 = load i32, ptr %16, align 4, !tbaa !5
  %168 = load i32, ptr %15, align 4, !tbaa !5
  %169 = sub nsw i32 %167, %168
  %170 = add nsw i32 %169, 1
  %171 = sext i32 %170 to i64
  %172 = mul i64 %171, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %157, ptr align 8 %166, i64 %172, i1 false)
  %173 = load i32, ptr %4, align 4, !tbaa !5
  %174 = and i32 %173, 63
  %175 = zext i32 %174 to i64
  %176 = shl i64 -1, %175
  %177 = load ptr, ptr @ans, align 8, !tbaa !16
  %178 = load i32, ptr %15, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds i64, ptr %177, i64 %179
  %181 = load i64, ptr %180, align 8, !tbaa !18
  %182 = and i64 %181, %176
  store i64 %182, ptr %180, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %183

183:                                              ; preds = %255, %148
  %184 = load i32, ptr %17, align 4, !tbaa !5
  %185 = load i32, ptr %14, align 4, !tbaa !5
  %186 = icmp slt i32 %184, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %183
  store i32 16, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %258

188:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %189 = load i32, ptr %16, align 4, !tbaa !5
  store i32 %189, ptr %18, align 4, !tbaa !5
  br label %190

190:                                              ; preds = %214, %188
  %191 = load i32, ptr %18, align 4, !tbaa !5
  %192 = load i32, ptr %15, align 4, !tbaa !5
  %193 = icmp sgt i32 %191, %192
  br i1 %193, label %195, label %194

194:                                              ; preds = %190
  store i32 19, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %217

195:                                              ; preds = %190
  %196 = load ptr, ptr @ans, align 8, !tbaa !16
  %197 = load i32, ptr %18, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds i64, ptr %196, i64 %198
  %200 = load i64, ptr %199, align 8, !tbaa !18
  %201 = shl i64 %200, 1
  %202 = load ptr, ptr @ans, align 8, !tbaa !16
  %203 = load i32, ptr %18, align 4, !tbaa !5
  %204 = sub nsw i32 %203, 1
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds i64, ptr %202, i64 %205
  %207 = load i64, ptr %206, align 8, !tbaa !18
  %208 = lshr i64 %207, 63
  %209 = or i64 %201, %208
  %210 = load ptr, ptr @ans, align 8, !tbaa !16
  %211 = load i32, ptr %18, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds i64, ptr %210, i64 %212
  store i64 %209, ptr %213, align 8, !tbaa !18
  br label %214

214:                                              ; preds = %195
  %215 = load i32, ptr %18, align 4, !tbaa !5
  %216 = add nsw i32 %215, -1
  store i32 %216, ptr %18, align 4, !tbaa !5
  br label %190, !llvm.loop !20

217:                                              ; preds = %194
  %218 = load ptr, ptr @ans, align 8, !tbaa !16
  %219 = load i32, ptr %15, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds i64, ptr %218, i64 %220
  %222 = load i64, ptr %221, align 8, !tbaa !18
  %223 = shl i64 %222, 1
  store i64 %223, ptr %221, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %224 = load i32, ptr %17, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %225
  %227 = load i8, ptr %226, align 1, !tbaa !11
  %228 = sext i8 %227 to i32
  %229 = sub nsw i32 %228, 48
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [11 x [15627 x i64]], ptr @bit, i64 0, i64 %230
  %232 = getelementptr inbounds [15627 x i64], ptr %231, i64 0, i64 0
  store ptr %232, ptr %19, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %233 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %233, ptr %20, align 4, !tbaa !5
  br label %234

234:                                              ; preds = %251, %217
  %235 = load i32, ptr %20, align 4, !tbaa !5
  %236 = load i32, ptr %16, align 4, !tbaa !5
  %237 = icmp sle i32 %235, %236
  br i1 %237, label %239, label %238

238:                                              ; preds = %234
  store i32 22, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %254

239:                                              ; preds = %234
  %240 = load ptr, ptr %19, align 8, !tbaa !16
  %241 = load i32, ptr %20, align 4, !tbaa !5
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds i64, ptr %240, i64 %242
  %244 = load i64, ptr %243, align 8, !tbaa !18
  %245 = load ptr, ptr @ans, align 8, !tbaa !16
  %246 = load i32, ptr %20, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds i64, ptr %245, i64 %247
  %249 = load i64, ptr %248, align 8, !tbaa !18
  %250 = and i64 %249, %244
  store i64 %250, ptr %248, align 8, !tbaa !18
  br label %251

251:                                              ; preds = %239
  %252 = load i32, ptr %20, align 4, !tbaa !5
  %253 = add nsw i32 %252, 1
  store i32 %253, ptr %20, align 4, !tbaa !5
  br label %234, !llvm.loop !21

254:                                              ; preds = %238
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %255

255:                                              ; preds = %254
  %256 = load i32, ptr %17, align 4, !tbaa !5
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %17, align 4, !tbaa !5
  br label %183, !llvm.loop !22

258:                                              ; preds = %187
  %259 = load i32, ptr %5, align 4, !tbaa !5
  %260 = sub nsw i32 %259, 1
  %261 = xor i32 %260, -1
  %262 = and i32 %261, 63
  %263 = zext i32 %262 to i64
  %264 = lshr i64 -1, %263
  %265 = load ptr, ptr @ans, align 8, !tbaa !16
  %266 = load i32, ptr %16, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds i64, ptr %265, i64 %267
  %269 = load i64, ptr %268, align 8, !tbaa !18
  %270 = and i64 %269, %264
  store i64 %270, ptr %268, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 16, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %271 = load i32, ptr %22, align 4, !tbaa !5
  %272 = shl i32 1, %271
  %273 = sub nsw i32 %272, 1
  store i32 %273, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %274 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %274, ptr %24, align 4, !tbaa !5
  br label %275

275:                                              ; preds = %311, %258
  %276 = load i32, ptr %24, align 4, !tbaa !5
  %277 = load i32, ptr %16, align 4, !tbaa !5
  %278 = icmp sle i32 %276, %277
  br i1 %278, label %280, label %279

279:                                              ; preds = %275
  store i32 25, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %314

280:                                              ; preds = %275
  br label %281

281:                                              ; preds = %289, %280
  %282 = load ptr, ptr @ans, align 8, !tbaa !16
  %283 = load i32, ptr %24, align 4, !tbaa !5
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds i64, ptr %282, i64 %284
  %286 = load i64, ptr %285, align 8, !tbaa !18
  %287 = icmp ne i64 %286, 0
  br i1 %287, label %288, label %310

288:                                              ; preds = %281
  br label %289

289:                                              ; preds = %288
  %290 = load ptr, ptr @ans, align 8, !tbaa !16
  %291 = load i32, ptr %24, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds i64, ptr %290, i64 %292
  %294 = load i64, ptr %293, align 8, !tbaa !18
  %295 = load i32, ptr %23, align 4, !tbaa !5
  %296 = sext i32 %295 to i64
  %297 = and i64 %294, %296
  %298 = getelementptr inbounds [65537 x i32], ptr @bits, i64 0, i64 %297
  %299 = load i32, ptr %298, align 4, !tbaa !5
  %300 = load i32, ptr %21, align 4, !tbaa !5
  %301 = add nsw i32 %300, %299
  store i32 %301, ptr %21, align 4, !tbaa !5
  %302 = load i32, ptr %22, align 4, !tbaa !5
  %303 = load ptr, ptr @ans, align 8, !tbaa !16
  %304 = load i32, ptr %24, align 4, !tbaa !5
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds i64, ptr %303, i64 %305
  %307 = load i64, ptr %306, align 8, !tbaa !18
  %308 = zext i32 %302 to i64
  %309 = lshr i64 %307, %308
  store i64 %309, ptr %306, align 8, !tbaa !18
  br label %281, !llvm.loop !23

310:                                              ; preds = %281
  br label %311

311:                                              ; preds = %310
  %312 = load i32, ptr %24, align 4, !tbaa !5
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %24, align 4, !tbaa !5
  br label %275, !llvm.loop !24

314:                                              ; preds = %279
  %315 = load i32, ptr %21, align 4, !tbaa !5
  %316 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %315)
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  store i32 0, ptr %9, align 4
  br label %317

317:                                              ; preds = %314, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %318 = load i32, ptr %9, align 4
  switch i32 %318, label %322 [
    i32 0, label %319
  ]

319:                                              ; preds = %317
  br label %320

320:                                              ; preds = %319, %129
  br label %321

321:                                              ; preds = %320, %99
  store i32 0, ptr %9, align 4
  br label %322

322:                                              ; preds = %321, %317
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  %323 = load i32, ptr %9, align 4
  switch i32 %323, label %326 [
    i32 0, label %324
    i32 5, label %46
  ]

324:                                              ; preds = %322
  br label %46, !llvm.loop !15

325:                                              ; preds = %46
  ret i32 0

326:                                              ; preds = %322
  unreachable
}

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

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z9shiftLeftPyii(ptr noundef, i32 noundef, i32 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z6setBitPyib(ptr noundef, i32 noundef, i1 noundef zeroext) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z10shiftRightPyii(ptr noundef, i32 noundef, i32 noundef) #4

declare i32 @puts(ptr noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare i32 @printf(ptr noundef, ...) #2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

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

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


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

@str = external dso_local global [1000001 x i8], align 16
@t = external dso_local global i32, align 4
@n = external dso_local local_unnamed_addr global i32, align 4
@sz = external dso_local local_unnamed_addr global i32, align 4
@bits = external dso_local local_unnamed_addr global [65537 x i32], align 16
@bit = external dso_local global [11 x [15627 x i64]], align 16
@ans = external dso_local local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  br label %8

4:                                                ; preds = %8
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %6 = load i32, ptr @t, align 4, !tbaa !5
  %7 = add nsw i32 %6, -1
  store i32 %7, ptr @t, align 4, !tbaa !5
  %.not107 = icmp eq i32 %6, 0
  br i1 %.not107, label %._crit_edge110, label %.lr.ph109

8:                                                ; preds = %8, %0
  %indvars.iv = phi i64 [ 1, %0 ], [ %indvars.iv.next.2, %8 ]
  %9 = trunc nuw nsw i64 %indvars.iv to i32
  %10 = lshr i64 %indvars.iv, 1
  %11 = and i64 %10, 2147483647
  %12 = getelementptr inbounds [65537 x i32], ptr @bits, i64 0, i64 %11
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = and i32 %9, 1
  %15 = add nsw i32 %13, %14
  %16 = getelementptr inbounds [65537 x i32], ptr @bits, i64 0, i64 %indvars.iv
  store i32 %15, ptr %16, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = trunc nuw nsw i64 %indvars.iv.next to i32
  %18 = lshr i64 %indvars.iv.next, 1
  %19 = and i64 %18, 2147483647
  %20 = getelementptr inbounds [65537 x i32], ptr @bits, i64 0, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = and i32 %17, 1
  %23 = add nsw i32 %21, %22
  %24 = getelementptr inbounds [65537 x i32], ptr @bits, i64 0, i64 %indvars.iv.next
  store i32 %23, ptr %24, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %25 = trunc i64 %indvars.iv to i32
  %26 = lshr i64 %indvars.iv.next.1, 1
  %27 = and i64 %26, 2147483647
  %28 = getelementptr inbounds [65537 x i32], ptr @bits, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = and i32 %25, 1
  %31 = add nsw i32 %29, %30
  %32 = getelementptr inbounds [65537 x i32], ptr @bits, i64 0, i64 %indvars.iv.next.1
  store i32 %31, ptr %32, align 4, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %exitcond.not.2 = icmp eq i64 %indvars.iv.next.2, 65536
  br i1 %exitcond.not.2, label %4, label %8, !llvm.loop !9

.lr.ph109:                                        ; preds = %4, %249
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %34 = load i32, ptr %1, align 4, !tbaa !5
  switch i32 %34, label %142 [
    i32 0, label %35
    i32 1, label %123
  ]

35:                                               ; preds = %.lr.ph109
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull @str)
  %37 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @str) #8
  %.fr = freeze i64 %37
  %38 = trunc i64 %.fr to i32
  %39 = icmp sgt i32 %38, 0
  %40 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull @bit, i32 noundef %40, i32 noundef %38)
  %41 = load i32, ptr %2, align 4, !tbaa !5
  br i1 %39, label %.lr.ph.us.preheader, label %.split.preheader

.split.preheader:                                 ; preds = %35
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 125016), i32 noundef %41, i32 noundef %38)
  %42 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 250032), i32 noundef %42, i32 noundef %38)
  %43 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 375048), i32 noundef %43, i32 noundef %38)
  %44 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 500064), i32 noundef %44, i32 noundef %38)
  %45 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 625080), i32 noundef %45, i32 noundef %38)
  %46 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 750096), i32 noundef %46, i32 noundef %38)
  %47 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 875112), i32 noundef %47, i32 noundef %38)
  %48 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 1000128), i32 noundef %48, i32 noundef %38)
  %49 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 1125144), i32 noundef %49, i32 noundef %38)
  br label %.split89.us

.lr.ph.us.preheader:                              ; preds = %35
  %wide.trip.count = and i64 %.fr, 2147483647
  br label %50

50:                                               ; preds = %.lr.ph.us.preheader, %50
  %indvars.iv123 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next124, %50 ]
  %.07184.us = phi i32 [ %41, %.lr.ph.us.preheader ], [ %54, %50 ]
  %51 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %indvars.iv123
  %52 = load i8, ptr %51, align 1, !tbaa !11
  %53 = icmp eq i8 %52, 48
  call void @_Z6setBitPyib(ptr noundef nonnull @bit, i32 noundef %.07184.us, i1 noundef zeroext %53)
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %54 = add nsw i32 %.07184.us, 1
  %exitcond126.not = icmp eq i64 %indvars.iv.next124, %wide.trip.count
  br i1 %exitcond126.not, label %._crit_edge.us, label %50, !llvm.loop !12

._crit_edge.us:                                   ; preds = %50
  %55 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 125016), i32 noundef %55, i32 noundef %38)
  %56 = load i32, ptr %2, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %57, %._crit_edge.us
  %indvars.iv123.1 = phi i64 [ 0, %._crit_edge.us ], [ %indvars.iv.next124.1, %57 ]
  %.07184.us.1 = phi i32 [ %56, %._crit_edge.us ], [ %61, %57 ]
  %58 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %indvars.iv123.1
  %59 = load i8, ptr %58, align 1, !tbaa !11
  %60 = icmp eq i8 %59, 49
  call void @_Z6setBitPyib(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 125016), i32 noundef %.07184.us.1, i1 noundef zeroext %60)
  %indvars.iv.next124.1 = add nuw nsw i64 %indvars.iv123.1, 1
  %61 = add nsw i32 %.07184.us.1, 1
  %exitcond126.1.not = icmp eq i64 %indvars.iv.next124.1, %wide.trip.count
  br i1 %exitcond126.1.not, label %._crit_edge.us.1, label %57, !llvm.loop !12

._crit_edge.us.1:                                 ; preds = %57
  %62 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 250032), i32 noundef %62, i32 noundef %38)
  %63 = load i32, ptr %2, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %64, %._crit_edge.us.1
  %indvars.iv123.2 = phi i64 [ 0, %._crit_edge.us.1 ], [ %indvars.iv.next124.2, %64 ]
  %.07184.us.2 = phi i32 [ %63, %._crit_edge.us.1 ], [ %68, %64 ]
  %65 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %indvars.iv123.2
  %66 = load i8, ptr %65, align 1, !tbaa !11
  %67 = icmp eq i8 %66, 50
  call void @_Z6setBitPyib(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 250032), i32 noundef %.07184.us.2, i1 noundef zeroext %67)
  %indvars.iv.next124.2 = add nuw nsw i64 %indvars.iv123.2, 1
  %68 = add nsw i32 %.07184.us.2, 1
  %exitcond126.2.not = icmp eq i64 %indvars.iv.next124.2, %wide.trip.count
  br i1 %exitcond126.2.not, label %._crit_edge.us.2, label %64, !llvm.loop !12

._crit_edge.us.2:                                 ; preds = %64
  %69 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 375048), i32 noundef %69, i32 noundef %38)
  %70 = load i32, ptr %2, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %71, %._crit_edge.us.2
  %indvars.iv123.3 = phi i64 [ 0, %._crit_edge.us.2 ], [ %indvars.iv.next124.3, %71 ]
  %.07184.us.3 = phi i32 [ %70, %._crit_edge.us.2 ], [ %75, %71 ]
  %72 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %indvars.iv123.3
  %73 = load i8, ptr %72, align 1, !tbaa !11
  %74 = icmp eq i8 %73, 51
  call void @_Z6setBitPyib(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 375048), i32 noundef %.07184.us.3, i1 noundef zeroext %74)
  %indvars.iv.next124.3 = add nuw nsw i64 %indvars.iv123.3, 1
  %75 = add nsw i32 %.07184.us.3, 1
  %exitcond126.3.not = icmp eq i64 %indvars.iv.next124.3, %wide.trip.count
  br i1 %exitcond126.3.not, label %._crit_edge.us.3, label %71, !llvm.loop !12

._crit_edge.us.3:                                 ; preds = %71
  %76 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 500064), i32 noundef %76, i32 noundef %38)
  %77 = load i32, ptr %2, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %78, %._crit_edge.us.3
  %indvars.iv123.4 = phi i64 [ 0, %._crit_edge.us.3 ], [ %indvars.iv.next124.4, %78 ]
  %.07184.us.4 = phi i32 [ %77, %._crit_edge.us.3 ], [ %82, %78 ]
  %79 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %indvars.iv123.4
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %81 = icmp eq i8 %80, 52
  call void @_Z6setBitPyib(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 500064), i32 noundef %.07184.us.4, i1 noundef zeroext %81)
  %indvars.iv.next124.4 = add nuw nsw i64 %indvars.iv123.4, 1
  %82 = add nsw i32 %.07184.us.4, 1
  %exitcond126.4.not = icmp eq i64 %indvars.iv.next124.4, %wide.trip.count
  br i1 %exitcond126.4.not, label %._crit_edge.us.4, label %78, !llvm.loop !12

._crit_edge.us.4:                                 ; preds = %78
  %83 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 625080), i32 noundef %83, i32 noundef %38)
  %84 = load i32, ptr %2, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %85, %._crit_edge.us.4
  %indvars.iv123.5 = phi i64 [ 0, %._crit_edge.us.4 ], [ %indvars.iv.next124.5, %85 ]
  %.07184.us.5 = phi i32 [ %84, %._crit_edge.us.4 ], [ %89, %85 ]
  %86 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %indvars.iv123.5
  %87 = load i8, ptr %86, align 1, !tbaa !11
  %88 = icmp eq i8 %87, 53
  call void @_Z6setBitPyib(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 625080), i32 noundef %.07184.us.5, i1 noundef zeroext %88)
  %indvars.iv.next124.5 = add nuw nsw i64 %indvars.iv123.5, 1
  %89 = add nsw i32 %.07184.us.5, 1
  %exitcond126.5.not = icmp eq i64 %indvars.iv.next124.5, %wide.trip.count
  br i1 %exitcond126.5.not, label %._crit_edge.us.5, label %85, !llvm.loop !12

._crit_edge.us.5:                                 ; preds = %85
  %90 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 750096), i32 noundef %90, i32 noundef %38)
  %91 = load i32, ptr %2, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %92, %._crit_edge.us.5
  %indvars.iv123.6 = phi i64 [ 0, %._crit_edge.us.5 ], [ %indvars.iv.next124.6, %92 ]
  %.07184.us.6 = phi i32 [ %91, %._crit_edge.us.5 ], [ %96, %92 ]
  %93 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %indvars.iv123.6
  %94 = load i8, ptr %93, align 1, !tbaa !11
  %95 = icmp eq i8 %94, 54
  call void @_Z6setBitPyib(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 750096), i32 noundef %.07184.us.6, i1 noundef zeroext %95)
  %indvars.iv.next124.6 = add nuw nsw i64 %indvars.iv123.6, 1
  %96 = add nsw i32 %.07184.us.6, 1
  %exitcond126.6.not = icmp eq i64 %indvars.iv.next124.6, %wide.trip.count
  br i1 %exitcond126.6.not, label %._crit_edge.us.6, label %92, !llvm.loop !12

._crit_edge.us.6:                                 ; preds = %92
  %97 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 875112), i32 noundef %97, i32 noundef %38)
  %98 = load i32, ptr %2, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %99, %._crit_edge.us.6
  %indvars.iv123.7 = phi i64 [ 0, %._crit_edge.us.6 ], [ %indvars.iv.next124.7, %99 ]
  %.07184.us.7 = phi i32 [ %98, %._crit_edge.us.6 ], [ %103, %99 ]
  %100 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %indvars.iv123.7
  %101 = load i8, ptr %100, align 1, !tbaa !11
  %102 = icmp eq i8 %101, 55
  call void @_Z6setBitPyib(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 875112), i32 noundef %.07184.us.7, i1 noundef zeroext %102)
  %indvars.iv.next124.7 = add nuw nsw i64 %indvars.iv123.7, 1
  %103 = add nsw i32 %.07184.us.7, 1
  %exitcond126.7.not = icmp eq i64 %indvars.iv.next124.7, %wide.trip.count
  br i1 %exitcond126.7.not, label %._crit_edge.us.7, label %99, !llvm.loop !12

._crit_edge.us.7:                                 ; preds = %99
  %104 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 1000128), i32 noundef %104, i32 noundef %38)
  %105 = load i32, ptr %2, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %106, %._crit_edge.us.7
  %indvars.iv123.8 = phi i64 [ 0, %._crit_edge.us.7 ], [ %indvars.iv.next124.8, %106 ]
  %.07184.us.8 = phi i32 [ %105, %._crit_edge.us.7 ], [ %110, %106 ]
  %107 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %indvars.iv123.8
  %108 = load i8, ptr %107, align 1, !tbaa !11
  %109 = icmp eq i8 %108, 56
  call void @_Z6setBitPyib(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 1000128), i32 noundef %.07184.us.8, i1 noundef zeroext %109)
  %indvars.iv.next124.8 = add nuw nsw i64 %indvars.iv123.8, 1
  %110 = add nsw i32 %.07184.us.8, 1
  %exitcond126.8.not = icmp eq i64 %indvars.iv.next124.8, %wide.trip.count
  br i1 %exitcond126.8.not, label %._crit_edge.us.8, label %106, !llvm.loop !12

._crit_edge.us.8:                                 ; preds = %106
  %111 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9shiftLeftPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 1125144), i32 noundef %111, i32 noundef %38)
  %112 = load i32, ptr %2, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %113, %._crit_edge.us.8
  %indvars.iv123.9 = phi i64 [ 0, %._crit_edge.us.8 ], [ %indvars.iv.next124.9, %113 ]
  %.07184.us.9 = phi i32 [ %112, %._crit_edge.us.8 ], [ %117, %113 ]
  %114 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %indvars.iv123.9
  %115 = load i8, ptr %114, align 1, !tbaa !11
  %116 = icmp eq i8 %115, 57
  call void @_Z6setBitPyib(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 1125144), i32 noundef %.07184.us.9, i1 noundef zeroext %116)
  %indvars.iv.next124.9 = add nuw nsw i64 %indvars.iv123.9, 1
  %117 = add nsw i32 %.07184.us.9, 1
  %exitcond126.9.not = icmp eq i64 %indvars.iv.next124.9, %wide.trip.count
  br i1 %exitcond126.9.not, label %.split89.us, label %113, !llvm.loop !12

.split89.us:                                      ; preds = %113, %.split.preheader
  %118 = load i32, ptr @n, align 4, !tbaa !5
  %119 = add nsw i32 %118, %38
  store i32 %119, ptr @n, align 4, !tbaa !5
  %120 = add nsw i32 %119, -1
  %121 = ashr i32 %120, 6
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr @sz, align 4, !tbaa !5
  br label %249

123:                                              ; preds = %.lr.ph109
  %124 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %125 = load i32, ptr %3, align 4, !tbaa !5
  %126 = load i32, ptr %2, align 4, !tbaa !5
  %127 = sub nsw i32 %125, %126
  call void @_Z10shiftRightPyii(ptr noundef nonnull @bit, i32 noundef %126, i32 noundef %127)
  %128 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z10shiftRightPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 125016), i32 noundef %128, i32 noundef %127)
  %129 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z10shiftRightPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 250032), i32 noundef %129, i32 noundef %127)
  %130 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z10shiftRightPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 375048), i32 noundef %130, i32 noundef %127)
  %131 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z10shiftRightPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 500064), i32 noundef %131, i32 noundef %127)
  %132 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z10shiftRightPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 625080), i32 noundef %132, i32 noundef %127)
  %133 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z10shiftRightPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 750096), i32 noundef %133, i32 noundef %127)
  %134 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z10shiftRightPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 875112), i32 noundef %134, i32 noundef %127)
  %135 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z10shiftRightPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 1000128), i32 noundef %135, i32 noundef %127)
  %136 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z10shiftRightPyii(ptr noundef nonnull getelementptr inbounds (i8, ptr @bit, i64 1125144), i32 noundef %136, i32 noundef %127)
  %137 = load i32, ptr @n, align 4, !tbaa !5
  %138 = sub nsw i32 %137, %127
  store i32 %138, ptr @n, align 4, !tbaa !5
  %139 = add nsw i32 %138, -1
  %140 = ashr i32 %139, 6
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr @sz, align 4, !tbaa !5
  br label %249

142:                                              ; preds = %.lr.ph109
  %143 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull @str)
  %144 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @str) #8
  %145 = trunc i64 %144 to i32
  %146 = load i32, ptr %3, align 4, !tbaa !5
  %147 = load i32, ptr %2, align 4, !tbaa !5
  %148 = sub nsw i32 %146, %147
  %.not80 = icmp slt i32 %148, %145
  br i1 %.not80, label %149, label %151

149:                                              ; preds = %142
  %150 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %249, !llvm.loop !13

151:                                              ; preds = %142
  %152 = ashr i32 %147, 6
  %153 = add nsw i32 %146, -1
  %154 = ashr i32 %153, 6
  %155 = load ptr, ptr @ans, align 8, !tbaa !14
  %156 = sext i32 %152 to i64
  %157 = getelementptr inbounds i64, ptr %155, i64 %156
  %158 = load i8, ptr @str, align 16, !tbaa !11
  %159 = sext i8 %158 to i64
  %160 = add nsw i64 %159, -48
  %161 = getelementptr inbounds [11 x [15627 x i64]], ptr @bit, i64 0, i64 %160
  %162 = getelementptr inbounds i64, ptr %161, i64 %156
  %reass.sub = sub nsw i32 %154, %152
  %163 = add nsw i32 %reass.sub, 1
  %164 = sext i32 %163 to i64
  %165 = shl nsw i64 %164, 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %157, ptr nonnull align 8 %162, i64 %165, i1 false)
  %166 = load i32, ptr %2, align 4, !tbaa !5
  %167 = and i32 %166, 63
  %168 = zext nneg i32 %167 to i64
  %169 = shl nsw i64 -1, %168
  %170 = load ptr, ptr @ans, align 8, !tbaa !14
  %171 = getelementptr inbounds i64, ptr %170, i64 %156
  %172 = load i64, ptr %171, align 8, !tbaa !16
  %173 = and i64 %169, %172
  store i64 %173, ptr %171, align 8, !tbaa !16
  %174 = icmp sgt i32 %145, 1
  br i1 %174, label %.preheader81.lr.ph, label %.._crit_edge97_crit_edge

.._crit_edge97_crit_edge:                         ; preds = %151
  %.pre = sext i32 %154 to i64
  br label %._crit_edge97

.preheader81.lr.ph:                               ; preds = %151
  %175 = icmp sgt i32 %154, %152
  %.not7991 = icmp sgt i32 %152, %154
  %176 = sext i32 %154 to i64
  %smax = call i32 @llvm.smax.i32(i32 %152, i32 %154)
  %177 = add nsw i32 %smax, 1
  %wide.trip.count142 = and i64 %144, 2147483647
  %wide.trip.count137 = sext i32 %177 to i64
  %178 = shl nsw i64 %156, 3
  %scevgep = getelementptr i8, ptr %170, i64 %178
  %scevgep152 = getelementptr i8, ptr %170, i64 8
  %smax153 = call i64 @llvm.smax.i64(i64 %156, i64 %176)
  %179 = shl nsw i64 %smax153, 3
  %scevgep154 = getelementptr i8, ptr %scevgep152, i64 %179
  %scevgep155 = getelementptr i8, ptr getelementptr (i8, ptr @bit, i64 -6000768), i64 %178
  %scevgep157 = getelementptr i8, ptr getelementptr (i8, ptr @bit, i64 -6000760), i64 %179
  %smax159 = call i64 @llvm.smax.i64(i64 %156, i64 %176)
  %180 = add i64 %smax159, 1
  %181 = sub i64 %180, %156
  %182 = sub nsw i64 %176, %156
  %xtraiter = and i64 %182, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %183 = sub nsw i64 %156, %176
  %184 = icmp ugt i64 %183, -4
  %min.iters.check = icmp ult i64 %181, 4
  %n.vec = and i64 %181, -4
  %ind.end = add i64 %n.vec, %156
  %cmp.n = icmp eq i64 %181, %n.vec
  br label %.preheader81

.preheader81:                                     ; preds = %.preheader81.lr.ph, %._crit_edge95
  %indvars.iv139 = phi i64 [ 1, %.preheader81.lr.ph ], [ %indvars.iv.next140, %._crit_edge95 ]
  br i1 %175, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader81
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %indvars.iv131.prol = phi i64 [ %indvars.iv.next132.prol, %.lr.ph.prol ], [ %176, %.lr.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %185 = getelementptr inbounds i64, ptr %170, i64 %indvars.iv131.prol
  %186 = load i64, ptr %185, align 8, !tbaa !16
  %187 = getelementptr i8, ptr %185, i64 -8
  %188 = load i64, ptr %187, align 8, !tbaa !16
  %189 = call i64 @llvm.fshl.i64(i64 %186, i64 %188, i64 1)
  store i64 %189, ptr %185, align 8, !tbaa !16
  %indvars.iv.next132.prol = add nsw i64 %indvars.iv131.prol, -1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !18

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %indvars.iv131.unr = phi i64 [ %176, %.lr.ph.preheader ], [ %indvars.iv.next132.prol, %.lr.ph.prol ]
  br i1 %184, label %._crit_edge, label %.lr.ph

._crit_edge97:                                    ; preds = %._crit_edge95, %.._crit_edge97_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge97_crit_edge ], [ %176, %._crit_edge95 ]
  %190 = load i32, ptr %3, align 4, !tbaa !5
  %191 = sub i32 0, %190
  %192 = and i32 %191, 63
  %193 = zext nneg i32 %192 to i64
  %194 = lshr i64 -1, %193
  %195 = getelementptr inbounds i64, ptr %170, i64 %.pre-phi
  %196 = load i64, ptr %195, align 8, !tbaa !16
  %197 = and i64 %194, %196
  store i64 %197, ptr %195, align 8, !tbaa !16
  %.not77102 = icmp sgt i32 %152, %154
  br i1 %.not77102, label %._crit_edge105, label %.preheader.preheader

.preheader.preheader:                             ; preds = %._crit_edge97
  %198 = add nsw i32 %154, 1
  %wide.trip.count148 = sext i32 %198 to i64
  br label %.preheader

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %.preheader81
  %199 = load i64, ptr %171, align 8, !tbaa !16
  %200 = shl i64 %199, 1
  store i64 %200, ptr %171, align 8, !tbaa !16
  %201 = getelementptr inbounds [1000001 x i8], ptr @str, i64 0, i64 %indvars.iv139
  %202 = load i8, ptr %201, align 1, !tbaa !11
  %203 = sext i8 %202 to i64
  %204 = add nsw i64 %203, -48
  %205 = getelementptr inbounds [11 x [15627 x i64]], ptr @bit, i64 0, i64 %204
  br i1 %.not7991, label %._crit_edge95, label %.lr.ph94.preheader

.lr.ph94.preheader:                               ; preds = %._crit_edge
  br i1 %min.iters.check, label %.lr.ph94.preheader163, label %vector.memcheck

.lr.ph94.preheader163:                            ; preds = %middle.block, %vector.memcheck, %.lr.ph94.preheader
  %indvars.iv134.ph = phi i64 [ %156, %vector.memcheck ], [ %156, %.lr.ph94.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph94

vector.memcheck:                                  ; preds = %.lr.ph94.preheader
  %206 = mul nsw i64 %203, 125016
  %scevgep156 = getelementptr i8, ptr %scevgep155, i64 %206
  %scevgep158 = getelementptr i8, ptr %scevgep157, i64 %206
  %bound0 = icmp ult ptr %scevgep, %scevgep158
  %bound1 = icmp ult ptr %scevgep156, %scevgep154
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph94.preheader163, label %vector.body

vector.body:                                      ; preds = %vector.memcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.memcheck ]
  %offset.idx = add i64 %index, %156
  %207 = getelementptr inbounds i64, ptr %205, i64 %offset.idx
  %208 = getelementptr inbounds i8, ptr %207, i64 16
  %wide.load = load <2 x i64>, ptr %207, align 8, !tbaa !16, !alias.scope !20
  %wide.load160 = load <2 x i64>, ptr %208, align 8, !tbaa !16, !alias.scope !20
  %209 = getelementptr inbounds i64, ptr %170, i64 %offset.idx
  %210 = getelementptr inbounds i8, ptr %209, i64 16
  %wide.load161 = load <2 x i64>, ptr %209, align 8, !tbaa !16, !alias.scope !23, !noalias !20
  %wide.load162 = load <2 x i64>, ptr %210, align 8, !tbaa !16, !alias.scope !23, !noalias !20
  %211 = and <2 x i64> %wide.load161, %wide.load
  %212 = and <2 x i64> %wide.load162, %wide.load160
  store <2 x i64> %211, ptr %209, align 8, !tbaa !16, !alias.scope !23, !noalias !20
  store <2 x i64> %212, ptr %210, align 8, !tbaa !16, !alias.scope !23, !noalias !20
  %index.next = add nuw i64 %index, 4
  %213 = icmp eq i64 %index.next, %n.vec
  br i1 %213, label %middle.block, label %vector.body, !llvm.loop !25

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge95, label %.lr.ph94.preheader163

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv131 = phi i64 [ %indvars.iv.next132.3, %.lr.ph ], [ %indvars.iv131.unr, %.lr.ph.prol.loopexit ]
  %214 = getelementptr inbounds i64, ptr %170, i64 %indvars.iv131
  %215 = load i64, ptr %214, align 8, !tbaa !16
  %216 = getelementptr i8, ptr %214, i64 -8
  %217 = load i64, ptr %216, align 8, !tbaa !16
  %218 = call i64 @llvm.fshl.i64(i64 %215, i64 %217, i64 1)
  store i64 %218, ptr %214, align 8, !tbaa !16
  %219 = getelementptr i64, ptr %170, i64 %indvars.iv131
  %220 = getelementptr i8, ptr %219, i64 -8
  %221 = getelementptr i8, ptr %219, i64 -16
  %222 = load i64, ptr %221, align 8, !tbaa !16
  %223 = call i64 @llvm.fshl.i64(i64 %217, i64 %222, i64 1)
  store i64 %223, ptr %220, align 8, !tbaa !16
  %224 = getelementptr i64, ptr %170, i64 %indvars.iv131
  %225 = getelementptr i8, ptr %224, i64 -16
  %226 = getelementptr i8, ptr %224, i64 -24
  %227 = load i64, ptr %226, align 8, !tbaa !16
  %228 = call i64 @llvm.fshl.i64(i64 %222, i64 %227, i64 1)
  store i64 %228, ptr %225, align 8, !tbaa !16
  %229 = getelementptr i64, ptr %170, i64 %indvars.iv131
  %230 = getelementptr i8, ptr %229, i64 -24
  %231 = getelementptr i8, ptr %229, i64 -32
  %232 = load i64, ptr %231, align 8, !tbaa !16
  %233 = call i64 @llvm.fshl.i64(i64 %227, i64 %232, i64 1)
  store i64 %233, ptr %230, align 8, !tbaa !16
  %indvars.iv.next132.3 = add nsw i64 %indvars.iv131, -4
  %234 = icmp sgt i64 %indvars.iv.next132.3, %156
  br i1 %234, label %.lr.ph, label %._crit_edge, !llvm.loop !28

._crit_edge95:                                    ; preds = %.lr.ph94, %middle.block, %._crit_edge
  %indvars.iv.next140 = add nuw nsw i64 %indvars.iv139, 1
  %exitcond143.not = icmp eq i64 %indvars.iv.next140, %wide.trip.count142
  br i1 %exitcond143.not, label %._crit_edge97, label %.preheader81, !llvm.loop !29

.lr.ph94:                                         ; preds = %.lr.ph94.preheader163, %.lr.ph94
  %indvars.iv134 = phi i64 [ %indvars.iv.next135, %.lr.ph94 ], [ %indvars.iv134.ph, %.lr.ph94.preheader163 ]
  %235 = getelementptr inbounds i64, ptr %205, i64 %indvars.iv134
  %236 = load i64, ptr %235, align 8, !tbaa !16
  %237 = getelementptr inbounds i64, ptr %170, i64 %indvars.iv134
  %238 = load i64, ptr %237, align 8, !tbaa !16
  %239 = and i64 %238, %236
  store i64 %239, ptr %237, align 8, !tbaa !16
  %indvars.iv.next135 = add nsw i64 %indvars.iv134, 1
  %exitcond138.not = icmp eq i64 %indvars.iv.next135, %wide.trip.count137
  br i1 %exitcond138.not, label %._crit_edge95, label %.lr.ph94, !llvm.loop !30

.preheader:                                       ; preds = %.preheader.preheader, %248
  %indvars.iv144 = phi i64 [ %156, %.preheader.preheader ], [ %indvars.iv.next145, %248 ]
  %.064103 = phi i32 [ 0, %.preheader.preheader ], [ %.1.lcssa, %248 ]
  %240 = getelementptr inbounds i64, ptr %170, i64 %indvars.iv144
  %.promoted = load i64, ptr %240, align 8, !tbaa !16
  %.not7898 = icmp eq i64 %.promoted, 0
  br i1 %.not7898, label %248, label %.lr.ph100

._crit_edge105:                                   ; preds = %248, %._crit_edge97
  %.064.lcssa = phi i32 [ 0, %._crit_edge97 ], [ %.1.lcssa, %248 ]
  %241 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %.064.lcssa)
  br label %249

.lr.ph100:                                        ; preds = %.preheader, %.lr.ph100
  %.199 = phi i32 [ %246, %.lr.ph100 ], [ %.064103, %.preheader ]
  %242 = phi i64 [ %247, %.lr.ph100 ], [ %.promoted, %.preheader ]
  %243 = and i64 %242, 65535
  %244 = getelementptr inbounds [65537 x i32], ptr @bits, i64 0, i64 %243
  %245 = load i32, ptr %244, align 4, !tbaa !5
  %246 = add nsw i32 %245, %.199
  %247 = lshr i64 %242, 16
  %.not78 = icmp ult i64 %242, 65536
  br i1 %.not78, label %._crit_edge101, label %.lr.ph100, !llvm.loop !31

._crit_edge101:                                   ; preds = %.lr.ph100
  store i64 %247, ptr %240, align 8, !tbaa !16
  br label %248

248:                                              ; preds = %._crit_edge101, %.preheader
  %.1.lcssa = phi i32 [ %246, %._crit_edge101 ], [ %.064103, %.preheader ]
  %indvars.iv.next145 = add nsw i64 %indvars.iv144, 1
  %exitcond149.not = icmp eq i64 %indvars.iv.next145, %wide.trip.count148
  br i1 %exitcond149.not, label %._crit_edge105, label %.preheader, !llvm.loop !32

249:                                              ; preds = %149, %._crit_edge105, %.split89.us, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %250 = load i32, ptr @t, align 4, !tbaa !5
  %251 = add nsw i32 %250, -1
  store i32 %251, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %250, 0
  br i1 %.not, label %._crit_edge110, label %.lr.ph109

._crit_edge110:                                   ; preds = %249, %4
  ret i32 0
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z9shiftLeftPyii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z6setBitPyib(ptr noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z10shiftRightPyii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.fshl.i64(i64, i64, i64) #6

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #6

attributes #0 = { mustprogress norecurse 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree 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 #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = !{!21}
!21 = distinct !{!21, !22}
!22 = distinct !{!22, !"LVerDomain"}
!23 = !{!24}
!24 = distinct !{!24, !22}
!25 = distinct !{!25, !10, !26, !27}
!26 = !{!"llvm.loop.isvectorized", i32 1}
!27 = !{!"llvm.loop.unroll.runtime.disable"}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10, !26}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !10}


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