; LLVM IR from tangjz/acm-icpc :: self_training/2016-06-18 (A)

; 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
@str = external dso_local global [10 x [5 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 [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %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 %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  %15 = load ptr, ptr %5, align 8, !tbaa !9
  %16 = getelementptr inbounds ptr, ptr %15, i64 1
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %17, ptr noundef @.str, ptr noundef @n) #5
  br label %19

19:                                               ; preds = %193, %2
  %20 = load i32, ptr @t, align 4, !tbaa !5
  %21 = add nsw i32 %20, -1
  store i32 %21, ptr @t, align 4, !tbaa !5
  %22 = icmp ne i32 %20, 0
  br i1 %22, label %23, label %194

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

24:                                               ; preds = %34, %23
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = icmp slt i32 %25, 10
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %24
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %30
  %32 = getelementptr inbounds [5 x i8], ptr %31, i64 0, i64 0
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %32)
  br label %34

34:                                               ; preds = %28
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %6, align 4, !tbaa !5
  br label %24, !llvm.loop !11

37:                                               ; preds = %27
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = icmp eq i32 %38, 42
  br i1 %39, label %40, label %56

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %51, %40
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = icmp slt i32 %42, 10
  br i1 %43, label %45, label %44

44:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %54

45:                                               ; preds = %41
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %47
  %49 = getelementptr inbounds [5 x i8], ptr %48, i64 0, i64 0
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %49)
  br label %51

51:                                               ; preds = %45
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %7, align 4, !tbaa !5
  br label %41, !llvm.loop !13

54:                                               ; preds = %44
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef @.str.3)
  br label %193

56:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  store i8 1, ptr %8, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %189, %56
  %58 = load i32, ptr %9, align 4, !tbaa !5
  %59 = icmp slt i32 %58, 10
  br i1 %59, label %60, label %63

60:                                               ; preds = %57
  %61 = load i8, ptr %8, align 1, !tbaa !14, !range !16, !noundef !17
  %62 = trunc i8 %61 to i1
  br label %63

63:                                               ; preds = %60, %57
  %64 = phi i1 [ false, %57 ], [ %62, %60 ]
  br i1 %64, label %66, label %65

65:                                               ; preds = %63
  store i32 10, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %192

66:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %185, %66
  %68 = load i32, ptr %11, align 4, !tbaa !5
  %69 = icmp slt i32 %68, 10
  br i1 %69, label %70, label %73

70:                                               ; preds = %67
  %71 = load i8, ptr %8, align 1, !tbaa !14, !range !16, !noundef !17
  %72 = trunc i8 %71 to i1
  br label %73

73:                                               ; preds = %70, %67
  %74 = phi i1 [ false, %67 ], [ %72, %70 ]
  br i1 %74, label %76, label %75

75:                                               ; preds = %73
  store i32 13, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %188

76:                                               ; preds = %73
  %77 = load i32, ptr %9, align 4, !tbaa !5
  %78 = load i32, ptr %11, align 4, !tbaa !5
  %79 = icmp eq i32 %77, %78
  br i1 %79, label %80, label %81

80:                                               ; preds = %76
  br label %185

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  br label %82

82:                                               ; preds = %180, %81
  %83 = load i32, ptr %12, align 4, !tbaa !5
  %84 = icmp sle i32 %83, 4
  br i1 %84, label %86, label %85

85:                                               ; preds = %82
  store i32 16, ptr %10, align 4
  br label %183

86:                                               ; preds = %82
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %115, %86
  %88 = load i32, ptr %13, align 4, !tbaa !5
  %89 = load i32, ptr %12, align 4, !tbaa !5
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %91, label %112

91:                                               ; preds = %87
  %92 = load i32, ptr %9, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %93
  %95 = load i32, ptr %12, align 4, !tbaa !5
  %96 = sub nsw i32 4, %95
  %97 = load i32, ptr %13, align 4, !tbaa !5
  %98 = add nsw i32 %96, %97
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [5 x i8], ptr %94, i64 0, i64 %99
  %101 = load i8, ptr %100, align 1, !tbaa !18
  %102 = sext i8 %101 to i32
  %103 = load i32, ptr %11, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %104
  %106 = load i32, ptr %13, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [5 x i8], ptr %105, i64 0, i64 %107
  %109 = load i8, ptr %108, align 1, !tbaa !18
  %110 = sext i8 %109 to i32
  %111 = icmp eq i32 %102, %110
  br label %112

112:                                              ; preds = %91, %87
  %113 = phi i1 [ false, %87 ], [ %111, %91 ]
  br i1 %113, label %114, label %118

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %13, align 4, !tbaa !5
  br label %87, !llvm.loop !19

