; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ (1511（dp+思维）)

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

@sa = external dso_local global [123 x i8], align 16
@dp = external dso_local global [123 x i32], 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z9isgreateriiii(i32 noundef, i32 noundef, i32 noundef, i32 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 norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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
  store i32 0, ptr %1, align 4
  br label %12

12:                                               ; preds = %203, %0
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef getelementptr inbounds (i8, ptr @sa, i64 1))
  %14 = xor i32 %13, -1
  %15 = icmp ne i32 %14, 0
  br i1 %15, label %16, label %204

16:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %17 = call i64 @strlen(ptr noundef getelementptr inbounds (i8, ptr @sa, i64 1)) #7
  %18 = trunc i64 %17 to i32
  store i32 %18, ptr %2, align 4, !tbaa !5
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = icmp eq i32 %19, 1
  br i1 %20, label %21, label %26

21:                                               ; preds = %16
  %22 = load i8, ptr getelementptr inbounds ([123 x i8], ptr @sa, i64 0, i64 1), align 1, !tbaa !9
  %23 = sext i8 %22 to i32
  %24 = icmp eq i32 %23, 48
  br i1 %24, label %25, label %26

25:                                               ; preds = %21
  store i32 3, ptr %3, align 4
  br label %201

26:                                               ; preds = %21, %16
  store i32 1, ptr getelementptr inbounds ([123 x i32], ptr @dp, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 2, ptr %4, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %69, %26
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  store i32 4, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %72

32:                                               ; preds = %27
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %35
  store i32 %33, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = sub nsw i32 %37, 1
  store i32 %38, ptr %5, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %64, %32
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = icmp sge i32 %40, 1
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 7, ptr %3, align 4
  br label %67

43:                                               ; preds = %39
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = sub nsw i32 %47, %51
  %53 = add nsw i32 %52, 1
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = call noundef zeroext i1 @_Z9isgreateriiii(i32 noundef %45, i32 noundef %46, i32 noundef %53, i32 noundef %54)
  br i1 %55, label %56, label %63

56:                                               ; preds = %43
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sub nsw i32 %57, %58
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %61
  store i32 %59, ptr %62, align 4, !tbaa !5
  store i32 7, ptr %3, align 4
  br label %67

63:                                               ; preds = %43
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = add nsw i32 %65, -1
  store i32 %66, ptr %5, align 4, !tbaa !5
  br label %39, !llvm.loop !10

67:                                               ; preds = %56, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %4, align 4, !tbaa !5
  br label %27, !llvm.loop !12

72:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %73 = load i32, ptr %2, align 4, !tbaa !5
  %74 = load i32, ptr %2, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = sub nsw i32 %73, %77
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %6, align 4, !tbaa !5
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = load i32, ptr %6, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %85
  store i32 %83, ptr %86, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = sub nsw i32 %87, 1
  store i32 %88, ptr %7, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %143, %72
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = icmp sge i32 %90, 1
  br i1 %91, label %93, label %92

92:                                               ; preds = %89
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %146

93:                                               ; preds = %89
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [123 x i8], ptr @sa, i64 0, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !9
  %98 = sext i8 %97 to i32
  %99 = icmp eq i32 %98, 48
  br i1 %99, label %100, label %110

100:                                              ; preds = %93
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  %107 = load i32, ptr %7, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %108
  store i32 %106, ptr %109, align 4, !tbaa !5
  br label %143

110:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %111 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %111, ptr %8, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %138, %110
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = load i32, ptr %7, align 4, !tbaa !5
  %115 = icmp sgt i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 13, ptr %3, align 4
  br label %141

117:                                              ; preds = %112
  %118 = load i32, ptr %8, align 4, !tbaa !5
  %119 = load i32, ptr %8, align 4, !tbaa !5
  %120 = load i32, ptr %8, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = add nsw i32 %119, %123
  %125 = sub nsw i32 %124, 1
  %126 = load i32, ptr %7, align 4, !tbaa !5
  %127 = load i32, ptr %8, align 4, !tbaa !5
  %128 = sub nsw i32 %127, 1
  %129 = call noundef zeroext i1 @_Z9isgreateriiii(i32 noundef %118, i32 noundef %125, i32 noundef %126, i32 noundef %128)
  br i1 %129, label %130, label %137

130:                                              ; preds = %117
  %131 = load i32, ptr %8, align 4, !tbaa !5
  %132 = load i32, ptr %7, align 4, !tbaa !5
  %133 = sub nsw i32 %131, %132
  %134 = load i32, ptr %7, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %135
  store i32 %133, ptr %136, align 4, !tbaa !5
  store i32 13, ptr %3, align 4
  br label %141

137:                                              ; preds = %117
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %8, align 4, !tbaa !5
  %140 = add nsw i32 %139, -1
  store i32 %140, ptr %8, align 4, !tbaa !5
  br label %112, !llvm.loop !13

141:                                              ; preds = %130, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %142

142:                                              ; preds = %141
  br label %143

143:                                              ; preds = %142, %100
  %144 = load i32, ptr %7, align 4, !tbaa !5
  %145 = add nsw i32 %144, -1
  store i32 %145, ptr %7, align 4, !tbaa !5
  br label %89, !llvm.loop !14

146:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %159, %146
  %148 = load i32, ptr %9, align 4, !tbaa !5
  %149 = load i32, ptr getelementptr inbounds ([123 x i32], ptr @dp, i64 0, i64 1), align 4, !tbaa !5
  %150 = icmp sle i32 %148, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %147
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %162

152:                                              ; preds = %147
  %153 = load i32, ptr %9, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [123 x i8], ptr @sa, i64 0, i64 %154
  %156 = load i8, ptr %155, align 1, !tbaa !9
  %157 = sext i8 %156 to i32
  %158 = call i32 @putchar(i32 noundef %157)
  br label %159

159:                                              ; preds = %152
  %160 = load i32, ptr %9, align 4, !tbaa !5
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %9, align 4, !tbaa !5
  br label %147, !llvm.loop !15

162:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %163 = load i32, ptr getelementptr inbounds ([123 x i32], ptr @dp, i64 0, i64 1), align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %10, align 4, !tbaa !5
  br label %165

165:                                              ; preds = %192, %162
  %166 = load i32, ptr %10, align 4, !tbaa !5
  %167 = load i32, ptr %2, align 4, !tbaa !5
  %168 = icmp sle i32 %166, %167
  br i1 %168, label %169, label %199

169:                                              ; preds = %165
  %170 = call i32 @putchar(i32 noundef 44)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %171 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %171, ptr %11, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %189, %169
  %173 = load i32, ptr %11, align 4, !tbaa !5
  %174 = load i32, ptr %10, align 4, !tbaa !5
  %175 = load i32, ptr %10, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = add nsw i32 %174, %178
  %180 = icmp slt i32 %173, %179
  br i1 %180, label %182, label %181

181:                                              ; preds = %172
  store i32 21, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %192

182:                                              ; preds = %172
  %183 = load i32, ptr %11, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [123 x i8], ptr @sa, i64 0, i64 %184
  %186 = load i8, ptr %185, align 1, !tbaa !9
  %187 = sext i8 %186 to i32
  %188 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %187)
  br label %189

