; LLVM IR from xtaci/algorithms :: src (lcs_demo)

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

%"class.alg::Stack" = type { %"class.alg::Stack<int>::StackEmptyException", %"class.alg::Stack<int>::StackIndexOutOfBoundException", i32, i32, ptr }
%"class.alg::Stack<int>::StackEmptyException" = type { %"class.std::exception" }
%"class.std::exception" = type { ptr }
%"class.alg::Stack<int>::StackIndexOutOfBoundException" = type { %"class.std::exception" }

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [10 x i32], align 16
  %4 = alloca [10 x i32], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"class.alg::Stack", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  store i32 10, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 40, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  %13 = call i64 @time(ptr noundef null) #9
  %14 = trunc i64 %13 to i32
  call void @srand(i32 noundef %14) #9
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %31, %0
  %16 = load i32, ptr %5, align 4, !tbaa !5
  %17 = icmp slt i32 %16, 10
  br i1 %17, label %18, label %34

18:                                               ; preds = %15
  %19 = call i32 @rand() #9
  %20 = srem i32 %19, 26
  %21 = add nsw i32 65, %20
  %22 = load i32, ptr %5, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [10 x i32], ptr %3, i64 0, i64 %23
  store i32 %21, ptr %24, align 4, !tbaa !5
  %25 = call i32 @rand() #9
  %26 = srem i32 %25, 26
  %27 = add nsw i32 65, %26
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [10 x i32], ptr %4, i64 0, i64 %29
  store i32 %27, ptr %30, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %18
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %5, align 4, !tbaa !5
  br label %15, !llvm.loop !9

34:                                               ; preds = %15
  %35 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  br label %36

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

37:                                               ; preds = %46, %36
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = icmp slt i32 %38, 10
  br i1 %39, label %40, label %49

40:                                               ; preds = %37
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [10 x i32], ptr %3, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %44)
  br label %46

46:                                               ; preds = %40
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %6, align 4, !tbaa !5
  br label %37, !llvm.loop !11

49:                                               ; preds = %37
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  br label %51

51:                                               ; preds = %49
  br label %52

52:                                               ; preds = %51
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %54

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

55:                                               ; preds = %64, %54
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = icmp slt i32 %56, 10
  br i1 %57, label %58, label %67

58:                                               ; preds = %55
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [10 x i32], ptr %4, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %62)
  br label %64

64:                                               ; preds = %58
  %65 = load i32, ptr %7, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %7, align 4, !tbaa !5
  br label %55, !llvm.loop !12

67:                                               ; preds = %55
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %69

69:                                               ; preds = %67
  br label %70

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %71 = getelementptr inbounds [10 x i32], ptr %3, i64 0, i64 0
  %72 = getelementptr inbounds [10 x i32], ptr %4, i64 0, i64 0
  %73 = call noundef ptr @_ZN3algL10lcs_lengthIiEEPNS_7Array2DIjEEPKT_jS6_j(ptr noundef %71, i32 noundef 10, ptr noundef %72, i32 noundef 10)
  store ptr %73, ptr %8, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #9
  call void @_ZN3alg5StackIiEC2Ej(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 100)
  %74 = load ptr, ptr %8, align 8, !tbaa !13
  %75 = getelementptr inbounds [10 x i32], ptr %3, i64 0, i64 0
  %76 = getelementptr inbounds [10 x i32], ptr %4, i64 0, i64 0
  invoke void @_ZN3algL13lcs_backtrackIiEEvRNS_5StackIiEERNS_7Array2DIjEEPKT_S9_jj(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(16) %74, ptr noundef %75, ptr noundef %76, i32 noundef 10, i32 noundef 10)
          to label %77 unwind label %94

77:                                               ; preds = %70
  %78 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4)
          to label %79 unwind label %94

79:                                               ; preds = %77
  br label %80

80:                                               ; preds = %93, %79
  %81 = invoke noundef zeroext i1 @_ZNK3alg5StackIiE8is_emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %82 unwind label %94