118:                                              ; preds = %112
  %119 = load i32, ptr %13, align 4, !tbaa !5
  %120 = load i32, ptr %12, align 4, !tbaa !5
  %121 = icmp eq i32 %119, %120
  br i1 %121, label %122, label %179

122:                                              ; preds = %118
  store i8 0, ptr %8, align 1, !tbaa !14
  %123 = load i32, ptr %9, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %124
  %126 = getelementptr inbounds [5 x i8], ptr %125, i64 0, i64 0
  %127 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %126)
  %128 = load i32, ptr %11, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %129
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [5 x i8], ptr %130, i64 0, i64 %132
  %134 = load i8, ptr %133, align 1, !tbaa !18
  %135 = icmp ne i8 %134, 0
  br i1 %135, label %136, label %145

136:                                              ; preds = %122
  %137 = load i32, ptr %11, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %138
  %140 = getelementptr inbounds [5 x i8], ptr %139, i64 0, i64 0
  %141 = load i32, ptr %12, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds i8, ptr %140, i64 %142
  %144 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %143)
  br label %145

145:                                              ; preds = %136, %122
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %164, %145
  %147 = load i32, ptr %13, align 4, !tbaa !5
  %148 = icmp slt i32 %147, 10
  br i1 %148, label %149, label %167

149:                                              ; preds = %146
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = load i32, ptr %9, align 4, !tbaa !5
  %152 = icmp ne i32 %150, %151
  br i1 %152, label %153, label %163

153:                                              ; preds = %149
  %154 = load i32, ptr %13, align 4, !tbaa !5
  %155 = load i32, ptr %11, align 4, !tbaa !5
  %156 = icmp ne i32 %154, %155
  br i1 %156, label %157, label %163

157:                                              ; preds = %153
  %158 = load i32, ptr %13, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %159
  %161 = getelementptr inbounds [5 x i8], ptr %160, i64 0, i64 0
  %162 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %161)
  br label %163

163:                                              ; preds = %157, %153, %149
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %13, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %13, align 4, !tbaa !5
  br label %146, !llvm.loop !20

167:                                              ; preds = %146
  %168 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %168, ptr %13, align 4, !tbaa !5
  br label %169

169:                                              ; preds = %174, %167
  %170 = load i32, ptr %13, align 4, !tbaa !5
  %171 = icmp sgt i32 %170, 1
  br i1 %171, label %172, label %177

172:                                              ; preds = %169
  %173 = call i32 @putchar(i32 noundef 65)
  br label %174

174:                                              ; preds = %172
  %175 = load i32, ptr %13, align 4, !tbaa !5
  %176 = add nsw i32 %175, -1
  store i32 %176, ptr %13, align 4, !tbaa !5
  br label %169, !llvm.loop !21

177:                                              ; preds = %169
  %178 = call i32 @putchar(i32 noundef 10)
  store i32 16, ptr %10, align 4
  br label %183

179:                                              ; preds = %118
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %12, align 4, !tbaa !5
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %12, align 4, !tbaa !5
  br label %82, !llvm.loop !22

183:                                              ; preds = %177, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %184

184:                                              ; preds = %183
  br label %185

185:                                              ; preds = %184, %80
  %186 = load i32, ptr %11, align 4, !tbaa !5
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %11, align 4, !tbaa !5
  br label %67, !llvm.loop !23

188:                                              ; preds = %75
  br label %189

189:                                              ; preds = %188
  %190 = load i32, ptr %9, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %9, align 4, !tbaa !5
  br label %57, !llvm.loop !24

192:                                              ; preds = %65
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  br label %193

193:                                              ; preds = %192, %54
  br label %19, !llvm.loop !25

194:                                              ; preds = %19
  ret i32 0
}

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

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #2

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

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

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

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


; 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
@str = external dso_local global [10 x [5 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 [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %4 = getelementptr inbounds i8, ptr %1, i64 8
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = tail call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %5, ptr noundef nonnull @.str, ptr noundef nonnull @n) #3
  %7 = load i32, ptr @t, align 4, !tbaa !9
  %8 = add nsw i32 %7, -1
  store i32 %8, ptr @t, align 4, !tbaa !9
  %.not72 = icmp eq i32 %7, 0
  br i1 %.not72, label %._crit_edge73, label %.preheader58

.preheader58:                                     ; preds = %2, %.loopexit57
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @str)
  %10 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 5))
  %11 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 10))
  %12 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 15))
  %13 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 20))
  %14 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 25))
  %15 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 30))
  %16 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 35))
  %17 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 40))
  %18 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 45))
  %19 = load i32, ptr @n, align 4, !tbaa !9
  %20 = icmp eq i32 %19, 42
  br i1 %20, label %.preheader55.preheader, label %.lr.ph67

