; LLVM IR from tangjz/acm-icpc :: TDL_training/2015-10-11 (B - Cheap B-Subsequence - dby)

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

@s = external dso_local global [103 x i8], align 16
@B = external dso_local global i32, align 4
@f = external dso_local global [103 x i32], align 16
@p = external dso_local global [30 x [103 x i32]], align 16
@c = external dso_local global [30 x [103 x i32]], align 16
@cnt = external dso_local global [30 x i32], align 16
@.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 [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = 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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %177, %0
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = icmp sle i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %180

20:                                               ; preds = %15
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @s, ptr noundef @B)
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %22)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %24 = call i64 @strlen(ptr noundef @s) #5
  %25 = trunc i64 %24 to i32
  store i32 %25, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %35, %20
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = load i32, ptr @B, align 4, !tbaa !5
  %29 = icmp sle i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %38

31:                                               ; preds = %26
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %33
  store i32 1073741823, ptr %34, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %31
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %6, align 4, !tbaa !5
  br label %26, !llvm.loop !9

38:                                               ; preds = %30
  store i32 0, ptr @f, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %74, %38
  %40 = load i32, ptr %7, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 26
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %77

43:                                               ; preds = %39
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [30 x i32], ptr @cnt, i64 0, i64 %45
  %47 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %46)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %70, %43
  %49 = load i32, ptr %8, align 4, !tbaa !5
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [30 x i32], ptr @cnt, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = icmp slt i32 %49, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %48
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %73

56:                                               ; preds = %48
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [30 x [103 x i32]], ptr @p, i64 0, i64 %58
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [103 x i32], ptr %59, i64 0, i64 %61
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [30 x [103 x i32]], ptr @c, i64 0, i64 %64
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [103 x i32], ptr %65, i64 0, i64 %67
  %69 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %62, ptr noundef %68)
  br label %70

70:                                               ; preds = %56
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %8, align 4, !tbaa !5
  br label %48, !llvm.loop !11

73:                                               ; preds = %55
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %7, align 4, !tbaa !5
  br label %39, !llvm.loop !12

77:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %168, %77
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %171

83:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %84 = load i32, ptr @B, align 4, !tbaa !5
  store i32 %84, ptr %10, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %164, %83
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %89, label %88

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

89:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %90 = load i32, ptr %9, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [103 x i8], ptr @s, i64 0, i64 %91
  %93 = load i8, ptr %92, align 1, !tbaa !13
  %94 = sext i8 %93 to i32
  %95 = sub nsw i32 %94, 97
  store i32 %95, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %136, %89
  %97 = load i32, ptr %13, align 4, !tbaa !5
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [30 x i32], ptr @cnt, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = icmp slt i32 %97, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %96
  store i32 20, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %139

104:                                              ; preds = %96
  %105 = load i32, ptr %10, align 4, !tbaa !5
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [30 x [103 x i32]], ptr @p, i64 0, i64 %107
  %109 = load i32, ptr %13, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [103 x i32], ptr %108, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = srem i32 %105, %112
  %114 = icmp eq i32 %113, 0
  br i1 %114, label %115, label %135

115:                                              ; preds = %104
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = load i32, ptr %11, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [30 x [103 x i32]], ptr @p, i64 0, i64 %118
  %120 = load i32, ptr %13, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [103 x i32], ptr %119, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = sdiv i32 %116, %123
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [30 x [103 x i32]], ptr @c, i64 0, i64 %126
  %128 = load i32, ptr %13, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [103 x i32], ptr %127, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = mul nsw i32 %124, %131
  %133 = load i32, ptr %12, align 4, !tbaa !5
  %134 = add nsw i32 %133, %132
  store i32 %134, ptr %12, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %115, %104
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %13, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %13, align 4, !tbaa !5
  br label %96, !llvm.loop !14

139:                                              ; preds = %103
  %140 = load i32, ptr %12, align 4, !tbaa !5
  %141 = load i32, ptr %10, align 4, !tbaa !5
  %142 = sub nsw i32 %141, 1
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = add nsw i32 %140, %145
  %147 = load i32, ptr %10, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = icmp slt i32 %146, %150
  br i1 %151, label %152, label %163

