; LLVM IR from UtkarshPathrabe/Competitive-Coding :: Model Algorithms/Graphs (Transitive Closure of a Graph)

; 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_ostream" = type { ptr, %"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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [63 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17transitiveClosureRSt6vectorIS_IiSaIiEESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %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 ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %17 = trunc i64 %16 to i32
  store i32 %17, ptr %3, align 4, !tbaa !9
  %18 = load i32, ptr %3, align 4, !tbaa !9
  %19 = zext i32 %18 to i64
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = zext i32 %20 to i64
  %22 = call ptr @llvm.stacksave.p0()
  store ptr %22, ptr %4, align 8
  %23 = mul nuw i64 %19, %21
  %24 = alloca i8, i64 %23, align 16
  store i64 %19, ptr %5, align 8
  store i64 %21, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %67, %1
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

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

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

31:                                               ; preds = %63, %30
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %66

36:                                               ; preds = %31
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %39) #5
  %41 = load i32, ptr %9, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %42) #5
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = icmp eq i32 %44, 2147483647
  br i1 %45, label %46, label %54

46:                                               ; preds = %36
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = mul nsw i64 %48, %21
  %50 = getelementptr inbounds i8, ptr %24, i64 %49
  %51 = load i32, ptr %9, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %50, i64 %52
  store i8 0, ptr %53, align 1, !tbaa !11
  br label %62

54:                                               ; preds = %36
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = mul nsw i64 %56, %21
  %58 = getelementptr inbounds i8, ptr %24, i64 %57
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i8, ptr %58, i64 %60
  store i8 1, ptr %61, align 1, !tbaa !11
  br label %62

62:                                               ; preds = %54, %46
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %9, align 4, !tbaa !9
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %9, align 4, !tbaa !9
  br label %31, !llvm.loop !13

66:                                               ; preds = %35
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %7, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %7, align 4, !tbaa !9
  br label %25, !llvm.loop !15

70:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %138, %70
  %72 = load i32, ptr %10, align 4, !tbaa !9
  %73 = load i32, ptr %3, align 4, !tbaa !9
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %141

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %134, %76
  %78 = load i32, ptr %11, align 4, !tbaa !9
  %79 = load i32, ptr %3, align 4, !tbaa !9
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

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

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %130, %82
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = load i32, ptr %3, align 4, !tbaa !9
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %133

88:                                               ; preds = %83
  %89 = load i32, ptr %11, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = mul nsw i64 %90, %21
  %92 = getelementptr inbounds i8, ptr %24, i64 %91
  %93 = load i32, ptr %12, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i8, ptr %92, i64 %94
  %96 = load i8, ptr %95, align 1, !tbaa !11, !range !16, !noundef !17
  %97 = trunc i8 %96 to i1
  br i1 %97, label %120, label %98

98:                                               ; preds = %88
  %99 = load i32, ptr %11, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = mul nsw i64 %100, %21
  %102 = getelementptr inbounds i8, ptr %24, i64 %101
  %103 = load i32, ptr %10, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i8, ptr %102, i64 %104
  %106 = load i8, ptr %105, align 1, !tbaa !11, !range !16, !noundef !17
  %107 = trunc i8 %106 to i1
  br i1 %107, label %108, label %118

108:                                              ; preds = %98
  %109 = load i32, ptr %10, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = mul nsw i64 %110, %21
  %112 = getelementptr inbounds i8, ptr %24, i64 %111
  %113 = load i32, ptr %12, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i8, ptr %112, i64 %114
  %116 = load i8, ptr %115, align 1, !tbaa !11, !range !16, !noundef !17
  %117 = trunc i8 %116 to i1
  br label %118

118:                                              ; preds = %108, %98
  %119 = phi i1 [ false, %98 ], [ %117, %108 ]
  br label %120