82:                                               ; preds = %80
  %83 = xor i1 %81, true
  br i1 %83, label %84, label %102

84:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  %85 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3alg5StackIiE3topEv(ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %86 unwind label %98

86:                                               ; preds = %84
  %87 = load i32, ptr %85, align 4, !tbaa !5
  store i32 %87, ptr %12, align 4, !tbaa !5
  %88 = load i32, ptr %12, align 4, !tbaa !5
  %89 = trunc i32 %88 to i8
  %90 = sext i8 %89 to i32
  %91 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %90)
          to label %92 unwind label %98

92:                                               ; preds = %86
  invoke void @_ZN3alg5StackIiE3popEv(ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %93 unwind label %98

93:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %80, !llvm.loop !15

94:                                               ; preds = %106, %80, %77, %70
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %10, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %11, align 4
  br label %110

98:                                               ; preds = %92, %86, %84
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %10, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %110

102:                                              ; preds = %82
  %103 = load ptr, ptr %8, align 8, !tbaa !13
  %104 = icmp eq ptr %103, null
  br i1 %104, label %106, label %105

105:                                              ; preds = %102
  call void @_ZN3alg7Array2DIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %103) #9
  call void @_ZdlPvm(ptr noundef %103, i64 noundef 16) #10
  br label %106

106:                                              ; preds = %105, %102
  %107 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2)
          to label %108 unwind label %94

108:                                              ; preds = %106
  store i32 0, ptr %1, align 4
  call void @_ZN3alg5StackIiED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  %109 = load i32, ptr %1, align 4
  ret i32 %109

110:                                              ; preds = %98, %94
  call void @_ZN3alg5StackIiED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %111

111:                                              ; preds = %110
  %112 = load ptr, ptr %10, align 8
  %113 = load i32, ptr %11, align 4
  %114 = insertvalue { ptr, i32 } poison, ptr %112, 0
  %115 = insertvalue { ptr, i32 } %114, i32 %113, 1
  resume { ptr, i32 } %115
}

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) #2

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @rand() #2