152:                                              ; preds = %139
  %153 = load i32, ptr %10, align 4, !tbaa !5
  %154 = sub nsw i32 %153, 1
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = load i32, ptr %12, align 4, !tbaa !5
  %159 = add nsw i32 %157, %158
  %160 = load i32, ptr %10, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %161
  store i32 %159, ptr %162, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %152, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %10, align 4, !tbaa !5
  %166 = add nsw i32 %165, -1
  store i32 %166, ptr %10, align 4, !tbaa !5
  br label %85, !llvm.loop !15

167:                                              ; preds = %88
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %9, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %9, align 4, !tbaa !5
  br label %78, !llvm.loop !16

171:                                              ; preds = %82
  %172 = load i32, ptr @B, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %175)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %177

177:                                              ; preds = %171
  %178 = load i32, ptr %3, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %3, align 4, !tbaa !5
  br label %15, !llvm.loop !17

180:                                              ; preds = %19
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %181 = load i32, ptr %1, align 4
  ret i32 %181
}

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

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

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

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

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

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 = { nounwind }
attributes #5 = { 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 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !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"

@s = external dso_local global [103 x i8], align 16
@B = external dso_local global i32, align 4
@f = external dso_local local_unnamed_addr global [103 x i32], align 16
@p = external dso_local global [30 x [103 x i32]], align 16
@c = external dso_local global [30 x [103 x i32]], align 16
@cnt = external dso_local global [30 x i32], align 16
@.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 [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %.not71 = icmp slt i32 %3, 1
  br i1 %.not71, label %._crit_edge75, label %.lr.ph74

._crit_edge75:                                    ; preds = %._crit_edge70, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0

.lr.ph74:                                         ; preds = %0, %._crit_edge70
  %.04772 = phi i32 [ %35, %._crit_edge70 ], [ 1, %0 ]
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @s, ptr noundef nonnull @B)
  %5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.04772)
  %6 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @s) #5
  %7 = trunc i64 %6 to i32
  %8 = load i32, ptr @B, align 4, !tbaa !5
  %.not4951 = icmp slt i32 %8, 1
  br i1 %.not4951, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph74
  %9 = add nuw i32 %8, 1
  %wide.trip.count = zext i32 %9 to i64
  %10 = zext nneg i32 %8 to i64
  %min.iters.check = icmp ult i32 %8, 8
  br i1 %min.iters.check, label %.lr.ph.preheader106, label %vector.ph

.lr.ph.preheader106:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %10, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %11 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %offset.idx
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  store <4 x i32> <i32 1073741823, i32 1073741823, i32 1073741823, i32 1073741823>, ptr %11, align 4, !tbaa !5
  store <4 x i32> <i32 1073741823, i32 1073741823, i32 1073741823, i32 1073741823>, ptr %12, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %13 = icmp eq i64 %index.next, %n.vec
  br i1 %13, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %10
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader106

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %.lr.ph74
  store i32 0, ptr @f, align 16, !tbaa !5
  br label %20

.lr.ph:                                           ; preds = %.lr.ph.preheader106, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader106 ]
  %14 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %indvars.iv
  store i32 1073741823, ptr %14, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

.preheader:                                       ; preds = %._crit_edge56
  %15 = icmp slt i32 %7, 1
  %.pre102 = load i32, ptr @B, align 4, !tbaa !5
  %.not5063 = icmp eq i32 %.pre102, 0
  %or.cond = select i1 %15, i1 true, i1 %.not5063
  br i1 %or.cond, label %._crit_edge70, label %.lr.ph66.preheader

.lr.ph66.preheader:                               ; preds = %.preheader
  %16 = sext i32 %.pre102 to i64
  %wide.trip.count100 = and i64 %6, 2147483647
  %.phi.trans.insert = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %16
  %xtraiter = and i64 %16, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %indvars.iv.next87.prol = add nsw i64 %16, -1
  %17 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %indvars.iv.next87.prol
  %18 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %16
  %19 = icmp eq i32 %.pre102, 1
  br label %.lr.ph66

