; LLVM IR from codemistic/Data-Structures-and-Algorithms :: CPP/char array (shortespath)

; 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::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 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = 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 i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  %11 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 1000, ptr %2) #6
  %12 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 0
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7getlineEPcl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef %12, i64 noundef 1000)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %3, align 4, !tbaa !8
  store i32 0, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !8
  br label %14

14:                                               ; preds = %41, %0
  %15 = load i32, ptr %5, align 4, !tbaa !8
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %16
  %18 = load i8, ptr %17, align 1, !tbaa !11
  %19 = sext i8 %18 to i32
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %14
  %23 = load i32, ptr %5, align 4, !tbaa !8
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [1000 x i8], ptr %2, i64 0, i64 %24
  %26 = load i8, ptr %25, align 1, !tbaa !11
  %27 = sext i8 %26 to i32
  switch i32 %27, label %40 [
    i32 78, label %28
    i32 83, label %31
    i32 69, label %34
    i32 87, label %37
  ]

28:                                               ; preds = %22
  %29 = load i32, ptr %4, align 4, !tbaa !8
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %4, align 4, !tbaa !8
  br label %40

31:                                               ; preds = %22
  %32 = load i32, ptr %4, align 4, !tbaa !8
  %33 = add nsw i32 %32, -1
  store i32 %33, ptr %4, align 4, !tbaa !8
  br label %40

34:                                               ; preds = %22
  %35 = load i32, ptr %3, align 4, !tbaa !8
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %3, align 4, !tbaa !8
  br label %40

37:                                               ; preds = %22
  %38 = load i32, ptr %3, align 4, !tbaa !8
  %39 = add nsw i32 %38, -1
  store i32 %39, ptr %3, align 4, !tbaa !8
  br label %40

40:                                               ; preds = %37, %34, %31, %28, %22
  br label %41

41:                                               ; preds = %40
  %42 = load i32, ptr %5, align 4, !tbaa !8
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %5, align 4, !tbaa !8
  br label %14, !llvm.loop !12

44:                                               ; preds = %21
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %46 = load i32, ptr %3, align 4, !tbaa !8
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %45, i32 noundef %46)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef @.str.1)
  %49 = load i32, ptr %4, align 4, !tbaa !8
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %48, i32 noundef %49)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %50, i8 noundef signext 10)
  %52 = load i32, ptr %3, align 4, !tbaa !8
  %53 = icmp sge i32 %52, 0
  br i1 %53, label %54, label %72

54:                                               ; preds = %44
  %55 = load i32, ptr %4, align 4, !tbaa !8
  %56 = icmp sge i32 %55, 0
  br i1 %56, label %57, label %72

57:                                               ; preds = %54
  br label %58

58:                                               ; preds = %62, %57
  %59 = load i32, ptr %3, align 4, !tbaa !8
  %60 = add nsw i32 %59, -1
  store i32 %60, ptr %3, align 4, !tbaa !8
  %61 = icmp ne i32 %59, 0
  br i1 %61, label %62, label %64

62:                                               ; preds = %58
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  br label %58, !llvm.loop !14

64:                                               ; preds = %58
  br label %65

65:                                               ; preds = %69, %64
  %66 = load i32, ptr %4, align 4, !tbaa !8
  %67 = add nsw i32 %66, -1
  store i32 %67, ptr %4, align 4, !tbaa !8
  %68 = icmp ne i32 %66, 0
  br i1 %68, label %69, label %71

69:                                               ; preds = %65
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  br label %65, !llvm.loop !15

71:                                               ; preds = %65
  br label %131

72:                                               ; preds = %54, %44
  %73 = load i32, ptr %3, align 4, !tbaa !8
  %74 = icmp sle i32 %73, 0
  br i1 %74, label %75, label %93

75:                                               ; preds = %72
  %76 = load i32, ptr %4, align 4, !tbaa !8
  %77 = icmp sge i32 %76, 0
  br i1 %77, label %78, label %93

78:                                               ; preds = %75
  br label %79

79:                                               ; preds = %83, %78
  %80 = load i32, ptr %3, align 4, !tbaa !8
  %81 = add nsw i32 %80, -1
  store i32 %81, ptr %3, align 4, !tbaa !8
  %82 = icmp ne i32 %80, 0
  br i1 %82, label %83, label %85

83:                                               ; preds = %79
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  br label %79, !llvm.loop !16

85:                                               ; preds = %79
  br label %86

86:                                               ; preds = %90, %85
  %87 = load i32, ptr %4, align 4, !tbaa !8
  %88 = add nsw i32 %87, -1
  store i32 %88, ptr %4, align 4, !tbaa !8
  %89 = icmp ne i32 %87, 0
  br i1 %89, label %90, label %92

90:                                               ; preds = %86
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  br label %86, !llvm.loop !17

92:                                               ; preds = %86
  br label %130

