; LLVM IR from reyadussalahin/problem-solving :: dynamic_programming/lcs/loj/F1033 (Solution)

; 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 [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1

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

16:                                               ; preds = %166, %0
  %17 = load i32, ptr %6, align 4, !tbaa !5
  %18 = load i32, ptr %5, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %21, label %20

20:                                               ; preds = %16
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %169

21:                                               ; preds = %16
  %22 = getelementptr inbounds [128 x i8], ptr %2, i64 0, i64 0
  %23 = getelementptr inbounds i8, ptr %22, i64 1
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %23)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %25 = getelementptr inbounds [128 x i8], ptr %2, i64 0, i64 0
  %26 = getelementptr inbounds i8, ptr %25, i64 1
  %27 = call i64 @strlen(ptr noundef %26) #6
  %28 = trunc i64 %27 to i32
  store i32 %28, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %53, %21
  %30 = load i32, ptr %9, align 4, !tbaa !5
  %31 = load i32, ptr %8, align 4, !tbaa !5
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %56

34:                                               ; preds = %29
  %35 = getelementptr inbounds [128 x [128 x i32]], ptr %4, i64 0, i64 0
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [128 x i32], ptr %35, i64 0, i64 %37
  store i32 0, ptr %38, align 4, !tbaa !5
  %39 = load i32, ptr %9, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [128 x [128 x i32]], ptr %4, i64 0, i64 %40
  %42 = getelementptr inbounds [128 x i32], ptr %41, i64 0, i64 0
  store i32 0, ptr %42, align 16, !tbaa !5
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = load i32, ptr %9, align 4, !tbaa !5
  %45 = sub nsw i32 %43, %44
  %46 = add nsw i32 %45, 1
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [128 x i8], ptr %2, i64 0, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !9
  %50 = load i32, ptr %9, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [128 x i8], ptr %3, i64 0, i64 %51
  store i8 %49, ptr %52, align 1, !tbaa !9
  br label %53

53:                                               ; preds = %34
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %9, align 4, !tbaa !5
  br label %29, !llvm.loop !10

56:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %57 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %57, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %158, %56
  %59 = load i32, ptr %11, align 4, !tbaa !5
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = icmp sle i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %161

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

64:                                               ; preds = %124, %63
  %65 = load i32, ptr %12, align 4, !tbaa !5
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = load i32, ptr %11, align 4, !tbaa !5
  %68 = sub nsw i32 %66, %67
  %69 = icmp sle i32 %65, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %64
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %127

71:                                               ; preds = %64
  %72 = load i32, ptr %11, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [128 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 %12, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [128 x i8], ptr %3, i64 0, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !9
  %81 = sext i8 %80 to i32
  %82 = icmp eq i32 %76, %81
  br i1 %82, label %83, label %100

83:                                               ; preds = %71
  %84 = load i32, ptr %11, align 4, !tbaa !5
  %85 = sub nsw i32 %84, 1
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [128 x [128 x i32]], ptr %4, i64 0, i64 %86
  %88 = load i32, ptr %12, align 4, !tbaa !5
  %89 = sub nsw i32 %88, 1
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [128 x i32], ptr %87, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = add nsw i32 1, %92
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [128 x [128 x i32]], ptr %4, i64 0, i64 %95
  %97 = load i32, ptr %12, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [128 x i32], ptr %96, i64 0, i64 %98
  store i32 %93, ptr %99, align 4, !tbaa !5
  br label %123

100:                                              ; preds = %71
  %101 = load i32, ptr %11, align 4, !tbaa !5
  %102 = sub nsw i32 %101, 1
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [128 x [128 x i32]], ptr %4, i64 0, i64 %103
  %105 = load i32, ptr %12, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [128 x i32], ptr %104, i64 0, i64 %106
  %108 = load i32, ptr %11, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [128 x [128 x i32]], ptr %4, i64 0, i64 %109
  %111 = load i32, ptr %12, align 4, !tbaa !5
  %112 = sub nsw i32 %111, 1
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [128 x i32], ptr %110, i64 0, i64 %113
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %107, ptr noundef nonnull align 4 dereferenceable(4) %114)
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = load i32, ptr %11, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [128 x [128 x i32]], ptr %4, i64 0, i64 %118
  %120 = load i32, ptr %12, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [128 x i32], ptr %119, i64 0, i64 %121
  store i32 %116, ptr %122, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %100, %83
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %12, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %12, align 4, !tbaa !5
  br label %64, !llvm.loop !12