189:                                              ; preds = %182
  %190 = load i32, ptr %11, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %11, align 4, !tbaa !5
  br label %172, !llvm.loop !16

192:                                              ; preds = %181
  %193 = load i32, ptr %10, align 4, !tbaa !5
  %194 = load i32, ptr %10, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = add nsw i32 %193, %197
  store i32 %198, ptr %10, align 4, !tbaa !5
  br label %165, !llvm.loop !17

199:                                              ; preds = %165
  %200 = call i32 @putchar(i32 noundef 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  store i32 0, ptr %3, align 4
  br label %201

201:                                              ; preds = %199, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %202 = load i32, ptr %3, align 4
  switch i32 %202, label %205 [
    i32 0, label %203
    i32 3, label %204
  ]

203:                                              ; preds = %201
  br label %12, !llvm.loop !18

204:                                              ; preds = %201, %12
  ret i32 0

205:                                              ; preds = %201
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare i32 @putchar(i32 noundef) #5

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

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 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 #3 = { "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 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

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

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

@sa = external dso_local global [123 x i8], align 16
@dp = external dso_local local_unnamed_addr global [123 x i32], 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z9isgreateriiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @sa, i64 1))
  %.not94 = icmp eq i32 %1, -1
  br i1 %.not94, label %.thread, label %.lr.ph96