120:                                              ; preds = %118, %88
  %121 = phi i1 [ true, %88 ], [ %119, %118 ]
  %122 = load i32, ptr %11, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = mul nsw i64 %123, %21
  %125 = getelementptr inbounds i8, ptr %24, i64 %124
  %126 = load i32, ptr %12, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds i8, ptr %125, i64 %127
  %129 = zext i1 %121 to i8
  store i8 %129, ptr %128, align 1, !tbaa !11
  br label %130

130:                                              ; preds = %120
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %12, align 4, !tbaa !9
  br label %83, !llvm.loop !18

133:                                              ; preds = %87
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %11, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %11, align 4, !tbaa !9
  br label %77, !llvm.loop !19

137:                                              ; preds = %81
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %10, align 4, !tbaa !9
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %10, align 4, !tbaa !9
  br label %71, !llvm.loop !20

141:                                              ; preds = %75
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %172, %141
  %145 = load i32, ptr %13, align 4, !tbaa !9
  %146 = load i32, ptr %3, align 4, !tbaa !9
  %147 = icmp slt i32 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %175

149:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %150

150:                                              ; preds = %167, %149
  %151 = load i32, ptr %14, align 4, !tbaa !9
  %152 = load i32, ptr %3, align 4, !tbaa !9
  %153 = icmp slt i32 %151, %152
  br i1 %153, label %155, label %154

154:                                              ; preds = %150
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %170

155:                                              ; preds = %150
  %156 = load i32, ptr %13, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = mul nsw i64 %157, %21
  %159 = getelementptr inbounds i8, ptr %24, i64 %158
  %160 = load i32, ptr %14, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds i8, ptr %159, i64 %161
  %163 = load i8, ptr %162, align 1, !tbaa !11, !range !16, !noundef !17
  %164 = trunc i8 %163 to i1
  %165 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %164)
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %165, ptr noundef @.str.1)
  br label %167

167:                                              ; preds = %155
  %168 = load i32, ptr %14, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %14, align 4, !tbaa !9
  br label %150, !llvm.loop !21

170:                                              ; preds = %154
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %172

172:                                              ; preds = %170
  %173 = load i32, ptr %13, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %13, align 4, !tbaa !9
  br label %144, !llvm.loop !22

175:                                              ; preds = %148
  %176 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %176)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret void
}

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) #0 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }
attributes #4 = { 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 #5 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


; 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_ostream" = type { ptr, %"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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [63 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17transitiveClosureRSt6vectorIS_IiSaIiEESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %0) local_unnamed_addr #0 {
  %2 = tail call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  %3 = trunc i64 %2 to i32
  %4 = and i64 %2, 4294967295
  %5 = mul nuw i64 %4, %4
  %6 = alloca i8, i64 %5, align 16
  %7 = icmp sgt i32 %3, 0
  br i1 %7, label %.preheader51.us.preheader, label %._crit_edge62.critedge

.preheader51.us.preheader:                        ; preds = %1
  %wide.trip.count67 = and i64 %2, 2147483647
  br label %.preheader51.us

.preheader51.us:                                  ; preds = %.preheader51.us.preheader, %._crit_edge.us
  %indvars.iv64 = phi i64 [ 0, %.preheader51.us.preheader ], [ %indvars.iv.next65, %._crit_edge.us ]
  %8 = mul nuw nsw i64 %4, %indvars.iv64
  %9 = getelementptr inbounds i8, ptr %6, i64 %8
  br label %10

10:                                               ; preds = %.preheader51.us, %10
  %indvars.iv = phi i64 [ 0, %.preheader51.us ], [ %indvars.iv.next, %10 ]
  %11 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv64) #3
  %12 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %indvars.iv) #3
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = icmp ne i32 %13, 2147483647
  %15 = getelementptr inbounds i8, ptr %9, i64 %indvars.iv
  %. = zext i1 %14 to i8
  store i8 %., ptr %15, align 1, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count67
  br i1 %exitcond.not, label %._crit_edge.us, label %10, !llvm.loop !11

._crit_edge.us:                                   ; preds = %10
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %exitcond68.not = icmp eq i64 %indvars.iv.next65, %wide.trip.count67
  br i1 %exitcond68.not, label %.preheader50, label %.preheader51.us, !llvm.loop !13

