; LLVM IR from ritikbanger/Hacktoberfest2022-DSA :: 17. Graph/FloydWarshal.ll (Z13floydWarshallRSt6vectorIS_IiSaIiEESaIS1_EE)

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

@v = external dso_local global i32, align 4
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13floydWarshallRSt6vectorIS_IiSaIiEESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %12 = load i32, ptr @v, align 4, !tbaa !9
  %13 = zext i32 %12 to i64
  %14 = load i32, ptr @v, align 4, !tbaa !9
  %15 = zext i32 %14 to i64
  %16 = call ptr @llvm.stacksave.p0()
  store ptr %16, ptr %3, align 8
  %17 = mul nuw i64 %13, %15
  %18 = alloca i32, i64 %17, align 16
  store i64 %13, ptr %4, align 8
  store i64 %15, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %48, %1
  %20 = load i32, ptr %6, align 4, !tbaa !9
  %21 = load i32, ptr @v, align 4, !tbaa !9
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %23, label %51

23:                                               ; preds = %19
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %44, %23
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = load i32, ptr @v, align 4, !tbaa !9
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %28, label %47

28:                                               ; preds = %24
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %31) #6
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %34) #6
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = mul nsw i64 %38, %15
  %40 = getelementptr inbounds i32, ptr %18, i64 %39
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds i32, ptr %40, i64 %42
  store i32 %36, ptr %43, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %28
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %7, align 4, !tbaa !9
  br label %24, !llvm.loop !11

47:                                               ; preds = %24
  br label %48

48:                                               ; preds = %47
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %6, align 4, !tbaa !9
  br label %19, !llvm.loop !13

51:                                               ; preds = %19
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %147, %51
  %53 = load i32, ptr %8, align 4, !tbaa !9
  %54 = load i32, ptr @v, align 4, !tbaa !9
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %56, label %150

56:                                               ; preds = %52
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %57

57:                                               ; preds = %143, %56
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = load i32, ptr @v, align 4, !tbaa !9
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %61, label %146

61:                                               ; preds = %57
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %139, %61
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = load i32, ptr @v, align 4, !tbaa !9
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %66, label %142

66:                                               ; preds = %62
  %67 = load i32, ptr %6, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = mul nsw i64 %68, %15
  %70 = getelementptr inbounds i32, ptr %18, i64 %69
  %71 = load i32, ptr %7, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %70, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !9
  %75 = load i32, ptr %6, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = mul nsw i64 %76, %15
  %78 = getelementptr inbounds i32, ptr %18, i64 %77
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i32, ptr %78, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = load i32, ptr %8, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = mul nsw i64 %84, %15
  %86 = getelementptr inbounds i32, ptr %18, i64 %85
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %86, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !9
  %91 = add nsw i32 %82, %90
  %92 = icmp sgt i32 %74, %91
  br i1 %92, label %93, label %138

93:                                               ; preds = %66
  %94 = load i32, ptr %8, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = mul nsw i64 %95, %15
  %97 = getelementptr inbounds i32, ptr %18, i64 %96
  %98 = load i32, ptr %7, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i32, ptr %97, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !9
  %102 = icmp ne i32 %101, 100000
  br i1 %102, label %103, label %138

103:                                              ; preds = %93
  %104 = load i32, ptr %6, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = mul nsw i64 %105, %15
  %107 = getelementptr inbounds i32, ptr %18, i64 %106
  %108 = load i32, ptr %8, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds i32, ptr %107, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 100000
  br i1 %112, label %113, label %138

113:                                              ; preds = %103
  %114 = load i32, ptr %6, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = mul nsw i64 %115, %15
  %117 = getelementptr inbounds i32, ptr %18, i64 %116
  %118 = load i32, ptr %8, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %117, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = load i32, ptr %8, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = mul nsw i64 %123, %15
  %125 = getelementptr inbounds i32, ptr %18, i64 %124
  %126 = load i32, ptr %7, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds i32, ptr %125, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !9
  %130 = add nsw i32 %121, %129
  %131 = load i32, ptr %6, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = mul nsw i64 %132, %15
  %134 = getelementptr inbounds i32, ptr %18, i64 %133
  %135 = load i32, ptr %7, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds i32, ptr %134, i64 %136
  store i32 %130, ptr %137, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %113, %103, %93, %66
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %7, align 4, !tbaa !9
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %7, align 4, !tbaa !9
  br label %62, !llvm.loop !14