declare i32 @printf(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: mustprogress uwtable
declare hidden noundef ptr @_ZN3algL10lcs_lengthIiEEPNS_7Array2DIjEEPKT_jS6_j(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3alg5StackIiEC2Ej(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN3algL13lcs_backtrackIiEEvRNS_5StackIiEERNS_7Array2DIjEEPKT_S9_jj(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef, i32 noundef, i32 noundef) #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3alg5StackIiE8is_emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3alg5StackIiE3topEv(ptr noundef nonnull align 8 dereferenceable(32)) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3alg5StackIiE3popEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3alg7Array2DIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3alg5StackIiED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #7 align 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 = { 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 = { "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 = { 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 = { 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 #6 = { 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 #7 = { 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 #8 = { nobuiltin 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 #9 = { nounwind }
attributes #10 = { builtin 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.alg::Stack" = type { %"class.alg::Stack<int>::StackEmptyException", %"class.alg::Stack<int>::StackIndexOutOfBoundException", i32, i32, ptr }
%"class.alg::Stack<int>::StackEmptyException" = type { %"class.std::exception" }
%"class.std::exception" = type { ptr }
%"class.alg::Stack<int>::StackIndexOutOfBoundException" = type { %"class.std::exception" }

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca [10 x i32], align 16
  %2 = alloca [10 x i32], align 16
  %3 = alloca %"class.alg::Stack", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #9
  %4 = tail call i64 @time(ptr noundef null) #9
  %5 = trunc i64 %4 to i32
  tail call void @srand(i32 noundef %5) #9
  %6 = tail call i32 @rand() #9
  %7 = srem i32 %6, 26
  %8 = add nsw i32 %7, 65
  store i32 %8, ptr %1, align 16, !tbaa !5
  %9 = tail call i32 @rand() #9
  %10 = srem i32 %9, 26
  %11 = add nsw i32 %10, 65
  store i32 %11, ptr %2, align 16, !tbaa !5
  %12 = tail call i32 @rand() #9
  %13 = srem i32 %12, 26
  %14 = add nsw i32 %13, 65
  %15 = getelementptr inbounds i8, ptr %1, i64 4
  store i32 %14, ptr %15, align 4, !tbaa !5
  %16 = tail call i32 @rand() #9
  %17 = srem i32 %16, 26
  %18 = add nsw i32 %17, 65
  %19 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 %18, ptr %19, align 4, !tbaa !5
  %20 = tail call i32 @rand() #9
  %21 = srem i32 %20, 26
  %22 = add nsw i32 %21, 65
  %23 = getelementptr inbounds i8, ptr %1, i64 8
  store i32 %22, ptr %23, align 8, !tbaa !5
  %24 = tail call i32 @rand() #9
  %25 = srem i32 %24, 26
  %26 = add nsw i32 %25, 65
  %27 = getelementptr inbounds i8, ptr %2, i64 8
  store i32 %26, ptr %27, align 8, !tbaa !5
  %28 = tail call i32 @rand() #9
  %29 = srem i32 %28, 26
  %30 = add nsw i32 %29, 65
  %31 = getelementptr inbounds i8, ptr %1, i64 12
  store i32 %30, ptr %31, align 4, !tbaa !5
  %32 = tail call i32 @rand() #9
  %33 = srem i32 %32, 26
  %34 = add nsw i32 %33, 65
  %35 = getelementptr inbounds i8, ptr %2, i64 12
  store i32 %34, ptr %35, align 4, !tbaa !5
  %36 = tail call i32 @rand() #9
  %37 = srem i32 %36, 26
  %38 = add nsw i32 %37, 65
  %39 = getelementptr inbounds i8, ptr %1, i64 16
  store i32 %38, ptr %39, align 16, !tbaa !5
  %40 = tail call i32 @rand() #9
  %41 = srem i32 %40, 26
  %42 = add nsw i32 %41, 65
  %43 = getelementptr inbounds i8, ptr %2, i64 16
  store i32 %42, ptr %43, align 16, !tbaa !5
  %44 = tail call i32 @rand() #9
  %45 = srem i32 %44, 26
  %46 = add nsw i32 %45, 65
  %47 = getelementptr inbounds i8, ptr %1, i64 20
  store i32 %46, ptr %47, align 4, !tbaa !5
  %48 = tail call i32 @rand() #9
  %49 = srem i32 %48, 26
  %50 = add nsw i32 %49, 65
  %51 = getelementptr inbounds i8, ptr %2, i64 20
  store i32 %50, ptr %51, align 4, !tbaa !5
  %52 = tail call i32 @rand() #9
  %53 = srem i32 %52, 26
  %54 = add nsw i32 %53, 65
  %55 = getelementptr inbounds i8, ptr %1, i64 24
  store i32 %54, ptr %55, align 8, !tbaa !5
  %56 = tail call i32 @rand() #9
  %57 = srem i32 %56, 26
  %58 = add nsw i32 %57, 65
  %59 = getelementptr inbounds i8, ptr %2, i64 24
  store i32 %58, ptr %59, align 8, !tbaa !5
  %60 = tail call i32 @rand() #9
  %61 = srem i32 %60, 26
  %62 = add nsw i32 %61, 65
  %63 = getelementptr inbounds i8, ptr %1, i64 28
  store i32 %62, ptr %63, align 4, !tbaa !5
  %64 = tail call i32 @rand() #9
  %65 = srem i32 %64, 26
  %66 = add nsw i32 %65, 65
  %67 = getelementptr inbounds i8, ptr %2, i64 28
  store i32 %66, ptr %67, align 4, !tbaa !5
  %68 = tail call i32 @rand() #9
  %69 = srem i32 %68, 26
  %70 = add nsw i32 %69, 65
  %71 = getelementptr inbounds i8, ptr %1, i64 32
  store i32 %70, ptr %71, align 16, !tbaa !5
  %72 = tail call i32 @rand() #9
  %73 = srem i32 %72, 26
  %74 = add nsw i32 %73, 65
  %75 = getelementptr inbounds i8, ptr %2, i64 32
  store i32 %74, ptr %75, align 16, !tbaa !5
  %76 = tail call i32 @rand() #9
  %77 = srem i32 %76, 26
  %78 = add nsw i32 %77, 65
  %79 = getelementptr inbounds i8, ptr %1, i64 36
  store i32 %78, ptr %79, align 4, !tbaa !5
  %80 = tail call i32 @rand() #9
  %81 = srem i32 %80, 26
  %82 = add nsw i32 %81, 65
  %83 = getelementptr inbounds i8, ptr %2, i64 36
  store i32 %82, ptr %83, align 4, !tbaa !5
  %84 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %85 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8)
  %86 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %14)
  %87 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %22)
  %88 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %30)
  %89 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %38)
  %90 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %46)
  %91 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %54)
  %92 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %62)
  %93 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %70)
  %94 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %78)
  %95 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %96 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %97 = load i32, ptr %2, align 16, !tbaa !5
  %98 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %97)
  %99 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %18)
  %100 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %26)
  %101 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %34)
  %102 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %42)
  %103 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %50)
  %104 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %58)
  %105 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %66)
  %106 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %74)
  %107 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %82)
  %108 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %109 = call noundef ptr @_ZN3algL10lcs_lengthIiEEPNS_7Array2DIjEEPKT_jS6_j(ptr noundef nonnull %1, i32 noundef 10, ptr noundef nonnull %2, i32 noundef 10)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #9
  call void @_ZN3alg5StackIiEC2Ej(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 100)
  invoke void @_ZN3algL13lcs_backtrackIiEEvRNS_5StackIiEERNS_7Array2DIjEEPKT_S9_jj(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(16) %109, ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef 10, i32 noundef 10)
          to label %110 unwind label %119

