; LLVM IR from ADJA/algos :: Strings (ZFunction)

; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@n = external dso_local global i32, align 4
@z = external dso_local global [1000100 x i32], align 16
@l = external dso_local global i32, align 4
@r = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %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
  store i32 0, ptr %1, align 4
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %7 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #6
  %8 = trunc i64 %7 to i32
  store i32 %8, ptr @n, align 4, !tbaa !5
  store i32 0, ptr @r, align 4, !tbaa !5
  store i32 0, ptr @l, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %76, %0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = icmp sle i32 %10, %11
  br i1 %12, label %14, label %13

13:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %79

14:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = load i32, ptr @r, align 4, !tbaa !5
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %18, label %31

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %19 = load i32, ptr @r, align 4, !tbaa !5
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sub nsw i32 %19, %20
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %4, align 4, !tbaa !5
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = load i32, ptr @l, align 4, !tbaa !5
  %25 = sub nsw i32 %23, %24
  %26 = add nsw i32 %25, 1
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [1000100 x i32], ptr @z, i64 0, i64 %27
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %30 = load i32, ptr %29, align 4, !tbaa !5
  store i32 %30, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %31

31:                                               ; preds = %18, %14
  br label %32

32:                                               ; preds = %55, %31
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = add nsw i32 %33, %34
  %36 = load i32, ptr @n, align 4, !tbaa !5
  %37 = icmp sle i32 %35, %36
  br i1 %37, label %38, label %53

38:                                               ; preds = %32
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = add nsw i32 %39, %40
  %42 = sub nsw i32 %41, 1
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %43)
  %45 = load i8, ptr %44, align 1, !tbaa !9
  %46 = sext i8 %45 to i32
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %48)
  %50 = load i8, ptr %49, align 1, !tbaa !9
  %51 = sext i8 %50 to i32
  %52 = icmp eq i32 %46, %51
  br label %53

53:                                               ; preds = %38, %32
  %54 = phi i1 [ false, %32 ], [ %52, %38 ]
  br i1 %54, label %55, label %58

55:                                               ; preds = %53
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %3, align 4, !tbaa !5
  br label %32, !llvm.loop !10

58:                                               ; preds = %53
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = add nsw i32 %59, %60
  %62 = sub nsw i32 %61, 1
  %63 = load i32, ptr @r, align 4, !tbaa !5
  %64 = icmp sgt i32 %62, %63
  br i1 %64, label %65, label %71

65:                                               ; preds = %58
  %66 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %66, ptr @l, align 4, !tbaa !5
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = load i32, ptr %3, align 4, !tbaa !5
  %69 = add nsw i32 %67, %68
  %70 = sub nsw i32 %69, 1
  store i32 %70, ptr @r, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %65, %58
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = load i32, ptr %2, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [1000100 x i32], ptr @z, i64 0, i64 %74
  store i32 %72, ptr %75, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %76

76:                                               ; preds = %71
  %77 = load i32, ptr %2, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %2, align 4, !tbaa !5
  br label %9, !llvm.loop !12

79:                                               ; preds = %13
  %80 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %80, ptr getelementptr inbounds ([1000100 x i32], ptr @z, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %81

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

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

86:                                               ; preds = %81
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [1000100 x i32], ptr @z, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %90)
  br label %92

92:                                               ; preds = %86
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %5, align 4, !tbaa !5
  br label %81, !llvm.loop !13

95:                                               ; preds = %85
  ret i32 0
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

; 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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

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

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 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 }

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@n = external dso_local local_unnamed_addr global i32, align 4
@z = external dso_local global [1000100 x i32], align 16
@l = external dso_local local_unnamed_addr global i32, align 4
@r = external dso_local local_unnamed_addr global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %3 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #6
  %4 = trunc i64 %3 to i32
  store i32 %4, ptr @n, align 4, !tbaa !5
  store i32 0, ptr @r, align 4, !tbaa !5
  store i32 0, ptr @l, align 4, !tbaa !5
  %.not36 = icmp slt i32 %4, 2
  br i1 %.not36, label %._crit_edge, label %.lr.ph38

._crit_edge:                                      ; preds = %41, %0
  %5 = phi i32 [ %4, %0 ], [ %44, %41 ]
  store i32 %5, ptr getelementptr inbounds (i8, ptr @z, i64 4), align 4, !tbaa !5
  %.not2640 = icmp slt i32 %5, 1
  br i1 %.not2640, label %._crit_edge44, label %.lr.ph43

