; LLVM IR from tangjz/acm-icpc :: codeforces/gym (102028H)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global [200001 x i32], align 16
@rk = external dso_local global [200001 x i32], align 16
@ht = external dso_local global [200001 x i32], align 16
@tot = external dso_local global i32, align 4
@stk = external dso_local global [200001 x i32], align 16
@bit = external dso_local global [2 x [200001 x i64]], align 16
@ans = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z7bit_updix(i32 noundef, i64 noundef) #0

; 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z7bit_quei(i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12suffix_arrayv() #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %5

5:                                                ; preds = %129, %0
  %6 = load i32, ptr @t, align 4, !tbaa !5
  %7 = add nsw i32 %6, -1
  store i32 %7, ptr @t, align 4, !tbaa !5
  %8 = icmp ne i32 %6, 0
  br i1 %8, label %9, label %132

9:                                                ; preds = %5
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %21, %9
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %16, label %15

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

16:                                               ; preds = %11
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds i32, ptr @a, i64 %18
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %19)
  br label %21

21:                                               ; preds = %16
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !9

24:                                               ; preds = %15
  %25 = load i32, ptr @n, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %26
  store i32 0, ptr %27, align 4, !tbaa !5
  call void @_Z12suffix_arrayv()
  store i64 0, ptr @ans, align 8, !tbaa !11
  store i32 0, ptr @tot, align 4, !tbaa !5
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = mul i64 %29, 8
  call void @llvm.memset.p0.i64(ptr align 8 getelementptr inbounds (i64, ptr @bit, i64 1), i8 0, i64 %30, i1 false)
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = mul i64 %32, 8
  call void @llvm.memset.p0.i64(ptr align 8 getelementptr inbounds (i64, ptr getelementptr inbounds ([2 x [200001 x i64]], ptr @bit, i64 0, i64 1), i64 1), i8 0, i64 %33, i1 false)
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %35
  store i32 2147483647, ptr %36, align 4, !tbaa !5
  %37 = load i32, ptr @n, align 4, !tbaa !5
  %38 = load i32, ptr @tot, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %39
  store i32 %37, ptr %40, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = sub nsw i32 %41, 1
  store i32 %42, ptr %3, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %126, %24
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = icmp sge i32 %44, 0
  br i1 %45, label %47, label %46

46:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %129

47:                                               ; preds = %43
  br label %48

48:                                               ; preds = %88, %47
  %49 = load i32, ptr @tot, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = icmp slt i32 %55, %59
  br i1 %60, label %61, label %91

61:                                               ; preds = %48
  %62 = load i32, ptr @tot, align 4, !tbaa !5
  %63 = sub nsw i32 %62, 1
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = load i32, ptr @tot, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = sub nsw i32 0, %73
  %75 = sext i32 %74 to i64
  call void @_Z7bit_updix(i32 noundef %66, i64 noundef %75)
  %76 = load i32, ptr @tot, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = load i32, ptr @tot, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  call void @_Z7bit_updix(i32 noundef %79, i64 noundef %87)
  br label %88

88:                                               ; preds = %61
  %89 = load i32, ptr @tot, align 4, !tbaa !5
  %90 = add nsw i32 %89, -1
  store i32 %90, ptr @tot, align 4, !tbaa !5
  br label %48, !llvm.loop !13

91:                                               ; preds = %48
  %92 = load i32, ptr %3, align 4, !tbaa !5
  %93 = load i32, ptr @tot, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr @tot, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %95
  store i32 %92, ptr %96, align 4, !tbaa !5
  %97 = load i32, ptr @tot, align 4, !tbaa !5
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  call void @_Z7bit_updix(i32 noundef %101, i64 noundef %106)
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = sub nsw i32 0, %111
  %113 = sext i32 %112 to i64
  call void @_Z7bit_updix(i32 noundef %107, i64 noundef %113)
  %114 = load i32, ptr %3, align 4, !tbaa !5
  %115 = load i32, ptr %3, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [200001 x i32], ptr @rk, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [200001 x i32], ptr @ht, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = add nsw i32 %114, %121
  %123 = call noundef i64 @_Z7bit_quei(i32 noundef %122)
  %124 = load i64, ptr @ans, align 8, !tbaa !11
  %125 = add nsw i64 %124, %123
  store i64 %125, ptr @ans, align 8, !tbaa !11
  br label %126

126:                                              ; preds = %91
  %127 = load i32, ptr %3, align 4, !tbaa !5
  %128 = add nsw i32 %127, -1
  store i32 %128, ptr %3, align 4, !tbaa !5
  br label %43, !llvm.loop !14

129:                                              ; preds = %46
  %130 = load i64, ptr @ans, align 8, !tbaa !11
  %131 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %130)
  br label %5, !llvm.loop !15

132:                                              ; preds = %5
  ret i32 0
}

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !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"

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global [200001 x i32], align 16
@rk = external dso_local local_unnamed_addr global [200001 x i32], align 16
@ht = external dso_local local_unnamed_addr global [200001 x i32], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@stk = external dso_local local_unnamed_addr global [200001 x i32], align 16
@bit = external dso_local local_unnamed_addr global [2 x [200001 x i64]], align 16
@ans = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z7bit_updix(i32 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z7bit_quei(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12suffix_arrayv() local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %2 = load i32, ptr @t, align 4, !tbaa !5
  %3 = add nsw i32 %2, -1
  store i32 %3, ptr @t, align 4, !tbaa !5
  %.not32 = icmp eq i32 %2, 0
  br i1 %.not32, label %._crit_edge35, label %.lr.ph34

.lr.ph34:                                         ; preds = %0, %._crit_edge31
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %.lr.ph34.._crit_edge_crit_edge

.lr.ph34.._crit_edge_crit_edge:                   ; preds = %.lr.ph34
  %.pre = sext i32 %5 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph34.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.lr.ph34.._crit_edge_crit_edge ], [ %16, %.lr.ph ]
  %7 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %.pre-phi
  store i32 0, ptr %7, align 4, !tbaa !5
  tail call void @_Z12suffix_arrayv()
  store i64 0, ptr @ans, align 8, !tbaa !9
  store i32 0, ptr @tot, align 4, !tbaa !5
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = shl nsw i64 %9, 3
  tail call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @bit, i64 8), i8 0, i64 %10, i1 false)
  tail call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @bit, i64 1600016), i8 0, i64 %10, i1 false)
  %11 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %9
  store i32 2147483647, ptr %11, align 4, !tbaa !5
  store i32 %8, ptr @stk, align 16, !tbaa !5
  %12 = icmp sgt i32 %8, 0
  br i1 %12, label %.preheader, label %._crit_edge31

.lr.ph:                                           ; preds = %.lr.ph34, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph34 ]
  %13 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv
  %14 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %13)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = icmp slt i64 %indvars.iv.next, %16
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader:                                       ; preds = %._crit_edge, %._crit_edge23
  %indvars.iv41 = phi i64 [ %indvars.iv.next42, %._crit_edge23 ], [ %9, %._crit_edge ]
  %indvars.iv.next42 = add nsw i64 %indvars.iv41, -1
  %18 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %indvars.iv.next42
  %19 = load i32, ptr @tot, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = load i32, ptr %18, align 4, !tbaa !5
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %.lr.ph22, label %._crit_edge23

._crit_edge31:                                    ; preds = %._crit_edge23, %._crit_edge
  %28 = phi i64 [ 0, %._crit_edge ], [ %74, %._crit_edge23 ]
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %28)
  %30 = load i32, ptr @t, align 4, !tbaa !5
  %31 = add nsw i32 %30, -1
  store i32 %31, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %30, 0
  br i1 %.not, label %._crit_edge35, label %.lr.ph34, !llvm.loop !13

.lr.ph22:                                         ; preds = %.preheader, %.lr.ph22
  %32 = phi i32 [ %55, %.lr.ph22 ], [ %25, %.preheader ]
  %33 = phi i32 [ %49, %.lr.ph22 ], [ %19, %.preheader ]
  %34 = add nsw i32 %33, -1
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = sub nsw i32 0, %32
  %39 = sext i32 %38 to i64
  tail call void @_Z7bit_updix(i32 noundef %37, i64 noundef %39)
  %40 = load i32, ptr @tot, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  tail call void @_Z7bit_updix(i32 noundef %43, i64 noundef %47)
  %48 = load i32, ptr @tot, align 4, !tbaa !5
  %49 = add nsw i32 %48, -1
  store i32 %49, ptr @tot, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [200001 x i32], ptr @a, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = load i32, ptr %18, align 4, !tbaa !5
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %.lr.ph22, label %._crit_edge23, !llvm.loop !14

._crit_edge23:                                    ; preds = %.lr.ph22, %.preheader
  %.lcssa19 = phi i32 [ %19, %.preheader ], [ %49, %.lr.ph22 ]
  %.lcssa18 = phi i32 [ %22, %.preheader ], [ %52, %.lr.ph22 ]
  %.lcssa15 = phi i32 [ %26, %.preheader ], [ %56, %.lr.ph22 ]
  %58 = add nsw i32 %.lcssa19, 1
  store i32 %58, ptr @tot, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [200001 x i32], ptr @stk, i64 0, i64 %59
  %61 = trunc nuw nsw i64 %indvars.iv.next42 to i32
  store i32 %61, ptr %60, align 4, !tbaa !5
  %62 = sext i32 %.lcssa15 to i64
  tail call void @_Z7bit_updix(i32 noundef %.lcssa18, i64 noundef %62)
  %63 = load i32, ptr %18, align 4, !tbaa !5
  %64 = sub nsw i32 0, %63
  %65 = sext i32 %64 to i64
  tail call void @_Z7bit_updix(i32 noundef %61, i64 noundef %65)
  %66 = getelementptr inbounds [200001 x i32], ptr @rk, i64 0, i64 %indvars.iv.next42
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [200001 x i32], ptr @ht, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = add nsw i32 %70, %61
  %72 = tail call noundef i64 @_Z7bit_quei(i32 noundef %71)
  %73 = load i64, ptr @ans, align 8, !tbaa !9
  %74 = add nsw i64 %73, %72
  store i64 %74, ptr @ans, align 8, !tbaa !9
  %75 = icmp sgt i64 %indvars.iv41, 1
  br i1 %75, label %.preheader, label %._crit_edge31, !llvm.loop !15

._crit_edge35:                                    ; preds = %._crit_edge31, %0
  ret i32 0
}

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { 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" }

!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 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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