.lr.ph96:                                         ; preds = %0, %._crit_edge93
  %2 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @sa, i64 1)) #5
  %3 = trunc i64 %2 to i32
  %4 = icmp eq i32 %3, 1
  %5 = load i8, ptr getelementptr inbounds (i8, ptr @sa, i64 1), align 1
  %6 = icmp eq i8 %5, 48
  %or.cond = select i1 %4, i1 %6, i1 false
  br i1 %or.cond, label %.thread, label %7

7:                                                ; preds = %.lr.ph96
  store i32 1, ptr getelementptr inbounds (i8, ptr @dp, i64 4), align 4, !tbaa !5
  %.not6576 = icmp slt i32 %3, 2
  br i1 %.not6576, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %7
  %8 = add nuw nsw i64 %2, 1
  %wide.trip.count = and i64 %8, 4294967295
  br label %.lr.ph

._crit_edge:                                      ; preds = %.loopexit71, %7
  %sext = shl i64 %2, 32
  %9 = ashr exact i64 %sext, 32
  %10 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %9
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %12 = sub nsw i32 %3, %11
  %13 = add nsw i32 %12, 1
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %14
  store i32 %11, ptr %15, align 4, !tbaa !5
  %16 = icmp sgt i32 %12, 0
  br i1 %16, label %.lr.ph80.preheader, label %.preheader72

.lr.ph80.preheader:                               ; preds = %._crit_edge
  %17 = zext nneg i32 %12 to i64
  br label %.lr.ph80

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.loopexit71
  %indvars.iv = phi i64 [ 2, %.lr.ph.preheader ], [ %indvars.iv.next, %.loopexit71 ]
  %18 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %indvars.iv
  %19 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %19, ptr %18, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %22, %.lr.ph
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %22 ], [ %indvars.iv, %.lr.ph ]
  %21 = icmp sgt i64 %indvars.iv101, 1
  br i1 %21, label %22, label %.loopexit71

22:                                               ; preds = %20
  %indvars.iv.next102 = add nsw i64 %indvars.iv101, -1
  %indvars = trunc i64 %indvars.iv.next102 to i32
  %23 = and i64 %indvars.iv.next102, 4294967295
  %24 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = trunc nuw i64 %indvars.iv101 to i32
  %27 = sub i32 %26, %25
  %28 = tail call noundef zeroext i1 @_Z9isgreateriiii(i32 noundef %26, i32 noundef %19, i32 noundef %27, i32 noundef %indvars)
  br i1 %28, label %29, label %20, !llvm.loop !9

29:                                               ; preds = %22
  %30 = sub nsw i32 %19, %indvars
  store i32 %30, ptr %18, align 4, !tbaa !5
  br label %.loopexit71

.loopexit71:                                      ; preds = %20, %29
  %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 !11

.preheader72:                                     ; preds = %.loopexit70, %._crit_edge
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @dp, i64 4), align 4, !tbaa !5
  %.not6681 = icmp slt i32 %31, 1
  br i1 %.not6681, label %._crit_edge84, label %.lr.ph83

.lr.ph80:                                         ; preds = %.lr.ph80.preheader, %.loopexit70
  %indvars.iv106 = phi i64 [ %17, %.lr.ph80.preheader ], [ %indvars.iv.next107, %.loopexit70 ]
  %32 = getelementptr inbounds [123 x i8], ptr @sa, i64 0, i64 %indvars.iv106
  %33 = load i8, ptr %32, align 1, !tbaa !12
  %34 = icmp eq i8 %33, 48
  br i1 %34, label %36, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.lr.ph80
  %35 = trunc nuw i64 %indvars.iv106 to i32
  br label %.preheader

36:                                               ; preds = %.lr.ph80
  %37 = add nuw nsw i64 %indvars.iv106, 1
  %38 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  %41 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %indvars.iv106
  store i32 %40, ptr %41, align 4, !tbaa !5
  %.pre = trunc nuw i64 %indvars.iv106 to i32
  br label %.loopexit70

.preheader:                                       ; preds = %.preheader.preheader, %43
  %.057 = phi i32 [ %47, %43 ], [ %13, %.preheader.preheader ]
  %42 = icmp sgt i32 %.057, %35
  br i1 %42, label %43, label %.loopexit70