.lr.ph38:                                         ; preds = %0, %41
  %6 = phi i32 [ %44, %41 ], [ %4, %0 ]
  %7 = phi i32 [ %42, %41 ], [ 0, %0 ]
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %41 ], [ 2, %0 ]
  %8 = sext i32 %7 to i64
  %.not27 = icmp sgt i64 %indvars.iv47, %8
  br i1 %.not27, label %.lr.ph38._crit_edge, label %9

.lr.ph38._crit_edge:                              ; preds = %.lr.ph38
  %.pre55 = trunc nuw nsw i64 %indvars.iv47 to i32
  br label %20

9:                                                ; preds = %.lr.ph38
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %10 = trunc nuw nsw i64 %indvars.iv47 to i32
  %reass.sub = sub i32 %7, %10
  %11 = add i32 %reass.sub, 1
  store i32 %11, ptr %1, align 4, !tbaa !5
  %12 = load i32, ptr @l, align 4, !tbaa !5
  %13 = trunc i64 %indvars.iv47 to i32
  %14 = add i32 %13, 1
  %15 = sub i32 %14, %12
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [1000100 x i32], ptr @z, i64 0, i64 %16
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %19 = load i32, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %.lr.ph38._crit_edge, %9
  %.pre-phi = phi i32 [ %.pre55, %.lr.ph38._crit_edge ], [ %10, %9 ]
  %21 = phi i32 [ %6, %.lr.ph38._crit_edge ], [ %.pre, %9 ]
  %.021 = phi i32 [ 0, %.lr.ph38._crit_edge ], [ %19, %9 ]
  %22 = add nsw i32 %.021, %.pre-phi
  %.not2830 = icmp sgt i32 %22, %21
  br i1 %.not2830, label %.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %20
  %23 = sext i32 %.021 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %32
  %indvars.iv = phi i64 [ %23, %.lr.ph.preheader ], [ %indvars.iv.next, %32 ]
  %24 = phi i32 [ %22, %.lr.ph.preheader ], [ %36, %32 ]
  %25 = add nsw i32 %24, -1
  %26 = sext i32 %25 to i64
  %27 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %26)
  %28 = load i8, ptr %27, align 1, !tbaa !9
  %29 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv)
  %30 = load i8, ptr %29, align 1, !tbaa !9
  %31 = icmp eq i8 %28, %30
  br i1 %31, label %32, label %.critedge.loopexit

32:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %33 = add nsw i64 %indvars.iv.next, %indvars.iv47
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %.not28 = icmp sgt i64 %33, %35
  %36 = trunc nsw i64 %33 to i32
  br i1 %.not28, label %.critedge.loopexit, label %.lr.ph, !llvm.loop !10

.critedge.loopexit:                               ; preds = %32, %.lr.ph
  %.1.lcssa.ph.in = phi i64 [ %indvars.iv, %.lr.ph ], [ %indvars.iv.next, %32 ]
  %.lcssa.ph = phi i32 [ %24, %.lr.ph ], [ %36, %32 ]
  %.1.lcssa.ph = trunc i64 %.1.lcssa.ph.in to i32
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %20
  %.1.lcssa = phi i32 [ %.021, %20 ], [ %.1.lcssa.ph, %.critedge.loopexit ]
  %.lcssa = phi i32 [ %22, %20 ], [ %.lcssa.ph, %.critedge.loopexit ]
  %37 = add nsw i32 %.lcssa, -1
  %38 = load i32, ptr @r, align 4, !tbaa !5
  %39 = icmp sgt i32 %37, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %.critedge
  store i32 %.pre-phi, ptr @l, align 4, !tbaa !5
  store i32 %37, ptr @r, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %40, %.critedge
  %42 = phi i32 [ %37, %40 ], [ %38, %.critedge ]
  %43 = getelementptr inbounds [1000100 x i32], ptr @z, i64 0, i64 %indvars.iv47
  store i32 %.1.lcssa, ptr %43, align 4, !tbaa !5
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %.not.not = icmp slt i64 %indvars.iv47, %45
  br i1 %.not.not, label %.lr.ph38, label %._crit_edge, !llvm.loop !12

._crit_edge44:                                    ; preds = %.lr.ph43, %._crit_edge
  ret i32 0

.lr.ph43:                                         ; preds = %._crit_edge, %.lr.ph43
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %.lr.ph43 ], [ 1, %._crit_edge ]
  %46 = getelementptr inbounds [1000100 x i32], ptr @z, i64 0, i64 %indvars.iv51
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %47)
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %49 = load i32, ptr @n, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %.not26.not = icmp slt i64 %indvars.iv51, %50
  br i1 %.not26.not, label %.lr.ph43, label %._crit_edge44, !llvm.loop !13
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #2 align 2

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

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 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { 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 = !{!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,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass