; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ (1002（大数加法）)

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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [1000 x i8], align 16
  %3 = alloca [1000 x i8], align 16
  %4 = alloca [1001 x i8], align 16
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1000, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 1000, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 1001, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %8)
  br label %12

12:                                               ; preds = %154, %0
  %13 = load i32, ptr %8, align 4, !tbaa !5
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %157

15:                                               ; preds = %12
  %16 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 0
  %17 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 0
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %16, ptr noundef %17)
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %19)
  %21 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 0
  %22 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 0
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, ptr noundef %21, ptr noundef %22)
  %24 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 0
  %25 = call i64 @strlen(ptr noundef %24) #5
  %26 = sub i64 %25, 1
  %27 = trunc i64 %26 to i32
  store i32 %27, ptr %9, align 4, !tbaa !5
  %28 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 0
  %29 = call i64 @strlen(ptr noundef %28) #5
  %30 = sub i64 %29, 1
  %31 = trunc i64 %30 to i32
  store i32 %31, ptr %10, align 4, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %120, %15
  %33 = load i32, ptr %9, align 4, !tbaa !5
  %34 = icmp sge i32 %33, 0
  br i1 %34, label %38, label %35

35:                                               ; preds = %32
  %36 = load i32, ptr %10, align 4, !tbaa !5
  %37 = icmp sge i32 %36, 0
  br label %38

38:                                               ; preds = %35, %32
  %39 = phi i1 [ true, %32 ], [ %37, %35 ]
  br i1 %39, label %40, label %127

40:                                               ; preds = %38
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = icmp sge i32 %41, 0
  br i1 %42, label %43, label %65

43:                                               ; preds = %40
  %44 = load i32, ptr %10, align 4, !tbaa !5
  %45 = icmp sge i32 %44, 0
  br i1 %45, label %46, label %65

46:                                               ; preds = %43
  %47 = load i32, ptr %9, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %48
  %50 = load i8, ptr %49, align 1, !tbaa !9
  %51 = sext i8 %50 to i32
  %52 = load i32, ptr %10, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !9
  %56 = sext i8 %55 to i32
  %57 = add nsw i32 %51, %56
  %58 = sub nsw i32 %57, 48
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = add nsw i32 %58, %59
  %61 = trunc i32 %60 to i8
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [1001 x i8], ptr %4, i64 0, i64 %63
  store i8 %61, ptr %64, align 1, !tbaa !9
  br label %65

65:                                               ; preds = %46, %43, %40
  %66 = load i32, ptr %9, align 4, !tbaa !5
  %67 = icmp sge i32 %66, 0
  br i1 %67, label %68, label %83

68:                                               ; preds = %65
  %69 = load i32, ptr %10, align 4, !tbaa !5
  %70 = icmp slt i32 %69, 0
  br i1 %70, label %71, label %83

71:                                               ; preds = %68
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !9
  %76 = sext i8 %75 to i32
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = add nsw i32 %76, %77
  %79 = trunc i32 %78 to i8
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [1001 x i8], ptr %4, i64 0, i64 %81
  store i8 %79, ptr %82, align 1, !tbaa !9
  br label %83

83:                                               ; preds = %71, %68, %65
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = icmp slt i32 %84, 0
  br i1 %85, label %86, label %101

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

89:                                               ; preds = %86
  %90 = load i32, ptr %10, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [1000 x i8], ptr %3, i64 0, i64 %91
  %93 = load i8, ptr %92, align 1, !tbaa !9
  %94 = sext i8 %93 to i32
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = add nsw i32 %94, %95
  %97 = trunc i32 %96 to i8
  %98 = load i32, ptr %5, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [1001 x i8], ptr %4, i64 0, i64 %99
  store i8 %97, ptr %100, align 1, !tbaa !9
  br label %101

101:                                              ; preds = %89, %86, %83
  store i32 0, ptr %7, align 4, !tbaa !5
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [1001 x i8], ptr %4, i64 0, i64 %103
  %105 = load i8, ptr %104, align 1, !tbaa !9
  %106 = sext i8 %105 to i32
  %107 = icmp sgt i32 %106, 57
  br i1 %107, label %108, label %119

108:                                              ; preds = %101
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [1001 x i8], ptr %4, i64 0, i64 %110
  %112 = load i8, ptr %111, align 1, !tbaa !9
  %113 = sext i8 %112 to i32
  %114 = sub nsw i32 %113, 10
  %115 = trunc i32 %114 to i8
  %116 = load i32, ptr %5, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [1001 x i8], ptr %4, i64 0, i64 %117
  store i8 %115, ptr %118, align 1, !tbaa !9
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %108, %101
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %5, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %5, align 4, !tbaa !5
  %123 = load i32, ptr %9, align 4, !tbaa !5
  %124 = add nsw i32 %123, -1
  store i32 %124, ptr %9, align 4, !tbaa !5
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = add nsw i32 %125, -1
  store i32 %126, ptr %10, align 4, !tbaa !5
  br label %32, !llvm.loop !10