.preheader55.preheader:                           ; preds = %.preheader58
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @str)
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 5))
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 10))
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 15))
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 20))
  %26 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 25))
  %27 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 30))
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 35))
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 40))
  %30 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 45))
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull @.str.3)
  br label %.loopexit57

.lr.ph67:                                         ; preds = %.preheader58, %._crit_edge68
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %._crit_edge68 ], [ 0, %.preheader58 ]
  %32 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv84
  %33 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv84, i64 3
  %34 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv84, i64 2
  %35 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv84, i64 1
  br label %37

._crit_edge68:                                    ; preds = %.loopexit
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %36 = icmp ult i64 %indvars.iv84, 9
  br i1 %36, label %.lr.ph67, label %.loopexit57, !llvm.loop !11

37:                                               ; preds = %.lr.ph67, %.loopexit
  %indvars.iv = phi i64 [ 0, %.lr.ph67 ], [ %indvars.iv.next, %.loopexit ]
  %38 = icmp eq i64 %indvars.iv84, %indvars.iv
  br i1 %38, label %.loopexit, label %.preheader53

.preheader53:                                     ; preds = %37
  %39 = load i8, ptr %33, align 1, !tbaa !13
  %40 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 0
  %41 = load i8, ptr %40, align 1, !tbaa !13
  %.not89 = icmp eq i8 %39, %41
  br i1 %.not89, label %.critedge.1, label %.preheader.1

.critedge.1:                                      ; preds = %109, %95, %85, %.preheader53
  %.04162.lcssa.wide = phi i32 [ 1, %.preheader53 ], [ 2, %85 ], [ 3, %95 ], [ 4, %109 ]
  %42 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %32)
  %43 = zext nneg i32 %.04162.lcssa.wide to i64
  %44 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 %43
  %45 = load i8, ptr %44, align 1, !tbaa !13
  %.not49 = icmp eq i8 %45, 0
  br i1 %.not49, label %49, label %46

46:                                               ; preds = %.critedge.1
  %47 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 %43
  %48 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %47)
  br label %49

49:                                               ; preds = %46, %.critedge.1
  %.not50 = icmp eq i64 %indvars.iv84, 0
  %.not51 = icmp eq i64 %indvars.iv, 0
  %or.cond = or i1 %.not50, %.not51
  br i1 %or.cond, label %52, label %50

50:                                               ; preds = %49
  %51 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @str)
  br label %52

52:                                               ; preds = %49, %50
  %.not50.1 = icmp eq i64 %indvars.iv84, 1
  %.not51.1 = icmp eq i64 %indvars.iv, 1
  %or.cond.1 = or i1 %.not50.1, %.not51.1
  br i1 %or.cond.1, label %55, label %53

53:                                               ; preds = %52
  %54 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 5))
  br label %55

55:                                               ; preds = %53, %52
  %.not50.2 = icmp eq i64 %indvars.iv84, 2
  %.not51.2 = icmp eq i64 %indvars.iv, 2
  %or.cond.2 = or i1 %.not50.2, %.not51.2
  br i1 %or.cond.2, label %58, label %56

56:                                               ; preds = %55
  %57 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 10))
  br label %58

58:                                               ; preds = %56, %55
  %.not50.3 = icmp eq i64 %indvars.iv84, 3
  %.not51.3 = icmp eq i64 %indvars.iv, 3
  %or.cond.3 = or i1 %.not50.3, %.not51.3
  br i1 %or.cond.3, label %61, label %59

59:                                               ; preds = %58
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 15))
  br label %61

61:                                               ; preds = %59, %58
  %.not50.4 = icmp eq i64 %indvars.iv84, 4
  %.not51.4 = icmp eq i64 %indvars.iv, 4
  %or.cond.4 = or i1 %.not50.4, %.not51.4
  br i1 %or.cond.4, label %64, label %62

62:                                               ; preds = %61
  %63 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 20))
  br label %64

64:                                               ; preds = %62, %61
  %.not50.5 = icmp eq i64 %indvars.iv84, 5
  %.not51.5 = icmp eq i64 %indvars.iv, 5
  %or.cond.5 = or i1 %.not50.5, %.not51.5
  br i1 %or.cond.5, label %67, label %65

65:                                               ; preds = %64
  %66 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 25))
  br label %67

67:                                               ; preds = %65, %64
  %.not50.6 = icmp eq i64 %indvars.iv84, 6
  %.not51.6 = icmp eq i64 %indvars.iv, 6
  %or.cond.6 = or i1 %.not50.6, %.not51.6
  br i1 %or.cond.6, label %70, label %68

68:                                               ; preds = %67
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 30))
  br label %70