142:                                              ; preds = %62
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %6, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %6, align 4, !tbaa !9
  br label %57, !llvm.loop !15

146:                                              ; preds = %57
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %8, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %8, align 4, !tbaa !9
  br label %52, !llvm.loop !16

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

151:                                              ; preds = %191, %150
  %152 = load i32, ptr %9, align 4, !tbaa !9
  %153 = load i32, ptr @v, align 4, !tbaa !9
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %194

156:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %157

157:                                              ; preds = %186, %156
  %158 = load i32, ptr %11, align 4, !tbaa !9
  %159 = load i32, ptr @v, align 4, !tbaa !9
  %160 = icmp slt i32 %158, %159
  br i1 %160, label %162, label %161

161:                                              ; preds = %157
  store i32 20, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %189

162:                                              ; preds = %157
  %163 = load i32, ptr %9, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = mul nsw i64 %164, %15
  %166 = getelementptr inbounds i32, ptr %18, i64 %165
  %167 = load i32, ptr %11, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds i32, ptr %166, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !9
  %171 = icmp eq i32 %170, 100000
  br i1 %171, label %172, label %174

172:                                              ; preds = %162
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %185

174:                                              ; preds = %162
  %175 = load i32, ptr %9, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = mul nsw i64 %176, %15
  %178 = getelementptr inbounds i32, ptr %18, i64 %177
  %179 = load i32, ptr %11, align 4, !tbaa !9
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds i32, ptr %178, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !9
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %182)
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %183, ptr noundef @.str.1)
  br label %185

185:                                              ; preds = %174, %172
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %11, align 4, !tbaa !9
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %11, align 4, !tbaa !9
  br label %157, !llvm.loop !17

189:                                              ; preds = %161
  %190 = 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 %191

191:                                              ; preds = %189
  %192 = load i32, ptr %9, align 4, !tbaa !9
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %9, align 4, !tbaa !9
  br label %151, !llvm.loop !18

194:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %195 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %195)
  ret void
}

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5

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

; 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: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #1

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 }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { "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 = !{!"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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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

@v = external dso_local local_unnamed_addr global i32, align 4
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13floydWarshallRSt6vectorIS_IiSaIiEESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %0) local_unnamed_addr #0 {
  %2 = load i32, ptr @v, align 4, !tbaa !5
  %3 = zext i32 %2 to i64
  %4 = mul nuw i64 %3, %3
  %5 = alloca i32, i64 %4, align 16
  %6 = icmp sgt i32 %2, 0
  br i1 %6, label %.preheader52, label %._crit_edge65

.preheader52:                                     ; preds = %1, %._crit_edge
  %7 = phi i32 [ %90, %._crit_edge ], [ %2, %1 ]
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %._crit_edge ], [ 0, %1 ]
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %.preheader52.._crit_edge_crit_edge

.preheader52.._crit_edge_crit_edge:               ; preds = %.preheader52
  %.pre = sext i32 %7 to i64
  br label %._crit_edge

.lr.ph:                                           ; preds = %.preheader52
  %9 = mul nuw nsw i64 %indvars.iv69, %3
  %10 = getelementptr inbounds i32, ptr %5, i64 %9
  br label %82

.preheader51:                                     ; preds = %._crit_edge
  %11 = icmp sgt i32 %90, 0
  br i1 %11, label %.preheader50.us.preheader, label %._crit_edge65

.preheader50.us.preheader:                        ; preds = %.preheader51
  %wide.trip.count83 = zext nneg i32 %90 to i64
  %12 = shl nuw nsw i64 %3, 2
  %13 = add nsw i64 %wide.trip.count83, -1
  %14 = mul i64 %12, %13
  %15 = shl nuw nsw i64 %wide.trip.count83, 2
  %16 = getelementptr i8, ptr %5, i64 %14
  %scevgep = getelementptr i8, ptr %16, i64 %15
  %17 = shl nuw nsw i64 %3, 2
  %18 = getelementptr i8, ptr %5, i64 %14
  %19 = getelementptr i8, ptr %18, i64 4
  %20 = getelementptr i8, ptr %5, i64 %15
  %min.iters.check = icmp ult i32 %90, 8
  %n.vec = and i64 %wide.trip.count83, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count83
  br label %.preheader50.us