20:                                               ; preds = %._crit_edge, %._crit_edge56
  %indvars.iv82 = phi i64 [ 0, %._crit_edge ], [ %indvars.iv.next83, %._crit_edge56 ]
  %21 = getelementptr inbounds [30 x i32], ptr @cnt, i64 0, i64 %indvars.iv82
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %21)
  %23 = load i32, ptr %21, align 4, !tbaa !5
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph55, label %._crit_edge56

._crit_edge56:                                    ; preds = %.lr.ph55, %20
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next83, 26
  br i1 %exitcond85.not, label %.preheader, label %20, !llvm.loop !14

.lr.ph55:                                         ; preds = %20, %.lr.ph55
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %.lr.ph55 ], [ 0, %20 ]
  %25 = getelementptr inbounds [30 x [103 x i32]], ptr @p, i64 0, i64 %indvars.iv82, i64 %indvars.iv79
  %26 = getelementptr inbounds [30 x [103 x i32]], ptr @c, i64 0, i64 %indvars.iv82, i64 %indvars.iv79
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %25, ptr noundef nonnull %26)
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %28 = load i32, ptr %21, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next80, %29
  br i1 %30, label %.lr.ph55, label %._crit_edge56, !llvm.loop !15

._crit_edge70:                                    ; preds = %._crit_edge67, %.preheader
  %31 = sext i32 %.pre102 to i64
  %32 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %33)
  %35 = add nuw nsw i32 %.04772, 1
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.04772, %36
  br i1 %.not.not, label %.lr.ph74, label %._crit_edge75, !llvm.loop !16

.lr.ph66:                                         ; preds = %.lr.ph66.preheader, %._crit_edge67
  %indvars.iv97 = phi i64 [ 0, %.lr.ph66.preheader ], [ %indvars.iv.next98, %._crit_edge67 ]
  %37 = getelementptr inbounds [103 x i8], ptr @s, i64 0, i64 %indvars.iv97
  %38 = load i8, ptr %37, align 1, !tbaa !17
  %39 = sext i8 %38 to i64
  %40 = add nsw i64 %39, -97
  %41 = getelementptr inbounds [30 x i32], ptr @cnt, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %.lr.ph61.us.preheader, label %.lr.ph66.split.preheader

.lr.ph66.split.preheader:                         ; preds = %.lr.ph66
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  br i1 %lcmp.mod.not, label %.lr.ph66.split.prol.loopexit, label %.lr.ph66.split.prol

.lr.ph66.split.prol:                              ; preds = %.lr.ph66.split.preheader
  %44 = load i32, ptr %17, align 4, !tbaa !5
  %45 = icmp slt i32 %44, %.pre
  br i1 %45, label %46, label %.lr.ph66.split.prol.loopexit

46:                                               ; preds = %.lr.ph66.split.prol
  store i32 %44, ptr %18, align 4, !tbaa !5
  br label %.lr.ph66.split.prol.loopexit

.lr.ph66.split.prol.loopexit:                     ; preds = %.lr.ph66.split.prol, %46, %.lr.ph66.split.preheader
  %.unr = phi i32 [ %.pre, %.lr.ph66.split.preheader ], [ %44, %46 ], [ %44, %.lr.ph66.split.prol ]
  %indvars.iv86.unr = phi i64 [ %16, %.lr.ph66.split.preheader ], [ %indvars.iv.next87.prol, %46 ], [ %indvars.iv.next87.prol, %.lr.ph66.split.prol ]
  br i1 %19, label %._crit_edge67, label %.lr.ph66.split

.lr.ph61.us.preheader:                            ; preds = %.lr.ph66
  %wide.trip.count92 = zext nneg i32 %42 to i64
  br label %.lr.ph61.us