110:                                              ; preds = %0
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %112 = call noundef zeroext i1 @_ZNK3alg5StackIiE8is_emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  br i1 %112, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %110, %114
  %113 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3alg5StackIiE3topEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %114 unwind label %121

114:                                              ; preds = %.lr.ph
  %115 = load i32, ptr %113, align 4, !tbaa !5
  %sext = shl i32 %115, 24
  %116 = ashr exact i32 %sext, 24
  %117 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %116)
  call void @_ZN3alg5StackIiE3popEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  %118 = call noundef zeroext i1 @_ZNK3alg5StackIiE8is_emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  br i1 %118, label %._crit_edge, label %.lr.ph, !llvm.loop !9

119:                                              ; preds = %0
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %124

121:                                              ; preds = %.lr.ph
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %124

._crit_edge:                                      ; preds = %114, %110
  call void @_ZN3alg7Array2DIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %109) #9
  call void @_ZdlPvm(ptr noundef %109, i64 noundef 16) #10
  %123 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @_ZN3alg5StackIiED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #9
  ret i32 0

124:                                              ; preds = %121, %119
  %.pn = phi { ptr, i32 } [ %122, %121 ], [ %120, %119 ]
  call void @_ZN3alg5StackIiED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #9
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) 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: mustprogress uwtable
declare hidden noundef ptr @_ZN3algL10lcs_lengthIiEEPNS_7Array2DIjEEPKT_jS6_j(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3alg5StackIiEC2Ej(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN3algL13lcs_backtrackIiEEvRNS_5StackIiEERNS_7Array2DIjEEPKT_S9_jj(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3alg5StackIiE8is_emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3alg5StackIiE3topEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3alg5StackIiE3popEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3alg7Array2DIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3alg5StackIiED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #7 align 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { 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 = { 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 #6 = { 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 #7 = { 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 #8 = { nobuiltin 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 #9 = { nounwind }
attributes #10 = { builtin 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass