; LLVM IR from tangjz/acm-icpc :: hdu (5688)

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

%struct.Hash = type { i32, i32, i32, i32 }

@n = external dso_local global i32, align 4
@cnt = external dso_local global [26 x i32], align 16
@tot = external dso_local global i32, align 4
@lnk = external dso_local global [3518261 x i32], align 16
@e = external dso_local global [1000010 x %struct.Hash], align 16
@str = external dso_local global [41 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [62 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 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 %struct.Hash, align 4
  store i32 0, ptr %1, align 4
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %10 = load i32, ptr @tot, align 4, !tbaa !5
  %11 = add nsw i32 %10, 1
  store i32 %11, ptr @tot, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %169, %0
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr @n, align 4, !tbaa !5
  %15 = icmp ne i32 %13, 0
  br i1 %15, label %16, label %170

16:                                               ; preds = %12
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @str)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %55, %16
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [41 x i8], ptr @str, i64 0, i64 %20
  %22 = load i8, ptr %21, align 1, !tbaa !9
  %23 = icmp ne i8 %22, 0
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %18
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [41 x i8], ptr @str, i64 0, i64 %27
  %29 = load i8, ptr %28, align 1, !tbaa !9
  %30 = sext i8 %29 to i32
  %31 = icmp sge i32 %30, 65
  br i1 %31, label %32, label %39

32:                                               ; preds = %25
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [41 x i8], ptr @str, i64 0, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %37 = sext i8 %36 to i32
  %38 = icmp sle i32 %37, 90
  br label %39

39:                                               ; preds = %32, %25
  %40 = phi i1 [ false, %25 ], [ %38, %32 ]
  br i1 %40, label %41, label %42

41:                                               ; preds = %39
  br label %44

42:                                               ; preds = %39
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 21, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

43:                                               ; No predecessors!
  br label %44

44:                                               ; preds = %43, %41
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [41 x i8], ptr @str, i64 0, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !9
  %49 = sext i8 %48 to i32
  %50 = sub nsw i32 %49, 65
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %52, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %44
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %2, align 4, !tbaa !5
  br label %18, !llvm.loop !10

58:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %96, %58
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = icmp slt i32 %60, 26
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %99

63:                                               ; preds = %59
  br label %64

64:                                               ; preds = %89, %63
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %70, label %95

70:                                               ; preds = %64
  %71 = load i32, ptr %3, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = mul nsw i64 %72, 31
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = add nsw i64 %73, %75
  %77 = add nsw i64 %76, 1
  %78 = srem i64 %77, 691041943
  %79 = trunc i64 %78 to i32
  store i32 %79, ptr %3, align 4, !tbaa !5
  %80 = load i32, ptr %4, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = mul nsw i64 %81, 37
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = add nsw i64 %82, %84
  %86 = add nsw i64 %85, 1
  %87 = srem i64 %86, 1010347633
  %88 = trunc i64 %87 to i32
  store i32 %88, ptr %4, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %70
  %90 = load i32, ptr %5, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = add nsw i32 %93, -1
  store i32 %94, ptr %92, align 4, !tbaa !5
  br label %64, !llvm.loop !12

95:                                               ; preds = %64
  br label %96

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

99:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %100 = load i32, ptr %3, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = shl i64 %101, 31
  %103 = load i32, ptr %4, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = or i64 %102, %104
  %106 = srem i64 %105, 3518261
  %107 = trunc i64 %106 to i32
  store i32 %107, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %108 = load i32, ptr %6, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [3518261 x i32], ptr @lnk, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  store i32 %111, ptr %7, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %140, %99
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = icmp sgt i32 %113, 0
  br i1 %114, label %115, label %146

115:                                              ; preds = %112
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [1000010 x %struct.Hash], ptr @e, i64 0, i64 %117
  %119 = getelementptr inbounds %struct.Hash, ptr %118, i32 0, i32 1
  %120 = load i32, ptr %119, align 4, !tbaa !14
  %121 = load i32, ptr %3, align 4, !tbaa !5
  %122 = icmp eq i32 %120, %121
  br i1 %122, label %123, label %139

123:                                              ; preds = %115
  %124 = load i32, ptr %7, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [1000010 x %struct.Hash], ptr @e, i64 0, i64 %125
  %127 = getelementptr inbounds %struct.Hash, ptr %126, i32 0, i32 2
  %128 = load i32, ptr %127, align 8, !tbaa !16
  %129 = load i32, ptr %4, align 4, !tbaa !5
  %130 = icmp eq i32 %128, %129
  br i1 %130, label %131, label %139

131:                                              ; preds = %123
  %132 = load i32, ptr %7, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [1000010 x %struct.Hash], ptr @e, i64 0, i64 %133
  %135 = getelementptr inbounds %struct.Hash, ptr %134, i32 0, i32 3
  %136 = load i32, ptr %135, align 4, !tbaa !17
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %135, align 4, !tbaa !17
  %138 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %136)
  br label %146

139:                                              ; preds = %123, %115
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %7, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [1000010 x %struct.Hash], ptr @e, i64 0, i64 %142
  %144 = getelementptr inbounds %struct.Hash, ptr %143, i32 0, i32 0
  %145 = load i32, ptr %144, align 16, !tbaa !18
  store i32 %145, ptr %7, align 4, !tbaa !5
  br label %112, !llvm.loop !19

146:                                              ; preds = %131, %112
  %147 = load i32, ptr %7, align 4, !tbaa !5
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %169, label %149

149:                                              ; preds = %146
  %150 = call i32 @puts(ptr noundef @.str.5)
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  %151 = getelementptr inbounds %struct.Hash, ptr %8, i32 0, i32 0
  %152 = load i32, ptr %6, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [3518261 x i32], ptr @lnk, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !5
  store i32 %155, ptr %151, align 4, !tbaa !18
  %156 = getelementptr inbounds %struct.Hash, ptr %8, i32 0, i32 1
  %157 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %157, ptr %156, align 4, !tbaa !14
  %158 = getelementptr inbounds %struct.Hash, ptr %8, i32 0, i32 2
  %159 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %159, ptr %158, align 4, !tbaa !16
  %160 = getelementptr inbounds %struct.Hash, ptr %8, i32 0, i32 3
  store i32 1, ptr %160, align 4, !tbaa !17
  %161 = load i32, ptr @tot, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [1000010 x %struct.Hash], ptr @e, i64 0, i64 %162
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %163, ptr align 4 %8, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  %164 = load i32, ptr @tot, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr @tot, align 4, !tbaa !5
  %166 = load i32, ptr %6, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [3518261 x i32], ptr @lnk, i64 0, i64 %167
  store i32 %164, ptr %168, align 4, !tbaa !5
  br label %169

169:                                              ; preds = %149, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %12, !llvm.loop !21

170:                                              ; preds = %12
  ret i32 0
}

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

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

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

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

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

declare i32 @puts(ptr noundef) #1

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

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

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

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


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

%struct.Hash = type { i32, i32, i32, i32 }

@n = external dso_local global i32, align 4
@cnt = external dso_local local_unnamed_addr global [26 x i32], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@lnk = external dso_local local_unnamed_addr global [3518261 x i32], align 16
@e = external dso_local local_unnamed_addr global [1000010 x %struct.Hash], align 16
@str = external dso_local global [41 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [62 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

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

.lr.ph59:                                         ; preds = %0, %63
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @str)
  %7 = load i8, ptr @str, align 16, !tbaa !9
  %.not3641 = icmp eq i8 %7, 0
  br i1 %.not3641, label %.preheader.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph59, %10
  %indvars.iv = phi i64 [ %indvars.iv.next, %10 ], [ 0, %.lr.ph59 ]
  %8 = phi i8 [ %16, %10 ], [ %7, %.lr.ph59 ]
  %9 = add i8 %8, -65
  %or.cond = icmp ult i8 %9, 26
  br i1 %or.cond, label %10, label %.critedge

.critedge:                                        ; preds = %.lr.ph
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 21, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #3
  unreachable

10:                                               ; preds = %.lr.ph
  %11 = zext nneg i8 %9 to i64
  %12 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %11
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = add nsw i32 %13, 1
  store i32 %14, ptr %12, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = getelementptr inbounds [41 x i8], ptr @str, i64 0, i64 %indvars.iv.next
  %16 = load i8, ptr %15, align 1, !tbaa !9
  %.not36 = icmp eq i8 %16, 0
  br i1 %.not36, label %.preheader.preheader, label %.lr.ph, !llvm.loop !10

.preheader.preheader:                             ; preds = %10, %.lr.ph59
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader._crit_edge
  %indvars.iv66 = phi i64 [ %19, %.preheader._crit_edge ], [ 0, %.preheader.preheader ]
  %.02850 = phi i32 [ %.1.lcssa, %.preheader._crit_edge ], [ 0, %.preheader.preheader ]
  %.02949 = phi i32 [ %.130.lcssa, %.preheader._crit_edge ], [ 0, %.preheader.preheader ]
  %17 = getelementptr inbounds [26 x i32], ptr @cnt, i64 0, i64 %indvars.iv66
  %.promoted = load i32, ptr %17, align 4, !tbaa !5
  %18 = icmp sgt i32 %.promoted, 0
  %19 = add nuw nsw i64 %indvars.iv66, 1
  br i1 %18, label %.lr.ph45, label %.preheader._crit_edge

20:                                               ; preds = %.preheader._crit_edge
  %21 = sext i32 %.1.lcssa to i64
  %22 = shl nsw i64 %21, 31
  %23 = sext i32 %.130.lcssa to i64
  %24 = or i64 %22, %23
  %25 = srem i64 %24, 3518261
  %26 = getelementptr inbounds [3518261 x i32], ptr @lnk, i64 0, i64 %25
  %.03251 = load i32, ptr %26, align 4, !tbaa !5
  %27 = icmp sgt i32 %.03251, 0
  br i1 %27, label %.lr.ph54, label %._crit_edge55

.lr.ph45:                                         ; preds = %.preheader, %.lr.ph45
  %.144 = phi i32 [ %33, %.lr.ph45 ], [ %.02850, %.preheader ]
  %.13043 = phi i32 [ %38, %.lr.ph45 ], [ %.02949, %.preheader ]
  %28 = phi i32 [ %39, %.lr.ph45 ], [ %.promoted, %.preheader ]
  %29 = sext i32 %.144 to i64
  %30 = mul nsw i64 %29, 31
  %31 = add nsw i64 %19, %30
  %32 = srem i64 %31, 691041943
  %33 = trunc nsw i64 %32 to i32
  %34 = sext i32 %.13043 to i64
  %35 = mul nsw i64 %34, 37
  %36 = add nsw i64 %19, %35
  %37 = srem i64 %36, 1010347633
  %38 = trunc nsw i64 %37 to i32
  %39 = add nsw i32 %28, -1
  %40 = icmp ugt i32 %28, 1
  br i1 %40, label %.lr.ph45, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph45
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %.preheader._crit_edge

.preheader._crit_edge:                            ; preds = %.preheader, %._crit_edge
  %.130.lcssa = phi i32 [ %38, %._crit_edge ], [ %.02949, %.preheader ]
  %.1.lcssa = phi i32 [ %33, %._crit_edge ], [ %.02850, %.preheader ]
  %exitcond.not = icmp eq i64 %19, 26
  br i1 %exitcond.not, label %20, label %.preheader, !llvm.loop !13

.lr.ph54:                                         ; preds = %20, %54
  %.03252 = phi i32 [ %.032, %54 ], [ %.03251, %20 ]
  %41 = zext nneg i32 %.03252 to i64
  %42 = getelementptr inbounds [1000010 x %struct.Hash], ptr @e, i64 0, i64 %41
  %43 = getelementptr inbounds i8, ptr %42, i64 4
  %44 = load i32, ptr %43, align 4, !tbaa !14
  %45 = icmp eq i32 %44, %.1.lcssa
  br i1 %45, label %46, label %54

46:                                               ; preds = %.lr.ph54
  %47 = getelementptr inbounds i8, ptr %42, i64 8
  %48 = load i32, ptr %47, align 8, !tbaa !16
  %49 = icmp eq i32 %48, %.130.lcssa
  br i1 %49, label %.thread, label %54

.thread:                                          ; preds = %46
  %50 = getelementptr inbounds i8, ptr %42, i64 12
  %51 = load i32, ptr %50, align 4, !tbaa !17
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %50, align 4, !tbaa !17
  %53 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %51)
  br label %63

54:                                               ; preds = %.lr.ph54, %46
  %.032 = load i32, ptr %42, align 16, !tbaa !5
  %55 = icmp sgt i32 %.032, 0
  br i1 %55, label %.lr.ph54, label %._crit_edge55, !llvm.loop !18

._crit_edge55:                                    ; preds = %54, %20
  %.032.lcssa = phi i32 [ %.03251, %20 ], [ %.032, %54 ]
  %.not37 = icmp eq i32 %.032.lcssa, 0
  br i1 %.not37, label %56, label %63

56:                                               ; preds = %._crit_edge55
  %57 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.5)
  %58 = load i32, ptr %26, align 4, !tbaa !5
  %59 = load i32, ptr @tot, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [1000010 x %struct.Hash], ptr @e, i64 0, i64 %60
  store i32 %58, ptr %61, align 16, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %61, i64 4
  store i32 %.1.lcssa, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !5
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %61, i64 8
  store i32 %.130.lcssa, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !5
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %61, i64 12
  store i32 1, ptr %.sroa.6.0..sroa_idx, align 4, !tbaa !5
  %62 = add nsw i32 %59, 1
  store i32 %62, ptr @tot, align 4, !tbaa !5
  store i32 %59, ptr %26, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %.thread, %56, %._crit_edge55
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %65 = add nsw i32 %64, -1
  store i32 %65, ptr @n, align 4, !tbaa !5
  %.not = icmp eq i32 %64, 0
  br i1 %.not, label %._crit_edge60, label %.lr.ph59, !llvm.loop !19

._crit_edge60:                                    ; preds = %63, %0
  ret i32 0
}

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

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

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

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

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 = { 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 #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind }

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

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


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