.preheader50.us:                                  ; preds = %.preheader50.us.preheader, %._crit_edge59.split.us.us
  %indvars.iv80 = phi i64 [ 0, %.preheader50.us.preheader ], [ %indvars.iv.next81, %._crit_edge59.split.us.us ]
  %21 = shl nuw nsw i64 %indvars.iv80, 2
  %scevgep98 = getelementptr i8, ptr %5, i64 %21
  %scevgep99 = getelementptr i8, ptr %19, i64 %21
  %22 = mul i64 %17, %indvars.iv80
  %scevgep100 = getelementptr i8, ptr %5, i64 %22
  %scevgep101 = getelementptr i8, ptr %20, i64 %22
  %23 = mul nuw nsw i64 %indvars.iv80, %3
  %24 = getelementptr inbounds i32, ptr %5, i64 %23
  %bound0 = icmp ult ptr %5, %scevgep99
  %bound1 = icmp ult ptr %scevgep98, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %bound0102 = icmp ult ptr %5, %scevgep101
  %bound1103 = icmp ult ptr %scevgep100, %scevgep
  %found.conflict104 = and i1 %bound0102, %bound1103
  %conflict.rdx = or i1 %found.conflict, %found.conflict104
  br label %.preheader49.us.us

.preheader49.us.us:                               ; preds = %._crit_edge57.us.us, %.preheader50.us
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %._crit_edge57.us.us ], [ 0, %.preheader50.us ]
  %25 = mul nuw nsw i64 %indvars.iv75, %3
  %26 = getelementptr inbounds i32, ptr %5, i64 %25
  %27 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv80
  %brmerge = select i1 %min.iters.check, i1 true, i1 %conflict.rdx
  br i1 %brmerge, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.preheader49.us.us
  %28 = load i32, ptr %27, align 4, !tbaa !5, !alias.scope !9
  %broadcast.splatinsert108 = insertelement <4 x i32> poison, i32 %28, i64 0
  %broadcast.splat109 = shufflevector <4 x i32> %broadcast.splatinsert108, <4 x i32> poison, <4 x i32> zeroinitializer
  %29 = icmp ne <4 x i32> %broadcast.splat109, <i32 100000, i32 100000, i32 100000, i32 100000>
  %30 = icmp ne <4 x i32> %broadcast.splat109, <i32 100000, i32 100000, i32 100000, i32 100000>
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue123, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue123 ]
  %31 = or disjoint i64 %index, 4
  %32 = getelementptr inbounds i32, ptr %26, i64 %index
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %wide.load = load <4 x i32>, ptr %32, align 4, !tbaa !5, !alias.scope !12, !noalias !14
  %wide.load105 = load <4 x i32>, ptr %33, align 4, !tbaa !5, !alias.scope !12, !noalias !14
  %34 = getelementptr inbounds i32, ptr %24, i64 %index
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %wide.load106 = load <4 x i32>, ptr %34, align 4, !tbaa !5, !alias.scope !16
  %wide.load107 = load <4 x i32>, ptr %35, align 4, !tbaa !5, !alias.scope !16
  %36 = add nsw <4 x i32> %wide.load106, %broadcast.splat109
  %37 = add nsw <4 x i32> %wide.load107, %broadcast.splat109
  %38 = icmp sgt <4 x i32> %wide.load, %36
  %39 = icmp sgt <4 x i32> %wide.load105, %37
  %40 = icmp ne <4 x i32> %wide.load106, <i32 100000, i32 100000, i32 100000, i32 100000>
  %41 = icmp ne <4 x i32> %wide.load107, <i32 100000, i32 100000, i32 100000, i32 100000>
  %.not127 = and <4 x i1> %40, %38
  %.not131 = and <4 x i1> %41, %39
  %.not125 = and <4 x i1> %29, %.not127
  %.not129 = and <4 x i1> %30, %.not131
  %42 = extractelement <4 x i1> %.not125, i64 0
  br i1 %42, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %43 = getelementptr inbounds i32, ptr %26, i64 %index
  %44 = extractelement <4 x i32> %36, i64 0
  store i32 %44, ptr %43, align 4, !tbaa !5, !alias.scope !12, !noalias !14
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %45 = extractelement <4 x i1> %.not125, i64 1
  br i1 %45, label %pred.store.if110, label %pred.store.continue111

pred.store.if110:                                 ; preds = %pred.store.continue
  %46 = or disjoint i64 %index, 1
  %47 = getelementptr inbounds i32, ptr %26, i64 %46
  %48 = extractelement <4 x i32> %36, i64 1
  store i32 %48, ptr %47, align 4, !tbaa !5, !alias.scope !12, !noalias !14
  br label %pred.store.continue111