127:                                              ; preds = %38
  %128 = load i32, ptr %7, align 4, !tbaa !5
  %129 = icmp eq i32 %128, 1
  br i1 %129, label %130, label %133

130:                                              ; preds = %127
  %131 = load i32, ptr %7, align 4, !tbaa !5
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %131)
  br label %133

133:                                              ; preds = %130, %127
  br label %134

134:                                              ; preds = %138, %133
  %135 = load i32, ptr %5, align 4, !tbaa !5
  %136 = add nsw i32 %135, -1
  store i32 %136, ptr %5, align 4, !tbaa !5
  %137 = icmp ne i32 %135, 0
  br i1 %137, label %138, label %145

138:                                              ; preds = %134
  %139 = load i32, ptr %5, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [1001 x i8], ptr %4, i64 0, i64 %140
  %142 = load i8, ptr %141, align 1, !tbaa !9
  %143 = sext i8 %142 to i32
  %144 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %143)
  br label %134, !llvm.loop !12

145:                                              ; preds = %134
  %146 = load i32, ptr %6, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %6, align 4, !tbaa !5
  %148 = load i32, ptr %8, align 4, !tbaa !5
  %149 = icmp ne i32 %148, 1
  br i1 %149, label %150, label %152

150:                                              ; preds = %145
  %151 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %154

152:                                              ; preds = %145
  %153 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %154

154:                                              ; preds = %152, %150
  %155 = load i32, ptr %8, align 4, !tbaa !5
  %156 = add nsw i32 %155, -1
  store i32 %156, ptr %8, align 4, !tbaa !5
  br label %12, !llvm.loop !13

157:                                              ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 1001, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 1000, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 1000, ptr %2) #4
  %158 = load i32, ptr %1, align 4
  ret i32 %158
}

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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [1000 x i8], align 16
  %2 = alloca [1000 x i8], align 16
  %3 = alloca [1001 x i8], align 16
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 1001, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4)
  %.pr = load i32, ptr %4, align 4, !tbaa !5
  %.not59 = icmp eq i32 %.pr, 0
  br i1 %.not59, label %._crit_edge64, label %.lr.ph63

.lr.ph63:                                         ; preds = %0, %._crit_edge58
  %.03761 = phi i32 [ %.1.lcssa, %._crit_edge58 ], [ 0, %0 ]
  %.03860 = phi i32 [ %66, %._crit_edge58 ], [ 1, %0 ]
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.03860)
  %8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %9 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #5
  %10 = trunc i64 %9 to i32
  %11 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #5
  %12 = trunc i64 %11 to i32
  %.047 = add i32 %12, -1
  %.03648 = add i32 %10, -1
  %13 = icmp sgt i32 %.03648, -1
  %14 = icmp sgt i32 %.047, -1
  %15 = select i1 %13, i1 true, i1 %14
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph63, %52
  %indvars.iv = phi i64 [ %indvars.iv.next, %52 ], [ 0, %.lr.ph63 ]
  %16 = phi i1 [ %54, %52 ], [ %14, %.lr.ph63 ]
  %17 = phi i1 [ %53, %52 ], [ %13, %.lr.ph63 ]
  %.03652 = phi i32 [ %.036, %52 ], [ %.03648, %.lr.ph63 ]
  %.051 = phi i32 [ %.0, %52 ], [ %.047, %.lr.ph63 ]
  %.150 = phi i32 [ %.2, %52 ], [ %.03761, %.lr.ph63 ]
  %or.cond = select i1 %17, i1 %16, i1 false
  br i1 %or.cond, label %.thread, label %29

.thread:                                          ; preds = %.lr.ph
  %18 = zext nneg i32 %.03652 to i64
  %19 = getelementptr inbounds [1000 x i8], ptr %1, i64 0, i64 %18
  %20 = load i8, ptr %19, align 1, !tbaa !9
  %21 = zext nneg i32 %.051 to i64
  %22 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %21
  %23 = load i8, ptr %22, align 1, !tbaa !9
  %24 = trunc nuw nsw i32 %.150 to i8
  %25 = add nuw nsw i8 %24, -48
  %26 = add i8 %25, %20
  %27 = add i8 %26, %23
  %28 = getelementptr inbounds [1001 x i8], ptr %3, i64 0, i64 %indvars.iv
  store i8 %27, ptr %28, align 1, !tbaa !9
  br label %.thread45

29:                                               ; preds = %.lr.ph
  %30 = icmp slt i32 %.051, 0
  %or.cond3 = select i1 %17, i1 %30, i1 false
  br i1 %or.cond3, label %31, label %38