.preheader50:                                     ; preds = %._crit_edge.us
  br i1 %7, label %.preheader49.us.preheader, label %._crit_edge62.critedge

.preheader49.us.preheader:                        ; preds = %.preheader50
  %wide.trip.count82 = and i64 %2, 2147483647
  %xtraiter = and i64 %2, 1
  %16 = icmp eq i64 %wide.trip.count67, 1
  %unroll_iter = sub nsw i64 %wide.trip.count67, %xtraiter
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader49.us

.preheader49.us:                                  ; preds = %.preheader49.us.preheader, %._crit_edge56.split.us.us
  %indvars.iv79 = phi i64 [ 0, %.preheader49.us.preheader ], [ %indvars.iv.next80, %._crit_edge56.split.us.us ]
  %17 = mul nuw nsw i64 %4, %indvars.iv79
  %18 = getelementptr inbounds i8, ptr %6, i64 %17
  br label %.preheader48.us.us

.preheader48.us.us:                               ; preds = %._crit_edge.us57.us, %.preheader49.us
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %._crit_edge.us57.us ], [ 0, %.preheader49.us ]
  %19 = mul nuw nsw i64 %4, %indvars.iv74
  %20 = getelementptr inbounds i8, ptr %6, i64 %19
  %21 = getelementptr inbounds i8, ptr %20, i64 %indvars.iv79
  br i1 %16, label %._crit_edge.us57.us.unr-lcssa, label %.preheader48.us.us.new

.preheader48.us.us.new:                           ; preds = %.preheader48.us.us, %42
  %indvars.iv69 = phi i64 [ %indvars.iv.next70.1, %42 ], [ 0, %.preheader48.us.us ]
  %niter = phi i64 [ %niter.next.1, %42 ], [ 0, %.preheader48.us.us ]
  %22 = getelementptr inbounds i8, ptr %20, i64 %indvars.iv69
  %23 = load i8, ptr %22, align 1, !tbaa !9, !range !14, !noundef !15
  %24 = trunc nuw i8 %23 to i1
  br i1 %24, label %31, label %25

25:                                               ; preds = %.preheader48.us.us.new
  %26 = load i8, ptr %21, align 1, !tbaa !9, !range !14, !noundef !15
  %27 = trunc nuw i8 %26 to i1
  br i1 %27, label %28, label %31

28:                                               ; preds = %25
  %29 = getelementptr inbounds i8, ptr %18, i64 %indvars.iv69
  %30 = load i8, ptr %29, align 1, !tbaa !9, !range !14, !noundef !15
  br label %31

31:                                               ; preds = %28, %25, %.preheader48.us.us.new
  %32 = phi i8 [ 1, %.preheader48.us.us.new ], [ 0, %25 ], [ %30, %28 ]
  store i8 %32, ptr %22, align 1, !tbaa !9
  %indvars.iv.next70 = or disjoint i64 %indvars.iv69, 1
  %33 = getelementptr inbounds i8, ptr %20, i64 %indvars.iv.next70
  %34 = load i8, ptr %33, align 1, !tbaa !9, !range !14, !noundef !15
  %35 = trunc nuw i8 %34 to i1
  br i1 %35, label %42, label %36

36:                                               ; preds = %31
  %37 = load i8, ptr %21, align 1, !tbaa !9, !range !14, !noundef !15
  %38 = trunc nuw i8 %37 to i1
  br i1 %38, label %39, label %42

39:                                               ; preds = %36
  %40 = getelementptr inbounds i8, ptr %18, i64 %indvars.iv.next70
  %41 = load i8, ptr %40, align 1, !tbaa !9, !range !14, !noundef !15
  br label %42

42:                                               ; preds = %39, %36, %31
  %43 = phi i8 [ 1, %31 ], [ 0, %36 ], [ %41, %39 ]
  store i8 %43, ptr %33, align 1, !tbaa !9
  %indvars.iv.next70.1 = add nuw nsw i64 %indvars.iv69, 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.us57.us.unr-lcssa, label %.preheader48.us.us.new, !llvm.loop !16