70:                                               ; preds = %68, %67
  %.not50.7 = icmp eq i64 %indvars.iv84, 7
  %.not51.7 = icmp eq i64 %indvars.iv, 7
  %or.cond.7 = or i1 %.not50.7, %.not51.7
  br i1 %or.cond.7, label %73, label %71

71:                                               ; preds = %70
  %72 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 35))
  br label %73

73:                                               ; preds = %71, %70
  %.not50.8 = icmp eq i64 %indvars.iv84, 8
  %.not51.8 = icmp eq i64 %indvars.iv, 8
  %or.cond.8 = or i1 %.not50.8, %.not51.8
  br i1 %or.cond.8, label %76, label %74

74:                                               ; preds = %73
  %75 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 40))
  br label %76

76:                                               ; preds = %74, %73
  %.not50.9 = icmp eq i64 %indvars.iv84, 9
  %.not51.9 = icmp eq i64 %indvars.iv, 9
  %or.cond.9 = or i1 %.not50.9, %.not51.9
  br i1 %or.cond.9, label %.preheader52, label %77

77:                                               ; preds = %76
  %78 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @str, i64 45))
  br label %.preheader52

.preheader52:                                     ; preds = %77, %76
  br i1 %.not89, label %._crit_edge68.thread95, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader52, %.lr.ph
  %.264 = phi i32 [ %80, %.lr.ph ], [ %.04162.lcssa.wide, %.preheader52 ]
  %79 = tail call i32 @putchar(i32 noundef 65)
  %80 = add nsw i32 %.264, -1
  %81 = icmp ugt i32 %.264, 2
  br i1 %81, label %.lr.ph, label %._crit_edge68.thread95, !llvm.loop !14

._crit_edge68.thread95:                           ; preds = %.lr.ph, %.preheader52
  %82 = tail call i32 @putchar(i32 noundef 10)
  br label %.loopexit57

.preheader.1:                                     ; preds = %.preheader53
  %83 = load i8, ptr %34, align 1, !tbaa !13
  %84 = icmp eq i8 %83, %41
  br i1 %84, label %85, label %.preheader.2

85:                                               ; preds = %.preheader.1
  %86 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 1
  %87 = load i8, ptr %86, align 1, !tbaa !13
  %88 = icmp eq i8 %39, %87
  br i1 %88, label %.critedge.1, label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.1, %85
  %89 = load i8, ptr %35, align 1, !tbaa !13
  %90 = icmp eq i8 %89, %41
  br i1 %90, label %91, label %.preheader.3

91:                                               ; preds = %.preheader.2
  %92 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 1
  %93 = load i8, ptr %92, align 1, !tbaa !13
  %94 = icmp eq i8 %83, %93
  br i1 %94, label %95, label %.preheader.3

95:                                               ; preds = %91
  %96 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 2
  %97 = load i8, ptr %96, align 1, !tbaa !13
  %98 = icmp eq i8 %39, %97
  br i1 %98, label %.critedge.1, label %.preheader.3

.preheader.3:                                     ; preds = %.preheader.2, %91, %95
  %99 = load i8, ptr %32, align 1, !tbaa !13
  %100 = icmp eq i8 %99, %41
  br i1 %100, label %101, label %.loopexit

101:                                              ; preds = %.preheader.3
  %102 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 1
  %103 = load i8, ptr %102, align 1, !tbaa !13
  %104 = icmp eq i8 %89, %103
  br i1 %104, label %105, label %.loopexit

105:                                              ; preds = %101
  %106 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 2
  %107 = load i8, ptr %106, align 1, !tbaa !13
  %108 = icmp eq i8 %83, %107
  br i1 %108, label %109, label %.loopexit

109:                                              ; preds = %105
  %110 = getelementptr inbounds [10 x [5 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 3
  %111 = load i8, ptr %110, align 1, !tbaa !13
  %112 = icmp eq i8 %39, %111
  br i1 %112, label %.critedge.1, label %.loopexit

.loopexit:                                        ; preds = %109, %105, %101, %.preheader.3, %37
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %113 = icmp ult i64 %indvars.iv, 9
  br i1 %113, label %37, label %._crit_edge68, !llvm.loop !15

.loopexit57:                                      ; preds = %._crit_edge68, %._crit_edge68.thread95, %.preheader55.preheader
  %114 = load i32, ptr @t, align 4, !tbaa !9
  %115 = add nsw i32 %114, -1
  store i32 %115, ptr @t, align 4, !tbaa !9
  %.not = icmp eq i32 %114, 0
  br i1 %.not, label %._crit_edge73, label %.preheader58, !llvm.loop !16

._crit_edge73:                                    ; preds = %.loopexit57, %2
  ret i32 0
}

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

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind uwtable
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #2

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 = { 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 = { inlinehint mustprogress nofree 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 #3 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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