43:                                               ; preds = %.preheader
  %44 = zext nneg i32 %.057 to i64
  %45 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = add nsw i32 %.057, -1
  %48 = add i32 %47, %46
  %49 = tail call noundef zeroext i1 @_Z9isgreateriiii(i32 noundef %.057, i32 noundef %48, i32 noundef %35, i32 noundef %47)
  br i1 %49, label %50, label %.preheader, !llvm.loop !13

50:                                               ; preds = %43
  %51 = sub nsw i32 %.057, %35
  %52 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %indvars.iv106
  store i32 %51, ptr %52, align 4, !tbaa !5
  br label %.loopexit70

.loopexit70:                                      ; preds = %.preheader, %50, %36
  %.pre-phi = phi i32 [ %35, %50 ], [ %.pre, %36 ], [ %35, %.preheader ]
  %indvars.iv.next107 = add nsw i64 %indvars.iv106, -1
  %53 = icmp sgt i32 %.pre-phi, 1
  br i1 %53, label %.lr.ph80, label %.preheader72, !llvm.loop !14

._crit_edge84:                                    ; preds = %.lr.ph83, %.preheader72
  %.lcssa = phi i32 [ %31, %.preheader72 ], [ %59, %.lr.ph83 ]
  %.not6789.not = icmp slt i32 %.lcssa, %3
  br i1 %.not6789.not, label %.lr.ph92.preheader, label %._crit_edge93

.lr.ph92.preheader:                               ; preds = %._crit_edge84
  %54 = add nsw i32 %.lcssa, 1
  br label %.lr.ph92

.lr.ph83:                                         ; preds = %.preheader72, %.lr.ph83
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %.lr.ph83 ], [ 1, %.preheader72 ]
  %55 = getelementptr inbounds [123 x i8], ptr @sa, i64 0, i64 %indvars.iv110
  %56 = load i8, ptr %55, align 1, !tbaa !12
  %57 = sext i8 %56 to i32
  %58 = tail call i32 @putchar(i32 noundef %57)
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %59 = load i32, ptr getelementptr inbounds (i8, ptr @dp, i64 4), align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %.not66.not = icmp slt i64 %indvars.iv110, %60
  br i1 %.not66.not, label %.lr.ph83, label %._crit_edge84, !llvm.loop !15

.loopexit:                                        ; preds = %.lr.ph87, %.lr.ph92
  %.lcssa75 = phi i32 [ %65, %.lr.ph92 ], [ %72, %.lr.ph87 ]
  %.not67 = icmp sgt i32 %.lcssa75, %3
  br i1 %.not67, label %._crit_edge93, label %.lr.ph92, !llvm.loop !16

.lr.ph92:                                         ; preds = %.lr.ph92.preheader, %.loopexit
  %.05590 = phi i32 [ %.lcssa75, %.loopexit ], [ %54, %.lr.ph92.preheader ]
  %61 = tail call i32 @putchar(i32 noundef 44)
  %62 = sext i32 %.05590 to i64
  %63 = getelementptr inbounds [123 x i32], ptr @dp, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = add nsw i32 %64, %.05590
  %66 = icmp sgt i32 %64, 0
  br i1 %66, label %.lr.ph87, label %.loopexit

.lr.ph87:                                         ; preds = %.lr.ph92, %.lr.ph87
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %.lr.ph87 ], [ %62, %.lr.ph92 ]
  %67 = getelementptr inbounds [123 x i8], ptr @sa, i64 0, i64 %indvars.iv114
  %68 = load i8, ptr %67, align 1, !tbaa !12
  %69 = sext i8 %68 to i32
  %70 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %69)
  %indvars.iv.next115 = add nsw i64 %indvars.iv114, 1
  %71 = load i32, ptr %63, align 4, !tbaa !5
  %72 = add nsw i32 %71, %.05590
  %73 = sext i32 %72 to i64
  %74 = icmp slt i64 %indvars.iv.next115, %73
  br i1 %74, label %.lr.ph87, label %.loopexit, !llvm.loop !17

._crit_edge93:                                    ; preds = %.loopexit, %._crit_edge84
  %75 = tail call i32 @putchar(i32 noundef 10)
  %76 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @sa, i64 1))
  %.not = icmp eq i32 %76, -1
  br i1 %.not, label %.thread, label %.lr.ph96

.thread:                                          ; preds = %._crit_edge93, %.lr.ph96, %0
  ret i32 0
}

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

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

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

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

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 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 #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 #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 = !{!7, !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


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