93:                                               ; preds = %75, %72
  %94 = load i32, ptr %3, align 4, !tbaa !8
  %95 = icmp sle i32 %94, 0
  br i1 %95, label %96, label %114

96:                                               ; preds = %93
  %97 = load i32, ptr %4, align 4, !tbaa !8
  %98 = icmp sle i32 %97, 0
  br i1 %98, label %99, label %114

99:                                               ; preds = %96
  br label %100

100:                                              ; preds = %104, %99
  %101 = load i32, ptr %3, align 4, !tbaa !8
  %102 = add nsw i32 %101, -1
  store i32 %102, ptr %3, align 4, !tbaa !8
  %103 = icmp ne i32 %101, 0
  br i1 %103, label %104, label %106

104:                                              ; preds = %100
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  br label %100, !llvm.loop !18

106:                                              ; preds = %100
  br label %107

107:                                              ; preds = %111, %106
  %108 = load i32, ptr %4, align 4, !tbaa !8
  %109 = add nsw i32 %108, -1
  store i32 %109, ptr %4, align 4, !tbaa !8
  %110 = icmp ne i32 %108, 0
  br i1 %110, label %111, label %113

111:                                              ; preds = %107
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  br label %107, !llvm.loop !19

113:                                              ; preds = %107
  br label %129

114:                                              ; preds = %96, %93
  br label %115

115:                                              ; preds = %119, %114
  %116 = load i32, ptr %3, align 4, !tbaa !8
  %117 = add nsw i32 %116, -1
  store i32 %117, ptr %3, align 4, !tbaa !8
  %118 = icmp ne i32 %116, 0
  br i1 %118, label %119, label %121

119:                                              ; preds = %115
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  br label %115, !llvm.loop !20

121:                                              ; preds = %115
  br label %122

122:                                              ; preds = %126, %121
  %123 = load i32, ptr %4, align 4, !tbaa !8
  %124 = add nsw i32 %123, -1
  store i32 %124, ptr %4, align 4, !tbaa !8
  %125 = icmp ne i32 %123, 0
  br i1 %125, label %126, label %128

126:                                              ; preds = %122
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  br label %122, !llvm.loop !21

128:                                              ; preds = %122
  br label %129

129:                                              ; preds = %128, %113
  br label %130

130:                                              ; preds = %129, %92
  br label %131

131:                                              ; preds = %130, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 1000, ptr %2) #6
  ret i32 0
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7getlineEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 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 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!10, !10, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}
!21 = distinct !{!21, !13}


; 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::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 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [1000 x i8], align 16
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %1) #6
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7getlineEPcl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull %1, i64 noundef 1000)
  br label %9

9:                                                ; preds = %28, %0
  %indvars.iv = phi i64 [ %indvars.iv.next, %28 ], [ 0, %0 ]
  %.029 = phi i32 [ %.130, %28 ], [ 0, %0 ]
  %.028 = phi i32 [ %.1, %28 ], [ 0, %0 ]
  %10 = getelementptr inbounds [1000 x i8], ptr %1, i64 0, i64 %indvars.iv
  %11 = load i8, ptr %10, align 1, !tbaa !8
  switch i8 %11, label %28 [
    i8 0, label %12
    i8 78, label %20
    i8 83, label %22
    i8 69, label %24
    i8 87, label %26
  ]

12:                                               ; preds = %9
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef %.029)
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull @.str.1)
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef %.028)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %16, i8 noundef signext 10)
  %18 = icmp sgt i32 %.029, -1
  %19 = icmp sgt i32 %.028, -1
  %or.cond = select i1 %18, i1 %19, i1 false
  br i1 %or.cond, label %.preheader44, label %33

.preheader44:                                     ; preds = %12
  %.not4271 = icmp eq i32 %.029, 0
  br i1 %.not4271, label %.preheader, label %.lr.ph73

20:                                               ; preds = %9
  %21 = add nsw i32 %.028, 1
  br label %28

22:                                               ; preds = %9
  %23 = add nsw i32 %.028, -1
  br label %28

24:                                               ; preds = %9
  %25 = add nsw i32 %.029, 1
  br label %28

26:                                               ; preds = %9
  %27 = add nsw i32 %.029, -1
  br label %28

28:                                               ; preds = %9, %20, %22, %24, %26
  %.130 = phi i32 [ %27, %26 ], [ %25, %24 ], [ %.029, %22 ], [ %.029, %20 ], [ %.029, %9 ]
  %.1 = phi i32 [ %.028, %26 ], [ %.028, %24 ], [ %23, %22 ], [ %21, %20 ], [ %.028, %9 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br label %9, !llvm.loop !10

.preheader:                                       ; preds = %.lr.ph73, %.preheader44
  %.not4374 = icmp eq i32 %.028, 0
  br i1 %.not4374, label %.loopexit, label %.lr.ph76

.lr.ph73:                                         ; preds = %.preheader44, %.lr.ph73
  %.23172 = phi i32 [ %29, %.lr.ph73 ], [ %.029, %.preheader44 ]
  %29 = add nsw i32 %.23172, -1
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %.not42 = icmp eq i32 %29, 0
  br i1 %.not42, label %.preheader, label %.lr.ph73, !llvm.loop !12

.lr.ph76:                                         ; preds = %.preheader, %.lr.ph76
  %.275 = phi i32 [ %31, %.lr.ph76 ], [ %.028, %.preheader ]
  %31 = add nsw i32 %.275, -1
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  %.not43 = icmp eq i32 %31, 0
  br i1 %.not43, label %.loopexit, label %.lr.ph76, !llvm.loop !13

33:                                               ; preds = %12
  %34 = icmp slt i32 %.029, 1
  %or.cond3 = select i1 %34, i1 %19, i1 false
  br i1 %or.cond3, label %.preheader47, label %39

.preheader47:                                     ; preds = %33
  %.not4065 = icmp eq i32 %.029, 0
  br i1 %.not4065, label %.preheader45, label %.lr.ph67

.preheader45:                                     ; preds = %.lr.ph67, %.preheader47
  %.not4168 = icmp eq i32 %.028, 0
  br i1 %.not4168, label %.loopexit, label %.lr.ph70

.lr.ph67:                                         ; preds = %.preheader47, %.lr.ph67
  %.33266 = phi i32 [ %35, %.lr.ph67 ], [ %.029, %.preheader47 ]
  %35 = add nsw i32 %.33266, -1
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
  %.not40 = icmp eq i32 %35, 0
  br i1 %.not40, label %.preheader45, label %.lr.ph67, !llvm.loop !14

.lr.ph70:                                         ; preds = %.preheader45, %.lr.ph70
  %.369 = phi i32 [ %37, %.lr.ph70 ], [ %.028, %.preheader45 ]
  %37 = add nsw i32 %.369, -1
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  %.not41 = icmp eq i32 %37, 0
  br i1 %.not41, label %.loopexit, label %.lr.ph70, !llvm.loop !15

39:                                               ; preds = %33
  %40 = icmp slt i32 %.028, 1
  %or.cond5 = select i1 %34, i1 %40, i1 false
  %.not3859 = icmp eq i32 %.029, 0
  br i1 %or.cond5, label %.preheader50, label %.preheader53

.preheader53:                                     ; preds = %39
  br i1 %.not3859, label %.preheader51, label %.lr.ph

.preheader50:                                     ; preds = %39
  br i1 %.not3859, label %.preheader48, label %.lr.ph61

.preheader48:                                     ; preds = %.lr.ph61, %.preheader50
  %.not3962 = icmp eq i32 %.028, 0
  br i1 %.not3962, label %.loopexit, label %.lr.ph64

.lr.ph61:                                         ; preds = %.preheader50, %.lr.ph61
  %.43360 = phi i32 [ %41, %.lr.ph61 ], [ %.029, %.preheader50 ]
  %41 = add nsw i32 %.43360, -1
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
  %.not38 = icmp eq i32 %41, 0
  br i1 %.not38, label %.preheader48, label %.lr.ph61, !llvm.loop !16

.lr.ph64:                                         ; preds = %.preheader48, %.lr.ph64
  %.463 = phi i32 [ %43, %.lr.ph64 ], [ %.028, %.preheader48 ]
  %43 = add nsw i32 %.463, -1
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
  %.not39 = icmp eq i32 %43, 0
  br i1 %.not39, label %.loopexit, label %.lr.ph64, !llvm.loop !17

.preheader51:                                     ; preds = %.lr.ph, %.preheader53
  %.not3756 = icmp eq i32 %.028, 0
  br i1 %.not3756, label %.loopexit, label %.lr.ph58

.lr.ph:                                           ; preds = %.preheader53, %.lr.ph
  %.53455 = phi i32 [ %45, %.lr.ph ], [ %.029, %.preheader53 ]
  %45 = add nsw i32 %.53455, -1
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %.not36 = icmp eq i32 %45, 0
  br i1 %.not36, label %.preheader51, label %.lr.ph, !llvm.loop !18

.lr.ph58:                                         ; preds = %.preheader51, %.lr.ph58
  %.557 = phi i32 [ %47, %.lr.ph58 ], [ %.028, %.preheader51 ]
  %47 = add nsw i32 %.557, -1
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
  %.not37 = icmp eq i32 %47, 0
  br i1 %.not37, label %.loopexit, label %.lr.ph58, !llvm.loop !19

.loopexit:                                        ; preds = %.lr.ph58, %.lr.ph64, %.lr.ph70, %.lr.ph76, %.preheader51, %.preheader48, %.preheader45, %.preheader
  call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %1) #6
  ret i32 0
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi7getlineEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}


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