31:                                               ; preds = %29
  %32 = zext nneg i32 %.03652 to i64
  %33 = getelementptr inbounds [1000 x i8], ptr %1, i64 0, i64 %32
  %34 = load i8, ptr %33, align 1, !tbaa !9
  %35 = trunc nuw nsw i32 %.150 to i8
  %36 = add i8 %34, %35
  %37 = getelementptr inbounds [1001 x i8], ptr %3, i64 0, i64 %indvars.iv
  store i8 %36, ptr %37, align 1, !tbaa !9
  br label %.thread45

38:                                               ; preds = %29
  %39 = icmp slt i32 %.03652, 0
  %or.cond5 = select i1 %39, i1 %16, i1 false
  br i1 %or.cond5, label %40, label %..thread45_crit_edge

..thread45_crit_edge:                             ; preds = %38
  %.phi.trans.insert = getelementptr inbounds [1001 x i8], ptr %3, i64 0, i64 %indvars.iv
  %.pre = load i8, ptr %.phi.trans.insert, align 1, !tbaa !9
  br label %.thread45

40:                                               ; preds = %38
  %41 = zext nneg i32 %.051 to i64
  %42 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !9
  %44 = trunc nuw nsw i32 %.150 to i8
  %45 = add i8 %43, %44
  %46 = getelementptr inbounds [1001 x i8], ptr %3, i64 0, i64 %indvars.iv
  store i8 %45, ptr %46, align 1, !tbaa !9
  br label %.thread45

.thread45:                                        ; preds = %..thread45_crit_edge, %31, %.thread, %40
  %47 = phi i8 [ %.pre, %..thread45_crit_edge ], [ %36, %31 ], [ %27, %.thread ], [ %45, %40 ]
  %48 = icmp sgt i8 %47, 57
  br i1 %48, label %49, label %52

49:                                               ; preds = %.thread45
  %50 = getelementptr inbounds [1001 x i8], ptr %3, i64 0, i64 %indvars.iv
  %51 = add nsw i8 %47, -10
  store i8 %51, ptr %50, align 1, !tbaa !9
  br label %52

52:                                               ; preds = %.thread45, %49
  %.2 = phi i32 [ 1, %49 ], [ 0, %.thread45 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.0 = add i32 %.051, -1
  %.036 = add i32 %.03652, -1
  %53 = icmp sgt i32 %.036, -1
  %54 = icmp sgt i32 %.0, -1
  %55 = select i1 %53, i1 true, i1 %54
  br i1 %55, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !10

._crit_edge.loopexit:                             ; preds = %52
  %56 = trunc nuw i64 %indvars.iv.next to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph63
  %.039.lcssa = phi i32 [ 0, %.lr.ph63 ], [ %56, %._crit_edge.loopexit ]
  %.1.lcssa = phi i32 [ %.03761, %.lr.ph63 ], [ %.2, %._crit_edge.loopexit ]
  %57 = icmp eq i32 %.1.lcssa, 1
  br i1 %57, label %58, label %60

58:                                               ; preds = %._crit_edge
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 1)
  br label %60

60:                                               ; preds = %58, %._crit_edge
  %.not4254 = icmp eq i32 %.039.lcssa, 0
  br i1 %.not4254, label %._crit_edge58, label %.lr.ph57.preheader

.lr.ph57.preheader:                               ; preds = %60
  %61 = sext i32 %.039.lcssa to i64
  br label %.lr.ph57

.lr.ph57:                                         ; preds = %.lr.ph57.preheader, %.lr.ph57
  %indvars.iv65 = phi i64 [ %61, %.lr.ph57.preheader ], [ %indvars.iv.next66, %.lr.ph57 ]
  %indvars.iv.next66 = add nsw i64 %indvars.iv65, -1
  %62 = getelementptr inbounds [1001 x i8], ptr %3, i64 0, i64 %indvars.iv.next66
  %63 = load i8, ptr %62, align 1, !tbaa !9
  %64 = sext i8 %63 to i32
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %64)
  %.not42 = icmp eq i64 %indvars.iv.next66, 0
  br i1 %.not42, label %._crit_edge58, label %.lr.ph57, !llvm.loop !12

._crit_edge58:                                    ; preds = %.lr.ph57, %60
  %66 = add nuw nsw i32 %.03860, 1
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %.not43 = icmp eq i32 %67, 1
  %.str.6..str.5 = select i1 %.not43, ptr @.str.6, ptr @.str.5
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.6..str.5)
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = add nsw i32 %69, -1
  store i32 %70, ptr %4, align 4, !tbaa !5
  %.not = icmp eq i32 %70, 0
  br i1 %.not, label %._crit_edge64, label %.lr.ph63, !llvm.loop !13

._crit_edge64:                                    ; preds = %._crit_edge58, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 1001, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %1) #4
  ret i32 0
}

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


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