127:                                              ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %128 = load i32, ptr %8, align 4, !tbaa !5
  %129 = sub nsw i32 %128, 1
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = sub nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [128 x [128 x i32]], ptr %4, i64 0, i64 %132
  %134 = load i32, ptr %8, align 4, !tbaa !5
  %135 = load i32, ptr %11, align 4, !tbaa !5
  %136 = sub nsw i32 %134, %135
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [128 x i32], ptr %133, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = mul nsw i32 2, %139
  %141 = sub nsw i32 %129, %140
  store i32 %141, ptr %13, align 4, !tbaa !5
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %143 = load i32, ptr %142, align 4, !tbaa !5
  store i32 %143, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %144 = load i32, ptr %8, align 4, !tbaa !5
  %145 = load i32, ptr %11, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [128 x [128 x i32]], ptr %4, i64 0, i64 %146
  %148 = load i32, ptr %8, align 4, !tbaa !5
  %149 = load i32, ptr %11, align 4, !tbaa !5
  %150 = sub nsw i32 %148, %149
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [128 x i32], ptr %147, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = mul nsw i32 2, %153
  %155 = sub nsw i32 %144, %154
  store i32 %155, ptr %14, align 4, !tbaa !5
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %157 = load i32, ptr %156, align 4, !tbaa !5
  store i32 %157, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %158

158:                                              ; preds = %127
  %159 = load i32, ptr %11, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %11, align 4, !tbaa !5
  br label %58, !llvm.loop !13

161:                                              ; preds = %62
  %162 = load i32, ptr %6, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  %164 = load i32, ptr %10, align 4, !tbaa !5
  %165 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %163, i32 noundef %164)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %166

166:                                              ; preds = %161
  %167 = load i32, ptr %6, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %6, align 4, !tbaa !5
  br label %16, !llvm.loop !14

169:                                              ; preds = %20
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 65536, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %2) #5
  %170 = load i32, ptr %1, align 4
  ret i32 %170
}

; 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

; 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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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 = { inlinehint 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 #5 = { nounwind }
attributes #6 = { 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}


; 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 [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [128 x i8], align 16
  %2 = alloca [128 x i8], align 16
  %3 = alloca [128 x [128 x i32]], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 65536, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4)
  %9 = load i32, ptr %4, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph58, label %._crit_edge59

.lr.ph58:                                         ; preds = %0
  %11 = getelementptr inbounds i8, ptr %1, i64 1
  br label %12

._crit_edge59:                                    ; preds = %._crit_edge55, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 65536, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %1) #5
  ret i32 0

12:                                               ; preds = %.lr.ph58, %._crit_edge55
  %.04256 = phi i32 [ 0, %.lr.ph58 ], [ %50, %._crit_edge55 ]
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %11)
  %14 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %11) #6
  %15 = trunc i64 %14 to i32
  %.not47 = icmp slt i32 %15, 0
  br i1 %.not47, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 %15, ptr %5, align 4, !tbaa !5
  br label %._crit_edge55

.lr.ph:                                           ; preds = %12
  %16 = add nuw i32 %15, 1
  %wide.trip.count = zext i32 %16 to i64
  %17 = and i64 %14, 2147483647
  %xtraiter = and i64 %wide.trip.count, 1
  %18 = icmp eq i64 %17, 0
  br i1 %18, label %._crit_edge.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 4294967294
  br label %29

._crit_edge.unr-lcssa:                            ; preds = %29, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %29 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.epilog-lcssa

._crit_edge.epilog-lcssa:                         ; preds = %._crit_edge.unr-lcssa
  %19 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %indvars.iv.unr
  store i32 0, ptr %19, align 4, !tbaa !5
  %20 = getelementptr inbounds [128 x [128 x i32]], ptr %3, i64 0, i64 %indvars.iv.unr
  store i32 0, ptr %20, align 16, !tbaa !5
  %21 = trunc nuw nsw i64 %indvars.iv.unr to i32
  %22 = sub i32 %16, %21
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [128 x i8], ptr %1, i64 0, i64 %23
  %25 = load i8, ptr %24, align 1, !tbaa !9
  %26 = getelementptr inbounds [128 x i8], ptr %2, i64 0, i64 %indvars.iv.unr
  store i8 %25, ptr %26, align 1, !tbaa !9
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %._crit_edge.epilog-lcssa
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 %15, ptr %5, align 4, !tbaa !5
  %.not4553 = icmp eq i32 %15, 0
  br i1 %.not4553, label %._crit_edge55, label %.preheader.preheader

.preheader.preheader:                             ; preds = %._crit_edge
  %27 = and i64 %14, 2147483647
  %28 = add nuw nsw i64 %14, 1
  %wide.trip.count71 = and i64 %28, 4294967295
  br label %.preheader

29:                                               ; preds = %29, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %29 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %29 ]
  %30 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %indvars.iv
  store i32 0, ptr %30, align 8, !tbaa !5
  %31 = getelementptr inbounds [128 x [128 x i32]], ptr %3, i64 0, i64 %indvars.iv
  store i32 0, ptr %31, align 16, !tbaa !5
  %32 = trunc nuw nsw i64 %indvars.iv to i32
  %33 = sub i32 %16, %32
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [128 x i8], ptr %1, i64 0, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %37 = getelementptr inbounds [128 x i8], ptr %2, i64 0, i64 %indvars.iv
  store i8 %36, ptr %37, align 2, !tbaa !9
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %38 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %indvars.iv.next
  store i32 0, ptr %38, align 4, !tbaa !5
  %39 = getelementptr inbounds [128 x [128 x i32]], ptr %3, i64 0, i64 %indvars.iv.next
  store i32 0, ptr %39, align 16, !tbaa !5
  %40 = trunc nuw nsw i64 %indvars.iv.next to i32
  %41 = sub i32 %16, %40
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [128 x i8], ptr %1, i64 0, i64 %42
  %44 = load i8, ptr %43, align 1, !tbaa !9
  %45 = getelementptr inbounds [128 x i8], ptr %2, i64 0, i64 %indvars.iv.next
  store i8 %44, ptr %45, align 1, !tbaa !9
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa, label %29, !llvm.loop !10

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge52
  %indvars.iv68 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next69, %._crit_edge52 ]
  %indvars.iv64 = phi i32 [ %15, %.preheader.preheader ], [ %indvars.iv.next65, %._crit_edge52 ]
  %46 = sub nsw i64 %27, %indvars.iv68
  %.not4649 = icmp slt i64 %46, 1
  br i1 %.not4649, label %.preheader.._crit_edge52_crit_edge, label %.lr.ph51

.preheader.._crit_edge52_crit_edge:               ; preds = %.preheader
  %.pre = add nsw i64 %indvars.iv68, -1
  br label %._crit_edge52

.lr.ph51:                                         ; preds = %.preheader
  %47 = getelementptr inbounds [128 x i8], ptr %1, i64 0, i64 %indvars.iv68
  %48 = add nsw i64 %indvars.iv68, -1
  %wide.trip.count66 = zext i32 %indvars.iv64 to i64
  br label %67

._crit_edge55:                                    ; preds = %._crit_edge52, %._crit_edge.thread, %._crit_edge
  %49 = phi i32 [ %15, %._crit_edge ], [ %15, %._crit_edge.thread ], [ %66, %._crit_edge52 ]
  %50 = add nuw nsw i32 %.04256, 1
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %50, i32 noundef %49)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = icmp slt i32 %50, %52
  br i1 %53, label %12, label %._crit_edge59, !llvm.loop !12

._crit_edge52:                                    ; preds = %83, %.preheader.._crit_edge52_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader.._crit_edge52_crit_edge ], [ %48, %83 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %54 = getelementptr inbounds [128 x [128 x i32]], ptr %3, i64 0, i64 %.pre-phi, i64 %46
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = shl nsw i32 %55, 1
  %57 = xor i32 %56, -1
  %58 = add i32 %57, %15
  store i32 %58, ptr %6, align 4, !tbaa !5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %61 = getelementptr inbounds [128 x [128 x i32]], ptr %3, i64 0, i64 %indvars.iv68, i64 %46
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = shl nsw i32 %62, 1
  %64 = sub nsw i32 %15, %63
  store i32 %64, ptr %7, align 4, !tbaa !5
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %66 = load i32, ptr %65, align 4, !tbaa !5
  store i32 %66, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %indvars.iv.next65 = add i32 %indvars.iv64, -1
  %exitcond72.not = icmp eq i64 %indvars.iv.next69, %wide.trip.count71
  br i1 %exitcond72.not, label %._crit_edge55, label %.preheader, !llvm.loop !13

67:                                               ; preds = %.lr.ph51, %83
  %indvars.iv61 = phi i64 [ 1, %.lr.ph51 ], [ %indvars.iv.next62, %83 ]
  %68 = load i8, ptr %47, align 1, !tbaa !9
  %69 = getelementptr inbounds [128 x i8], ptr %2, i64 0, i64 %indvars.iv61
  %70 = load i8, ptr %69, align 1, !tbaa !9
  %71 = icmp eq i8 %68, %70
  br i1 %71, label %72, label %77

72:                                               ; preds = %67
  %73 = add nsw i64 %indvars.iv61, -1
  %74 = getelementptr inbounds [128 x [128 x i32]], ptr %3, i64 0, i64 %48, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  br label %83

77:                                               ; preds = %67
  %78 = getelementptr inbounds [128 x [128 x i32]], ptr %3, i64 0, i64 %48, i64 %indvars.iv61
  %79 = add nsw i64 %indvars.iv61, -1
  %80 = getelementptr inbounds [128 x [128 x i32]], ptr %3, i64 0, i64 %indvars.iv68, i64 %79
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %78, ptr noundef nonnull align 4 dereferenceable(4) %80)
  %82 = load i32, ptr %81, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %72, %77
  %.sink = phi i32 [ %76, %72 ], [ %82, %77 ]
  %84 = getelementptr inbounds [128 x [128 x i32]], ptr %3, i64 0, i64 %indvars.iv68, i64 %indvars.iv61
  store i32 %.sink, ptr %84, align 4
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next62, %wide.trip.count66
  br i1 %exitcond67.not, label %._crit_edge52, label %67, !llvm.loop !14
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

attributes #0 = { mustprogress norecurse nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { inlinehint 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 #5 = { nounwind }
attributes #6 = { 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}


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