.lr.ph61.us:                                      ; preds = %.lr.ph61.us.preheader, %49
  %indvars.iv94 = phi i64 [ %16, %.lr.ph61.us.preheader ], [ %indvars.iv.next95, %49 ]
  %47 = trunc nsw i64 %indvars.iv94 to i32
  br label %50

48:                                               ; preds = %._crit_edge62.us
  store i32 %64, ptr %65, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %48, %._crit_edge62.us
  %.not50.us = icmp eq i64 %indvars.iv.next95, 0
  br i1 %.not50.us, label %._crit_edge67, label %.lr.ph61.us, !llvm.loop !18

50:                                               ; preds = %.lr.ph61.us, %61
  %indvars.iv89 = phi i64 [ 0, %.lr.ph61.us ], [ %indvars.iv.next90, %61 ]
  %.04158.us = phi i32 [ 0, %.lr.ph61.us ], [ %.1.us, %61 ]
  %51 = getelementptr inbounds [30 x [103 x i32]], ptr @p, i64 0, i64 %40, i64 %indvars.iv89
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = srem i32 %47, %52
  %54 = sdiv i32 %47, %52
  %55 = icmp eq i32 %53, 0
  br i1 %55, label %56, label %61

56:                                               ; preds = %50
  %57 = getelementptr inbounds [30 x [103 x i32]], ptr @c, i64 0, i64 %40, i64 %indvars.iv89
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = mul nsw i32 %58, %54
  %60 = add nsw i32 %59, %.04158.us
  br label %61

61:                                               ; preds = %56, %50
  %.1.us = phi i32 [ %60, %56 ], [ %.04158.us, %50 ]
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count92
  br i1 %exitcond93.not, label %._crit_edge62.us, label %50, !llvm.loop !19

._crit_edge62.us:                                 ; preds = %61
  %indvars.iv.next95 = add nsw i64 %indvars.iv94, -1
  %62 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %indvars.iv.next95
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = add nsw i32 %63, %.1.us
  %65 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %indvars.iv94
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = icmp slt i32 %64, %66
  br i1 %67, label %48, label %49

._crit_edge67:                                    ; preds = %.lr.ph66.split.prol.loopexit, %79, %49
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %exitcond101.not = icmp eq i64 %indvars.iv.next98, %wide.trip.count100
  br i1 %exitcond101.not, label %._crit_edge70, label %.lr.ph66, !llvm.loop !20

.lr.ph66.split:                                   ; preds = %.lr.ph66.split.prol.loopexit, %79
  %68 = phi i32 [ %75, %79 ], [ %.unr, %.lr.ph66.split.prol.loopexit ]
  %indvars.iv86 = phi i64 [ %indvars.iv.next87.1, %79 ], [ %indvars.iv86.unr, %.lr.ph66.split.prol.loopexit ]
  %indvars.iv.next87 = add nsw i64 %indvars.iv86, -1
  %69 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %indvars.iv.next87
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = icmp slt i32 %70, %68
  br i1 %71, label %72, label %.lr.ph66.split.1

72:                                               ; preds = %.lr.ph66.split
  %73 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %indvars.iv86
  store i32 %70, ptr %73, align 4, !tbaa !5
  br label %.lr.ph66.split.1

.lr.ph66.split.1:                                 ; preds = %72, %.lr.ph66.split
  %indvars.iv.next87.1 = add nsw i64 %indvars.iv86, -2
  %74 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %indvars.iv.next87.1
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = icmp slt i32 %75, %70
  br i1 %76, label %77, label %79

77:                                               ; preds = %.lr.ph66.split.1
  %78 = getelementptr inbounds [103 x i32], ptr @f, i64 0, i64 %indvars.iv.next87
  store i32 %75, ptr %78, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %77, %.lr.ph66.split.1
  %.not50.1 = icmp eq i64 %indvars.iv.next87.1, 0
  br i1 %.not50.1, label %._crit_edge67, label %.lr.ph66.split, !llvm.loop !18
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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: nofree nounwind
declare noundef i32 @printf(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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { mustprogress nofree 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 = { nounwind }
attributes #5 = { 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, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !12, !11}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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