._crit_edge.us57.us.unr-lcssa:                    ; preds = %42, %.preheader48.us.us
  %indvars.iv69.unr = phi i64 [ 0, %.preheader48.us.us ], [ %indvars.iv.next70.1, %42 ]
  br i1 %lcmp.mod.not, label %._crit_edge.us57.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us57.us.unr-lcssa
  %44 = getelementptr inbounds i8, ptr %20, i64 %indvars.iv69.unr
  %45 = load i8, ptr %44, align 1, !tbaa !9, !range !14, !noundef !15
  %46 = trunc nuw i8 %45 to i1
  br i1 %46, label %._crit_edge.us57.us.epilog-lcssa, label %47

47:                                               ; preds = %.epil.preheader
  %48 = load i8, ptr %21, align 1, !tbaa !9, !range !14, !noundef !15
  %49 = trunc nuw i8 %48 to i1
  br i1 %49, label %50, label %._crit_edge.us57.us.epilog-lcssa

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %18, i64 %indvars.iv69.unr
  %52 = load i8, ptr %51, align 1, !tbaa !9, !range !14, !noundef !15
  br label %._crit_edge.us57.us.epilog-lcssa

._crit_edge.us57.us.epilog-lcssa:                 ; preds = %50, %47, %.epil.preheader
  %53 = phi i8 [ 1, %.epil.preheader ], [ 0, %47 ], [ %52, %50 ]
  store i8 %53, ptr %44, align 1, !tbaa !9
  br label %._crit_edge.us57.us

._crit_edge.us57.us:                              ; preds = %._crit_edge.us57.us.unr-lcssa, %._crit_edge.us57.us.epilog-lcssa
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond78.not = icmp eq i64 %indvars.iv.next75, %wide.trip.count82
  br i1 %exitcond78.not, label %._crit_edge56.split.us.us, label %.preheader48.us.us, !llvm.loop !17

._crit_edge56.split.us.us:                        ; preds = %._crit_edge.us57.us
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next80, %wide.trip.count82
  br i1 %exitcond83.not, label %._crit_edge, label %.preheader49.us, !llvm.loop !18

._crit_edge:                                      ; preds = %._crit_edge56.split.us.us
  %54 = tail 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)
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br i1 %7, label %.preheader.us.preheader, label %._crit_edge62

.preheader.us.preheader:                          ; preds = %._crit_edge
  %wide.trip.count92 = and i64 %2, 2147483647
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge60.us
  %indvars.iv89 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next90, %._crit_edge60.us ]
  %56 = mul nuw nsw i64 %4, %indvars.iv89
  %57 = getelementptr inbounds i8, ptr %6, i64 %56
  br label %58

58:                                               ; preds = %.preheader.us, %58
  %indvars.iv84 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next85, %58 ]
  %59 = getelementptr inbounds i8, ptr %57, i64 %indvars.iv84
  %60 = load i8, ptr %59, align 1, !tbaa !9, !range !14, !noundef !15
  %61 = trunc nuw i8 %60 to i1
  %62 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %61)
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull @.str.1)
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %exitcond88.not = icmp eq i64 %indvars.iv.next85, %wide.trip.count92
  br i1 %exitcond88.not, label %._crit_edge60.us, label %58, !llvm.loop !19

._crit_edge60.us:                                 ; preds = %58
  %64 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count92
  br i1 %exitcond93.not, label %._crit_edge62, label %.preheader.us, !llvm.loop !20

._crit_edge62.critedge:                           ; preds = %.preheader50, %1
  %65 = tail 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)
  %66 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %._crit_edge62

._crit_edge62:                                    ; preds = %._crit_edge60.us, %._crit_edge62.critedge, %._crit_edge
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; 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 #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) local_unnamed_addr #0 align 2

attributes #0 = { 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 #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 = { 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 #3 = { 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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


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