pred.store.continue111:                           ; preds = %pred.store.if110, %pred.store.continue
  %49 = extractelement <4 x i1> %.not125, i64 2
  br i1 %49, label %pred.store.if112, label %pred.store.continue113

pred.store.if112:                                 ; preds = %pred.store.continue111
  %50 = or disjoint i64 %index, 2
  %51 = getelementptr inbounds i32, ptr %26, i64 %50
  %52 = extractelement <4 x i32> %36, i64 2
  store i32 %52, ptr %51, align 4, !tbaa !5, !alias.scope !12, !noalias !14
  br label %pred.store.continue113

pred.store.continue113:                           ; preds = %pred.store.if112, %pred.store.continue111
  %53 = extractelement <4 x i1> %.not125, i64 3
  br i1 %53, label %pred.store.if114, label %pred.store.continue115

pred.store.if114:                                 ; preds = %pred.store.continue113
  %54 = or disjoint i64 %index, 3
  %55 = getelementptr inbounds i32, ptr %26, i64 %54
  %56 = extractelement <4 x i32> %36, i64 3
  store i32 %56, ptr %55, align 4, !tbaa !5, !alias.scope !12, !noalias !14
  br label %pred.store.continue115

pred.store.continue115:                           ; preds = %pred.store.if114, %pred.store.continue113
  %57 = extractelement <4 x i1> %.not129, i64 0
  br i1 %57, label %pred.store.if116, label %pred.store.continue117

pred.store.if116:                                 ; preds = %pred.store.continue115
  %58 = getelementptr inbounds i32, ptr %26, i64 %31
  %59 = extractelement <4 x i32> %37, i64 0
  store i32 %59, ptr %58, align 4, !tbaa !5, !alias.scope !12, !noalias !14
  br label %pred.store.continue117

pred.store.continue117:                           ; preds = %pred.store.if116, %pred.store.continue115
  %60 = extractelement <4 x i1> %.not129, i64 1
  br i1 %60, label %pred.store.if118, label %pred.store.continue119

pred.store.if118:                                 ; preds = %pred.store.continue117
  %61 = or disjoint i64 %index, 5
  %62 = getelementptr inbounds i32, ptr %26, i64 %61
  %63 = extractelement <4 x i32> %37, i64 1
  store i32 %63, ptr %62, align 4, !tbaa !5, !alias.scope !12, !noalias !14
  br label %pred.store.continue119

pred.store.continue119:                           ; preds = %pred.store.if118, %pred.store.continue117
  %64 = extractelement <4 x i1> %.not129, i64 2
  br i1 %64, label %pred.store.if120, label %pred.store.continue121

pred.store.if120:                                 ; preds = %pred.store.continue119
  %65 = or disjoint i64 %index, 6
  %66 = getelementptr inbounds i32, ptr %26, i64 %65
  %67 = extractelement <4 x i32> %37, i64 2
  store i32 %67, ptr %66, align 4, !tbaa !5, !alias.scope !12, !noalias !14
  br label %pred.store.continue121

pred.store.continue121:                           ; preds = %pred.store.if120, %pred.store.continue119
  %68 = extractelement <4 x i1> %.not129, i64 3
  br i1 %68, label %pred.store.if122, label %pred.store.continue123

pred.store.if122:                                 ; preds = %pred.store.continue121
  %69 = or disjoint i64 %index, 7
  %70 = getelementptr inbounds i32, ptr %26, i64 %69
  %71 = extractelement <4 x i32> %37, i64 3
  store i32 %71, ptr %70, align 4, !tbaa !5, !alias.scope !12, !noalias !14
  br label %pred.store.continue123

pred.store.continue123:                           ; preds = %pred.store.if122, %pred.store.continue121
  %index.next = add nuw i64 %index, 8
  %72 = icmp eq i64 %index.next, %n.vec
  br i1 %72, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %pred.store.continue123
  br i1 %cmp.n, label %._crit_edge57.us.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %.preheader49.us.us, %middle.block
  %indvars.iv72.ph = phi i64 [ 0, %.preheader49.us.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %81
  %indvars.iv72 = phi i64 [ %indvars.iv.next73, %81 ], [ %indvars.iv72.ph, %scalar.ph.preheader ]
  %73 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = load i32, ptr %27, align 4, !tbaa !5
  %76 = getelementptr inbounds i32, ptr %24, i64 %indvars.iv72
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = add nsw i32 %77, %75
  %79 = icmp sle i32 %74, %78
  %.not.us.us = icmp eq i32 %77, 100000
  %or.cond.us.us = or i1 %.not.us.us, %79
  %.not46.us.us = icmp eq i32 %75, 100000
  %or.cond47.us.us = or i1 %.not46.us.us, %or.cond.us.us
  br i1 %or.cond47.us.us, label %81, label %80

80:                                               ; preds = %scalar.ph
  store i32 %78, ptr %73, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %80, %scalar.ph
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next73, %wide.trip.count83
  br i1 %exitcond.not, label %._crit_edge57.us.us, label %scalar.ph, !llvm.loop !21

._crit_edge57.us.us:                              ; preds = %81, %middle.block
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count83
  br i1 %exitcond79.not, label %._crit_edge59.split.us.us, label %.preheader49.us.us, !llvm.loop !22

._crit_edge59.split.us.us:                        ; preds = %._crit_edge57.us.us
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond84.not = icmp eq i64 %indvars.iv.next81, %wide.trip.count83
  br i1 %exitcond84.not, label %.preheader, label %.preheader50.us, !llvm.loop !23

82:                                               ; preds = %.lr.ph, %82
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %82 ]
  %83 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv69) #4
  %84 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %indvars.iv) #4
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv
  store i32 %85, ptr %86, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %87 = load i32, ptr @v, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = icmp slt i64 %indvars.iv.next, %88
  br i1 %89, label %82, label %._crit_edge, !llvm.loop !24

._crit_edge:                                      ; preds = %82, %.preheader52.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader52.._crit_edge_crit_edge ], [ %88, %82 ]
  %90 = phi i32 [ %7, %.preheader52.._crit_edge_crit_edge ], [ %87, %82 ]
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %91 = icmp slt i64 %indvars.iv.next70, %.pre-phi
  br i1 %91, label %.preheader52, label %.preheader51, !llvm.loop !25

.preheader:                                       ; preds = %._crit_edge59.split.us.us, %._crit_edge63
  %92 = phi i32 [ %97, %._crit_edge63 ], [ %90, %._crit_edge59.split.us.us ]
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %._crit_edge63 ], [ 0, %._crit_edge59.split.us.us ]
  %93 = icmp sgt i32 %92, 0
  br i1 %93, label %.lr.ph62, label %._crit_edge63

.lr.ph62:                                         ; preds = %.preheader
  %94 = mul nuw nsw i64 %indvars.iv88, %3
  %95 = getelementptr inbounds i32, ptr %5, i64 %94
  br label %100

._crit_edge65:                                    ; preds = %._crit_edge63, %1, %.preheader51
  ret void

._crit_edge63:                                    ; preds = %109, %.preheader
  %96 = 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.next89 = add nuw nsw i64 %indvars.iv88, 1
  %97 = load i32, ptr @v, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = icmp slt i64 %indvars.iv.next89, %98
  br i1 %99, label %.preheader, label %._crit_edge65, !llvm.loop !27

100:                                              ; preds = %.lr.ph62, %109
  %indvars.iv85 = phi i64 [ 0, %.lr.ph62 ], [ %indvars.iv.next86, %109 ]
  %101 = getelementptr inbounds i32, ptr %95, i64 %indvars.iv85
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = icmp eq i32 %102, 100000
  br i1 %103, label %104, label %106

104:                                              ; preds = %100
  %105 = 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)
  br label %109

106:                                              ; preds = %100
  %107 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %102)
  %108 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef nonnull @.str.1)
  br label %109

109:                                              ; preds = %104, %106
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %110 = load i32, ptr @v, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = icmp slt i64 %indvars.iv.next86, %111
  br i1 %112, label %100, label %._crit_edge63, !llvm.loop !28
}

; 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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

; 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

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 = { "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 = { 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 = distinct !{!10, !11}
!11 = distinct !{!11, !"LVerDomain"}
!12 = !{!13}
!13 = distinct !{!13, !11}
!14 = !{!10, !15}
!15 = distinct !{!15, !11}
!16 = !{!15}
!17 = distinct !{!17, !18, !19, !20}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !18, !19}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}
!25 = distinct !{!25, !18, !26}
!26 = !{!"llvm.loop.unswitch.partial.disable"}
!27 = distinct !{!27, !18}
!28 = distinct !{!28, !18}


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